Esprit Rock

Optimization of Energy Management for Residential Houses with Photovoltaic Panels and Fuel Cells Raghava Nirati

Optimization of Energy Management for Residential Houses with Photovoltaic Panels and Fuel Cells
Raghava Nirati, Kuo-Wu Chien, Zolboo Damiran, Leehter Yao
Department of Electrical Engineering
National Taipei University of Technology
Taipei 10608, Taiwan
[email protected],[email protected], [email protected], [email protected]
Abstract—This paper presents an analytical framework to develop a hierarchical home energy management system (HEMS). The smart home consists of a utility grid with dynamic electricity price, a photovoltaic (PV) module, energy storage system (ESS), fuel cell (FC) and the household appliances with three different types of load characteristics (i.e., interruptible, uninterruptible and time-varying) is investigated. The nonlinear objective function is hard to solve; thus a piecewise linear function is applied to manage it. A home energy management system (HEMS) formulated using mixed integer linear programming (MILP) aims to minimize the electricity cost and the hydrogen cost for satisfying the scheduled load demands simultaneously under a single optimization framework.
Keywords—home energy management system (HEMS); renewable energy sources (RES); mixed integer linear programming (MILP); piecewise linear function.

The rapid growth in the global economy results in the development of the science and technological industry, it has a direct influence on the power system and the economy is inextricably linked with people’s livelihood. The advancement in technology has been used to improve the efficiency of the renewable energies (i.e. solar energy, wind power, hydropower, etc.). Demand-side Management (DSM), is a reliable and sustainable solution to address these challenges by allowing more active participation of users from demand side in modifying their energy consumption behaviors. For instance, the price-based programs allow users to shift their electricity usage from peak hours to off-peak hours 1.
DSM strategy for a smart home involves the utilization of renewable energy sources (RES) such as PV power or wind power to satisfy the household load demands. Most often, these local generations are not optimally utilized due to intermittent nature of RES 2-3. Similar objectives were achieved in 4-5, by a HEMS using MILP were used to optimize the power transactions between utility grid, PV module, electric vehicle and, energy storage system. There are a lot of enabling technologies that should be implemented to provide an opportunity for creating a smart DS structure. Communication technologies such as Wi-Fi, Power Line Communication, etc. have one of the leading positions in this regard considering their usage areas related to their communication capabilities 6-7. The lead-acid battery has low power density resulting in a slower response speed to fluctuations in demand. However, it is used in many power applications (e.g., electric vehicles and distributed generation) 8-9. The proton exchange membrane fuel cell (PEMFC) is the most practical for FC embedded applications and it’s solid, the flexible electrolyte will not leak or crack, and these cells operate at a low enough temperature to make them suitable for homes and cars. Similar simulation results were achieved in 10-11.

In this paper, optimization of energy management for residential houses with photovoltaic panels and fuel cells (HEMS) consisting of utility grid with day-ahead electricity tariff, PV module, ESS, FC and home appliances with three different types of load characteristics (i.e., interruptible, uninterruptible and variable loads) is proposed to minimize the electricity cost and the hydrogen cost for satisfying the scheduled load demands simultaneously. With this priority values, the optimization based energy management problem is formulated and solved efficiently using mixed integer linear programming (MILP).
Hybrid energy management optimization model in HEMS
The structure of the home energy management system in this article is shown in Figure 1. The use of controllable electrical equipment within the home is controlled, while the monitoring of the solar power system (solar photovoltaic system) with the use of battery packs to optimize the use of home controllable power equipment Schedules are made, and the equipment communication system setup will install DO controllers and smart meters on the controllable power equipment in each corner of the home to build a complete IoT communication network.
In the software system architecture, we use multiple embedded systems to perform real-time monitoring of the system’s hardware devices. It is also possible to transfer the unloading status, solar power generation capacity, and battery charge/discharge amount of each electrical equipment to the management system and store all relevant information in the database (MYSQL). Finally, webpage components provide users with instant data monitoring and optimization of energy devices.

