DEGREE PROJECT IN ELECTRICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM, SWEDEN 2019

Optimization of Virtual Power Plant in Nordic Electricity Market

JWALITH DESU

KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE KTH Royal Institute of Technology

Master Thesis

Optimization of Virtual Power Plant in the Nordic Electricity Market

Author: Jwalith Desu Supervisor: Dr. Mohammad Reza Hesamzadeh

Examiner: Dr. Mohammad Reza Hesamzadeh

A thesis submitted in fulfilment of the requirements for the degree of Master of Science

in the

Electricity Market Research Group (EMReG) School of Electrical Engineering

October 2019 Declaration of Authorship

I, Jwalith DESU, declare that this thesis titled, ’Optimization of Virtual Power Plant in the Nordic Electricity Market’ and the work presented in it are my own. I confirm that:

 This work was done wholly or mainly while in candidature for a research degree at this University.

 Where any part of this thesis has previously been submitted for a degree or any other qualification at this University or any other institution, this has been clearly stated.

 Where I have consulted the published work of others, this is always clearly at- tributed.

 Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work.

 I have acknowledged all main sources of help.

 Where the thesis is based on work done by myself jointly with others, I have made clear exactly what was done by others and what I have contributed myself.

Signed:

Date:

i Abstract

With the world becoming more conscious about achieving 1.5-degree scenario as promised by the most powerful economies of the world, much needed push was received by the renewable energy technology providers. This has led to an increased a share of energy production from renewables and a decrease in the fossil-based energy production with the overall energy production. As a result, a large share of inertia of the system is lost and a big challenge in the name of flexibility is presented to the world of energy. Virtual Power Plant is quite a novel and new concept to address the new generation challenge of flexibility and can offer various other benefits like competitivity,reliability, accessibility etc. In this thesis, a commercial virtual power plant is studied by developing a mixed integer to emulate the trading for short term markets with the risk mea- sures in a Nordic Electricity Framework. Further, the developed model is implemented in a quite a new mathematical programming language known as “Julia”. The model is implemented using a hypothetical portfolio consisting of a dispatchable unit, a battery system and a wind farm in the SE3 bidding zone of Sweden. An investigation on varia- tion of imbalance costs in three different modes also has been carried out, to demonstrate the advantage of such a virtual power plant concept in reducing the imbalance costs.

Keywords: Virtual Power Plant, mFRR market, spot market, CVaR, risk measures, Stochastic Optimization, Nordic Electricity Market. Abstract

F¨oratt uppfylla 1,5-gradersm˚aletsom beslutats av v¨arldensledande ekonomier har olika typer av f¨ornybar energiproduktion f˚attett stort uppsving. Detta har lett till ¨okad en- ergiproduktion fr˚anf¨ornybara k¨alloroch minskad energiproduktion fr˚anfossila k¨allor. F¨orelsystemen inneb¨aren h¨ogreandel f¨ornybar produktion minskad sv¨angmassaoch ¨okat behov av flexibilitet f¨oratt kompensera f¨orvariationen hos f¨ornybara energik¨allor. Virtuella kraftverk ¨arett nytt koncept f¨oratt tillgodose behovet av flexibilitet och kan ¨aven ge andra f¨ordelarsom konkurrenskraft och tillf¨orlitlighet. I denna uppsats stud- eras ett virtuellt kraftverk genom att utveckla en optimeringsmodell f¨oratt emulera handeln i elmarknader med riskm˚attinom ett ramverk f¨orden nordiska elmarknaden. Modellen implementeras i det nya programmeringsspr˚aket Julia. Modellen inneh˚aller en hypotetisk blandning av resurser best˚aendeav ett planerbart kraftverk, ett batter- isystem och en vindpark i elomr˚adetSE3 i Sverige. Balanseringskostnaderna i tre olika modeller unders¨oksf¨oratt visa potentialen hos det virtuella kraftverket att minska dessa kostnader.

Nyckelord: Virtuellt kraftverk, mFRR marknad, spotmarknad, CVaR, riskm˚att,stokastisk optimering, nordiska elmarknaden Acknowledgements

I take this opportunity to express my gratitude to everyone who have been associated with this thesis directly or indirectly.

I want to thank the team at GreenLytics AB for giving me an opportunity to associate with them on their amazing journey in decarbonizing the economy.Especially my Super- visor, Sebastian Haglund El Gaidi, and his team to answer all my questions patiently.

I would like to thank my parents, family and friends for their continuous support during the whole thesis.

Finally, I want to thank my supervisor and examiner at KTH, Dr. Mohammad Reza Hesamzadeh, for guiding and trusting me through the thesis.

ii Contents

Declaration of Authorshipi

Abstract i

Abstract i

Acknowledgements ii

Contents iii

List of Figuresv

List of Tables vi

Abbreviations vii

Nomenclature ix

Nomenclaturex

Nomenclature xi

1 Introduction1 1.1 Background & Motivation...... 1 1.2 Existing Literature...... 4 1.3 Goal of the Study...... 6 1.4 Thesis Structure...... 7

2 Nordic Electricity Market8 2.1 Introduction...... 8 2.2 Day Ahead Market- ELSPOT...... 9 2.3 Intraday Market- ELBAS...... 10 2.4 Nordic Balancing Concept...... 10 2.4.1 Manual Frequency Restoration Reserve (mFRR) - Tertiary Reserve 12 2.4.2 Automatic Frequency Restoration Reserve (aFRR) – Secondary Reserve...... 13 2.4.3 Frequency Containment Reserve (FCR) – Primary Reserve.... 15

iii Contents iv

2.4.3.1 Frequency Containment Reserve – Normal Operation.. 15 2.4.3.2 Frequency Containment Reserve – Disturbed Operation. 15 2.4.3.3 Pre-qualification, Reporting, Bidding & Procurement of FCR...... 16 2.5 Imbalance Settlement and Pricing...... 17

3 Methodology 20 3.1 Introduction...... 20 3.2 Model Assumptions...... 21 3.3 Model Description...... 23 3.3.1 Modelling a Dispatchable unit...... 24 3.3.2 Modelling of Flexible loads...... 27 3.3.3 Modelling of Storage Unit...... 28 3.3.4 Modelling of Stochastic Units...... 29 3.3.5 Formulation of the Objective Equation of the VPP...... 29 3.4 Energy Balance Constraints...... 31 3.5 Other Constraints...... 31 3.6 Selection of Scenarios...... 34 3.7 Flow chart of the Stochastic Optimization Model...... 36 3.8 Investigating the Imbalance Costs per MWh for different modes of VPP. 37

4 Case Study 39 4.1 Scope...... 39 4.2 Input Data...... 40 4.3 Implementation and Results...... 46 4.4 Investigation of Imbalance Costs...... 51

5 Closure 56 5.1 Summary...... 56 5.2 Recommendations for Future Possibilities...... 57

A Linearization of the Quadratic Fuel Cost Function 59

B Codes 61

Bibliography 76 List of Figures

1.1 VPP...... 3

2.1 MCP...... 9 2.2 FCR...... 16 2.3 IB...... 18

3.1 scenario generation...... 35 3.2 Bidding Startegy...... 37

4.1 day ahead price...... 40 4.2 day ahead price scenarios...... 41 4.3 Upregulation prices...... 41 4.4 Upregulation prices Scenarios...... 42 4.5 Downregulation price...... 42 4.6 Downregulation price Scenarios...... 43 4.7 mFRR prices...... 43 4.8 mFRR prices scenarios...... 44 4.9 Wind Power Forcast Scenarios...... 45 4.10 hour1...... 47 4.11 hour2...... 47 4.12 hour23...... 48 4.13 hour24...... 48 4.14 scenario1...... 49 4.15 scenario2...... 50 4.16 scenario9...... 50 4.17 scenario10...... 51 4.18 imbalance costs month...... 53 4.19 imbalance costs month...... 53 4.20 imbalance costs...... 54 4.21 cumulative profit...... 55

A.1 fuel cost...... 59

v List of Tables

1.1 Comparison of all the existing literature...... 6

4.1 Calculation of imbalance costs in different modes of operation...... 54

vi Abbreviations

API Application Programming Interface ARIMA AutoRegressive Integrated Moving Average BM Balancing Market BRP Balancing Responsible Party BSP Balancing Service Provider CHP Combined Heat and Power CVaR Conditional Value at Risk DER Distributed Energy Sources EMS Energy Management and System ENTSO European Network of Transmission System Operators EU European Union EVPI Expected Value of Perfect Information FRR Frequency Restoration Reserve GT Gas Turbine ICT Information and Communication Technology JuMP Julia Mathematical Programming MoNB Minutes outside the Normal frequency Band MILP Mixed Integer Linear Programming NAG Nordic Analysis Group NEMO Nominated Electricity Market Operator PV Photo Voltaic PX Power EXchange RES Renewable Energy Sources RM Reserve Market RPM Regulating Power Market

vii Abbreviations viii

SOA Standard Operating Agreement TSO Transmission System Operator VPP Virtual Power Plant Nomenclature

Indices t Index of time periods in hourly resolutions from 1..T

ω Index of scenarios from 1..NΩ G Dispatchable unit J Flexible Load S Storage unit W Stochastic unit i ith dispatchable unit j jth flexible unit k kth Storage unit q qth Stochastic unit

ix Nomenclature

Parameters T Total number of time slots D λωt Day Ahead Price at time t in scenario ω in Eur/MWh λωt Reserve Price (mFRR) at time t in scenario ω in Eur/MWh UP λωt Upregulation Price (mFRR) at time t in scenario ω in Eur/MWh DW λωt Downregulation Price (mFRR) at time t in scenario ω in Eur/MWh

πω probability of occurrence in scenario ω

NΩ Total number of scenarios U Si Fixed cost derived from startup process in Euros D Si Fixed Shutting down cost in Euros

∆Gi Ramp up or Ramp down rate of unit i ηk Efficiency of the charging process d ηk Efficiency of the discharging process

x Nomenclature

Binary Variables

viωt Functional state of generating unit i, 1 if active, else 0 at time t in scenario ω

yiωt Decision variable for the conventional unit to partici- pate in the reserve market, 1 if active, else 0 at time t in scenario ω

biωt Decision variable used in linearization of fuel cost func- tion, 1 if the compiler in the interval n, else 0 at time t in scenario ω

Continuous Variables D Pωt Power exchanged with day ahead market in time pe- riod t in scenario ω , expressed in MW R Pωt Power exchanged with the reserve market at time pe- riod t in scenario ω , expressed in MW ρ Monetary Profit SU Ciωt Total start-up cost of unit i in the same period in scenario ω SD Ciωt Total shutdown cost of unit i in the same period in scenario ω

PW qωt Stochastic production from unit q at time t in scenario ω , expressed in MW

EGiωt Generated electricity in MWh from the dispatchable unit i at time t in scenario ω

xi Variables xii

PGiωt Power output of dispatchable unit i at time tin sce- nario ω , expressed in MW

ELjωt Amount of energy consumed by load j at time t in scenario ω in MWh

PLjωt Power capacity of load j at time t in scenario ω , ex- pressed in MW d PSkωt Discharging power of Storage unit k at time t in sce- nario ω , expressed in MW c PSkωt Charging power of Storage unit k at time t in scenario ω , expressed in MW

ESkωt Energy in Storage unit k at time t in scenario ω in MWh DW Pωt Balancing Power in positive direction in scenario ω , expressed in MW UP Pωt Balancing Power in negative direction in scenario ω , expressed in MW Chapter 1

Introduction

1.1 Background & Motivation

There is a rapid increase in the renewable energy resources contribution in the overall electricity mix of the Nordic economies. The new EU climate targets for 2030 are a) at least 40% cuts in greenhouse gas emissions (from 1990 levels), b) at least 32% share of renewable energy, c) at least 32.5% improvement in energy efficiency. Meeting these new targets will lead to proliferation of intermittent energy resources in the system. With the increasing concerns pertaining to the nuclear energy, especially after Fukushima nuclear accident in 2011, closure of many nuclear facilities has been inevitable. The Nordic energy mix is going to face many challenges due to this major change. Electricity being one of the biggest sectors to be affected by this radical change in the policy and strategy. The long-term goal of creating a 100% renewable energy-based system will lead to many new market requirements, designs, concepts and products [1].

Traditionally, the power system and the market has been dominated by huge power producing facilities embedded in a centralised fashion and then the energy was deliv- ered to the end customer within the grid. Additionally, the act of balancing the system was principally provided by the supply side through the flexible generation. The idea of supply following demand has been a traditional way of the design of the power sys- tem, however with the increasing interest in protecting the environment, the concept of embracing sustainability in daily life with the faster adoption of renewable based controllable power generation and flexible load behaviours of consumers has led to a

1 Chapter 1. Introduction 2 radical change in the concept of revolutionising the design of the power system. The

Nordics have been performing extremely well in combating the CO2 emissions with an extensive and aggressive green revolution [2]. However, most of the Nordic and Baltic are still dominated by a traditional policy framework. As per the World Bank data, over the past decade (2005-2015), there is a rapid increase in the renewable sources from approximately 5% to 16% of the total electricity produced, except hydroelectric in Sweden. Government incentives to household users and businesses in Sweden receive a 30% subsidy for PV modules and 60% for batteries [3]. Furthermore, the rapid decrease in the cost of PV and Wind energy generating sources have led to a massive adoption of these technologies by small traders, households, industries etc. to meet their demands. Small wind and solar farms depending on the size are also capable of producing enough energy to meet the consumption of a small village, county or a sector. With lot of small capacity asset owners capable of pumping power into the power system, the concept of prosumers and decentralised system is getting popular [4]. A gradual increase in cars and various controllable loads within the Nordics have opened ways to include de- mand response and introduction of various other services and products. However, due to their small capacities and the stochastic nature of these renewable sources makes it risky and very difficult to participate in the market and adhere by the requirements of the power system [5]. This increased intermittent source of energy injects a lot of instability and surges into the system which further increases the vulnerability of the system for imbalances. This rapid increase in the percentage share of the renewable sources adds a lot of uncertainty with their power production availability all the time. This nature of intermittency requires new solutions and an improved decision-making strategy involving a better forecast to manage all the imbalances and other hidden costs [6]. Many challenges within power system and the economical setup of the system will rise and pose as major impediments in the smooth operation and to meet the desired climate targets. These can be only addressed with novel and innovative technologies in the energy sector.

During the years 2005-15, renewable consumption has shown an increasing trend from 40% to 54%, giving a clear indication of how the energy landscape would further transi- tion to more an intermittent nature. In order to manage this new and pressing challenge of maintaining the balance between production and consumption, a series of novel and future ready solutions are to be devised for the electricity market. With digitalization Chapter 1. Introduction 3 being adopted in every sector of economy, energy has been a sector behind in adopt- ing the next generation of ICT technologies in its operation and maintenance. Thus, a smart solution using ICT to battle these fluctuations induced due to the intermittent sources can be addressed. With the concept of aggregating a large number of intermit- tent sources, a smooth production profile can be achieved, and a lot of these disturbances can be dampened by the use of various other products of the electricity market. This concept of aggregation is sometimes referred as Virtual Power Plant (VPP). There are various services a VPP can offer like Flexibility to the grid operators as and when re- quired. Few industrial actors are currently acting as aggregators by combining small production units and some consumption units together.

The VPP concept, where production of individual renewable energy source is aggregated into a single operating profile, is supposed to be an efficient way toward the successful coupling of various products of electricity market [4]. VPPs can be an economically- attractive market participant that can easily contribute towards a greater reliability and resilience by adaptively using the pool of energy resources and spreading the generation across large geographical areas.

