Efficient Electricity Management System for Optimal Peak/Off-Peak Hour Pricing

With the advent of new technologies and an alarming increase in the world’s population, there has been a rapid increase in energy consumption. Consequently, this has resulted in a surge in developing sources that generate electricity and concurrently escalating global warming levels. Owing to their contributions in vast applications, dependence on renewable energy is a reliable option. However, it is known that a complete and efficient utilization of the incoming solar radiation is not feasible, taking into account the various losses associated. Our proposal addresses concerns resulting in the efficient utilization of solar energy based on optimal cost analysis by the mathematical procedure. This methodology when used along with a battery-based photovoltaic (PV) system effectively reduces the amount of electricity imported from the grid. The implementation of this method scales down the monthly electricity consumption by 67.1%. Our findings were established considering South Korea’s residential electricity tariff system. Our system works based on a principle where the batteries are charged with solar PV during off-peak hours and discharged during peak hours. The state of charge of the battery could be monitored using a web server. In situations, wherein the load demand cannot be sustained by the batteries, grid power can be utilized during peak hours. The sequence of these events can be implemented by a series of algorithms. Our proposed system also helps in achieving the goal-7 of the sustainable development goals (SDG) prescribed by the United Nations (UN), which is to boost the consumption of renewable energy which ultimately results in monetary savings to a large extent.


Introduction
Population growth and rapid economic development across the globe have eventually resulted in increased energy consumption. This has led to the depletion of fossil fuels and an increase in pollution and global warming levels [1]. These hazardous effects can be mitigated by the use of renewable energy sources available in various forms such as biomass, hydropower, the geothermal, wind, and solar energy. These energy sources have various merits such as being eco-friendly and has hence attracted vast attention from researchers [2]. Amongst the various forms of the above-mentioned renewable sources, solar energy has gained prominence owing to its availability as well as its easier and economical installation procedures. Exploiting solar energy is based on photovoltaic (PV) technology that comprises of fundamental units known as solar cells connected in series [3]. In remote areas, PV systems can compensate for the shortage of conventional power supplies. These systems have benefits such as low-cost maintenance and operating procedures, reliability, being eco-friendly, and hence providing a clean environment for the next generations [4,5]. These benefits have motivated many countries around the world to make a paradigm shift from conventional to solar power. This has resulted in an exponential surge in the installation of PV power plants [6]. Figure 1 depicts an estimate of the increased energy production by PV technology. The past two decades (2009-2020) have seen a 40-time increase in PV production. This trend is set to increase in the upcoming decade and a three-time increase can be expected by the year 2030 [7].
Electronics 2020, 9, x FOR PEER REVIEW 2 of 16 mentioned renewable sources, solar energy has gained prominence owing to its availability as well as its easier and economical installation procedures. Exploiting solar energy is based on photovoltaic (PV) technology that comprises of fundamental units known as solar cells connected in series [3]. In remote areas, PV systems can compensate for the shortage of conventional power supplies. These systems have benefits such as low-cost maintenance and operating procedures, reliability, being ecofriendly, and hence providing a clean environment for the next generations [4,5]. These benefits have motivated many countries around the world to make a paradigm shift from conventional to solar power. This has resulted in an exponential surge in the installation of PV power plants [6]. Figure 1 depicts an estimate of the increased energy production by PV technology. The past two decades (2009-2020) have seen a 40-time increase in PV production. This trend is set to increase in the upcoming decade and a three-time increase can be expected by the year 2030 [7]. Various methods have been proposed for the efficient utilization of solar energy. Our proposed system when used in conjunction with a PV and energy-storing system connected to a load offers various advantages when compared to previously established techniques such as peak load shifting and battery sizing methodology, and is a cost-effective solution for small and medium-sized applications [8]. Our proposed system also works towards achieving the goal-7 of the sustainable development goals (SDG) prescribed by the United Nations (UN) [9]. In particular, our proposed system scales down to a great extent the monthly electricity cost which when exploited in residential/industrial sectors can result in monetary savings to a large extent. It would also lessen the burden on non-renewable energy power generating sectors and would help in achieving a clean and green environment. Employing a portable system thus enables a more efficient use of solar energy. This system transforms renewable energy into electrical energy and further stores it during off-peak load hours. Various economic effective energy storing technologies such as thermal, hydro, fuel cells, and supercapacitors could be used for this system. The use of battery banks provides the best option because of its ease of installation compared to other technologies and is the commonly used method. [10][11][12][13]. Till date, deep cycle batteries such as lithium-ion, lead-acid, etc., are widely used in power systems applications due to its high reliability, energy density, low toxicity, high efficiency, and longlife cycle [14][15][16]. However, for the best life span of batteries, it is recommended to keep the average discharge cycle at about 40% [17].
Osmani et al. [18], investigated renewable energy sources in the United States and discussed the outline of electricity generation and technical challenges of sustainability. The authors [19] presented an optimal model with a grid interconnected hybrid system and discussed energy purchasing cost, Various methods have been proposed for the efficient utilization of solar energy. Our proposed system when used in conjunction with a PV and energy-storing system connected to a load offers various advantages when compared to previously established techniques such as peak load shifting and battery sizing methodology, and is a cost-effective solution for small and medium-sized applications [8].
Our proposed system also works towards achieving the goal-7 of the sustainable development goals (SDG) prescribed by the United Nations (UN) [9]. In particular, our proposed system scales down to a great extent the monthly electricity cost which when exploited in residential/industrial sectors can result in monetary savings to a large extent. It would also lessen the burden on non-renewable energy power generating sectors and would help in achieving a clean and green environment. Employing a portable system thus enables a more efficient use of solar energy. This system transforms renewable energy into electrical energy and further stores it during off-peak load hours. Various economic effective energy storing technologies such as thermal, hydro, fuel cells, and supercapacitors could be used for this system. The use of battery banks provides the best option because of its ease of installation compared to other technologies and is the commonly used method. [10][11][12][13]. Till date, deep cycle batteries such as lithium-ion, lead-acid, etc., are widely used in power systems applications due to its high reliability, energy density, low toxicity, high efficiency, and long-life cycle [14][15][16]. However, for the best life span of batteries, it is recommended to keep the average discharge cycle at about 40% [17].
Osmani et al. [18], investigated renewable energy sources in the United States and discussed the outline of electricity generation and technical challenges of sustainability. The authors [19] presented an optimal model with a grid interconnected hybrid system and discussed energy purchasing cost, however, they did not include various essential analysis such as feed-in-tariff (FIT), time-of-use (ToU) tariffs, and economic data in their study. The authors [20][21][22] investigated the energy management system to shift load usage from peak hours to off-peak hours to obtain economic benefits, but the system had their limitations. Kasali. F, et al. [17] investigated using an automatic transfer switch when the PV system unmet load, not including ToU tariffs. Jason. L et al. [23], discussed reducing peak load by installing more battery capacity and suggesting that batteries charge with grid power during the night as it is cost-effective. In this study, the battery storage system was charged with a PV system that is managed smartly and efficiently, which could be executed with a proposed algorithm. The electrical benefits of the PV system with ToU tariffs and economic analysis were determined.
The Internet of things (IoT) technology has added a new dimension to the world of communication technology. Now anyone from anywhere can connect any time remotely with this advanced technology [24,25]. IoT sends data over a network without human-to-human or human-to-machine interference (HMI) [26]. IoT is also used in different sectors like transportation, automation, health, energy, and financial services [27]. The cost of an IoT system is also low and highly flexible. A web-based server is configured with this system to process, log, and monitor data. In this study, IoT technology can be also implemented to monitor the state of charge (SoC) of the battery system using a web server.

