SlideShare a Scribd company logo
1 of 20
Download to read offline
1
Investigation and Evaluation of Microgrid Optimization Techniques
Nevin B. Sawyer
Department of Industrial & Systems Engineering
University of Tennessee – Knoxville
Knoxville, TN 37920 U.S.A
Abstract
With the increasing popularity of alternate energy providing methods, efforts are being made to find
intelligent ways to integrate multiple energy sources together for the acquisition of more efficient energy.
One effective approach to this strategy is the organization of a microgrid. In order to fully utilize
microgrids, mathematical approaches in the form of linear programming are commonly being used for the
purposes of economic optimization. The goal of this paper is to explore and evaluate the effects of using
stochastic modeling optimization techniques along with shadow price analyses on a microgrid consisting
of DG units, a solar panel, a battery, an HVAC unit, and controllable loads -- all in a grid-connected
mode.
The approach taken for optimization was to construct a mixed integer linear program along a fixed time
horizon with the objective of minimizing costs. Stochastic programming over multiple scenarios was used
to model uncertainty in the forecasting of data, where future scenarios were sampled from a large
population of potential scenarios to construct a distribution of possible future costs. Shadow Price
analyses were then used to determine the sensitivity of the optimized solutions to changes in demand at
each time step for each scenario. The effects of the mathematical techniques were then evaluated in terms
of practicality and effectiveness.
Table of Contents
1. Introduction...............................................................................................................................................3
2. Optimization Problem...............................................................................................................................5
3. Objective Function....................................................................................................................................8
4. Constraints ................................................................................................................................................8
4.1 Microgrid Constraints .........................................................................................................................8
4.1.1 Initial Ramp up Limit...................................................................................................................8
4.1.2 Initial Battery State ......................................................................................................................8
4.1.3 Startup and Shutdown Costs ........................................................................................................8
4.1.4 Charging vs. Discharging.............................................................................................................9
4.1.4 Importing vs. Exporting...............................................................................................................9
4.1.5 Battery Losses..............................................................................................................................9
2
4.1.6 Minimum Up and Down Times ...................................................................................................9
4.1.7 Minimum and Maximum Power Level......................................................................................10
4.1.8 Ramp up Limits..........................................................................................................................10
4.1.9 Curtailments...............................................................................................................................11
4.1.10 Generators’ Fuel Cost – Quadratic to Linear...........................................................................11
4.1.11 Energy Balance ........................................................................................................................12
4.1.12 Charging and Discharging Limits............................................................................................13
4.1.13 Leftover Energy Reward..........................................................................................................13
4.2 HVAC Constraints............................................................................................................................13
4.2.1 Room Temperatures...................................................................................................................13
4.2.2 Power used for Heating and Cooling .........................................................................................14
4.2.3 Heating vs. Cooling....................................................................................................................14
4.2.4 Temperature Bands ....................................................................................................................14
4.2.5 Initial States ...............................................................................................................................15
4.3 Nonanticipatory Constraints .............................................................................................................15
5. Results.....................................................................................................................................................16
6. Discussion...............................................................................................................................................18
7. Conclusion ..............................................................................................................................................19
8. References...............................................................................................................................................19
3
1. Introduction
he importance of shifting to renewable sources of energy and away from fossil fuels is becoming
more evident over time. Fossil fuels are responsible for contributing to air pollution, global warming
through greenhouse emissions, and other negative socio-economic consequences [1, 2]. As they are a
nonrenewable resource, in the future they will become increasingly more expensive to extract rendering
them essentially economically unviable in the long term [2] -- not to mention external social costs
associated with poorer environmental and health conditions [3]. Renewable energy, while better for the
environment and sustainable long term, experiences difficulties in implementation as it is often not as
economically accessible as fossil fuels in the short term [4]. However, practices such as microgrids and
microgrid optimization are working to solve the issue of economic feasibility of renewable resources with
the hope of eventually relying more on renewable energy sources than fossil fuels.
A microgrid may be defined as “electricity distribution systems containing loads and distributed energy
resources, (such as distributed generators, storage devices, or controllable loads) that can be operated in a
controlled, coordinated way either while connected to the main power network or while islanded” [5]. As
this research was conducted without access to a microgrid, parameters and data were estimated as
realistically as possible to simulate a microgrid. The microgrid simulation example used in this paper
consists of 4 DG (distributed generator) units, one PV (photovoltac) solar panel, one storage unit/ battery,
two controllable loads (which may be curtailed with a small economic penalty if needed), three critical
loads (which may not be curtailed), energy requirements for an HVAC unit, and a connection to a main
power grid to import/ export energy from/ to. Data forecasted at each time step was extrapolated from a
similar project studied at Oak Ridge National Labs [6], and parameters for the energy sources were
estimated based on findings in A Model Predictive Control Approach to Microgrid Operation
Optimzation which studied the effects of microgrid optimization on an experimental microgrid located in
Athens, Greece [7]. The program was scripted in Python and optimized using Gurobi Optimizer.
Ideally, the microgrid would be run entirely from the PV solar panel, but as this is not always possible
due to intermittent sunlight, it must rely on energy from the DG units, imports from the main grid, or
energy reserves from the battery to meet demand at any given time. The program created is used to
calculate which levels of each energy source should be used at each time step in order to minimize costs.
Stochastic programming is then used to model deviations in selected forecasted data as the future is
assumed to be nondeterministic. It works by running multiple scenarios where the selected forecasted data
will vary in a binary fashion by a determined confidence interval at each step. The direction that the data
varies (either positively or negatively by its confidence level) is determined randomly at each time step.
The final result of the stochastic modeling of multiple scenarios is to output a distribution for potential
prices that running the microgrid over a given number of steps might realistically cost.
The stochastic modeling approach adds an increased level of accuracy to the decision making process that
the solver undergoes, but it also greatly increases the complexity of the model. Often a trade-off analysis
must be considered between the weight of complexity versus accuracy of a model, as a more complex
model might be more expensive to construct or have longer solving times [8]. For this model the
complexity of a binary stochastic model was used. Though it could have been simpler by taking away the
stochastic elements, it also could have been more complex by having the variance at each time step be a
full normal distribution, for example, instead of just binary toggling. However for the purposes of this
economic analysis, the binary stochastic model was decided to be sufficient.
T
4
The scope of this research also includes a shadow price analysis over 10 selected time steps and across 25
of the stochastic scenarios tested. A shadow price may be defined as “for the ith constraint of an LP… the
amount by which the optimal z-value is improved—increased in a max problem and decreased in a min
problem—if the right-hand side of the ith constraint is increased by 1”[9]. In this model, the optimal z-
value is the total cost of running the microgrid, and the constraint used to define the shadow price is the
energy balance constraint. The energy balance constraint was chosen because by adding a value of one to
the right hand side of this constraint simulates adding a one kWh requirement to the overall demand at the
specified time step and scenario. The shadow price analysis then sought to answer the question: for each
scenario, how much would it cost to add one kWh of demand at each time step? The answer to this
question is important because it gives insight into the effectiveness of the elements of the microgrid at
reducing costs of producing power. If a microgrid is unable to produce electricity cheaper than the price
of purchasing electricity from the main power grid, then the microgrid might be considered economically
uncompetitive [10].
5
2. Optimization Problem
Table 1: Parameters
6
Table 2: Parameters (Continued)
Table 3: Data Sets
7
Table 4: Decision Variables
Table 5: Indices
8
3. Objective Function
Minimize:
[∑ [∑ [∑[ 𝐷𝐺𝑖,𝑛
𝑐𝑜𝑠𝑡
( 𝑘) + 𝑂𝑀𝑖 𝛿𝑖,𝑛( 𝑘) + 𝑆𝑈𝑖,𝑛( 𝑘) + 𝑆𝐷𝑖,𝑛( 𝑘)] + 𝑂𝑀 𝑏
𝑃 𝐶; 𝑛
𝑏
( 𝑘)
𝑁 𝑔
𝑖=1
+ 𝑂𝑀 𝑏
𝑃 𝐷; 𝑛
𝑏
( 𝑘)
𝑁
𝑛=1
𝑇
𝑘=0
+ 𝑐 𝑝( 𝑘) 𝑃𝐼; 𝑛
𝑔
( 𝑘) − 𝑐 𝑠( 𝑘) 𝑃 𝐸; 𝑛
𝑔
( 𝑘) − 𝑐 𝑠( 𝑘) 𝑥 𝑟𝑒𝑤𝑎𝑟𝑑; 𝑛
𝑏
+ ∑ [ 𝜌 𝑐
𝐷ℎ
𝑐
𝛽
ℎ,𝑛
(𝑘)]
𝑁𝑙
ℎ=1
]]] /𝑁
The objective function is essentially a collection of all of the costs of running the microgrid in an attempt
to minimize these costs. The varying scenarios used (defined by the index n) are modeled in here as well
as the output which will be the average of all of the scenarios modeled.
4. Constraints
4.1 Microgrid Constraints
4.1.1 Initial Ramp up Limit
The first constraint used may be expressed in mathematical terms as:
𝑃𝑖(0) ≤ 𝑅𝑖,𝑚𝑎𝑥
This states that the power level of each generator at the first time step must be less than the ramp up limit.
This constraint implies that at the first time step the generator may be chosen to be on or off by the solver,
but as the generator was assumed to be off in the previous time step (k = -1), the power may only be as
large as the ramp up limit. The ramp up limit is defined as the amount the power level of a given DG
generator can increase in one 15 minute time step.
4.1.2 Initial Battery State
𝑥 𝑏(0) = 𝑥 𝑘
𝑏
This states that the initial charge of the battery is set to a known parameter, as not to be strategically but
unrealistically chosen by the solver.
4.1.3 Startup and Shutdown Costs
𝑐𝑖
𝑆𝑈
(𝑘) ∗ (𝛿𝑖(𝑘) − 𝛿𝑖(𝑘 − 1)) ≤ 𝑆𝑈𝑖(𝑘)
𝑐𝑖
𝑆𝐷
(𝑘) ∗ (𝛿𝑖(𝑘 − 1) − 𝛿𝑖(𝑘)) ≤ 𝑆𝐷𝑖(𝑘)
Constraint (4) takes the forecasted data of the startup cost at each time for each generator and multiplies it
by the difference in the generator binary state values to ensure that the startup cost will only be accounted
for in the calculations if the selected generator was off last time step and is on in the current time step. [7]
(1)
(2)
(3)
(4)
(5)
9
Similarly, constraint (5) takes the forecasted data of the shutdown cost at each time for each generator and
multiplies it by the difference in the generator state terms to ensure that shutdown costs will be accounted
for if the selected generator was on last time step and is now off in the current time step. [7]
4.1.4 Charging vs. Discharging
𝑃𝐶
𝑏(𝑘) ≤ 𝛿 𝑏
(𝑘) ∗ 𝐶 𝑏
𝑃 𝐷
𝑏(𝑘) ≤ (1 − 𝛿 𝑏(𝑘)) ∗ 𝐶 𝑏
These constraints are set for two purposes: 1. ensure that the battery is not charging and discharging at the
same time. 2. when the battery is charging or discharging, ensure it does not charge/ discharge more than
the output power limit of the battery.
4.1.4 Importing vs. Exporting
𝑃𝐼
𝑔
(𝑘) ≤ 𝛿 𝑔(𝑘) ∗ 𝑇 𝑔
𝑃𝐸
𝑔
(𝑘) ≤ (1 − 𝛿 𝑔(𝑘)) ∗ 𝑇 𝑔
Similar to constraints (6) and (7), these constraints two purposes are: 1. ensure that the controller does not
import and export power from/ to the grid at the same time 2. when importing or exporting, to ensure that
the interconnection flow limit is not exceeded.
4.1.5 Battery Losses
𝑥 𝑏(𝑘 + 1) = 𝑥 𝑏(𝑘) + 𝜂 𝑐
∗ 𝑃𝐶
𝑏(𝑘) − (
1
𝜂 𝑑
) ∗ 𝑃 𝐷
𝑏(𝑘) − 𝑥 𝑠𝑏
This constraint strives to realistically model the losses of energy that are inherent in battery usage. The
stored energy level of the battery is thus dependent upon stored energy level of the previous time step, the
charging and discharging efficiencies of the battery, the levels of charging or discharging of the previous
time step, and a small regular loss of energy at every time step.
4.1.6 Minimum Up and Down Times
min down time: 𝛿𝑖(𝑘 − 1) − 𝛿𝑖(𝑘) ≤ 1 − 𝛿𝑖(𝜏)
min up time: 𝛿𝑖(𝑘) − 𝛿𝑖(𝑘 − 1) ≤ 𝛿𝑖(𝜏)
Where: 𝜏 = 𝑘 + 1, … , min(𝑘 + 𝑇𝑖
𝑑𝑜𝑤𝑛
− 1, 𝑇)
𝜏 = 𝑘 + 1, … , min(𝑘 + 𝑇𝑖
𝑢𝑝
− 1, 𝑇)
These constraints are primarily based on findings from A Model Predictive Control Approach to
Microgrid Operation Optimzation [7]. In order to model the behavior of DG generators realistically, these
constraints ensure that if a generator is turned on, that it stays on for a certain minimum time period
(minimum up time), and if a generator is turned off, that it stays off for a certain minimum time period
(minimum down time) before starting again. The looping variable tau is used to define these statements
mathematically in order to loop into time steps ahead of the current time step 𝑘 to enforce the DG
generators’ inherent up and down time constrained behavior.
(6)
(7)
(8)
(9)
(10)
(11)
(12)
10
To illustrate this via example, let’s initially set time 𝑘 = 1 which will set loop variable 𝜏 = 2, and then set
the minimum up time for the particular generator 𝑇𝑖
𝑢𝑝
= 3. The binary variable 𝛿𝑖(𝑘) is equal to 0 if the
generator is off and equal to 1 if the generator is on.
Example, given:
𝑘 = 1, 𝜏 = 2, 𝛿𝑖(0) = 0, 𝛿𝑖(1) = 1
Plugging these values into the minimum up time equation yields:
𝛿𝑖(1) − 𝛿𝑖(1 − 1) ≤ 𝛿𝑖(2)
Simplified:
1 − 0 ≤ 𝛿𝑖(2)
Which will force 𝛿𝑖(2) = 1 meaning that the generator will remain on in time step 2.
Repeat this process for the next iteration of tau:
𝛿𝑖(1) − 𝛿𝑖(1 − 1) ≤ 𝛿𝑖(3)
Simplified:
1 − 0 ≤ 𝛿𝑖(3)
Which will force 𝛿𝑖(3) = 1 keeping the generator on at time step 3. The looping variable tau will break at
this point and this process will repeat for all subsequent time steps.
So if the generator is on at time 𝑘 = 1 but off at time 𝑘 = 0, then the generator must stay on at least until
time 𝑘 = 3. [7]
4.1.7 Minimum and Maximum Power Level
𝑃𝑖(𝑘) ≤ 𝑃𝑖,𝑚𝑎𝑥 ∗ 𝛿𝑖(𝑘)
𝑃𝑖(𝑘) ≥ 𝑃𝑖,𝑚𝑖𝑛 ∗ 𝛿𝑖(𝑘)
These state that if a DG generator is on at a certain time, the power level for that generator must remain
within a certain observed min or max level. [7]
4.1.8 Ramp up Limits
𝑃𝑖(𝑘 + 1) − 𝑃𝑖(𝑘) ≤ 𝑅𝑖,𝑚𝑎𝑥 ∗ 𝛿𝑖(𝑘 + 1)
𝑃𝑖(𝑘) − 𝑃𝑖(𝑘 + 1) ≤ 𝑅𝑖,𝑚𝑎𝑥 ∗ 𝛿𝑖(𝑘)
These constraints enforce the ramp-up/ramp-down limits of each of the generators. Basically, they state
that the magnitude of the difference between the power levels of a given generator at two consecutive
time steps must be less than a certain value known as the ramp-up/ramp-down limit. The ramp-up and
ramp-down limits are natural constraints of a generator that exist because a generator can only increase or
decrease its level of power by a certain range within a given time. For simplicity in the modeling, the
ramp-up and ramp-down limits are assumed to be equal. [7]
(13)
(14)
(15)
(16)
11
4.1.9 Curtailments
𝛽ℎ(𝑘) ≤ 𝛽ℎ,𝑚𝑎𝑥
𝛽ℎ(𝑘) ≥ 𝛽ℎ,𝑚𝑖𝑛
These enforce the curtailments of a given controllable load to stay between the pre-determined min and
max curtailment levels.
4.1.10 Generators’ Fuel Cost – Quadratic to Linear
𝑚𝑖(𝑠) ∗ 𝑃𝑖(𝑘) + 𝑏𝑖(𝑠) ∗ 𝛿𝑖(𝑘) ≤ 𝐷𝐺𝑖
𝑐𝑜𝑠𝑡
(𝑘) ∗ 4
Because the function of the DG generators’ fuel cost with respect to power generated is a quadratic
function rather than a linear function, steps had to be taken to translate this quadratic constraint into linear
constraints (19) for the solver to accept them. The result of this translation is a series of lines that
approximate the quadratic curve. The more lines used in this approximation, the more accurate it is. An
illustration and further description of this process is shown below.
Figure 1: Power generated vs. fuel Cost in a DG generator
The red dots along the quadratic curve represent points chosen in the creation of the linear approximation
constraints (the rainbow lines in the figure). Points are chosen to be approximately equidistant along the
course of the entire useful length of the curve - where the curve will begin at the lower bound and end at
the upper bound of power generation of the specified DG unit. The linear approximation lines are derived
from two consecutive chosen points. Slope and y-intercept of these lines are then calculated and imported
into the solver as linear constraints.
The defined variables below represent the slopes and y- intercepts of each of these lines used in the
quadratic approximations.
Slope = 𝑚𝑖(𝑠)
y-int = 𝑏𝑖(𝑠)
(17)
(18)
(19)
12
Where s is the set of which the linear approximation lines belong to.
The 4 multiplied by the DG fuel cost on the right hand side of the constraint is used to prevent DG fuel
costs from being charged by the kilowatt hour instead of the kilowatt quarter-hour that is required since
all of the time steps used are in 15 minute intervals.
4.1.11 Energy Balance
1
4
∑ 𝑃𝑖(𝑘)
3
𝑖=0
+ 𝑃 𝑟𝑒𝑠(𝑘) + 𝛷𝑟𝑒𝑠(𝑘) + 𝑃𝐼
𝑔
(𝑘) + 𝑃 𝐷
𝑏(𝑘)
= ∑ 𝐷𝑙
2
𝑙=0
(𝑘) + 𝛷 𝑐𝑟𝑖𝑡(𝑘) + (1 − 𝛽0(𝑘)) ∗ 𝐷0
𝑐(𝑘) + 𝛷 𝑐𝑛𝑡𝑟
0 (𝑘) + (1 − 𝛽1(𝑘)) ∗ 𝐷1
𝑐(𝑘)
+𝛷 𝑐𝑛𝑡𝑟
1 (𝑘) + 𝑃𝐸
𝑔
(𝑘) + 𝑃𝐶
𝑏
+ 166.67 ∗ 𝑃𝑐𝑜𝑜𝑙(𝑘) + 166.67 ∗ 𝑃ℎ𝑒𝑎𝑡(𝑘)
Toggle functions:
 Solar power toggle = 𝛷𝑟𝑒𝑠(𝑘) = (𝐿 𝑛(𝑘) ∗ 𝑃 𝑟𝑒𝑠(𝑘) ∗ 𝑐𝑜𝑛𝑓 𝑟𝑒𝑠)
 Critical demand toggle = 𝛷 𝑐𝑟𝑖𝑡(𝑘) = (𝐿 𝑛(𝑘) ∗ ∑ 𝐷𝑙
2
𝑙=0 (𝑘) ∗ 𝑐𝑜𝑛𝑓 𝑑𝑒𝑚
)
 Controllable demand 0 toggle = 𝛷 𝑐𝑛𝑡𝑟
0 (𝑘) = ((1 − 𝛽0(𝑘)) ∗ 𝐷0
𝑐(𝑘) ∗ 𝐿 𝑛(𝑘) ∗ 𝑐𝑜𝑛𝑓 𝑑𝑒𝑚
)
 Controllable demand 1 toggle = 𝛷 𝑐𝑛𝑡𝑟
1 (𝑘) = ((1 − 𝛽1(𝑘)) ∗ 𝐷1
𝑐(𝑘) ∗ 𝐿 𝑛(𝑘) ∗ 𝑐𝑜𝑛𝑓 𝑑𝑒𝑚
)
Where:
 𝐿 𝑛(𝑘) = the scenario list of each time step
 𝑐𝑜𝑛𝑓 𝑟𝑒𝑠
= the confidence level of the forecast on the solar panel
 𝑐𝑜𝑛𝑓 𝑑𝑒𝑚
= the confidence level of the forecast on the demand – both critical and controllable
The above constraint (20) is the energy balance constraint and is, arguably, the most important constraint
in the model. It enforces that power put in to the system (by generators, solar panels, grid imports, or
discharges from the battery) must be equal to the power leaving the system (used by critical and
controllable demand, exporting to the grid, charging the battery, and HVAC system). Basically, power in
is equal to power out.
These constraints receive an extra level of complication as some of the stochastic modeling process is
formulated here. The “Toggle functions” defined above are used to model the uncertainty in the
forecasted future. They represent that at each time step a certain variable, for example the amount of solar
power produced, will vary between a certain range. For simplicity sake, instead of attempting to model an
(20)
13
entire distribution for how each variable might vary at each time step, a confidence level was chosen to
create somewhat realistic upper and lower bounds. So if the amount of solar power generated is forecast
to be 20 kWh for a time-step and the confidence interval is chosen to be .2, then the model will “toggle”
randomly between 24 kWh and 16kWh as possible outcomes at the end of the time-step. The solver will
make decisions based on the fact that the forecast value will either be 20% greater or 20% less than the
predicted value. The 𝐿 𝑛(𝑘) list defines if the variables will toggle up or down in the given scenario for the
given time step.
4.1.12 Charging and Discharging Limits
𝑃𝐶
𝑏(𝑘) ≤ 𝑥 𝑚𝑎𝑥
𝑏
− 𝑥 𝑏
(𝑘)
𝑃 𝐷
𝑏(𝑘) ≤ 𝑥 𝑏(𝑘) − 𝑥 𝑚𝑖𝑛
𝑏
Constraint (21) makes sure that the amount of energy charged may only be as great as the difference
between the max energy level of the battery and how much is already in it. Constraint (22) makes sure
that the amount of energy discharged may only be as great as the difference between the current energy
level and the min energy level of the battery.
4.1.13 Leftover Energy Reward
𝑥 𝑟𝑒𝑤𝑎𝑟𝑑
𝑏
= 𝑥 𝑏(𝑘_𝑓𝑖𝑛𝑎𝑙) −
𝑥 𝑚𝑎𝑥
𝑏
2
This constraint gives an economic reward for having leftover energy in the battery at the end of the run, or
it creates an economic consequence for not having enough energy leftover. In this model, the goal is set to
have half of the max energy of the battery at the end of the run. If there is over half of the energy of the
battery leftover, then the excess energy (energy above the 50% level of the max battery storage) will be
sold to the grid to make extra money; if there is less than half, then energy will be purchased from the grid
until the battery is at 50% of max storage capacity.
4.2 HVAC Constraints
4.2.1 Room Temperatures
𝑡𝑒𝑚𝑝1(𝑘) = . 151 ∗ 𝑡𝑒𝑚𝑝1(𝑘 − 1) + .4387 ∗ 𝑡𝑒𝑚𝑝2(𝑘 − 1) + .2990 ∗ 𝑡𝑒𝑚𝑝3(𝑘 − 1)
+9.9074 ∗ 𝑃ℎ𝑒𝑎𝑡(𝑘 − 1) − 9.9074 ∗ 𝑃𝑐𝑜𝑜𝑙(𝑘 − 1) + .0624 ∗ 𝑡𝑒𝑚𝑝 𝑜𝑢𝑡(𝑘 − 1)
+.0488 ∗ 𝑡𝑒𝑚𝑝𝑠𝑘𝑦(𝑘 − 1) + .0014 ∗ 𝑄𝑖𝑛(𝑘 − 1) + .0055 ∗ 𝑄𝑠𝑢𝑛(𝑘 − 1)
𝑡𝑒𝑚𝑝2(𝑘) = . 0074 ∗ 𝑡𝑒𝑚𝑝1(𝑘 − 1) + .9848 ∗ 𝑡𝑒𝑚𝑝2(𝑘 − 1) + .0064 ∗ 𝑡𝑒𝑚𝑝3(𝑘 − 1)
+.01086 ∗ 𝑃ℎ𝑒𝑎𝑡(𝑘 − 1) − .01086 ∗ 𝑃𝑐𝑜𝑜𝑙(𝑘 − 1) + .00008 ∗ 𝑡𝑒𝑚𝑝 𝑜𝑢𝑡(𝑘 − 1)
+.0006 ∗ 𝑡𝑒𝑚𝑝𝑠𝑘𝑦(𝑘 − 1) + .0005 ∗ 𝑄𝑠𝑢𝑛(𝑘 − 1)
(21)
(22)
(23)
(24)
(25)
14
𝑡𝑒𝑚𝑝3(𝑘) = . 0332 ∗ 𝑡𝑒𝑚𝑝1(𝑘 − 1) + .0417 ∗ 𝑡𝑒𝑚𝑝2(𝑘 − 1) + .5594 ∗ 𝑡𝑒𝑚𝑝3(𝑘 − 1)
+.5718 ∗ 𝑃ℎ𝑒𝑎𝑡(𝑘 − 1) − .5718 ∗ 𝑃𝑐𝑜𝑜𝑙(𝑘 − 1) + .2048 ∗ 𝑡𝑒𝑚𝑝 𝑜𝑢𝑡(𝑘 − 1)
+.1609 ∗ 𝑡𝑒𝑚𝑝𝑠𝑘𝑦(𝑘 − 1) + .0001 ∗ 𝑄𝑖𝑛(𝑘 − 1) + .0176 ∗ 𝑄𝑠𝑢𝑛(𝑘 − 1)
These constraints model the function of the HVAC unit where parameters were assigned based upon data
from Oak Ridge National Labs [6]. Basically, the temperature at a given time 𝑘 of a given room (1,2, or
3) is based solely upon conditions from the previous time step. The inputs influencing the condition at
each of these previous time steps include the temperature of all given rooms, amount of power provided
for heating and cooling, temperature outside at ground level, temperature of the sky, heat entering from
the sun, and all other incoming sources of heat.
4.2.2 Power used for Heating and Cooling
𝑃ℎ𝑒𝑎𝑡(𝑘) ≥ .3 ∗ 𝛿ℎ𝑒𝑎𝑡
(𝑘)
𝑃ℎ𝑒𝑎𝑡(𝑘) ≤ 𝛿ℎ𝑒𝑎𝑡
(𝑘)
𝑃𝑐𝑜𝑜𝑙(𝑘) ≥ .3 ∗ 𝛿 𝑐𝑜𝑜𝑙
(𝑘)
𝑃𝑐𝑜𝑜𝑙(𝑘) ≤ 𝛿 𝑐𝑜𝑜𝑙
(𝑘)
These constraints prevent the power of the heating or cooling unit of running at less than 30% capacity if
the specified unit is on. They basically set a minimum capacity (chosen to be 30% in this model) that a
heating or cooling unit may run while still on.
4.2.3 Heating vs. Cooling
𝛿ℎ𝑒𝑎𝑡(𝑘) + 𝛿 𝑐𝑜𝑜𝑙(𝑘) ≤ 1
The heating and cooling units may not both be on at the same time; however, they may both be off at a
given time.
4.2.4 Temperature Bands
𝑡𝑒𝑚𝑝1(𝑘) ≥ 𝑡𝑒𝑚𝑝1
𝑠𝑒𝑡
− 𝑡𝑒𝑚𝑝 𝑏𝑎𝑛𝑑
𝑡𝑒𝑚𝑝1(𝑘) ≤ 𝑡𝑒𝑚𝑝1
𝑠𝑒𝑡
+ 𝑡𝑒𝑚𝑝 𝑏𝑎𝑛𝑑
𝑡𝑒𝑚𝑝2(𝑘) ≥ 𝑡𝑒𝑚𝑝2
𝑠𝑒𝑡
− 𝑡𝑒𝑚𝑝 𝑏𝑎𝑛𝑑
𝑡𝑒𝑚𝑝2(𝑘) ≤ 𝑡𝑒𝑚𝑝2
𝑠𝑒𝑡
+ 𝑡𝑒𝑚𝑝 𝑏𝑎𝑛𝑑
(26)
(27)
(28)
(29)
(30)
(31)
(32)
(33)
(34)
(35)
15
𝑡𝑒𝑚𝑝3(𝑘) ≥ 𝑡𝑒𝑚𝑝3
𝑙𝑏
𝑡𝑒𝑚𝑝3(𝑘) ≤ 𝑡𝑒𝑚𝑝3
𝑢𝑏
In these constraints, the temperature for rooms 1 and 2 are determined to stay within a specified range
(known as the temperature band) from the originally set temperature. It means if the set temperature for
room 1 was chosen to be 20°C and the temperature band was chosen to be 5°C, then the temperature of
room 1 must stay in between 15°C and 25°C.
Room 3 is excused from the temperature band constraints because it is assumed to be an attic of sorts in
this model. The temperature of this room is not as important and thus is neglected somewhat in order to
conserve energy for the system. Therefore, only modest upper and lower bounds are enforced for the
temperature of this room.
4.2.5 Initial States
𝑡𝑒𝑚𝑝1(0) = 𝑡𝑒𝑚𝑝1
𝑖𝑛𝑖𝑡
𝑡𝑒𝑚𝑝2(0) = 𝑡𝑒𝑚𝑝2
𝑖𝑛𝑖𝑡
𝑡𝑒𝑚𝑝3(0) = 𝑡𝑒𝑚𝑝3
𝑖𝑛𝑖𝑡
𝛿ℎ𝑒𝑎𝑡(0) = 0
𝛿 𝑐𝑜𝑜𝑙(0) = 0
Initial temperatures for each of the three rooms are determined by a specified input, and the heating and
cooling units are determined to be off at the beginning of the period.
4.3 Nonanticipatory Constraints
In order to make the optimally solved solution as realistic as possible, certain constraints must be added to
prevent the solver from finding solutions that do not take into consideration the fact that at each time step
a decision is made without certain knowledge of the future. These constraints are called nonanticipatory
constraints. They are necessary when modeling decisions that have uncertain outcomes and where
specific potential outcomes are accounted for in the decision process (i.e. stochastic modeling) instead of
just calculating the expected value at each time step and making decisions based on this one calculated
expected value (i.e. deterministic modeling). This is because stochastic models evaluate final end
scenarios, and to input an end scenario, the information from each time step must be input as well before
the solver ever makes a decision. Without the nonatincipatory constraints, the solver has access to all of
this information and can make a decision for, say, time = 1 with definite knowledge about what will
happen in a future time step, say time = 7. For practical applications this is not realistic. However, a
modeling paradigm using nonanticipatory constraints, formulated below (43), may be used to prevent the
solver from making unrealistic decisions based on knowledge of future time steps. [11]
(37)
(36)
(38)
(39)
(40)
(41)
(42)
16
𝐹𝑜𝑟 𝑎𝑙𝑙 𝑐𝑜𝑚𝑏𝑖𝑛𝑎𝑡𝑖𝑜𝑛𝑠 𝑜𝑓 𝑠1, 𝑠2 ∈ 𝑆:
𝑉 𝑠1(𝑘) = 𝑉 𝑠2(𝑘) if: 𝑆1(𝑘) = 𝑆2(𝑘)
where: 𝑆𝑖(𝑘) = 𝑠𝑐𝑒𝑛𝑎𝑟𝑖𝑜 𝑖𝑛𝑓𝑜 𝑓𝑟𝑜𝑚 𝑡𝑖𝑚𝑒 0 → 𝑇
Where V = all decision variables (refer to Table 4 above).
5. Results
The results of this model include several outputs of interest:
1. A distribution for the cost of running the microgrid for a day with the HVAC unit functional
(Figure 2).
2. A distribution for the cost of running the microgrid for a day with the HVAC unit disabled
(Figure 3).
3. Shadow prices sampled throughout the day for the two conditions of the microgrid – with and
without HVAC unit (Figures 4 and 5).
4. Solar generation for the time steps where shadow prices were sampled (Figure 6).
For both distributions: N = 25, T = 96, simulated for an entire day from 12:00 a.m. to 11:59 p.m.
The parameter of number of scenarios (N = 25) was chosen to create a sizeable distribution. The
parameter of time duration (T = 96) was chosen because at 15 minute intervals for each time step, 96 time
steps equals one day.
Figure 2: Normally distributed output for running microgrid with HVAC unit – via Wolfram Alpha [12]
Figure 3: Normally distributed output for running microgrid without HVAC unit– via Wolfram Alpha [12]
(43)
17
Figure 4: Shadow prices sampled throughout the day with HVAC
Figure 5: Shadow prices sampled throughout the day without HVAC
Figure 6: Solar energy produced during time steps when shadow prices were sampled
0
0.02
0.04
0.06
0.08
0.1
0.12
k = 0 k = 10 k = 20 k = 30 k = 40 k = 50 k = 60 k = 70 k = 80 k = 90
Dollars
Time Step
Shadow Prices - With HVAC
0
0.02
0.04
0.06
0.08
0.1
0.12
k = 0 k = 10 k = 20 k = 30 k = 40 k = 50 k = 60 k = 70 k = 80 k = 90
Dollars
Time Step
Shadow Prices - No HVAC
0
20
40
60
80
100
120
140
160
180
k = 0 k = 10 k = 20 k = 30 k = 40 k = 50 k = 60 k = 70 k = 80 k = 90
EnergyProduced(kWh)
Time Step
PV Generation
18
The first item of interest is the large difference in cost between the outputs where the HVAC unit was
functional where it was not. The first output had a mean of $14,436.60 and the second $629.18; the mean
of the first is more than 22 times the mean of the second. Therefore, it must be concluded that the HVAC
unit constitutes the largest expense to the operations of this microgrid.
Furthermore, in comparing the two normal distributions, the variance was actually lower in the output
with the HVAC unit than the one without the HVAC - though the mean was much higher in the first. This
phenomenon may be explained by looking at the shadow prices between the two in Figures 4 and 5. In
Figure 4, the shadow prices are constantly the purchasing price of the energy grid. This means that the
microgrid was pretty much never able to produce enough energy through solar power and DG generators
to cover the entire cost of operations for a specified time period. To clarify, if there was excess energy
produced by the grid then the cost of adding one kWh at the specified time step (shadow price) would be
the cost of selling one kWh. If the shadow price is the purchasing price of energy at the time step, then it
signifies that the microgrid was ineffective at producing enough energy to stay competitive with the main
power grid at that time step because it is cheaper to buy energy rather than produce its own. This
influences the variance in the model because, where the HVAC is on, the solver makes the same decision
most of the time and leads to a more uniform result; where the HVAC is off, the solver varies more
because sometimes the microgrid sells to the main power network or stores energy due to excess solar
energy produced.
It may also be noticed in comparison between Figures 5 and 6 that the shadow price is less expensive than
the price of purchasing only at the time steps where there is high solar energy produced. In fact, the
shadow prices at these time steps were the selling prices of the network so at time steps 40, 50, and 60 the
microgrid was making money by selling to the power network.
Though shadow price analyses were taken for 25 scenarios in each operating condition, the results in
Figure 4 and 5 are the only results necessary as the shadow prices did not vary at any time step for any of
the scenarios. This is due to the small difference between purchasing and selling price – often only about
5 cents. If the microgrid is not producing much energy at a given time step, then it will likely need to buy
from the main power grid. If it is producing sufficient energy, then it will probably have energy to sell to
the network. There is only a small window in performance of the microgrid where the solver would
operate at a performance level in between the selling and the purchasing price of a kWh. Though there are
likely time steps where this did occur in the model, it was not recorded in the shadow price analyses for
the time steps chosen.
To validate the accuracy of this model, data about energy purchasing prices and energy usage was taken
from the U.S. Energy Information Administration. The most recent average retail price for one kWh of
electricity is given to be ¢10.33 [13]. Also, they state that the average annual electricity consumption in
2014 for a U.S. residential customer was 10,932 kWh [14]. For comparison, without the HVAC system,
this model is programmed to use 10,138 kWh of electricity in a day – about the same as annual usage of a
residential customer. So if the model (HVAC off) were to run entirely off of electricity purchased from
the power network, then expected costs would be about $1,047.29 = 10,138 kWh*¢10.33. The output for
the model averaged to $629.18. This difference in cost is reasonably explained due to money saved from
using solar power.
6. Discussion
Based on the reasonableness of the results produced from the model, it may be concluded that the model
was successful at simulating a microgrid for a day. Furthermore, the model also helped to highlight the
19
large costs of operating an HVAC unit. Granted, the HVAC unit parameters might have been excessively
large compared to the rest of the load required, the potentially staggering costs of operating an HVAC
unit for a large building (say a manufacturing plant) is brought to awareness.
The efficacy of shadow price analyses and stochastic programming were also confirmed in this research.
The shadow price analysis provided a surprisingly useful tool for insight into the efficiency of microgrid
performance. It was easy to see at what times the microgrid was doing well and what percentage of times
the microgrid was reducing costs of producing power. They also served a useful purpose of debugging in
the model. For example, if a shadow price is greater than the purchasing price from the grid or smaller
than the selling price, it is obvious there is a problem. Stochastic programming, though the most difficult
and time-consuming part of the model creation, succeeded in creating randomness and thus realism in the
model. However, I recommend that before stochastic programming procedures are used, a serious trade
off study be performed to determine the optimal balance between model realism versus time, effort, and
money allocated to the project as stochastic programming can be a large burden to a project.
7. Conclusion
The techniques evaluated in this study may be deemed effective for future microgrid optimization work.
The shadow price analysis especially offers a clear look into the effectiveness of microgrid operations at
every time period and perhaps should be used more in evaluating microgrid operations. Furthermore,
stochastic programming offers an opportunity to more realistically model practical use of operations as
most processes vary with time. With increased focus from clear end requirements, these techniques could
be used to provide greater understanding of microgrid operations which could then be used for the
advancement of clean energy into the realm of practical use.
8. References
1. Burt, Erica, Peter Orris, and Susan Buchanan. "Scientific Evidence of Health Effects from Coal Use in
Energy Generation." Healthcare Research Colloborative, 1 Apr. 2013. Web. 2016.
2. Pieprzyk, Björn, Norbert Kortlüke, and Paula Rojas Hilje. "The Impact of Fossil Fuels: Greenhouse
Gas Emissions, Environmental Consequences and Socio Socio-economic Effects." Energy Research
Architecture, 1 Nov. 2009. Web. 17 Jan. 2016.
3. Elliott, David. "Environmental Issues: Health, Safety and Social Impacts." Green Energy Futures: A
Big Change for the Good. Basingstoke: Palgrave Macmillan, 2015. 20-38. Print.
4. Heal, Geoffrey. "The Economics of Renewable Energy." NBER Working Paper Series. National
Bureau of Economic Research, 1 June 2009. Web. 2016.
5. "Microgrid Definitions." Microgrids at Berkeley Labs. 2016. Web.
6. Oak Ridge National Labs. IES Data – Data collected to aid in HVAC unit modeling. 2015. Raw data.
Oak Ridge, Tennessee.
20
7. Glielmo, Luigi, Alessandra Parisio, and Evangelos Rikos. "A Model Predictive Control Approach to
Microgrid Operation Optimization." IEEE Transactions on Control Systems Technology 22.5 (2014):
1813-827. Print.
8. Schneider, Frank. "Introduction." Advances in Stochastic Dynamic Programming for Operations
Management. Berlin: Logos Verlag, 2014. 1-3. Print.
9. Winston, Wayne. "Sensitivity Analysis: An Applied Approach." Operations Research: Applications
and Algorithms. Belmont: Brooks/ Cole, 2004. 227 - 231. Print.
10. Fernandez, Alisha, and Seth Blumsack. "Distributing Electric Energy in Rural America Efficiently
and Economically: The Micro-grid Option." Penn State, 2010. Web. 2016.
11. Louveaux, François, and John Birge. "Introduction and Examples." Introduction to Stochastic
Programming. New York: Springer-Verlag New York, 1997. 4 - 28. Print.
12. Wolfram Alpha. Web. <http://www.wolframalpha.com/>.
13. "Electricity Data Browser." U.S. Energy Information Administration. 1 Oct. 2015. Web. 2016.
<http://www.eia.gov/electricity/data/browser/#/topic/7?agg=2,0,1&geo=g&freq=M>.
14. "Frequently Asked Questions." U.S. Energy Information Administration. 21 Oct. 2015. Web. 2016.
<http://www.eia.gov/tools/faqs/faq.cfm?id=97&t=3>.

More Related Content

What's hot

Optimal tuning of a wind plant energy production based on improved grey wolf ...
Optimal tuning of a wind plant energy production based on improved grey wolf ...Optimal tuning of a wind plant energy production based on improved grey wolf ...
Optimal tuning of a wind plant energy production based on improved grey wolf ...journalBEEI
 
Reliability Constrained Unit Commitment Considering the Effect of DG and DR P...
Reliability Constrained Unit Commitment Considering the Effect of DG and DR P...Reliability Constrained Unit Commitment Considering the Effect of DG and DR P...
Reliability Constrained Unit Commitment Considering the Effect of DG and DR P...IJECEIAES
 
Adjusting post processing approach for very short-term solar power forecasts
Adjusting post processing approach for very short-term solar power forecastsAdjusting post processing approach for very short-term solar power forecasts
Adjusting post processing approach for very short-term solar power forecastsMohamed Abuella
 
Probability based scenario analysis &amp; ramping correction factor in wind p...
Probability based scenario analysis &amp; ramping correction factor in wind p...Probability based scenario analysis &amp; ramping correction factor in wind p...
Probability based scenario analysis &amp; ramping correction factor in wind p...Das A. K.
 
Short Presentation: Mohamed abuella's Research Highlights
Short Presentation: Mohamed abuella's Research HighlightsShort Presentation: Mohamed abuella's Research Highlights
Short Presentation: Mohamed abuella's Research HighlightsMohamed Abuella
 
2018 solar energy forecasting based on hybrid neural network and improved met...
2018 solar energy forecasting based on hybrid neural network and improved met...2018 solar energy forecasting based on hybrid neural network and improved met...
2018 solar energy forecasting based on hybrid neural network and improved met...Souvik Ganguli
 
The quality of data and the accuracy of energy generation forecast by artific...
The quality of data and the accuracy of energy generation forecast by artific...The quality of data and the accuracy of energy generation forecast by artific...
The quality of data and the accuracy of energy generation forecast by artific...IJECEIAES
 
Reversible data hiding with optimal value transfer
Reversible data hiding with optimal value transferReversible data hiding with optimal value transfer
Reversible data hiding with optimal value transferIEEEFINALYEARPROJECTS
 
Smart grid cost optimization using genetic algorithm
Smart grid cost optimization using genetic algorithmSmart grid cost optimization using genetic algorithm
Smart grid cost optimization using genetic algorithmeSAT Publishing House
 
Load Shifting Technique on 24Hour Basis for a Smart-Grid to Reduce Cost and P...
Load Shifting Technique on 24Hour Basis for a Smart-Grid to Reduce Cost and P...Load Shifting Technique on 24Hour Basis for a Smart-Grid to Reduce Cost and P...
Load Shifting Technique on 24Hour Basis for a Smart-Grid to Reduce Cost and P...IRJET Journal
 
Source resizing and improved power distribution for high available island mic...
Source resizing and improved power distribution for high available island mic...Source resizing and improved power distribution for high available island mic...
Source resizing and improved power distribution for high available island mic...Mohamed Ghaieth Abidi
 
Wind power forecasting: A Case Study in Terrain using Artificial Intelligence
Wind power forecasting: A Case Study in Terrain using Artificial IntelligenceWind power forecasting: A Case Study in Terrain using Artificial Intelligence
Wind power forecasting: A Case Study in Terrain using Artificial IntelligenceIRJET Journal
 
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...IJERA Editor
 
Cost Aware Expansion Planning with Renewable DGs using Particle Swarm Optimiz...
Cost Aware Expansion Planning with Renewable DGs using Particle Swarm Optimiz...Cost Aware Expansion Planning with Renewable DGs using Particle Swarm Optimiz...
Cost Aware Expansion Planning with Renewable DGs using Particle Swarm Optimiz...IJERA Editor
 
Solar Photovoltaic Power Forecasting in Jordan using Artificial Neural Networks
Solar Photovoltaic Power Forecasting in Jordan using Artificial Neural NetworksSolar Photovoltaic Power Forecasting in Jordan using Artificial Neural Networks
Solar Photovoltaic Power Forecasting in Jordan using Artificial Neural NetworksIJECEIAES
 

What's hot (18)

Optimal tuning of a wind plant energy production based on improved grey wolf ...
Optimal tuning of a wind plant energy production based on improved grey wolf ...Optimal tuning of a wind plant energy production based on improved grey wolf ...
Optimal tuning of a wind plant energy production based on improved grey wolf ...
 
Reliability Constrained Unit Commitment Considering the Effect of DG and DR P...
Reliability Constrained Unit Commitment Considering the Effect of DG and DR P...Reliability Constrained Unit Commitment Considering the Effect of DG and DR P...
Reliability Constrained Unit Commitment Considering the Effect of DG and DR P...
 
Adjusting post processing approach for very short-term solar power forecasts
Adjusting post processing approach for very short-term solar power forecastsAdjusting post processing approach for very short-term solar power forecasts
Adjusting post processing approach for very short-term solar power forecasts
 
Adaptive backstepping controller design based on neural network for PMSM spee...
Adaptive backstepping controller design based on neural network for PMSM spee...Adaptive backstepping controller design based on neural network for PMSM spee...
Adaptive backstepping controller design based on neural network for PMSM spee...
 
Probability based scenario analysis &amp; ramping correction factor in wind p...
Probability based scenario analysis &amp; ramping correction factor in wind p...Probability based scenario analysis &amp; ramping correction factor in wind p...
Probability based scenario analysis &amp; ramping correction factor in wind p...
 
Short Presentation: Mohamed abuella's Research Highlights
Short Presentation: Mohamed abuella's Research HighlightsShort Presentation: Mohamed abuella's Research Highlights
Short Presentation: Mohamed abuella's Research Highlights
 
2018 solar energy forecasting based on hybrid neural network and improved met...
2018 solar energy forecasting based on hybrid neural network and improved met...2018 solar energy forecasting based on hybrid neural network and improved met...
2018 solar energy forecasting based on hybrid neural network and improved met...
 
The quality of data and the accuracy of energy generation forecast by artific...
The quality of data and the accuracy of energy generation forecast by artific...The quality of data and the accuracy of energy generation forecast by artific...
The quality of data and the accuracy of energy generation forecast by artific...
 
Reversible data hiding with optimal value transfer
Reversible data hiding with optimal value transferReversible data hiding with optimal value transfer
Reversible data hiding with optimal value transfer
 
Smart grid cost optimization using genetic algorithm
Smart grid cost optimization using genetic algorithmSmart grid cost optimization using genetic algorithm
Smart grid cost optimization using genetic algorithm
 
Integration of artificial neural networks for multi-source energy management ...
Integration of artificial neural networks for multi-source energy management ...Integration of artificial neural networks for multi-source energy management ...
Integration of artificial neural networks for multi-source energy management ...
 
Load Shifting Technique on 24Hour Basis for a Smart-Grid to Reduce Cost and P...
Load Shifting Technique on 24Hour Basis for a Smart-Grid to Reduce Cost and P...Load Shifting Technique on 24Hour Basis for a Smart-Grid to Reduce Cost and P...
Load Shifting Technique on 24Hour Basis for a Smart-Grid to Reduce Cost and P...
 
Source resizing and improved power distribution for high available island mic...
Source resizing and improved power distribution for high available island mic...Source resizing and improved power distribution for high available island mic...
Source resizing and improved power distribution for high available island mic...
 
Wind power forecasting: A Case Study in Terrain using Artificial Intelligence
Wind power forecasting: A Case Study in Terrain using Artificial IntelligenceWind power forecasting: A Case Study in Terrain using Artificial Intelligence
Wind power forecasting: A Case Study in Terrain using Artificial Intelligence
 
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
 
Cost Aware Expansion Planning with Renewable DGs using Particle Swarm Optimiz...
Cost Aware Expansion Planning with Renewable DGs using Particle Swarm Optimiz...Cost Aware Expansion Planning with Renewable DGs using Particle Swarm Optimiz...
Cost Aware Expansion Planning with Renewable DGs using Particle Swarm Optimiz...
 
Solar Photovoltaic Power Forecasting in Jordan using Artificial Neural Networks
Solar Photovoltaic Power Forecasting in Jordan using Artificial Neural NetworksSolar Photovoltaic Power Forecasting in Jordan using Artificial Neural Networks
Solar Photovoltaic Power Forecasting in Jordan using Artificial Neural Networks
 
G42013438
G42013438G42013438
G42013438
 

Similar to Investigation and Evaluation of Microgrid Optimization Techniques

A Comparison of Energy Management System
A Comparison of Energy Management SystemA Comparison of Energy Management System
A Comparison of Energy Management SystemVICTOR MAESTRE RAMIREZ
 
Optimal state estimation techniques for accurate measurements in internet of...
Optimal state estimation techniques for accurate measurements  in internet of...Optimal state estimation techniques for accurate measurements  in internet of...
Optimal state estimation techniques for accurate measurements in internet of...IJECEIAES
 
Energy Management System in Smart Microgrid Using Multi Objective Grey Wolf O...
Energy Management System in Smart Microgrid Using Multi Objective Grey Wolf O...Energy Management System in Smart Microgrid Using Multi Objective Grey Wolf O...
Energy Management System in Smart Microgrid Using Multi Objective Grey Wolf O...IRJET Journal
 
energies-11-00847.pdf
energies-11-00847.pdfenergies-11-00847.pdf
energies-11-00847.pdfDaviesRene
 
IRJET- Survey of Micro Grid Cost Reduction Techniques
IRJET-  	  Survey of Micro Grid Cost Reduction TechniquesIRJET-  	  Survey of Micro Grid Cost Reduction Techniques
IRJET- Survey of Micro Grid Cost Reduction TechniquesIRJET Journal
 
Renewable Energy Driven Optimized Microgrid System: A Case Study with Hybrid ...
Renewable Energy Driven Optimized Microgrid System: A Case Study with Hybrid ...Renewable Energy Driven Optimized Microgrid System: A Case Study with Hybrid ...
Renewable Energy Driven Optimized Microgrid System: A Case Study with Hybrid ...IRJET Journal
 
Hybrid micro grid systems drivers & challenges
Hybrid micro grid systems   drivers & challengesHybrid micro grid systems   drivers & challenges
Hybrid micro grid systems drivers & challengesAlexander Decker
 
Microgrid paper camera copy final draft
Microgrid paper camera copy final draftMicrogrid paper camera copy final draft
Microgrid paper camera copy final draftRavi Patel
 
Design and Control Issues of Microgrids : A Survey
Design and Control Issues of Microgrids : A SurveyDesign and Control Issues of Microgrids : A Survey
Design and Control Issues of Microgrids : A SurveyIRJET Journal
 
A review of optimal operation of microgrids
A review of optimal operation of microgrids A review of optimal operation of microgrids
A review of optimal operation of microgrids IJECEIAES
 
Target Response Electrical usage Profile Clustering using Big Data
Target Response Electrical usage Profile Clustering using Big DataTarget Response Electrical usage Profile Clustering using Big Data
Target Response Electrical usage Profile Clustering using Big DataIRJET Journal
 
COORDINATED CONTROL AND ENERGY MANAGEMENT OF DISTRIBUTED GENERATION INVERTERS...
COORDINATED CONTROL AND ENERGY MANAGEMENT OF DISTRIBUTED GENERATION INVERTERS...COORDINATED CONTROL AND ENERGY MANAGEMENT OF DISTRIBUTED GENERATION INVERTERS...
COORDINATED CONTROL AND ENERGY MANAGEMENT OF DISTRIBUTED GENERATION INVERTERS...ijiert bestjournal
 
Optimal control in microgrid using multi agent reinforcement learning
Optimal control in microgrid using multi agent reinforcement learningOptimal control in microgrid using multi agent reinforcement learning
Optimal control in microgrid using multi agent reinforcement learningISA Interchange
 
New forecasting-based solutions for optimal energy consumption in microgrids ...
New forecasting-based solutions for optimal energy consumption in microgrids ...New forecasting-based solutions for optimal energy consumption in microgrids ...
New forecasting-based solutions for optimal energy consumption in microgrids ...Mohamed Ghaieth Abidi
 
Optimum Location of DG Units Considering Operation Conditions
Optimum Location of DG Units Considering Operation ConditionsOptimum Location of DG Units Considering Operation Conditions
Optimum Location of DG Units Considering Operation ConditionsEditor IJCATR
 
Electricity Supply Systems of the Future
Electricity Supply Systems of the FutureElectricity Supply Systems of the Future
Electricity Supply Systems of the FutureLeonardo ENERGY
 
Integrated Coordination of Electric Vehicle Operations and Renewable Energy G...
Integrated Coordination of Electric Vehicle Operations and Renewable Energy G...Integrated Coordination of Electric Vehicle Operations and Renewable Energy G...
Integrated Coordination of Electric Vehicle Operations and Renewable Energy G...IJECEIAES
 
Study on the performance indicators for smart grids: a comprehensive review
Study on the performance indicators for smart grids: a comprehensive reviewStudy on the performance indicators for smart grids: a comprehensive review
Study on the performance indicators for smart grids: a comprehensive reviewTELKOMNIKA JOURNAL
 

Similar to Investigation and Evaluation of Microgrid Optimization Techniques (20)

A Comparison of Energy Management System
A Comparison of Energy Management SystemA Comparison of Energy Management System
A Comparison of Energy Management System
 
my project
my projectmy project
my project
 
Optimal state estimation techniques for accurate measurements in internet of...
Optimal state estimation techniques for accurate measurements  in internet of...Optimal state estimation techniques for accurate measurements  in internet of...
Optimal state estimation techniques for accurate measurements in internet of...
 
Energy Management System in Smart Microgrid Using Multi Objective Grey Wolf O...
Energy Management System in Smart Microgrid Using Multi Objective Grey Wolf O...Energy Management System in Smart Microgrid Using Multi Objective Grey Wolf O...
Energy Management System in Smart Microgrid Using Multi Objective Grey Wolf O...
 
energies-11-00847.pdf
energies-11-00847.pdfenergies-11-00847.pdf
energies-11-00847.pdf
 
IRJET- Survey of Micro Grid Cost Reduction Techniques
IRJET-  	  Survey of Micro Grid Cost Reduction TechniquesIRJET-  	  Survey of Micro Grid Cost Reduction Techniques
IRJET- Survey of Micro Grid Cost Reduction Techniques
 
Renewable Energy Driven Optimized Microgrid System: A Case Study with Hybrid ...
Renewable Energy Driven Optimized Microgrid System: A Case Study with Hybrid ...Renewable Energy Driven Optimized Microgrid System: A Case Study with Hybrid ...
Renewable Energy Driven Optimized Microgrid System: A Case Study with Hybrid ...
 
Hybrid micro grid systems drivers & challenges
Hybrid micro grid systems   drivers & challengesHybrid micro grid systems   drivers & challenges
Hybrid micro grid systems drivers & challenges
 
Microgrid paper camera copy final draft
Microgrid paper camera copy final draftMicrogrid paper camera copy final draft
Microgrid paper camera copy final draft
 
Design and Control Issues of Microgrids : A Survey
Design and Control Issues of Microgrids : A SurveyDesign and Control Issues of Microgrids : A Survey
Design and Control Issues of Microgrids : A Survey
 
R.muthukumar, Analysis of Dynamic Stability of Microgrid
R.muthukumar, Analysis of Dynamic Stability of MicrogridR.muthukumar, Analysis of Dynamic Stability of Microgrid
R.muthukumar, Analysis of Dynamic Stability of Microgrid
 
A review of optimal operation of microgrids
A review of optimal operation of microgrids A review of optimal operation of microgrids
A review of optimal operation of microgrids
 
Target Response Electrical usage Profile Clustering using Big Data
Target Response Electrical usage Profile Clustering using Big DataTarget Response Electrical usage Profile Clustering using Big Data
Target Response Electrical usage Profile Clustering using Big Data
 
COORDINATED CONTROL AND ENERGY MANAGEMENT OF DISTRIBUTED GENERATION INVERTERS...
COORDINATED CONTROL AND ENERGY MANAGEMENT OF DISTRIBUTED GENERATION INVERTERS...COORDINATED CONTROL AND ENERGY MANAGEMENT OF DISTRIBUTED GENERATION INVERTERS...
COORDINATED CONTROL AND ENERGY MANAGEMENT OF DISTRIBUTED GENERATION INVERTERS...
 
Optimal control in microgrid using multi agent reinforcement learning
Optimal control in microgrid using multi agent reinforcement learningOptimal control in microgrid using multi agent reinforcement learning
Optimal control in microgrid using multi agent reinforcement learning
 
New forecasting-based solutions for optimal energy consumption in microgrids ...
New forecasting-based solutions for optimal energy consumption in microgrids ...New forecasting-based solutions for optimal energy consumption in microgrids ...
New forecasting-based solutions for optimal energy consumption in microgrids ...
 
Optimum Location of DG Units Considering Operation Conditions
Optimum Location of DG Units Considering Operation ConditionsOptimum Location of DG Units Considering Operation Conditions
Optimum Location of DG Units Considering Operation Conditions
 
Electricity Supply Systems of the Future
Electricity Supply Systems of the FutureElectricity Supply Systems of the Future
Electricity Supply Systems of the Future
 
Integrated Coordination of Electric Vehicle Operations and Renewable Energy G...
Integrated Coordination of Electric Vehicle Operations and Renewable Energy G...Integrated Coordination of Electric Vehicle Operations and Renewable Energy G...
Integrated Coordination of Electric Vehicle Operations and Renewable Energy G...
 
Study on the performance indicators for smart grids: a comprehensive review
Study on the performance indicators for smart grids: a comprehensive reviewStudy on the performance indicators for smart grids: a comprehensive review
Study on the performance indicators for smart grids: a comprehensive review
 

