Chapter Four

Simulation Tools and Optimization Algorithms for Efficient Energy Management in Neighborhoods

L. Cupelli*
M. Schumacher*
A. Monti*
D. Mueller*
L. De Tommasi**
K. Kouramas**
*    E.ON Energy Research Center, RWTH Aachen University, Aachen, Germany
**    United Technologies Research Centre Ireland, Cork, Ireland

Abstract

In this chapter different schemas for energy optimization in Neighborhoods are presented in detail and a Modelica-based library is used to represent the dynamics of Neighborhood Energy Systems and their interactions. The scalability of the library allows to efficiently simulate city districts.

Keywords

multiphysics simulation
Modelica library
optimization algorithms
centralized
hierarchical

1. Introduction

1.1. Motivation

As detailed in the EPN process of Chapter 3, the Neighborhood Energy Manager (NEM) and owner/owners select the potential business models for the Neighborhood and have available a number of energy services, such as optimization, real-time monitoring, and forecasting to select for deployment on their Neighborhood energy management platform.
Having identified business cases for the Neighborhood and having defined and performed a suitable benchmarking process, a Neighborhood-level objective can be formulated in terms of optimization accounting for both the economic criterion and environmental impact (energy cost and CO2 emissions). In this context, modeling and simulation tools can be used as decision support tools for planning and operation of energy systems in buildings as well as proof of concept of energy optimization algorithms before carrying out field tests.

1.2. Our Contributions

In this chapter different schemas for energy optimization in Neighborhoods are proposed and a Modelica-based library is used to efficiently simulate and test the optimization actions in city districts.
The Neighborhood energy optimization algorithms perform an energy price driven scheduling of the generation and storage equipment to reduce the Neighborhood net-load seen from the grid side while keeping Neighborhood pollution emissions below a given threshold.
The Modelica-based library supports the field tests with more extensive assessments and offers numerous components for a multiphysics simulation of Neighborhood energy system. While a first version of the library developed by RWTH is available in GitHub at https://github.com/RWTH-EBC/AixLib, a second version enriched with the electrical elements from RWTH and Dynamic Phasors will be offered in the same server as a separate release.

2. Preliminaries

Prior to formulating the energy optimization algorithm, the availability of equipment and consumption data must be specified. It is essential to understand your Neighborhood infrastructure and capabilities. Table 4.1 shows some exemplary assets to consider. They are mapped against the generic categories “generation” (adjustable and nonadjustable), “storage,” “consumption,” and “network.” Readers interested specifically in modeling and simulation of such assets can jump directly to Section 3.

Table 4.1

Thermal and electrical generation, storage, and consumption considerations

Electrical Thermal
Generation

Adjustable (variable):

CHPs
Fuel cells

Nonadjustable (parameter):

Wind turbines
PV cells

Adjustable (variable):

Heat pumps
CHPs
Gas boilers

Nonadjustable (parameter):

Solar thermal heating
Storage Battery

Water tank storage

PCM storage

Consumption Electrical Load profiles Thermal Load profiles
Network Electrical connection Thermal loop

Application of optimal control concepts to achieve energy efficiency in buildings and optimal exploitation of local resources is not widely extended to Neighborhoods or districts.
We consider a Neighborhood including multiple buildings, which agree to operate their energy resources and loads in a coordinate manner, such that some global goals are achieved while individual optimization goals can still be pursued. In such case, a building’s local resources should be coordinated with a top-level optimization engine to balance achievement of local optimization goals and Neighborhood-level goals.
To address the aforementioned scenario in the most general case of multiple-ownership Neighborhoods, a hierarchical optimization algorithm can be designed to split the optimization into the building level and the Neighborhood level in such a way that the bottom level manages the individual building objectives whereas the top level addresses the Neighborhood-level objective. In particular, the building-level energy management will offer flexibility to the top-level optimizer and will receive recommendation on the control actions to implement to drive the Neighborhood toward the fulfillment of its goals. Typical objectives applicable to energy optimization are: energy cost and pollution emission (e.g., CO2).
Business models determine the reward which each building owner receives from the Neighborhood when he contributes within his flexibility band to the achievement of Neighborhood goals. A relevant example of that is a scenario where: (1) each building owner minimizes the operating cost of energy by scheduling the local resources and storage while guaranteeing the electrical and thermal load supply; however, minimization of such cost can be performed by using different load profiles corresponding to different levels of comfort and CO2 emissions; (2) a Neighborhood optimization agent selects for each building the load profiles such that the total level of Neighborhood CO2 emissions is below a Neighborhood limit and offers a reward to those building owners who are willing to reduce their thermal loads (within the occupants comfort band) to contribute to the reduction of environmental pollution. Such a reward can be, for example, in the form of economic incentive or energy price discount.
The optimization algorithm combines economic dispatch and load shifting; furthermore, it performs an energy price driven scheduling of energy storage (if available) and enables to support the grid reducing the net-load (load seen from the grid side) when the energy price is high. To achieve these goals, it exploits historical energy consumption data to forecast or estimate 24-h ahead of the electrical/thermal Neighborhood consumption. Furthermore, depending on the contractual agreement with the energy supplier, both energy price forecasts (based on real-time recorded data) and fixed two stages (day/night) or three stages (day/night/peak) tariffs can be used to optimize local generation and storage in line with the business models. A schematic including the main functional blocks of the energy optimization algorithm is shown in Fig. 4.1.
image
Figure 4.1 Energy Optimization Algorithm Schematic.
In addition to the possible presence of multiple objectives in the energy optimization formulation, there is also the issue of different levels of willingness on the part of different users to provide information on their consumption to the energy management service. The mutually agreed level of transparency can be roughly divided into the following for each party:
All generation, storage, and consumption data available to the energy management service (high level of transparency).
Only anonymous or encrypted data, such as generation schedules and aggregated or residual consumption data available (lower level of transparency).
According to the business models applicable (see Chapter 6) and the level of transparency, a centralized optimization algorithm can be defined for a Neighborhood with high level of transparency and where aggregated objectives are applicable, such as a single-ownership Neighborhood providing full access to energy data; moreover, a hierarchical two-level optimization algorithm can be formulated for a Neighborhood with lower level of transparency where both individual and aggregated objectives are applicable, such as a multiple-ownership Neighborhood with access to aggregated consumption. This classification is illustrated in Fig. 4.2.
image
Figure 4.2 Optimization algorithms classification.

3. Simulation Models for Energy Positive Neighborhoods

When studying Neighborhoods, simulation proves to be a powerful tool to analyze the interactions between thermal and electrical entities before carrying out field tests. In this section, models for different assets at the Neighborhood level will be presented that capture deployed thermal and electrical generation and storage technologies.
Furthermore, a simulation-based assessment of the Neighborhood optimization algorithms described in the following sections of this chapter will be performed to support the decision-making process toward energy positivity.
Due to the interdisciplinary character of the systems, some considerations need to be made for the setup of a realistic analysis. Instead of conducting separate simulation scenarios for the thermal and electrical domains, they should be integrated in one simulation in order to study joint effects. At the same time, their very different dynamic characteristics must be taken into account in the modeling and simulation approach, to avoid neglecting fast effects or to carry out a disproportional amount of calculations for slower phenomena.

3.1. Time Constants

In Neighborhoods containing buildings and energy generators, different types of dynamics must be considered:
Electrical transient effects
Electrical steady-state effects
Thermal/thermohydraulic effects
While thermal processes such as heat exchange are rather slow and changes take place in the range of minutes, electrical effects are much faster and range from 10−5 s for electromagnetic transients to a few seconds for electromechanical or longer term transients. The temperature changes of the building mass which are evoked by air temperature changes (external) or core activation (internal) take place in the magnitude of several hours. Faster sampling frequencies can occur in heat generators, for example, condensing boilers, though even here the fluctuations happen in a time scale of several minutes.

3.2. Modeling Language