Tariff and Solar Energy Data
South Korea is one of the most developed countries with a rapid growth in technology. Figure 2 shows that the electricity generation of installed solar PV increased gradually in Korea from 81 MW in 2006 to 7850 MW in 2018 [28]. The South Korean government decided to initiate a development plan as a part of the energy technology development to increase the solar energy generation gradually up to a target of 11%. This helped to fulfill the energy demands as well as satisfy the climate change international adoption norms dealing with greenhouse gas (GHG) emissions reductions [29][30][31].
Electronics 2020, 9, x FOR PEER REVIEW 3 of 16 however, they did not include various essential analysis such as feed-in-tariff (FIT), time-of-use (ToU) tariffs, and economic data in their study. The authors [20][21][22] investigated the energy management system to shift load usage from peak hours to off-peak hours to obtain economic benefits, but the system had their limitations. Kasali. F, et al. [17] investigated using an automatic transfer switch when the PV system unmet load, not including ToU tariffs. Jason. L et al. [23], discussed reducing peak load by installing more battery capacity and suggesting that batteries charge with grid power during the night as it is cost-effective. In this study, the battery storage system was charged with a PV system that is managed smartly and efficiently, which could be executed with a proposed algorithm. The electrical benefits of the PV system with ToU tariffs and economic analysis were determined.
The Internet of things (IoT) technology has added a new dimension to the world of communication technology. Now anyone from anywhere can connect any time remotely with this advanced technology [24,25]. IoT sends data over a network without human-to-human or human-tomachine interference (HMI) [26]. IoT is also used in different sectors like transportation, automation, health, energy, and financial services [27]. The cost of an IoT system is also low and highly flexible. A web-based server is configured with this system to process, log, and monitor data. In this study, IoT technology can be also implemented to monitor the state of charge (SoC) of the battery system using a web server.