The power architecture of home considered in this study
Home Appliance model
HEMS is defined with different load characteristics where Ac1 is defined as the set of the interruptible load with fixed power consumption. Ac2 is defined as the set of the uninterruptible load with fixed power consumption and Ac3 is defined as a set of variable load i.e., the uninterruptible loads with time-varying power consumption. The three different sets of home appliance Ac1, Ac2, and Ac3 are scheduled in real-time.
Letandbe the start and end time slot in an interval in which the a-th appliance is available for load scheduling, where,, .
A binary parametersis defined to show the schedulable status of each a-th appliances at the j-th time step for j = 0,…,N and. Particularly,
implying that is set to be 1 if the a-th appliance is available for load scheduling and for otherwise. Based on , the operational statusof each a-th appliance at every j-th time step is generally restricted as follow:
where means that the appliance is turned on and for vice versa, ,.
In order to satisfy the operating constraint, an auxiliary binary variableis defined for the a-th appliance with uninterruptible load such that means the appliance starts its operation at the j-th time step and, whereand.The probable start time of both the uninterruptible and interruptible loads need to set between and to ensure the appliance can finish its operation before. Therefore,
Assume that each a-th variable load operates for Ma time step continuously and the associated power consumption at each m-th time step is forand. Let the a-th variable load is turned on at the j-th time step, then the power consumptions along the continuous Ma time steps are:
Meanwhile, the power consumption of each a-th appliance with variable load can be related with as follow:
Fuel cell model
In this section, we will consider how the fuel cell efficiency is defined and the fuel cell energy calculation. The energy calculation also gives the relationship of the open circuit voltage (OCV) of the fuel cell. Finally, the mathematical model applied to this system is proposed.

Firstly, fuel cell test data obtained by the fuel cell manufacturers and this study are shown in Table 1.

fuel cell test data
Current (A) Voltage (V) Power (kW)
2.9 0.84125 0
5.3 0.815 0.35
10.2 0.79125 0.65
15.1 0.775 0.95
20.2 0.76 1.23
25.6 0.74125 1.521
30 0.72125 1.735
35.1 0.7125 2
40.5 0.70125 2.28
45.1 0.69125 2.486
50.3 0.68125 2.752
55.4 0.67125 2.985
59.5 0.66625 3.195
65.2 0.655 3.422
70 0.64625 3.624
75.2 0.63875 3.845
80 0.63 4.04
85.4 0.61875 4.236
90.1 0.61 4.436
95.2 0.60375 4.608
100.3 0.595 4.768
105 0.5925 4.988
110.1 0.5825 5.135
According to 12, if the fuel cell system voltage is substituted for the voltage ratio, it can represent the fuel cell system efficiency, as shown in equation (6)
But not all fuel (hydrogen) will be reacted, so consider the fuel use rate of the fuel cell
This corresponds to the ratio of the current obtained when the fuel cell current reacts with all the fuels and is usually set to 0.95 12. The fuel cell efficiency after finishing is as follows
After understanding the principles of fuel cell operation, we can clearly know the relationship between the generation of energy and the voltage and efficiency of the fuel cell, and we have also come to the conclusion that the voltage of the known fuel cell system is related to the output power, and the system voltage can also be converted. As a system efficiency, the output power is related to efficiency, that is, the efficiency is not constant under different power usage conditions. We refer to the test report provided by the fuel cell manufacturer. Substituting the voltage value into the equation (8), the curve of efficiency and power can be obtained.

Efficiency and FC output
It can be found that at different powers, the efficiency will be different. At the same time, it is also found that when the output power is higher, the efficiency will become worse and worse, which means that if a higher power is required, the hydrogen consumption factor will increase. In addition, it has also been found that this efficiency curve does not seem to be linear. If linear programming is to be used for optimization, additional processing must be performed. Therefore, this non-linear segment must be converted into a linear segment before it can be modeled.

Nonlinear problems cannot be solved directly using the general linear programming toolset. Effective techniques are needed to linearize nonlinear functions. However, it is quite simple to convert one concept from a non-linear function to a linear function. That is to piecewise the non-linear function into several sections and to use a piecewise linear approximation known point or sampling point of non-linear function, known as piecewise linearization methods. Piecewise linearization is often used in a variety of applications to approximate nonlinear programming by adding additional binary variables, continuous variables, to the objective function or constraint. After the piecewise linearization, the nonlinear system is approximately equivalent to a linear system in each piece. The linear system theory and method can be used for analysis.

For the purposes of this paper, let a complete non-linear function be a univariate function with a range, as shown in Figure 3. Suppose a set of points is given, and the minimum value of segment points and the maximum value of segment points , and , is a complete piecewise linear function plan splicing the values into a set .

Each of the adjacent subintervals is approximated by a linear function and so the piecewise linear approximation function can be defined as

PWL approximation of
The piecewise linearization method can succeed in the optimization method. It can be said that the mixed nonlinear integer programming problem is transformed into a mixed linear integer programming and can be applied to the optimization of most linear programming tools. Therefore, there is a key part of the following: The piecewise linear function represents a system of linear equations using discrete variables in the dimension.

