development of an energy modeling and microgrid operation ......energy grids. however, the use of...

77
Development of an energy modeling and microgrid operation toolbox in MatLab André Lopes Rita Thesis to obtain the Master of Science Degree in Mechanical Engineering Supervisors: Dra. Diana Pereira Neves Prof. Carlos Augusto Santos Silva Examination Committee Chairperson: Prof. Edgar Caetano Fernandes Supervisor: Dra. Diana Pereira Neves Member of the Committee: Dr. André Alves Pina November 2017

Upload: others

Post on 14-May-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

Development of an energy modeling and microgrid

operation toolbox in MatLab

André Lopes Rita

Thesis to obtain the Master of Science Degree in

Mechanical Engineering

Supervisors: Dra. Diana Pereira Neves

Prof. Carlos Augusto Santos Silva

Examination Committee

Chairperson: Prof. Edgar Caetano Fernandes

Supervisor: Dra. Diana Pereira Neves

Member of the Committee: Dr. André Alves Pina

November 2017

Page 2: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

II

1

Page 3: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

I

Acknowledgements

First and foremost, I would like to thank my supervisor Diana, for all her guidance and help throughout

this work. Her knowledge on the subject and suggestions were extremely useful and appreciated, I

could not have asked for a better supervisor.

I would also like to thank Prof. Carlos Silva for introducing me to the subject, his suggestions, and

especially his availability in answering my questions.

Over the course of this degree, I have worked with several wonderful colleagues for whom I would

also like to extend my thanks. Pedro in particular has become one of my closest friends, and for his

help and companionship, I would like to send my heartfelt appreciation to him.

Last but not least, I would like to thank my family, which has supported and helped me during my

studies and my whole life.

Page 4: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

II

Abstract

Increasing penetration of renewable energy in recent years on energy systems due to ecological

concerns has led to a changing paradigm in the energy generation sector. Microgrids integrating these

technologies enable energy generation in a decentralized manner, opening new possibilities in the

development of self-sustainable systems or in providing energy to remote locations not connected to

energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources

brings about new challenges in the operation of energy grids.

From these challenges, a need for modelling and decision-aid tools to assist energy grid managers

and planners has been identified. Due to evolving computational capabilities, several tools already

exist to model microgrids, each with advantages and drawbacks.

This work aims to develop a functional energy modelling and microgrid operation simulation toolbox,

having as basis a model developed in previous theses. The tool uses an economic dispatch model

with linear optimization to solve the unit commitment problem. However, it was developed for specific

test cases. In order to create a toolbox that can model a generic energy system, the model is

generalized and several customization options are inserted. To enhance the toolbox’s modelling

capabilities new functions are added, to model demand response measures, long term planning, etc.

The toolbox was tested for the case of the Madeira Island, in order to validate its operation and identify

improvement opportunities. Results obtained from the simulations showed some good correlation with

the real values, when considering the modelling constraints.

Key-words: Economic Dispatch; Microgrids; Modelling; Toolbox;

Page 5: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

III

Resumo

A crescente percentagem de energias renováveis em sistemas energéticos em anos recentes, devido

a preocupações ecológicas, levou a uma mudança de paradigma no sector de produção de energia.

Micro-redes usam essas tecnologias para permitir geração de energia descentralizada, abrindo novas

possibilidades no desenvolvimento de sistemas auto-sustentáveis, ou no fornecimento de energia a

locais remotos, não conectados a redes energéticas. No entanto, o uso de renováveis intermitentes

(principalmente energia solar e eólica) acarreta novos desafios para a operação das redes.

Desses desafios foi identificada a necessidade de criação de ferramentas para auxiliar os gestores e

planeadores de redes energéticas. Devido à acelerada evolução de poder computacional, existem

várias ferramentas que modelam micro redes, cada com certas vantagens e desvantagens.

O objectivo deste trabalho é a criação de uma ferramenta de modelação de sistemas energéticos e

operação de micro redes, com base num modelo previamente desenvolvido. O modelo usa

optimização linear para minimizar os custos de produção energética. Porém, foi desenvolvido para

casos de teste específicos. De modo a criar uma ferramenta que possa simular um sistema

energético genérico, o modelo é generalizado e opções de customização são acrescentadas. Para

desenvolver as capacidades de modelação da ferramenta, novas funções são adicionadas para

modelar medidas de “demand response”, planeamento a longo prazo, etc.

A ferramenta foi testada para o caso da Ilha da Madeira, de modo a validar o seu funcionamento e

identificar oportunidades para melhoria. Resultados das simulações apresentaram uma boa

correlação com os valores reais, quando considerados os constrangimentos de modelação.

Palavras-chave: Despacho económico; Micro-redes; Modelação; Ferramenta;

Page 6: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

IV

Table of Contents

Acknowledgements ............................................................................................................................... I

Abstract .................................................................................................................................................. II

Resumo ................................................................................................................................................. III

Table of Contents ................................................................................................................................ IV

List of Tables ........................................................................................................................................ VI

List of Figures ...................................................................................................................................... VII

List of Acronyms ................................................................................................................................ VIII

List of Symbols ..................................................................................................................................... IX

1 Introduction .................................................................................................................................... 1

1.1 Overview .................................................................................................................................... 1

1.2 Motivation & Objectives ........................................................................................................... 2

1.3 Structure of the Thesis ............................................................................................................. 3

2 Literature review ........................................................................................................................... 5

2.1 Microgrids ................................................................................................................................... 5

2.2 Modelling tools .......................................................................................................................... 6

2.3 The Economic Dispatch model .............................................................................................10

2.3.1 Algorithm process & Modelling definitions .................................................................... 10

2.3.2 Operating constraints ....................................................................................................... 13

2.4 Demand response ..................................................................................................................15

3 Methodology ................................................................................................................................ 16

3.1 Generalization & GUI design ................................................................................................16

3.2 Added functionalities ..............................................................................................................19

3.2.1 Demand scenarios ............................................................................................................ 19

3.2.2 Long term calculations ..................................................................................................... 21

3.2.3 Capacity factors in the definition of renewable availability ......................................... 23

3.3 Error calculation ......................................................................................................................23

4 “Demand Response” function ................................................................................................... 24

4.1 Implementation & Integration with ED Model .....................................................................24

4.2 Algorithm description ..............................................................................................................25

4.2.1 Objective function ............................................................................................................. 26

4.2.2 Equality constraints .......................................................................................................... 27

4.2.3 Boundaries ......................................................................................................................... 27

Page 7: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

V

5 Case study - Madeira ................................................................................................................. 28

5.1 The Madeira Island .................................................................................................................28

5.2 Madeira’s energy system .......................................................................................................28

5.2.1 Supply system characterization ...................................................................................... 28

5.2.2 Demand characterization................................................................................................. 29

5.2.3 Constraints ......................................................................................................................... 29

5.3 Application of the model to Madeira.....................................................................................30

5.3.1 Implementation constraints ............................................................................................. 30

5.3.2 Data treatment & Assumptions ....................................................................................... 32

5.3.3 Modelling parameters ...................................................................................................... 32

6 Results and discussion .............................................................................................................. 35

6.1 Validation of case study .........................................................................................................35

6.1.1 Production shares ............................................................................................................. 35

6.1.2 Load and dispatch analysis ............................................................................................. 37

6.1.3 Emissions, costs and fuel consumption ........................................................................ 40

6.2 Demand response ..................................................................................................................42

6.2.1 Data treatment & Assumptions ....................................................................................... 42

6.2.2 Algorithm tests results ...................................................................................................... 45

7 Conclusions ................................................................................................................................. 48

7.1 Final remarks ...........................................................................................................................48

7.2 Suggestions for future work ..................................................................................................48

7.3 Notes on the storage algorithm ............................................................................................50

7.4 Notes on long term calculations ...........................................................................................50

References .......................................................................................................................................... 51

Appendices .......................................................................................................................................... 54

Appendix A ......................................................................................................................................54

Appendix B ......................................................................................................................................57

Appendix C ......................................................................................................................................59

Appendix D ......................................................................................................................................61

Appendix E ......................................................................................................................................62

Appendix F.......................................................................................................................................65

Page 8: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

VI

List of Tables

Table 1: Additional characteristics of the tools ................................................................................. 8

Table 2: ED Model’s inputs and outputs ......................................................................................... 11

Table 3: Types of increase and profiles that can be inserted in the system ............................. 20

Table 4: DGEG Madeira Island survey results ............................................................................... 21

Table 5: Formulation of the LP algorithm for the “Demand Response” function ...................... 26

Table 6: Number of plants and max. power by technology type in Madeira ............................. 28

Table 7: EEM Constraints for the Madeira energy system .......................................................... 30

Table 8: Thermal generators’ consumption curves parameters .................................................. 32

Table 9: CO2eq emissions and cost by fuel type ............................................................................. 33

Table 10: Errors between real and simulated dispatched power and hours ............................. 39

Table 11: Results of the DR algorithm test considering peaks shift ........................................... 45

Page 9: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

VII

List of Figures

Figure 1: Representation of a typical microgrid (adapted from [9])............................................... 5

Figure 2: Overview of the ED Model ................................................................................................ 10

Figure 3: Example of a transition path between feasible states (in red) .................................... 12

Figure 4: Fuel consumption curve (adapted from [21]) ................................................................. 14

Figure 5: Initial window of the toolbox ............................................................................................. 18

Figure 6: Demand Configuration Window ....................................................................................... 18

Figure 7: Custom Length Simulation Window ................................................................................ 19

Figure 8: Integration of DR algorithm with the ED Model ............................................................. 24

Figure 9: Typical seasonal load diagrams 2015 (adapted from [28]) ......................................... 29

Figure 10: Comparison between real and simulated production shares .................................... 36

Figure 11: Daily load diagrams for the EEM and simulated data, 10th May ............................... 37

Figure 12: Daily load diagrams for the EEM and simulated data, 20th Aug. .............................. 38

Figure 13: Comparison of real and simulated values of consumption, costs and emissions . 41

Figure 14: Examples of Madeira and Terceira daily demand profiles (flexible loads

highlighted) .......................................................................................................................................... 43

Figure 15: Obtained modified demand profiles by the DR algorithm .......................................... 44

Figure 16: Hourly specific costs for the exemplified days ............................................................ 45

Figure 17: Results of the second DR algorithm test ...................................................................... 46

Page 10: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

VIII

List of Acronyms

CHP - Combined Heat and Power

DES - Distributed Energy Storage

DG - Distributed Generators

DR - Demand Response

ED - Economic Dispatch

EEM - Empresa de Electricidade da Madeira

ESS - Energy Storage Systems

FU - Fuel Unit

GAMS - General Algebraic Modeling System

GUI - Graphical User Interface

HRES - Hybrid Renewable Energy Systems

IRENA - International Renewable Energy Agency

LB - Lower Boundary

LCOE - Levelized Cost of Electricity

LP - Linear Programming

MILP - Mixed Integer Linear Programming

NPC - Net Present Cost

O&M - Operation and Management

OR - Operational Reserve

PV - Photovoltaic

UB - Upper Boundary

Page 11: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

IX

List of Symbols

𝛽 - Allowed intermittent energy (solar PV and wind) in the system

𝐴𝑒𝑞 - Equality constraints matrix

𝐴𝐶 - Acquisition costs [€]

𝑏𝑒𝑞 - Equality constraints vector

𝐶𝑃 - Specific production costs [€/kWh]

𝐶𝐹 - Cash flows [€]

𝐶𝑓𝐺 - Capacity factor of the generator

𝐷 - Energy demand requirement [kWh]

𝐷𝐹 - Shift able energy demand (“Flexible Demand”) [kWh]

𝐷𝑅 - Modified energy demand [kWh]

𝐸𝑃 - Energy produced [kWh]

𝐹𝐶 - Fuel cost [€/L]

𝐼𝐻𝑅 - Incremental Heat Rate of the generator [L/kWh]

𝐼𝑛𝑐 - Increase to demand requirement [kWh]

𝐿 - expected lifetime [years]

𝐿𝐵 - Lower boundary of the optimized profile [kWh]

𝑁𝐿𝐶 - No Load Cost of the generator [FU/h]

𝑂𝐶 - Operational costs [€]

𝑃𝐶 - Total production costs [€]

𝑃𝑈𝑛𝑖𝑡 - Unit Power [kW]

𝑃𝐺 - Committed power of the generator [kW]

𝑃𝑚𝑎𝑥𝐺 - Maximum operating power of the generator [kW]

𝑃𝑚𝑖𝑛𝐺 - Minimum operating power of the generator [kW]

𝑁𝑆𝑖𝑚 𝑑𝑎𝑦𝑠 - Number of simulated days

Page 12: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

X

𝑁𝑈𝑛𝑖𝑡𝑠 - Number of units added to the system

𝑁𝐺 - Number of committed generators

𝑁𝐼𝐺 - Number of committed intermittent renewable generation entries (solar and wind)

𝑁𝑇𝐺 - Number of committed thermal generators

𝑁𝑉 - Normalized value (value in the normalized profile of the inserted entry) [%]

𝑁𝑇 - Number of time steps considered [hours]

𝑟 - Discount rate.

𝑅𝑈𝐺 - Ramp up rate of the generator [kW/h]

𝑅𝐷𝐺 - Ramp down rate of the generator [kW/h]

𝑅𝑑 - Lower spinning reserve

𝑅𝑢 - Upper spinning reserve

𝑆𝑇𝐶 - Startup cost of the generator [€]

𝑆𝐷𝐶 - Shutdown cost of the generator [€]

𝑈𝐵 - Upper boundary of the optimized profile [kWh]

𝑈𝐵𝑃 - Possible upper boundary of the optimized profile [kWh]

𝑉𝑅 - Real value

𝑉𝑆𝑖𝑚 - Simulated value

Page 13: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

1

1 Introduction

1.1 Overview

Over the past years, in the power generation sector, ecological concerns and cost reduction of wind

and solar power generation have caused changes in the investment paradigm. A shift from fossil fuels

systems to hybrid renewable energy systems (HRES), integrating fossil fuels with renewable power

production and energy storage has been observed in several countries, with growing penetration and

capacity of renewable energy sources [1].

The International Renewable Energy Agency (IRENA) states, in [2], that “In an era of accelerating

global change, the adoption of the Paris Agreement at COP 21 marks a turning point in the global

energy transition. The imperative of decarbonising energy is now seen as a central element of global

efforts to deeply reduce greenhouse-gas emissions.” IRENA claims that doubling renewables shares

globally by 2030 is a possibility and that projects are set in motion to attempt to achieve that goal in

numerous countries. This means that, in the near future, an accelerated development and deployment

of renewable technologies, coupled with an increase in energy efficiency is expected [2]. Facing this

changing paradigm in energy production, energy grid planners and managers must be aware of the

new challenges and opportunities presented.

These emerging technologies provide the possibility of generating energy in different manners from

the centralized production that is currently employed in most of the developed world. For example,

projects using renewable energy generation to turn university campi into sustainable microgrids [3] are

appearing, and they may possibly be employed in other types of buildings with high intensity energy

usage (offices, etc.).

On the other hand, access to modern electricity services can now be provided to more than 1 billion

people, most of them in developing countries. “It is now possible to deliver modern electricity services

to remote regions via off-grid electricity and micro-grids powered by renewable energy sources.” [4].

The United Nations Sustainment Development Goal 7 (SDG7) ambitiously proposes to provide

universal access to affordable, reliable, sustainable and modern energy to all by 2030. Doing so, could

present several benefits, such as:

Generating over 4,5 million direct jobs in the decentralized renewable electricity sector;

Reducing air pollution and carbon emissions;

Providing reliable electricity access to health facilities that serve almost 1 billion people worldwide;

Preventing half of all premature deaths of children under the age of 5 and an estimated 4,3 million

premature deaths per year, caused by the use of traditional fuel sources like kerosene and

firewood;

Page 14: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

2

Improving education facilities and providing access to electricity for students who did not

previously have it, which would significantly impact the quality of education in developing

countries.

However, the intermittency associated with some renewable energy production (wind and solar as the

main examples) brings about new challenges concerning the stability of power production. As the

renewables penetration increases, ensuring the stability of the system can prove to be challenging and

costly. For the case of isolated systems, the problems associated with grid stability become more

relevant, as those systems have no means of importing a deficit or exporting an excess of energy to

neighbor systems, when needed, to satisfy the demand requirements, as some countries usually do.

Therefore, the variability associated with wind and solar resources may result in system failures in

isolated systems with a high renewable generation, either by failing to provide enough power to satisfy

the demand or having excess power in the grid and no way to store or use it.

In conclusion, the operation of microgrids is a difficult task, combining the need to optimize power

production (in order to reduce costs and make isolated operation an economical advantage with

regards to running using the main grid, if such is possible), with constraints and stability issues,

concerning mainly non-dispatchable renewable energy production. Thus, new tools and methods must

be developed to aid professionals in dealing with these problems.

1.2 Motivation & Objectives

The importance and complexity of the optimization of these systems lead to the identification of a need

for a decision-aid modelling tool. Such a tool would be expected to assist the user in the optimization

of operating conditions and long-term planning of investments in order to ensure the lowest operating

and investment costs, while satisfying the demand with an efficient energy supply and ensuring grid

stability. A review of the existing energy modelling tools available conducted by D. Connolly et al. [5]

concluded that there isn’t a general tool applicable to any application, so the system

designer/manager would need to identify the most suitable one for each case. For example, HOMER,

a tool well-suited for micro power systems design, lacks the option to include the technical details of

the several generation modules [6, 7]. Some of these technical properties may constitute constraints to

their use and, therefore, have a serious effect on the optimization algorithm. A clear example of this

constitutes the start-up and shut-down times of generators and their up-time and down-times once

turned on or off.

In a Master Thesis developed at IST in 2016 by F. Guzzi [7], the author worked on improvements to a

“beta” version of a model developed by M. Abeysekera [8], having validated it for the case of the

Terceira Island, in the Azores archipelago, in Portugal. Nevertheless, the resulting tool still presented

some opportunities for future work and improvement.

Page 15: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

3

The main goal of this work will be the improvement of the tool and its features, having as a starting

point the MatLab® code (the version left by Guzzi) in order to develop a functional MatLab

® toolbox.

The toolbox should be applicable to a wide range of microgrid systems to assist in their operation and

planning. To that end, the following steps are proposed:

Increasing the accuracy of several variables used in the simulations, namely capacity factors of

intermittent renewable energy sources (some databases contain values for wind and solar

energies based on geographical location) and wind speeds (considering the possibility of a

forecasting function for it);

The development of a Graphical User Interface (GUI) in order to make it user friendly and easily

customizable;

Developing the long-term planning decision-aid and integrate it with the short-term operation

planning components, to better assist the investment planning;

Generalizing the model, to expand the tool’s application to other energy systems. The previous

case studies used have forced the introduction of some constraints/characteristics in the model

specific to those particular systems, causing an inadequacy for other scenarios;

1.3 Structure of the Thesis

The structure of this paper is as follows:

Section 2 contains a more detailed review of microgrids modelling, discussion/comparison of the

current tools being used and their limitations. The Economic Dispatch (ED) model developed by

Abeysekera is described. Lastly, the concept of demand response is presented;

Section 3 showcases the modifications done to the previous version of the model, exposing the

important aspects of the methodology used in its generalization and addition of new functions. It

also discusses the design of the GUI;

Section 4 describes the “Demand Response” function added to the toolbox in more detail. In this

section, the algorithm for this function and its implementation in the ED model are presented;

Section 5 contains the description of the Madeira energy system case study, and the assumptions

made when modelling it, for its use as a test case;

In Section 6, the main results obtained with the toolbox and some of its new functions, in the case

study, are listed and discussed;

Page 16: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

4

Section 7 closes with conclusions and suggestions for future improvements.

Page 17: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

5

2 Literature review

2.1 Microgrids

According to reports by researchers [9, 10], reaching a consensual definition for the term microgrid

has proven to be a difficult endeavour. Two definitions adopted are presented here, to attempt to

convey the concept of a microgrid.

The U.S. Department of Energy Microgrid Exchange Group defines a microgrid as “a group of

interconnected loads and distributed energy resources within clearly defined electrical boundaries that

acts as a single controllable entity with respect to the grid. A microgrid can connect and disconnect

from the grid to enable it to operate in both grid-connected or island-mode” [11]. This definition does

not specify that some microgrids in remote systems have no connection whatsoever to a main grid.

According to the European Technology Platform of Smart Grids [12], a microgrid consists of a platform

that facilitates the integration of Distributed Generators (DG), ESS and loads to ensure that the power

grid can supply sustainable, price-competitive and reliable electricity.

Considering the definitions exposed, it is seen that the term “microgrid” can be used to describe any

energetic system that is capable of producing (and possibly storing) energy to satisfy the demand

requirements from its internal loads, operating in an islanded mode from a main grid (in case there is

one). Figure 1 presents a representation of a typical microgrid, with its usual components, where DES

stands for Distributed Energy Storage.

Figure 1: Representation of a typical microgrid (adapted from [9])

Page 18: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

6

The ability to operate on an islanded mode, resulting in a lower dependency from the main grid,

attempts to increase the stability of the provided energy (not subjected to failures in the main grid),

while diminishing energy production and grid operating costs (using renewable energy sources, for

example). For this purpose, several projects in the later years have been developed in this area

identifying the needs and end-uses, designing microgrids for specific business such as residential

neighbourhoods, university or industrial campus, turning them into sustainable microgrids [3, 13, 14].

Adding power production in a microscale to buildings (solar photovoltaic micro production, for

example) may result in sustainable microgrids that only use the main grid as a last resource option for

unusual spikes in the demand requirements.

One example where islanded operation is a necessity rather than an option is isolated systems, for

example, islands. Although some can be connected to the main grid, or to other islands (forming,

therefore a larger grid), they usually have to be able to provide energy for its inhabitants without

relying on a larger energy grid.

In addition to the ones already exemplified above, energy production through the use of microgrids

presents more benefits, including [9]:

Facilitated integration of distributed generation (especially solar and wind) and use of highly

efficient generators with combined heat and power technology;

Possibility of lowering distribution losses by implementing distributed generation located at the

demand site, resulting in higher energy efficiency as well;

Providing support to the main grid, with services such as load balancing, system restoration

support, etc.

Diminished dependency on fossil fuels, reduced carbon emissions and pollution and promotion of

energy sustainability (for microgrids containing renewable energy generation);

2.2 Modelling tools

With the increase of computational power, the amount of available tools to model energy systems has

grown exponentially. Nevertheless the available tools are designed for different purposes, range of

application, etc., which leads to a necessity of some sort of classification. N. van Beeck presents 9

different ways of classifying energy systems models, reproduced below (adapted from [15]):

1. General and specific purposes of energy models;

2. Model structure: internal & external assumptions;

3. Analytical approach: top-down vs. bottom-up;

Page 19: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

7

4. Underlying methodology;

5. Mathematical approach;

6. Geographical coverage: global, regional, national, local, or project;

7. Sectoral coverage;

8. Time horizon: short, medium, and long term;

9. Data requirements.

Other than these types of classifications, the existing tools also present variable availability to the

general public. That is to say that while some are free to download, others have to be purchased, or

are only available to certain members of the group that developed it. Some are even unavailable at all

and the user can only contact the developer to negotiate having analyses performed. In the review of

several modelling softwares perfomed by Connoly et al. [5], the differences highlighted above are

evident.

In light of this large scope of classifications, two programs were selected from the list reviewed by

Connoly et al. as the focus of the analysis performed in this chapter: EnergyPLAN and HOMER. Both

of these tools are freely available to the public (HOMER in the form of a free trial), and resemble the

toolbox being developed in terms of the classifications presented by N. van Beeck. Another tool was

selected for comparison, discussed in another review conducted by Mendes et al. [16], the Distributed

Energy Resources Customer Adoption Model (DER-CAM).

EnergyPLAN

EnergyPLAN is a tool to assist the design of national or regional energy planning strategies by

simulating the entire energy system, which has been developed and expanded since 1999 at Aalborg

University in Denmark. The tool can be downloaded for free at [17]. It is designed in tab sheets,

programmed in Dephi Pascal. The analysis is performed in time steps of one hour for the duration of

one year and the model is able to develop several kinds of energy systems analyses, such as

technical, market exchange and feasibility studies. Its outputs consist of energy balances and resulting

annual production, fuel consumption, import/export of electricity and total costs.

HOMER

HOMER is a user-friendly micropower design tool, developed by the National Renewable Energy

Laboratory, U.S.A. in 1992. It can simulate and optimize stand-alone and grid-connected power

systems with a minimum time-step of 1 minute, for the duration of 1 year. The software can be

downloaded from [18], for a free 21 days trial. A full description of the tool can be found in [19].

Page 20: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

8

DER-CAM

The Distributed Energy Resources Customer Adoption Model (DER-CAM) has been developed at

Berkeley Lab since 2000. It is a General Algebraic Modeling System (GAMS) based Mixed Integer

Linear Programming (MILP) model that assists in both the optimization of short term operation of the

system and long-term planning such as the installation of technologies and capacity to predict when

the customer will be self-generating electricity and/or transacting with the power grid. A more detailed

description of the model and its features can be read at the corresponding page of the Berkeley Lab

website [20]. It can be obtained for free, requiring specific software to run (GAMS Solver and

Interface). Although an estimate of the training period required to run it is not provided, the website

contains a user manual and tutorial videos to assist the user in starting to use the tool.

Table 1 summarizes some additional characteristics of the three tools, not discussed above.

As pointed out by Guzzi [7] and demonstrated by Neves et al. [6], both EnergyPLAN and HOMER

share the same main disadvantage: the user is unable to input detailed technical parameters of the

generation entries (i.e. thermal generators’ ramp up/down rates, startup costs, etc.). This drawback

prevents the models from developing a reliable unit committing schedule on a short term basis. This

can affect long term predictions of the tool, as not enough variables are considered in the system’s

short term variability analysis.

Table 1: Additional characteristics of the tools

Tool Training period Technology/sectors modelled Noticeable aspects

EnergyPLAN Few days

All thermal;

All renewable;

All storage/conversion;

Transport sector.

Low

computation

time

HOMER One day

Wind turbines;

PV arrays;

Run-of-river hydro;

Biomass;

Combustion engine generators;

Microturbines;

Fuel cells;

Batteries and H2 storage;

Electric and thermal loads (district

heating).

Performs

sensitivity

analysis

Page 21: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

9

Tool Training period Technology/sectors modelled Noticeable aspects

DER-CAM Not specified

Distributed Generation:

Combustion engines;

Fuel cells;

Micro-turbines;

Combined Heat and Power

(CHP);

Photovoltaic and solar thermal

panels;

Wind turbines.

Energy Storage:

Stationary storage;

Electric vehicles;

Heat storage;

Cooling storage.

Energy Management:

Demand response;

Load shifting/shedding.

Passive technologies:

Building shell replacements

(windows, doors, insulation).

Two main branches:

1. Investment and

planning;

2. Operations.

As stated by Mendes et al., “DER-CAM limitations have been clearly identified by its authors; To begin

with, outputs and efficiencies are considered as constant during the lifetime of equipments and start-

up or other ramping constraints are not included. This means the model does not consider scale

economies of equipments. This line of thought applies also for reliability and power quality benefits, as

well as economies of scale in O&M (Operation and Management) costs for multiple units of the same

technology, which are not directly taken into account. Furthermore, DER-CAM does not internalize

potential reliability or power quality improvements in the system.” (adapted from [16]).

Neves et al. [6] demonstrated as well that modelling Demand Response (DR) measures can be

difficult when the software does not consider such inputs. Therefore, in order to develop long term and

improve short term simulation capabilities (as well as other possible future functions) in the tool being

developed, these variables should be inserted in the model used.

Page 22: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

10

2.3 The Economic Dispatch model

“Economic dispatch consists in the optimization of operating costs of power generators while

respecting their technical constraints.” (F. Guzzi [7]). The model developed by A. Muditha [8] can be

described as an economic dispatch model that uses priority listing to obtain the solution to the unit

commitment problem. The model was developed in MatLab®, and uses the fmincon function (a

MatLab® optimization solver) to optimize the unit dispatch for every hourly time-step. Currently the

algorithm does not simulate transmission losses in the energy transport grid; it is assumed to be low

enough to be disregarded from the calculations.

Figure 2 depicts an overview of how the ED model developed works. The highlighted sections

represent components of the model that were modified/added during this work. Table 2 contains a

complete enumeration of the model’s inputs and outputs, some of which are discussed afterwards.

Figure 2: Overview of the ED Model

2.3.1 Algorithm process & Modelling definitions

The algorithm begins by defining a priority list, organizing the generation entries by their energy

dispatch costs (the cost [€] of producing each unit of energy [kWh]). This list defines the committing

order of the generation entries. It should be noticed that the priority list is calculated considering the

energy dispatch costs of the entries at their maximum operation power. This may lead to problems in

the optimization process, since the comparison is being made at their maximum power, when using

generators at lower powers, the costs may not match the priority list defined.

Page 23: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

11

Table 2: ED Model’s inputs and outputs

Inputs

Modelling definitions;

o N. Pred. (Number of Predecessors);

o Priority listing/ Complete enumeration;

Operating constraints;

o Entries’ technical parameters;

Operating power;

Ramp rates;

Minimum up/down times;

Fuel consumption curves;

Fuel costs;

Emission factors;

o Operational Reserve;

o Allowed intermittent renewable energy (𝜷).

Renewable availability (hydro, solar and wind);

Demand requirements profile.

Outputs

Costs;

CO2eq emissions;

Fuel consumption;

Energy production;

LCOE and NPC (optional).

Selecting Complete Enumeration causes the algorithm to list every possible state instead of creating

the priority list. However, this option is only feasible for small systems (low number of entries) due to

the number of possible states (2𝑁 − 1), where N is the number of entries of the system, quickly

exceeding the available computational memory.

After the creation of the possible states’ list, the algorithm begins the hourly dispatch optimization. As

an input, the user must insert the initial state of the generation entries at the beginning of the

simulation. This means, which units were committed and which ones were off (and how long they were

committed/off for) at “hour 0”. From that initial state, the algorithm determines the feasible states for

the first time-step, i.e. the combination of states of the generation entries (which entries are on/off) that

satisfy both the demand and operational constraints. For each feasible state, the model calculates the

production costs and saves the one with the lowest cost. It then repeats the process for each time-

step, calculating and saving the minimum cost transition paths.

Furthermore, modifying the parameter N. Pred. changes how many feasible states are saved and

considered in each time-step, therefore increasing the number of transition paths determined. For

Page 24: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

12

example, using N. Pred = 1 (the lowest possible value) means that only one feasible state is saved for

each time-step (the one with the lowest cost), which results in only one transition path determined.

Figure 3 depicts an example with only one transition path determined, where the feasible states for

each hour are represented and the selected (lowest cost) are highlighted. At the final time step, the

algorithm compares all the transition paths and chooses the one with the lowest production costs.

Note that the toolbox creates a numbered list with the possible states of the system, explaining the

designation of each feasible state presented in Figure 3. When Priority List is selected, the possible

states’ list is numbered according to the priority list, i.e. state 1 represents a state where the generator

in the first position of the priority list is committed and the others are turned off, 2 means the first two

generators are committed while the rest are not, and so forth, for a total of N states (N being the

number of entries in the modelled system).

Time-step

(Hour) 1 2 3 … NT

Feasible

States

14 12 15

… 10

15 13 16 … 11

16 17 … 12

17 … 13

Figure 3: Example of a transition path between feasible states (in red)

The production costs (𝑃𝐶) for each hour (h) are calculated using Equation (1).

𝑃𝐶ℎ = {∑[(𝐼𝐻𝑅𝑖 × 𝑃𝐺𝑖 + 𝑁𝐿𝐶𝑖) × 𝐹𝐶𝑖 + 𝑆𝑇𝐶𝑖 × 𝑂𝑆𝑖 + 𝑆𝐷𝐶𝑖 × 𝑂𝐹𝑖]

𝑁𝐺

𝑖

}

(1)

Where:

𝐹𝐶 is the fuel cost [€ / Fuel Unit];

𝐼𝐻𝑅 is the incremental heat rate of the generator [Fuel Unit / kWh];

𝑁𝐿𝐶 represents the no-load cost of the generator [Fuel Unit / h];

𝑂𝑆 is 1 if the generator started operating (went from an off state to an on state) at hour h and 0

otherwise;

Page 25: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

13

𝑂𝐹 is 1 if the generator finished operating (went from on to off) at hour h and 0 otherwise;

𝑃𝐺 is the committed power of the generator [kW];

𝑁𝐺 is the number of committed thermal generators;

𝑆𝑇𝐶 stands for the startup cost of the generator [€];

𝑆𝐷𝐶 stands for the shut down costs of the generator [€].

The factors inside the round brackets (𝐼𝐻𝑅𝑖 × 𝑃𝐺𝑖 + 𝑁𝐿𝐶𝑖) concern the fuel consumption curves of the

generation entries. These curves, as well as the fuel cost, are discussed in further detail in Section

2.3.2. It should be noticed that the multiplication of the result of the calculation inside the round

brackets by the time-step was omitted, since the model always operates in hourly time-steps (it should

be multiplied by 1 h, to ensure the units in each side of Equation (1) match).

2.3.2 Operating constraints

The technical parameters mentioned in Section 2.3, refer to, respectively:

Operating power: minimum and maximum dispatch able power of each entry;

Ramp rates: these are defined as the increase and decrease rates in power output that a

generator can provide between two time-steps Equation (2) conveys that definition

mathematically, where 𝑅𝐷 and 𝑅𝑈 are the ramp up and down rates of generator G, respectively;

{𝑃𝐺ℎ − 𝑃𝐺(ℎ−1) ≤ 𝑅𝐷𝐺

𝑃𝐺(ℎ−1) − 𝑃𝐺ℎ ≥ 𝑅𝑈𝐺 (2)

Minimum up/down times: number of hours during which a generator must remain on/off after being

committed/shut down;

Fuel consumption curves of the generation entries: the model uses linear fuel consumption curves

that are defined by the parameters highlighted in Section 2.3.1. The NLC is a purely mathematical

value, representing the extrapolated fuel consumption for a generator working at a null power

output and the IHC is the slope of the curve. They can be obtained through linear interpolation of

the fuel consumption data of the thermal generators. Figure 4 contains a linear fuel consumption

curve and its equation, defined by these variables;

Fuel cost: cost of each unit of fuel used in a generator [€/ Fuel Unit];

Page 26: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

14

Emission factors: carbon dioxide equivalent emission factors [Kg CO2eq/ Fuel Unit].

The emissions and fuel costs are defined in a ratio per Fuel Unit (FU) consumed, since, for different

types of fuel, the considered unit of consumption may vary. It was decided to let the toolbox perform

the calculations using a fuel specific unit instead of converting to a common unit in order to allow a fair

comparison between fuel costs.

Figure 4: Fuel consumption curve (adapted from [21])

Operational Reserve (OR) or spinning reserve is a “margin” between the total power being dispatched

at hour h and the maximum/ minimum power available for dispatch by the committed entries at said

hour. It is usually employed to guarantee system stability in the events of unexpected surges or

decreases in the demand requirement, by ensuring the entries committed can increase/decrease their

power while maintaining operation. In the toolbox, it is defined as a percentage of the hourly demand

requirement, and is used by the model when calculating the feasible states for each time-step, which

must satisfy Equation (3)

{

(∑𝑃𝑚𝑖𝑛𝐺𝑖

𝑁𝐺

𝑖

)

≤ (1 − 𝑅𝑑) × 𝐷ℎ

(∑𝑃𝑚𝑎𝑥𝐺𝑖

𝑁𝐺

𝑖

)

≥ (1 + 𝑅𝑢) × 𝐷ℎ

(3)

Page 27: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

15

where 𝑅𝑑 and 𝑅𝑢 are the lower and upper spinning reserve, respectively and 𝐷ℎ represents the hourly

demand requirement of the system.

The allowed intermittent renewable energy (𝛽) concerns the maximum amount of solar and wind

energy that can be dispatched for every time-step. It is also defined as a percentage of the hourly

demand requirements. Equation (4) conveys its application in the model mathematically

(∑𝑃𝐺𝑖

𝑁𝐼𝐺

𝑖

)

≤ 𝛽 ×𝐷ℎ (4)

where 𝑁𝐼𝐺 is the number of intermittent renewable energy (wind and solar) generators.

2.4 Demand response

Demand response can be defined as “… the changes in electricity usage by end-use customers from

their normal consumption patterns in response to changes in the price of electricity over time. Further,

DR can be also defined as the incentive payments designed to induce lower electricity use at times of

high wholesale market prices or when system reliability is jeopardized. DR includes all intentional

electricity consumption pattern modifications by end-use customers that are intended to alter the

timing, level of instantaneous demand, or total electricity consumption.” (adapted from [22]). H. Sui et

al., [23] define a broader term, “Demand Side Management” that, in addition to DR, includes similar

measures, such as general increase of energy efficiency, or time based electricity pricing for end-

consumers.

Although DR measures presents benefits to the demand side of the operation of energy grids (such as

price reduction and increase of system reliability), its application may also present great benefits to the

supply side (decreasing production costs, increasing energy production efficiency and helping

supporting the balance between supply and demand, for example). Because of these potential

benefits, Neves et al. claim that modelling DR will be essential in the planning of smart grids [6].

Therefore, it would be interesting to insert a DR modelling function in the toolbox. Since the toolbox

deals with the operation and modelling of microgrids the focus of this function would be on the benefits

provided to this supply side of its operation. The impact of DR measures in supply side parameters

such as production costs and emissions would be assessed. This assessment could then be

combined with concerns regarding the demand side operation, in order to optimize a mutually

beneficial solution.

Page 28: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

16

3 Methodology

In order to develop the toolbox, the following steps were performed, not necessarily in the order

presented:

1. Generalization of the ED model and GUI development, to enable the toolbox to model any generic

energy system defined by the user;

2. Addition of functions to improve the toolbox’s modelling capabilities;

3. Validation of the model for the case study of the Madeira Island.

The model has already been tested for the cases of the Corvo (Abeysekera [8]) and Terceira (Guzzi

[7]) islands in the Azores Archipelago. However, due to the higher complexity of the Madeira Island

energy system there is some scientific interest in testing it for this case. It also presented an

opportunity to test the generalization of the Toolbox, as the tests were run using its GUI, and the new

functions added to it.

In this chapter, the methodology behind each of these steps will be addressed:

Section 3.1 discusses the changes enacted during its generalization and GUI creation;

Section 3.2 displays the functions added to the toolbox;

Finally, Section 3.3 shows the formula used for calculating the errors during the validation of the

case study.

3.1 Generalization & GUI design

The first step in the development of the toolbox concerned the generalization of the ED Model. As

mentioned before, the model was adapted to certain test cases, so the objective was to make it able to

receive any user-inputted energy system and run simulations with them. This generalization was

accompanied by the creation of a GUI in order to facilitate the creation of the energy system insertion

of the inputs.

The designed GUI consists in an initial window where the user can create the energy system to be

modelled and modify the modelling parameters, followed by a series of consecutive windows, through

which the user can input the remaining necessary inputs. The windows that appear after the initial one

depend on the simulation type selected. Figure 5 presents a print screen of the initial window of the

toolbox. In this window, adding generation and storage entries, the user creates the energy system

Page 29: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

17

that he wishes to model. Afterwards, two types of simulations can be selected to be run for the created

system:

1. Typical day simulation: this corresponds to a simulation with 24 time-steps (24 hours, 1 day). For

this case, the inputs are inserted manually by the user in the windows that follow the initial one.

Figure 6 shows the window that follows the initial one, where the demand profile and demand

scenarios can be inserted;

2. Custom length simulation: simulation with a number of time-steps defined by the user. The inputs

are imported from an excel spreadsheet that should be filled by the user, according to the

instructions presented. In the spreadsheet, the user can insert the available data for a number of

hours at will, with no limit. Figure 7 depicts the window used to customize the amount of data

imported from the spreadsheet;

The presentation of the outputs was also remodeled. When the simulation finishes running, 2 or 3

windows appear, presenting some relevant outputs, while the remainder are stored in MatLab®

variables for later consult:

1. The first window presents a plot containing the hourly dispatch of the generation and storage

entries, comparing them with the demand requirements profile;

2. In the second window, the production shares by technology are presented, as well as some

parameters concerning thermal generators;

3. The third and final window only appears if the user selects the “Long Term Calculations” option in

the main window. In it, the calculations discussed in Section 3.2.2 are presented in a table.

Furthermore, a user manual1 was written, containing information on the version of the toolbox

submitted at the end of this project [24]. It was designed to be an instruction manual on how to use the

toolbox as well as containing more technical data to aid future developers of the toolbox. However, it

was not possible to include it in this paper due to its page limit.

1 https://fenix.tecnico.ulisboa.pt/homepage/ist175836/manual-in43-energy-modeling-and-microgrid-operation-

toolbox

Page 30: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

18

Figure 5: Initial window of the toolbox

Figure 6: Demand Configuration Window

Page 31: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

19

Figure 7: Custom Length Simulation Window

3.2 Added functionalities

In addition to the generalization of the model, in order to expand the toolbox, new functionalities were

added:

Demand scenarios;

“Demand Response” function;

Long term calculations;

Capacity factors in the definition of renewable availability.

Demand scenarios, long term calculations and capacity factors are described in the following sub-

sections (Sections 3.2.1, 3.2.2 and 3.2.3 respectively). The “Demand Response” function is explained

in detail in Section 4 and results for the tests conducted for it can be found in Section 6.2.

3.2.1 Demand scenarios

When running the typical day simulation, a possibility to insert increases to the demands requirements

profile was included. Several daily profiles from the types enumerated in Table 3 are available for

selection. When selecting a profile type, the user must also define the number of units added to the

system and each individual unit’s power (the profiles are normalized for the inserted unit’s power).

Afterwards, a 24 entries vector of hourly power is calculated by the toolbox, using Equation (5), and

Page 32: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

20

added to the to the base demand profile of the system, resulting in what was called a “Modified

Demand” profile.

𝐼𝑛𝑐ℎ = 𝑁𝑈𝑛𝑖𝑡𝑠 × 𝑃𝑈𝑛𝑖𝑡 ×𝑁𝑉ℎ

100⁄ (5)

In the equation above, 𝑁𝑉ℎ represents the hourly value of the normalized profile for the considered unit

(each profile is defined by a 24 component vector). It is divided by 100 since the values inserted in the

toolbox’s profiles are defined in percentage values.

This allows the user to quickly insert in the simulation the effect of certain measures such as changing

a certain number of vehicles in circulation to electric vehicles or building new houses. Since the

calculations are done automatically by the toolbox, this also saves the user some effort and time.

Table 3: Types of increase and profiles that can be inserted in the system

Increase

types

Electric

Vehicles’

charging

Industrial

Unit Residential Unit

Public

Building

Service

Building Appliances

Profile

types

Overnight;

Over work;

Evening;

Mixed.

Small

industry;

Large

industry.

Working couple;

Working couple

w/ young

children;

Working couple

w/ old children;

Average

residential.

University;

Data

Center.

Average;

Small hotel;

Large hotel.

Clothes’

washer;

Clothes’

dryer;

Dish

washer.

The profiles for the charging of electrical vehicles were obtained from [25]. The remaining normalized

profiles were available in the data being used for the Vulcano project in the Madeira Island by IN+ at

IST. All the normalized profiles available in the toolbox for this functionality can be found annexed in

Appendix A.

Although most of the profiles are general, justifying their inclusion here, some notes must be made

regarding the profiles used for the appliances. These were obtained by surveys conducted by the

DGES (Direcção Geral de Energia e Geologia) in the Madeira Island. A total of 112105 households

were surveyed, at the results are displayed on Table 4. From these results, it was seen that the

working cycle of appliances can take less than one hour and their usage is not constant daily.

Therefore it was necessary to normalize the data in respect to both days and energy consumed,

instead of just energy, to obtain the daily normalized profiles available in Appendix A.

Page 33: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

21

Table 4: DGEG Madeira Island survey results

Appliance Clothes’ washer Clothes’ drier Dish washing machine

No. households with

appliance 104593 13228 18834

% households with

appliance 93,3 11,8 16,8

Uses per week 3 2 4

Average energy cons.

per cycle [kWh] 1,3 3,6 1,4

It must be noticed that these normalized daily appliances profiles are specific to the Madeira Island,

meaning that their usage is unadvised in simulations concerning other energy systems.

3.2.2 Long term calculations

To develop the toolbox to provide assistance in long term projects, an optional calculation of two

parameters was added:

1. Levelized Cost of Electricity (LCOE);

2. NPC (Net Present Cost).

To do so, the user must input the following characteristics for each entry added to the energy system

modelled:

Acquisition costs [€];

Variable operational costs [€/kWh];

Annual fixed operational costs [€/kW/year];

Discount Rate [%];

Expected lifetime [years].

For every entry, the NPC (in €) at the end of the equipment’s lifetime is calculated by summing the

discounted cash flows, as depicted in Equation (6).

Page 34: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

22

𝑁𝑃𝐶 =∑𝐶𝐹𝑡

(1 + 𝑟)𝑡

𝐿

𝑡=0

(6)

Where:

𝐿 represents the expected lifetime in years;

𝐶𝐹𝑡 are the annual cash flows (outflows for this case);

𝑟 is the discount rate.

The cash flows are calculated as shown in Equation (7)

𝐶𝐹𝑡[€] = {

𝐴𝐶 𝑡 = 0

𝑂𝐶𝐹𝑖𝑥 + 𝑂𝐶𝑉𝑎𝑟 + 365 ×𝑃𝐶

𝑁𝑆𝑖𝑚 𝑑𝑎𝑦𝑠 𝑡 ≠ 0 (7)

where 𝐴𝐶, 𝑂𝐶 and 𝑃𝐶 are the acquisition, total annual operational and production costs, respectively

and 𝑁𝑆𝑖𝑚 𝑑𝑎𝑦𝑠 is the number of days simulated. 𝑂𝐶𝐹𝑖𝑥 and 𝑂𝐶𝑉𝑎𝑟 for each generator are calculated by

Equations (8) and (9), respectively.

𝑂𝐶𝐹𝑖𝑥𝐺 = Annual fixed operational costs × 𝑃𝑚𝑎𝑥𝐺 (8)

𝑂𝐶𝑉𝑎𝑟𝐺 = Variable operational costs × 365 ×𝐸𝑃𝐺

𝑁𝑆𝑖𝑚 𝑑𝑎𝑦𝑠

(9)

Therefore, the cash flow at “year 0” is defined as the acquisition costs. For the remaining years of the

equipment’s lifetime the cash flows are calculated by summing the operational fixed and variable costs

and an extrapolation of the productions costs for a year basis.

Following the calculation of the NPC, the LCOE [€ / kWh] for each entry is calculated using Equation

(10).

𝐿𝐶𝑂𝐸 =𝑁𝑃𝐶

∑𝐸𝑃𝑡

(1 + 𝑟)𝑡𝐿𝑡=0

(10)

Where the energy produced during the simulated time period is extrapolated to a year basis to obtain

the LCOE for each entry of the system, by applying Equation (11).

𝐸𝑃𝑡 = 365 ×

𝐸𝑃

𝑁𝑆𝑖𝑚 𝑑𝑎𝑦𝑠

(11)

Page 35: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

23

3.2.3 Capacity factors in the definition of renewable availability

It is usually easier to find data for the capacity factors of certain technologies (in online databases

such as Renewables Ninja [26], for example, which provides the hourly capacity factors in an excel

spreadsheet, making it easy to copy them into the spreadsheet used in the custom length simulation)

instead of the direct available power or resource measured parameters. Therefore, in order to

enhance the toolbox, capacity factors for intermittent renewable technologies were inserted. Equation

(12) presents the definition of capacity factor.

𝐶𝑓𝐺 =𝑃𝐺

𝑃𝑚𝑎𝑥𝐺 (12)

For typical day simulations, hourly capacity factors can be defined for the 24 hours, for both wind and

solar technologies. The calculations are performed automatically by the toolbox and the hourly

available power for each solar and wind entry is displayed to the user. In the case of hydro technology,

a daily constant capacity factor can be defined, and once again the toolbox calculates and displays the

available power for every hydro entry in the system before performing the simulation.

In the case of custom length simulations, options were added giving the user the choice to provide the

renewable available energy for each technology type in either direct power or capacity factors. The

toolbox then imports the data from the excel spreadsheet and adjusts the calculations according to the

selected option. In this case, for all three technology types (hydro, solar and wind) the capacity factors

must be provided in the spreadsheet on an hourly basis.

3.3 Error calculation

The errors obtained in Section 6 were calculated using the formula in Equation (13)

𝐸𝑟𝑟𝑜𝑟 =|𝑉𝑅 − 𝑉𝑆𝑖𝑚|

𝑉𝑅 (13)

where 𝑉𝑅 and 𝑉𝑆𝑖𝑚 represent the real and simulated values, respectively.

Page 36: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

24

4 “Demand Response” function

This section describes the DR function added to the toolbox, describing the implemented algorithm,

the assumptions made and its limitations. Results obtained by its usage are discussed in Section

6.2.2.

4.1 Implementation & Integration with ED Model

The DR algorithm’s development was done considering its integration in the toolbox. That mindset

explains why it requires as inputs some parameters that can only be obtained after running the ED

Model for the demand profile before it is modified (henceforth referred to as “Base Profile”). After

obtaining the results for the Base profile, the profile is subjected to the DR algorithm to obtain a new

modified demand profile (from hereon called “DR Profile”), which is then used to run the ED Model

again. At the end, the total production costs from the Base and DR profiles are compared, and the

lowest ones determine which results are presented to the user.

In Figure 8 a diagram is presented representing the loop described above. Please note that not all

outputs of the ED Model are represented, merely the ones relevant to the use of the “Demand

Response” function.

Figure 8: Integration of DR algorithm with the ED Model

Page 37: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

25

Given that the DR algorithm acts only on the inputs to the ED Model and its objective function

concerns the specific costs obtained for the Base Profile, there is a chance that running the model for

the DR profile will result in higher or even equal costs. To circumvent this problem, the solution would

be an iterative process of modifying the demand profile with the DR algorithm and running the model

until a minimum value of the production costs was achieved. However, this is not a feasible solution,

for two reasons:

There are no guarantees that the production costs would converge to a minimum, or even

converge at all. For this reason, using an open number of iterations could result in an infinite loop.

Therefore, it appeared to be necessary to limit the number of iterations for each simulation;

Each iteration of the model results in an increase of the simulation time. It appears that the main

cause of the increase of the simulations time is the number of entries in the system, while

changing the demand profile used usually has a negligent effect. When modelling small systems

the time increase should not pose much of a problem, as each iteration is relatively short.

However for large systems (as was the case of the Madeira system used in the tests described in

Section 6.2.2) running more than 2 iterations for each simulation is unfeasible, since each of them

can be extremely long. For that reason, the number of times the model runs was limited to 2 per

simulation, as depicted in Figure 8.

This indirect effect of the DR algorithm also explains why the constraints regarding the thermal

generators (described in Section 4.2.3) do not assure that previously uncommitted thermal generators

for a given hour will be committed in the new simulation. Running the ED Model with a new profile will

simply change the dispatch obtained. Thus, it is possible that the dispatch for the DR profile has more

thermal generators committed at a certain hour than the one obtained for the Base Profile. This also

explains why the costs can result higher, given the start-up cost of the generators.

4.2 Algorithm description

In order to assess the potential benefits of applying DR measures, the algorithm was developed to

modify a demand profile into one which would result in reduced production costs. It uses Linear

Programming (LP), through the linprog routine in MatLab®, in order to obtain the DR profile, shifting

the allowed amount of energy requirement in each hour (named “Flexible Demand”) to the hours that

minimize the specific production costs. This shift also attempts to accomplish two goals:

Prioritize hours with high renewable availability;

Minimize the number of thermal generators committed in each hour.

Page 38: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

26

Table 5 contains all the details of the algorithm and its parameters, which are explained in more detail

in the subsequent sub-sections.

Table 5: Formulation of the LP algorithm for the “Demand Response” function

Objective Function

Minimize 𝑷𝑪 = ∑ 𝑪𝑷𝒉 × 𝑫𝑹𝒉𝑵𝑻𝒉=𝟏

Equality Constraints

𝑨𝒆𝒒𝒙 = 𝒃𝒆𝒒

∑ 𝐷𝑅ℎ = 𝑁𝑇ℎ=1 ∑ 𝐷ℎ

𝑁𝑇ℎ=1

Lower Boundary

𝐿𝐵ℎ = 𝐷ℎ − 𝐷𝐹ℎ

Upper Boundary

𝑈𝐵𝑃ℎ = 𝐷ℎ + [∑ (𝑃𝑚𝑎𝑥𝐺𝑖− 𝑃𝐺)

𝑁𝑇𝐺𝑖=1 ]

𝐷ℎ > 𝐷ℎ𝑁𝑇̅̅ ̅̅ ̅̅ →

𝑈𝐵𝑃ℎ > 𝐷ℎ →

𝑈𝐵ℎ = 𝐷ℎ

𝑈𝐵𝑃ℎ ≤ 𝐷ℎ →

𝑈𝐵ℎ = 𝑈𝐵𝑃ℎ

𝐷ℎ ≤ 𝐷ℎ𝑁𝑇̅̅ ̅̅ ̅̅ →

𝑈𝐵𝑃ℎ > 𝐷ℎ𝑁𝑇̅̅ ̅̅ ̅̅ →

𝑈𝐵ℎ = 𝐷ℎ𝑁𝑇̅̅ ̅̅ ̅̅

𝑈𝐵𝑃ℎ ≤ 𝐷ℎ𝑁𝑇̅̅ ̅̅ ̅̅ →

𝑈𝐵ℎ = 𝑈𝐵𝑃ℎ

4.2.1 Objective function

The objective function (defined in Table 5) represents the hourly specific production costs. For each

hour (ℎ) the coefficients containing the specific costs (𝐶𝑃) are calculated dividing the total production

costs by the energy produced by the system, as per Equation (14).

𝐶𝑃ℎ = 𝑃𝐶ℎ 𝐸𝑃ℎ⁄ (14)

These coefficients were selected as the objective function in order to minimize the production costs for

the new demand as well as shifting the most of “Flexible Demand” to the hours containing the highest

renewable availability. The preferable displacement to the hours of higher renewable availability stems

Page 39: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

27

from the fact that the specific costs are lower in hours where the produced energy was mostly from

renewable sources, since these don’t have costs associated with fuel consumption.

4.2.2 Equality constraints

The equality constraints guarantee that the algorithm only performs load shifting, i.e., does not cut or

add to the total demand requirements. They guarantee that the sum of the demand requirements for

the base profile is equal to the sum of the ones from the new profile. Their mathematical formulation is

shown in Table 5.

4.2.3 Boundaries

The Lower Boundary (LB) of the new profile is defined simply by subtracting the “Flexible Demand”

from the demand for each hour. Defining it ensures the algorithm only shifts the amount of energy that

was defined as being flexible when obtaining the new profile.

On the other hand, the Upper Boundary (UB) help with the second goal proposed for the algorithm.

For every hour, the highest possible UB is first calculated by adding to the current demand the

difference between the committed thermal generators’ maximum and dispatched power at that hour.

Afterwards, UB is defined as shown in Table 5. This definition prevents increases to the current peaks

of the demand profile and ensures the currently dispatched thermal generators are sufficient to satisfy

the demand at that hour. This does not guarantee, however, that no new thermal generators will be

turned on, for the reasons discussed in Section 4.1.

Page 40: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

28

5 Case study - Madeira

5.1 The Madeira Island

The Madeira Island is part of the Madeira Archipelago, one of Portugal’s autonomous regions, located

in the Atlantic Ocean, 978 km southwest of Lisbon, about 700 km west of the African continent

shoreline. The archipelago is comprised of 7 islands, out of which only the two largest ones (Madeira

and Porto Santo) are inhabited. According to [27], the Madeira Island is located at 32°42’N 17°W, it

has an area of around 741 km², and a population of about 262456 inhabitants, as of 2011.

5.2 Madeira’s energy system

5.2.1 Supply system characterization

The Madeira Island energy system was modelled based on the information provided in the report by

Empresa de Electricidade da Madeira (EEM) [28], and the non-public data provided by EEM for the

Vulcano project being developed by IN+ at IST. The generation system is comprised of thermal

(fueloil, diesel and natural gas), hydro, wind, solar photovoltaic and municipal waste incineration

plants. One of the hydro power plants (Socorridos) also has the ability to pump water back in the

reservoir, making it a pumped hydro energy storage (PHES) unit. For the case of wind generation,

there is a difference of almost 2MW between the installed generation capacity (Installed) and the

capacity actually being used (Attributed). Table 6 depicts the maximum total power and number of

units by energy type in the Madeira energy system. Appendix B contains the entirety of the parameters

inserted in the toolbox to model the Madeira energy production and storage system.

Table 6: Number of plants and max. power by technology type in Madeira

Technology type No. power plants Total max. power [MW]

Thermal 3 211,2

Waste Incineration 1 4,8

Hydro 9 45

Solar Photovoltaic 2 18,8

Wind 2 Installed [MW] Attributed [MW]

45,16 43,3

Storage (PHES) 1

Max charge power [MW]

14,8

Page 41: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

29

5.2.2 Demand characterization

As expected, the demand profile of the Madeira Island is not constant over the year, suffering some

season variation. Production shares for each type of technology are also subjected to this seasonal

variation, due to the change in renewables availability over the course of the year.

The seasonal load diagrams for the year 2015 are presented in Figure 9, to showcase the seasonal

variation of both the demand profile and production shares for each technology.

Figure 9: Typical seasonal load diagrams 2015 (adapted from [28])

5.2.3 Constraints

As is the case with most of microgrid energy systems, Madeira has a set of specific constraints (such

as contracts that force the use of certain technologies, spinning reserve, etc.) and priority definitions

that must be taken into consideration when planning the system operation. Table 7 summarizes the

constraints mentioned in the EEM data provided:

Page 42: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

30

Table 7: EEM Constraints for the Madeira energy system

Type Constraints

Priority

1. At least one group of CTC-AIE must be online at any given time;

2. 3 groups of CTV-II must be online at any given time, because of dynamic

stability reasons;

3. Renewable priority is as follows: hydro, solar, wind;

Minimum Power

4. The thermal plant in Caniçal (CTC-AIE) has an energy providing contract

with EEM, amounting to 192 GWh/year;

5. There is a contract regarding the supplied natural gas, with a minimum of

110 GWh/year;

6. Minimum powers for each group must be respected;

Spinning Reserve 7. Spinning reserve has to be higher or equal than 1,2 × Pg , where Pg is

the power of the largest group online at that time.

When running the model for the Madeira case, these constraints must be taken into account to assess

the validity of the simulation and future development opportunities for the toolbox.

5.3 Application of the model to Madeira

5.3.1 Implementation constraints

The energy system defined in the toolbox (referred as modelled system from now on) has some

differences from the real system presented in Section 5.2.1. These differences must be taken into

account when comparing the simulations results with the real data.

One difference concerns the ramp up rates of the thermal generators and hydro plants (the ramp up

rates of the remaining technologies and the ramp down values for all technologies were not provided

and were therefore assumed to be infinite). The insertion of the ramp up/down rates is discussed in

Section 5.3.2.

The mini/micro production of the solar component was not inserted in the toolbox, as there wasn’t

enough information regarding this component to validate it. The wind and solar entries were also

aggregated into two plants (one plant for each), since the dispatch information only contained the

aggregated power dispatched by wind and solar photovoltaic technology. Therefore, the inserted wind

Page 43: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

31

and solar entries in the toolbox had a maximum power of 43,3 and 15 MW, respectively, the total wind

and solar power considered.

The constraints presented in Section 5.2.3 were not inserted in the simulations, for the following

reasons:

Items 1 through 3 concern mainly priority definition of generation entries. Currently, the tool has no

way to define priority other than the cost of fuel in the thermal entries. While adjusting the costs of

the natural gas and the fuel cost for the CTC-AIE and CTV-II plants could verify their respective

constraints, these adjustments would alter the total costs and cause errors in the results

calculated by the model. For the renewable entries, however, since all their costs are null, there

would be no way to achieve the priority order described above. These questions outline the need

for a future development of a way to define dispatch priorities on the tool, based on a user inputted

order rather than costs. To that priority definition, an “always on” option could also be added to

maintain certain generation entries always dispatching energy during the simulated time interval;

Even with the aforementioned priority definition, since the tool was only designed for daily

simulations as of the date these tests were performed, the contracted values of energy providing

and natural gas, described in entries 1 and 2 would be difficult to insert as constraints;

As for item 7, the current insertion of OR on the tool does not allow such a definition. It is defined

as a constant percentage of the demand for each hour. Therefore this constraint was also not

inserted in the simulations, and they were made with OR = 0%.

The storage algorithm was not tested for Madeira, since some issues with the storage algorithm were

identified. This means that the modelled system did not contain a PHES entry. For validation of the

case study, this shouldn’t pose a problem, as the EEM data shows that the PHES unit was only

charged shortly throughout the year of 2015 (as shown in Figure 9, in Section 5.2.2). Improvements on

the storage algorithm are discussed in Section 7.3.

The value of 𝛽 was not changed during the simulations (it was kept at 100%), for two reasons:

Decreasing 𝛽 would result in the curtailed wind and solar energy being stored in the ESS during

the simulations, if there was a storage unit in the modelled system. However, the storage

algorithm was not being used, so there was no storage unit in the modelled system;

The priority of renewable energy sources in the Madeira results in a curtailment of wind energy in

days with high wind speed. However, decreasing 𝛽 would result in a curtailment of both solar and

wind energy indiscriminately. Therefore no curtailment was applied to prevent distortion of the

results obtained.

Page 44: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

32

5.3.2 Data treatment & Assumptions

There were 4 hydro plants whose technical data was not available (the underlined entries in Appendix

A). Nevertheless, from the hourly dispatch data for 2016 of all 9 of the public hydro plants existent in

Madeira, it was possible to estimate their maximum power, considering their maximum registered

dispatched power during 2016. However, in the EEM data, there was no record of the Fajã Padres

plant’s energy production during 2016, making it impossible to estimate its maximum power by this

method.

Given that the time step for the simulations is one hour and the ramp up rates indicated resulted in

ramp up times much smaller than 1 hour, all ramp up/down rates were inserted in the toolbox as

infinite.

The fuel consumption curves of the thermal generators were assumed to be linear and obtained from

yearly average consumption values provided by EEM. A linear interpolation between the provided

values was performed using Microsoft Excel to obtain the consumption curves. Since the fuel

consumption curves of the generators was obtained using averaged fuel consumption values

provided, there is an error associated to them. In Section 6.1.3 the errors concerning fuel consumption

of the fuel oil generators are analyzed.

It is necessary to clarify some ambiguity in the provided data regarding the terms fuel oil and diesel.

Since the only generator using mostly diesel is the 12 MW turbine and that the dispatch data shows a

rare usage of that turbine over the years of 2016 and 2015, it was clear that the term “Diesel” in the

monthly shares data provided referred to both the fuel oil and diesel generators, and the data under

that label was renamed to fuel oil in this paper to ease comparison and discussion of values.

5.3.3 Modelling parameters

5.3.3.1 Fuel consumption curves

The values used in the fuel consumption curves inserted in the toolbox (as described in Figure 4 and

discussed in Section 2.3.2) are presented in Table 8.

Table 8: Thermal generators’ consumption curves parameters

Name/Acronym Max. Unit Power [MW] N.L.C. [FU/h] I.H.R. [FU/kWh]

Central Térmica Caniçal

(CTC-AIE)

12 268,56 0,5854

11,2 233,94 0,5463

Central Térmica Vitória

(CTV-II)

8,5 134,74 0,5528

9,4 164,79 0,7642

Diesel Turbine 12 298,39 0,2168

Page 45: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

33

Name/Acronym Max. Unit Power [MW] N.L.C. [FU/h] I.H.R. [FU/kWh]

Central Térmica Vitória

(CTV-III)

15 487,8 0,8506

3,6 84,29 0,2041

5.3.3.2 Emission factors & costs

The CO2eq emissions were assumed to be dependent only on the fuel type. The emissions factors for

each of the three fuel types present in the Madeira system (diesel, natural gas and fuel oil) were

obtained from [29, 30], and fuel oil density was assumed to be 900 kg/L, 30 kg/L lower than the value

for heavy fuel oils consulted at [31]. The emissions values used are registered in Table 9.

In the data provided, the standard units for diesel, fuel oil and natural gas were, respectively, liters (L),

kilograms (kg) and cubic meters (m3). The annually averaged fuel costs for the case of Madeira were

also provided by EEM and were also defined in function of each fuel’s unit of consumption, as it can

be seen in Table 9.

Table 9: CO2eq emissions and cost by fuel type

Fuel type Diesel Fuel oil Natural gas

CO2eq emissions [Kg CO2eq/ FU] 2,68 3,31 1,88

Cost [€ / FU]

0,511 0,233 0,399

In the EEM data it’s seen that all generators have an associated consumption of diesel, most likely

used as fuel during the warming up phase of the generator. The toolbox only calculates fuel

consumption costs for one type of fuel for each generator; therefore the main type consumed for each

generator was selected. To compensate for this, a startup cost of 50 € was defined for all generators

to simulate the cost of the fuel spent during the warming up process.

5.3.3.3 Renewable resources’ availability

The availability of hydro, solar and wind resources was defined as being equal to the power

dispatched in those days by the corresponding plants, like renewable dispatched generators. Since

the data provided by EEM contains all the necessary values for such a definition, this was shown to be

the easiest way to perform the validation for this case study. This means that, in the simulations, due

to the costs of all renewables being defined as null automatically by the model, all the power inserted

in this stage will be automatically dispatched first, along with the waste incineration plant running at

maximum power.

Page 46: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

34

Taking into account the data provided by EEM and the renewable priority given in Section 5.2.3, it is

seen that for some days there is a curtailment of wind energy. Modifying the percentage of intermittent

renewable energy allowed in the system (one of the inputs of the model) would allow some curtailment

of solar and wind energy. However, since the only way to control the priority of the curtailment would

be to attribute a fictitious cost to one of the entries, the curtailment embedded in the tool will act on

both solar and wind.

Page 47: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

35

6 Results and discussion

6.1 Validation of case study

To validate the tool, the model was run for 4 days (February 2nd

, May 10th, August 20

th and October

16th) of 2016. These days were chosen at random, ensuring there was one in each season to try to

account for seasonal variation, whilst not accounting for weekly variation (differences between working

and resting days). Over the next sections, the results of the simulations for each day will be analyzed

and compared with the data depicting the real operation of the Madeira energy system. The simulation

results that will be compared with the real data are, in their respective order:

Energy production shares for each technology type;

Load and dispatch of each plant;

Emissions, costs and fuel consumption of thermal generators;

6.1.1 Production shares

In this section, the energy production shares percentage by technology from the simulations will be

compared with the ones from the EEM data, for each of the 4 selected days.

In Figure 10 the comparison between the real and simulated daily shares is presented, for 2 of the 4

selected days. Appendix C contains the remaining production shares graphs.

Before proceeding to the dispatch analysis, there are some conclusions that can be drawn by looking

at the energy shares. As mentioned before, the definition of the renewables availability ensured that

the shares for the hydro and solar were automatically verified, since the entirety of the available hydro

and solar power is always dispatched. For these technologies, the difference in shares is always

below or equal to 1%. In the case of wind, since there is no curtailment, the full wind power available is

dispatched and the error is always equal to the curtailed wind share. In the case of waste incineration,

the model always runs the plant at full capacity for the full day resulting in shares very close to the real

ones (within a 1% error that will be explained in Section 6.1.2, when analyzing the dispatch).

Page 48: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

36

Figure 10: Comparison between real and simulated production shares

However, the primary goal of these simulations was to check how the model would handle the thermal

generators. The noticeable difference in terms of production shares concerns natural gas usage. It is

seen that all the energy produced using natural gas in the real data was shifted to fuel oil generators in

the simulations’ results.

Given that the fuel consumption curves were extrapolated from real average consumption data of the

generators, a low error is assumed to be associated with their estimation (without the real fuel

consumption curves this error cannot be quantified). This leads to the conclusion that, the gas

supplying contract mentioned in Section 5.2.2 (item 5) appears to be the main cause of the difference

between the real and simulated shares, since that the simulated dispatch is based solely on

minimizing costs related to fuel consumption, resulting in a preference of fuel oil generators. This

difference once again points at the necessity of a priority definition in the toolbox for thermal

generators, other than the fuel consumption curves, in order to more accurately portray real situations.

0

10

20

30

40

50

60

Fuel oil Diesel Naturalgas

Hydro Wind Solar Waste

Pe

rcen

tage

Production Shares 10th May 2016

EEM Data Simulation

0102030405060708090

100

Fuel oil Diesel Naturalgas

Hydro Wind Solar Waste

Pe

rce

nta

ge

Production Shares 20th Aug. 2016

EEM Data Simulation

Page 49: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

37

6.1.2 Load and dispatch analysis

In this section a more in-depth analysis will be performed, looking at the load diagrams to assess

dispatch differences between the real and simulated data, concerning thermal plants.

Figure 11 and Figure 12 show the comparisons of the load diagrams obtained from the real and

simulated data, with the thermal generators divided by plants, for 2 of the 4 selected days. Appendix C

contains the rest of the load diagrams, for the remainder of the simulated days.

Figure 11: Daily load diagrams for the EEM and simulated data, 10th

May

Table 10 contains the errors between the total dispatched power and dispatch hours for each power

plant. Since the diesel turbine had a null dispatch in both the EEM and simulations data for the

selected days, it was omitted from the table. In Appendix D, a table can be found containing the full

data used in the comparison.

0

20

40

60

80

100

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

Dis

pat

ched

Po

wer

[M

W]

Hour

Load Diagram 10th May 2016 (EEM Data) Waste

Solar

Wind

Hydro

CTV-III

CTV-II

CTC-AIE

0

20

40

60

80

100

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

Dis

pat

ched

Po

wer

[M

W]

Hour

Sim. Load Diagram 10th May 2016 Waste

Solar

Wind

Hydro

CTV-III

CTV-II

CTC-AIE

Page 50: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

38

Figure 12: Daily load diagrams for the EEM and simulated data, 20th

Aug.

For the renewable entries, not much can be said apart from what was already discussed in the

previous section. The error on the wind portion is higher on days where the curtailed wind is higher as

the model dispatches the full available wind power without curtailment, and the errors on hydro and

solar entries can be attributed to round up errors. However the waste incineration plant presents some

noteworthy differences. The maximum power of the plant introduced in the modelled system is 4,8

MW, as indicated in the data provided. Since the costs for the waste plant are modelled as null, the

tool always puts the MSR plant working at full capacity for the entirety of the simulated time, working

as a base generator, as expected. The real data also shows an almost constant dispatch power during

the entirety of the chosen days, with values, however, sometimes significantly higher from 4,8 MW. To

explain this difference in the dispatched power, there are two different possible explanations:

The plant was run at a higher power than the maximum recommended power by the data

provided;

Introduction of new technology or improvement of the current one in the plant to increase the

dispatch power, not described in the provided data.

0

20

40

60

80

100

120

140

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

Dis

pat

ched

Po

wer

[M

W]

Hour

Load Diagram Aug. 20th 2016 (EEM Data) Waste

Solar

Wind

Hydro

CTV-III

CTV-II

CTC-AIE

0

20

40

60

80

100

120

140

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

Dis

pat

ched

Po

wer

[M

W]

Hour

Sim. Load Diagram Aug 20th 2016 Waste

Solar

Wind

Hydro

CTV-III

CTV-II

CTC-AIE

Page 51: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

39

Table 10: Errors between real and simulated dispatched power and hours

Technology / Plant

Fuel oil Natural

gas Hydro Wind Solar Waste

CTC-AIE

CTV-II Total CTV-III

Err

or

[%]

May 1

0th Dispatched

power 100 105 11 100 3 7 1 6

Dispatch hours

100 0 - 100 0 0 0 0

Aug

ust 20

th

Dispatched power

59 106 32 100 6 2 7 12

Dispatch hours

33 0 - 100 0 0 0 0

Octo

ber

16

th

Dispatched power

100 45 11 100 0 77 2 17

Dispatch hours

100 0 - 100 0 0 0 0

Febru

ary

2nd

Dispatched power

76 121 43 100 0 19 0 19

Dispatch hours

42 0 - 100 0 0 0 0

Concerning the fueloil generators, it is visible the preference of the CTV-II plant generators by the

model, followed by the CTC-AIE generators, that are only used when the CTV-II ones are not enough

to satisfy the demand. In the selected days the demand requirements never reached values high

enough to justify the usage of the natural gas or diesel generators in the simulations. This priority

based only on the fuel consumption results in a violation of the constraint regarding the minimum

online groups for the CTC-AIE plant and would difficult fulfilling its energy production contract (Section

5.2.3, items 1 and 4).

Looking at the difference in the CTV-III plant, it’s possible that using the natural gas provided by the

contract (Section 5.2.3, item 5) might also provide some economic benefits that could result in lower

total costs when compared to just running the generators with the lowest fuel consumption costs.

Other hypothesis concerns ecological benefits with using natural gas, which are also not taken into

consideration by the model when selecting the dispatching generators.

Page 52: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

40

6.1.3 Emissions, costs and fuel consumption

In this chapter the emissions, fuel consumption and costs of the thermal generators will be examined.

Given that the EEM data only contains monthly and yearly values (monthly emissions by technology

and yearly fuel consumption and costs) and the toolbox currently only performs daily simulations, the

comparison will have to be performed taking into account daily average values.

Although there are values of CO2eq emissions for the waste incineration plant in the EEM data, it was

difficult to define an average emission value for a fuel as heterogeneous as waste. This led to its

emissions’ value being left as null in the model. Thus, only emissions from thermal generators will be

discussed.

To accurately compare the total values of emissions, costs and fuel consumption, the differences in

the dispatched power registered in Table 10 must be taken into consideration, therefore the values of

the ratios between the total emissions, costs and consumed fuel and the dispatched power was

included, referred to as “Specific” values, were included in the comparison. Due to the nature of the

data, the specific values of fuel consumption and costs resulted in a constant value for all the

considered days.

Figure 13 presents the comparison between the real and simulated values of emissions, fuel

consumption and costs (and their specific values). Since all the simulations displayed null natural gas

consumption, only fuel oil will be analyzed. Appendix D contains a more detailed table with all the data

used for this comparison, including the values of the errors highlighted to ease their consult. The

specific values of costs and fuel emission resulted in almost constant values, somewhat below the real

average values. For the case of emissions, there is an obvious disparity between the real and

simulated values in May 10th and Aug. 20

th, while for the other days they matched with a negligible

error. Using the specific values as a basis for the comparison the resulting errors can be classified as

acceptable, considering the average nature of the data used for the comparison and calculation of the

consumption curves.

Page 53: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

41

Figure 13: Comparison of real and simulated values of consumption, costs and emissions

0

50

100

150

200

250

300

350

400

2016Dailyavg.

May10th

Aug.20th

Oct.16th

Feb.2nd

Ton

s o

f Fu

el o

il Fuel Consumption

0

0,05

0,1

0,15

0,2

0,25

2016Dailyavg.

May10th

Aug.20th

Oct.16th

Feb.2nd

kg o

f Fu

el o

il /

kWh

Specific Fuel Consumption

0

10

20

30

40

50

60

70

80

90

2016Dailyavg.

May10th

Aug.20th

Oct.16th

Feb.2nd

k€

Costs

0

0,01

0,02

0,03

0,04

0,05

0,06

2016Dailyavg.

May10th

Aug.20th

Oct.16th

Feb.2nd

€/

kWh

Specific Costs

0

200

400

600

800

1000

1200

1400

May 10th Aug. 20th Oct. 16th Feb. 2nd

Ton

s C

O2

eq

Emissions

2016 Daily avg. Simulation

0

0,1

0,2

0,3

0,4

0,5

0,6

0,7

0,8

0,9

May 10th Aug. 20th Oct. 16th Feb. 2nd

kg C

O2

eq /

kW

h

Specific Emissions

2016 Daily avg. Simulation

Page 54: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

42

6.2 Demand response

6.2.1 Data treatment & Assumptions

Two tests were performed on the “Demand Response” function:

1. A first test was performed for 4 days for the Madeira and 10 for the Terceira energy systems

(Terceira’s energy system characteristics are described in [7]). The “Flexible Demand” was

defined in the following way:

For the Madeira days, every hourly demand requirement that exceeded 105 MWh was defined

as “Flexible”;

In the Terceira days, the same logic was applied, with the limit being 28 MWh.

2. The second test was performed for the Madeira Island, with the same 4 days used in the

validation of the ED Model. For each day, 4 simulations were performed. In each of them the

“Flexible Demand” was defined using daily usage profiles corresponding to the types of household

appliances present in the Madeira Island (the profiles under the “Appliances” type in Table 3). The

normalized daily profiles of each appliance were multiplied by the average energy consumed per

cycle (available on Table 4) and the resulting vector was defined as the “Flexible Demand”. For

the 4th simulation, the “Flexible Demand” corresponded to the sum of the 3 appliances’ “Flexible

Demand” calculated previously.

From the definition of the “Flexible Demand” applied in the first test, it results that the peak demand

requirements for each day were defined as flexible by the algorithm. In Figure 14, examples of

demand profiles for the Terceira and Madeira Island (1 day of each) are presented, where the peaks

correspondent to the definition used, the flexible loads (“Flexible Demand”), are highlighted.

Page 55: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

43

Figure 14: Examples of Madeira and Terceira daily demand profiles (flexible loads highlighted)

Figure 15 presents the profiles for each of the 2 days exemplified in Figure 14, resulting from running

the DR algorithm on them. In both cases, the shifted load is highlighted, and displacement to the

earlier hours of the day is verified. There is also a slight diminution of the peaks verified in the base

profiles.

0

20

40

60

80

100

120

140

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

De

man

d r

equ

irem

en

t [M

Wh

]

Hour

Madeira Island demand profile - day 1

FlexibleLoad

0

5

10

15

20

25

30

35

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

De

man

d r

eq

uir

em

en

t [M

Wh

]

Hour

Terceira Island demand profile - day 1

FlexibleLoad

Page 56: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

44

Figure 15: Obtained modified demand profiles by the DR algorithm

In Figure 16, the evolution of the daily specific costs for these days is presented. These were obtained

by running the simulation for the Base Profiles for each of the exemplified days. They are displayed to

provide a better understanding of the algorithm’s preference when shifting the loads. The peak in

specific costs in the Madeira Island seen around 11 o’clock explains the decrease in demand

requirements in the DR profile at that hour: the algorithm sought to shift as most of that load as

possible to hours with lower specific costs. A similar situation is observed for the Terceira Island

around 16 o’clock.

0

20

40

60

80

100

120

140

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

De

man

d r

equ

irem

en

t [M

Wh

]

Hour

Madeira Island DR Profile - day 1

ShiftedLoad

0

5

10

15

20

25

30

35

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

De

man

d r

eq

uir

em

en

t [M

Wh

]

Hour

Terceira Island DR Profile - day 1

ShiftedLoad

Page 57: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

45

Figure 16: Hourly specific costs for the exemplified days

6.2.2 Algorithm tests results

In Table 11 the total production costs for the first test to the Demand Response algorithm are

presented. The changes (in percentage) between the simulations using the base demand profile and

the ones using the DR profiles are also presented and highlighted. A positive value represents an

increase in the costs and a negative one a decrease.

Table 11: Results of the DR algorithm test considering peaks shift

Day Total Production Costs [€]

Change [%] Base profile DR algorithm profile

Mad

eira

1 84333 84700 + 0,4

2 70421 69239 - 1,7

3 43617 43184 - 1

4 40202 39850 - 0,9

Terc

eira

1 63907 63799 - 0,2

2 63257 63150 - 0,2

3 56578 56178 - 0,7

4 55656 55129 - 0,9

5 31261 31267 0

6 40565 39880 - 1,7

7 41962 40128 - 4,4

8 37817 37899 + 0,2

9 57700 57300 - 0,7

10 46138 46138 0

0

2

4

6

8

10

12

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

Spec

ific

Co

sts

X 1

00

[€

/kW

h]

Hour

Hourly specific costs

Terceira

Madeira

Page 58: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

46

Figure 17 shows the costs obtained for the base and modified profiles in the second test, according to

which appliances were defined as flexible and the changes registered (in percentage), above each

respective day’s costs. Appendix F contains a table with all the values used in this comparison.

Figure 17: Results of the second DR algorithm test

The results for the peak shift test display both the functionality and promise of the algorithm. It is seen

that, for most of the days tested, the costs obtained from using the DR profile in the simulation

decreased, although not very significantly in percentage (maximum decrease registered was 4,4%).

For some cases, however, the DR profile resulted in either no change or even an increase to the

production costs, for the reasons discussed in Section 4.1

On the other hand, the test using the appliances profiles for the Madeira Island is a good example of a

possible application of the algorithm. The idea was to assess the possible costs reductions obtained

from shifting household appliances usage to hours where they would provide some production costs

reduction.

On the cases that resulted in a decrease of the production costs, that decrease was around 1%. It

should be noticed that the errors are being calculated in percentage values; a 1% decrease could still

represent significant savings for a system with high production costs. Although it is not a concern of

the DR algorithm, there are costs associated with implementing the DR measures necessary to shift

the considered household appliances to the preferable hour indicated by the algorithm. Therefore, a

balance would have to be made between these costs and the expected benefits of applying these

measures to determine whether or not it would be economically advantageous applying the DR

measures (at least from the grid’s operation and management point of view, there could be benefits to

the end-user, as already mentioned). The amount of tests conducted is insufficient to draw some

relevant conclusions regarding this aspect.

0

10

20

30

40

50

60

70

80

90

100

Base Profile Clothes’ Washer Clothes’ Drier Dishwasher All appliances

Pro

du

ctio

n C

ost

s [k€

]

Costs Variation

Oct. 16th

May 10th

Aug. 20th

Feb. 2nd

0

+3

-1

-1

-2 0

-1

-1 -1

-1

0 +1

-1

-1

-1 0

Page 59: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

47

Another concern raised by these results is related to their non-linearity. It would be expected that the

costs from the cases where all the appliances’ types are considered as flexible would be lower than

the others individually. That was not the verified case for some of the selected days, as it can be seen.

Costs for all the appliances inserted as flexible resulted higher in some of the days than when only one

type was defined as flexible. This identifies a need for more tests on the DR algorithm and its

integration with the ED model to be conducted. These should also be further developed, before the

“Demand Response” function can be used in a satisfactory way within the toolbox.

Page 60: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

48

7 Conclusions

7.1 Final remarks

At the end of the period defined for the thesis, performing an analysis goals achieved (while comparing

them with the ones discussed in Section 1.2) should be useful, in order to assess the degree of

completion of each one. By doing so, future improvement opportunities for further developments on

the toolbox can be identified. During the course of this work:

The ED model was generalized and a GUI was created, enabling the toolbox to accept and run

simulations for generic energy systems defined by the user. This eliminates the need for the

previous learning process required to be able to understand the algorithm well enough to modify it

for the intended purposes and simplifies the overall usage of the toolbox;

Pre-defined demand scenarios were introduced, permitting easy and quick modifications of the

demand requirements profiles;

A “Demand Response” function was developed and added to the toolbox, to allow modelling of

potential DR measures in energy systems;

Calculation of economical parameters was inserted to enhance the toolbox’s long term simulation

capabilities;

The possibility of using capacity factors for some renewable technologies was added, enabling

their direct insertion without the need to convert them to direct power available;

A user manual was written, providing information on how to use the toolbox.

7.2 Suggestions for future work

Some development opportunities for the toolbox were identified during the realization of this work.

These are listed and may be more easily understood in the manual [24] (Chapter 8), as it conveys

more in-depth technical data regarding the toolbox and its usage. The main suggestions for improving

the toolbox and the ED model are:

Reinserting removed parameters in the ED Model: Due to the work performed on the toolbox by its

several developers, some of the variables that were being used in the model in the first version

were subsequently removed in following versions. This is probably due to the fact that for each

project the code was merely adapted to the case at hand, so unnecessary variables were

removed in order to avoid interference and extra amount of work required to adapt them.

Page 61: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

49

However, some of the removed variables (listed explicitly in the manual [24], Chapter 8.2.2)

concerned technical parameters, mainly of thermal generators, that should be inserted in the

simulations, to increase modelling accuracy. Not reinserting them would diminish the advantages

this toolbox has over the other programs used in modelling microgrids, and severely harm the

accuracy of the results obtained, when comparing them with real cases;

Improving the computational speed of the toolbox: As expected, the conversion of the code by

several researchers has caused it to become confuse, with unnecessary chunks of code and

variables still present. Although the number of entries modelled has shown to be the main cause

of an increase in the simulation time, performing alterations in the code with the intent of

increasing its computational speed would be a good improvement to the toolbox;

Inserting alternative dispatch priorities: The current priority listing of the entries modelled is based

solely on their cost. This present some issues, especially when attempting to define priority

between renewable entries (that have a null modelled cost) without inserting fictitious costs that

alter the final results. As is the case with the Madeira energy system, most energy systems have

some form of priority definitions regarding renewable entries as well. Therefore, adding an user

imputed priority definition would benefit the modelling accuracy and scope of energy systems that

can be modelled by the toolbox;

Developing and adding forecasting functions for wind and solar renewable energy production. This

would enable the toolbox to deal with cases when the available databases only contain values of

wind speed or solar irradiation instead of capacity factors, improving its modelling capabilities;

Developing the Long Term Calculations function (addition of more economical indicators, for

example), and integrating its results with the short term calculated values to improve its results.

The calculations could also be customized for temporal horizons lower than 1 year;

Further development of the “Demand Response” function. The capacity to commit previously

uncommitted renewable generators to decrease productions costs, and the addition of a

convergence criteria to allow more iterations are the main suggestions in this area;

Continuing the development of the storage algorithm: Storage entries were only added to the

toolbox in its later versions so the number of types of storage entries that can be modelled by the

toolbox is low. Adding more ESS types to the toolbox would improve the scope of energy systems

that can be modelled. The storage algorithm itself also requires more tests and further integration

with the ED Model in order to improve its efficiency regarding the results obtained. Section 7.3

contains some notes regarding the problems noticed in the results obtained with the previous

storage algorithm, and the improvements done in the scope of this thesis.

Page 62: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

50

7.3 Notes on the storage algorithm

One of the suggestions provided by Guzzi at the end of his work [7] was the improvement of the

storage algorithm developed by him, in order to increase the scope of Energy Storage Systems (ESS)

that can be modelled using the toolbox. Although that was originally one of the objectives of this

thesis, it was later abandoned due to the fact that other researchers at IN+ demonstrated interest in

working in this area. It was also intended to use the algorithm for the case study of Madeira Island,

whose energy system contained one PHES unit, however, errors discovered in the algorithm when

preliminary tests were conducted forced the abandonment of that objective as well. In the following

paragraphs, the problems discovered regarding the storage algorithm are discussed in more detail, to

provide some insight on the corrections to be performed.

The main problem with the storage algorithm appears to be the charging of the storage units not

functioning properly. While they dispatch energy to compensate for energy curtailed from wind and

solar plants, therefore avoiding having to increase thermal production, charging the storage units in

hours of excess renewable production doesn’t seem to be happening as intended. Changes to the

algorithm are currently being designed and tested by a researcher at IN+, and (based on preliminary

results) they seem to correct this particular issue. These changes will be attempted to be included in

the version of the toolbox provided after this thesis is completed. Since this will occur outside the time

interval defined for the thesis, no information can be provided yet as to results obtained with the

improved storage algorithm.

Another problem verified in the storage algorithm is that it understands every storage unit as a

separate entity from the generation entries. For the case of PHES systems this causes an error when

looking at the dispatched energy, as there is no way to distinguish dispatched energy from the hydro

power plant from energy dispatched by the PHES system. In future developments of the storage

algorithm, integration between storage and generation entries should be inserted in the toolbox.

7.4 Notes on long term calculations

Running simulations with a high number of time steps would be required to provide feasible values of

the parameters calculated (since they concern long term planning). However a great amount of time

was needed for doing so (attempts to run simulations for 1 year worth of data resulted in the model

computing for over 20 hours). Chronologically in the development of this work, the long term

calculations were the last function to be developed and inserted in the toolbox, out of the ones

mentioned, which made it difficult to run a large number of simulations before the delivery date. Taking

into account as well the difficulty in finding valid typical values of the inputs for certain technologies, it

was not possible to obtain and present in this paper acceptable results for this function.

Page 63: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

51

References

[1] "REN21, 2016, "Renewables 2016 - Global Status Report", Paris, Ren21 Secretariat," Available:

http://www.ren21.net/wp-content/uploads/2016/06/GSR_2016_Full_Report.pdf. [Accessed 3

March 2017].

[2] International Renewable Energy Agency (IRENA), "REMap - Roadmap for a Renewable Energy

Future," 2016. Available:

http://www.irena.org/DocumentDownloads/Publications/IRENA_REmap_2016_edition_report.

pdf. [Accessed 2 March 2017].

[3] U. Lisboa - IST, "Campus Sustentável - Instituto Superior Técnico," 2013. Online:

http://sustentavel.unidades.tecnico.ulisboa.pt/. [Accessed 3 September 2017].

[4] M. Brooks and N. Moore, "Open Access Energy - Blueprint," Waterloo Global Science Initiative

(WGSI), March 2017.

[5] D. Connolly, H. Lund, B. Mathiesen and M. Leahy, "A review of computer tools for analysing the

integration of renewable energy," Applied Energy, vol. 87, p. 1059–1082, 2010.

[6] D. Neves, A. Pina and C. A. Silva, "Demand response modelling: A comparison between tools,"

Applied Energy , vol. 146, pp. 288-297, 2015.

[7] F. Guzzi, "Development of a modelling and planning tool for renewable microgrids: The case

study of Terceira Island," Thesis to obtain the Master of Science Degree in Energy Engineering &

Management, U.Lisboa - IST, 2016.

[8] M. Abeysekera, "Development of an energy system operation planning tool considering

transmission system effects and operational constraints," Universitat Polytècnica de Catalunya,

Barcelona, 2012.

[9] D. W. Gao, Energy Storage for Sustainable Microgrid, University of Denver, U.S.A.: Academic

Press, Elsevier, 2015.

[10] Z. Ye, R. Walling, N. Miller, P. Du and K. Nelson, "Facility Microgrids," Subcontract Report

NREL/SR-560-38019, Golden, CO , National Renewable Energy Laboratory, 2005.

[11] "Building Microgrids: Microgrid definitions," Microgrids at Berkeley Lab, Online:

https://building-microgrid.lbl.gov/microgrid-definitions. [Accessed 15 August 2017].

[12] European Technology Platform for Smart Grids, "Reference Publications," April 2006. Available:

https://www.etip-snet.eu/publications/reference-publications/. [Accessed 5 July 2017].

Page 64: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

52

[13] M. Quashie, F. Bouffard and G. Joós, "Business cases for isolated and grid connected microgrids:

Methodology and applications," Applied Energy, vol. 205, pp. 105-115, 2017, ISSN 0306-2619.

[14] C. Gamarra, J. M. Guerreiro and E. Montero, "A knowledge discovery in databases approach for

industrial microgrid planning," Renewable and Sustainable Energy Reviews, vol. 60, pp. 615-630,

2016, ISSN 1364-0321.

[15] N. van Beeck, "Classification of Energy Models," Tilburg University & Eindhoven University of

Technology: Communicated by dr. ing. W. van Groenendaal, May 1999.

[16] G. Mendes, C. Ioakimidis and P. Ferrão, "On the planning and analysis of Integrated Community

Energy Systems: A review," Renewable and Sustainable Energy Reviews, vol. 15, p. 4836–4854,

2011.

[17] Department of Development and Planning Aalborg Un., "EnergyPLAN - Advanced energy system

analysis computer model," Online: http://www.energyplan.eu/. [Accessed 15 September 2017].

[18] HOMER Energy LLC, "HOMER Energy," Online: http://www.homerenergy.com/. [Accessed 19

September 2017].

[19] HOMER Energy LLC, "HOMER - analysis of micropower energy systems," 2010.

[20] Berkeley Lab - U.S. Department of Energy, "Distributed Energy Resources Customer Adoption

Model (DER-CAM)," Online: https://building-microgrid.lbl.gov/projects/der-cam. [Accessed 18

11 2017].

