International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 04 Issue: 06 | June -2020 ISSN: 2582-3930
SMART HYBRID ENERGY MANAGEMENT SYSTEM USING
FUZZY LOGIC
Aravindhakshan Seshadri1*, Jeethu Ram Mali D2, Saurav Kar3, Ujjal Debnath4
1,2,3,4Student, Department of Electronics and Instrumentation Engineering, DSCE, Bengaluru, 560078.
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract -Energy consumption has increased exponentially plug-in electric vehicles (PEVs), etc., would be grid-integrated
since the start of the new millennia. The arrival of the smart with gradually increasing penetration into active distribution
grid era has led to renewable energies such as sun, wind, networks as shown below in Figure-1.
water etc. being harnessed to help achieve energy supply and
demand. This paper proposes a Smart Hybrid Energy
Management System (SHEMS) which can be easily installed
and is implemented using Fuzzy Logic based on various
parameters such as time, load size, grid availability, battery
status. SHEMS architecture consists of an integrated battery
and load management system. The proposed architecture is
expected to optimize the energy consumption and save energy
costs.
Key Words:Energy Consumption, Smart hybrid energy
management system (SHEMS), Fuzzy Logic, Battery
management, Load management, Architecture, Optimize. Figure-1: Block Diagram of General SHEMS Architecture
(Courtesy: Internet)
1.INTRODUCTION
As discussed in [2,3], each home has two energy-related parts:
Over the years traditional energy sources have been used in the consumption and generation. The energy usage component
manufacture of electrical energy. Due to the decrease in the involves various home appliances and lamps. The energy
supply of these energy resources, electricity prices are generation component comprises renewable energies such as
increasing. Thermal power plants and nuclear power plants are solar and wind energy. Because a home consumes and
the major energy sources that cause global warming, and generates energy, to minimize the energy cost, a control device
production of nuclear waste that is hazardous to any living on like a home server needs to monitor and control both energy
earth. consumption and energy generation.
In recent years, the implementation of modernized smart city
infrastructure has become a global shared goal in most SHEMS monitors medium and light charges and determines
countries due to the tremendous environmental, economic and whether the load should be connected to the battery or grid.
social benefits it could bring. Building renewable and storage Installed in the premises is a renewably energized battery bank.
energy sources built in residential premises can be integrated The battery bank provides medium- and light-load power. The
into SHEMS in tandem with the increasing growth of grid is always connected to heavy loads. The power consumed
advanced power electronics and green energy technologies to by the loads is sensed, processed and displayed on a webpage
increase the in-house performance of energy conversion and where the user can easily create control. SHEMS is the Master
usage. Controller and manages the activities of the whole Energy
Management system as shown in the Figure-2 below.
2. SMART HYBRID ENERGY MANAGEMENT
SYSTEM (SHEMS)
Smart Hybrid Energy Management System (SHEMS) as
discussed in [4] is a vital home system for successful demand-
side smart grid management. It monitors and arranges various
home appliances in real-time, based on user preferences in
smart houses via the human-machine interface to conserve
electricity costs and improve energy efficiency utilization.
With growing concerns about global energy security and
environmental emissions, more and more distributed Figure-2: Block Diagram of Proposed SHEMS Framework
renewable generations, such as wind turbines, solar panels, and
© 2020, IJSREM |www.ijsrem.com | Page 1
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 04 Issue: 06 | June -2020 ISSN: 2582-3930
2.1 SPECIFICATIONS OF PROPOSED SYSTEM 2.3 IMPLEMENTATION
The SHEM framework as shown in Figure-2 is made using In Proteus Design Suite the real-time implantation is done
the following components. Specifications of the proposed using Schematic Capture. Proteus Programming Suite is a
framework is given in Table-1. proprietary suite of software tools mainly used for automating
electronic programming. The software is primarily used by
Table-1: Specifications of Proposed System electronic design engineers and technicians to build schematics
and electronic prints for printed circuit board manufacture.
Equipment Details
Arduino Mega The Arduino Mega 2560 is a microcontroller board based on
Proteus software uses schematic capture, both for simulation
the ATmega2560. It has 54 digital input/output pins (of which design and as the design process of a PCB layout project. It is
15 can be used as PWM outputs), 16 analog inputs, 4 UARTs also a central feature and integrated into all product setups.
(hardware serial ports), a 16 MHz crystal oscillator, a USB
connection, a power jack, an ICSP header, and a reset button.
Simulation works by either adding a hex file or debug file to
ACS712-05BT • Low-noise analog signal path the schematic portion of the microcontroller. Then, it is
Sensor • Total output error 1.5% at TA = 25°C simulated with any related analog and digital electronics. This
• Small footprint, low-profile SOIC8 package makes its use in fields such as engine control, temperature
control and user interface design in a wide range of project
• 1.2 mΩ internal conductor resistance
prototyping. It also finds use in the general community of
• 2.1 kVRMS minimum isolation voltage from pins 1-4 to hobbyists and is convenient to use as a training or teaching
pins 5-8 tool, since no hardware is required.
• 5.0 V, single supply operation
• 185 mV/A output sensitivity 3.LITERATURE SURVEY:
• Output voltage proportional to AC or DC currents
[1] “Fuzzy Logic Based Smart Home Energy Management
• Factory-trimmed for accuracy
System”:
• Extremely stable output offset voltage Authors propose a Smart Home Energy Management System
• Nearly zero magnetic hysteresis (SHEMS) that can be installed in a consumer void of
technological upgradations is proposed in this paper. A
Battery Voltage: 12V DC at 4.5 Ah
prototype consisting of an integrated Battery Management and
Lamps Voltage: 230V with variable resistance to depict Load Management System is designed and developed. The
appliances
Battery management system connects the battery either to the
Relay • Trigger Voltage (Voltage across coil) : 5V DC load or for charging, while the Load Management System
• Trigger Current (Nominal current) : 70mA decides whether the load should be connected to the grid or
the battery based on different parameters like type of load,
• Maximum AC load current: 10A @ 250/125V AC
battery status and grid availability. The energy management
• Maximum DC load current: 10A @ 30/28V DC system is implemented using Fuzzy logic and the hardware
• Compact 5-pin configuration with plastic moulding model is evaluated for different test conditions. The
• Operating time: 10msec Release time: 5msec significant improvement in the energy consumed with and
without SHEMS is presented.
Solar Panel Voltage: 12V DC at 0.5A [2] “Smart Home Energy Management System Including
Inverter 12V DC to 230V AC at 200 Watts. Renewable Energy Based on ZigBee and PLC”:
In this paper a Smart HEMS architecture is proposed which
Keypad 12-input phone keypad
simultaneously considers both energy consumption and
generation. The energy measuring modules based on ZigBee
2.2 METHODOLOGY are used to monitor the energy consumption of home
appliances and lights. A renewable energy portal based on
Fuzzy logic systems are based on logical reasoning along with PLC is used for monitoring the renewable energy generation.
the ability to fuzzify any system that makes it easier to execute. The home server gathers the data on energy consumption and
Fuzzy Logic Controllers are used in many industrial processes generation, analyses them for estimation of energy, and
because of which control activity takes place like human and controls the schedule of home energy use to minimize energy
the control process were easy once built. costs. The remote energy management server aggregates,
compares, and generates useful statistical analysis
To build the controller, number of parameters need to be information, the energy data from numerous home servers.
selected and then membership function and rules based on The proposed HEMS architecture is expected to optimize
heuristic information are selected as explained in [4]. The home energy usage by considering both energy consumption
SHEM Framework has four input membership functions and and generation, and result in cost savings for home energy.
one output membership function. Totally five membership
functions are designed based on the parameters i.e. Time,
Load, Grid Availability and Battery Status.
© 2020, IJSREM |www.ijsrem.com | Page 2
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 04 Issue: 06 | June -2020 ISSN: 2582-3930
[3] “Smart Home Automation System Using Wi-Fi Low 4.3 SELECTION OF THE TRINGULAR AND
Power Devices”: TRAPEZOIDAL MEMBERSHIP FUNCTIONS
This paper proposes a smart home automation system which
ensures security and makes life easier for the user. It contains Triangle and trapezoidal are chosen for the design of the
a large number of sensors that are capable of controlling or membership function. The justification in Fuzzy Logic
monitoring objects distributed in 3D space. The sensors can Controller for selecting the triangular and trapezoidal
be customized to calculate temperature, humidity, sound, membership function is as follows:
light, noise, dust air, etc. The paper deals with a solution
proposed to turn a typical house into a smart house while 1. To define the membership function, small amounts of data
reducing the energy consumption. This can be achieved using are required.
wireless sensor networks and the LabVIEW graphical 2. Quick adjustment of membership parameters (modal
programming environment, which use the NI LabVIEWTM values) functions based on measured input values —-> output
Statechart module to collect sensor data. of a system.
3. The possibility to obtain input mapping — > output of a
[4] “Smart home energy management systems: Concept, model that is a hypersurface consisting of linear segments.
configurations, and scheduling strategies”: 4. Polygonal membership functions mean the condition of a
The paper presents a short description of the smart HEMS unity partition (meaning the sum of membership grades for
architecture and functional modules. Then, in smart houses, each value x is 1) is easily met.
the advanced HEMS infrastructures and home appliances are
extensively studied and tested. In addition, the use of various 4.4 MEMBERSHIP FUNCTION OF THE FUZZY
renewable energy building services in HEMS, including solar, LOGIC CONTROLLER
wind, biomass, and geothermal energy, is being surveyed.
Finally, various home appliance scheduling techniques are The membership functions of the Fuzzy Logic Controller are
also being studied to reduce the cost of residential electricity implemented using eFLL library.
and increase the energy output from power generation
utilities. 1. Membership function of the input variable Time
4. FUZZY LOGIC CONTROLLER
A fuzzy control system is a fuzzy logic-based control
method:- a mathematical method that analyses analog input
values in terms of logical variables that take on continuous
values between 0 and 1, as opposed to classical or modern
logic, which acts on binary values of either 1 or 0 (true or
false), respectively.
4.1 OVERVIEW
Fuzzy logic is found widely in control devices. The word Figure-3: Membership function for the input variable Time
'fuzzy' refers to the fact that the logic in question is capable of
dealing with ideas that cannot be represented as 'true' or 'false' Time consists of three subsets of data i.e. night_2(0-5 hrs),
but rather as 'partly true.' While alternative approaches such as day (6-17 hrs), night_1(18-23 hrs).
genetic algorithms and neural networks can do nearly as well
as fuzzy logic in certain cases, fuzzy logic has the advantage
that the issue can be approached in terms that human 2. Membership function of the input variable Load
operators c It allows the mechanization of tasks that people
already do effectively.
4.2 DEVELOPMENT OF FUZZY LOGIC
CONTROLLER
The variable which can represent the dynamic performance of
the plant to be controlled should be chosen as the input to the
controller to design the Fuzzy Logic Controller (FLC). The
variables for input and output are converted to Linguistic
variables.
Figure-4: Membership function for input variable Load
Load membership function consists of two subsets that is light
(0-100 watts) and medium (101-200 watts).
© 2020, IJSREM |www.ijsrem.com | Page 3
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 04 Issue: 06 | June -2020 ISSN: 2582-3930
3. Membership function of the input variable Grid availability Examples of some rule bases are listed as follows:
If Time is Day and Load is Light and Grid is Yes and
Battery Status is High then controller output will be
Connect Battery.
If Time is Day and Load is Medium and Grid is No
and Battery Status is Nil then controller output will
be Connect Grid.
If Time is Night and Load is Light and Grid is Yes
and Battery Status is High then controller output will
be Connect Battery.
Example: If Time is Night and Load is Medium and Grid is
Figure-5: Membership function for input variable Grid No and Battery Status is Medium then controller output will
Availability be Connect Grid.
Grid membership function consists of two subsets i.e. No (0
V) And Yes (1-250 V)
4. Membership function of the input variable Battery Status
Figure-6: Membership function for input variable Battery
Status
5.Membership function for the output variable showing
controller output:
For the Fuzzy Logic Controller, the membership function of
the output variable of and the degree of membership function Table-2: Rule base tabulation of the Fuzzy Logic Controller
are shown in Figure below
5. IMPLEMENTATION OF SYSTEM THROUGH
PROTEUS DESIGN SUITE AND ARDUINO IDE
5.1 ARDUINO IDE
The Arduino Integrated Development Environment-or
Arduino software (IDE)-contains a text editor for code
writing, a message field, a text screen, a toolbar with common
function buttons and a set of menus. It connects to and
interacts with Arduino and Genuino Hardware to upload
programs.
Figure-7: Membership function for Output variable Load 5.2 PROTEUS DESIGN SUITE
Connection
The Proteus Design Suite is a proprietary suite of software
4.5 RULE BASE TABULATION OF THE FUZZY tools mainly used for automating electronic development. The
LOGIC software is primarily used by computer design engineers and
technicians to create schematics and computer prints for
The table-2 shows Time, Load, Grid availability and Battery printed circuit board manufacture.
status variables and their various combinations which
produces the change in the control signal for the fuzzy rule Schematic capture in the Design Suite is used both for the
base i.e. Relay Output/Load Connection. Rule Base matrix design simulation and for the production process of a PCB
logic was referred Krishna Prakash N. [1].
© 2020, IJSREM |www.ijsrem.com | Page 4
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 04 Issue: 06 | June -2020 ISSN: 2582-3930
model project. It is thus an integral part of all product sensors are used to measure the current flowing through each
configurations which are included. component and also to sense the presence of the grid, where
The simulated microcontroller works in proteus by using the output of each sensor is connected to the analog input of the
schematic part with either the hex file or a debug file. It is Arduino from inputs A1 to A5.DS1307 RTC module is
then co-simulated with any connected analog and digital connected to the Arduino through the SDA and SCL pins (20
electronics. and 21) of the Arduino Mega. A 12 key keypad is also
connected to Arduino for user input through the digital pins
5.3 SIMULATION USING PROTEUS DESIGN SUITE 29 to 23.
The Proteus Design Suite is used to create a virtual 5.5 WORKING
background of the SHEM framework as shown below in the
Figure-8; The RTC module DS1307 is set to the current clock time and
the hour value from the same is taken as time input. Battery
Status is derived by using two voltage divider circuits with
resistors R6(100K) and R7(10K) For Battery B1and resistors
R8(100K) and R9(10K) for Battery B2. The analog input from
the voltage dividers is then given to A12 and A13 port of the
Arduino. The battery voltage found is then fed to Battery
management function called batcondition().The function’s
task is to select one battery out of the two with the lower
voltage as the source to preserve and prevent over drainage
during blackouts. As when the selected battery gets depleted,
it switches to the second while it charges. Battery drain is
shown using potentiometers RV1 and RV2 to change the
battery’s output voltage.
Load is calculated using ACS71205-BT, a Fully Integrated,
Hall Effect-Based Linear Current Sensor with 2.1 kVRMS
Voltage Isolation and a Low-Resistance Current Conductor.
Using the ACS712.h inbuilt functions getCurrentAC() we
obtain the current flowing through each appliance(AC Lamp)
and calculate the power consumed by each appliance and the
total.
Meanwhile one of the current sensors is used to measure the
Figure-8: Schematic Diagram of SHEM System presence of Grid supply by detecting whether there is current
following through or relays and a resistor R4(1K). To depict
The architecture concept was referred from Krishna Prakash the Grid availability, we use a switch. The said inputs
N. [1]. Framework consists of an Arduino Mega 2560, obtained are passed through the fuzzy engine created through
ACS71205-BT Sensors, RTC module (DS1307), Solar panel, the eFLL functions created for Fuzzy Logic implementation.
battery, inverter, keypad, lamps to depict Household The Real time input is mapped into the fuzzy rule matrix
appliances and relays to control the power supply switching. based on fuzzy set created for each fuzzy input.
For Demonstration purposes, a simple inverter is used and its Rule base matrix then connects the respective output of the
output is replaced by an AC supply to depict the working of said input and converts it into a crisp set based on the rule
High Wattage inverter. executed. If none of the rules are met then 0 is returned as
crisp output. Values 1, 2 are used to connect the relay of the
5.4 CIRCUIT DIAGRAM appliances either to Grid or Battery respectively.
In the Figure-8 as depicted, solar panel is connected to two A fail-safe code is built into the algorithm to make sure that if
batteries B1 and B2 respectively through an Auto charging the load isn’t supported by battery during power outage, the
relay. The Voltage status of the same are maintained by using user we be given a warning about it and will be recommended
potentiometers RV1 and RV2, to mimic draining and to switch certain appliances to try again. Battery will be used
charging, the voltage level of each battery is detected by using during measuring when the grid is not available.
voltage divider circuits whose outputs are connected to A12
and A13 of the Arduino. DC power is converted into 230V 6. NEED FOR FUZZY LOGIC
AC using a simple mosfet inverter circuit.
The performance of Fuzzy Logic Controller (FLC) is
Battery Power Supply is replaced by another ac supply for compared with conventional IF-ELSE LOGIC Controller.
simulation purposes due to limits on CPU usage. Relays RL1 Below mentioned points are the pros and cons of using Fuzzy
to RL8 are used for controlling the connections of the loads to Logic Controller over IF-ELSE LOGIC Controller
either grid or the battery supply. These relays are connected to
pins 13 to 6 of the Arduino Mega. ACS712-05BT current
© 2020, IJSREM |www.ijsrem.com | Page 5
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 04 Issue: 06 | June -2020 ISSN: 2582-3930
Pros of Fuzzy Logic Controller compared to if-else logic
• Fuzzy controllers are real time expert system
implementing human experiences andknowledge, which
can’t be realized by IF-ELSE LOGIC.
• Fuzzy controllers are heuristic modular way for defining
any nonlinear control system. This flexibility is absent in
IF-ELSE LOGIC.
• From sufficient knowledge of system, FLC can achieve a
higher degree of automation and can go far beyond any
conventional controllers with the use of Neural network
and genetic algorithm.
• Fuzzy logic requires less line of codes compared to IF-
ELSE LOGIC and it can handle unexpected situation
which the programmer did not think of.
• With proper knowledge of Fuzzy Logic will reduce the
time consumed and work for coding by the programmer
covering a wide range of conditions that will take IF-
ELSE a lot of coding to cover.
Cons of Fuzzy Logic Controller compared to IF-ELSE LOGIC Figure-10: Simulation output using virtual terminal tool for
controller: night time rule base with grid and light load
with high battery
• Expertise of knowledge has to be available all time.
• It is not clearly understood and has no standard tuning
and no stability criteria.
• It cannot be implemented for unknown system of no
information, i.e. the system which has never been
executed in past.
7. RESULT AND SIMULATION
The simulation result of Fuzzy Logic Controller with random
input using Proteus Design Suite as shown in the Figures
9,10,11 and 12.
Figure-11: Simulation output using virtual terminal tool for
night time rule base withno grid and medium load with
medium battery
Figure-9: Simulation output using virtual terminal tool for
night time rule base with grid and medium load with high
battery
© 2020, IJSREM |www.ijsrem.com | Page 6
International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 04 Issue: 06 | June -2020 ISSN: 2582-3930
[3] Smart Home Automation System Using Wi-Fi Low Power
Devices by SilviuFolea, Daniela Bordencea, CasianaHotea
and HonoriuValean.
[4] Smart home energy management systems: Concept,
configurations, and scheduling strategies by Bin Zhou,
Wentao Li, Ka Wing Chan, Yijia Cao, YonghongKuang, Xi
Liu and Xiong Wang, College of Electrical and Information
Engineering, Hunan University, Changsha, China &
Department of Electrical Engineering, The Hong Kong
Polytechnic University, Hong Kong, 2016.
[5] https://blog.zerokol.com/2012/09/arduinofuzzy-fuzzy-
library-for-arduino.html
BIOGRAPHIES
Figure-12: Simulation output using virtual terminal tool AravindhakshanSeshadri1is a UGstudent
forday time rule base withno grid and medium load with of the Electronics andInstrumentation
medium battery depicting fail safe condition. Engineering Department at DSCE and
currently pursuing his final year. He has a
Ⅶ. CONCLUSION: keen interest in the field of UI/UX and
Machine Learning.
As we observe that using fuzzy logic makes our project more
robust with few lines of codes but it could be a tedious job for
the programmer to implement Fuzzy logic. So, we can also Jeethu Ram Mali D2is a UGstudent of the
turn to the IF ELSE conditions to make this project a bit easy. Electronics and Instrumentation Engineering
Using IF ElSE would make coding much simpler, but can't Department at DSCE and currently pursuing
manage it if any unforeseen situation occurs. The programmer his final year. He has a keen interest in the
had to bear in mind all potential circumstances that could field of Programming and Instrumentation.
occur in the future for using If ElSE condition.
In this paper, an attempt is made to carry out automatic
conversion of light and medium loads to renewably energized Saurav Kar3is a UGstudent of the
local storage based on its availability while reducing the Electronics and Instrumentation Engineering
pressure on the public power grid. Installation of SHEMS at Department at DSCE and currently pursuing
domestic premises would be appreciated when introduced his final year. He has a keen interest in the
globally in every home. Reduction in the use of domestic field of and Instrumentation.
electricity plays an important role in reducing the overall
carbon content and SHEMS is one of the efficient solutions,
as is evident from the results of the comparison presented in
this work. Analysis can be achieved by considering in-house Ujjal Debnath4is a UGstudent of the
profiles that have a larger number of light loads and medium Electronics and Instrumentation Engineering
home loads. Department at DSCE and currently pursuing
his final year. He has a keen interest in the
Ⅷ. REFFERENCE: field of Programming and product
development.
[1] Fuzzy Logic Based Smart Home Energy Management
System by Krishna Prakash N., Suraj R Gupta,
Shankaranarayanan P.V., Sidharth S, Sirphi M, Department of
Electrical and Electronics Engineering Amrita School of
Engineering, Coimbatore Amrita Vishwa Vidyapeetham,
India, 2018.
[2] Smart Home Energy Management System Including
Renewable Energy Based on ZigBee and PLC Jinsoo Han,
Chang-Sic Choi, Wan-Ki Park, Ilwoo Lee, and Sang-Ha Kim,
IEEE Transactions on Consumer Electronics, Vol. 60, No. 2,
May 2014.
© 2020, IJSREM |www.ijsrem.com | Page 7