Tariff and Solar Energy Data
South Korea is one of the most developed countries with a rapid growth in technology. Figure 2 shows that the electricity generation of installed solar PV increased gradually in Korea from 81 MW in 2006 to 7850 MW in 2018 [28]. The South Korean government decided to initiate a development plan as a part of the energy technology development to increase the solar energy generation gradually up to a target of 11%. This helped to fulfill the energy demands as well as satisfy the climate change international adoption norms dealing with greenhouse gas (GHG) emissions reductions [29][30][31].   [34]. Sunshine hours are defined as the time during which the sun is visible, which is important for gaining detailed information about solar radiation over the region for installing PV systems. The availability of sunshine hours data is taken from KMA. The average available solar irradiance, which can be utilized to charge the batteries lies in the range of 4.48 to 5.46 h [30,35].   [34]. Sunshine hours are defined as the time during which the sun is visible, which is important for gaining detailed information about solar radiation over the region for installing PV systems. The availability of sunshine hours data is taken from KMA. The average available solar irradiance, which can be utilized to charge the batteries lies in the range of 4.48 to 5.46 h [30,35]. The total energy output (E) of the PV system is proportional to the area (A) of the PV system, efficiency (r), and daily sunshine hours (H) as well as performance ratio (PR) (default value 0.75). Energy output can be calculated with the below-mentioned equation (1) [36][37][38]: In this study, PV panels of Q.Plus L-G4.1 model (polycrystalline) [39] with an area of 5.7 m 2 is considered. The Q. Plus L-G4.1 model has a voltage of 37.02 V, current of 8.9 A, and power of 330 W with an area of 1.9 m 2 .

Tariff Details
In the coming years, non-renewable reserves will get depleted. To reduce these risks, governments keep restrictions on electricity usage by introducing usage dependent tariffs and by also encouraging the installation of renewable sources. Under this scheme, consumers are encouraged to install renewable energy sources during peak hours and switch to grid supply during off-peak hours. This lessens the burden on non-renewable energy generating plants and simultaneously results in greenhouse emission reductions, which also has economic benefits [40]. Peak hour tariffs were implemented in various countries such as the UK, Persian Gulf, and California (US) [41]. The implementation resulted in a reduction of electricity usage up to 40% in the Persian Gulf and 20% in California [42].

Electricity Tariff System in Korea
The electricity tariff system in Korea was designed to provide a lower rate to those who consume less electricity and a higher rate for those who use more [43]. Table 1. shows the electricity chart of present electricity costs according to usage. The total energy output (E) of the PV system is proportional to the area (A) of the PV system, efficiency (r), and daily sunshine hours (H) as well as performance ratio (PR) (default value 0.75). Energy output can be calculated with the below-mentioned Equation (1) [36][37][38]: In this study, PV panels of Q.Plus L-G4.1 model (polycrystalline) [39] with an area of 5.7 m 2 is considered. The Q. Plus L-G4.1 model has a voltage of 37.02 V, current of 8.9 A, and power of 330 W with an area of 1.9 m 2 .

Tariff Details
In the coming years, non-renewable reserves will get depleted. To reduce these risks, governments keep restrictions on electricity usage by introducing usage dependent tariffs and by also encouraging the installation of renewable sources. Under this scheme, consumers are encouraged to install renewable energy sources during peak hours and switch to grid supply during off-peak hours. This lessens the burden on non-renewable energy generating plants and simultaneously results in greenhouse emission reductions, which also has economic benefits [40]. Peak hour tariffs were implemented in various countries such as the UK, Persian Gulf, and California (US) [41]. The implementation resulted in a reduction of electricity usage up to 40% in the Persian Gulf and 20% in California [42].