Figure 1.1: Concept of Virtual Power Plant. Source: Markettalknews Chapter 1. Introduction 4

Characteristics of a VPP concept can be stated down as below [7]:

• Reliability: Having a portfolio with a large number of assets improves the capacity to face any outages in the system. One would rather have the loss of a small plant rather than a large one.

• Optimality: With the considerable variety and number of assets in the system, pos- sibility to locally optimize the dispatch can reduce overall losses and compensate for unplanned outages. Imbalances can also be handled by offering the flexibility of VPP to the TSO.

• Accessibility: A VPP can allow small capacity owners like residential owners, small workshop owners etc. to participate in the wholesale market by aggregating them all into one big virtual power producing entity.

• Competitivity: Since now there would be more number of participants in the system, trade volumes increase, competition would lead to better services and an improved overall social welfare.

• Profitability: Customers who are small owners and cannot participate in the mar- ket, with the concept of VPP now they can earn additional revenues by partici- pating in the market.

This capability of such a concept for a Nordic market landscape will be further discussed in this thesis.

1.2 Existing Literature

The concept of Virtual Power Plants (VPPs) have been perceived in many different ways by various actors/entities of the electricity market. VPPs are depicted/explained as micro grid [8,9] Renewable energy resources [10], [11] and hydro-power system [12]. As per [13], a VPP is an “aggregation of the capacity of many diverse distributed energy resources; it creates a single operating profile from a composite of the parameters characterizing each DER and can incorporate the impact of the network on aggregated DER output.” Similar definitions are also supported by some papers like [14], [15] and [16] where a VPP consists of a combination of fossil based and intermittent sources Chapter 1. Introduction 5 like CHP, Biomass and biogas, Small hydro power plants, Small capacity gas turbines, diesels etc., Wind, Solar, flexible loads (controllable/dispatch-able) etc. Ref [15, 17, 18] also mentions that the heart of a VPP is an energy management system (EMS) which coordinates the power flows from generators, loads and storage units or small actors like industrial on-site generators, shopping centers etc.

Aspects of grid management is not considered in this thesis, as it’s extensively covered in the literature [19], [20]. A simple day ahead market scheduling strategy is modelled to maximize the VPP owners’ profit in [21], [22]. Ref [23] Further considers distribution network constraints while considering model decomposition for day ahead and real time markets. Ref [24] proposes a three-stage stochastic model for optimal dispatch of a VPP while considering the uncertainty in the rival’s offer for a day ahead market in the Greek electricity market. The studies from references [25] show that in a VPP consisting of micro-CHPs could benefit the owner in reducing imbalances caused due to renewable such as wind power. Reference [5] quotes from previous studies that scheduling of dispatch-able generators and deploying elastic demand can help reduce imbalance power caused by the intermittent renewable sources and decrease penalties, further increasing the overall profits. [26],[24] Propose a model consisting of price maker market actor model from a retailer’s perspective with flexible demands & rivals offer respectively, however this thesis assumes a price taker producer model who has no influence on the market prices.

There are various studies carried out on optimal economic VPP configuration for German market like in [27], which considers deterministic RES. [28] and [29] also propose a similar model considering the uncertainties in RES, demand but leave out uncertainties in price for Taiwanese and Australian electricity markets respectively. However, no specific studies have been carried out for a Nordic based electricity market framework, which is duly taken up with this thesis.

Papers [30, 31] propose a realistic VPP model considering a multi-market participation while considering risk measures for two different markets namely New York and Iberian respectively. [30] Has been carried out comprehensively over a period of three years and have included all the three major markets i.e. Day ahead market, reserve market and the real time balancing market, however it doesn’t include demand or the load into the VPP portfolio. Whereas [31] is carried out in an Iberian market framework with the Chapter 1. Introduction 6 similar portfolio of VPP as [30] while considering loads and its associated uncertainties. Below table summarises the contributions of various papers while comparing it with the contributions of this thesis:

Table 1.1: Comparison of all the existing literature

Papers Reserve Real Time Uncertainty Risk Nordic Market Imbalance in the Measure Market (RM) settlement prices (Day (CVaR) Framework (BM) Ahead, RM, BM) 15 x X x X x 16 X X X x x 17 x x x x x 21 x X x x x 22 x X X X x 39 x X Only BM x x 41 x X X x x 42 X X X X x 43 X X X X x Proposed X X X X X Model

This thesis deals with developing of Optimal bidding strategy for a virtual power plant trader similar to papers [30, 31]. However, there have been no similar models designed or developed specifically to address the Nordic market frameworks to the best of our knowledge. The MILP proposed will be used by traders as a decision tool to bid in the day ahead, reserve and the real time balancing markets.

1.3 Goal of the Study

The goal of the study is to develop a model for operating a VPP and to perform a profit optimization for the whole portfolio. A tool based on Julia language has been developed in order to determine on a daily basis in which product to bid on the Nordic market. All the day ahead market, reserve market and the real time imbalance settlement markets are taken into account to maximize the profit. Uncertainties pertaining to Day ahead, Reserve market and real time imbalance settlement along with renewable power generation are considered in the model to provide the expected energy activated using stochastic optimization. The Renewable energy production forecast data are provided by Greenlytics AB, for all the SE3 region of Sweden. As a consequence, the study gives Chapter 1. Introduction 7 one possible realistic model of a VPP that can be marketed in the Nordic electricity market.

The results of this study will be of a great help to optimize the scheduling of the portfolio of the VPP among the different products over the time in order to maximize the profits and minimize the cost & penalties of use of the portfolio during the operation of the VPP.

1.4 Thesis Structure

The remaining of this thesis will follow the described structure: Chapter 2 will provide an overview of the relevant energy markets for the Nordics, Chapter 3 describing the methodology of this study. The mathematical formulation of how the VPP is modelled with all technical and commercial operational constraints in the context of a Nordic Electricity market. Further lays foundation on how an indicative imbalance cost saving in 3 different modes of VPP is carried out. Chapter 4 evaluates and discusses the implementation and performance of the model and presents the investigation of imbalance costs in different modes of operation of a VPP. Chapter 5 concludes the thesis with the summary. Future opportunities are discussed with related on to simplification of the model. Chapter 2

Nordic Electricity Market

2.1 Introduction

After the liberalization of the electricity markets in Europe, there have been a major restructuring of the whole industry. The traditional system of the electricity markets was no longer beneficial for the producer/actors, a new but sustainable business models were required. Now the electricity actors were more empowered, which increased the trust of the actors to sustain and thrive in the system. The reform mainly separated the production and sale of the electricity from the transmission and distribution (network). This exposed the production and traders to the competition – while the network oper- ators were monopolised [32]. Electricity is not only a commodity, but also a physical entity subjected to various physical laws. One of the major tasks being to maintain the balance between supply and consumption at all the time for a safe and secure operation of the system. At present due to the unavailability of the sufficiently efficient and cost- effective storage systems, it is not possible to implement these systems on a very large scale. Thus, it is important to always maintain the quality, i.e. constantly maintaining the frequency at 50Hz of the whole grid, if not large deviations could lead to failure of magnetic equipment and a chain effect mounting to a total blackout [33]. An upward deviation of the system from 50Hz implies an increase in demand which is more than the supply, whereas a downward deviation of the system from 50Hz implies an excess of supply when compared to the consumption/demand. It is therefore very important to forecast and foresee such deviations to avoid undesirable outcomes and make the system more resilient to such situations. Despite the balance between the supply and demand, 8 Chapter 2. Nordic Electricity Market 9 transmission system operators (TSO) often encounter imbalances in the system. Thus, there are technical and economical mechanisms in place to handle such imbalances and anomalies of the system. A new Nordic balancing concept is being under consultations to ascertain two new balancing market products [34], which will be discussed further in the report. The electricity market is a complex entity where financial trading is em- ployed in order to buy/sell electricity and is comprehensively covered in [35, 36]. A market operator in the Nordic region handles all these financial transactions in various markets such as day ahead and intraday markets, whereas Nasdaq handles the futures market and the respective TSO handle other reserve markets to maintain balance of the system.

2.2 Day Ahead Market- ELSPOT

The day-ahead market also in some cases referred as Spot markets, consists of all the electricity products scheduled to be offered/delivered a day after the closed auction. All the producers and consumers of the region submit their bids of production and their consumptions with the price they are willing to pay for consuming and the price they are willing to buy for producing the energy in order to maximize their profits. The bids are later sent to the Nominated Market operator before the decided gate closure time, after which the market operator matches the orders to maximize social welfare whilst taking network and other physical constraints provided by infrastructure operators into consideration to obtain the market clearing price for the energy per unit per hour.

Figure 2.1: Market Clearing price.Source:[7] Chapter 2. Nordic Electricity Market 10

A digital platform ELSPOT, is used to carry out the whole process of submission of bids and offers and communicate the prices after the clearing process. Later that producers schedule their positions accordingly to meet their commitments. Figure 2.1 shows the intersection of the demand and selling bids sets the clearing price for the day ahead market. All the selling bids below this price have a profitable position and therefore get accepted. In a perfect market scenario, the price quoted by the producer needs to be as near as possible to the marginal cost of production in order to ensure the operations of the plant and to recover costs investments.

2.3 Intraday Market- ELBAS

This market supports trading of the energy closer to the hour of delivery, this is impor- tant for producers who have weather dependent sources of energy. It allows the producer to adjust their position according to the real time information and trade until 30 min prior to the delivery hour. The uncertainty associated with the renewable energy sources such as PV, wind etc. make the producer prone to large imbalances, thereby incurring considerable amount of monetary losses. Intraday Market products plays a vital role in reducing such undesirable situation leading to losses. Though, the low liquidity makes the intraday markets not so interesting for the traders to participate. Thus, various new initiatives to encourage the intraday trades have been taken up by the market operators and other associated stakeholders.

2.4 Nordic Balancing Concept

To maintain the quality of the power supply is of utmost importance to continue the operation of the system. A crucial mechanism of balancing is employed by the system operator, in this case the Transmission system operator (TSO) to ensure quality of the power supply. This section aims to give a better explanation to the Nordic balancing concept.

Electricity has become an important commodity for a proper functioning of business and life. Thus, it should be prioritized to ensure secure, safe production, delivery and maintain the quality of the electricity to the end consumers. Frequency of the system Chapter 2. Nordic Electricity Market 11 at any given time period of operation is used as an indicator to identify the health and the quality of the system. Frequency deviations indicate imbalances in the system, which if not controlled can lead to complete black out of the system. TSO plays a crucial role in monitoring and maintaining the balance of the system for each and every time interval/period. The balance of the system is achieved by maintaining a perfect balance between the production and the consumption at every time period in every control area, thereby maintaining the frequency of the system to 50Hz. This balance could be disturbed by excess production leading to increased frequency, and a reduction in frequency if excess consumption is observed [37]. However, there may be numerous inevitable reasons for the imbalance in the system such as,

• Unplanned outages of generation units

• Unplanned outages of grid

• Deviations due to improper forecast of demand

• Deviations due to improper forecast of renewable units

The last point has over the time become more important as the recent nuclear aban- donment has picked up much momentum leading to a void in the mix, making the proliferation of renewable sources in the Nordics more rapid. The future power system will be dominated by these weather dependent energy sources, which are not 100% pre- dictable. Thus, the stochastic aspect of these weather dependent renewables can pose a big challenge in maintaining the balance. This thesis would try to model this stochastic aspect of the wind with the help of scenarios approach, which will used in the model.

There is an important distinction between BRPs and TSOs which needs to be distin- guished clearly based on their responsibilities. BRPs must strictly balance their port- folios for every time period (15min, 30min, 1hour), up to the operational time period, through trading in various available markets such as day ahead, intraday market and bilateral trades; which is also called as planning phase. After the gate closure of the markets, balancing activity is taken up by the TSO through the operation of the bal- ancing market mechanisms; aided with the final generation and demand schedules sent by the BRPs 45 minutes prior to the operation period [38]. Chapter 2. Nordic Electricity Market 12

There are three types broadly used currently in the Nordics namely: tertiary, secondary and primary reserves depending on the purpose and features of the reserve in relation with the type of contingency encountered in the system. TSOs buy capacity of these mentioned reserves for any unforeseen eventualities leading to undesirable situations. Depending on the nature of the imbalance a capacity bid can be invoked either to increase or decrease the power production. There are certain technical and economical requirements for each type of reserve that needs to be taken care of by any market participant if they want to trade their reserve product for the market. However, in the recent consultations report supported by ENTSOE, mentioned some new mechanisms being formulated to restructure the balancing market. The new concept of balancing in the Nordics would be based on a proactive and reactive approach, which are still open to discussions and debate [34].

The current Nordic balancing model lacks the prerequisites for taking advantage of the ongoing EU harmonisation in the balancing area. This could widen balancing markets to the Nordic Region, thereby enabling a cost-efficient use of resources within the region by increasing the trade of flexible resources with Continental Europe. The introduction of standard products and common platforms for exchange of balancing products as recommended by electricity balancing guideline will affect the balancing process and the products in the Nordic region.

2.4.1 Manual Frequency Restoration Reserve (mFRR) - Tertiary Re- serve

This type of reserve is manually ordered by the TSO in case of any contingency encoun- tered in the system. Commonly known as the Nordic Regulating Power Market (RPM), is requested for activation after 15 min of the contingency by the TSO.

This reserve can also be segregated into three types namely, balancing energy & capac- ity markets and Fast Disturbance Reserve. Bids in the balancing energy markets are activated in price order, taking into account all the associated technical requirements. Separate bids for up and down regulation can be submitted or updated up to 45 minutes prior to actual delivery by the market actors (BRPs, Traders, etc.). A minimum bid of 10MW throughout Sweden apart from SE4 (bidding/price zone 4) where the minimum Chapter 2. Nordic Electricity Market 13 bid size is 5MW is to be submitted. The regulating prices displayed on NordPool web- site employs marginal pricing i.e. price is calculated by ordered energy and the most expensive bid used in each time period. Price levels can sometimes be better than Day ahead prices which can be hundreds or even to thousands of euros [39].

“Nordic TSOs have agreed that every country to have a must Fast disturbance reserve available the amount to adequate their own dimensioning fault in each part of the sys- tem” [39]. Depending on the dimensioning of this reserve, each country has liberty to choose the adequate amount of capacity for the same. The assets procured for fast dis- turbance reserve have to be strictly committed and cannot participate in other markets simultaneously. This service can also be traded among TSOs.

Balancing Capacity markets are generally availed by the TSO for securing unforeseen upregulation requirements using weekly bidding competitions [39]. Balancing service provider (BSPs) whose upregulation bid is accepted are obliged to deliver the energy to the balancing energy markets. Contrary to the balancing energy market, balancing service provider gets availability payment based on the balancing capacity bids.

2.4.2 Automatic Frequency Restoration Reserve (aFRR) – Secondary Reserve