Let the linear function be linearly approximated in the interval as, is the variable of the linear approximation function
then, ; for (11)
is the binary auxiliary variable, which is used to determine the line segment where two adjacent points are connected via PLF; is the continuous auxiliary variable, the weight of the point of the line segment, and the formula (11) is used to determine the distribution of weights, which is combined by weights. And can know the position of the point on the selected line segment.

PWL method process
Letbe the total power of the FC and be binary variables, such that , where:
means that and (12)
In equations (9), (10) and (11), the point ranges of PLF is defined.

are defined as segment variables
for (14)
The efficiency of the FC is related to . is efficiency of the FC power at the every j-th time step for j = 0,…,N is defined as in equations (17) and (18) 10.

Let be the control variable, and nonlinear. If equation (17) is used in equation (30), then it is nonlinear problem. Hence, to manage this a piecewise linear function (PLF) is applied to solve. and relationship, it is an approximation in which total output is higher than the .

System overall model
Letbe the solar power generated, be the charging and discharging power of ESS, be the electricity drawn from the utility grid and be the generated power of the fuel cell at the every j-th time step for j = 0,…,N. The power balance equation used to satisfy the total load scheduled demands of home appliances at each j-th time step is defined as:
As the cost of power from the grid is high it is necessary to limit the output power in equation (20) and equation (21) in order to avoid overload caused by the system it is defined as:
From equation (20) and equation (21), the grid electricity needs to be purchased by HEMS (i.e.,) to satisfy the scheduled load demand. Otherwise, .

In addition, the battery manufacturer recommends charging and discharging at 0.1C rated capacity (also called 10-hour rate) to protect the battery (22) and (23).

The ESS charge or discharge at a higher current or may be used excessively, which will greatly affect the battery life. Therefore, this section affects the ESS charge/discharge current size and depth of discharge. Consider the optimization problem, in equation (24) and equation (25).

The remaining capacity of the ESS must be greater than or equal to the threshold value after the full-day scheduling is completed as in equation (26). The remaining capacity of the battery is calculated as in equation (27).

The generation limits of the FC indicated by (28), where andare the minimum and maximum power generated by the FC, respectively:
Part load ratio (PLR) is the ratio of electrical generation to maximum FC power rating.
Let be the total consumption of the hydrogen, be the hydrogen consumption rate per kW generated by fuel cell. Hence, defined as:
The objective function in equation (30) is to be minimized at the current -th time step and is formulated as the electricity price, product of electricity drawn from grid and sampling interval are added Where the hydrogen price, is the total consumption of the FC and sampling interval .Therefore, the objective function for minimization is defined as:
simulation settings and results
Simulation Settings
The work proposed for minimizing the power cost and the hydrogen cost optimization capability will be evaluated to satisfy the predetermined load demand at the same time. The total available time period H for the energy management optimization in one day is 24 hours, and the load schedule of the home appliances is 15 minutes as the sampling interval Ts. Therefore, the number of time steps J = H / Ts = 96.

The HEMS considered in this study is equipped with a set of PV modules with the maximum instantaneous output power of 4kW, the utility grid with nominal voltage of 110V, and an ESS built by a set of lead acid batteries with the capacity of 318Ah. The current time electricity price scheme adopted in this study can be obtained from 12, and the characteristics of all three household electrical appliances considered in this study are summarized in Table 2. And using the GNU linear programming kit (GLPK) as a solver, using Intel® CoreTM i7-6700 CPU @ 3.40GHz for personal computing, the programming language is written as C++.

Appliances Output
(kW) Operation time
1(I) 0.8 9AM 10AM 4
2(I) 0.8 11AM 2PM 12
3(I) 0.8 6PM 8PM 8
4(I) 0.35 12AM 12PM 96
5(I) 0.1 2PM 5PM 2
6(I) 0.25 11AM 2PM 12
7(I) 0.25 6PM 8PM 2
8(I) 0.55 9AM 10AM 1
9(I) 0.7 10AM 1PM 2
0(I) 0.6 4PM 6PM 2
11(I) 1 9AM 3PM 24
12(I) 1 5PM 23PM 24
13(U) 0.75 10AM 12AM 3
14(U) 0.75 3PM 6PM 3
6(V) 0.5-0.6-0.25 9AM 2PM 1-2-1
Simulation Results
Two test cases of cloudy and sunny day are considered in this Performance evaluations. The historical data of the actual power generation of the solar panels installed in the 8th floor of the Central Doo Building of the National Taipei University of Technology was simulated on a sunny day at 20180405 and a cloudy day at 20160408, respectively. Observed and analyzed the following simulation results, from 12 to 11:59. The simulation results including the electricity tariff, net load demand, electricity purchased from utility grid, PV power generated, charging or discharging power of ESS, and power generated from fuel cell, for these two cases are presented in Figs. 5(a) and 5(b), respectively.