Electricity Tariff System in Korea
The electricity tariff system in Korea was designed to provide a lower rate to those who consume less electricity and a higher rate for those who use more [43]. Table 1. shows the electricity chart of present electricity costs according to usage. In 2017, the eighth basic plan for developing new and renewable energy technologies implemented policies like the renewable portfolio standard (RPS) policy to support solar technology in South Korea and to increase the share of solar PV energy supply mix to 14% by 2035 [29,44].
In a typical residential house located in the city of Busan with 35 • 13 42.7 N and 129 • 05 06.9 E, the set-up was established on rooftops. The electricity load profile varies according to the work time pattern of the residents. In Korea, most of the residents start to work between 7:00 A.M. and 10:00 A.M. and return home between 5:00 P.M. and 6:00 P.M. A residence electric load profile for 24 h is shown in Figure 4 and it can be observed that the maximum load demand was during morning 7:00 A.M. to 10:00 A.M. and in the evening 6:00 P.M. to 9:00 P.M. Based on this, we define our peak and off-peak hours. The time span from 7:00 A.M. to 10:00 A.M. and 6:00 P.M. to 9:00 P.M. are the peak hours whilst, 11:00 A.M. to 5:00 P.M. and 9:00 P.M. to 7:00 A.M. are defined as off-peak hours. In the future, electricity demand would increase gradually with decreasing resources that could cause an energy crisis and governments to impose peak hour tariffs on residential houses. According to the Korean energy census report [45], the average electricity consumption of a residential house is approximately 13 kWh/day. In that case, if we compensate for load with solar energy during peak load hours, annual electricity bills will reduce gradually, which is more profitable. The PV system with battery storage would fulfill household load demand during peak load hours and charges the battery during off-peak load hours. In this study, the proposed algorithm, the idea of utilizing PV-generated energy with battery storage system during peak load hours and charging battery system during off-peak load hours is described in Figure 5.
Electronics 2020, 9, x FOR PEER REVIEW 5 of 16 In 2017, the eighth basic plan for developing new and renewable energy technologies implemented policies like the renewable portfolio standard (RPS) policy to support solar technology in South Korea and to increase the share of solar PV energy supply mix to 14% by 2035 [29,44].
In a typical residential house located in the city of Busan with 35°13′42.7′′ N and 129°05′06.9′′ E, the set-up was established on rooftops. The electricity load profile varies according to the work time pattern of the residents. In Korea, most of the residents start to work between 7:00 A.M. and 10:00 A.M. and return home between 5:00 P.M. and 6:00 P.M. A residence electric load profile for 24 hours is shown in Figure 4 and it can be observed that the maximum load demand was during morning 7:00 A.M. to 10:00 A.M. and in the evening 6:00 P.M. to 9:00 P.M. Based on this, we define our peak and off-peak hours. The time span from 7:00 A.M. to 10:00 A.M. and 6:00 P.M. to 9:00 P.M. are the peak hours whilst, 11:00 A.M. to 5:00 P.M. and 9:00 P.M. to 7:00 A.M. are defined as off-peak hours. In the future, electricity demand would increase gradually with decreasing resources that could cause an energy crisis and governments to impose peak hour tariffs on residential houses. According to the Korean energy census report [45], the average electricity consumption of a residential house is approximately 13 kWh/day. In that case, if we compensate for load with solar energy during peak load hours, annual electricity bills will reduce gradually, which is more profitable. The PV system with battery storage would fulfill household load demand during peak load hours and charges the battery during off-peak load hours. In this study, the proposed algorithm, the idea of utilizing PVgenerated energy with battery storage system during peak load hours and charging battery system during off-peak load hours is described in Figure 5.

Problem Formulation and Methodology
Researchers are more interested in evaluating different renewable sources efficiently due to increasing energy demand. The solar PV system is one of the cheapest ways to generate renewable energy to fulfill electricity demands. To minimize electricity bills based on flow steps in the algorithm, importing grid power during off-peak load hours and using the battery system during peak load hours, a mathematical equation was proposed to implement this as given by the Equation (2) optimization problem. The objective function minimizes the importing power from the grid and uses the battery system during peak load hours [46].
Model constrains: (t) = (t) + (t); 7 ≤ ≤ 10; 17 ≤ ≤ 21 where t represents the certain time of the day (1 ≤ t ≤ 24), PON(t) is the peak load hour time generated power, PON_FIT is the generation tariff, POFF is the off-peak load hour generated power, POFF_FIT is the off-peak hour power tariff, Pgrid (t) is the imported power from the grid, Pgrid_TIF is the imported power from grid tariff, Pload (t) is the total load utilizing power, and Pload_FIT is the load utilizing power tariff. In this study, the proposed algorithm, the principle of a control strategy for utilizing PVgenerated energy with battery storage system during peak load hours and charging battery system during off-peak load hours is described in Figure 5. If the load power demand is not met by the battery system, the grid power is activated immediately.
As shown in Figure 5, initially, the controller checks time t1 and t2. If t1 and t2 satisfy the time conditions 7 ≤ t1 ≤ 10 and 17 ≤ t2 ≤ 21 respectively then control flow moves to check the SoC of the battery during that time interval. The control then decides a further step based on the SoC of the battery. Here, if the battery SoC > 40%, then the controller disconnects the grid power and sends

Problem Formulation and Methodology
Researchers are more interested in evaluating different renewable sources efficiently due to increasing energy demand. The solar PV system is one of the cheapest ways to generate renewable energy to fulfill electricity demands. To minimize electricity bills based on flow steps in the algorithm, importing grid power during off-peak load hours and using the battery system during peak load hours, a mathematical equation was proposed to implement this as given by the Equation (2) optimization problem. The objective function minimizes the importing power from the grid and uses the battery system during peak load hours [46].
Model constrains: where t represents the certain time of the day (1 ≤ t ≤ 24), P ON (t) is the peak load hour time generated power, P ON_FIT is the generation tariff, P OFF is the off-peak load hour generated power, P OFF_FIT is the off-peak hour power tariff, P grid (t) is the imported power from the grid, P grid_TIF is the imported power from grid tariff, P load (t) is the total load utilizing power, and P load_FIT is the load utilizing power tariff. In this study, the proposed algorithm, the principle of a control strategy for utilizing PV-generated energy with battery storage system during peak load hours and charging battery system during off-peak load hours is described in Figure 5. If the load power demand is not met by the battery system, the grid power is activated immediately.
As shown in Figure 5, initially, the controller checks time t 1 and t 2 . If t 1 and t 2 satisfy the time conditions 7 ≤ t 1 ≤ 10 and 17 ≤ t 2 ≤ 21 respectively then control flow moves to check the SoC of the Electronics 2020, 9, 1189 7 of 16 battery during that time interval. The control then decides a further step based on the SoC of the battery. Here, if the battery SoC > 40%, then the controller disconnects the grid power and sends battery storage power to the load, and if battery SoC < 40%, then the grid supply connects to the load and the PV system charges the battery. If the time conditions 7 ≤ t 1 ≤ 10 and 17 ≤ t 2 ≤ 21 are not satisfied, then the load demand is supplied by the grid power and batteries will charge with the PV system.

•
Condition 1: Optimization model during peak load hours.
Objective function: The minimization of importing electricity from grid supply and using PV with battery storage system efficiently during peak load hours. Figure 6 depicts the working methodology of our proposed model during peak load hours. The orange line in the diagram represents the power supply line, which connects the load either to the battery storage or to the grid supply. If the load's demand can be satisfied by the battery storage, the grid remains deactivated from the power supply line. This implies that the energy from the battery is utilized by the load. In an event of heavy load that cannot be supplied by the battery, the grid supply gets activated and fulfills the load's demand. This functioning is performed by the control system, which periodically checks the SoC of the battery.
Electronics 2020, 9, x FOR PEER REVIEW 7 of 16 battery storage power to the load, and if battery SoC < 40%, then the grid supply connects to the load and the PV system charges the battery. If the time conditions 7 ≤ t1 ≤ 10 and 17 ≤ t2 ≤ 21 are not satisfied, then the load demand is supplied by the grid power and batteries will charge with the PV system.


Condition 1: Optimization model during peak load hours.
Objective function: The minimization of importing electricity from grid supply and using PV with battery storage system efficiently during peak load hours. Figure 6 depicts the working methodology of our proposed model during peak load hours. The orange line in the diagram represents the power supply line, which connects the load either to the battery storage or to the grid supply. If the load's demand can be satisfied by the battery storage, the grid remains deactivated from the power supply line. This implies that the energy from the battery is utilized by the load. In an event of heavy load that cannot be supplied by the battery, the grid supply gets activated and fulfills the load's demand. This functioning is performed by the control system, which periodically checks the SoC of the battery.


Condition 2: Optimization model during off-peak load hours.
Objective function: PV system charging battery storage system during off-peak load hours. During off-peak hours, the power supply connects to the grid to meet the load demand. This functioning is depicted in Figure 7. During this time, the PV system charges the batteries.  Figure 8 shows the schematic of our proposed system This system drives electricity from the utility grid coupled with PV modules with a battery storage system and a controlling device. The PV system converts solar energy into electrical energy through the photovoltaic effect. Polycrystalline PV systems were used in our experiments and the specifications of it are given in Table 2. A solar charge controller is employed between the PV module and battery energy storage system (ESS) to store the generated electrical energy into the storage system [47]. The stored DC current is then inverted to the AC current by a power electronic inverter [48].

•
Condition 2: Optimization model during off-peak load hours.
Objective function: PV system charging battery storage system during off-peak load hours. During off-peak hours, the power supply connects to the grid to meet the load demand. This functioning is depicted in Figure 7. During this time, the PV system charges the batteries.
Electronics 2020, 9, x FOR PEER REVIEW 7 of 16 battery storage power to the load, and if battery SoC < 40%, then the grid supply connects to the load and the PV system charges the battery. If the time conditions 7 ≤ t1 ≤ 10 and 17 ≤ t2 ≤ 21 are not satisfied, then the load demand is supplied by the grid power and batteries will charge with the PV system.