As mentioned earlier, frequency imbalance can lead to disturbances of the whole syn- chronous area leading to a complete blackout. It is very important to maintain the frequency to its set point i.e. 50Hz. In 2013 aFRR was identified and agreed as one of the major measures to stop the weakening of the frequency quality [38]. The goal is to restrict the minutes outside the normal frequency band (MoNB) within 6000 minutes per year. The year 2016 saw approximately 13 862 MoNB which is way more than the limit decided earlier. A common Nordic aFRR market to handle and restrict MoNB was agreed upon and to start its operations by the first half of the year 2018 [40]. Moreover, a benefit of the aFRR can be based on the merit order and take congestions in the systems into account. This type of reserve is activated automatically on the signal given by the TSO. It is so designed that aFRR works in cognizance with FCR-N (primary reserves), which helps maintain the frequency and then aFRR restores the frequency to the original set point. In the whole process, aFRR shall be deemed as a “complement” to mFRR due to its speed and ease of activation in just 30 seconds and fully activation Chapter 2. Nordic Electricity Market 14 by 120 seconds. At Present, a total of 300MW of aFRR is being traded on the common Nordic aFRR market platform, 130MW of which is based in Sweden [41].

As per [42] the new process for procurement of aFRR will be handled in the following way:

• Daily auction with hourly products, gate closure D-2 at 8 pm in the evening.

• Minimum bid: 5MW and in multiples of 5MW

• Reservation of available transmission capacity for aFRR will be based on:

– Expected price difference between bidding zones in the day-ahead market.

– Prices of aFRR capacity bids.

– Rules to ensure a conservative reservation of capacity.

• Total volume & time period will be dependent on system needs

– Total demand is distributed over all eleven bidding areas forming local de- mand.

• No requirement for symmetrical bids (can be submitted in any direction)

• Pay as bid pricing methodology to be adopted

The common Nordic market for aFRR Balancing Services will consist of two separate mechanisms.

• A Nordic aFRR Capacity Market where aFRR Balancing Capacity is pro- cured before the Day-ahead market taking into account geographical distribution and network constraints. Reservation of Cross-zonal Capacity will be based on socioeconomic optimisation.

• A Nordic aFRR Energy Activation Market where aFRR Balancing Energy is activated based on a Common Merit Order List. Balancing Energy bids will be activated taking into account all the relevant network constraints in real time. Balancing Energy in real time shall be provided by Balancing Service Providers whose Balancing Services are procured in advance in the aFRR Capacity Market, or by other Balancing Service Providers who can voluntarily offer Balancing Energy based on their availability. Chapter 2. Nordic Electricity Market 15

2.4.3 Frequency Containment Reserve (FCR) – Primary Reserve

Usually referred to as the primary reserve, is the first line of mechanism to automatically contain the frequency imbalance in the grid and maintain the frequency to the set point of 50Hz. This type of reserve can be further divided into two products for the Nordic context namely, FCR-N (Normal Operation) and FCR-D (Disturbed operation). Currently the Nordic TSOs are rethinking and redesigning the Frequency Containment process within the Nordic Analysis Group (NAG) [43].

2.4.3.1 Frequency Containment Reserve – Normal Operation

For FCR-N, TSO does not send an automatic control signal as the frequency is measured on-site. As such, FCR-N is activated continuously all along the day within the ”normal operating band” of 50±0.1Hz with a delay of couple of minutes. FCR-N is symmetrical and changes with a linear relationship to the deviation of the frequency from 50Hz. In other words, as the frequency diverges further, up or down from 50Hz, the automatic activation of FCR-N proportionately increases or decreases, until it is fully activated at 50±0.1Hz. Within 60 seconds, 2/3rd of the reserve should be activated while the rest must be activated within 180 seconds if required. This market is organized in hourly and yearly based market products offering both capacity and energy payment methods. The prices for yearly product can be around 14Eur/MWh and few dozens of Eur/MWh for the hourly with a minimum bid of 0.1MW. The Standard Operating Agreement (SOA) between the TSOs requires capacity for FCR-N throughout the Nordics to be 600MW, of which Sweden must contribute 230MW [44]. The reserves must be capable of being maintained for 15 minutes continuously without any interruption [45].

2.4.3.2 Frequency Containment Reserve – Disturbed Operation

This type of reserve product is activated for large frequency deviations when there are huge or sporadic changes in supply or demand suddenly. As soon as the frequency drops beyond 49.90Hz, FCR-D is activated within 5-30 seconds to handle such an undesirable situation [46]. Loads can have an option to participate with one step activation in 1-5 second activation time. Reference [39] mentions different options as shown below: Chapter 2. Nordic Electricity Market 16

• 49,7 Hz 5 s

• 49,6 Hz 3 s

• 49,5 Hz 1 s

In case of Fingrid, it procures a maximum capacity of 100MW at each step while ac- tivating reserves [39]. These types of reserves are only used for up regulation and is available as an hourly and yearly product with a minimum bid of 1MW. The System Operating Agreement (SOA) requires FCR-D to be equipped to the N-1 criterion and hence has a volume of 1160MW for the Nordics. The requirements of each control area are established on the ratio of the energy produced in that control area compared to the energy produced in the entire synchronous area. Therefore, Sweden must contribute 400MW to the FCR-Disturbed operating reserve [44].

Figure 2.2: Chart depicting the boundaries of primary reserves in the Nordic Elec- tricity Market [39]

2.4.3.3 Pre-qualification, Reporting, Bidding & Procurement of FCR

For a market participant to participate in the FCR and FRR market needs to demon- strate that the technical requirements for the reserve market are met, by completing a prequalification with approved results [46]. After all the requirements and the service tests are satisfied as stated above, the system operator in this case the TSO approves entry and the provision of FCR will be included in the balance responsibility agreement. Chapter 2. Nordic Electricity Market 17

Till now, the FCR pre-qualification specifications were designed keeping in mind for the hydro-power resources, however there are new renewable sources like wind are being considered by the TSOs.

As mentioned earlier a minimum bid for 0.1MW and 1 MW for FCR-N and FCR-D respectively are to be submitted for a minimum of one-hour blocks, D-1 or D-2, prior to the delivery day. As per [47] bidding opens at 12:00 noon and closes at 18:00 and 15:00 respectively for D-1 and D-2 with a maximum block bid size of three hours and six hours for D-1 and D-2 respectively.

Once the bids are drafted, the balance service providers are obligated to submit an FCR plan per constraint area to the TSO. All the information flows are carried out digitally using the “Ediel” platform – Nordic electronic information exchange. Bids for the FCR must be based on the marginal costs for regulation as outlined in the balance responsibility agreements. However, the current process of integration of Nordic market with continental Europe has led to some fundamental changes to the balancing concept, which can change the current designs and current perspective of the reserves.

2.5 Imbalance Settlement and Pricing

The purpose of imbalance settlement is to establish a financial balance in the electricity market after the operation hour [48]. Every buyer and seller operating in the electricity market needs to ensure his commitment towards delivering the products and services as decided, which includes sometimes a forecast and pre planning of scheduling the energy resources or loads. Due to errors in forecasting, the accurate delivery of commitment is not possible at every moment. Thus, with the help of balancing services, a buyer or seller can balance the difference between the acquisition and the committed delivery with so called imbalance power [49]. A market entity using more electricity than estimated pays extra for his electricity, and an entity using less is compensated. As a step towards the integration of the Nordic to the Continental Europe, a Joint imbalance settlement for the Nordic electricity markets has been launched in May 2017[49]. A Jointly owned company by the Nordic TSOs solely for this purpose by the name “eSett Oy” is based in Finland. A common platform was constituted in order to boost the operations of the Chapter 2. Nordic Electricity Market 18 balance responsible parties, distribution network companies, electricity suppliers and service providers, as well as TSOs.

Companies which take up the balance responsibility for their constraint areas must register themselves with the joint Nordic platform “eSett Oy” in order to participate in the activity of imbalance settlement. Consumption and production imbalances are calculated for each BRP based on the production plans, PX market trades and bilateral trades at the same time with the realised consumption and production. Each BRP is financially liable for the imbalances under its responsibility, balanced by the balancing power procured from the balancing power market operated by the TSOs. The imbalance settlement is based on two types of imbalance volumes, namely production imbalance volume 2.1 and consumption imbalance volume 2.2.

P roductionImbalanceV olume = P rod. − P rod.P lan ± ImbalanceAdj. (2.1)

ConsumptionImbalanceV olume = Cons.+P rod.P lan±T rade±ImbalanceAdj. (2.2)

If a BRP consumes more than what was planned for production as well as with the trades, then the deficit is to be settled with eSett by purchasing the imbalance energy. Similarly, if a BRP produces less than what was planned, the deficit in the production imbalance volume is to be settled with eSett and the imbalance energy in this case too must be purchased from eSett.

Figure 2.3: Price Models for Imbalance Settlement [48] Chapter 2. Nordic Electricity Market 19

Production imbalance is priced according to a two-price model, which there are different prices for positive and negative production imbalances. This is so organised in such a way that the BRP never receives an advantageous price for production imbalances. For example, in a situation of upregulation (high demand of energy in the system) the price for purchasing power is higher than the spot price for a BRP with negative production imbalance, while the price for positive production imbalance is the spot price.

Consumption imbalance price follows a single price mode, which means that positive and negative consumption imbalances have the same price. The price always is the reg- ulating price based on the net direction of the system for that price/bidding zone. In the case of upregulation, the negative and positive consumption imbalances will have an upregulation price, thus opening an opportunity for the BRPs with positive imbalances to have a better price for what they are producing. A similar case would be for downreg- ulating hours, the BRPs having a negative consumption imbalance or consuming more can buy the imbalance energy at a lower price than the spot price, allowing the BRP to have some extra profits [48]. Chapter 3

Methodology

3.1 Introduction

This chapter will dive into how the stochastic mixed integer linear model for a virtual power plant with multiple assets is developed for the Nordic Electricity Market. This model participates in two different markets namely as below and settles later for the imbalances:

• Day Ahead Market

• mFRR/Tertiary Reserve Market

The model is designed to maximize the profit of the VPP trader through developing a risk averse optimal bidding strategy when participating in the above markets. The output of the model are pairs of volumes to be offered and expected prices for the volumes. These pairs can be submitted further to the nominated market operator (NEMO) in this case is NordPool. Later an investigation is carried out with respect to the imbalance costs associated to three different modes of the VPP:

• Mode 1: Wind alone mode + real time imbalance settlement

• Mode 2: Wind farm + Battery Storage + real time imbalance settlement

• Mode 3: Wind farm + Inflexible Load + real time imbalance settlement

20 Chapter 3. Methodology 21

This investigation would give an indicative variation in the imbalance costs when oper- ated in different modes of operation with the help of Expected value of Perfect Informa- tion (EVPI) Concept.

Nature of the portfolio

Generally, a VPP can consist any number of different types of energy producers like dis- patchable, non-dispatchable assets and energy consuming assets like flexible or inflexible loads, charging a battery etc. The model designed in this thesis is developed based on considering assets as given below:

• A Dispatchable unit

• A Stochastic/Renewable source e.g. Wind, PV

• An energy storage system e.g. Battery, Pumped Hydro System etc.

• A Flexible Load

3.2 Model Assumptions

The thesis involves a mathematical model to emulate the operation of a VPP and cal- culate the optimal scheduling of the portfolio such that the overall profit is maximised. However, utmost care is taken to emulate the real operation so that the outcome is indicative of the realistic results. There are 4 price/bidding zones in Sweden where the prices differ and inter zone allocation of capacity for trade is implicitly included by the market operator, In order to keep the model simple and avoid complexity, it has been assumed for the model to operate in one price zone, which means that all of the assets which are generating and the assets which are consuming lie in the same price/bidding zone.

It is always fair to have an environment of perfect market scenario to promote healthy competition among the market entities which further ensures maximization of overall welfare. This statement allows to assume the VPP trader to be a price taker rather than price maker. However, the model can also be designed such that the rivals offer is anticipated beforehand and is used to adjust their position as proposed in [26]. However, to keep the market power in check, it is always recommended to be a price taker. Chapter 3. Methodology 22

As it has been already highlighted in the research of existing literature, there have been many extensive studies carried out on design and development of a technical VPP considering all the grid operational constraints. This type of design of a VPP is like a DSO operating/managing asset keeping in mind about the bottlenecks of the system. However, this thesis handles the assets from commercial VPP point of view, who has limited or no information of grid congestions and bottlenecks. Thus, it is very clear to restrict the model to a commercial VPP without considering grid management. This assumption would help the model improve the computationally tractability justifying the boundary of the thesis to restrict it to the Commercial VPP (CVPP) formulation.

Usually the intraday markets are used by traders of stochastic units to meet their com- mitments of delivering energy. The errors in the energy forecast can cause deviations with what is produced in real time, which can lead to larger penalties incurring losses to the traders. Intraday markets help largely renewable/stochastic power generators to adjust their positions 30 min prior to the actual delivery. However, with the concept of VPP, the uncertainty related to the renewable generation is handled well by other type of controllable assets in the system reducing the need of such a market to adjust their positions. This feature of VPP is known as a portfolio effect. With the recent report from NordPool suggesting a meagre liquidity in the intraday markets, indicating that this liquidity crunch may lead to fewer or no adequate indicators/signals available to anticipate the market prices for traders to take advantage of the market. Thus, it is assumed with comfort that excluding intraday markets would not affect the overall profit in a big manner.

Since the thesis is aimed at maximization of the overall profit of the VPP by optimally scheduling the portfolio for day ahead and reserve (mFRR only upregulation) markets, the initial investments related decision variables are not included in the model to keep it simple. This way the model just focuses on operational point of view of the Commercial VPP.Reserve mFRR market is modelled only for the dispatchable unit, as for any market actor to participate in the mFRR market needs to qualify the minimum prerequisites for operating the portfolio. As the thesis deals with helping the trader to take daily decisions related to the optimal scheduling of his VPP portfolio, it is just restricted to profit generated from the daily bidding in the market. Chapter 3. Methodology 23

In the proposed optimization model, there are mainly two types of uncertainties consid- ered pertaining to prices and the weather dependent energy generation sources. These two types of uncertainties can affect the outcome of the model in different manners. Generally, uncertainties are modelled using scenarios-based stochastic approach, where every situation is anticipated using various indicators like historical data, temporal data, temperature data, seasonal data etc and aggregated into a scenario matrix. Uncertainty associated due to stochastic energy producer units whose values would strongly affect the outcome of the optimal scheduling of the VPP. The other major uncertainty asso- ciated with the decision making is the electricity prices in different markets. Thus, this thesis handles both the types of uncertainties, but in different ways. Price uncertainties are handled using persistence models, which is explained in the following sections of this chapter. An API designed and developed by Greenlytics AB for forecasting the renew- able energy sources which are weather dependent are used as an input to the model which directly generates the scenario matrix for the optimization model.

There are two systems of settling imbalances of the system namely, a single price system and two price systems. Currently, two price system is being employed in the Nordic electricity market framework. A disadvantage with such a system is that it doesn’t allow the trader to benefit from his position relative to the market position. However, to increase the trust of the trader and increase the liquidity of the market, the new Nordic balancing concept has recommended a single pricing settlement model. This can allow the trader to benefit from his position relative to the overall market position. However, there was no clear indication on when such a system would go live, for that reason the thesis models two price system for calculating the optimal scheduling to maximise the profit of the VPP.

Lastly, the model doesn’t consider the futures contracts to keep the model simple. Thus, this model is restricted to just help the decision maker to schedule in short time markets like day ahead, hourly reserve markets and real time balancing markets.

3.3 Model Description

The VPP optimal bidding model uses the probabilistic price-based unit commitment with the constraints for the inclusion of various assets of VPP. The objective equation Chapter 3. Methodology 24 of the problem considered in this thesis is to maximise the expected value of the profit for the following day ahead horizon while considering the Conditional Value at Risk (CVaR). The outputs of the optimization model for the bidding in the day ahead, reserve and the balance market can be summarized as below:

• Energy Bid to the day ahead market