After the simulation of the optimization method, we can find that in the cloudy sky situation, solar energy generation is very low. When electricity is spiked at noon and the electricity price is high, in addition to the power of the ESS, the fuel cell is less expensive than the fuel cell. Power is supplied, and at the same time when the rest of the electricity price is relatively low, the city power is introduced to charge the battery. In the charging/discharging process, we also limit the charging and discharging power of the battery, and limit the SOC of the battery to be not lower than or higher than a certain value. When we see the sunny situation, we can see that the solar energy during the daytime is obvious. There is a lot more than a cloudy day, so even at peak hours at noon, there is less need to introduce electricity or even fuel cell power, and the introduction of evening-type electricity in conjunction with ESS is also much less.

According to the above simulation, it can be found that the fuel cell is more useful in cloudy days than in sunny days. In order to compare its economic benefits, we have added several simulations for quantitative analysis evaluating the cost minimization capability of the proposed work is conducted further. Defineas the net load demand bill to the system,as total cost using electricity from the as well as the hydrogen for the fuel cell. Then,

The simulation results for the (a) cloudy and (b) sunny days.


Saving (%)
Saving (%)
Saving (%)
(Cloudy) 104.97 81.76
22.1% 98.61
6% 82.87
(Sunny) 45.63
56.5% 98.61
6% 45.65
We can find that the key to determining the minimum electricity price is still solar energy, but if the fuel cell is at a lower price, it can still be used as an alternative energy plan for utility power to minimize the electricity bill.

In order to achieve, the output a piecewise linear function, was applied to solve the non-linear optimization problem. The proposed MILP is suitable for real-time optimization of energy management for residential houses with photovoltaic panels and fuel cells. The simulation results show that optimization of energy management for residential houses with photovoltaic panels and fuel cells is able to minimize the electricity costs and the hydrogen costs through optimal energy dispatching and load scheduling in smart home, respectively.

P.Cappers;C.Goldman;D.Kathan,”Demand response in U.S. electricity markets”,” Empirical evidence Energy, vol. 35, no. 4, pp. 1526-1535, Apr. 2010.
B.V.Hai;N.O.Song;J.H.Lee;H.M.Kim;”Mathematical modeling of real-time scheduling for microgrid considering uncertainties of renewable energy sources”,” International Journal of Smart Home., vol. 9, no. 7, pp. 271-284, 2015.

C.O.Adika;L.Wang;”Autonomous Appliance Scheduling for Household Energy Management,,” ” IEEE Transactions on Smart Grid,, vol. 5, pp. 673-682, 2014.

K.C.Sou;J.Weimer;H.Sandberg;K.H.Johansson, “Scheduling smart home appliances using mixed integer linear programming,”,” 50th IEEE Conf. Decision and Control and Eur. Control Conf., p. 5144–5149, 2011.

O.Erdinc,”Economic impacts of small-scale own generating and storage units, and electric vehicles under different demand response strategies for smart households,,” Appl. Energy, vol. 126, pp. 142-150, 2014.

M.Kuzlu;M.Pipattanasomporn;S.Rahman;”Hardware Demonstration of a Home Energy Management System for Demand Response applications,” IEEE Transactions on Smart Grid,, vol. 3, pp. 1704-1711, 2012.

Y.S.Son;T.Pulkkien;K.D.Moon;C.Kim , “”Home energy management system based on power line communication,,” IEEE Transactions on Consumer Electronics, vol. 56, pp. 1380-1386, 2010.

E.M. Kriege;,J.Cannarella;C.B.Arnold “A comparison of lead-acid and lithium-based battery behavior and capacity fade in off-grid renewable charging applications,,” Energy, vol. 60, pp. 492-500, 2013.

H.Chen;T.N.Cong;W.Yang;C.Jan;Y.Li,Y.Ding “Progress in electrical energy storage system:,” A critical review,” Progress in Natural Science,, vol. 19, pp. 291-312, 2009.

M.Rouholamini;M.Mohammadian “Energy management of a grid-tied residential-scale hybrid renewable generation system incorporating fuel cell and electrolyzer,”,” Energy and Buildings,, pp. 406-416, 2015.

M.J.Sanjari;H.Karami;H.B.Gooi”Analytical Rule-Based Approach to Online Optimal Control of Smart Residential Energy System,,” IEEE Transactions on Industrial Informatics, vol. 13, pp. 1586-1597, 2017.

J.Larminie and A.Dicks, Fuel Cell Systems Explained, 2nd ed. Chichester: Wiley, 2003.
TaiPower Company fixed time rate. Available: