Fuzzy Logic Controller For Hybrid Renewable Energy System
Fuzzy Logic Controller For Hybrid Renewable Energy System
Abstract— The objective of this work is to design a scheme to since it is a significant infrastructure of any country. As a result,
control the power flow of a hybrid renewable energy system with the use of electricity expands remarkably. However, electricity
multiple renewable energy sources (solar energy and wind energy) is not an energy itself. It is an energy carrier that needs to be
and multiple energy storage systems. The use of energy storage is generated using other forms of energy [2]. The old methods of
necessary due to the intermittency of the renewable energy sources
generating electricity rely heavily on fossil fuels followed by
and the consequent peak power shift between the sources and the
load. In addition, the use of the energy storage can increase the nuclear materials. Electricity is then generated centrally and
overall system reliability and stability. In this work, batteries are transferred using power transmission lines to its destination.
used as the primary energy storage system for short to medium Nowadays, the energy industry focuses on generating
storage term, while hydrogen fuel cell is used as the long-term electricity from renewable sources. However, such efforts are
energy storage. A supervisory control system is designed to handle faced with several challenges including availability of certain
various changes in power supply and power demand by managing power source to cover demand, power fluctuation, and power
power intermittency, power peak shaving, and long-term energy quality. Integrating more than one renewable energy source into
storage. Since both power supply and demand are not fully a system can overcome the problem of power availability to
predictable and they have time variant nonlinear behavior,
meet demand in certain times. This, however, cannot guarantee
computational intelligence is introduced to solve this issue and
provide suitable control algorithm. This type of control, based on stability and reliability of the power system, and consequently
fuzzy logic, combines knowledge of the system and control. The may lead to decrease of the quality of supplied power. Hence,
proposed methodology can be optimized such that the system is such hybrid renewable power systems require a medium of
able to adapt to its working environment and deliver best results storing excess energy (that is not needed at a particular time),
under given circumstances. For more realistic simulation results, so that it can be supplied to the demand side at a later time.
the designed model utilizes real solar power data collected from Development of susch hybrid system that is the main focus of
the University of Queensland in Australia, while real wind power this work.
and load data was collected by the Alberta Electric System This article is organized in five sections. Section 2 provides
Operator in Alberta, Canada. The model of the system is designed
an overview of related work, including limitations of previous
and simulated in MATLAB SimPowerSystems™ to verify the
effectiveness of the proposed scheme. approaches and description of how they were overcome in the
Keywords— Fuzzy logic, hybrid renewable energy system, past. This section also provides an overview of the current work
energy storage management, intelligent control. and summary of its contributions. In section 3, the dynamics of
the studied system is described, along with employed models of
I. Introduction the smart power system with photovoltaics (PV), wind power
proposed in [6] with FC providing power to the load and the two sources provides enough total power to supply the load.
ultracapacitors (UCs) assisting during transients. However, the In addition, the system has two energy storage elements: a
combination of FC and UC is not economically feasible. As the battery bank and a full hydrogen system that can generate
objective of this work is not focused on transients, the use of hydrogen from water using excess power and generate
expensive UCs should be avoided. An important advantage of electricity from hydrogen using hydrogen FC when required.
a large UC is a high rate of discharge required to provide a fast The main supervisory controller directs the flows of
response of the FC. Hence, other technologies must be used to power to the load and to and from the energy storage elements
obtain more desirable results. The issue of slow response of using two operating modes. In the charging mode, the FLC
batteries can be overcome by taking advantage of the fast assigns a percentage of the excess power to the battery and the
response characteristics of fuel cells [3] for damping out remaining power to water electrolysis, based on three inputs to
oscillations caused by frequent change in load and generation the FLC. Similarly, in the discharging mode, the FLC assigns a
within a smart grid. A comprehensive review of various percentage of required power from the battery and from the
methods [7] pointed out that there are still issues that need to be hydrogen fuel cells based on three inputs to the FLC. Since the
addressed, mainly related to failures affecting end consumers. system relies only on energy storage elements to handle surplus
Additional work on storage and FC and storage can be found in and required power (i.e. it is not connected to the grid); it is
[8], where an electrical equivalent circuit of a fuel cell called off-grid hybrid renewable energy system [9][10][11]. All
generation system for control purpose based on fuzzy logic links between subsystems are DC links and power is converted
controller (FLC) was developed and proposed. According to to AC before supplying the load via DC-AC inverter with
[3], several tests were carried out on the phosphoric acid fuel assumed ideal efficiency.
cell plant installed in Germany. The reported results mainly
focused on the response time for load change from 25% of the B. System Modeling
rated power to full load. Although all cited studies achieve good In this section, different subsystems are described and
results for their specific purposes, they did not consider the discussed. Each subsystem is modeled individually. Power
control of HRES power flows using a fuzzy logic controller electronics, which is the coupling component for the power
aimed to use the excess power to generate hydrogen from water. flow, is not discussed in this paper and 100% efficiency ’ideal’
This would not only improve the stability of the overall system, power conversion is assumed.
but also efficiently manage the energy storage elements,
prolonging the life of the entire storage system while adequately 1) Solar Photovoltaic Subsystem
supplying the demand side. In this study, it is assumed that maximum power point
In this contribution, a novel fuzzy logic controller for HRES tracker (MPPT) to extract maximum possible power from PV,
with multiple types of storage is described. The proposed and a DC-DC power converter is used to match the MPPT
scheme solves issues related to the needs of consumers pointed output voltage with the system voltage. The PV cell is operating
out in [7]. The solution focuses on satisfactory supply of the based on photoelectric effect [12]. It converts light with
demand side while ensuring the safety of lithium-ion battery different wavelengths into current at the PN junction, producing
and maintaining its efficiency and reliability. A comprehensive electricity directly from the cell when connected to a load.
evaluation of the proposed scheme and validation of its According to [13] the current produced is given by
effectiveness is consducted using MATLAB SimPower-
Systems™ using real solar power, wind, and load data. 𝐼𝑡𝑜𝑡𝑎𝑙 = 𝐼0 (𝑒 𝑞𝑉⁄𝑘𝑇 − 1) − 𝐼𝐿 (1)
where k is Boltzmann’s constant, 𝐼0 sets the current scale and
III. System Dynamics, Description and Modeling q is the electric charge of the particles which comprise the
current 𝐼𝑡𝑜𝑡𝑎𝑙 . Also, 𝐼L is the light generated current, and 𝑇 is
A. System Dynamics the ambient temperature. Based on the solar irradiance and the
The system used in this study is a simplified model of smart ambient temperature, which are two crucial physical quantities
power system with WP and PV. The configuration of the system in PV technology, the PV cell corresponds to and produce open
used is shown in Figure 1. The solar source generates most of circuit voltage and closed circuit current [13]. Thereafter, the
its power during the day time is used to cover the day high PV system is connected to MPPT, DC-DC power converter and
demand due to high electricity usage for air conditioning and to finally to the system. For simulation purposes, real solar power
support daily activities. data is collected from the University of Queensland which
provides live and historical data of installed PV systems.
the area swept by the rotor blades, and 𝑢 is the velocity of the the gas constant, 𝑇𝑏 is the tank temperature, 𝑀𝐻2 is hydrogen
air. molar mass and 𝑉𝑏 is the tank volume.
This power is applied to the rotor of the electric generator to In discharging mode, the FLC requests fuel cells to convert
produce electricity. WP is only generated after certain cut-in air the hydrogen to electrical energy to supply the load. There are
speed. It then increases with the air speed until reaching a rated many types of fuel cells. The fuel cell model used in this work
steady value, and remains steady until the wind turbine reaches is based on equation (6) in which the outputs are water, that can
the cut-off speed [14]. The wind turbine is assumed to work in be recycled, and electricity.
maximum power point. Thereafter, it is connected to MPPT,
AC-DC power converter, and finally to the system. For Electrical power generated = 𝑁𝐻2 ∗ 𝑀𝐻2 ∗ Ƞ𝐹𝐶 ∗ 𝐸𝐶 (6)
simulation purposes, historical WP data is collected from
Alberta Electric System Operator (AESO). In equation (6), Ƞ𝐹𝐶 is fuel cell efficiency and 𝐸𝐶 is theoretical
energy factor equivatent to 39.4 kWh/Kg, or 142KJ/g [17].
3) Battery Subsystem
In this work, batteries are used as the primary energy 5) Demand and Load Power Subsystem
storage system for short to medium storage term. This This subsystem represents the power requested from the
subsystem is based on the generic battery block provided by demand side. It helps us understand how much power is
Simscape Power Systems in Simulink environment [15]. The required to be generated every second, therefore the system is
battery type is chosen as a rechargeable lithium-ion battery. responding to that amount. As a part of described simulations,
Detail model of the battery system, including the equivalent this data is obtained from AESO.
circuit for both the charging and discharging modes, can be
found in [15]. The battery is connected to the system using a bi- C. Proposed Supervisory Control Design
directional DC-DC converter with ideal efficiency and The proposed controller consists of two operational modes:
behavior, and is controlled by a battery management system charging and discharging mode. Each mode has a fuzzy logic
that receives control signals from the main controller. controller, as shown in figures 2 and 3, respectively.
4) Hydrogen Subsystem
Hydrogen fuel represents the long-term storage for
storing extra energy in big quantities for days and supports
battery subsystem when a large load is applied in preventing
battery damage, battery working insufficiently or shorten its
lifespan. Ignoring hydrogen Compressor and other auxiliary
components, this work considers a hydrogen subsystem
consisting of three major blocks, namely hydrogen generation,
hydrogen storage, and hydrogen fuel cells. Figure 2. Fuzzy Logic Controller Design.
In charging mode, hydrogen is generated by the surplus
power that fuzzy controller distributes. That power supplies a
water electrolysis which then generates hydrogen. The moles of
hydrogen generated is given by the following chemical
equation [16]:
1
𝐻2 𝑂 + 𝑒𝑙𝑒𝑐𝑡𝑟𝑖𝑐𝑎𝑙 𝑒𝑛𝑒𝑟𝑔𝑦 → 𝐻2 + 𝑂2 (3)
2
The model of water electrolysis in this project is based on a
model mentioned in [16] and is express mathematically as Figure 3. Hydrogen Controller.
remaining power goes directly to hydrogen controller, which electrolysis can receive. However, if power is higher than the
decides whether this power goes to the water electrolysis or to limit, or the hydrogen tank is full, or the electrolysis health
the dummy load. Hydrogen controller is required to protect the status is bad, the power will go directly to a dummy load.
water electrolysis from overpowering and protects the hydrogen Quantity of generated hydrogen depends mainly on the
storage tank from generating hydrogen when it is full. The three efficiency of the water electrolysis.
input signals to the fuzzy controller can be described as follows. Out of this mode, the power going to load, 𝑃𝐿 , is given by
Input one ( 𝑥1 ) is the ratio of surplus power to maximum
𝑃𝐿 = 𝑃𝐷 + 𝑃𝐷𝐿 (10)
battery charging power. It can be expressed in terms of the
battery maximum charging power (𝑃𝐵𝑀𝐶 ) as where 𝑃𝐷 is load demand and 𝑃𝐷𝐿 is power of the dummy load.
𝑃𝐸𝑆𝑆
𝑥1 = ∗ 100 (8)
𝑃𝐵𝑀𝐶 2. Discharging Mode
𝑥1 is designed to understand how large the surplus power is, As an opposite of the charging mode, the discharging mode
compared to the maximum power with which the battery can be is activated when PESS is negative, a case where there is no
charged. This principle is crucial for protecting the battery from surplus power, but this time, power is required to satisfy the
large current when it is nearly full. It should be noted that 𝑥1 is load. Similarly, to the previous case, the decision of distributing
limited between 0 and 100. the required power is done by the FLC which is the main
Input two (𝑥2 ) is the battery state of charge that informs controller in the discharging mode. This fuzzy controller uses
the FLC about the level which the charge of the battery has three inputs. Based on 31 rules, it generates an output signal that
reached. Value of 𝑥2 is also in the range of 0 to 100. assigns a percentage of the required power to the battery and
Input three (𝑥3 ) represents battery state of health (SOH). It the remaining power is requested from the fuel cell after passing
describes how stressed the battery is, at a certain time. It is hydrogen controller that decides whether the FC can support the
therefore an important input for the FLC. Based on data of the load. If the FC cannot support the load, the system shuts down
signal received from 𝑥3 , the FLC avoids charging the battery to avoid low output power quality. Hydrogen controller is
with higher current rates when the battery is exhausted. The required to protect the fuel cell from over discharging and to
input 𝑥3 is represented as a scale of ten. avoid power quality deficiency. In the discharging mode, of the
The three inputs are crucial for protecting the battery. They fuzzy controller also has three input signals, which are 𝑥4 , 𝑥5
protect it from a short life span by avoiding rapid aging as well and 𝑥6 similar but opposite in definition and function to the
as avoiding damage to the battery. charging mode.
By using fuzzification process, the input signals are Input 𝑥4 is the ratio of needed power to maximum battery
converted into membership functions. The fuzzy membership discharging power ( 𝑃𝐵𝑀𝐷 ):
functions and fuzzy rules are designed to charge the battery 𝑃𝐸𝑆𝑆
𝑥4 = ∗ 100 (11)
within safety limits based on the following constraints: 𝑃𝐵𝑀𝐷
𝑆𝑂𝐶𝐿 = 15%
} (9) In the discharging mode, 𝑥4 determines how large is the
𝑆𝑂𝐶𝐻 = 95%
needed power compared to the maximum power that battery can
The safety limits are implemented in the rules which relate deliver. This is crucial to protect the battery from over
the inputs with the proper output in figure 4. discharging. In the discharging mode, 𝑥4 remains limited to
values in the range of 0 to 100.
Input two (𝑥5 ) and input three (𝑥6 ) maintain their same
respective definitions and functions as well as ranges as
discussed in the previous section.
Additionally, the input signals are also converted into
membership using fuzzification process and all fuzzy
membership functions and fuzzy rules are designed to save the
Figure 4. charging mode fuzzy controller rules surface. battery from damage using information extracted from lithium-
ion battery charging/discharging curves. The rules are
The rules and memberships are then modified by observing the
illustrated in figure 5.
controller output based on a process to implement human
experience within the controller. Thereafter, the FLC controller
generates an output signal which is a variable from 0 to 1. The
output signal is eventually multiplied by the surplus power and
fed to the battery while the remaining power goes as an input to
the hydrogen controller. The hydrogen controller has four
inputs. These inputs are the respective minimum and maximum
power received by water electrolysis, the electrolysis health Figure 5. Discharging mode fuzzy controller rules surface.
status and hydrogen tank level.
The objective of the first controller is to make sure that the The controller outputs signal, within the range of 0 to 1, is
hydrogen tank is not full or does not exceed certain threshold. multiplied by the required power to request this amount from
The controller will then assign the power to the water the battery. The battery will therefore discharge and generate
electrolysis within the maximum range of power that the amount of power that be subtracted from the required power
2017 IEEE 30th Canadian Conference on Electrical and Computer Engineering (CCECE)
to determine the new value of power from the FC. If the needed based on the fuzzy logic rules. The behavior of the
requested power from the FC is not higher than the maximum battery will be described in the next sections.
power that fuel cell can generate, the fuel cell will respond and
generate electricity. The quantity of hydrogen used depends on B. Simulation Case 2: Charging Mode when 𝑥1 is 100%
the efficiency of the fuel cell. However, if the hydrogen tank is with Low Battery Stress Status
empty (or below certain threshold), or the FC health status is In this case, the surplus power is at the maximum system
bad, the system will shut down due to inability to supply the peak power of 10kW where the power is the total generation of
load. In the discharging mode, the power going to load is solar and wind power combined with no load connected and
𝑃𝐿 = 𝑃𝑠 + 𝑃𝑤 + 𝑃𝐵 + 𝑃𝐹𝐶 low stress on the battery. Thus, the entire surplus power is to be
}, (12) sent to the energy storage systems. This is achieved as
𝑃𝐷𝐿 = 0
illustrated in figure 7.
where 𝑃𝑠 is solar power, 𝑃𝑤 is wind power, 𝑃𝐵 is battery power, 100
𝑃𝐹𝐶 is fuel cell power and 𝑃𝐷𝐿 is power of the dummy load. 80
60
IV. Simulation Results and Discussion
40
Simulations were performed using the smart power system Batt. SoC
20
illustrated in Figure 1. The system consists of 10KW wind Batt. PWR
power, 10KW PV power, 5KWh lithium-ion battery bank, 0
0 200 400 600 800 1000 1200
10KW Water Electrolysis, 10KW fuel cells, 30kg hydrogen TIME (SEC)
tank and a 10KW maximum power supply capacity. Performed Figure 7. Low Battery Stress Charging Case
simulations confirm ability of the controller to satisfy the main
goal of the of this work: to supply the load at all times using PV As seen in the figure, the FLC distributes the power by
and WP (which are fluctuating inputs), through the assistance considering the maximum battery charging power limit: slow
of batteries and hydrogen FC without a reduction in the power charging power below 40% of total power when battery state of
quality or load supply deficiency. The simulation results also charge above 80% and stop charging when 𝑆𝑂𝐶𝐻 is reached.
verify fulfilment of the second objective: to operate the battery Hence, the proposed FLC successfully achieved the goal of
in a proper manner and to protect it in both charging and maintaining the battery under low-stress condition.
discharging modes.
C. Simulation Case 3: Charging Mode when 𝑥1 is 100%
A. Simulation Case 1: Supplying of the Load using 24 with High Battery Stress Status
hours of Real PV and WP Data in Both Charging and The behavior of the battery under high stress with the
Discharging Mode proposed FLC is simulated. The result is shown in figure 8.
100
The performance of the system with the proposed technique
80
was tested in the presence of PV and WP fluctuations as well as Batt. SoC
load variations shown in Figure 6. 60
Batt. PWR
40
20
0
0 500 1000 1500 2000 2500 3000
TIME (SEC)
avoiding load supply deficiency. Figure 9 shows the solar power wind power and load were applied to a smart power
discharging behavior of the battery. The FLC requests 40% of system modeled in MATLAB Simulink/Simpower Systems
the power from the battery when the SOC is 30% and it environment. With the proposed scheme, the power flow is
decreases that percentage rapidly when the SOC is below 17%. adequately controlled. Excess power is accumulated by the
Then, it stops requesting power from the battery when the storage system and the proposed fuzzy-based supervisory
charge level reaches 𝑆𝑂𝐶𝐿 and transfers the load to FC so that control provides the stability of the overall system. At the same
the power is supplied to the load by the FC alone. time, it effectively manages the charging/discharging processes
of the lithium-ion battery to extend its useful life. When needed,
50
the proposed controller smoothly transfers the load the
40
hydrogen system to avoid system failures and increase
30 electrolysis and fuel cell lifespans. All described modes were
20 tested under multiple operating scenarios, and obtained results
10 Batt. SoC confirmed its capability to control HRES.
Batt. PWR
0
0 100 200 300 400
TIME (SEC)
500 600 700 800
References
Figure 9. Low Battery Stress Discharging Case [1] J.P. Rodrigue, C. Comtois, and B. Slack, “Transport and Environment,”
in The Geography of Transport Systems, 1st ed. New York: Routledge,
E. Simulation Case 5: Discharging Mode when 𝑥4 is 2006, ch.8, pp.204-205.
[2] B. Metz, O. Davidson, P. Bosch, R. Dave and L. Meyer, “Introduction,”
100% with High Battery Stress Status in Climate Change 2007 Mitigation. New York: Cambridge University
In this case, the proposed FLC requests power from batteries Press, 2007, ch.1, sec.1.3.2.2, pp.109-110.
and FC while protecting the battery and avoiding load supply [3] K. Ro and S. Rahman, “Control of grid-connected fuel cell plants for
deficiency. The power required by the load is equivalent to the enhancement of power system stability,” Renew. Energy, vol. 28, no. 3,
pp. 397–407, 2003.
maximum discharging power of the battery, and the battery is [4] L. Wang, H. Zhang, and S. Weng, “Modeling and simulation of solid
under high stress. oxide fuel cell based on the volume-resistance characteristic modeling
Concurrently, the hydrogen controller will request the technique,” J. Power Sources, vol. 177, no. 2, pp. 579–589, 2008.
assigned power from the FC. However, if the tank is empty or [5] M. D. Lukas, K. Y. Lee, and H. Ghezel-Ayagh, “Development of a stack
simulation model for control study on direct reforming molten carbonate
the amount of power cannot be delivered from the FC or in the fuel cell power plant,” IEEE Trans. Energy Convers., vol. 14, no. 4, pp.
case of unhealthy FC, the hydrogen controller will request the 1651–1657, 1999.
system shutdown to avoid cascading effects. There are [6] Y. Eren, O. Erdinc, H. Gorgun, M. Uzunoglu, and B. Vural, “A fuzzy
situations where the system is grid-connected or connected to logic based supervisory controller for an FC/UC hybrid vehicular power
system,” Int. J. Hydrogen Energy, vol. 34, no. 20, pp. 8681–8694, 2009.
another energy source, and in such case, an islanding [7] K. S. Reddy, M. Kumar, T. K. Mallick, H. Sharon, and S. Lokeswaran,
phenomenon, which is beyond the scope of this work will occur. “A review of Integration, Control, Communication and Metering (ICCM)
Figure 10 illustrates the smooth discharging effect of the of renewable energy based smart grid,” Renew. Sustain. Energy Rev., vol.
battery. As shown in the figure, the proposed FLC minimizes 38, pp. 180–192, 2014.
[8] K. Yoon-Ho and K. Sang-Sun, “An electrical modeling and fuzzy logic
the discharged power when the charge approaches 𝑆𝑂𝐶𝐿 . control of a fuel cell generation system,” Energy Conversion, IEEE
Trans., vol. 14, no. 2, pp. 239–244, 1999.
50
Batt. SoC [9] S. Misak and L. Prokop, “Off-grid power systems,” in 2010 9th
40 Conference on Environment and Electrical Engineering, EEEIC 2010,
Batt. PWR 2010, pp. 14–17.
30
[10] R. K. Akikur, R. Saidur, H. W. Ping, and K. R. Ullah, “Comparative study
20 of stand-alone and hybrid solar energy systems suitable for off-grid rural
10 electrification: A review,” Renewable and Sustainable Energy Reviews,
vol. 27. pp. 738–752, 2013.
0
0 500 1000 1500 2000 [11] E. M. Gray, C. J. Webb, J. Andrews, B. Shabani, P. J. Tsai, and S. L. I.
TIME (SEC)
Chan, “Hydrogen storage for off-grid power supply,” Int. J. Hydrogen
Figure 10. High Battery Stress Discharging Case Energy, vol. 36, no. 1, pp. 654–663, 2011.
[12] C. Kanumilli and K. K. Dutta, “Hybrid thermal photovoltaic system,” in
Proceedings of International Conference on Circuits, Communication,
This phenomenon begins at a point when the charge is below Control and Computing, I4C 2014, 2014, pp. 17–20.
20%. Thus, the FLC requests more power support from the FC [13] C. S. SOLANKI, “P-N Junction Diode: An Introduction to Solar Cells,”
than the battery. Hence in the discharging mode with 100% SPS in Solar Photovoltaics: Fundamentals, Technologies and Applications,
and high battery stress status, the fuzzy logic proves to protect 3th ed. Delhi, India: PHI Learning Private Limited, 2015, ch.4, sec 4.4,
pp. 92-93.
the battery from deep discharging, adequately meeting the [14] W. Tong, Ed., “Fundamentals of Wind Energy,” in Wind Power
required operating condition. Generation and Wind Turbine Design, Southampton, UK: WIT Press,
2010, ch.1, sec 5.3.4, pp. 23.
V. Conclusions [15] Tremblay, O., L.-A. Dessaint, "Experimental Validation of a Battery
Dynamic Model for EV Applications." World Electric Vehicle Journal.
This paper proposes a fuzzy logic based controller for HRES Vol. 3, May 13–16, 2009.
with multiple types of storage. The proposed scheme solves the [16] T. Alnejaili, S. Drid, D. Mehdi, L. Chrifi-Alaoui, R. Belarbi, and A.
problem related to consumer needs by satisfactorily supplying Hamdouni, “Dynamic control and advanced load management of a stand-
the demand side while focusing on the safety of the lithium-ion alone hybrid renewable power system for remote housing,” Energy
Convers. Manag., vol. 105, pp. 377–392, 2015.
battery system as well as its efficiency and reliability without a [17] L. Bertuccioli, A. Chan, D. Hart, F. Lehner, B. Madden, and E. Standen,
reduction in power quality. For more realistic results and "Study on development of water electrolysis in the EU," E4tech Sàrl with
comprehensive analysis of the proposed technique, real data of Element Energy Ltd, Feb. 7, 2014. [Online]. Accessed: Feb. 1, 2017.