• Energy Bid for the hourly reserve (mFRR) market

• Expected Imbalance settlements in the real time balance markets.

A simple representation of the objective Equation can be formulated as below:

T X ExpectedP rofit(ρ) = Maximize (revenues − costs) (3.1) t=1 where, Revenue = is the cash flow generated due to the participation of the portfolio in various markets like day ahead markets, reserve markets and the balance markets. In simple mathematical terms, it is the sum of the cash flows generated in all the markets.

Costs = is the cash flows assigned to the operational requirements like the Fuel cost, start-up and shutdown costs.

The revenues in this specific case of a VPP can also be represented as the cash generated by selling the energy from various assets like dispatchable sources, stochastic units, storage units and flexibility from controllable loads. The following sections will outline the modelling of each asset used in the VPP, and later will be realized as a mixed integer linear program model suitable for participating in the market.

3.3.1 Modelling a Dispatchable unit

There can be two different components which the dispatchable unit i in the VPP can contribute towards the overall profit equation namely, a) revenue generated from par- ticipating in the day ahead market and the reserve (mFRR- upregulation only) market, b) costs associated with the operation mainly Fuel costs, start-up and the shut down costs which characterised by a cost function, C(EGi), which provides the cost Ci(e.g. in Chapter 3. Methodology 25

Euros) of the generating a certain amount of energy EGi (e.g. in megawatt hour). This cost function is obtained by the multiplying the heat rate curve and the cost of the fuel. The resulting curve is a quadratic function, which is approximated into a piece wise linear function (explained in the Appendix section A). The y-intercept of the equation represents the No-load cost, which takes place only during the time periods the unit is online. Thus, this term of the quadratic equation must be multiplied with a binary

variable vt representing the on-off status of the unit, as shown in the equation 3.25.

PGiωt is the power output of the dispatchable unit at a specific point in time t and scenario ω. The value of the power generated will be either 0, when the unit is idle or min max in the range [PGi ,PGi ]. Mathematically, the functional state of a dispatchable unit

i can be easily modelled using a binary variable viωt also called as unit commitment variable, which is equal to 0 when offline and 1 when online. The below formulation summarises the unit commitment of the dispatchable unit i of the VPP:

min R max viωtPGi ≤ PGiωt + PGiωt ≤ viωtPGi ∀ω, t (3.2)

R The variable PGiωt in the above expression relates to the multimarket operation of the VPP which helps with optimal scheduling of the dispatchable unit i in the hourly ”upregulation” reserve market but only the tertiary reserve, as it has the maximum time of activation of 15 min so that there is enough buffer time to accommodate flexibility of the VPP.

However, the unit commitment variable is dependent on start-up and shutdown of the unit. Both transitions from idle to start-up and then to idle are associated with some SU SD costs which can be denoted by Ciωt and Ciωt respectively, which can be modelled as

SU U Ciωt ≥ Si (viωt − viωt−1) ∀ω, t (3.3)

SU Ciωt ≥ 0 ∀ω, t (3.4)

And Chapter 3. Methodology 26

SD D Ciωt ≥ Si (viωt−1 − viωt) ∀ω, t (3.5)

SD Ciωt ≥ 0 ∀ω, t (3.6)

U D Where Si and Si are the start-up and shutdown costs incurred while operating the dispatchable unit i of the VPP. In reality, when a VPP is to be operated in a cost SU SD efficient manner, the variables Ciωt and Ciωt will only take the actual values of the start-up and shutdown costs incurred by the power plant provided that these costs are to be minimized.

Besides, other technical constraints ramping constraints are also to be imposed on the model to restrict the undesired operation of the power plant while participating in the

market. The formulations for such a constraint require a new parameter ∆Gi denoting the maximum ramp-up/ramp down rate of the dispatchable unit i which are shown below

PGiωt − PGiωt−1 ≤ ∆Gi ∗ (1 − yiωt) ∗ τ ∀ω, t (3.7)

PGiωt−1 − PGiωt ≤ ∆Gi ∗ (1 − yiωt) ∗ τ ∀ω, t (3.8)

The variable yiωt here in the above ramp up/down equations represent the binary variable attributed to the decision of participation of the dispatchable unit i in the reserve market. The multiplier expression multiplied by the ramp rate restricts the operation of ramping when the dispatchable unit participates in the reserve market. It is designed in such a way that the simultaneous participation in the multiple markets is not allowed.

Lastly the equations 3.2, 3.7 and 3.8 are imposed on the power output PGiωt of the

dispatchable unit i of the VPP. However, the Ci (EGωt) term is a function in the terms

of the actual energy that is produced, EGi. Thus, an additional expression that converts power into energy would be necessary and is depicted as below: Chapter 3. Methodology 27

(P + P ) E = Giωt−1 Giωt τ ∀ω, t (3.9) Giωt 2

Where, τ is the time period for the market periods e.g. 1h, 15min etc.

3.3.2 Modelling of Flexible loads

Flexible demand has the ability to reduce, increase or decrease its requirement of elec- tricity consumption in line with the high market prices or market incentives. The math- ematical modelling of the flexible loads is mostly like the dispatchable unit of VPP. Each flexible load j in the VPP is characterized by a concave quadratic utility function

Uj (ELj), which provides the benefit (e.g. in dollars/euros) that the VPP obtains out of the amount of electricity, ELj, it consumes. We can denote the power demanded by the

flexible load j at a given point of time t and scenario ω by PLjωt,

min max PLj ≤ PLjωt ≤ PLj ∀ω, t (3.10)

Similarly, to the dispatchable units ramping rate, it is the pickup/drop rate for a flexible rate j, ∆Lj( e.g. in megawatt per hour), that is

PLjωt − PLjωt−1 ≤ ∆Lj ∗ τ ∀ω, t (3.11)

PLjωt−1 − PLjωt ≤ ∆Lj ∗ τ ∀ω, t (3.12)

Both the equations represent the mathematical model for pickup and drop rate of the flexible loads between the time periods of length τ.

At the same time, considering the PLjωt term to be piece-wise linear, we can mathe- matically compute the electricity consumed by the flexible load within the time periods t − 1 and t as,

(P + P ) E = Ljωt−1 Ljωt τ ∀ω, t (3.13) Ljωt 2 Chapter 3. Methodology 28

Where τ represents the time elapsed between t − 1 and t.

Another important constraint here is to establish a minimum amount to be consumed MinConsumption for T time periods to supply critical loads of the system denoted by ELj . This phenomenon can be imposed by a mathematical expression as shown below

T X MinConsumption ELjωt ≥ ELj ∀ ω (3.14) t=1

3.3.3 Modelling of Storage Unit

The modelling of a storage unit within this thesis is considered to be a battery type of a storage unit. it is based on a state transition equation defining its energy content at every time step t as a function of power charged or discharged from the unit k. This energy content Eskωt at time t and scenario ω can be depicted as below

c c 1 d Eskωt = Eskωt−1 + ηskPskωtτ − d Pskωt τ ∀ω, t (3.15) ηsk

c d Where ηsk and ηsk in the above state transition function are the charging and discharging c d efficiencies respectively and can have a range [0,1], Pskωt and Pskωt are the charging and discharging powers respectively are positive variables for the battery storage unit k at time period t and scenario ω, whose limits are depicted as below

c c,max 0 ≤ Pskωt ≤ Psk ∀ω, t (3.16)

d d,max 0 ≤ Pskωt ≤ Psk ∀ω, t (3.17)

c,max d,max Where Psk and Psk are the maximum bounds for the charging and discharging powers respectively of the storage unit k and again the τ represents the time elapsed between the time steps t − 1 and t.

Finally, the Energy stored in the storage unit k at time t and scenario ω can be bounded as shown below Chapter 3. Methodology 29

min max Esk ≤ Eskωt ≤ Esk ∀ω, t (3.18)

These bounds are specifically for electrical batteries to ensure its long life, so that the operation of the battery in operation is reliable.

3.3.4 Modelling of Stochastic Units

The stochastic units q of the VPP here are referred to all those renewable generation units dependent on weather like sun, wind, waves etc and as a consequence are not controllable. Thus, the future estimated energy produced by these types of energy generating sources tend to be highly uncertain in time and quantity. Further, if these estimates are used for the forward dispatch can lead to erroneous results and losses to the trader. The uncertain power outputs of the renewable generating sources q can be described as a set of samples from a random variables for 1 . . . .NΩ scenarios. The inputs of such a unit is given as a parameter to the model so that the controllable units like dispatchable unit, storage and the flexible loads are adjusted to absorb the shocks introduced by the uncertain stochastic units.

3.3.5 Formulation of the Objective Equation of the VPP

The goal of the model is to optimize the profit of the VPP in a multi-market scenario while considering the Conditional Value at Risk (CVaR) type of risk measure which is taken care by a variable β controlling the risk aversion also known as risk parameter. The below equation summarises the operation of the VPP participating various markets while considering all operational and commercial constraints,

ρ = max [(1 − β) E πA + β. CV aR] (3.19)

Subject to Equations 3.2– 3.18 & the following constraints

Expected Profit Chapter 3. Methodology 30

NΩ A X D R B L SU SD E π = πω(π + π + π + π − Ci (EGi) − Ci − Ci ) ∀ω (3.20) ω=1

Day Ahead Profit

T D X D D π = λωtPωt ∀t (3.21) t=1

Reserve (mFRR) market Profit

T R X R R π = λωtPωt ∀t (3.22) t=1

Real time Balancing Market

T B X DW DW UP UP  π = λωt Pωt − λωt Pωt ∀t (3.23) t=1

Benefit from the Flexible Load

T L X X π = Uj (ELjωt) ∀ω, t (3.24) t=1 jJ

Fuel Cost of the Dispatchable unit

T X X 2  Ci (EGi) = aEGiωt + bEGiωt + c.viωt ∀ω, t (3.25) t=1 iI

The expected profit expressed in the equation 3.20 is similar to the skeleton equation shown above in the equation 3.1 which is nothing but the sum of all the revenues and the subtraction of all the costs associated with the whole process. In the equation 3.20, the first three terms denote the revenues generated in day ahead, reserve and the balance market, the last three terms attribute to the Fuel cost, Start-up and Shutdown costs associated with the dispatchable unit. Equations 3.21-3.25 expand the terms of the expect profit equation 3.20. Chapter 3. Methodology 31

3.4 Energy Balance Constraints

The energy balance constraint is an important constraint enforcing the balance of the overall VPP which is also an obligatory measure when acting as a Balancing Responsible Party (BRP). The tandem made up of a unique concept like VPP and the electricity market constitutes a closed energy system that must be balanced at every time period t, which basically means that the quantity of energy that is generated from the dispatch- able units, intermittent renewable resources, the energy bought in the market to meet the deviations and the energy drawn from the storage units must be equal to quantity of energy that is used to meet the demand of flexible loads, used to charge the storage units (batteries in this case), and sold in various markets like day ahead, reserve and the bal- ancing market for each time interval t. This process can be formulated mathematically to restrict the VPP to go out of balance at every time step t as shown below

  ! X X X d UP X X c DW R D EGiωt +  PW qωt + Pskωt + Pωt  τ = ELjωt + Pskωt + Pωt + Pωt + Pωt τ∀ω, t i∈I q∈Q k∈K j∈J k∈K (3.26)

τ is the time difference between the samples t − 1 and t.

3.5 Other Constraints

Until now all the constraints were mostly based on technical boundaries of the asset and the market which decided the area of the operation. However, there are other constraints with respect to the market norms like the first two norms listed below and features like risk aversion. The different constraints which are addressed in this section are:

• Non decreasing constraint

• Non anticipativity constraint

• CVaR

• Reserve Market Chapter 3. Methodology 32

• Imbalance settlement

Non-Decreasing Constraint

This type of requirement is of the market operator for clearing the day ahead price. The non-decreasing condition of the offer curve can be enforced by stating that, for any price D 0D D 0D D 0D realizations λωt and λωt such that λωt > λωt , the relation Pωt > Pωt must hold true.

Non-Aniticpativity Constraint

D 0D This is another type of constraint enforced for any offer of price scenarios λωt and λωt D 0D D 0D such that λωt = λωt , then the outcome is enforced to Pωt = Pωt so that there is a unique quantity for any price level.

CVaR

The biggest shortcoming of ignoring risk in a decision-making problem is that the op- timal values may lead to the maximum profit at the expense of experiencing some undesirable/low benefits in some unfavourable scenarios. Thus, to avoid such situations a risk measure was introduced to the (πA) equation called as Conditional Value at Risk (CVaR). As per [50], “For a given α ∈ (0, 1), the conditional value-at-risk, CVAR, is defined as the expected value of the profit smaller than the (1 − α)-quantile of the profit distribution”. In this thesis, all the scenarios are sampled from the distribution and can therefore be taken as equiprobable, and CVaR is computed as the expected profit in the (1 − α) ∗ 100% worst scenarios. For example, if the confidence level, α is considered to be 90%, then the computed CVaR is the average of the worst 10% of expected profit from the overall profit distribution. The equation 3.19 which has the CVaR variable can be written as shown in the following equation 3.27 and the associated risk constraint can be introduced as in 3.28 where η is an auxiliary variable.

N 1 XΩ CV aR = η − π s (ω) ∀ω (3.27) (1 − α) ω ω=1 Chapter 3. Methodology 33

CVaR Constraint

 D R B SU SD η − π + π + π − Ci (EGi) − Ci − Ci ≤ s (ω) ∀ω (3.28)

Reserve Market

As already explained in Chapter 2, there are various reserve products like the primary, secondary and tertiary. Each type of reserve product has its technical and commer- cial requirements. Keeping in mind all the assumptions, as mentioned in the previous sections of this chapter, mathematical formulations have been devised to emulate the R mFRR market offerings of the VPP. Already the quantity Pωt to be offered is mathemat- ically computed using equation 3.2. However, few other constraints defining its bounds R are required to ascertain the optimal offer of the quantity Pωt.

R R,max 0 ≤ Pωt ≤ P (3.29)

Imbalance Settlement

The framework related to functioning of such a market is already explained in detail in Chapter 2. The different quantities related to upregulation and the downregulation are already considered in the objective equation, which are formulated in equation 3.23. The major contributors for participating in this market exercise is due to uncertainty associated with the intermittent renewable generating sources. The future estimates of the energy produced to be dispatched can be different in real time and therefore lead to deviations in the delivery. These deviations are handled by using two positive DW UP variables Pωt and Pωt which are downregulation (positive deviation i.e. to sell the excess energy in the market) and upregulation (negative regulation i.e. to buy the extra energy which the trader needs to buy). The upper and lower bounds must be defined for such a participation in the market and can be formulated as below:

DW d,max 0 ≤ Pωt ≤ Psk (3.30)

UP max 0 ≤ Pωt ≤ Pq (3.31) Chapter 3. Methodology 34

3.6 Selection of Scenarios

As it was already mentioned in the previous sections that the uncertainties which are as- sumed here are pertaining mainly with the day ahead, reserve market and the regulation market along with the uncertainty with the production quantities from the intermittent renewable energy resources. This uncertainty is handled in this thesis by using scenario- based approach which employs scenario trees, which can be generated by many different methods. As previously explained that the two types of uncertainties exist namely, price and renewable energy production related uncertainty. Both these uncertainties have to be handled differently and can therefore affect the outcome of the stochastic optimiza- tion model. Scenario generation is related to the forecasting of the various uncertainties involved in the decision-making like in this case are prices and the renewable power production where both are important in the scheduling of the VPP. Thus, it is further seen that, model formulation and the implementation to be as the major contributors of this thesis, and hence uses a simple persistence model to generate price related un- certainties, whereas for handling the renewable power production uncertainties an API based on Artificial Intelligence developed by Greenlytics AB generates the scenarios per bidding area wise while considering many parameters like, historical data, temperature & weather data, seasonal data etc.

The price scenarios have been generated using a simple persistence model as mentioned above which uses the price forecast to generate scenarios. However, in this case, the thesis considers historical data to include temporal correlations to the test data. Based on various other relevant features the below flowchart explains the decision flow for generating the scenario matrix for using in the stochastic model. Chapter 3. Methodology 35

Figure 3.1: Flow Chart depicting Scenario generation.

A simple Julia based script was developed to use it with stochastic optimization model. It takes various arguments such as the input data matrix (the forecast data), number of scenarios, target error value, error distribution function, error, standard deviation error. As shown in the flow chart, a scenario matrix initially is constructed just by repeating the input data matrix with the columns equal to number of scenarios. The error is generated randomly using the mean error and standard deviation required for generating the error matrix to add to final scenario matrix.

ScenarioMatrix = InputP riceforecastMatrix + eh (3.32) Chapter 3. Methodology 36 where,

−1 2 −1 2 eh = N (µε, σε ) or eh = U µε, σε (3.33)

Scenario Matrix will be of the size (number of periods, number of scenarios) which will be a sum of input forecast data and the random error, which is generated with normal or a uniform distribution with average of the error terms, µε, and the standard deviation 2 of the error terms, σε . This type of scenario generation methods has its own limitations, as it may not consider many correlations like weather, or market conditions in the error term. However, it is clearly stated that all such features are not considered in the input forecast data to which a simple error is added to generate the scenario matrix.

3.7 Flow chart of the Stochastic Optimization Model

This section will outline the work flow of the whole tool for the decision making of the optimal scheduling of the VPP. The work flow of the tool is as shown in the flow chart shown below. First step involves gathering all the input forecast price data, however, for this exercise we use historical prices from the NordPool’s platform as assumed earlier. They are saved in a matrix form, so that they can be further used with the stochastic optimization problem. Later which, the weather dependent intermittent power produc- tion scenarios are extracted using a script developed to access the API developed by Greenlytics AB. Now, the parameters required by the model to compute the profit are passed. However, with the randomly generated error term used for generating scenario matrix may lead to some undesirable/impractical situations like upregulation prices be- ing lower than the day ahead prices or down regulation prices being higher than the day ahead price. Thus, these are filtered by a simple script to replace all the undesirable scenarios with practical scenarios. In the next step, the outcomes of previous steps are passed onto the stochastic model to compute the optimal scheduling for maximization of profit while considering the risk measures. The output of the model gives the volumes to be bid in various markets by the trader and is ready for plotting the offer curves. Chapter 3. Methodology 37

Figure 3.2: Flow chart depicting the trading tool.

3.8 Investigating the Imbalance Costs per MWh for dif- ferent modes of VPP

Imbalances are an economical burden/penalty which any renewable energy producer must bear due to improper forecast and thereby leading to errors in dispatch quantities in the real time. However, a concept like VPP which an aggregation of various assets, can reduce this burden of imbalances caused by the intermittent renewable energy assets in the system. This section outlines a metric used to study the changes in imbalance costs when 3 different modes of the VPP are employed. The method employed to investigate such a change in imbalance costs is a quality metric known as Expected value of Perfect Information. As per [50], “The expected value of perfect information represents the quantity that a decision maker is willing to pay for obtaining perfect information about Chapter 3. Methodology 38 the future.” This method uses two quantities namely the expected profit obtained from the stochastic information (zS∗) and the other profit obtained when one has perfect information (zP ∗). The difference between these two quantities gives us an ”indicative” figure of how big or small the imbalances a trader would incur. This is depicted in the below equation

P ∗ S∗ EVPImax = z − z (3.34)

This quantity when divided by the actual energy produced gives an indicative imbalance cost incurred per MWh as shown in 3.35

EVPI ImbalanceCost/MW h = max (3.35) ActualEnergyP roduced Chapter 4

Case Study

This Chapter aims at showing the results of the implementation of the stochastic model explained in the previous chapter. A tool based on Julia has been implemented to be used by a trader as a decision-making tool for bidding in the electricity market.

4.1 Scope

The concept of a Virtual Power plant is not widely adopted in the Nordics yet. Thus, an operational virtual power plant was difficult to compare and validate the study results. The Nordic market is now gearing up for such a concept as it will become more relevant and necessary to increase the overall power system’s operational efficiency. With the increased proliferation of renewables in the energy mix of the power system, the inertia of the overall system decreases and needs a novel concept like VPP to address the problem of flexibility, liquidity in the market etc. Hence, a hypothetical portfolio of a conventional power plant, a battery storage plant and a wind farm are considered to study the VPP trader decision-making tool. However, since there was no adequate and reliable data available for flexible loads, it was therefore not considered in the VPP portfolio.

The whole case is assumed to be a trader trading from Sweden on 1st of January 2018 and as mentioned in the earlier section of assumptions, highest energy consuming centres of Sweden is in the south of Sweden, SE3 & SE4 bidding zone. The scope of this case study is however limited to SE3 bidding/price zone. Further using the same portfolio,

39 Chapter 4. Case Study 40 an investigation is been carried out to observe the variation of indicative imbalance costs/MWh for three different modes of the VPP.

4.2 Input Data

There are four prices used in this model namely, day ahead (λD), reserve (mFRR) (λR), upregulation (λUP ) and downregulation prices (λDW ). All the prices have been accessed from public data bases. Day Ahead and Real time balancing prices have been downloaded as a .csv file from NordPool platform. Meanwhile, the Reserve (mFRR) price for the SE3 region is same as the upregulation market price, but for this thesis, the reserve mFRR prices have been assumed using dummy values inspired from the fingrid mFRR market. The original prices released on 1st of January 2018 have been considered as a forecast data for the model and the same data set has been used to generate the scenario matrices as mentioned in the previous chapter. This assumption ensures various features like temporal, seasonal etc are also embedded into the data set. Figure 4.1 depicts how the day ahead prices on 1st of January 2018 varied over 24 hours and how the prices behaved when the scenarios were generated respectively.

Figure 4.1: Price trajectory of day ahead forecast. Chapter 4. Case Study 41

Figure 4.2: Day Ahead Price Scenarios.

In a similar fashion, upregulation and down regulation prices also have been depicted below with the trajectory of originally realized prices on 1st January 2018, however they are assumed to be the forecast prices for that particular day.

Figure 4.3: Upregulation Price Trajectory. Chapter 4. Case Study 42

Figure 4.4: Upregulation Price Scenarios.

These scenarios in the second chart are generated using the price scenario generator with a normally distributed error matrix as already explained in the previous chapter, Similarly, downregulation price and its scenarios also have been generated.

Figure 4.5: Downregulation Price Trajectory. Chapter 4. Case Study 43

Figure 4.6: Downregulation Price Scenarios.

In the same way below are the reserve price trajectory and the scenarios respectively

Figure 4.7: mFRR dummy price trajectory. Chapter 4. Case Study 44

Figure 4.8: mFRR price scenarios.

However, it is important to observe how the scenarios for reserve price look near, one of reasons being the scale to which the chart is depicted, second being a smaller standard deviation value used for generating the scenarios. This makes the scenarios trend similar to the input data matrix trend. This assumption may not be realistic, but to keep the scope of the study to just implementing the trader’s decision-making tool, it is assumed to keep the scenario generation task a simple one.

However, the wind farm production scenarios are not generated using the scenario gen- erator mentioned in the previous chapter. Greenlytics AB, has developed an API to forecast the hourly wind power generation per bidding zone. Since, this thesis assumes a VPP portfolio with a limited capacity, the overall wind farm capacity of the SE3 bid- ding zone is divided by a capacity factor of 150 to have a realistic value of a small wind farm capacity aggregated to a VPP. This method of approximating the site forecast fil- ters the fluctuations in the prognosis of the relaxed site forecast due to smoothing effect of a bigger region. Below chart depicts the wind power production scenarios. Chapter 4. Case Study 45

Figure 4.9: Wind Power Production Scenarios generated from Windmind API.

VPP Portfolio Parameters

As already explained in the previous section a hypothetical VPP portfolio is assumed to implement the stochastic decision-making tool. A conventional dispatchable unit consisting of a gas turbine (GT) with rated capacity of 10MW and technical minimum max min requirement of 1MW, i.e., Pg = 10MW and Pg = 1MW , respectively. It is known that the ramp up/down rate of the GT is 2MW/h, while its minimum up and down times are zero. And it is assumed that the power output of the dispatchable unit in the first hour(T = 1) is 2MW. The fuel cost function of the GT is characterised by the 2 quadratic equation: C (Eg) = 5Eg + 10Eg + 5 , with the cost expressed in euros and energy in MWh. Apart from the expenses incurred by the unit for fuel consumption when online and the No-load cost, every time the unit is switched on or bought online the start up cost would be 10 Eur.

The second unit of the portfolio is a battery storage unit, with a charging and discharging efficiency of 80%. The maximum and minimum energy storage limits are 30MWh and min max 0.2MWh, i.e., Es = 0.2MW h and Es = 30MW h respectively. The maximum charging capacity of the battery system is assumed to be 5MW and the maximum discharging capacity 4MW. It is also assumed that the energy stored in the first hour of operation is 15MWh. Chapter 4. Case Study 46

4.3 Implementation and Results

The previous chapter neatly lays out the stochastic optimization model. This newly developed tool would be utilized whenever the trader decides to participate in the daily auction process aggregating all the existing and new assets into one virtual entity. As ex- plained earlier, the model takes into account all the technical and operational constraints for successful commercial operation of the VPP. However, it would be an extremely dif- ficult task to forecast the asset outages over very short period of time, the uncertainty in the outages of the assets has not been considered and is assumed that all the assets are 100% reliable.

The whole stochastic optimization model has been realized using Julia and its JuMP package specially designed for implementing mathematical programming. Few of the important reasons for adopting Julia were its speed, user friendly syntax and the ease of use. As a result, it would be more interesting for the industry to adopt this product to replace its older versions of programs. However, because of its recent entry to the industry, the discussion forums are yet to be developed on a bigger scale like Python or MATLAB and would take some more time to expand its community further worldwide. This model uses Gurobi solver to compute the optimized profit. The commented Code can be found in the Appendix B.

After the implementation of the stochastic optimization model, the outcome is in the form of the volumes for different hours and scenarios. Further, the volumes and price pairs are arranged for every scenario for each hour to be submitted to the market operator before the gate closure time. These volumes and price pairs for all scenarios per hour can be plotted to realize the so called “Offer Curves”. These are designed to be non- decreasing as explained in the previous chapter, which is a requirement from the Market Operator of the Nordics region, that is the Nord Pool. Below are offer curves for some of the hours of operation for day ahead market. Chapter 4. Case Study 47

Figure 4.10: Offer Curve for hour 1.

Figure 4.11: Offer Curve for hour 2. Chapter 4. Case Study 48

Figure 4.12: Offer Curve for hour 23.

Figure 4.13: Offer Curve for hour 24.

The offer curves above inform the market operator about the amount of the energy the trader is willing to sell at each corresponding price level. It must be noted that the uncertainty is based on scenario approach, and all the scenarios are equi-probable. However, the scenarios are not correlated to each other, this limits the outcome of the model to some extent. This hypothetical portfolio is run using 10 scenarios for Wind forecast and all other market prices, where all the scenarios are used in silos as denoted above i.e., there is no co-relation between the different price and wind scenarios. It takes approximately 880 seconds for computing the result. It was observed the model took 3.6 hours to compute the outcome of the model for 16 scenarios and as the number of scenarios were increased further, it became computationally difficult for the machine Chapter 4. Case Study 49 to handle the optimization. This limitation in computing time can be addressed by employing appropriate decomposition techniques.

It can be seen that in few hours shown below, some scenarios have negative volumes which indicates that the trader should be buying from the day ahead market instead of selling the produced energy himself. This model helps the trader to make the most favourable decision in order to maximize his profit in various markets like day ahead, reserve and balancing markets. Once these offer curves are submitted before the gate closure for day ahead market, the prices are revealed around 12.45 p.m. in the afternoon. After which the prices are plotted on the offer curves to ascertain the quantity to be scheduled for dispatch. However, the scenarios provide a possible dispatch schedule which in the below figure is shown. The better the quality of scenarios generated more the possibility of the dispatch of the portfolio to be realized.

Figure 4.14: Dispatch Schedule as per Scenario 1. Chapter 4. Case Study 50

Figure 4.15: Dispatch Schedule as per Scenario 2.

Figure 4.16: Dispatch Schedule as per Scenario 9. Chapter 4. Case Study 51

Figure 4.17: Dispatch Schedule as per Scenario 10.

It can be observed that the conventional dispatch is mostly negligible, this might be due to the fact that conventional dispatch is more beneficial for participating in the reserve mFRR market which provides a more interesting price for the day of simulation. Thus, the model is designed in such a way that each portfolio is assigned as per the price realized for each hour in each market. However, in this thesis only dispatchable unit is considered to participate in the reserve market (mFRR) because of the reserve market requirements.

4.4 Investigation of Imbalance Costs

This task is an important exercise to determine how the imbalance costs vary for different configurations of VPP, majorly this exercise demonstrates the ability of VPP to absorb all the disturbances introduced by the renewable energy sources of the portfolio which can otherwise lead to large penalties by the TSO (eSett in case of the Nordics which is owned by the Nordic TSOs). The whole exercise was carried out by breaking the VPP to three different modes of operation as below:

• Wind Only Mode

• Wind along with Battery mode Chapter 4. Case Study 52

• Wind along with fixed demand mode

It is already explained in the previous chapter, on how the indicative imbalance cost- s/MWh are calculated. All the imbalance costs were computed for a day and later cumulatively for a week and a month respectively. The outcome of these were plotted later to observe the trend of indicative imbalance costs to understand the portfolio effect of the VPP. Such a study will further strengthen the trust on a novel concept like VPP for the future of electrical power industry. A maximum wind capacity was calculated to be approximately 15MW after dividing the overall Wind capacity of SE3 by a capacity factor 150. A similar study was carried out in [51] for case in Finland with storage ca- pacity to be double the size of Wind Capacity revealed to have significant effect on the imbalance costs. Hence, in second mode of this study, a capacity of 30MW of battery storage unit was assumed on the similar lines of the study done in [51]. For the third mode of operation, an approximate maximum demand of 12MW was assumed for the computation of the imbalance costs. However, the data from the GreenLytics AB API just generated load demand for only Stockholm city, when compared to wind generation for the whole of SE3 region. Although, the capacity factor used for scaling down to em- ulate a smaller portfolio was same. Thus, the figures found here may be considered to be pertaining to just this case study. Figures 4.18 and 4.19 are the charts showing how the cumulative expected imbalance costs varied over a week and the month of March 2018 for the three different modes of VPP. The bars in the chart from the left to right correspond to the different modes namely, Mode 1 being Wind only, Mode 2 being the Wind along with the Battery and lastly Mode 3 being the Wind along with a fixed demand. Chapter 4. Case Study 53

Figure 4.18: Expected Imbalance costs over the month of March ’18.

Figure 4.19: Expected Imbalance costs over the first week of March ’18.