Various modeling tools are available to model both thermal and electrical parts of a Neighborhood. These include building energy simulation tools EnergyPlus, eQUEST, Modelica, TRNSYS, and others. The Modelica language was chosen for the modeling of components. Modelica is a freely available, object-oriented language for modeling of physical systems. It is suited for multidomain modeling, for example, mechatronic models in robotics, automotive and aerospace applications involving mechanical, electrical, hydraulic, and control subsystems, process-oriented applications, and generation and distribution of electric power. Models in Modelica are mathematically described by differential, algebraic, and discrete equations. No particular variable needs to be solved manually. Within a Modelica development tool (e.g., Dymola, OpenModelica, JModelica) physical models are graphically put together, mathematically reformulated and translated to executable C-Code. Afterward the solving process is conducted; rather than interpreting the causality of variables depending on the type of equation, the tool purely considers the relation between them. Modelica is designed for the efficient handling of large models with more than one hundred thousand equations (https://www.modelica.org/).
The Modelica language is a textual description to define all parts of a model and to structure model components in libraries, called packages. In the scope of EU FP7 project COOPERaTE, the authors identified and modeled the components of two demonstration sites in Modelica; however, the component library modeled for COOPERaTE is not limited to the demonstration sites, but can be applied to Neighborhoods with similar features or extended to accommodate further equipment. Table 4.2 shows all available energy components of each test site with the definition of relevant modeling data.

Table 4.2

Available energy components of COOPERaTE demonstration sites

Feature Data requirements and parameters Challenger Bishopstown

Building physics

Walls Wall structure
Floors Floor and piping plan
Windows Insulation standards

Heating system

Boiler Technical specifications
Combined Heat and Power (CHP) Technical specifications
Solar thermal panel Technical specifications
Heat Pump (HP) Technical specifications
Storage Technical specifications
Radiator Technical specifications

Electrical system

Grid Topology, Cable type and Load profiles
Battery storage system Total capacity and Power of interface converter
Photovoltaic (PV) installations Total installed power and area, Location, Temperature data, Solar irradiation data
Electric Vehicle (EV) charging stations Charging type and power
Wind Turbine Rated power, Technology and Wind velocity data

3.3. Thermal System

The thermal modeling of energy systems can be performed either in a very detailed or a simplified way depending on the purpose of the model. Regarding the level of detail in modeling there is a trade-off between model accuracy and acceptable computation and modeling effort. This trade-off has to be resolved in a reasonable manner. A large computational effort comes with fluid dynamic calculations for the heating medium. Using the standard Modelica fluid library the state of the current (laminar or turbulent) is calculated in every time step, burdening the computational time. For detailed considerations of single components which exist in energy systems, for example, a heat-exchanger validation, those calculations may be beneficial to create sophisticated simulation models.
For more holistic investigations of energy systems, as performed in the scope of COOPERaTE, the calculation of in-pipe turbulence and pressure losses is negligible and would not lead to reasonable benefit. Instead of a thermohydraulic fluid connector, that connects different components within a simulation model, an enthalpy connector approach is considered in this project (Stinner, Schumacher, Finkbeiner, Streblow, & Müller, 2015). This connector does not calculate pressure losses but contains all relevant information of the heating medium, namely temperature T, specific enthalpy h, and mass flow, where the enthalpy is calculated in accordance to the following equation using the specific heat capacity cp of the fluid:

h=Tcp.

image
The values for each variable at the beginning of the simulation are set during the model initialization and can be adjusted as a simulation parameter. With this approach the energy balances for the heating medium passing through a component, for example, a gas boiler, can be easily calculated according to the following equation:

Q˙=m˙cpToutTin=m˙houthin9,

image
where m˙image is the mass flow rate of the fluid and Tin and Tout are the entering and leaving fluid temperatures, respectively.

3.4. Electrical System

For the electrical part of the system, a quasidynamic approach is chosen as opposed to the more typical steady-state load flow analysis. In this way, electrical transient behavior can also be studied, thus enabling the analysis of the effects which occur when interfacing the faster electrical system with the slower thermal system. At the same time, a quasidynamic approach does not capture the faster electromagnetic effects, which would be out of scope for control algorithms and would represent an additional computational burden due to significantly smaller simulation time steps.
For this purpose, a custom library was developed with the dynamic phasor approach (Mattavelli, Verghese, & Stankovic, 1997).
This principle is based on the fact that in a time interval I = (t−Θ,t] a time-domain waveform x(τ) with τ∈I can be represented by a Fourier series:

xτ=k=Xktejkωτ,

image
where ω = 2π/Θ and the time varying k-th coefficient Xk(t), also called dynamic phasor, is defined as an average over the interval I sliding in time:

Xkt=1ΘtΘtxτejkωτdτ=:xkt.

image
As 〈xk corresponds to the k-th harmonic of the waveform, the representation is truncated at the index of the maximal harmonic of interest, thus resulting in a finite number of equations.
Due to the fact that complex numbers are introduced in the representation, equations for the real part and the imaginary part, are obtained, respectively. One may argue that the dynamic phasor approach therefore increases the computational effort; however, for a small number of harmonics this is not the case compared to the drastically smaller time steps of purely dynamic simulations, and the benefit of covering a large span of phenomena, including large parts of both transient and steady-state behavior (Demiray, 2008).
In order to study the transient phase as well as the steady state of the first harmonic, the focus is placed on the first Fourier coefficient,. This corresponds to the intended type of application, which is to identify control and optimization strategies.
The models can be extended to represent further harmonics by adding the higher Fourier coefficients if desired. However, in this case smaller simulation time steps would be necessary than for the first harmonic and more equations would arise.
Now some aspects which are significant for the modeling process of electrical systems are highlighted:
1. When substituting the original waveforms of voltage and current, the Kirchhoff laws are maintained. This is explained by the additive nature of the Fourier coefficients, resulting from the linearity of integrals:

x+yk=xk+yk.

image
2. The dynamic behavior in terms of Fourier coefficients can be derived directly from the original mathematical model of each component thanks to the relation below which can be seen by substituting each expression in the integral definition of the coefficients.

ddtxk=ddtxkjkωxk,

image
Following the previously mentioned logic, a library of basic electrical elements for single-phase and multiphase was created, starting from the modeling of a new type of single-phase connector (pin) which supports a complex flow variable (current) and a complex across variable (voltage), Fig. 4.3 displays the schematic of a single-phase connector.
image
Figure 4.3 Schematic of a single-phase electrical component with two pins.
The multiphase connections (plugs) are obtained from multiple single-phase connectors. It is possible to introduce phase differences and to connect elements to a single phase or to all phases. Fig. 4.4 shows the principle of a three-phase component.
image
Figure 4.4 Schematic of an electrical component with two three-phase plugs.
The basic three-phase element with two plugs does not specify whether a delta or wye connection should be used. Both of these connection logics are available as a basic component which is connected to the three-phase element to obtain the desired connection type.
1. Wye connector: All three connectors of one plug are connected to one single pin (which can act as a voltage reference). The three free pins of the other plug are the branches.
2. Delta connector: The single-phase elements are connected in a cyclic way.
Apart from a library of elementary single-phase and multiphase components, such as resistors and capacitors or sensors, several models of the site-specific technologies which were listed at the beginning of Chapter 4 in Table 4.1 were implemented. These will be described in more detail in the following section.

3.5. Model Library

The subsequent sections describe the thermal and electrical libraries developed for the COOPERaTE platform. For each component, a standard template is used, defining the following properties:
A description of the component.
The parameters of the component.
The interfaces of the component.
The technical formulation of the component.

3.5.1. Thermal Components

The following list summarizes all thermal components:
thermal zone model and building physic,
boiler,
heat pump,
CHP generator,
solar thermal panel,
thermal storage,
heat exchanger,
radiator,
pump, and
three-Way valves.
3.5.1.1. Thermal Zone Model and Building Physics
Description The building physics library comprises all relevant components to represent a building through a simulation model. Basic components are outer and inner walls, air exchange, equivalent air temperature, solar irradiation gains, and radiation exchange. Based on these components a reduced multizone model of a random building can be built which also contains heat exchange interfaces, that is, radiators that represent the connection between the building mass and enthalpy flow within the building. The thermal connection to external heat generation and storage facilities is achieved via enthalpy connectors.
Parameters

Inner and outer walls

Initial temperatures (°C)
Resistance (K/W)
Heat capacity (J/K)
Area of walls/floors (m2)
Heat transfer coefficient [W/(m2 K)]
Emissivity (−)

Windows

Factor for convective part of radiation through windows
Window area (m2)
Emissivity (−)
Energy transmittance (−)

Room air load

Volume of air in zone (m3)
Density of air (kg/m3)
Heat capacity of air [J/(kg K)]
Interfaces
Total solar irradiation (beam and diffusive)
Weather (Real Input)
Infiltration temperature (Real Input)
Ventilation infiltration (Real Input)
Internal gains (Real Input)
Formulation

The thermal zone model is based on the simplified control engineering model which is described in the German VDI 6007 standard. The basic idea behind the previously mentioned model is the equivalence between the differential equation of the thermal conduction in a wall and the processes in an idealized electrical cable, as shown in the following equation:

Tt,xt=1RCT2t,xx2, image

where T is the temperature, R is the thermal resistance of the wall layer, and C is the heat capacity of the wall layer.

According to the norms 6007 and 6020 individual building components can be divided into three basic groups:

Outside surfaces, such as external walls, roof, outside, windows, etc.
Internal walls for which the temperature conditions and radiation conditions prevailing in the adjoining rooms are practically equal (adiabatic loading).
Internal walls which adjoin rooms with different temperature and radiation conditions, such as a cellar.

The different wall types can be modeled using the equivalence explained earlier, leading to a 2-transfer functions model of a thermal zone, depicted in Fig. 4.5. The resistances and capacities of the walls are calculated depending on the wall’s structure and its geometry.

The model representation of a thermal zone in Modelica according to VDI 6007 is shown in Fig. 4.6 (Lauster, Streblow, & Müller, 2012).

image
Figure 4.5 Schematic of the 2-transfer function model.
image
Figure 4.6 Schematic of a thermal zone model.
3.5.1.2. Boiler
Description The Boiler component is a model of a gas or oil boiler, which—depending on the parameterization—can be operated as a conventional or condensing boiler. It increases the enthalpy of the passing medium by raising its temperature and calculates the fuel consumption according to the current boiler efficiency. The model is table based and internally controlled by a PID controller, which controls the flow temperature that is externally prescribed by a heating curve. This boiler model is able to perform a modulated operation in which the range is determined by parameters. These parameters will be taken either from manufacturer specifications or measurement data. The model is able to represent boilers of different kinds and sizes with appropriate parameters.
Parameters
Initial temperatures (°C)
Water volume inside the boiler (m3)
Nominal heating power (W)
Modulation rage (%)
η Efficiency depending on flow temperature and boiler load (−)
PID controller factors (−)
Interfaces
Set flow temperature (Real Input)
On/Off switch (Boolean Input)
E˙fuel image Fuel consumption (Real Output)
Formulation

The heating medium which flows into the component via the enthalpy connector is heated up to the prescribed set temperature by an ideal heating element. The thermal output Q˙th image of this heating element is determined by a PID controller which controls the flow temperature within the component. By using the efficiency table of the boiler the current fuel consumption is calculated.

E˙fuel=Q˙thη. image

3.5.1.3. Heat Pump
Description The heat pump component is a model suitable for both air and ground source heat pumps. It increases the enthalpy of the passing medium by raising its temperature. Additionally, the power consumption is calculated. Since it is a table-based model, the coefficient of performance (COP) of the heat pump is not influenced by the type of ambient energy source, but its temperature. The source is idealized as an infinite energy source with an externally prescribed temperature (outside air or brine temperature). The heat pump is able to modulate in a defined range. The necessary table data will be taken from the manufacturers’ or measurement data. Depending on the parameterization the heat pump represents an air-to-water or brine-to-water heat pump in a system simulation environment. The connection to the electrical system is achieved through the electrical power consumption output which is used to formulate the relation between voltage and current.
Parameters
Initial temperatures (°C)
Modulation range (%)
PID controller factors (−)
Start-Up and Shut-Down time (s)
Q˙co,max image Condenser heat flow table (W)
Electric Power table (W)
Interfaces
Source temperature (Real Input)
Sink temperature (Real Input)
Ntarget Target compressor speed (Real Input)
On/Off switch (Boolean Input)
COP Current COP (Real Output)
Pel,max Electrical power consumption (Real Output)
Formulation

The externally prescribed target compressor speed of the heat pump determines the load state. With the source and sink temperatures as environmental status the maximum condenser heat flow and the corresponding power consumption are delivered by two separate tables. Based on these values the actual COP and thermal output Q˙th image can be calculated according to the following equations (Huchtemann & Müller, 2009):

COP=Q˙thPel,max, image

Pel=Pel,max1Ntarget3, image

Q˙co=Q˙th=Q˙co,max1Ntarget3. image

3.5.1.4. CHP Generator
Description The CHP generator component is a model of a combined heat and power generator with two enthalpy ports, which increases the enthalpy of the passing medium by raising its temperature. Additionally, the generated electrical power is calculated as an output of the model. It can be operated in a heat or power driven mode. Depending on the operation mode a power/heat input signal is used to determine the current generation status. The model is based on empirical data and the produced power and heat are calculated internally with a polynomial formula for which the weight factors must be provided either by the manufacturer or can be determined through the analysis of measurement data. The model’s purpose is the representation of a CHP in a multiphysics energy system simulation. The connection to the electrical system is achieved through the electrical power input which is calculated from the voltage and current information at the connection point.
Parameters
Pel,max Maximum power output (W)
Maximum thermal output (W)
Modulation range (%)
ai ,bi Polynomial weight factors/coefficients
Control mode (heat or power driven)
Internal heat capacity (J/K)
Interfaces
Electrical power (Real Input)
Thermal power (Real Input)
Operation mode (Boolean Input)
On/Off switch (Boolean Input)
Electrical power (Real Output)
Thermal output (Real Output)
Gas/fuel consumption (Real Output)
Formulation

At first the electrical and thermal efficiencies ηel and ηth are calculated depending on the coefficients of the polynomial, the maximum electrical power output, medium mass flow rate m˙ image , and return temperature TR:

ηel=a0+a1Pel,max2+a2Pel,max+a3m˙2+a4*m˙+a5TR2+a6TR, image

ηth=b0+b1Pel,max2+b2Pel,max+b3m˙2+b4*m˙+b5TR2+b6TR. image

Depending on the generation mode (heat or power driven) the current thermal and electrical output power is calculated using the power/heat demand input signal and the efficiencies. Based on the output flows and the efficiency, the gas consumption E˙fuel image is determined by (Rosato & Sibilio, 2012):

E˙fuel=Pelηel. image

3.5.1.5. Solar Thermal Panel
Description The solar thermal panel model has two enthalpy ports and increases the enthalpy of the passing heating medium by raising its temperature. The beam and diffusive irradiation from the environment is collected by the panel and then transferred to the heating medium within the device. The efficiency of this transfer is mainly influenced by the temperature difference of the heating medium and the environmental air.
Parameters
Reference efficiency of the collector (−)
Heat exchange coefficient with the environment [W/(m2K)]
Apanel Panel area (m2)
Incident angle modifier (−)
Panel location and orientation
Ground reflection coefficient (−)
Interfaces
Ta Environmental air temperature (Real Input)
Beam and diffusive radiation (Real Input)
Formulation

Using the input radiation, orientation, and location data, the total radiation on the tilted panel surface G can be calculated. The thermal efficiency η can be calculated depending on the difference between the mean panel temperature Tm and the environmental air temperature with polynomial coefficients ai which are either given by the manufacturer or determined empirically. Hereby the total thermal output of the panel Q˙th image is determined:

η=1G[η0a1TmTaa2TmTa2], image

Q˙th=GApanel. image

3.5.1.6. Thermal Storage
Description The thermal storage model represents a stratified water storage tank, where the stratification is achieved by the implementation of n discrete layers. Buoyancy flow within the tank is also considered. The number, position, and type (heating coil/direct flow) of the load and unload cycles can be defined as a parameter. Additionally, the tank volume and insulation is fully adjustable, enabling the model to represent random hot water storage tanks.
Parameters
Number of discrete layers (−)
Medium density (kg/m3)
Medium specific heat capacity [J/(kgK)]
Thermal conductivity of medium [W/(mK)]
Inner and outer heat transfer coefficient [W/(m2K)]
Tank and coil measures
Interfaces
Layer temperature (Real Output)
Formulation

The enthalpy connectors for loading and unloading the storage tank are, depending on their position, connected to a particular discrete layer of the tank or a coil inside the tank. For the case of tank loading the function of the tank can be described as follows.

The enthalpy of a passing medium is to a certain extent transferred from the medium to the layers through which it flows or to the layers which are connected to the corresponding heating coil. After passing the predefined layers of the tank or the heating coil, the medium leaves the storage tank with a certain enthalpy difference which is transferred to the internal storage medium. The layers itself are also connected to each other. The exchange of enthalpy between these layers occurs on the one hand by simple heat conduction Q˙cond image in both directions (to the upper and lower neighboring layer) and on the other hand based on buoyancy induced convection. Those two effects result in the effective heat conduction coefficient λeff that is used to calculate the effective heat transfer by conduction Q˙cond image . Additionally each layer is thermally connected with the environment to which heat losses Q˙loss image can occur depending on the temperature difference of the medium Tlayer,n and the outside air Tenv.

These different heat flows also depend on the height of each discrete volume hlayer and their lateral and front surface area Alayer,front and Alayer,lateral respectively:

Q˙cond=λeffhlayerAlayer,frontTlayer,nTlayer,n+1, image

Q˙loss=ktank,lateralAlayer,lateralTlayer,nTenv. image

The unloading process of the storage tank is vice versa.

3.5.1.7. Heat Exchanger
Description The heat exchanger component is a model of a plate heat exchanger with n × 2 discrete volumes. It has two enthalpy input and output connectors each and is fully adjustable in size, discretization, and material. The purpose of this component is to enable heat transfer between two different mediums that are not allowed to be in direct contact/mixture, for example, heating water and solar thermal fluid (Fig. 4.7).
Parameters
Number of discrete volumes (−)
Total heat exchanger volume (m3)
Total heat exchanger plate area (m2)
Heat exchanger heat transmission coefficient [W/(m2K)]
Interfaces
None
Formulation

The discrete volumes of the heat exchanger are arranged in an alternating manner. Thus, each volume containing the hot medium is neighboring a volume containing the cold medium. Those neighboring discrete volumes are thermally connected to each other by a heat transfer component. Based on the heat flow between the individual volumes Q˙i image , which is influenced by the temperatures of hot and cold volumes Th,i and Tc,i and the heat transmission coefficient k, the total heat flow within the heat exchanger Q˙th image can be calculated:

Q˙i=kAiTh,n+1iTc,i+kAiTh,niTc,i, image

=kAiTh,n+1i+Th,ni2Tc,i, image

Q˙th=i=0nQ˙i. image

image
Figure 4.7 Heat exchanger discretization scheme.
3.5.1.8. Radiator
Description The radiator component is a model of a hot water radiator. It has two enthalpy ports and is fully adjustable in size, discretization, and material. The purpose of this component is to enable heat transfer between the circulated heating medium, mostly water, and the room airload described in Section 3.5.1.1.
Parameters
Nominal heating power (W)
Number of discrete volumes (−)
Geometric measures (m)
Material properties of the radiator
Interfaces
None
Formulation

The heat Q˙th image flowing into the component is transferred to a thermal capacity element representing the mass of the radiator. A radiator wall element calculates the partial energy flows through convection and radiation that are transferred to the surrounding environment. The convective part Q˙conv image is determined by the heat transmission coefficient k, the effective radiator area A, and the temperature difference between the radiator wall Trad and the environment Tenv. The radiative part of the energy transfer Q˙rad image is determined by Stefan Boltzmann’s law, which uses the emissivity ɛ of the radiator and the Stefan Boltzmann constant σ. This energy transport is carried out by a conventional thermal connector and a radiation port which will be connected to the thermal zone model (Section 3.5.1.1).

Q˙th=Q˙conv+Q˙rad image

Q˙conv=kATradTenv image

Q˙rad=σɛATrad4Tenv4 image

3.5.1.9. Pump
Description The pump component is a model of an ideal pump, which creates a prescribed heating medium mass flow between enthalpy connectors. It is also used for the type declaration of the heating medium. Since the pump can ideally prescribe a mass flow rate, conventional throttle valves are not necessary for a system setup.
Parameters
Specific heat capacity [J/(kg K)]
Interfaces
Heating medium mass flow rate (kg/s)
Formulation

The pump component simply prescribes the mass flow m˙ image of the heating medium in the system. The enthalpy and temperature of the medium stay unchanged:

m˙=m˙prescribed, image

hout=hin, image

Tout=Tin. image

3.5.1.10. Three-Way Valves
Description

The three-way valve model is able to represent either a distribution or a mixing valve. As a distribution valve it splits a mass flow m˙AB image into two separate mass flows m˙A image and m˙B image according to the valve opening position.

Used as a mixing valve two separate mass flows m˙A image and m˙B image are mixed to one mass flow m˙AB image depending on the valve position.

Since the pump (Section 3.5.1.9) can ideally prescribe a mass flow rate, conventional throttle valves are not necessary for a system setup.

Parameters Three-way valve type (distribution/mixing)
Interfaces
Valve opening position
Formulation

The mass flows and enthalpies of each enthalpy connector for the distribution/mixing valve are calculated as follows:

Distribution valve

m˙A=m˙ABy, image

m˙B=m˙AB1y, image

hA=hA. image

Mixing valve

m˙AB=ym˙A+1ym˙B, image

hAB=m˙AhA+m˙BhBm˙AB. image

3.5.2. Electrical Components

The following list summarizes all electrical components:
Electrical line
PV module
Simplified battery storage system
Constant power load
EV charger
Transformer
Infinite power bus
Wind turbine
3.5.2.1. Electrical Line
Description The electrical line model represents effects which cable properties introduce in electrical systems in low voltage and medium voltage, as opposed to ideal connections in which no losses or capacitive and inductive effects occur. It has three pins: the positive and negative pin as well as a reference pin which may be connected to ground or any other reference point the user would like to choose (Fig. 4.8).
Parameters
x length of the line (m)
r resistance per meter (Ω/m)
l inductance per meter (H/m)
c capacitance per meter (F/m)
Interfaces If a specific output is required, electrical quantities can be measured by connecting the corresponding sensor model.
Formulation

The line model is a lumped π line model with a voltage reference pin (Fig. 4.9).

The resistance R and the inductance L are the total resistance and inductance of the line, calculated from the parameters, whereas the capacitances C1 and C2 share the total line capacitance:

R=rx, image

L=lx, image

C=cx, image

C1=C2=12C. image

The effect of the line capacitance can be neglected in low voltage lines by setting C = 0, leading to a purely inductive model.

image
Figure 4.8 Electrical line icon.
image
Figure 4.9 Line model.
3.5.2.2. PV Module
Description

The photovoltaic module is a simplified model with two pins which converts solar irradiance and ambient temperature data into electrical active power depending on the surface area of the module. This power value is then used to compute the relation between voltage and current. When information on reactive power is not available, its value is set to zero as a default. The nominal operating conditions, such as ambient temperature, cell temperature, and radiation are parameters which may be chosen according to the specific PV panel in use. The efficiency is modeled to decrease at higher ambient temperatures than the nominal ambient temperature, depending on a temperature coefficient which depends on the type of PV panel.

This model is not a component-based model like a diode PV model. Therefore, it is not useful for a detailed analysis of PV panel properties; it should rather be used to represent the behavior of a PV module as a source within an electric system (Fig. 4.10).

Parameters
Area (m2)
Efficiency at nominal conditions
Temperature coefficient for efficiency (°C−1)
TNOCT Nominal operating cell temperature (°C)
Tambient,NOCT NOCT Ambient temperature (°C)
IrrNOCT NOCT irradiance on cell surface (W/m2)
Q Reactive power (default = 0, W)
Interfaces
Irr Solar irradiance input (W/m2)
Tambient Ambient air temperature input (°C)

If a specific output is required, electrical quantities can be measured by connecting the corresponding sensor model.

Formulation

At first, the cell temperature Tcell is calculated from the ambient temperature input and the solar irradiance input, depending on the nominal operating conditions:

Tcell=Tambient+TNOCTTambient,NOCTIrrIrrNOCT. image

Now, the efficiency η is updated according to the difference between Tcell and TNOCT, weighted with the temperature coefficient for efficiency.

Finally, according to Skoplaki and Palyvos (2009) the active power output is given as:

P = Irr. area. η,

which specifies the relationship between the dynamic phasor current and voltage across the two pins of the model with the equation:

i=P+jQ*v*. image

image
Figure 4.10 PV module icon.
3.5.2.3. Simplified Battery Storage System
Description

The battery storage system is a simple model of a generic battery. It can be charged or discharged up to a maximum capacity with a certain power and efficiency, while updating its state of charge. A charging or discharging logic can be connected to the battery via the charge/discharge status input. When information on the end-of-discharge or end-of-charge voltage are unknown, the default values can be used (Fig. 4.11).

This model does not specify the battery technology and side effects which may occur due to the specific chemical processes some battery types use.

Parameters
SOCmax Storage capacity (Ah)
SOC0 Initial state of charge (Ah)
Rint Internal resistance of the battery (Ω)
vnom Nominal voltage (V)
vmin End-of-discharge voltage (default = 0.vnom)
vmax End-of-charge voltage (default = 1.vnom)
P Charging and discharging power (W)
η Charging efficiency index (default = 1)
Interfaces
Charge (0) or discharge (1) status input
Formulation

The battery is modeled as a voltage source with an internal resistance, whose voltage level depends on the state of charge (Wagner, 2010).

The battery storage is considered to operate in DC, a logic which translates between the dynamic phasor voltage and current in the rest of the system and their root mean square values was included within the battery model (Fig. 4.12).

Assuming that the voltage source depends on the state of charge linearly for simplicity:

vDCsource=vmin+(vmaxvmin)SOCSOCmax. image

When the maximal storage capacity is reached, the voltage is limited by the end-of-charge voltage.

In the first time step, SOC = SOC0. Through the power parameter, the DC current is computed from:

iDC=Pvsource. image

The state of charge is then updated through the equation:

SOC=SOC0+ηaiDCdt, image

while SOC ≤ SOCmax, and a = ±1 depending on whether the battery is charging or discharging.

The current and voltage of the DC voltage source are converted back to AC as ideal sinusoidal signals with an adjustable default frequency of 50 Hz, where the amplitude is given by 2 image times the DC voltage or current.

image
Figure 4.11 Simplified battery icon.
image
Figure 4.12 Simple battery circuit.
3.5.2.4. Constant Power Load
Description Due to the difficulty of obtaining all physical load parameters, a simplified model representing the behavior of an electrical consumer with constant power was used. The relation between current and voltage necessary to characterize a two-pin component can be determined from the power values (Fig. 4.13).
Parameters
P active power (W)
Q reactive power (var)
Interfaces If a specific output is required, electrical quantities can be measured by connecting the corresponding sensor model.
Formulation

The relation between the dynamic phasor current and voltage is given by the complex power:

i=P+jQ*v*. image

image
Figure 4.13 Constant power load icon.
3.5.2.5. EV Charger
Description The EV charger is a type of constant power load. It is an electrical consumer which, depending on the power level of the specific charging station, consumes the same amount of power during the time in which it is in use. By setting the status to “on,” the charging of an EV is simulated (Fig. 4.14).
Parameters See constant power load.
Interfaces

Off (0) or on (1) status input.

If a specific output is required, electrical quantities can be measured by connecting the corresponding sensor model.

Formulation The formulation of the EV charger is the same as the constant power load except for the additional option of turning it off. This is achieved by setting the current equal to zero when the “off” state is given to the charger as input.
image
Figure 4.14 EV charger icon.
3.5.2.6. Transformer
Description

For the transformer, an ideal model as well as a standard model is available for both single-phase and multiphase applications. The ideal transformer changes the voltage according to the turns ratio with an optional magnetization, whereas the standard transformer is modeled with two inductors and their mutual inductance (Fig. 4.15).

Additionally, a prototype of a YY and YD transformer (YD5, YD11) have been modeled.

Parameters

Ideal transformer

n Turns ratio primary/secondary voltage
Option for considering magnetization, default = false
Lm Magnetization inductance

Standard transformer:

L1 Self-inductance of winding1 (H)
L2 Self-inductance of winding2 (H)
M Mutual inductance (H)
Interfaces If a specific output is required, electrical quantities can be measured by connecting the corresponding sensor model.
Formulation

Ideal transformer

The relation between the primary voltage v1 and the secondary voltage v2 is given by:

v1=nv2. image

If the user chooses to consider the magnetization, the behavior is modified to include the magnetization current im (as a function of the primary current i1 and secondary current i2) and the magnetic flux ψm with respect to the primary side of the transformer:

im=i1+i2n, image

ψm=Lmim. image

Standard transformer

The standard transformer also includes the primary and secondary inductance as well as their influence on each other. The equations then are:

v1=L1di1dt+Mdi2dt, image

v2=L2di2dt+Mdi1dt. image

Three-phase transformers

The three-phase transformers are obtained by connecting single-phase transformers with a wye and/or delta connector.

In case the ideal transformer is used, a resistor and inductor can be added in order to approximate the real behavior. The YY and YD transformers are models comprising the connection logic (wye or delta) and the transformer model (ideal or standard) as well as additional components if the ideal transformer model is used instead of the standard transformer. For example, the connection logic for a YD transformer is obtained by connecting components in series in the following order:

Wye connector
Ideal transformer or standard transformer
Internal resistance (only if the ideal transformer is used)
Transformer stray inductance (only if the ideal transformer is used)
Delta connector

image
Figure 4.15 Transformer icon.
3.5.2.7. Infinite Power Bus
Description The infinite power bus is used as a coupling point with the external electrical grid. It does not take the specific grid topology into account (Fig. 4.16). Therefore it is only suitable for studies of a system connected to the grid, but not to analyze the effects a system may have on the external grid.
Parameters
Amplitude (V)
Frequency (Hz, default = 50 Hz)
Phase
Interfaces If a specific output is required, electrical quantities of the infinite power bus can be measured by connecting the corresponding sensor model.
Formulation The infinite power bus is modeled as an ideal sinusoidal voltage source according to the chosen parameters.

image
Figure 4.16 Infinite power bus icon.
3.5.2.8. Wind Turbine
Description The wind turbine model is a power curve model which, similarly to the solar PV generator, calculates an active power output depending on turbine specifications as well as the wind profile and air density (Fig. 4.17). Voltage and current information are then extracted from the power values. When information on reactive power is not available, it is set to null as a default. Since this is a function-based simplified model without mechanical information or the type of electrical generator, it is not useful for thorough studies of wind turbine properties, but should rather be used to represent a power source within an electrical system.
Parameters
cp power coefficient of the turbine, default = 0.593
A swept area of the rotor (m2)
ɛg generator efficiency, default = 1
ɛb gearbox/bearings efficiency, default = 1
Q reactive power, default = 0
Interfaces
vwind wind velocity input (m/s)
ρ air density input (kg/m3)

If a specific output is required, electrical quantities can be measured by connecting the corresponding sensor model.

Formulation

According to Ghosh and Prelas (2011), the active power curve of a wind turbine is described by the equation:

P=cpɛgɛb12ρAv3, image

where 12ρAv³ image is the power of the wind acting on a surface A, and the factors cpɛgɛb are limiting factors on the actual power exploitation which varies depending on the specific type of wind turbine and is limited by 0.593 according to Betz’s law.

From the power output, the dynamic phasor voltage and current can be calculated with the equation:

i=P+jQ*v*. image

image
Figure 4.17 Wind turbine icon.

4. Neighborhood Energy Optimization Algorithms

4.1. Mathematical Notations and Definitions

This section highlights the general mathematical notations and definitions used for the formulation of Neighborhood energy optimization algorithms. The notations used in this book are given in Table 4.3.

Table 4.3

Centralized Optimization algorithm—notations and definitions

General

k1,NN image time step

N: prediction horizon

i,j1,BN image index of actors

B: number of actors in the Neighborhood

S1,NN image : number of schedules per building

Generation
Combined Heat and Power (CHP) Fossil Fuel Generators Renewable generation

PCHP,el,i : Electrical CHP output power

PCHP,el,i_max : Max electrical CHP output power

PCHP,el,i_min : Min electrical CHP output power

PCHP,th,i : Thermal CHP output power

ηCHP,el,i : Electrical CHP efficiency

ηCHP,th,i : Thermal CHP efficiency

sCHP,on,i ∈{0,1}:CHP ON/OFF state variable

sCHP,up,i ∈{0,1}: Start command

sCHP,down,i ∈{0,1}: Stop command

ni ∈{1…8}: Minimum running time (time steps)

Pboiler,i : Boiler output power

Pboiler,i,min : Min boiler output power

Pboiler,i,max : Max boiler output power

ηboiler,th,i : Boiler efficiency

sboiler,on,i ∈{0,1}: Boiler ON/OFF state variable

PDiesel,i : Power produced by Diesel generator

Prenew,i : Power produced by renewables
Storage

Wth,i : Thermal energy stored in kWh

Wth,i_max : Max thermal energy stored in kWh

ηsto,th,i : Thermal storage efficiency

Psto,in,i : Storage thermal charging power

Psto,out,i : Storage thermal discharging power

Psto,in,i_max : Max storage charging rate

Psto,out,i_max : Max storage discharging rate

Wel,i : Electrical energy stored

Wel,i_max : Max electrical energy stored

PC,i : Electrical storage charging power

PD,i : Electrical storage discharging power

PC,i_max : Max electrical storage charging power

PD,i_max : Min electrical storage charging power

ηC,i : Electrical storage charging efficiency

Consumption

Lth,i : Thermal load of actor i

Lel,i : Electrical load of actor i

Table 4.4 presents the definitions to consider the economic criterion in the formulation of optimization algorithms.

Table 4.4

Definitions—power purchases/sell, prices and costs

Power purchases/sells
Outside grid (infinite power bus) Neighborhood grid Neighborhood energy exchange

Pgb,i : Power purchased from the grid

Pgs,i : Power sold to the grid

Pnb,i : Power purchased from the Neighborhood

Pns,i : Power sold to the Neighborhood

Bi : Profit of actor i when acting as an energy seller /kWh image

Bj : Savings of actor j when buying energy from the Neighborhood /kWh image

Pn,i→j : Power exchanged from actor i to actor j (kW)

Cn,i→j : Price of the energy exchanged from actor i to actor j /kWh image

xi→j : Ratio of power exchanged from actor i to j

Prices/costs
Fuel cost Grid prices Greenhouse emissions penalties

Cgas,i : Cost of gas

CDiesel,i : Cost of diesel

Cgb,i : Cost of electrical energy imported from the grid

Cgs,i : Reward for electrical energy grid exports

Cnb,i : Cost of electrical energy imported from the Neighborhood

Cns,i : Reward for electrical energy Neighborhood exports

μCO2,CHP,i image : Penalty for CO2 emissions of CHP

μCO2,Fuel,i image : Penalty for CO2 emissions of fuel-based generators

μCO2,g,i image : Penalty for CO2 emissions content of the energy bought from grid

Ebs : The emissions of building b when the set of schedules S is selected

Equipment models used for optimization may be simplified with respect to those used for the system-level simulation. In the remaining part of this chapter we review models which can be found in recent literature on energy management and microgrids. First of all, we observe that the optimization formulation can be in general nonlinear therefore nonlinear programming algorithms apply (Bertsekas, 2008). Component models may or may not include system losses. Recent papers report interesting applications of stochastic optimization algorithms, such as particle swarm (Chung, Wenxin, Cartes, & Schoder, 2008; Peng & Duo, 2014) and genetic (Deng, Gao, Zhou, & Hu, 2011) which can handle nonlinearities. However, it is observed that by approximating efficiencies of CHP (electrical efficiency ηCHPel and thermal efficiencyηCHPth) and boiler efficiency ηbo with constant terms, the optimization problem can be conveniently linearized. In that case, deterministic optimization algorithms for linear programming can be applied. The mathematical equations used to describe equipment, such as CHP, Fossil-Fuel generation; RES and Storage are discussed later in the chapter (Moghaddam, Saniei, & Mashhour, 2016).

4.1.1. Combined Heat and Power Mathematical Description

A general model of CHP suitable for energy optimization purposes is described in Moghaddam et al. (2016). The mathematical description for a CHP starts with the power constraint of this equipment. In a CHP system, electrical and thermal powers are not generated independently, but the output level of one of them also determines the other one. This dependency determines a feasible region wherein the generation of electricity and heat can be controlled. The total output power is given by:

sCHP,on,ikPCHP,i_minPCHP,isCHP,on,ikPCHP,i_max

image
Where the CHP electrical power output is represented as:

PCHP,el,ik=ηCHP,el,iPCHP,ik

image
And the thermal power output by:

PCHP,th,ik=ηCHP,th,iPCHP,ik

image
The efficiencies relating the above electrical and thermal output powers to the total output power can be considered constant to linearize the optimization formulation, even though Mixed Integer Non-Linear Programming formulations are recently being considered and evaluated (Moghaddam et al., 2016). The minimum CHP running time is expressed by the following constraints:

sCHP,up,ik+sCHP,down,ik1

image

sCHP,on,ik+sCHP,on,ik1sCHP,up,ik+sCHP,down,ik

image

sCHP,on,ik+sCHP,up,ikwhere1,N

image

4.1.2. Boiler Mathematical Description

The operating range of a boiler can be represented as (Moghaddam et al., 2016):

sBoiler,on,ikPBoiler,i_minkPBoiler,iksBoiler,on,ikPBoiler,i_maxk

image

4.1.3. Thermal Storage Mathematical Description

Similar to the previous subsections, the thermal energy stored can be represented in terms of (Moghaddam et al., 2016):

Wth,ik+1=ηsto,th,iWth,ik+Psto,in,iktPsto,out,ikt

image
Constrained to:

0Wth,ikWth,i_maxMaximumcapacity

image

0Psto,in,ikPsto,in,i_maxMaximuminputpower

image

0Psto,out,ikPsto,out,i_maxMaximumoutputpower

image

4.1.4. Electrical Storage Mathematical Description

The electrical energy stored in, for example, a battery can be defined by (Moghaddam et al., 2016):

Wel,ik+1=Wel,ik+PC,iktPD,ikt

image
Constrained to:

0Wel,ikWel,i_maxMaximumcapacity

image

0PC,ikPC,i_maxMaximuminputpower

image

0PD,ikPD,i_maxMaximumoutputpower

image

4.2. Centralized Optimization—Single Ownership Neighborhood

In the single-owner case, a single subject owns multiple buildings of the Neighborhood. The energy optimization architecture is of centralized type.
Recent published work on optimization of microgrids and heating systems includes several subsystems for energy generation and storage. A comprehensive list of components and related models is included in Moghaddam et al. (2016). Some recent papers (Rahbar, Xu, & Zhang, 2015; Parisio, Rikos, & Glielmo, 2014; Gamez Urias, Sanchez, & Ricalde, 2015; Kanchev, Colas, Lazarov, & Francois, 2014; Chaouachi, Kamel, Andoulsi, & Nagasaka, 2013) consider the optimization of the electrical microgrid systems. Potential of microgrids in enhancing the energy efficiency in buildings is already emerging from recent studies (Xiaohong, Zhanbo, & Qing-Shan, 2010).
A (centralized) Neighborhood energy optimization algorithm:
Minimizes Neighborhood running energy cost.
Considers all buildings electrical and thermal loads, local generation sources.
Accounts for both the economic criterion and environmental impact (energy cost and CO2 emissions).
Keeps the total Neighborhood pollution emissions below a given threshold.
Can simultaneously handle Renewable Energy Sources (RES), fossil fuel generators, cogeneration units, as well as electrical and thermal storages.
Is implemented as energy optimization service in the NEM Platform as a prototype enabling the implementation of optimized schedules by actuating the relevant components (e.g., adjustable generation and storage equipment) with the optimized set-points.
With the definitions corresponding to different generation and storage equipment from Section 4.1, objective functions for a centralized algorithm in a single-ownership Neighborhood can be formulated, respectively, for the minimization of total energy operating:

minj=1Bn=1NCgas(PCHP,j(n)+Pbo,j(n)t)CHP+Boiler+CDieselPDiesel,j(n)tDieselgenerator+CgbPgb,j(n)tEnergypurchasedfromGridCgsPgs,j(n)tEnergysoldtogrid

image
and:

minj=1Bn=1NμCO2,gbPgb.j(n)μCO2,gsPgs,j(n)+μCO2,CHP,jPCHP,j(n)+μCO2,bo,j(n)+μCO2,Diesel,jPDiesel,j(n)t

image
A combination of the two through a weighted sum of the two objectives can also be adopted to account for energy cost and environmental impact at the same time. However, in the next section a more general method based on two levels of optimization exploiting multiple equipment profiles will be introduced.
The electrical and thermal load balances are given by the following equations [see also (Moghaddam et al., 2016)]:

j=1BPCHP_el,j(n)+Prenew,j(n)+Pgrid_buy,j(n)=j=1BLel,j(n)+Pgrid_sold,j(n)j=1BPCHP_th,j(n)+Pbo,j(n)=j=1BLth,j(n)+Psto,j(n)+Pwaste,j(n)

image
Fig. 4.18 shows the architecture and interactions for the centralized energy optimization algorithm.
image
Figure 4.18 Centralized energy optimization architecture.
The inputs and outputs of the centralized energy optimization algorithm are illustrated in Fig. 4.18. The day-ahead energy price is used together with the thermal and electrical building loads to determine the set-points of local generation and (electrical) storage. Depending on the level of power generated and stored, the amount of grid demand is also determined.
Examples of the application of the proposed optimization formulation are shown in Figs.  4.194.22 for two buildings of the Cork Institute of Technology Neighborhood. They refer to the energy cost minimization case, where the optimizer computes schedules of CHP, boiler, and battery accounting for electrical and thermal load forecasts as well as wind power forecasts. More results from the algorithm demonstration will be discussed in Chapter 7.
image
Figure 4.19 Nimbus Electrical Supply Optimization.
image
Figure 4.20 Nimbus Thermal Supply Optimization.
image
Figure 4.21 Leisureworld Electrical Supply Optimization.
image
Figure 4.22 Leisureworld Thermal Supply Optimization.

4.3. Hierarchical Two-Level Optimization

In the multiowner case, different subjects own the Neighborhood buildings and each of them wants to minimize their own energy cost. In addition, the building owners agree to offer flexibility to the whole Neighborhood and operate their own local generation and storage units in a coordinate manner such that Neighborhood-level objectives are fulfilled. The energy optimization architecture is of hierarchical type (Fig. 4.23).
image
Figure 4.23 Hierarchical two-level energy optimization architecture.
With the multiowner type of Neighborhood, an algorithm based on the schedule flexibility concept was designed that does not necessarily require sharing the consumption or generation information with the Neighborhood controller.
Recent papers about microgrid optimization (Kanchev et al., 2014; Ma, Kelman, Daly, & Borrelli, 2012; Hui, Anwei, Weijun, & Rongjia, 2012; Parisio & Glielmo, 2012; Afshar, Moravej, & Niasati, 2013; Mohamed & Koivo, 2007) also consider the microgrid pollution emissions. In particular, Parisio and Glielmo (2012) report the application of multiobjective optimization for simultaneous optimization of energy cost and pollution emissions. Two formulations are proposed:
The first one is the minimization of a weighted sum of the economic objective and emission objective.
The second one is the minimization of the economic objective under an emission constraint.
We argue that with the first criterion the objective functions may recede their economic meaning, whereas with the second criterion the optimization lacks flexibility and relies on a so-called “hard constraint.”
A general energy optimization algorithm applicable to a Neighborhood:
Features a decentralized optimization for single actors according to their own goals (first layer) that minimizes the single actor’s operating cost as long as they can offer some flexibility to the centralized optimizer (second layer).
Implements a centralized optimization (second layer) that uses this flexibility as well as all other known parameters to target the Neighborhood objective (e.g., maximize the Neighborhood average comfort level and fulfillment of a CO2 constraint).
Selects equipment schedules within the flexibility offered by the decentralized optimizations and communicates them back to the decentralized level.
Accounts for both the economic criterion and environmental impact (energy cost and CO2 emissions).
Is implemented as energy allocation optimization service in the NEM Platform as a prototype, it can provide a recommendation to each building owner on which set of schedules to implement in order to fulfill top-level goals.
Using the mathematical notations and descriptions from Section 4.1 the centralized optimization performed at building level (first layer) is formulated to minimize the single actor’s operating energy cost and determine suboptimal sets of local generation schedules to offer a flexibility to the Neighborhood-level optimizer (second layer), the first layer objective function is:

minn=1NCgas(PCHP,j(n)+Pbo,j(n)tCHP+Boiler+CDieselPDiesel,j(n)tDieselgenerator+CgbPgb,j(n)tEnergypurchasedfromgrid+CgsPgs,j(n)tEnergysoldtogrid

image
The electrical and thermal load balances per building are given by the following equations:

PCHP_el,j(n)+Prenew,j(n)+Pgb,j(n)+Pnb,j(n)=Lel,j(n)+Pgs,j(n)+Pns,j(n)PCHP_th,j(n)+Pbo,j(n)=Lth,j(n)+Psto,j(n)+Pwaste,j(n)

image
As an example of the application of the proposed framework, we consider the case of gas-fired heating systems where the whole building’s thermal consumption is supplied by CHP and Boiler. The building owners agree to participate in the Neighborhood CO2 emission reduction program by offering flexibility in their thermal loads. This means that relaxing thermal comfort requirements, such as the maximum temperature deviation around the zone temperature set-points, different thermal load profiles can be computed given the environmental conditions (outdoor temperature profile and building internal gain). Hence, each single actor can compute suboptimal CHP/Boiler schedules by using the slightly relaxed thermal load profiles to help the Neighborhood to achieve its CO2 emission target. In order to facilitate the participation of each building, the Neighborhood CO2 emission reduction program is rewarded. This general concept is illustrated in Fig. 4.24.
image
Figure 4.24 Two-level Neighborhood energy optimization algorithm.
Each single actor suboptimal CHP/Boiler set of schedules can be associated with a measure of comfort Cbs (the level of comfort achieved in building b when the set of schedules s is selected) and CO2 emissions Ebs (the emissions of building b when the set of schedules s is selected).
The optimization problem can be formulated as a combinatorial problem, the maximization of average building thermal comfort is given by:

Cneigh=1γbmaxb=1Nbγbs=1NSCbsxbs

image
Subject to:

b=1Nbs=1NSEbsxbs<Eneigh,maxNeighborhoodCO2emissionsconstraint

image

s=1NSxbs=1,b=1NbScheduleselectionconstraint

image
The binary variables xbs are introduced to select a certain set of schedules. In particular, when xbs = 1 the set of schedules s is selected in the building b, whereas xbs = 0 means that the set s has not been selected and a different one will be.
For completeness, building-dependent weighting factors γb were introduced in the objective function because buildings of a Neighborhood have typically different sizes and number of occupants, therefore one may want to weight the comfort therein accordingly.
If the pollution limits are sufficiently high, the optimizer will select the nominal load profiles such that the comfort is not penalized at all. As the limits become stricter, lower and lower profiles are selected. If the limits are too low, the optimization problem will be infeasible and the lowest profiles will be selected (maximum curtailment).
The concept of building schedule flexibility was first introduced in Molitor, Marin, Hernandez, and Monti (2013) to minimize power fluctuations between renewable sources and residential demand. In this work, an optimization framework is used to solve an energy management problem account for environmental constraints. In addition, the coordination algorithm selecting the equipment schedules was formulated as a binary integer programming, whereas in Molitor et al. (2013) it was formulated as brute-force search. This means that all the possible combinations were tested to obtain the solution of the optimization problem.
Concerning the data-privacy issue, the solution of the optimization only requires the knowledge of the comfort measures Cbs and corresponding emissions Ebs associated to the set of schedules Si. The actual sets of building schedules do not have to be necessarily shared with the Neighborhood central optimization engine.
The flow of the hierarchical two-level optimization algorithm is illustrated in Fig. 4.25. The centralized, Neighborhood-level optimization is the selection of optimal schedules from the decentralized optimization outputs (building level). If the Neighborhood global goal cannot be fulfilled exploiting the first set of schedules, the optimization procedure can be iterated relaxing some constraints (e.g., allowing further curtailment of thermal load to reach a CO2 Neighborhood emission target).
image
Figure 4.25 Schedule flexibility based optimization algorithm.
An example of the application of the proposed hierarchical algorithm is shown in Figs.  4.264.28 and Table 4.5. Different optimized profiles are generated optimizing the system with full and curtailed thermal load. Schedules blue, green, and red correspond respectively to 100, 95, and 90% thermal load. In Table 4.5 the selected schedules for different levels of the emission constraint limit are shown. It can be seen that the lower the limits the greater the curtailment of the load.
image
Figure 4.26 Nimbus CHP Schedules.
image
Figure 4.27 Leisureworld CHP Schedules.
image
Figure 4.28 Leisureworld Boiler Schedules.

Table 4.5

Neighborhood-Level Optimization using Building Schedules Flexibility

image

5. Summary

This chapter has introduced different schemas for energy optimization in Neighborhoods and a Modelica-based library for simulating Neighborhoods’ energy systems. Section 3 presented a Modelica-based library which accounts for the different nature of numerous components at the Neighborhood energy system (thermal and electrical); this multiphysics library allows efficient simulation and testing of the optimization actions in Neighborhoods before actually deploying them on-site. Thus, it supports the field tests with more extensive assessments.
In Section 4 different optimization algorithms have been formulated to account for different levels of transparency in Neighborhoods: the centralized optimization for a single-ownership Neighborhood with a high level of transparency and the hierarchical two-level optimization for a multiple-ownership Neighborhood with a lower level of transparency. Moreover, the Neighborhood energy optimization algorithms perform an energy price driven scheduling of the generation and storage equipment to reduce the Neighborhood net-load seen from the grid side while keeping the Neighborhood pollution emissions below a given threshold. It has been shown that the usage of flexible resources, such as electrical storage or thermal storage (related to thermal comfort levels) aids to pursue an economic objective, while leveraging on the Neighborhood energy flexibility.

Acknowledgments

The authors wish to acknowledge Dr. Kanali Togawa for the valuable work and contributions to this topic and the EU FP7 Project COOPERaTE.

References

Afshar H, Moravej Z, Niasati M. Modeling and optimization of microgrid considering emissions. Smart Grid Conference (SGC). 2013;1:225229.

Bertsekas DP. Nonlinear programming. 2nd ed. Belmonth, Massachusetts: Athena Scientific; 2008.

Chaouachi A, Kamel RM, Andoulsi R, Nagasaka K. Multiobjective intelligent energy management for a microgrid. IEEE Transactions on Industrial Electronics. 2013;60(4):16881699.

Chung, I. -Y., Wenxin, L., Cartes, D. A., & Schoder, K. (2008). Control parameter optimization for a microgrid system using particle swarm optimization. IEEE International Conference on Sustainable Energy Technologies. ICSET 2008, pp. 837–842.

Demiray, T. (2008). Simulation of power system dynamics using dynamic phasor model. Dissertation submitted to the Swiss Federal Institute of Technology Zurich, Department of Information Technology and Electrical Engineering., ETH Zurich , Zurich, Switzerland.

Deng, Q., Gao, X., Zhou, H., & Hu, W. (2011). System modeling and optimization of microgrid using genetic algorithm. Second International Conference on Intelligent Control and Information Processing (ICICIP), Vol. 1, pp. 540–544.

Gamez Urias ME, Sanchez EN, Ricalde LJ. Electrical microgrid optimization via a new recurrent neural network. IEEE Systems Journal. 2015;9(3):945953.

Ghosh TK, Prelas MA. Energy resources and systems, Vol.2: Renewable resources. Dordrecht, Heidelberg, London, New York: Springer; 2011.

Huchtemann, K., & Müller, D. (2009). Advanced simulation methods for heat pump systems. In: Proceedings of seventh Modelica conference. pp. 798–803, Como, September 2009.

Hui R, Anwei X, Weijun T, Rongjia C. Economic optimization with environmental cost for a microgrid. 2012 IEEE Power and Energy Society General Meeting. 2012;16.

Kanchev H, Colas F, Lazarov V, Francois B. Emission reduction and economical optimization of an urban microgrid operation including dispatched PV-based active generators. IEEE Transactions on Sustainable Energy. 2014;5(4):13971405.

Lauster, M., Streblow, R., & Müller, D. (2012). Modelica-Bibliothek und Gebäudemodelle. Tagungsband Symposium: Integrale Planung und Simulation in Bauphysik und Gebaeudetechnik, Dresden.

Ma Y, Kelman A, Daly A, Borrelli F. Predictive control for energy efficient buildings with thermal storage. Modeling, simulation and experiments. IEEE Control Systems Magazine. February 2012;32(1):4464.

Mattavelli P, Verghese G, Stankovic A. Phasor dynamics of thyristor-controlled series capacitor systems. IEEE Transactions on Power Systems. 1997;12(3):12591267.

Moghaddam IG, Saniei M, Mashhour E. A comprehensive model for self-scheduling an energy hub to supply cooling, heating and electrical demands of a building. Energy. 2016;94:157170.

Mohamed, F. A., & Koivo, H. N. (2007). Online Management of Micro-Grid with Battery Storage Using Multiobjective Optimization. International Conference on Power Engineering, Energy and Electrical Drives. POWERENG 2007, pp. 231–236.

Molitor, C., Marin, M., Hernandez, L., & Monti, A. (2013). Decentralized coordination of the operation of residential heating units. Fourth IEEE PES Innovative Smart Grid Technologies Europe (ISGT Europe), Lyngby, pp. 1–5.

Parisio, A., & Glielmo, L. (2012). Multi-objective optimization for environmental/economic microgrid scheduling. IEEE International Cyber Technology in Automation, Control, and Intelligent Systems (CYBER), Bangkok, pp. 17–22.

Parisio A, Rikos E, Glielmo L. A model predictive control approach to microgrid operation optimization. IEEE Transactions on Control Systems Technology. 2014;22(5):18131827.

Peng, L., & Duo, X. (2014). Optimal operation of microgrid based on improved binary particle swarm optimization algorithm with double-structure coding. 2014 International Conference on Power System Technology (POWERCON), pp. 3141–3146.

Rahbar K, Xu J, Zhang R. Real-time energy storage management for renewable integration in microgrid: an off-line optimization approach. IEEE Transactions on Smart Grid. 2015;6(1):124134.

Rosato A, Sibilio S. Calibration and validation of a model for simulating thermal and electric performance of an internal combustion engine-based micro-cogeneration device”. Applied Thermal Engineering. 2012;45–46:7998.

Skoplaki E, Palyvos JA. On the temperature dependence of photovoltaic module electrical performance: A review of efficiency/power correlations. Solar Energy, Elsevier; 2009: Available from http://www.journals.elsevier.com/solar-energy/.

Stinner, S., Schumacher, M., Finkbeiner, K., Streblow, R., & Müller, D. (2015). FastHVAC : a Library for Fast Composition and Simulation of Building Energy Systems. The Eleventh International Modelica Conference, France, 2015.

Wagner A. Photovoltaik Engeneering: Handbuch für Planung, Entwicklung und Anwendung. 3rd ed. Dordrecht, London, New York: Springer; 2010.

Xiaohong G, Zhanbo X, Qing-Shan J. Energy-efficient buildings facilitated by microgrid. IEEE Transactions on Smart Grid. 2010;1:243252.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.114.230