Investigation and Evaluation of Microgrid Optimization Techniques

  • 1. 1 Investigation and Evaluation of Microgrid Optimization Techniques Nevin B. Sawyer Department of Industrial & Systems Engineering University of Tennessee – Knoxville Knoxville, TN 37920 U.S.A Abstract With the increasing popularity of alternate energy providing methods, efforts are being made to find intelligent ways to integrate multiple energy sources together for the acquisition of more efficient energy. One effective approach to this strategy is the organization of a microgrid. In order to fully utilize microgrids, mathematical approaches in the form of linear programming are commonly being used for the purposes of economic optimization. The goal of this paper is to explore and evaluate the effects of using stochastic modeling optimization techniques along with shadow price analyses on a microgrid consisting of DG units, a solar panel, a battery, an HVAC unit, and controllable loads -- all in a grid-connected mode. The approach taken for optimization was to construct a mixed integer linear program along a fixed time horizon with the objective of minimizing costs. Stochastic programming over multiple scenarios was used to model uncertainty in the forecasting of data, where future scenarios were sampled from a large population of potential scenarios to construct a distribution of possible future costs. Shadow Price analyses were then used to determine the sensitivity of the optimized solutions to changes in demand at each time step for each scenario. The effects of the mathematical techniques were then evaluated in terms of practicality and effectiveness. Table of Contents 1. Introduction...............................................................................................................................................3 2. Optimization Problem...............................................................................................................................5 3. Objective Function....................................................................................................................................8 4. Constraints ................................................................................................................................................8 4.1 Microgrid Constraints .........................................................................................................................8 4.1.1 Initial Ramp up Limit...................................................................................................................8 4.1.2 Initial Battery State ......................................................................................................................8 4.1.3 Startup and Shutdown Costs ........................................................................................................8 4.1.4 Charging vs. Discharging.............................................................................................................9 4.1.4 Importing vs. Exporting...............................................................................................................9 4.1.5 Battery Losses..............................................................................................................................9
  • 2. 2 4.1.6 Minimum Up and Down Times ...................................................................................................9 4.1.7 Minimum and Maximum Power Level......................................................................................10 4.1.8 Ramp up Limits..........................................................................................................................10 4.1.9 Curtailments...............................................................................................................................11 4.1.10 Generators’ Fuel Cost – Quadratic to Linear...........................................................................11 4.1.11 Energy Balance ........................................................................................................................12 4.1.12 Charging and Discharging Limits............................................................................................13 4.1.13 Leftover Energy Reward..........................................................................................................13 4.2 HVAC Constraints............................................................................................................................13 4.2.1 Room Temperatures...................................................................................................................13 4.2.2 Power used for Heating and Cooling .........................................................................................14 4.2.3 Heating vs. Cooling....................................................................................................................14 4.2.4 Temperature Bands ....................................................................................................................14 4.2.5 Initial States ...............................................................................................................................15 4.3 Nonanticipatory Constraints .............................................................................................................15 5. Results.....................................................................................................................................................16 6. Discussion...............................................................................................................................................18 7. Conclusion ..............................................................................................................................................19 8. References...............................................................................................................................................19
  • 3. 3 1. Introduction he importance of shifting to renewable sources of energy and away from fossil fuels is becoming more evident over time. Fossil fuels are responsible for contributing to air pollution, global warming through greenhouse emissions, and other negative socio-economic consequences [1, 2]. As they are a nonrenewable resource, in the future they will become increasingly more expensive to extract rendering them essentially economically unviable in the long term [2] -- not to mention external social costs associated with poorer environmental and health conditions [3]. Renewable energy, while better for the environment and sustainable long term, experiences difficulties in implementation as it is often not as economically accessible as fossil fuels in the short term [4]. However, practices such as microgrids and microgrid optimization are working to solve the issue of economic feasibility of renewable resources with the hope of eventually relying more on renewable energy sources than fossil fuels. A microgrid may be defined as “electricity distribution systems containing loads and distributed energy resources, (such as distributed generators, storage devices, or controllable loads) that can be operated in a controlled, coordinated way either while connected to the main power network or while islanded” [5]. As this research was conducted without access to a microgrid, parameters and data were estimated as realistically as possible to simulate a microgrid. The microgrid simulation example used in this paper consists of 4 DG (distributed generator) units, one PV (photovoltac) solar panel, one storage unit/ battery, two controllable loads (which may be curtailed with a small economic penalty if needed), three critical loads (which may not be curtailed), energy requirements for an HVAC unit, and a connection to a main power grid to import/ export energy from/ to. Data forecasted at each time step was extrapolated from a similar project studied at Oak Ridge National Labs [6], and parameters for the energy sources were estimated based on findings in A Model Predictive Control Approach to Microgrid Operation Optimzation which studied the effects of microgrid optimization on an experimental microgrid located in Athens, Greece [7]. The program was scripted in Python and optimized using Gurobi Optimizer. Ideally, the microgrid would be run entirely from the PV solar panel, but as this is not always possible due to intermittent sunlight, it must rely on energy from the DG units, imports from the main grid, or energy reserves from the battery to meet demand at any given time. The program created is used to calculate which levels of each energy source should be used at each time step in order to minimize costs. Stochastic programming is then used to model deviations in selected forecasted data as the future is assumed to be nondeterministic. It works by running multiple scenarios where the selected forecasted data will vary in a binary fashion by a determined confidence interval at each step. The direction that the data varies (either positively or negatively by its confidence level) is determined randomly at each time step. The final result of the stochastic modeling of multiple scenarios is to output a distribution for potential prices that running the microgrid over a given number of steps might realistically cost. The stochastic modeling approach adds an increased level of accuracy to the decision making process that the solver undergoes, but it also greatly increases the complexity of the model. Often a trade-off analysis must be considered between the weight of complexity versus accuracy of a model, as a more complex model might be more expensive to construct or have longer solving times [8]. For this model the complexity of a binary stochastic model was used. Though it could have been simpler by taking away the stochastic elements, it also could have been more complex by having the variance at each time step be a full normal distribution, for example, instead of just binary toggling. However for the purposes of this economic analysis, the binary stochastic model was decided to be sufficient. T
  • 4. 4 The scope of this research also includes a shadow price analysis over 10 selected time steps and across 25 of the stochastic scenarios tested. A shadow price may be defined as “for the ith constraint of an LP… the amount by which the optimal z-value is improved—increased in a max problem and decreased in a min problem—if the right-hand side of the ith constraint is increased by 1”[9]. In this model, the optimal z- value is the total cost of running the microgrid, and the constraint used to define the shadow price is the energy balance constraint. The energy balance constraint was chosen because by adding a value of one to the right hand side of this constraint simulates adding a one kWh requirement to the overall demand at the specified time step and scenario. The shadow price analysis then sought to answer the question: for each scenario, how much would it cost to add one kWh of demand at each time step? The answer to this question is important because it gives insight into the effectiveness of the elements of the microgrid at reducing costs of producing power. If a microgrid is unable to produce electricity cheaper than the price of purchasing electricity from the main power grid, then the microgrid might be considered economically uncompetitive [10].
  • 6. 6 Table 2: Parameters (Continued) Table 3: Data Sets
  • 7. 7 Table 4: Decision Variables Table 5: Indices
  • 8. 8 3. Objective Function Minimize: [∑ [∑ [∑[ 𝐷𝐺𝑖,𝑛 𝑐𝑜𝑠𝑡 ( 𝑘) + 𝑂𝑀𝑖 𝛿𝑖,𝑛( 𝑘) + 𝑆𝑈𝑖,𝑛( 𝑘) + 𝑆𝐷𝑖,𝑛( 𝑘)] + 𝑂𝑀 𝑏 𝑃 𝐶; 𝑛 𝑏 ( 𝑘) 𝑁 𝑔 𝑖=1 + 𝑂𝑀 𝑏 𝑃 𝐷; 𝑛 𝑏 ( 𝑘) 𝑁 𝑛=1 𝑇 𝑘=0 + 𝑐 𝑝( 𝑘) 𝑃𝐼; 𝑛 𝑔 ( 𝑘) − 𝑐 𝑠( 𝑘) 𝑃 𝐸; 𝑛 𝑔 ( 𝑘) − 𝑐 𝑠( 𝑘) 𝑥 𝑟𝑒𝑤𝑎𝑟𝑑; 𝑛 𝑏 + ∑ [ 𝜌 𝑐 𝐷ℎ 𝑐 𝛽 ℎ,𝑛 (𝑘)] 𝑁𝑙 ℎ=1 ]]] /𝑁 The objective function is essentially a collection of all of the costs of running the microgrid in an attempt to minimize these costs. The varying scenarios used (defined by the index n) are modeled in here as well as the output which will be the average of all of the scenarios modeled. 4. Constraints 4.1 Microgrid Constraints 4.1.1 Initial Ramp up Limit The first constraint used may be expressed in mathematical terms as: 𝑃𝑖(0) ≤ 𝑅𝑖,𝑚𝑎𝑥 This states that the power level of each generator at the first time step must be less than the ramp up limit. This constraint implies that at the first time step the generator may be chosen to be on or off by the solver, but as the generator was assumed to be off in the previous time step (k = -1), the power may only be as large as the ramp up limit. The ramp up limit is defined as the amount the power level of a given DG generator can increase in one 15 minute time step. 4.1.2 Initial Battery State 𝑥 𝑏(0) = 𝑥 𝑘 𝑏 This states that the initial charge of the battery is set to a known parameter, as not to be strategically but unrealistically chosen by the solver. 4.1.3 Startup and Shutdown Costs 𝑐𝑖 𝑆𝑈 (𝑘) ∗ (𝛿𝑖(𝑘) − 𝛿𝑖(𝑘 − 1)) ≤ 𝑆𝑈𝑖(𝑘) 𝑐𝑖 𝑆𝐷 (𝑘) ∗ (𝛿𝑖(𝑘 − 1) − 𝛿𝑖(𝑘)) ≤ 𝑆𝐷𝑖(𝑘) Constraint (4) takes the forecasted data of the startup cost at each time for each generator and multiplies it by the difference in the generator binary state values to ensure that the startup cost will only be accounted for in the calculations if the selected generator was off last time step and is on in the current time step. [7] (1) (2) (3) (4) (5)
  • 9. 9 Similarly, constraint (5) takes the forecasted data of the shutdown cost at each time for each generator and multiplies it by the difference in the generator state terms to ensure that shutdown costs will be accounted for if the selected generator was on last time step and is now off in the current time step. [7] 4.1.4 Charging vs. Discharging 𝑃𝐶 𝑏(𝑘) ≤ 𝛿 𝑏 (𝑘) ∗ 𝐶 𝑏 𝑃 𝐷 𝑏(𝑘) ≤ (1 − 𝛿 𝑏(𝑘)) ∗ 𝐶 𝑏 These constraints are set for two purposes: 1. ensure that the battery is not charging and discharging at the same time. 2. when the battery is charging or discharging, ensure it does not charge/ discharge more than the output power limit of the battery. 4.1.4 Importing vs. Exporting 𝑃𝐼 𝑔 (𝑘) ≤ 𝛿 𝑔(𝑘) ∗ 𝑇 𝑔 𝑃𝐸 𝑔 (𝑘) ≤ (1 − 𝛿 𝑔(𝑘)) ∗ 𝑇 𝑔 Similar to constraints (6) and (7), these constraints two purposes are: 1. ensure that the controller does not import and export power from/ to the grid at the same time 2. when importing or exporting, to ensure that the interconnection flow limit is not exceeded. 4.1.5 Battery Losses 𝑥 𝑏(𝑘 + 1) = 𝑥 𝑏(𝑘) + 𝜂 𝑐 ∗ 𝑃𝐶 𝑏(𝑘) − ( 1 𝜂 𝑑 ) ∗ 𝑃 𝐷 𝑏(𝑘) − 𝑥 𝑠𝑏 This constraint strives to realistically model the losses of energy that are inherent in battery usage. The stored energy level of the battery is thus dependent upon stored energy level of the previous time step, the charging and discharging efficiencies of the battery, the levels of charging or discharging of the previous time step, and a small regular loss of energy at every time step. 4.1.6 Minimum Up and Down Times min down time: 𝛿𝑖(𝑘 − 1) − 𝛿𝑖(𝑘) ≤ 1 − 𝛿𝑖(𝜏) min up time: 𝛿𝑖(𝑘) − 𝛿𝑖(𝑘 − 1) ≤ 𝛿𝑖(𝜏) Where: 𝜏 = 𝑘 + 1, … , min(𝑘 + 𝑇𝑖 𝑑𝑜𝑤𝑛 − 1, 𝑇) 𝜏 = 𝑘 + 1, … , min(𝑘 + 𝑇𝑖 𝑢𝑝 − 1, 𝑇) These constraints are primarily based on findings from A Model Predictive Control Approach to Microgrid Operation Optimzation [7]. In order to model the behavior of DG generators realistically, these constraints ensure that if a generator is turned on, that it stays on for a certain minimum time period (minimum up time), and if a generator is turned off, that it stays off for a certain minimum time period (minimum down time) before starting again. The looping variable tau is used to define these statements mathematically in order to loop into time steps ahead of the current time step 𝑘 to enforce the DG generators’ inherent up and down time constrained behavior. (6) (7) (8) (9) (10) (11) (12)
  • 10. 10 To illustrate this via example, let’s initially set time 𝑘 = 1 which will set loop variable 𝜏 = 2, and then set the minimum up time for the particular generator 𝑇𝑖 𝑢𝑝 = 3. The binary variable 𝛿𝑖(𝑘) is equal to 0 if the generator is off and equal to 1 if the generator is on. Example, given: 𝑘 = 1, 𝜏 = 2, 𝛿𝑖(0) = 0, 𝛿𝑖(1) = 1 Plugging these values into the minimum up time equation yields: 𝛿𝑖(1) − 𝛿𝑖(1 − 1) ≤ 𝛿𝑖(2) Simplified: 1 − 0 ≤ 𝛿𝑖(2) Which will force 𝛿𝑖(2) = 1 meaning that the generator will remain on in time step 2. Repeat this process for the next iteration of tau: 𝛿𝑖(1) − 𝛿𝑖(1 − 1) ≤ 𝛿𝑖(3) Simplified: 1 − 0 ≤ 𝛿𝑖(3) Which will force 𝛿𝑖(3) = 1 keeping the generator on at time step 3. The looping variable tau will break at this point and this process will repeat for all subsequent time steps. So if the generator is on at time 𝑘 = 1 but off at time 𝑘 = 0, then the generator must stay on at least until time 𝑘 = 3. [7] 4.1.7 Minimum and Maximum Power Level 𝑃𝑖(𝑘) ≤ 𝑃𝑖,𝑚𝑎𝑥 ∗ 𝛿𝑖(𝑘) 𝑃𝑖(𝑘) ≥ 𝑃𝑖,𝑚𝑖𝑛 ∗ 𝛿𝑖(𝑘) These state that if a DG generator is on at a certain time, the power level for that generator must remain within a certain observed min or max level. [7] 4.1.8 Ramp up Limits 𝑃𝑖(𝑘 + 1) − 𝑃𝑖(𝑘) ≤ 𝑅𝑖,𝑚𝑎𝑥 ∗ 𝛿𝑖(𝑘 + 1) 𝑃𝑖(𝑘) − 𝑃𝑖(𝑘 + 1) ≤ 𝑅𝑖,𝑚𝑎𝑥 ∗ 𝛿𝑖(𝑘) These constraints enforce the ramp-up/ramp-down limits of each of the generators. Basically, they state that the magnitude of the difference between the power levels of a given generator at two consecutive time steps must be less than a certain value known as the ramp-up/ramp-down limit. The ramp-up and ramp-down limits are natural constraints of a generator that exist because a generator can only increase or decrease its level of power by a certain range within a given time. For simplicity in the modeling, the ramp-up and ramp-down limits are assumed to be equal. [7] (13) (14) (15) (16)
  • 11. 11 4.1.9 Curtailments 𝛽ℎ(𝑘) ≤ 𝛽ℎ,𝑚𝑎𝑥 𝛽ℎ(𝑘) ≥ 𝛽ℎ,𝑚𝑖𝑛 These enforce the curtailments of a given controllable load to stay between the pre-determined min and max curtailment levels. 4.1.10 Generators’ Fuel Cost – Quadratic to Linear 𝑚𝑖(𝑠) ∗ 𝑃𝑖(𝑘) + 𝑏𝑖(𝑠) ∗ 𝛿𝑖(𝑘) ≤ 𝐷𝐺𝑖 𝑐𝑜𝑠𝑡 (𝑘) ∗ 4 Because the function of the DG generators’ fuel cost with respect to power generated is a quadratic function rather than a linear function, steps had to be taken to translate this quadratic constraint into linear constraints (19) for the solver to accept them. The result of this translation is a series of lines that approximate the quadratic curve. The more lines used in this approximation, the more accurate it is. An illustration and further description of this process is shown below. Figure 1: Power generated vs. fuel Cost in a DG generator The red dots along the quadratic curve represent points chosen in the creation of the linear approximation constraints (the rainbow lines in the figure). Points are chosen to be approximately equidistant along the course of the entire useful length of the curve - where the curve will begin at the lower bound and end at the upper bound of power generation of the specified DG unit. The linear approximation lines are derived from two consecutive chosen points. Slope and y-intercept of these lines are then calculated and imported into the solver as linear constraints. The defined variables below represent the slopes and y- intercepts of each of these lines used in the quadratic approximations. Slope = 𝑚𝑖(𝑠) y-int = 𝑏𝑖(𝑠) (17) (18) (19)
  • 12. 12 Where s is the set of which the linear approximation lines belong to. The 4 multiplied by the DG fuel cost on the right hand side of the constraint is used to prevent DG fuel costs from being charged by the kilowatt hour instead of the kilowatt quarter-hour that is required since all of the time steps used are in 15 minute intervals. 4.1.11 Energy Balance 1 4 ∑ 𝑃𝑖(𝑘) 3 𝑖=0 + 𝑃 𝑟𝑒𝑠(𝑘) + 𝛷𝑟𝑒𝑠(𝑘) + 𝑃𝐼 𝑔 (𝑘) + 𝑃 𝐷 𝑏(𝑘) = ∑ 𝐷𝑙 2 𝑙=0 (𝑘) + 𝛷 𝑐𝑟𝑖𝑡(𝑘) + (1 − 𝛽0(𝑘)) ∗ 𝐷0 𝑐(𝑘) + 𝛷 𝑐𝑛𝑡𝑟 0 (𝑘) + (1 − 𝛽1(𝑘)) ∗ 𝐷1 𝑐(𝑘) +𝛷 𝑐𝑛𝑡𝑟 1 (𝑘) + 𝑃𝐸 𝑔 (𝑘) + 𝑃𝐶 𝑏 + 166.67 ∗ 𝑃𝑐𝑜𝑜𝑙(𝑘) + 166.67 ∗ 𝑃ℎ𝑒𝑎𝑡(𝑘) Toggle functions:  Solar power toggle = 𝛷𝑟𝑒𝑠(𝑘) = (𝐿 𝑛(𝑘) ∗ 𝑃 𝑟𝑒𝑠(𝑘) ∗ 𝑐𝑜𝑛𝑓 𝑟𝑒𝑠)  Critical demand toggle = 𝛷 𝑐𝑟𝑖𝑡(𝑘) = (𝐿 𝑛(𝑘) ∗ ∑ 𝐷𝑙 2 𝑙=0 (𝑘) ∗ 𝑐𝑜𝑛𝑓 𝑑𝑒𝑚 )  Controllable demand 0 toggle = 𝛷 𝑐𝑛𝑡𝑟 0 (𝑘) = ((1 − 𝛽0(𝑘)) ∗ 𝐷0 𝑐(𝑘) ∗ 𝐿 𝑛(𝑘) ∗ 𝑐𝑜𝑛𝑓 𝑑𝑒𝑚 )  Controllable demand 1 toggle = 𝛷 𝑐𝑛𝑡𝑟 1 (𝑘) = ((1 − 𝛽1(𝑘)) ∗ 𝐷1 𝑐(𝑘) ∗ 𝐿 𝑛(𝑘) ∗ 𝑐𝑜𝑛𝑓 𝑑𝑒𝑚 ) Where:  𝐿 𝑛(𝑘) = the scenario list of each time step  𝑐𝑜𝑛𝑓 𝑟𝑒𝑠 = the confidence level of the forecast on the solar panel  𝑐𝑜𝑛𝑓 𝑑𝑒𝑚 = the confidence level of the forecast on the demand – both critical and controllable The above constraint (20) is the energy balance constraint and is, arguably, the most important constraint in the model. It enforces that power put in to the system (by generators, solar panels, grid imports, or discharges from the battery) must be equal to the power leaving the system (used by critical and controllable demand, exporting to the grid, charging the battery, and HVAC system). Basically, power in is equal to power out. These constraints receive an extra level of complication as some of the stochastic modeling process is formulated here. The “Toggle functions” defined above are used to model the uncertainty in the forecasted future. They represent that at each time step a certain variable, for example the amount of solar power produced, will vary between a certain range. For simplicity sake, instead of attempting to model an (20)
  • 13. 13 entire distribution for how each variable might vary at each time step, a confidence level was chosen to create somewhat realistic upper and lower bounds. So if the amount of solar power generated is forecast to be 20 kWh for a time-step and the confidence interval is chosen to be .2, then the model will “toggle” randomly between 24 kWh and 16kWh as possible outcomes at the end of the time-step. The solver will make decisions based on the fact that the forecast value will either be 20% greater or 20% less than the predicted value. The 𝐿 𝑛(𝑘) list defines if the variables will toggle up or down in the given scenario for the given time step. 4.1.12 Charging and Discharging Limits 𝑃𝐶 𝑏(𝑘) ≤ 𝑥 𝑚𝑎𝑥 𝑏 − 𝑥 𝑏 (𝑘) 𝑃 𝐷 𝑏(𝑘) ≤ 𝑥 𝑏(𝑘) − 𝑥 𝑚𝑖𝑛 𝑏 Constraint (21) makes sure that the amount of energy charged may only be as great as the difference between the max energy level of the battery and how much is already in it. Constraint (22) makes sure that the amount of energy discharged may only be as great as the difference between the current energy level and the min energy level of the battery. 4.1.13 Leftover Energy Reward 𝑥 𝑟𝑒𝑤𝑎𝑟𝑑 𝑏 = 𝑥 𝑏(𝑘_𝑓𝑖𝑛𝑎𝑙) − 𝑥 𝑚𝑎𝑥 𝑏 2 This constraint gives an economic reward for having leftover energy in the battery at the end of the run, or it creates an economic consequence for not having enough energy leftover. In this model, the goal is set to have half of the max energy of the battery at the end of the run. If there is over half of the energy of the battery leftover, then the excess energy (energy above the 50% level of the max battery storage) will be sold to the grid to make extra money; if there is less than half, then energy will be purchased from the grid until the battery is at 50% of max storage capacity. 4.2 HVAC Constraints 4.2.1 Room Temperatures 𝑡𝑒𝑚𝑝1(𝑘) = . 151 ∗ 𝑡𝑒𝑚𝑝1(𝑘 − 1) + .4387 ∗ 𝑡𝑒𝑚𝑝2(𝑘 − 1) + .2990 ∗ 𝑡𝑒𝑚𝑝3(𝑘 − 1) +9.9074 ∗ 𝑃ℎ𝑒𝑎𝑡(𝑘 − 1) − 9.9074 ∗ 𝑃𝑐𝑜𝑜𝑙(𝑘 − 1) + .0624 ∗ 𝑡𝑒𝑚𝑝 𝑜𝑢𝑡(𝑘 − 1) +.0488 ∗ 𝑡𝑒𝑚𝑝𝑠𝑘𝑦(𝑘 − 1) + .0014 ∗ 𝑄𝑖𝑛(𝑘 − 1) + .0055 ∗ 𝑄𝑠𝑢𝑛(𝑘 − 1) 𝑡𝑒𝑚𝑝2(𝑘) = . 0074 ∗ 𝑡𝑒𝑚𝑝1(𝑘 − 1) + .9848 ∗ 𝑡𝑒𝑚𝑝2(𝑘 − 1) + .0064 ∗ 𝑡𝑒𝑚𝑝3(𝑘 − 1) +.01086 ∗ 𝑃ℎ𝑒𝑎𝑡(𝑘 − 1) − .01086 ∗ 𝑃𝑐𝑜𝑜𝑙(𝑘 − 1) + .00008 ∗ 𝑡𝑒𝑚𝑝 𝑜𝑢𝑡(𝑘 − 1) +.0006 ∗ 𝑡𝑒𝑚𝑝𝑠𝑘𝑦(𝑘 − 1) + .0005 ∗ 𝑄𝑠𝑢𝑛(𝑘 − 1) (21) (22) (23) (24) (25)
  • 14. 14 𝑡𝑒𝑚𝑝3(𝑘) = . 0332 ∗ 𝑡𝑒𝑚𝑝1(𝑘 − 1) + .0417 ∗ 𝑡𝑒𝑚𝑝2(𝑘 − 1) + .5594 ∗ 𝑡𝑒𝑚𝑝3(𝑘 − 1) +.5718 ∗ 𝑃ℎ𝑒𝑎𝑡(𝑘 − 1) − .5718 ∗ 𝑃𝑐𝑜𝑜𝑙(𝑘 − 1) + .2048 ∗ 𝑡𝑒𝑚𝑝 𝑜𝑢𝑡(𝑘 − 1) +.1609 ∗ 𝑡𝑒𝑚𝑝𝑠𝑘𝑦(𝑘 − 1) + .0001 ∗ 𝑄𝑖𝑛(𝑘 − 1) + .0176 ∗ 𝑄𝑠𝑢𝑛(𝑘 − 1) These constraints model the function of the HVAC unit where parameters were assigned based upon data from Oak Ridge National Labs [6]. Basically, the temperature at a given time 𝑘 of a given room (1,2, or 3) is based solely upon conditions from the previous time step. The inputs influencing the condition at each of these previous time steps include the temperature of all given rooms, amount of power provided for heating and cooling, temperature outside at ground level, temperature of the sky, heat entering from the sun, and all other incoming sources of heat. 4.2.2 Power used for Heating and Cooling 𝑃ℎ𝑒𝑎𝑡(𝑘) ≥ .3 ∗ 𝛿ℎ𝑒𝑎𝑡 (𝑘) 𝑃ℎ𝑒𝑎𝑡(𝑘) ≤ 𝛿ℎ𝑒𝑎𝑡 (𝑘) 𝑃𝑐𝑜𝑜𝑙(𝑘) ≥ .3 ∗ 𝛿 𝑐𝑜𝑜𝑙 (𝑘) 𝑃𝑐𝑜𝑜𝑙(𝑘) ≤ 𝛿 𝑐𝑜𝑜𝑙 (𝑘) These constraints prevent the power of the heating or cooling unit of running at less than 30% capacity if the specified unit is on. They basically set a minimum capacity (chosen to be 30% in this model) that a heating or cooling unit may run while still on. 4.2.3 Heating vs. Cooling 𝛿ℎ𝑒𝑎𝑡(𝑘) + 𝛿 𝑐𝑜𝑜𝑙(𝑘) ≤ 1 The heating and cooling units may not both be on at the same time; however, they may both be off at a given time. 4.2.4 Temperature Bands 𝑡𝑒𝑚𝑝1(𝑘) ≥ 𝑡𝑒𝑚𝑝1 𝑠𝑒𝑡 − 𝑡𝑒𝑚𝑝 𝑏𝑎𝑛𝑑 𝑡𝑒𝑚𝑝1(𝑘) ≤ 𝑡𝑒𝑚𝑝1 𝑠𝑒𝑡 + 𝑡𝑒𝑚𝑝 𝑏𝑎𝑛𝑑 𝑡𝑒𝑚𝑝2(𝑘) ≥ 𝑡𝑒𝑚𝑝2 𝑠𝑒𝑡 − 𝑡𝑒𝑚𝑝 𝑏𝑎𝑛𝑑 𝑡𝑒𝑚𝑝2(𝑘) ≤ 𝑡𝑒𝑚𝑝2 𝑠𝑒𝑡 + 𝑡𝑒𝑚𝑝 𝑏𝑎𝑛𝑑 (26) (27) (28) (29) (30) (31) (32) (33) (34) (35)
  • 15. 15 𝑡𝑒𝑚𝑝3(𝑘) ≥ 𝑡𝑒𝑚𝑝3 𝑙𝑏 𝑡𝑒𝑚𝑝3(𝑘) ≤ 𝑡𝑒𝑚𝑝3 𝑢𝑏 In these constraints, the temperature for rooms 1 and 2 are determined to stay within a specified range (known as the temperature band) from the originally set temperature. It means if the set temperature for room 1 was chosen to be 20°C and the temperature band was chosen to be 5°C, then the temperature of room 1 must stay in between 15°C and 25°C. Room 3 is excused from the temperature band constraints because it is assumed to be an attic of sorts in this model. The temperature of this room is not as important and thus is neglected somewhat in order to conserve energy for the system. Therefore, only modest upper and lower bounds are enforced for the temperature of this room. 4.2.5 Initial States 𝑡𝑒𝑚𝑝1(0) = 𝑡𝑒𝑚𝑝1 𝑖𝑛𝑖𝑡 𝑡𝑒𝑚𝑝2(0) = 𝑡𝑒𝑚𝑝2 𝑖𝑛𝑖𝑡 𝑡𝑒𝑚𝑝3(0) = 𝑡𝑒𝑚𝑝3 𝑖𝑛𝑖𝑡 𝛿ℎ𝑒𝑎𝑡(0) = 0 𝛿 𝑐𝑜𝑜𝑙(0) = 0 Initial temperatures for each of the three rooms are determined by a specified input, and the heating and cooling units are determined to be off at the beginning of the period. 4.3 Nonanticipatory Constraints In order to make the optimally solved solution as realistic as possible, certain constraints must be added to prevent the solver from finding solutions that do not take into consideration the fact that at each time step a decision is made without certain knowledge of the future. These constraints are called nonanticipatory constraints. They are necessary when modeling decisions that have uncertain outcomes and where specific potential outcomes are accounted for in the decision process (i.e. stochastic modeling) instead of just calculating the expected value at each time step and making decisions based on this one calculated expected value (i.e. deterministic modeling). This is because stochastic models evaluate final end scenarios, and to input an end scenario, the information from each time step must be input as well before the solver ever makes a decision. Without the nonatincipatory constraints, the solver has access to all of this information and can make a decision for, say, time = 1 with definite knowledge about what will happen in a future time step, say time = 7. For practical applications this is not realistic. However, a modeling paradigm using nonanticipatory constraints, formulated below (43), may be used to prevent the solver from making unrealistic decisions based on knowledge of future time steps. [11] (37) (36) (38) (39) (40) (41) (42)
  • 16. 16 𝐹𝑜𝑟 𝑎𝑙𝑙 𝑐𝑜𝑚𝑏𝑖𝑛𝑎𝑡𝑖𝑜𝑛𝑠 𝑜𝑓 𝑠1, 𝑠2 ∈ 𝑆: 𝑉 𝑠1(𝑘) = 𝑉 𝑠2(𝑘) if: 𝑆1(𝑘) = 𝑆2(𝑘) where: 𝑆𝑖(𝑘) = 𝑠𝑐𝑒𝑛𝑎𝑟𝑖𝑜 𝑖𝑛𝑓𝑜 𝑓𝑟𝑜𝑚 𝑡𝑖𝑚𝑒 0 → 𝑇 Where V = all decision variables (refer to Table 4 above). 5. Results The results of this model include several outputs of interest: 1. A distribution for the cost of running the microgrid for a day with the HVAC unit functional (Figure 2). 2. A distribution for the cost of running the microgrid for a day with the HVAC unit disabled (Figure 3). 3. Shadow prices sampled throughout the day for the two conditions of the microgrid – with and without HVAC unit (Figures 4 and 5). 4. Solar generation for the time steps where shadow prices were sampled (Figure 6). For both distributions: N = 25, T = 96, simulated for an entire day from 12:00 a.m. to 11:59 p.m. The parameter of number of scenarios (N = 25) was chosen to create a sizeable distribution. The parameter of time duration (T = 96) was chosen because at 15 minute intervals for each time step, 96 time steps equals one day. Figure 2: Normally distributed output for running microgrid with HVAC unit – via Wolfram Alpha [12] Figure 3: Normally distributed output for running microgrid without HVAC unit– via Wolfram Alpha [12] (43)
  • 17. 17 Figure 4: Shadow prices sampled throughout the day with HVAC Figure 5: Shadow prices sampled throughout the day without HVAC Figure 6: Solar energy produced during time steps when shadow prices were sampled 0 0.02 0.04 0.06 0.08 0.1 0.12 k = 0 k = 10 k = 20 k = 30 k = 40 k = 50 k = 60 k = 70 k = 80 k = 90 Dollars Time Step Shadow Prices - With HVAC 0 0.02 0.04 0.06 0.08 0.1 0.12 k = 0 k = 10 k = 20 k = 30 k = 40 k = 50 k = 60 k = 70 k = 80 k = 90 Dollars Time Step Shadow Prices - No HVAC 0 20 40 60 80 100 120 140 160 180 k = 0 k = 10 k = 20 k = 30 k = 40 k = 50 k = 60 k = 70 k = 80 k = 90 EnergyProduced(kWh) Time Step PV Generation
  • 18. 18 The first item of interest is the large difference in cost between the outputs where the HVAC unit was functional where it was not. The first output had a mean of $14,436.60 and the second $629.18; the mean of the first is more than 22 times the mean of the second. Therefore, it must be concluded that the HVAC unit constitutes the largest expense to the operations of this microgrid. Furthermore, in comparing the two normal distributions, the variance was actually lower in the output with the HVAC unit than the one without the HVAC - though the mean was much higher in the first. This phenomenon may be explained by looking at the shadow prices between the two in Figures 4 and 5. In Figure 4, the shadow prices are constantly the purchasing price of the energy grid. This means that the microgrid was pretty much never able to produce enough energy through solar power and DG generators to cover the entire cost of operations for a specified time period. To clarify, if there was excess energy produced by the grid then the cost of adding one kWh at the specified time step (shadow price) would be the cost of selling one kWh. If the shadow price is the purchasing price of energy at the time step, then it signifies that the microgrid was ineffective at producing enough energy to stay competitive with the main power grid at that time step because it is cheaper to buy energy rather than produce its own. This influences the variance in the model because, where the HVAC is on, the solver makes the same decision most of the time and leads to a more uniform result; where the HVAC is off, the solver varies more because sometimes the microgrid sells to the main power network or stores energy due to excess solar energy produced. It may also be noticed in comparison between Figures 5 and 6 that the shadow price is less expensive than the price of purchasing only at the time steps where there is high solar energy produced. In fact, the shadow prices at these time steps were the selling prices of the network so at time steps 40, 50, and 60 the microgrid was making money by selling to the power network. Though shadow price analyses were taken for 25 scenarios in each operating condition, the results in Figure 4 and 5 are the only results necessary as the shadow prices did not vary at any time step for any of the scenarios. This is due to the small difference between purchasing and selling price – often only about 5 cents. If the microgrid is not producing much energy at a given time step, then it will likely need to buy from the main power grid. If it is producing sufficient energy, then it will probably have energy to sell to the network. There is only a small window in performance of the microgrid where the solver would operate at a performance level in between the selling and the purchasing price of a kWh. Though there are likely time steps where this did occur in the model, it was not recorded in the shadow price analyses for the time steps chosen. To validate the accuracy of this model, data about energy purchasing prices and energy usage was taken from the U.S. Energy Information Administration. The most recent average retail price for one kWh of electricity is given to be ¢10.33 [13]. Also, they state that the average annual electricity consumption in 2014 for a U.S. residential customer was 10,932 kWh [14]. For comparison, without the HVAC system, this model is programmed to use 10,138 kWh of electricity in a day – about the same as annual usage of a residential customer. So if the model (HVAC off) were to run entirely off of electricity purchased from the power network, then expected costs would be about $1,047.29 = 10,138 kWh*¢10.33. The output for the model averaged to $629.18. This difference in cost is reasonably explained due to money saved from using solar power. 6. Discussion Based on the reasonableness of the results produced from the model, it may be concluded that the model was successful at simulating a microgrid for a day. Furthermore, the model also helped to highlight the
  • 19. 19 large costs of operating an HVAC unit. Granted, the HVAC unit parameters might have been excessively large compared to the rest of the load required, the potentially staggering costs of operating an HVAC unit for a large building (say a manufacturing plant) is brought to awareness. The efficacy of shadow price analyses and stochastic programming were also confirmed in this research. The shadow price analysis provided a surprisingly useful tool for insight into the efficiency of microgrid performance. It was easy to see at what times the microgrid was doing well and what percentage of times the microgrid was reducing costs of producing power. They also served a useful purpose of debugging in the model. For example, if a shadow price is greater than the purchasing price from the grid or smaller than the selling price, it is obvious there is a problem. Stochastic programming, though the most difficult and time-consuming part of the model creation, succeeded in creating randomness and thus realism in the model. However, I recommend that before stochastic programming procedures are used, a serious trade off study be performed to determine the optimal balance between model realism versus time, effort, and money allocated to the project as stochastic programming can be a large burden to a project. 7. Conclusion The techniques evaluated in this study may be deemed effective for future microgrid optimization work. The shadow price analysis especially offers a clear look into the effectiveness of microgrid operations at every time period and perhaps should be used more in evaluating microgrid operations. Furthermore, stochastic programming offers an opportunity to more realistically model practical use of operations as most processes vary with time. With increased focus from clear end requirements, these techniques could be used to provide greater understanding of microgrid operations which could then be used for the advancement of clean energy into the realm of practical use. 8. References 1. Burt, Erica, Peter Orris, and Susan Buchanan. "Scientific Evidence of Health Effects from Coal Use in Energy Generation." Healthcare Research Colloborative, 1 Apr. 2013. Web. 2016. 2. Pieprzyk, Björn, Norbert Kortlüke, and Paula Rojas Hilje. "The Impact of Fossil Fuels: Greenhouse Gas Emissions, Environmental Consequences and Socio Socio-economic Effects." Energy Research Architecture, 1 Nov. 2009. Web. 17 Jan. 2016. 3. Elliott, David. "Environmental Issues: Health, Safety and Social Impacts." Green Energy Futures: A Big Change for the Good. Basingstoke: Palgrave Macmillan, 2015. 20-38. Print. 4. Heal, Geoffrey. "The Economics of Renewable Energy." NBER Working Paper Series. National Bureau of Economic Research, 1 June 2009. Web. 2016. 5. "Microgrid Definitions." Microgrids at Berkeley Labs. 2016. Web. 6. Oak Ridge National Labs. IES Data – Data collected to aid in HVAC unit modeling. 2015. Raw data. Oak Ridge, Tennessee.
  • 20. 20 7. Glielmo, Luigi, Alessandra Parisio, and Evangelos Rikos. "A Model Predictive Control Approach to Microgrid Operation Optimization." IEEE Transactions on Control Systems Technology 22.5 (2014): 1813-827. Print. 8. Schneider, Frank. "Introduction." Advances in Stochastic Dynamic Programming for Operations Management. Berlin: Logos Verlag, 2014. 1-3. Print. 9. Winston, Wayne. "Sensitivity Analysis: An Applied Approach." Operations Research: Applications and Algorithms. Belmont: Brooks/ Cole, 2004. 227 - 231. Print. 10. Fernandez, Alisha, and Seth Blumsack. "Distributing Electric Energy in Rural America Efficiently and Economically: The Micro-grid Option." Penn State, 2010. Web. 2016. 11. Louveaux, François, and John Birge. "Introduction and Examples." Introduction to Stochastic Programming. New York: Springer-Verlag New York, 1997. 4 - 28. Print. 12. Wolfram Alpha. Web. <http://www.wolframalpha.com/>. 13. "Electricity Data Browser." U.S. Energy Information Administration. 1 Oct. 2015. Web. 2016. <http://www.eia.gov/electricity/data/browser/#/topic/7?agg=2,0,1&geo=g&freq=M>. 14. "Frequently Asked Questions." U.S. Energy Information Administration. 21 Oct. 2015. Web. 2016. <http://www.eia.gov/tools/faqs/faq.cfm?id=97&t=3>.