It can be observed from the charts that the wind only mode incurs a relatively higher imbalance cost when compared to the other two modes of operation. We can clearly state that the introduction of battery can help absorb the shocks introduced by intermittency of the renewable power production thereby reducing the imbalance costs by considerable Chapter 4. Case Study 54 quantity. However, when the wind farm output is aggregated with the fixed demand the imbalance costs further decline, thereby making it the most economical setup to operate for higher profit.

Figure 4.20: Cumulative Imbalance costs over a month.

The above chart shows a cumulative imbalance costs when compared with all the three modes of operations of a VPP. The x-axis being the number of days in the month of March 2018 and y-axis being the cumulative imbalance cost. It can be clearly observed that initially the imbalance costs vary a lot, but over the time the variance fades out and they stabilize over a longer time frame. Even from the above chart, we can conclude that the mode 3 of the VPP is looking interesting as it is the one with the lowest imbalance cost.

Table 4.1: Calculation of imbalance costs in different modes of operation

Mode of Profit with- Profit with EVPI IC/MWh Operation out NAC NAC Mode1 123298.5 123108.55 189.5 0.0714 Mode2 129219.72 129187.04 32.68 0.0123 Mode3 33984.07 33969.96 14.11 0.0053

Above is a table depicting the calculated numbers of the indicative imbalance costs. Further when the reductions in the imbalance costs are computed, they show a large reduction in imbalance costs. In case of Mode 2 there was a reduction of approximately 82% and Mode 3 with approximately 92% when compared to Mode 1. These results were similar to the conclusion of [51]. Chapter 4. Case Study 55

The cumulative expected profit of all the three modes were also plotted to get a clearer picture as shown in figure below. It is quite evident that the case with battery has a higher profit, while the mode 3 with load is lower because most of the energy produced is consumed by the load and not sold in the market irrespective of the price.

Figure 4.21: Comparisons of profits cumulatively for a month in all the three modes of operation.

The numbers calculated in the above task are all indicative and may not be realistic as they are not simulated with the actual market prices and thus, are subject to change. However, they give a possible hint on which mode would be better for incurring higher profit and demonstrate the advantages of a VPP to handle intermittency of renewables. Chapter 5

Closure

5.1 Summary

This thesis was aimed at mainly developing a future ready tool for the Nordic electricity market to accommodate a novel concept like Virtual Power Plants (VPPs). The major goal was to help the trader in decision making at the same time maximizing his profits. With increase in the renewable energy sources share in the mix with decrease in the conventional dispatchable type of sources will lead to large reduction in the whole inertia of the system and thereby necessitating the need of a flexibility provider. VPPs being an important and one of a unique solution for the biggest challenge of tomorrow’s power system i.e., Flexibility is very crucial for the future of energy industry. This thesis has proposed a mixed integer linear model for emulating the market operation used for participating in various Nordic electricity markets to optimize the profits. Further, the thesis developed an operational tool using a latest computer language specially designed for mathematical programming known as “Julia”, which will be mainly used for decision making while participating in the daily auction while optimally scheduling and maximizing the profit of the overall portfolio. The stochasticity of the renewables and the uncertainty in the prices of various markets like Day ahead, reserve (mFRR) market and the balancing market have been considered, as these would have an important effect on the overall schedule and the profit. All the technical and market based operational constraints of various types of assets in the VPP have been considered. One of the major features of risk also was added to the model to make it more practical and usable in the real world. 56 Chapter 5. Closure 57

A hypothetical case study was assumed to test the operation of the developed stochastic optimization tool which would be used as a decision-making tool by the traders par- ticipating in the daily auction. This hypothetical portfolio consisted of a conventional GT unit, an electric battery system along with an approximated wind farm capacity derived from the total capacity of the SE3 bidding zone. The scenario-based approach was adopted to handle the uncertainties involved in the decision-making process. There were two types of uncertainties considered in this thesis namely pertaining to the prices and renewable energy production. Both the uncertainties affect the outcome of the model in a different way, that’s why both these uncertainties are handled in different ways. A simple scenario generator for the price uncertainties was developed based on persistence. However, the scenarios for renewable energy production uncertainty was provided by “Greenlytics AB” whose product named as “WINDMND API” generates the required scenarios for the future.

As the introduction of renewable sources have increased the imbalance penalties due to various reasons like improper forecasts leading to forecast errors. This problem is also duly addressed by this unique concept of VPP, and the model developed in thesis is designed to minimise these penalties in the balancing market. This was investigated by carrying out a study to compare and demonstrate the effect of portfolio with a hypothetical wind farm, which indicatively showed a considerable amount of reduction in imbalance costs by approximately 82% and 92% when the wind farm was aggregated with a Battery storage unit and a fixed demand respectively.

This tool developed in this thesis with Greenlytics AB and will be implementing this tool for practical purposes. Also, this tool can help simulating various portfolios and unique combinations of assets in various markets to help policy makers intervene at the right time to increase the overall welfare of the society.

5.2 Recommendations for Future Possibilities

This thesis has considered the two major uncertainties namely due to prices and renew- able power production at the same time considering risk measures. However, there were few limitations of the model like computational limitations to compute a greater number of scenarios, as a result it takes long time for computing the output. And as the size of Chapter 5. Closure 58 the portfolio increases, it would take unusually long for a normal computer to compute the output and therefore require a super computer to further carryout the task. Thus, a new decomposition technique can be developed to decompose the objective equation to reduce the computational burden and thereby decreasing the computation time [52, 53].

To further make the outcome more realistic, the price scenarios which were generated us- ing a simple persistence model can also be more realistically produced by using ARIMA or Seasonal ARIMA modelling. This model doesn’t consider the correlation among vari- ous uncertainties, which makes the outcome of the model to give some distorted signals. Thus, new scenario generation method can be employed to model the correlation among various uncertainties can make the model even more practical and usable for real time trading. Intraday Markets are also an interesting market for the future, although they have a meagre liquidity now due to its method of continuous trading. However, there are various studies carried out by the market operator and other market stakeholders to address the issue of liquidity in the intraday markets.Thus, including intraday markets would make the product for all the markets. Other markets like Oil & gas, carbon EU ETS also play an important role in the estimation of the electricity price. These market movements can help the trader to hedge his position in the market against lower prices. Thus, inclusion of these markets can also help make the model more robust and realistic.

With the integration of Nordic Electricity Market with the larger EU region, many new products and concepts are being proposed and are being consulted for implementation. A recent change in the Nordic balancing concept proposed now a different proactive and a reactive approach to handle the reserve market of the Nordic market. This will open many new avenues to develop new strategies and tools for trading via the exchange. An- other interesting change being the implementation of single price imbalance settlement system, which if implemented will benefit all the traders according to their position in the power system with respect to the net direction of the whole system. Appendix A

Linearization of the Quadratic Fuel Cost Function

2 In this appendix, the quadratic fuel cost function aEG + bEG + c will be linearized of the price based stochastic model presented in this thesis. Below is a representation of the how the quadratic cost function looks like.

Figure A.1: Quadratic Cost function of the Dispatchable unit [50]

 min max As shown in the above figure the interval between EGi ,EGi is divided into n equally

sized intervals. At a specific step s, we define a binary variable btωs whose value is 1 when in the interval and 0 when not in the interval. The actual value of the quadrat- ic/Nonlinear term is calculated as shown below and is replaced in the main objective function with equation A.1.

59 Appendix A. Linearization of the Quadratic Fuel Cost Function 60

cost = a ∗ lowerlimit2 (A.1)

Where, the lowerlimit and upperlimit are the two matrices which have the lower and upper limit values of the intervals. These values are then stored in another matrix defined as cost matrix. Each step is calculated using the expression as shown below:

P max − P min s = Gi Gi (A.2) n

min  upperlimit = PGi + s (A.3)

lowerlimit = upperlimit − s (A.4)

However, when linearizing the quadratic term, there will be some constraints to be imposed so that the actual quadratic behaviour can be approximated like the binary variable cannot have a value of 1 simultaneously in the same hour and scenario, thus a constraint has to be imposed to avoid undesirable decisions as shown below

X btωs ≤ 1 ∀ω, t (A.5) sSteps

In a similar way, the lowerlimit and upperlimit values will be used to calculate the value of energy values as shown below

X X (btωs ∗ lowerlimits) ≤ EGtω ≤ (btωs ∗ upperlimits) ∀ω, t (A.6) sSteps sSteps Appendix B

Codes

61 9/24/2019 VPP model_RM

In [ ]:

# Loading the necessary packages #------using Distributions using Random using JuMP using Gurobi using JLD using TimeSeries using Dates using Plots using CSV using DataFrames

In [2]:

# Reading the inout files from the local machine #------Data = CSV.read("D:\\Msc @ KTH\\Thesis\\Input files\\Day\\DAP.csv", types = [Float64]); input = convert(Array, Data[:SE3]); Updata = CSV.read("D:\\Msc @ KTH\\Thesis\\Input files\\Day\\Up.csv", types = [Float64 ]); inputup = convert(Array, Updata[:SE3]); Downdata = CSV.read("D:\\Msc @ KTH\\Thesis\\Input files\\Day\\Down.csv", types = [Float 64]); inputdown = convert(Array, Downdata[:SE3]); Resdata = CSV.read("D:\\Msc @ KTH\\Thesis\\Input files\\Day\\RMP.csv", types = [Float64 ]); inputResdata = convert(Array, Resdata[:SE3]);

In [3]:

input = [input...]; inputup=[inputup...]; inputdown=[inputdown...]; inputResdata=[inputResdata...];

In [5]:

# Input Parameters for Price Scenarios generation #------inputVector=input' inputUpVector=inputup' inputDownVector=inputdown' inputResPrice = inputResdata' nPeriods = length(inputVector) nScenarios = 15 #Same as scenarios in forecast API nReserveScenarios = 15; #Reserve Price Scenarios errorMetric = "mae" errorTargetValue = 1 errorDistributionFunction = "normal"; distributionParameters = zeros(2,1); distributionParameters[1] = 0.0; # Error mean distributionParameters[2] = 10; # Error initial standard deviation seed = nothing; # No seed (default)

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 1/14 9/24/2019 VPP model_RM

In [6]:

function errormetrics(F, A)

# F: Forecast values vector / matrix # A: Actual values vector / matrix

N1 = size(A, 1); N2 = size(A, 2);

mapescore = sum( abs.((A - F)./A) ) / (N1*N2); maescore = sum( abs.(A - F) ) / (N1*N2);

return maescore, mapescore;

end

Out[6]:

errormetrics (generic function with 1 method)

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 2/14 9/24/2019 VPP model_RM

In [7]:

function simplescengen(inputVector, nScenarios, errorMetric, errorTargetValue, errorDis tributionFunction, distributionParameters, seed = nothing) errorActualValue = Inf; errorMaxDifference = 0.001; epsValueForMAPE = 0.1; #eps(0.0)

# Provide seed for reproducibility if seed != nothing Random.seed!(seed); end

# Check size of inputVector and create initial matrices if size(inputVector,1) > 1 v = inputVector'; nPeriods = size(inputVector,1); elseif size(inputVector,2) > 1 v = inputVector; nPeriods = size(inputVector,2); else v = [inputVector]; nPeriods = 1; end

scenarioMatrix = initScenarioMatrix = repeat(v, nScenarios, 1);

#global meanError #global stdError #global errorActualValue #global scenarioMatrix

# Normal distribution if errorDistributionFunction == "normal" meanError = distributionParameters[1]; stdError = distributionParameters[2];

while abs(errorActualValue - errorTargetValue) > errorMaxDifference

#global meanError #global stdError #global errorActualValue #global scenarioMatrix

errorMatrix = rand(Normal(meanError,stdError), nScenarios, nPeriods);

scenarioMatrix = initScenarioMatrix + errorMatrix;

if errorMetric == "mae" errorActualValue, ~ = errormetrics(scenarioMatrix, initScenarioMatrix); elseif errorMetric == "mape" initScenarioMatrix[initScenarioMatrix .== 0] .= epsValueForMAPE; # To a void deviding with zero ~, errorActualValue = errormetrics(scenarioMatrix, initScenarioMatrix); end

if errorActualValue < errorTargetValue if abs(errorActualValue - errorTargetValue) < 1 localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 3/14 9/24/2019 VPP model_RM stdError = stdError/(abs(errorActualValue - errorTargetValue)); elseif abs(errorActualValue - errorTargetValue) > 1 stdError = stdError*abs(errorActualValue - errorTargetValue); else stdError = stdError*2; end

elseif errorActualValue > errorTargetValue if abs(errorActualValue - errorTargetValue) < 1 stdError = stdError*abs(errorActualValue - errorTargetValue); elseif abs(errorActualValue - errorTargetValue) > 1 stdError = stdError/(abs(errorActualValue - errorTargetValue)); else stdError = stdError/2; end end

end end

# Uniform distribution if errorDistributionFunction == "uniform" meanError = distributionParameters[1]; rangeError = distributionParameters[2];

while abs(errorActualValue - errorTargetValue) > errorMaxDifference

#global meanError #global maxError #global errorActualValue #global scenarioMatrix

errorMatrix = rand(Uniform(meanError-rangeError,meanError+rangeError), nSce narios, nPeriods);

scenarioMatrix = initScenarioMatrix + errorMatrix;

if errorMetric == "mae" errorActualValue, ~ = errormetrics(scenarioMatrix, initScenarioMatrix); elseif errorMetric == "mape" ~, errorActualValue = errormetrics(scenarioMatrix, initScenarioMatrix); end

if errorActualValue < errorTargetValue if abs(errorActualValue - errorTargetValue) < 1 rangeError = rangeError/(abs(errorActualValue - errorTargetValue)); elseif abs(errorActualValue - errorTargetValue) > 1 rangeError = rangeError*abs(errorActualValue - errorTargetValue); else rangeError = rangeError*2; end

elseif errorActualValue > errorTargetValue if abs(errorActualValue - errorTargetValue) < 1 rangeError = rangeError*abs(errorActualValue - errorTargetValue); elseif abs(errorActualValue - errorTargetValue) > 1 rangeError = rangeError/(abs(errorActualValue - errorTargetValue)); localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 4/14 9/24/2019 VPP model_RM else rangeError = rangeError/2; end end

end end

return scenarioMatrix;

end

Out[7]:

simplescengen (generic function with 2 methods)

In [8]:

# Generating Price Scenarios #------scenarioMatrix = simplescengen(inputVector, nScenarios, errorMetric, errorTargetValue,e rrorDistributionFunction,distributionParameters,seed); scenarioUpMatrix = simplescengen(inputUpVector, nScenarios, errorMetric, errorTargetVal ue,errorDistributionFunction,distributionParameters,seed); scenarioDownMatrix = simplescengen(inputDownVector, nScenarios, errorMetric, errorTarge tValue,errorDistributionFunction,distributionParameters,seed); scenarioReserveMatrix = simplescengen(inputResPrice, nReserveScenarios, errorMetric, er rorTargetValue,errorDistributionFunction,distributionParameters,seed);

In [11]:

# Loading the Wind Scenarios by calling the file generated by the WindMIND API #------data = load("scenarios_mean_day_1Jan.jld")

Out[11]:

Dict{String,Any} with 8 entries: "y_pred_pdf" => [0.035 0.026]… "features" => ["W-SE3"] "x_bins" => [0.0 0.001 … 1.076 1.113] "y_pred_mw" => [575.088 475.321]… "power_capacity" => [2172.9 2172.9] "y_true_mw" => [656.175 896.128]… "valid_time_refs" => ["2018-01-01T00:00Z", "2018-01-02T00:00Z"] "timestamps" => ["2018-01-01T00:00Z" "2018-01-01T01:00Z" … "2018-01 -03T1…

In [12]:

data_1= data["y_pred_mw"];

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 5/14 9/24/2019 VPP model_RM

In [13]:

#2days = 48hours #3days= 72hours #4days= 96hours #5days=120hours #6days=144hours ndays=1; #one day data_2 = zeros(nPeriods,nWindScenarios) l=1; for m in 1:ndays for n in 1:24 for k in 1:nWindScenarios global data_2[l,k] = data_1[1,m,k,n] end global l= l+1 if l > nPeriods break; end end if l > nPeriods break; end end

In [14]:

# Saving the maximum capacity of the Wind Farm Capacity of the region #------powercapdata = data["power_capacity"];

Out[14]:

1×2 Array{Float64,2}: 2172.9 2172.9

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 6/14 9/24/2019 VPP model_RM

In [15]:

# Input Parameters for the VPP model #------

#nScenarios = nScenarios*nReserveScenarios*nWindScenarios*nScenarios; prob = repeat([1/nScenarios], 1, nScenarios); #Probability of each scenario #prob = [0.2;0.3;0.5]; T = [1:nPeriods;]; #No of Time Periods W = [1:nScenarios;]; #No of Scenarios Q = [1];# No of Stochastic Producers I = [1];# No of Dispatchable generators J = [1];# No of Flexible Loads K = [1];# No of Storage Units

# Parameters #Dap = [18 38 10;90 100 64;20 40 58]; # Day Ahead Prices(no of Periods, No of scenario) Dap = scenarioMatrix'; # Day Ahead Prices(no of Periods, No of scenario) Rmp = scenarioReserveMatrix'; # Reserve mFRR Prices(no of Periods, No of scenario)

#Stochastic Unit Parameters #Pq = [2.5 6 2;4 4 1.1;6 3.5 1.5]; # Power Forecast from a Stochastic Unit Pq1 = data_2'./150; Pq = data_2./150; # Power Forecast from a Stochastic Unit #Pq = Pq1[combIndx[:,3],:]'; pmax = powercapdata[1]./150;

#Conventional unit Pgmax = 10; # Maximum Power capacity of Dispatchable unit in MW Pgmin= 1; # Minimum Power capacity of Dispatchable unit in MW Pgramp = 2 # Ramp up/down Power capacity of Dispatchable unit in MW Pg0 = 2 # Initial Power capacity of Dispatchable unit in MW at t= inital Prmax = Pgmax/2; # maximum Reserve offering in the mFRR in MW v0= 1 # initial status of Dispatchable unit, 1 for online else 0 ag = 5 # Parameter for Cost Calculation of Dispatchable unit bg = 10 # Parameter for Cost Calculation of Dispatchable unit cg = 5 # Parameter for Cost Calculation of Dispatchable unit su = 10 # Startup cost for a dispatchable unit

#Storage Parameters Esmax = 30; # Maximum Energy stored in Storage unit in MWh Esmin = 0.2; # Minimum Energy stored in Storage unit in MWh Es0 = 15 # Initial Energy stored in Storage unit in MWh at t= inital Pscmax = 5 # Maximum Charging capacity Psdmax = 4 # Maximum Discharging capacity eff = 0.8 # Charging Efficiency

#Balancing market Parameters baldown = scenarioDownMatrix'; # Down-regulating Prices #baldown = scenarioDownMatrix[combIndx[:,4],:]' #baldown = 0.8*Dap; # Down-regulating Prices balup = scenarioUpMatrix'; # Up-regulating Prices #balup = scenarioUpMatrix[combIndx[:,4],:]' #balup = 1.1*Dap; # Up-regulating Prices #pricebal = scenarioBalPriceMatrix' #pricebal = scenarioBalPriceMatrix[combIndx[:,3],:]'

#Linearization parameters n = 5000 st = [1:n;] tou =1 localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 7/14 9/24/2019 VPP model_RM Egmax = Pgmax.*tou Egmin = Pgmin.*tou dl = (Egmax-Egmin)/n

#CVaR Parameters alfa = 0.5 beta = 0

Out[15]:

0

In [16]:

# Correct balancing market price scenarios so it is always: # pricebalupscen >= pricespotscen # pricebaldownscen <= pricespotscen

balup[balup .< Dap] = Dap[balup .< Dap]; baldown[baldown .> Dap] = Dap[baldown .> Dap];

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 8/14 9/24/2019 VPP model_RM

In [17]:

#MILP+CVaR+Wind+Conventional+Battery+ Balance Settlement model function VPPmodel_2(T, W, prob, Dap,Pq, Pgmax,Pgmin,Pgramp, Pg0,v0,ag,bg,cg,su,balup,ba ldown,Esmax,Esmin,Es0,Pscmax,Psdmax,eff,n,tou,alfa,beta) #Model Intilization VPPmodel = Model(with_optimizer(Gurobi.Optimizer))

#Variables @variable(VPPmodel, Pd[t in T, w in W])

#Conventional Unit @variable(VPPmodel, v[t in T, w in W], Bin) @variable(VPPmodel, Pg[t in T, w in W]) @variable(VPPmodel, Eg[t in T, w in W]) @variable(VPPmodel, 0<=Csu[t in T, w in W])

#Reserve Market-mFRR variables @variable(VPPmodel, y[t in T, w in W], Bin) @variable(VPPmodel, 0<=Pr[t in T, w in W])

#Storage variables @variable(VPPmodel, Esmin<=Es[t in T, w in W]<=Esmax) @variable(VPPmodel, 0<=Psc[t in T, w in W]<=Pscmax) @variable(VPPmodel, 0<=Psd[t in T, w in W]<=Psdmax)

#CvaR Variables @variable(VPPmodel, ETA) @variable(VPPmodel, s[w in W]>=0)

#Balance settlement variables @variable(VPPmodel, Pbsell[t in T, w in W]) @variable(VPPmodel, Pbbuy[t in T, w in W])

#Linearization Module cost = zeros(Float64,length(I),length(st)) llimit=zeros(Float64,length(I),length(st)) ulimit=zeros(Float64,length(I),length(st)) # Set Parameters ST=(Pgmax-Pgmin)/n; # interval step-size for each generator ulimit=Pgmin.+ ( ST'.*(eachindex(st)[st])' ) # upper-limits of all interval mat rix llimit=ulimit.-ST'; # Lower-limits of all interval matrix cost=ag*(llimit.^2) # Set the Linearized Cost Matrix @variable(VPPmodel, b[t in T, w in W, sa in st],Bin)

#Objective Equation @objective(VPPmodel, Max, (1-beta)*(sum(prob[w]*(sum(Dap[t,w]*Pd[t,w]+Rmp[t,w]*Pr[t ,w] - sum(sum(b[t,w,s]*cost[g,s] for s in st) for g in I)-bg*Eg[t,w]-cg*v[t,w]-Csu[t,w] +baldown[t,w]*Pbsell[t,w] - balup[t,w]*Pbbuy[t,w] for t in T)) for w in W))+beta*(ETA-( 1/(1-alfa))*sum( prob[w]*s[w] for w in W )) );

#Constraints @constraint(VPPmodel, EB[t in T, w in W], Eg[t,w]+Pq[t,w] +Psd[t,w]+ Pbbuy[t,w]==Ps c[t,w]+Pd[t,w]+Pbsell[t,w]+Pr[t,w]);

#Linearization Constraints @constraint(VPPmodel,[t in T,w in W], sum(b[t,w,sa] for sa in st) <= 1 ); @constraint(VPPmodel,[t in T, w in W, g in I], sum(llimit[g,sa]*b[t,w,sa] for sa in st) <= Eg[t,w] ); @constraint(VPPmodel,[t in T, w in W, g in I], Eg[t,w] <= sum(ulimit[g,sa]*b[t,w,sa localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 9/14 9/24/2019 VPP model_RM ] for sa in st));

#CVaR Constraint @constraint(VPPmodel, [w in W], ETA-sum(Dap[t,w]*Pd[t,w]-ag*Eg[t,w]*Eg[t,w]-bg*Eg[t ,w]-cg*v[t,w]-Csu[t,w] +baldown[t,w]*Pbsell[t,w] - balup[t,w]*Pbbuy[t,w] for t in T) < = s[w]);

#Non-Decreasing Bid Curve Constraint for t in T indx = sortperm(unique!(Dap[t,:])) len = length(indx) if len > 1 @constraint(VPPmodel,[j in 2:len], Pd[t,indx[j-1]] <= Pd[t,indx[j]] ); end end

#Non-Anticipitavity Constraint for t in T global uniquepricespot = unique!(Dap[t,:]); global na = length(uniquepricespot); end if na > 1 for unq = 1:na, t in T global WW = W[ Dap[t,:] .== uniquepricespot[unq] ]; end @constraint(VPPmodel,[t in T, w in WW[2:end]], Pd[t,w]- Pd[t,WW[1]]==0); end

#Non-Decreasing Bid Curve Constraint - Reserve Market for t in T indx = sortperm(unique!(Rmp[t,:])) len = length(indx) if len > 1 @constraint(VPPmodel,[j in 2:len], Pr[t,indx[j-1]] <= Pr[t,indx[j]] ); end end

#Non-Anticipitavity Constraint - Reserve Market for t in T global uniquepricespot2 = unique!(Rmp[t,:]); global na2 = length(uniquepricespot2); end if na2 > 1 for unq = 1:na2, t in T global WW2 = W[ Rmp[t,:] .== uniquepricespot2[unq] ]; end @constraint(VPPmodel,[t in T, w in WW2[2:end]], Pr[t,w]- Pr[t,WW2[1]]==0); end

#Conventional Unit Constraints #Startup @constraint(VPPmodel, SU0[t in T, w in W], Csu[1,w]>= su*(v[1,w]-v0)) @constraint(VPPmodel,[t in 2:length(T), w in W], Csu[t,w]>= su*(v[t,w]-v[t-1,w])) #Limits @constraint(VPPmodel, STE1[t in T, w in W], v[t,w]*Pgmin<=(Pg[t,w]+Pr[t,w])) @constraint(VPPmodel, STE2[t in T, w in W], (Pr[t,w]+Pg[t,w])<=v[t,w]*Pgmax) #Rampup @constraint(VPPmodel,[t in T, w in W], (Pg[1,w]-Pg0)<=(1-y[t,w])*Pgramp) @constraint(VPPmodel,[t in 2:length(T),w in W], (Pg[t,w]-Pg[t-1,w])<=(1-y[t,w])*Pgr amp) #Rampdown localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 10/14 9/24/2019 VPP model_RM @constraint(VPPmodel,[t in T, w in W], (Pg0-Pg[1,w])<=(1-y[t,w])*Pgramp) @constraint(VPPmodel,[t in 2:length(T),w in W], (Pg[t-1,w]-Pg[t,w])<=(1-y[t,w])*Pgr amp) #Energy value @constraint(VPPmodel,[t in T, w in W],(Pg[1,w]+Pg0)/2 == Eg[1,w]) @constraint(VPPmodel,[t in 2:length(T),w in W],(Pg[t,w]+Pg[t-1,w])/2 == Eg[t,w])

#Storage Constraints @constraint(VPPmodel, [t in T, w in W], Es[1, w] == Es0 + eff*Psc[1,w]-(1/eff)*Psd[ 1,w]) @constraint(VPPmodel, [t in 2:length(T),w in W], Es[t, w] == Es[t-1,w] + eff*Psc[t, w]-(1/eff)*Psd[t,w])

#Reserve market Constraints @constraint(VPPmodel, [t in T, w in W], Pr[t,w]<=(Prmax*y[t,w]))

#Balancing market Constraints @constraint(VPPmodel, [t in T, w in W], 0<=Pbsell[t,w]) @constraint(VPPmodel, [t in T, w in W], Pbsell[t,w]<=(Psdmax+Pq[t,w])) @constraint(VPPmodel, [t in T, w in W], 0<=Pbbuy[t,w]) @constraint(VPPmodel, [t in T, w in W], Pbbuy[t,w]<=(pmax))

JuMP.optimize!(VPPmodel) term_status = JuMP.termination_status(VPPmodel); obj_value = JuMP.objective_value(VPPmodel); DA_Volume = JuMP.value.(Pd) Res_Volume = JuMP.value.(Pr) Conventional_Volume = JuMP.value.(Eg) Storage_Volume = JuMP.value.(Es) Upreg_Volume = JuMP.value.(Pbbuy) Downreg_Volume = JuMP.value.(Pbsell)

return term_status, obj_value, DA_Volume,Res_Volume,Conventional_Volume, Storage_Vo lume,Upreg_Volume,Downreg_Volume; end

Out[17]:

VPPmodel_2 (generic function with 1 method)

In [ ]:

status2,Profit2,DaVolume2,ResV2,Cv2,Sv2,Pbbv2,Pbsv2 = VPPmodel_2(T, W, prob, Dap,Pq, Pg max,Pgmin,Pgramp, Pg0,v0,ag,bg,cg,su,balup,baldown,Esmax,Esmin,Es0,Pscmax,Psdmax,eff,n, tou,alfa,beta);

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 11/14 9/24/2019 VPP model_RM

In [27]:

DaVolume2

Out[27]:

2-dimensional DenseAxisArray{Float64,2,...} with index sets: Dimension 1, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 15, 16, 17, 18, 19, 2 0, 21, 22, 23, 24] Dimension 2, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] And data, a 24×10 Array{Float64,2}: 0.83392 1.36709 1.48934 … -0.293087 -0.293087 6.83013 4.17288 0.672047 0.963113 4.17288 -7.0 1.47784 0.858953 0.858953 0.858953 -0.0588933 3.73766 0.858953 -0.233827 0.59058 -0.233827 0.306087 -0.233827 -0.246407 0.669533 0.669533 0.669533 -0.292567 -0.292567 0.669533 0.462453 -0.14524 -0.139373 … -0.139373 -0.309427 -0.139373 -0.393687 -0.393687 -1.56517 -5.22773 -12.0 -0.393687 -5.00285 -0.25214 -5.00285 -5.00285 -0.369233 -12.0 -7.0 -0.204207 -7.0 -0.204207 -0.204207 -12.0 -0.309427 -7.0 14.9535 14.4838 -0.638253 0.10404 -7.0 0.04172 18.3218 … -0.08292 -7.0 -7.0 -0.33136 -0.33136 0.0122333 0.0122333 -0.33136 -7.0 -0.23276 -0.23276 -7.0 -0.23276 -0.23276 14.4208 -0.130013 -7.0 14.2532 14.2532 17.4355 -0.130013 3.96175 -7.0 -0.18982 0.395107 0.395107 3.71498 -0.130013 -7.0 18.2818 … -7.0 -7.0 -7.0 -0.167927 0.10404 0.10404 0.10404 0.10404 -7.0 -7.0 4.0277 -7.0 4.09645 -7.0 -4.78203 0.55244 -7.0 -7.0 -7.0 18.6204 4.34647 4.32668 3.6734 -7.0 4.85757 0.275347 4.85757 0.37344 0.37344 3.82956 … 16.8958 0.37344 1.05962 -7.0 4.17139 -3.0 4.17139 0.74694 0.74694 1.49186 0.96408 0.96408 1.08341 19.0857 1.08341 19.9276 1.21695 1.33325 15.5009 1.28933 1.82669

In [28]:

# Saving the outputs to the local machine

