Optimizing Energy Hub Operation Using Modified Firefly Algorithm
1. Optimal Sizing and Operation of
Energy Hubs Using Firefly
Algorithm
Eng/ Alaa M Eladl 1
2. Eng/ Alaa M Eladl 2
Our Research aims to
Minimize the total energy cost and CO2 emission amount of
the energy hub.
Maximizing the cost of electrical and heating energy sold
back to the network.
Research Objective:
Customer
Network
3. Eng/ Alaa M Eladl 3
Our Research achieved the following:
Modification for Standard Firefly Algorithm (MFFA).
Solving Energy Hub Problem by using MFFA.
Sizing for Energy Hub components by using MFFA.
Bi-directional Energy.
The new in our Research
4. Today We’ll Discuss….
ENERGY HUB
¤ Energy Hub Concept. ¤ Energy Hub Components.
¤ Energy Hub Model.
Cooling Combined Heat and Power (CCHP).
¤ Cogeneration Definition. ¤ Cogeneration Advantages.
¤ Cogeneration Model.
Optimization techniques.
¤ Optimization types . ¤ Standard Firefly Algorithm.
¤ Modified Firefly Algorithm.
Application or case Study.
Eng/ Alaa M Eladl 4
5. Research OBJECTIVES
• Energy Hub System aims to design, develop,
install and assess energy and environmental
benefits of a new integrated concept of
interconnectivity between buildings, Distributed
Energy Resources (DER).
Eng/ Alaa M Eladl 5
11. • Energy Hub is a unit where multiple energy carriers can be converted, conditioned.
• It represents an interface between different energy infrastructures and/or loads
• Energy hubs consume power at their input ports connected to ,e.g., electricity and
natural gas infrastructures, and provide certain required energy services such as
electricity, heating, and cooling.
Eng/ Alaa M Eladl 11
Energy HUB Concept
Energy
HUB unit
12. Eng/ Alaa M Eladl 12
Energy Hub Elements
energy hub contains
Transformer,
CHP
Auxiliary Boiler
Absorption Chiller
13. Eng/ Alaa M Eladl 13
CHP Technologies and Applications
What’s
CHP ?
Combined Heat & Power (CHP) is a form of Distributed Generation
CHP is …
! An Integrated System
! Located At or Near a Building/Facility
! Provides at Least a Portion of the Electrical Load and
! Recycles the Thermal Energy for
– Space Heating / Cooling
– Process Heating / Cooling
– Dehumidification
14. Eng/ Alaa M Eladl 14
CHP Technologies and Applications
What’s
CHP ?
Prime Mover
Heat Exchanger
Thermal System
Generator (fuel input)
100
%
Qin
Natural Gas
Prime Mover generates mechanical energy
Generator converts mechanical energy into electrical energy
heat exchangers that capture and recycle the heat from the prime
mover
Thermal Utilization equipment converts the recycled heat into
useful heating, cooling, and/or dehumidification
Operating Control Systems insure the CHP components function
properly together
Qout
Qout
Wout
35%
electricity
50%
thermal
15%
waste
15. Eng/ Alaa M Eladl 15
CHP Technologies and Applications
What’s
CHP ?
16. Eng/ Alaa M Eladl 16
CHP Technologies and Applications
CHP Benefits
Source: ICF International
17. Eng/ Alaa M Eladl 17
CHP Technologies and Applications
CHP Benefits
Source: ICF International
18. Eng/ Alaa M Eladl 18
CHP Technologies and Applications
CHP
Application
Source: ICF International
The great majority of CHP applications can be grouped into three categories:
Industrial
commercial/institutional
o Manufacturing
o Food Processing
o Ethanol
Municipalities
o Hospitals
o Schools
o Office Buildings
o Data Centers
o Landfills
o Wastewater Treatment Facilities
19. Eng/ Alaa M Eladl 19
CHP Technologies and Applications
What’s
CCHP ?
Cooling Combined heat and Power
20. Eng/ Alaa M Eladl 20
CHP Technologies and Applications
What’s
CCHP ?
An absorption chillers are coupled to a CHP
plant to produces chilled water and hot water
for air conditioning or alternatively the heat is
used to heat a swimming pool.
21. Eng/ Alaa M Eladl 21
CHP Technologies and Applications
CHP Model
Pg
Natural Gas
Thermal
Electricity
Lh
Le ξ
η
𝐿𝑒 = 𝑃𝑔 ∗ ξ
𝐿ℎ = 𝑃𝑔 ∗ η
22. Eng/ Alaa M Eladl 22
CHP Technologies and Applications
CCHP Model
Pg
Natural Gas
Cooling
Electricity
Lh
Le ξ
η
𝐿𝑒 = 𝑃𝑔 ∗ ξ
𝐿ℎ = 𝑃𝑔 ∗ η
Cooling
Combined Heat
and Power
CCHP
Thermal
Lc μ
𝐿𝑐 = 𝑃𝑔 ∗ μ
32. Mathematical Optimization
Deterministic Methods
Iterative
Methods that
produce same
set results
every time as:
• Newton’s Method.
• Sequential quadratic
programming SQP.
• Interior Point
Method.
• Gradient Descent
Method.
Stochastic
methods that
converge to an
approximate
solutions such
as:
• Ant Colony
• Simulated Annealing.
• Genetic Algorithm.
• Particle Swarm.
• Firefly Method.
Eng/ Alaa M Eladl 32
Stochastic Methods
33. Stochastic Optimization
Heuristic algorithms
Eng/ Alaa M Eladl 33
Metaheuristic algorithms
• Heuristic algorithm finds solutions
in a reasonable amount of time
but there is no guarantee that
optimal solutions are reached.
• intend to be suitable for local
optimization.
• Metaheuristic uses certain tradeoff
a randomization and local search,
provides a good way to move away
from local search to the search on
global scale.
• intend to be suitable for global
optimization.
34. Metaheuristic
Optimization
Local Search Algorithm
• One type of search
strategy is an
improvement on
simple local search
algorithms.
• A well known local
search algorithm is
the hill
climbing method
which is used to find
Global Search Algorithm
• Global search that are not
local search-based are
usually population-based.
• Such algorithms for Global
search ant colony
optimization, evolutionary
computation, particle
swarm optimization,
and genetic algorithms.
Eng/ Alaa M Eladl 34
35. Metaheuristic
Optimization
• Single Solution [Simulated
Annealing] and population based
[Genetic Algorithm, Particle Swarm,
FFA,..etc ].
• Methods that can be hybridized and
other memetic.
• Methods that can be solved using
Parallel Processing.
Other
Classifications:
Eng/ Alaa M Eladl 35
38. Basic Firefly Algorithm
• Firefly algorithm is a kind of optimization algorithm based on the
firefly social features.
• This algorithm is similar with other intelligent algorithms, it is
relatively simple both in theory and implementation.
• The algorithm is very effective in dealing with a lot of optimization
problem.
Eng/ Alaa M Eladl 38
39. Basic Firefly Algorithm
• The core of this algorithm is to use the absolute brightness of fireflies
on behalf of the objective function value.
• The location of the fireflies is the solution.
• The relative brightness of the fireflies is obtained by comparison.
Eng/ Alaa M Eladl 39
40. Basic Firefly Algorithm
• Fireflies are attracted by brighter companion.
• 𝛽0 is the biggest appeal
Eng/ Alaa M Eladl 40
𝑥𝑖 𝑘 + 1 = 𝑥𝑖 𝑘 + 𝛽𝑖𝑗 𝑟𝑖𝑗 𝑥𝑖 − 𝑥𝑗 + 𝛼𝜀𝑖
𝛽𝑖𝑗(𝑟𝑖𝑗) = 𝛽0𝑒−𝛾𝑟2
𝑟𝑖𝑗 = 𝑥𝑖 − 𝑥𝑗 =
𝑘=1
𝑑
(𝑥𝑖,𝑘 − 𝑥𝑗,𝑘)2
𝑟𝑖𝑗 is the Cartesian distance between fireflies and found by this
relationship,
41. Basic Firefly Algorithm
There are two important parameters in the location updating formula:
The light absorption coefficient 𝛾
The random coefficient.𝛼
Eng/ Alaa M Eladl 41
𝑥𝑖 𝑘 + 1 = 𝑥𝑖 𝑘 + 𝛽𝑖𝑗 𝑟𝑖𝑗 𝑥𝑖 − 𝑥𝑗 + 𝛼𝜀𝑖
𝛽𝑖𝑗(𝑟𝑖𝑗) = 𝛽0𝑒−𝛾𝑟2
𝛾 is the absorption coefficient, controlling the change of light
intensity and deciding the convergence of the algorithm.
𝛼 is the random coefficient , controlling the
random movement of fireflies.
42. Basic Firefly Algorithm
Eng/ Alaa M Eladl 42
𝑥𝑖 𝑘 + 1 = 𝑥𝑖 𝑘 + 𝛽𝑖𝑗 𝑟𝑖𝑗 𝑥𝑖 − 𝑥𝑗 + 𝛼𝜀𝑖
𝛽𝑖𝑗(𝑟𝑖𝑗) = 𝛽0𝑒−𝛾𝑟2
γ∈ 0, ∞ ,
For γ0 , there is β = βo
The attenuation light intensity without distance
, fireflies can be seen any where in the space
and global search is very easy to do.
For γ ∞ , there is β(r) = δ(r)
The attraction between fireflies is close
to 0, and each firefly is similar to have
random movement .
43. Basic Firefly Algorithm
• The smaller 𝛾 is,
with faster
algorithm
convergence the
larger the
attraction between
fireflies is.
The light
absorption
coefficient
𝛾
Eng/ Alaa M Eladl 43
𝒙𝒊 𝒌 + 𝟏 = 𝒙𝒊 𝒌 + 𝜷𝒊𝒋 𝒓𝒊𝒋 𝒙𝒊 − 𝒙𝒋 + 𝜶𝜺𝒊
𝜷𝒊𝒋(𝒓𝒊𝒋) = 𝜷𝟎𝒆−𝜸𝒓𝟐
44. Basic Firefly Algorithm
• The bigger the 𝛼 is
with slower
algorithm
convergence the
greater random
motion range of
fireflies
The
random
coefficient.
𝛼
Eng/ Alaa M Eladl 44
𝒙𝒊 𝒌 + 𝟏 = 𝒙𝒊 𝒌 + 𝜷𝒊𝒋 𝒓𝒊𝒋 𝒙𝒊 − 𝒙𝒋 + 𝜶𝜺𝒊
𝜷𝒊𝒋(𝒓𝒊𝒋) = 𝜷𝟎𝒆−𝜸𝒓𝟐
45. Modified Firefly Algorithm
Eng/ Alaa M Eladl 45
These modification to improve strategy of attraction and rate of
convergence.
change of variance to adaptively change 𝜶 𝒂𝒏𝒅 𝜸.
Move all fireflies attracted to the best firefly.
46. Modified Firefly Algorithm
M.FFA ------change of variance to adaptively change 𝛼 𝑎𝑛𝑑 𝛾:
A. Design of the adaptive adjustment parameters:
B. Design of the autonomous flight.
• Best Solution don’t move and less optimum only search space.
C. Design of the random movement step.
Eng/ Alaa M Eladl 46
𝛾𝑖 = 𝛾𝑏 + 𝑒−𝑘𝜎𝐼
2
𝛾𝑒 − 𝛾𝑏 𝛼𝑖 = 𝛼𝑏 −
1
𝑒𝑘𝜎𝐼
2 𝛼𝑒 − 𝛼𝑏
𝑥𝑖 𝑘 + 1 = 𝑥𝑖 𝑘 + 𝛽0𝑒−𝛾𝑟2
𝑥𝑖 − 𝑥𝑗 + 𝛼 × 𝑟𝑖𝑗 × 𝑟𝑎𝑛𝑑 − 0.5
48. Modified Firefly Algorithm
In this modification we used three modification:
• Autonomous motion of firefly this means the best firefly don’t move unless other found.
• The random motion is function of the Cartesian distance from the optimum solution, this
means the far one moves faster as (r>>) and the near to optimum moves slowly as (r<<).
• The motion towards the global optimum and there is no trapping in any local minimum.
Eng/ Alaa M Eladl 48
𝑥 𝑖, :
= 𝑥 𝑖, : + 𝛽0 × 𝑒−𝛾𝑟2
× 𝑥 𝑗, : − 𝑥 𝑖, : + 𝛽0 × 𝑒−𝛾𝑟2
× 𝑥𝑏𝑒𝑠𝑡 − 𝑥 𝑗, :
+ 𝛼 × 𝑓(𝑟) × (𝑟𝑎𝑛𝑑 − 0.5)
50. Energy Hub Case [1].
This case solve only single objective for cost minimization and to clarify
the result with GA algorithm.
Extension of the case will be added later for multi-objective case with
the following [ minimum cost, minimum emission and minimum losses].
51. • 𝐿 =
𝐿𝑒
𝐿ℎ
=
2
5
where L is
the energy demand.
Eng/ Alaa M Eladl 51
# INPUT
DATA #
Energy Hub Case [1].
52. Eng/ Alaa M Eladl 52
# SOLUTION
#
Energy Hub Case [1].
53. Eng/ Alaa M Eladl 53
0 20 40 60 80 100 120 140 160 180 200
44
45
46
47
48
49
50
51
52
Iteration
Best
Cost
#
SIMULATION
#
Energy Hub Case [1].
54. Eng/ Alaa M Eladl 54
The solution was carried out using both
genetic algorithm (GA) and firefly algorithm
(FA). The results of both algorithms are
compared with those of the conventional
mathematical method .
Energy Hub Case [1].
#
SIMULATION
#
57. Eng/ Alaa M Eladl 57
Energy Hub Case [2].
Many hospitals also proactively look
for cost effective energy solutions
because of their energy costs.
The potential to meet the high power
quality and reliability needs with a
CHP system is also of great interest
to hospitals.
58. Eng/ Alaa M Eladl 58
Energy Hub Case [2].
The hospital which is considered as case study.
10,000 square-meters
The hospital operates 24 hours a day all year
round (8760 hours per year).
Required :
increase the energy efficiency
59. Eng/ Alaa M Eladl 59
Energy Hub Case [2]. Energy load profiles:
The electrical, heating and cooling loads during in a normal Summer day
60. Eng/ Alaa M Eladl 60
Energy Hub Case [2]. Energy price:
The electrical and Natural gas loads during in day
61. Eng/ Alaa M Eladl 61
Energy Hub Case [2].
Problem Model:
Energy
Hub
Model
Pe
Pg-CHP
Pg-Boiler Lc-Cooling
Lh-heating
Le-electrical
62. Eng/ Alaa M Eladl 62
Energy Hub Case [2].
The CHP size is selected from the available sizes of SOKRATHERM cogeneration units.
The sizes available for these types of CHP start from 50 kw to 532 kw electrical output.
These types of CHP have gas/electricity efficiency ranging from 34% up to 39% and gas/heat
efficiency from 50% up to 57%.
In our case average efficiencies of 35% and 54% are considered as given in table .
CCHP Selection:
63. Eng/ Alaa M Eladl 63
Energy Hub Case [2].
The boiler size is selected from the available sizes of Melbury HE boilers .
The sizes available for these types of Boiler start from 530 kW to 10000 kW heating output.
Boiler Selection:
64. Eng/ Alaa M Eladl 64
Energy Hub Case [2].
THE FOLLOWING TABLE
THE CHP UNITS, BOILERS AND
COOLING CHILLERS COST
PERFORMANCE
CHARACTERISTICS OF CCHP
AND AUXIL-IARY BOILER.
65. Eng/ Alaa M Eladl 65
Optimal sizing and dispatch at
peak load
Energy Hub Case [2].
The convergence characteristics of the objective
value are shown .
The FFA resulted in CHP size of 337 kW and
boiler size of 6300 kW.
The optimal dispatch resulted in
electrical power input Pe= 1065.5 kW,
gas power input to CHP of 956kW
gas power input to Boiler of 6514.7 kW.
In the first layer of solution
66. Eng/ Alaa M Eladl 66
Optimal sizing and dispatch
during 24 h
Energy Hub Case [2].
The convergence characteristics of the objective
value are shown .
The FFA resulted ‘as the same for peak load’ in
CHP size of 337 kW and boiler size of 6300 kW.
The optimal dispatch resulted in
In the Second layer of solution
67. Eng/ Alaa M Eladl 67
Energy Hub Case [2].
The peak values of these powers are
The electrical power (Pe-in) = 1065.5 kW
The gas power input to CHP (Pg1) = 956 kW
Gas power input to the boiler (Pg2) = 6140.6 kW
Optimal sizing and dispatch
during 24 h
In the Second layer of solution
68. Eng/ Alaa M Eladl 68
Energy Hub Case [2]. Optimal sizing and dispatch
exported to the network
In the Third layer of solution
The electrical power exported to the
network during the day .
At the time of peak load stayed at its value
of 0.1519 kW and there was no excess heat
power to be exported to the network.
69. Eng/ Alaa M Eladl 69
Our Research achieved the following:
Modification for Standard Firefly Algorithm (MFFA).
Solving Energy Hub Problem by using MFFA.
Sizing for Energy Hub components by using MFFA.
Bi-directional Energy.
The new in our Research