Condition 1: Optimization model during peak load hours.
Objective function: The minimization of importing electricity from grid supply and using PV with battery storage system efficiently during peak load hours. Figure 6 depicts the working methodology of our proposed model during peak load hours. The orange line in the diagram represents the power supply line, which connects the load either to the battery storage or to the grid supply. If the load's demand can be satisfied by the battery storage, the grid remains deactivated from the power supply line. This implies that the energy from the battery is utilized by the load. In an event of heavy load that cannot be supplied by the battery, the grid supply gets activated and fulfills the load's demand. This functioning is performed by the control system, which periodically checks the SoC of the battery.


Condition 2: Optimization model during off-peak load hours.
Objective function: PV system charging battery storage system during off-peak load hours. During off-peak hours, the power supply connects to the grid to meet the load demand. This functioning is depicted in Figure 7. During this time, the PV system charges the batteries.  Figure 8 shows the schematic of our proposed system This system drives electricity from the utility grid coupled with PV modules with a battery storage system and a controlling device. The PV system converts solar energy into electrical energy through the photovoltaic effect. Polycrystalline PV systems were used in our experiments and the specifications of it are given in Table 2. A solar charge controller is employed between the PV module and battery energy storage system (ESS) to store the generated electrical energy into the storage system [47]. The stored DC current is then inverted to the AC current by a power electronic inverter [48].  Figure 8 shows the schematic of our proposed system This system drives electricity from the utility grid coupled with PV modules with a battery storage system and a controlling device. The PV system converts solar energy into electrical energy through the photovoltaic effect. Polycrystalline PV systems were used in our experiments and the specifications of it are given in Table 2. A solar charge controller is employed between the PV module and battery energy storage system (ESS) to store the generated electrical energy into the storage system [47]. The stored DC current is then inverted to the AC current by a power electronic inverter [48]. Open circuit voltage (Voc) 46.55 V Figure 8. Schematic of the PV system with battery energy storage system and control device.

Experimental Setup
The solar PV system with a battery storage system and grid supply was integrated with a controlling device. During peak load hours, this control device shifts load to the battery storage by checking the SoC of the battery and time and hence performs the function of a switch. When the energy demand is high or the battery power is not met by the load, the controlling device connects the load to the grid power. Simultaneously, the storage batteries which are to be utilized during peak load hours are charged during off-peak hours. These events are triggered and executed based on a series of algorithms. Figure 9 shows the prototype control device of the system. The AVR ATMEGA32 microcontroller (ATMEL, Microchip Technology Inc. AZ, USA) is used in this system. It has 6 Pulse width modulation (PWM) pins and 14 I/O pins [49]. A power jack and programmable pins are arranged for the power supply (5V) and dumping program code according to the conditions mentioned in the methodology. The microcontroller reads the voltage value with a voltage divider circuit connected to it and reads the time from DS3231 (Maxim Integrated, CA, USA) real-time clock (RTC) and activates relay according to the conditions, controlling the overall system operation. The DS3231 RTC circuit pins the SDA (serial data), the SCL (serial clock) relates to the microcontroller pins PC4 and PC5 respectively for data transmission and the power supply pins connected to the internal power pin of the microcontroller [50].  Open circuit voltage (V oc ) 46.55 V The solar PV system with a battery storage system and grid supply was integrated with a controlling device. During peak load hours, this control device shifts load to the battery storage by checking the SoC of the battery and time and hence performs the function of a switch. When the energy demand is high or the battery power is not met by the load, the controlling device connects the load to the grid power. Simultaneously, the storage batteries which are to be utilized during peak load hours are charged during off-peak hours. These events are triggered and executed based on a series of algorithms. Figure 9 shows the prototype control device of the system. The AVR ATMEGA32 microcontroller (ATMEL, Microchip Technology Inc. AZ, USA) is used in this system. It has 6 Pulse width modulation (PWM) pins and 14 I/O pins [49]. A power jack and programmable pins are arranged for the power supply (5V) and dumping program code according to the conditions mentioned in the methodology. The microcontroller reads the voltage value with a voltage divider circuit connected to it and reads the time from DS3231 (Maxim Integrated, CA, USA) real-time clock (RTC) and activates relay according to the conditions, controlling the overall system operation. The DS3231 RTC circuit pins the SDA (serial data), the SCL (serial clock) relates to the microcontroller pins PC4 and PC5 respectively for data transmission and the power supply pins connected to the internal power pin of the microcontroller [50]. A 2-channel relay (Songle relay, Ningbo, China) is connected to the microcontroller PB0 pin for the purpose of triggering the control device as explained earlier. This relay is driven by the 5V power supply of the micro-controller. The controlling device was optimized with an IoT device ESP8266 (ESPRESSIF Systems, Shanghai, China) Wi-Fi module, which transmits data to the web server by using the TCP/IP protocol. The ESP8266 is connected with the Tx and Rx pins of the microcontroller [49].
The required power to operate this control device is supplied from an internal power source produced by a solar panel connected to the power jack. The circuit diagram for the control device is shown in Figure 10. The specifications of the various components used in this experiment are listed in the following Table 3.  A 2-channel relay (Songle relay, Ningbo, China) is connected to the microcontroller PB0 pin for the purpose of triggering the control device as explained earlier. This relay is driven by the 5V power supply of the micro-controller. The controlling device was optimized with an IoT device ESP8266 (ESPRESSIF Systems, Shanghai, China) Wi-Fi module, which transmits data to the web server by using the TCP/IP protocol. The ESP8266 is connected with the Tx and Rx pins of the microcontroller [49].
The required power to operate this control device is supplied from an internal power source produced by a solar panel connected to the power jack. The circuit diagram for the control device is shown in Figure 10. The specifications of the various components used in this experiment are listed in the following Table 3.
Electronics 2020, 9, x FOR PEER REVIEW 9 of 16 A 2-channel relay (Songle relay, Ningbo, China) is connected to the microcontroller PB0 pin for the purpose of triggering the control device as explained earlier. This relay is driven by the 5V power supply of the micro-controller. The controlling device was optimized with an IoT device ESP8266 (ESPRESSIF Systems, Shanghai, China) Wi-Fi module, which transmits data to the web server by using the TCP/IP protocol. The ESP8266 is connected with the Tx and Rx pins of the microcontroller [49].
The required power to operate this control device is supplied from an internal power source produced by a solar panel connected to the power jack. The circuit diagram for the control device is shown in Figure 10. The specifications of the various components used in this experiment are listed in the following Table 3.

Results and Discussion
A case study was conducted to verify the operation of the algorithm execution. The study is based on the average electricity consumption of a residential house on a sunny day during the peak load hours from 7:00 A.M.-10:00 A.M. in the morning and 5:00 P.M.-9:00 P.M. in the evening. Based on this assumption, we developed an algorithm to utilize the PV system with efficient battery storage during the above-mentioned peak load hours and charge batteries during off-peak load hours. Here, we have assumed that the installed PV system capacity is 1 kW, and the battery storage system 12 V/62 Ah is utilized to store energy and utilize during peak load hours.
The controlling device checks the status of the battery charge during the peak load hour and after the SOC > 40% condition was executed, and the load shifts to PV with battery system as shown in Figure 11. At 10:00 A.M., during the off-peak load hours, the load automatically shifts to the grid supply based on the control algorithm. From 10:00 A.M. to 5:00 P.M., the load continues to run with the grid supply whilst the battery is recharged by the PV system. The battery was charged to a maximum state of 96% during this time. At 5:00 P.M., the control device checks the SoC status of the battery and shifts the load to the battery system and changes to the grid supply at 9:00 P.M. After 9:00 P.M., the load runs with grid power. Hence, the operation of the control device is successfully tested during peak load hours and off-peak load hours. The tariff prices are tabulated in Table 4. the grid supply whilst the battery is recharged by the PV system. The battery was charged to a maximum state of 96% during this time. At 5:00 P.M., the control device checks the SoC status of the battery and shifts the load to the battery system and changes to the grid supply at 9:00 P.M. After 9:00 P.M., the load runs with grid power. Hence, the operation of the control device is successfully tested during peak load hours and off-peak load hours. The tariff prices are tabulated in Table 4. Figure 11. Status of (a) residential load, (b) battery state of charge (SoC), and (c) grid power during peak load hours and off-peak load hours.

Cost Analysis
The electricity usage tariffs during peak load hours and off-peak load hours are described in Table 1. Here we are discussing some possible cases with electricity tariffs.
Here, the tariffs were calculated without PV and battery storage systems. Approximately, 13 kWh/day electricity was imported from the utility grid during peak load and off-peak load hours as shown in Figure 4 with a flat tariff. The average monthly Korean electricity fares are tabulated in Table 4. Annually, 4680 kWh electricity is imported from the grid and a cost of $560 (USD) is payed to generation companies. In the future, these charges would gradually increase due to the limited availability of fossil fuels. To prevent this scenario, one needs to implement a renewable storage system.

•
Case 2: Using PV with battery system and control device.
The average daily imported load from the grid was reduced to 6 kWh. Approximately, 7 kWh of electricity was utilized from the PV and battery system during peak load hours and the batteries were charged in off-peak load hours. Figure 11 shows the SoC of the battery system wrt. time. The control unit analyzes the battery SoC and performs operations based on a series of algorithms. With this system, the electricity purchased from the grid decreased to 2160 kWh, and annual electricity bills reduced to $183 (USD). The whole electricity tariffs are tabulated in Table 4.
From Table 4, a comparison of electricity tariffs with and without the control unit is shown. It is seen that the monthly importing electricity from the grid decreased which results in decreased monthly electricity bills by 37,567 ₩ (USD $31), 67.1%, by using this control device with the proposed algorithm. Annually, it is 671,532 ₩ (USD $560) without a renewable energy storage system and 220,728 ₩ (USD $183) for renewable energy with the control device. The solar PV and battery system's average life span is 20 years. Hence, the system can be used for a minimum of 15 years with minimal maintenance charges. Figure 12 shows a comparison of electricity bills with and without the proposed system. In 15 years, almost 6,762,060 ₩ (USD $5632) can be saved by using the proposed system. This is a significant amount of money, which reduces 67.1% of the electricity bill being saved.
Electronics 2020, 9, x FOR PEER REVIEW 12 of 16 Figure 12. Comparison of a 15-year electricity bill with and without the proposed system.
If this system is implemented in small and medium scale industries, it would be economically good for the industries to bring down their electricity bills and also reduce carbon emissions, which decrease global warming. The excess electricity can be used for exporting based on available tariffs to make some money.

IoT Monitoring
IoT technologies offer promising solutions for monitoring concepts. Here, the SoC status of the battery system is monitored by using IoT technology. With this technology, we can observe a battery status from anywhere in the world. The SoC of a battery's details is logged in a web server for every minute is shown in Figure 13. In this work, we used an open-source web server for processing, logging, and visualizing SoC data and cloud stores, accessed from anywhere in the world without any restrictions. If this system is implemented in small and medium scale industries, it would be economically good for the industries to bring down their electricity bills and also reduce carbon emissions, which decrease global warming. The excess electricity can be used for exporting based on available tariffs to make some money.

IoT Monitoring
IoT technologies offer promising solutions for monitoring concepts. Here, the SoC status of the battery system is monitored by using IoT technology. With this technology, we can observe a battery status from anywhere in the world. The SoC of a battery's details is logged in a web server for every minute is shown in Figure 13. In this work, we used an open-source web server for processing, logging, and visualizing SoC data and cloud stores, accessed from anywhere in the world without any restrictions.
The IoT device ESP8266 Wi-Fi module Tx and Rx pins connected with ATMEGA32 microcontroller, which sends attention commands (AT) to the IoT device [51]. The battery SoC is connected to the microcontroller PC0 pin. The microcontroller is programmed to send data to the Wi-Fi module ESP8266. The Wi-Fi module transmits this data to the internet web server, shows data visualization, and stores all the data in the cloud server.
IoT technologies offer promising solutions for monitoring concepts. Here, the SoC status of the battery system is monitored by using IoT technology. With this technology, we can observe a battery status from anywhere in the world. The SoC of a battery's details is logged in a web server for every minute is shown in Figure 13. In this work, we used an open-source web server for processing, logging, and visualizing SoC data and cloud stores, accessed from anywhere in the world without any restrictions. Figure 13. Web server visualization of battery status. Figure 13. Web server visualization of battery status.

Conclusions
This paper proposed and implemented a strategy that helps in minimizing the electricity tariffs in common households. The presented model minimized the import of electricity from the grid and supplemented it with a PV-based battery storage system. The system regularly checks the status of a battery's charge and accordingly allows the load to be connected to the battery when the SoC > 40% during peak load hours and charges batteries during off-peak hours. All the control flow statements are programmed to the microcontroller in controlling devices. The SoC status can further be monitored by an IoT system that transmits data continuously, records the data, and stores data in a cloud-based webserver. The entire operation is controlled via the execution of algorithms. It was estimated in our study that using this model reduced electricity bills by 67.1%. As a topic of further study, our proposed method could be improvised by the incorporation of various irradiance and temperature optimization techniques that can enhance the efficiency of the system [52][53][54][55]. It is more useful to implement this system in large scale industries as it scales down electricity bills and reduces CO 2 gases to a large extent.

Conflicts of Interest:
The authors declare no conflict of interest.