[21] D. Kirschen and G. Strbac, Fundamentals of Power System Economics, 1st ed. WILEY, 2004.

[22] M. Albadi and E.-S. Ehab, "A summary of demand response in electricity markets," Electric

Power Systems Research, vol. 78, pp. 1989-1996, 2008.

[23] H. Sui, Y. Sun and W. J. Lee, "A demand side management model based on advanced metering

infrastructure," 2011 4th International Conference on Electric Utility Deregulation and

Restructuring and Power Technologies (DRPT), Weihai, Shandong, pp. 1586-1589, 2011.

[24] A. Rita, IN+ and U. Lisboa - IST, "Manual IN+ energy modeling and microgrid operation toolbox,"

September 2017. Available: https://fenix.tecnico.ulisboa.pt/homepage/ist175836/manual-in43-

energy-modeling-and-microgrid-operation-toolbox.

[25] M. Martins, "Evaluation of energy and environmental impacts of electric vehicles in different

countries," Thesis to obtain the Master of Science Degree in Mechanical Engineering, U. Lisboa -

IST, Lisbon, 2015.

[26] S. Pfenninger and I. Staffell, "Renewables Ninja," Online: https://www.renewables.ninja/.

[Accessed 5 June 2017].

Page 65: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

53

[27] "Ilha da Madeira," Wikipedia, 1 August 2017. Online:

https://pt.wikipedia.org/wiki/Ilha_da_Madeira. [Accessed 17 August 2017].

[28] EEM (Empresa de Eletricidade da Madeira, S.A.), "Caracterização da Rede de Transporte e

Distribuição em AT e MT 2015," D.E.P. (Direcção de Estudos e Planeamento), March 2016.

[29] U.S. Energy Information Administration, "Carbon Dioxide Emissions Coefficients," 2 February

2016. Online: www.eia.gov/environment/emissions/co2_vol_mass.php. [Accessed 30 June

2017].

[30] New Zealand's Ministry for the Environment , "Summary of Emissions Factors for the Guidance

for Voluntary Corporate Greenhouse Gas Reporting - 2015," April 2015. Online:

www.mfe.gov.nz. [Accessed 30 June 2017].

[31] "Engineering Toolbox," Online: http://www.engineeringtoolbox.com/. [Accessed 30 June 2017].

Page 66: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

54

Appendices

Appendix A

Figure A.1: Daily profiles for electric vehicles charging

Figure A.2: Daily profiles for industrial units

0

2

4

6

8

10

12

14

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

No

rmal

ized

Po

wer

[%

]

Hour

EV's charging normalized daily profiles

Overnight

Evening

Overwork

Mixed

0

1

2

3

4

5

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

No

rmal

ized

po

wer

[%

]

Hour

Industrial units daily normalized profiles

Largeindustry

Smallindustry

Page 67: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

55

Figure A.3: Daily profiles for residential units

Figure A.4: Daily profiles for public buildings

0

1

2

3

4

5

6

7

8

9

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

No

rmal

ized

po

wer

[%

]

Hour

Residential daily normalized profiles

Workingcouple

Workingcouple w/youngkids

Workingcouple w/old kids

Average

0

1

2

3

4

5

6

7

8

9

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

No

rmal

ized

po

wer

[%

]

Hour

Public buildings daily normalized profiles

University

Datacenter

Page 68: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

56

Figure A.5: Daily profiles for service buildings

Figure A.6: Daily profiles of appliances for Madeira Island

0

1

2

3

4

5

6

7

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

No

rmal

ized

po

wer

[%

]

Hour

Service buildings daily normalized profiles

Average

Smallhotel

Largehotel

0

1

2

3

4

5

6

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

No

rmal

ized

po

we

r [%

]

Hour

Madeira appliances normalized daily profiles

Clothes'Drier

Clothes'Washer

Dishwashingmachine

Page 69: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

57

Appendix B

Table B.1: Madeira’s energy production and storage system modelled by the toolbox

Thermal

Name/Acronym No.

Units Fuel

Max. Unit Power [MW]

Min. Unit Power [MW]

Ramp [MW/s]

Min Up Time

[h]

Min. Group Power [MW]

Central Térmica Caniçal

(CTC-AIE)

3 Fuel oil 12 7 0,35 1

6,5

3 Fuel oil 11,2 7 0,35 1

Central Térmica Vitória

(CTV-II)

4 Fuel oil 8,5 7 0,35 1

7,5

5 Fuel oil 9,4 7 0,35 1

Turbine 1 Diesel 12 - 0,35 1 -

Central Térmica Vitória

(CTV-III)

3 Natural gas 15 8 0,5 1

8

1 Natural gas 3,6 0 0,25 1

Waste Incineration

Name/Acronym No. Units Max. Unit Power [MW]

Resíduos Meia Serra (MSR) 1 4,8

Hydro

Name No. Units Max. Unit

Power [MW] Min. Unit Power

[MW] Ramp time [s]

Min Up Time [h]

Socorridos 3 8 2 50 0,5

Rib. da Janela 2 1,5 0,4 30 0,5

C. Inverno 1 7,1 1,8 45 0,5

Serra de Água 2 2,4 0,6 30 0,5

Fajã da Nogueira 2 1,2 0,3 30 0,5

Calheta - 2,1 - - -

Min

i H

ydro

Sta. Quiteria - 0,9 - - -

Terça - 0,7 - - -

Fajã Padres - - - - -

Page 70: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

58

Wind

Name Location No. Units (Groups)

Total Power [MW]

Installed Attributed

ENERGÓLICA Caniçal 900 (6x150) 0,9 0,9

ENERGÓLICA Paúl da Serra 3000 3,0 3,0

ENEREEM Actual Paúl da Serra 3300 (5x660) 3,3 3,3

WindMad (Q. do Lord) Paúl da Serra 2550 (3x850) 2,6 1,7

ENEREEM Pedras Paúl da Serra 10200 (12x850) 10,2 10,2

ENEREEM Loiral I Paúl da Serra 5100 (6x850) 5,1 5,1

ENEREEM Loiral II Paúl da Serra 6000 (2x3000) 6,0 5,0

Preform Fonte do Juncal

Paúl da Serra 6000 (4x1500) 6,0 6,0

Perform Norte Paúl da Serra 6000 (4x1500) 6,0 6,0

Perform antigos Paúl da Serra 2640

(15x150+3x130) 2,06 2,1

Total - 45690 45,16 43,3

Solar Photovoltaic

Name Location No. PV Modules Total Power [MW]

Enersistems Caniçal 28800 6

Paul Solar Paúl da Serra 9504 2

PV Loiral Paúl da Serra 31392 7

Mini/Micro Production - - 3,8

Total - 69696 18,8

Storage (PHES)

Name No.

Units Max. Charge Power [MW]

Max. Discharge Power [MW]

Min. Discharge Power [MW]

Socorridos 2 7,4 - 24 - 6

Page 71: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

59

Appendix C

Figure C 1: Comparison between real and simulated production shares

0

10

20

30

40

50

60

Fuel oil Diesel Natural gas Hydro Wind Solar Waste

Pe

rcen

tage

Production Shares 16th Oct. 2016

EEM Data Simulation

0

10

20

30

40

50

60

70

80

90

Fuel oil Diesel Natural gas Hydro Wind Solar Waste

Pe

rce

nta

ge

Production Shares 2nd Feb. 2016

EEM Data Simulation

Page 72: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

60

Figure C 2: Daily load diagrams for the EEM and simulated data, 16th

Oct. & 2nd

Feb.

0

20

40

60

80

100

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

Dis

pat

che

d P

ow

er

[MW

]

Hour

Load Diagram 16th Oct. 2016 (EEM Data) Waste

Solar

Wind

Hydro

CTV-III

CTV-II

CTC-AIE

0

20

40

60

80

100

120

140

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

Dis

pat

ched

Po

wer

[M

W]

Hour

Sim. Load Diagram 16th October 2016 Waste

Solar

Wind

Hydro

CTV-III

CTV-II

CTC-AIE

0

50

100

150

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0Dis

pat

ched

Po

wer

[M

W]

Hour

Load Diagram Feb. 2nd 2016 (EEM Data) Waste

Solar

Wind

Hydro

CTV-III

CTV-II

CTC-AIE

0

20

40

60

80

100

120

140

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0

Dis

pat

ched

Po

wer

[M

W]

Hour

Sim. Load Diagram 2nd February 2016 Waste

Solar

Wind

Hydro

CTV-III

CTV-II

CTC-AIE

Page 73: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

61

Appendix D

Table D.1: Real and simulated dispatched power and hours

Technology / Plant

Fuel oil Natural

gas Hydro Wind Solar Waste

CTC-AIE

CTV-II Total CTV-III

May 1

0th

D. P

ow

er

[MW

]

EEM Data 468,4 565,4 1042,3 135,9 457,9 411,1 45,0 106,1

Sim. Data 0 1157,2 1157,2 0 442,1 440,9 44,6 112,9

Error [%] 100 105 11 100 3 7 1 6

D. H

ours

EEM Data 24 24 - 14 24 24 14 24

Sim. Data 0 24 - 0 24 24 14 24

Error [%] 100 0 - 100 0 0 0 0

Aug

ust 20

th

D. P

ow

er

[MW

]

EEM Data 717,0 878,1 1595,1 484,5 51,7 95,6 74 130,0

Sim. Data 296 1811,1 2107,0 0 48,6 93,6 68,9 113,9

Error [%] 59 106 32 100 6 2 7 12

D. H

ours

EEM Data 24 24 - 24 24 24 13 24

Sim. Data 16 24 - 0 24 24 13 24

Error [%] 33 0 - 100 0 0 0 0

Octo

ber

16

th

D. P

ow

er

[MW

]

EEM Data 460,3 734,9 1195,2 107,22 424,2 334,6 12,7 133,7

Sim. Data 0 1066,7 1066,7 0 421,9 591,3 12,5 114,6

Error [%] 100 0 - 100 0 0 0 0

D. H

ours

EEM Data 24 24 - 12 24 24 12 24

Sim. Data 0 24 - 0 24 24 12 24

Error [%] 100 0 - 100 0 0 0 0

Febru

ary

2nd

D. P

ow

er

[MW

]

EEM Data 496,4 756,4 1252,8 528,9 241,1 86,0 25,8 141,4

Sim. Data 117,8 1673,1 1791 0 241,5 102,2 25,8 115,2

Error [%] 76 121 43 100 0 19 0 19

D. H

ours

EEM Data 24 24 - 24 24 24 11 24

Sim. Data 14 24 - 0 24 24 11 24

Error [%] 42 0 - 100 0 0 0 0

Page 74: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

62

Appendix E

Table E.1: Comparison of real and simulated values of consumption, costs and emissions (full data)

Fuel Type Fuel oil

EE

M D

ata

2016

(daily

avg.)

Fuel Consumption [kg] 156627

Specific Fuel Consumption [kg / kWh] 0,21

Costs [€] 36485

Specific Costs [€ / kWh] 0,05

May 1

0th

Emissions [ton CO2eq]

EEM 2016 May daily avg. 701,4

Simulation 622,6

Error [%] 11

Specific Emissions [kg CO2eq

/ kWh]

EEM 2016 May daily avg. 0,81

Simulation 0,54

Error [%] 33

Fuel Consumption [FU]

Simulation 188103

Error [%] 20

Specific Fuel Consumption [FU / kWh]

Simulation 0,16

Error [%] 24

Costs [€]

Simulation 43617

Error [%] 20

Specific Costs [€ / kWh]

Simulation 0,04

Error [%] 20

Aug

ust 20

th

Emissions [ton CO2eq]

EEM 2016 Aug. daily avg. 936,9

Simulation 1197,6

Error [%] 28

Specific Emissions [kg CO2eq

/ kWh]

EEM 2016 Aug. daily avg. 0,80

Simulation 0,57

Error [%] 29

Fuel Consumption [FU]

Simulation 361819

Error [%] 131

Page 75: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

63

Specific Fuel Consumption [FU / kWh]

Simulation 0,17

Error [%] 19

Costs [€]

Simulation 84333

Error [%] 131

Specific Costs [€ / kWh]

Simulation 0,04

Error [%] 20

Octo

ber

16

th

Emissions [ton CO2eq]

EEM 2016 Oct. daily avg. 1131,7

Simulation 569

Error [%] 50

Specific Emissions [kg CO2eq

/ kWh]

EEM 2016 Oct. daily avg. 0,82

Simulation 0,53

Error [%] 35

Fuel Consumption [FU] Simulation 171895

Error [%] 10

Specific Fuel Consumption [FU / kWh]

Simulation 0,16

Error [%] 24

Costs [€]

Simulation 40202

Error [%] 10

Specific Costs [€ / kWh]

Simulation 0,04

Error [%] 20

Febru

ary

2nd

Emissions [ton CO2eq]

EEM 2016 Feb. daily avg. 735,7

Simulation 987,1

Error [%] 34

Specific Emissions [kg CO2eq

/ kWh]

EEM 2016 Feb. daily avg. 0,64

Simulation 0,55

Error [%] 14

Fuel Consumption [FU]

Simulation 298211

Error [%] 90

Page 76: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

64

Specific Fuel Consumption [FU / kWh]

Simulation 0,17

Error [%] 19

Costs [€]

Simulation 70421

Error [%] 93

Specific Costs [€ / kWh]

Simulation 0,04

Error [%] 20

Page 77: Development of an energy modeling and microgrid operation ......energy grids. However, the use of intermittent renewables (mainly solar and wind) as power sources brings about new

65

Appendix F

Table F.1: Results of the DR algorithm test using appliances profiles

Day May 10th Aug. 20th Oct. 16th Feb. 2nd

Tota

l Pro

du

ctio

n C

ost

s [€

]

Base Profile 43617 84333 40202 70421

Clothes’ Washer 43658 86508 39760 69511

Change [%] 0 +3 -1 -1

Clothes’ Drier 42823 83919 39902 70001

Change [%] -2 0 -1 -1

Dishwasher 44210 84115 39921 70005

Change [%] +1 0 -1 -1

All appliances above 43793 83258 39907 69499

Change [%] 0 -1 -1 -1