DaVolume2 = convert(DataFrame, DaVolume2) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/volume.csv",DaVolume2) Cv2 = convert(DataFrame, Cv2) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/CV.csv",Cv2) Sv2 = convert(DataFrame, Sv2) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/SV.csv",Sv2) ResV2 = convert(DataFrame, ResV2) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/ResV.csv",ResV2) Pbbv2 = convert(DataFrame, Pbbv2) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/negvolume.csv",Pbbv2) Pbsv2 = convert(DataFrame, Pbsv2) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/posvolume.csv",Pbsv2)

Out[28]:

"D:/Msc @ KTH/Thesis/Results/VPP/Day/posvolume.csv"

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 12/14 9/24/2019 VPP model_RM

In [29]:

Sv2

Out[29]:

24 rows × 10 columns (omitted printing of 1 columns)

x1 x2 x3 x4 x5 x6 x7 x8 x9

Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64

1 15.0 15.0 15.0 10.0 11.8732 15.0 15.0 15.0 15.0

2 10.624 15.0 15.0 10.0 11.8732 15.0 15.0 10.0 15.0

3 10.3337 15.0 15.0 10.0 11.8732 14.3667 15.0 10.0 10.0

4 10.3337 15.0 15.0 10.0 11.8732 14.3667 15.0 10.0 9.95913

5 10.3337 14.5759 14.2247 10.0 11.8732 14.3667 15.0 10.0 9.95913

6 10.3337 14.5759 14.2247 10.0 15.1303 14.3667 19.0 10.0 9.95913

7 10.3337 14.7545 15.4105 11.2 15.9177 18.3667 19.0 14.0 13.9591

8 14.2838 14.7545 19.4105 15.2 19.9177 18.3667 23.0 17.8988 13.9591

9 14.2838 14.7545 19.4105 15.2 19.9177 18.3667 23.0 17.8988 13.5853

10 14.2838 14.7545 19.4105 15.2 19.9177 18.3667 23.0 17.8988 13.5853

11 14.2838 14.7545 15.2 15.2 19.9177 18.3667 23.0 17.8988 13.5853

12 14.2838 14.7545 15.2 15.2 19.9177 18.3667 22.6484 17.88 13.5853

13 14.2838 14.7545 15.2 15.2 19.9177 18.3667 22.6484 17.88 13.5853

14 14.2838 14.7545 15.2 15.2 19.9177 18.3667 22.6484 17.88 10.2

15 9.28382 14.7545 15.2 10.2 19.9177 13.3667 22.6484 17.1762 10.2

16 9.28382 14.7545 10.2 10.2 19.9177 10.2095 22.6484 17.1762 10.2

17 9.28382 14.543 10.2 10.2 19.9177 10.2 22.6484 17.1762 10.2

18 9.28382 9.543 10.2 10.2 14.9177 10.2 17.6484 12.1762 10.2

19 9.28382 9.543 10.2 5.2 14.9177 5.2 12.6484 12.1762 5.2

20 5.2 5.26539 10.2 5.2 10.2 5.2 7.89414 7.31005 5.2

21 5.2 5.2 5.2 5.2 5.2 5.2 2.89414 5.2 5.2

22 5.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 5.2

23 5.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2

24 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 13/14 9/24/2019 VPP model_RM

In [30]:

# Saving the Scenarios to the local machine

Pq = convert(DataFrame, Pq) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/Wind.csv",Pq) Dap = convert(DataFrame, Dap) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/DAP.csv",Dap) balup = convert(DataFrame, balup) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/Balup.csv",balup) baldown = convert(DataFrame, baldown) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/Baldown.csv",baldown) Rmp = convert(DataFrame, Rmp) CSV.write("D:/Msc @ KTH/Thesis/Results/VPP/Day/reservescenarioMatrix.csv",Rmp)

Out[30]:

"D:/Msc @ KTH/Thesis/Results/VPP/Day/reservescenarioMatrix.csv"

In [ ]:

localhost:8888/nbconvert/html/VPP model_RM.ipynb?download=false 14/14 Bibliography

[1] T. Tanger˚asA. Grigoryeva, M.R. Hesamzadeh. Energy system transition in the nordic market: Challenges for transmission regulation and governance. Economics of Energy Environmental Policy,International Association for Energy Economics, 01, 2018.

[2] P.K. Morthorst Skytte. K. A nordic green flexible energy system: Barriers and opportunities. Nordic Economic Policy Review, 2018.

[3] PV Europe Magazine, . URL https://www.pveurope.eu/News/Markets-Money/ Solar-expansion-in-Nordic-countries.

[4] Y. Vardanyan, M. Amelin, and M. Hesamzadeh. Short-term hydropower planning with uncertain wind power production. In 2013 IEEE Power Energy Society General Meeting, pages 1–5, July 2013. doi: 10.1109/PESMG.2013.6672693.

[5] Lo. K Kang. Y. Optimal control and bidding strategy of virtual power plant with renewable generation. World Journal of Engineering and Technology, 04:27–34, 2016.

[6] Manuel Welsch, Mark Howells, Mohammad Reza Hesamzadeh, Brian O Gallachoir, Paul Deane, Neil Strachan, Morgan Bazilian, Daniel Kammen, Lawrence Jones, G. Strbac, and Holger Rogner. Supporting security and adequacy in future energy systems: The need to enhance long-term energy system models to better treat issues related to variability. International Journal of Energy Research, 39, 03 2015. doi: 10.1002/er.3250.

[7] Theobald le Louren. Optimization of a virtual power plant in the german electricity market, 2017.

76 Bibliography 77

[8] E. Nasrolahpour, J. Kazempour, H. Zareipour, and W. D. Rosehart. A bilevel model for participation of a storage system in energy and reserve markets. IEEE Transactions on Sustainable Energy, 9(2):582–598, April 2018. doi: 10.1109/TSTE. 2017.2749434.

[9] J. Wang, H. Zhong, Q. Xia, Z. Ma, Z. Wang, and X. Wu. Robust bidding strategy for microgrids in joint energy, reserve and regulation markets. 2017 IEEE Power Energy Society General Meeting, pages 1–5, July 2017. doi: 10.1109/PESGM.2017.8274367.

[10] Z. Zhang, J. Wang, T. Ding, and X. Wang. A two-layer model for microgrid real- time dispatch based on energy storage system charging/discharging hidden costs. IEEE Transactions on Sustainable Energy, 8(1):33–42, Jan 2017. doi: 10.1109/ TSTE.2016.2577040.

[11] A. Saez-de-Ibarra, A. Milo, H. Gazta˜naga, V. Debusschere, and S. Bacha. Co- optimization of storage system sizing and control strategy for intelligent photo- voltaic power plants market integration. IEEE Transactions on Sustainable Energy, 7(4):1749–1761, Oct 2016. doi: 10.1109/TSTE.2016.2555704.

[12] Manuel Chazarra, Javier Garc´ıa-Gonz´alez,Juan P´erez-D´ıaz,and Montserrat Arte- seros. Stochastic optimization model for the weekly scheduling of a hydropower system in day-ahead and secondary regulation reserve markets. Electric Power Systems Research, 130:67–77, 01 2016. doi: 10.1016/j.epsr.2015.08.014.

[13] Ramsay C. Strbac G. Pudjianto, D. and M Durstewitz. The virtual power plant: Enabling integration of distributed generation and demand. FENIX Bulletin, 02, 2008.

[14] Yu. T Zhu. J Ghavidel. S, Aghaei. J. A review on virtual power plant: Components and operation systems. Powercon, 2016.

[15] H. Saboori, M. Mohammadi, and R. Taghe. Virtual power plant (vpp), definition, concept, components and types. 2011 Asia-Pacific Power and Energy Engineering Conference, pages 1–4, March 2011. doi: 10.1109/APPEEC.2011.5749026.

[16] Ileskhan Kalysh and Madina Kenzhina. Virtual power plant in industry 4.0: The strategic planning of emerging virtual power plant in kazakhstan. 02 2019. doi: 10.23919/ICACT.2019.8701989. Bibliography 78

[17] Mohammad Reza Hesamzadeh, Nasser Hosseinzadeh, and Peter Wolfs. A leader–followers model of transmission augmentation for considering strategic be- haviours of generating companies in energy markets. International Journal of Elec- trical Power Energy Systems, 32:358–367, 06 2010. doi: 10.1016/j.ijepes.2009.11. 008.

[18] E. Moiseeva, M. R. Hesamzadeh, and D. R. Biggar. Exercise of market power on ramp rate in wind-integrated power systems. IEEE Transactions on Power Systems, 30(3):1614–1623, May 2015. doi: 10.1109/TPWRS.2014.2356255.

[19] M. R. Hesamzadeh, N. Hosseinzadeh, and P. J. Wolfs. Transmission system augmen- tation based on the concepts of quantity withheld and monopoly rent for reducing market power. IEEE Transactions on Power Systems, 25(1):167–180, Feb 2010. doi: 10.1109/TPWRS.2009.2036823.

[20] Malahat peik herfeh, Hossein Seifi, and M. Sheikh-El-Eslami. Two-stage approach for optimal dispatch of distributed energy resources in distribution networks consid- ering virtual power plant concept. International Transactions on Electrical Energy Systems, 24, 01 2014. doi: 10.1002/etep.1694.

[21] George Cristian Lazaroiu, Virgil Dumbrava, M. Roscia, and Dario Zaninelli. Energy trading optimization of a virtual power plant on electricity market. 2015 9th In- ternational Symposium on Advanced Topics in Electrical Engineering, ATEE 2015, pages 911–916, 06 2015. doi: 10.1109/ATEE.2015.7133932.

[22] Hrvoje Pandzic, Juan Morales, Antonio Conejo, and Igor Kuzle. Offering model for a virtual power plant based on stochastic programming. Applied Energy, 105: 282–292, 05 2013. doi: 10.1016/j.apenergy.2012.12.077.

[23] A. Sadeghi-Mobarakeh, A. Shahsavari, H. Haghighat, and H. Mohsenian-Rad. Op- timal market participation of distributed load resources under distribution network operational limits and renewable generation uncertainties. IEEE Transactions on Smart Grid, 10(4):3549–3561, July 2019. doi: 10.1109/TSG.2018.2830751.

[24] E. G. Kardakos, C. K. Simoglou, and A. G. Bakirtzis. Optimal offering strategy of a virtual power plant: A stochastic bi-level approach. IEEE Transactions on Smart Grid, 7(2):794–806, March 2016. doi: 10.1109/TSG.2015.2419714. Bibliography 79

[25] M. Houwing, G. Papaefthymiou, P. W. Heijnen, and M. D. Ilic. Balancing wind power with virtual power plants of micro-chps. pages 1–7, June 2009. doi: 10.1109/ PTC.2009.5282056.

[26] M. Song and M. Amelin. Price-maker bidding in day-ahead electricity market for a retailer with flexible demands. IEEE Transactions on Power Systems, 33(2): 1948–1958, March 2018. doi: 10.1109/TPWRS.2017.2741000.

[27] George Cristian Lazaroiu, Virgil Dumbrava, M. Roscia, and Dario Zaninelli. Energy trading optimization of a virtual power plant on electricity market. 2015 9th In- ternational Symposium on Advanced Topics in Electrical Engineering, ATEE 2015, pages 911–916, 06 2015. doi: 10.1109/ATEE.2015.7133932.

[28] W. Tang and H. Yang. Optimal operation and bidding strategy of a virtual power plant integrated with energy storage systems and elasticity demand response. IEEE Access, 7:79798–79809, 2019. doi: 10.1109/ACCESS.2019.2922700.

[29] Reedman. L Qiu. J, Brinsmead. T. Optimal scheduling of distributed energy re- sources as a virtual power plant in a transactive energy framework. 12 2017.

[30] Andrea Castillo, Jack Flicker, Jay Johnson, Clifford Hansen, and J-P Watson. Stochastic optimization with risk aversion for virtual power plant operations: A rolling horizon control. IET Generation Transmission Distribution, 11 2018. doi: 10.1049/iet-gtd.2018.5834.

[31] S. R. Dabbagh and M. K. Sheikh-El-Eslami. Risk assessment of virtual power plants offering in energy and reserve markets. IEEE Transactions on Power Systems, 31 (5):3572–3582, Sep. 2016. doi: 10.1109/TPWRS.2015.2493182.

[32] Svenska Kraftnat. The swedish electricity market and the role of svenska kraftnat. 2018.

[33] S. Corsi and C. Sabelli. General blackout in italy sunday september 28, 2003, h. 03:28:00. IEEE Power Engineering Society General Meeting, 2004., pages 1691– 1702, June 2004. doi: 10.1109/PES.2004.1373162.

[34] Nordic balancing model. ENTSOE Consulation Report, 05 2019. URL https: //www.nordicbalancingmodel.net/. Bibliography 80

[35] Darryl Biggar and Mohammad Reza Hesamzadeh. The economics of electricity markets. The Economics of Electricity Markets, pages 1–409, 01 2014. doi: 10. 1002/9781118775745.

[36] Y. Vardanyan and M. Hesamzadeh. Optimal bidding of a profit-maximizing hy- dropower producer in day-ahead and real-time markets. In 2014 International Conference on Probabilistic Methods Applied to Power Systems (PMAPS), pages 1–6, July 2014. doi: 10.1109/PMAPS.2014.6960589.

[37] M. Ghandhari. Stability of power systems. 2016.

[38] Nordic balancing philosophy. ENTSOE Report, page 21, 2016.

[39] Reserve products and reserve market places. Public presentation material, Fingrid, 2018.

[40] Agreement on a nordic market for frequency restoration reserves with automatic activation (afrr). Nordic TSOs, 2016.

[41] Expketra. Summary and description of the dierent rules of the markets in sweden. Technical Report 556818, 2017.

[42] Nordic TSOs. Note on the nordic afrr market. 2017.

[43] Statnett. Nordic balancing concept. 2017.

[44] Svenska Kraftn¨at.Article 17.1.a rules on balancing. Technical report, 2014.

[45] Validating a centralized approach to primary frequency control with series-produced electric vehicles. Journal of Energy Storage, 7:63 – 73, 2016. ISSN 2352-152X.

[46] Svenska Kraftn¨at.Guidance on the provision of reserves. Technical report, 12 2018.

[47] Svenska Kraftn¨at. Regeldokument-fcr—produktion-v4-andringar-inkluderade. Technical report, 12 2018.

[48] eSett Oy. Nordic imbalance settlement model handbook. 05 2019.

[49] . URL https://www.fingrid.fi/en/pages/news/news/2017/ joint-nordic-imbalance-settlement-for-the-electricity-market-launched/.

[50] Antonio Conejo, Miguel Carrion, and Juan Morales. Decision Making Under Uncer- tainty in Electricity Markets, volume 153. 01 2010. doi: 10.1007/978-1-4419-7421-1. Bibliography 81

[51] Hannele Holttinen and G¨oranKoreneff. Imbalance costs of wind power for a hydro power producer in finland. Wind Engineering, 36, 01 2007. doi: 10.1260/0309-524X. 36.1.53.

[52] Y. Tohidi, M. R. Hesamzadeh, and F. Regairaz. Sequential coordination of trans- mission expansion planning with strategic generation investments. IEEE Transac- tions on Power Systems, 32(4):2521–2534, July 2017. doi: 10.1109/TPWRS.2016. 2616372.

[53] E. Moiseeva and M. R. Hesamzadeh. Strategic bidding of a hydropower producer under uncertainty: Modified benders approach. IEEE Transactions on Power Sys- tems, 33(1):861–873, Jan 2018. doi: 10.1109/TPWRS.2017.2696058. TRITA-EECS-EX-2019:765 www.kth.se