Study on optimization of household energy use considering photovoltaic access

Home access to photovoltaic and configuration energy storage can reduce the cost of energy consumption and suppress grid fluctuations. At the same time, various loads in the family can be divided into base loads and flexible loads according to their functional characteristics, some of them also be gas and electricity dual-use loads. This paper aims to reduce the energy consumption cost of households. Firstly, it classifies the loads in photovoltaic-connected households, optimizes the energy source selection of gas and electricity dual-use loads, and optimizes the scheduling of flexible loads’ working hours. Setting reasonable constraints while ensuring the primary energy demand of family members for each load reduces households’ dependence on external energy and energy expenditure. Moreover, the pressure on the regional energy supply can be alleviated by stabilizing the working time of flexible loads.


Introduction
With the development of science, technology, and the economy, the cost of energy consumption by ordinary households is increasing yearly.The energy dependence is also increasing yearly, mainly on electricity and gas.In recent years, energy prices have risen [1].Electricity and gas crises have occurred in some regions [2], and local governments have issued energy-saving policies, such as limiting household indoor temperature [3], encouraging households to install photovoltaic [4], and allocating a certain amount of energy storage.These measures can reduce the cost of household energy consumption and alleviate the local functional tension.Furthermore, with the development of mobile networks and the popularity of the Internet of Things, the era of the Internet of Everything has come [5].Energy control units can be installed at houses and energy control modules can be installed in the household energy-consuming equipment to optimize the scheduling of the household energy-consuming equipment [6].Thus, how to optimize household load to reduce household energy costs has raised more and more experts' and scholars' attention.
A household load dispatching strategy based on real-time control of energy storage charging and discharging behavior was proposed in the literature [7].The model was simulated and solved using the improved binary particle swarm optimization algorithm.An electricity consumption satisfaction model including environmental comfort and electricity consumption mode comfort was established in the literature [8], which can reduce the electricity consumption cost on the premise of ensuring the user's electricity consumption satisfaction and achieving the goal of peak shaving.A household energy management system was established, combined with real-time electricity price information and considering the two optimization objectives of minimizing electricity costs and carbon emissions [9].The optimal control strategy of household energy was analyzed and studied in demand response under a smart grid, and the correctness and rationality of the multi-user household energy management system were verified [10].Literature [11] studied how to make full use of limited energy, and scientifically plan the power consumption time of each household load.Literature [12] studies how to make efficient and energy-saving electricity use plans and improve the response level of residents' demand based on how to use the new generation data mining technology to discover the laws of residents' electricity use behavior from smart meter data; Literature [13] proposed an optimal operation model for equipment control and energy storage coordination to deal with power consumption during a power outage, so as to reduce the cost of household electricity.In order to solve the scheduling optimization problem of household power load, literature [14] established an optimization model by comprehensively considering three aspects of power cost, satisfaction, and user side fluctuation, so as to ensure the stability of power consumption during peak periods and increase user satisfaction.However, the above studies focused on optimizing household electrical equipment and reducing electricity consumption costs.
This paper comprehensively considered three kinds of energy in an ordinary household: electricity, photovoltaic, and gas.By classifying the energy consumption loads, the corresponding optimization model is established with the lowest energy cost as the goal, by optimizing the selection of energy sources for basic loads and the scheduling of working hours and energy sources for flexible loads, to reduce the dependence on external energy, energy expenditure and the pressure of regional energy supply.

Analysis of household load, energy
The loads in the family can be divided into base loads and flexible loads according to their energy consumption characteristics and family members' dependence [15].The basic loads are used to meet the basic demand of family members, and their energy consumption power and working time are relatively fixed.In the process of optimal scheduling, the optimal scheduling of energy selection is only carried out for some dual-use equipment (as shown in Fig. 1), and the energy selection of base loads will have a specific impact on the optimal scheduling results.On the other hand, flexible loads are mainly to improve the quality of life.Its power and working hours are relatively flexible, but the total daily energy consumption is relatively fixed, which provides certain conditions for optimal scheduling.The energy sources in households are mainly electricity provided by the power grid, electricity produced by home photovoltaics, and gas provided by gas companies.By optimizing the scheduling, these energy sources can achieve an optimal matching state with the household loads and reduce household energy costs.

Baseload
The basic load provides the necessary guarantee for the daily life of family members, and the demand of family members for the energy conversion results of such loads is immediate, such as lighting equipment for providing light at night, cooking equipment for daily diet, etc.The working time and energy consumption of these pieces of equipment are relatively fixed, and the interruption of work will significantly impact the lives of family members.When the energy supply is tight, priority should be given to guarantee.Its model is: Where：  is the energy dissipation power of base load in period t, kW;  ,  is the energy dissipation power of base load i in period t, kW; F is the energy mark of the load (when F=e, the load is pure electricity; when F=g, the load is pure gas; when F=e/g, the load is dual-use), and  is the amount of base load in the household.

Flexible load
The flexible load is mainly used to improve the quality of life of family members.The demand of family members for the energy conversion results of such loads is delayed, such as water heaters, washing machines, refrigerators, and heaters.This equipment's working time and power are not fixed, so it can be optimized for scheduling and work when the electricity price is low or photovoltaic power generation is sufficient.At the same time, energy with a high cost-performance ratio is preferred for the gas electricity dual-use loads, which can meet the basic needs of family members and achieve the purpose of reducing energy consumption costs and consuming photovoltaic power generation.Its load model is: Where：   is the energy consumption power of the flexible load in period t, kW;  , ,  is the energy dissipation power of flexible load i in period t, kW; int is the load interrupt mark (when int=0, the equipment can't be interrupted when int=1 the equipment can be interrupted);  is the amount of flexibility load.
The heating equipment in the family needs to be pointed out.Its energy consumption is not only related to the energy consumption efficiency of the equipment itself and user habits but also depends to a greater extent on the indoor and outdoor temperature difference and the thermal insulation (heat transfer) performance of the building materials.Its load model is: Where ：  , , ,  is the energy consumption power of heating equipment in period t, kW;   is the indoor temperature in period t,℃;   is the outdoor temperature in period t,℃; S is the area of the maintenance structure of the house, m 2 ; K is the heat transfer coefficient, kW/℃•m 2 .

Total load in household
The total load in a household in a certain period can be obtained by superimposing the basic load and flexible load, and the model is: ) Where:   is the total power consumption of household loads in period t, kW.

Energy in the home
The primary sources of household energy are electricity power grid and gas provided by the gas company.
The electricity cost only considers the peak and valley prices, while the step price is not considered in the optimal daily scheduling.Photovoltaic and energy storage batteries can also provide electric energy for families.However, their use costs have been determined in planning and will not be considered in optimal operation scheduling.

Objective function
The optimal scheduling model of energy consumption in PV-connected households studied in this paper is considered when the PV and energy storage configuration scheme has been determined, so the cost in the operation process is mainly considered, and the investment cost of each piece of equipment is not considered.On the premise of ensuring that family members have basic energy demand for each piece of equipment, the objective function of optimal scheduling of household energy consumption including photovoltaic is: is the base load quantity of electric energy consumed in the period t;  is the number of flexible loads in this period.
The gas power balance constraint is: Where:  is the base load quantity of gas consumed in the period t;  is the flexible load quantity of gas consumed in this period.
(3) Power exchange constraint The power exchange constraint between the home and the grid is: Where:  , and  , are respectively the maximum/minimum value of the exchange power between the home and the power grid, kW.
The restriction of gas power exchange between the home and the main gas pipeline is: Where:  , , ,  is the maximum operating power in period t of flexible load i, kW;  , is the minimum energy consumed by flexible load i after the end of a scheduling cycle to meet the comfort requirements, kWh.

Parameter selection
A family in Europe is selected as an example.The household is equipped with a 10kW photovoltaic power generation and 30kWh energy storage battery, with a discharge power of 30kW, a charge power of 10kW, and a charge-discharge efficiency of 0.9.In addition, the family has a two-way billing Watthour meter with a capacity of 100kW.The temperature of the local typical winter meteorological day and the photovoltaic output curve are shown in Fig. 2. The local electricity price is shown in Fig. 3.The local gas price is 1.52 euros/m 3 .The family's house has a projected area of 8*10 m 2 , a two-story structure with a floor height of 3.5 m, and a maintenance area of 252 m 2 .The external wall is a brick concrete structure with wooden doors and windows, whose average heat transfer coefficient is 0.8W/℃•m 2 [16].The number and characteristics of the basic load and flexible load are shown in Tab. 1and Tab. 2. According to local laws, the indoor temperature shall not be higher than 19℃.To meet family members' needs, the minimum indoor temperature is set as 16℃.The comfort constraints of other loads are shown in Fig. 4.

Operation results
The above-linearized model can be optimized using the commercial solution software Gurobi.The prepared program runs based on the Yalmip+Gurobi9 algorithm package in the Matlab2018b environment of the Windows system.In order to verify the effectiveness of the optimization model proposed in this paper, the optimization model proposed in this paper is set as Scheme 1, and the energy consumption equipment in the family in Scheme 2 is set to be used according to the original habits of family members without optimization.However, for the gas-electricity dual-use equipment, the energy source with a high-cost performance ratio is still selected according to the price of gas and electricity.The operation comparison results of the two schemes are shown in Fig. 5-7 and Tab. 3.
It can be seen from Fig. 5 that the working time of the flexible load in Scheme I is concentrated in the low electricity price stage, especially for electric vehicles and other equipment.It can be seen from Fig. 6 that compared with Scheme 2, Scheme 1 purchase electricity from the grid at the low price stage, which is also the low-pressure stage of regional grid power supply.At the same time, selling electricity to the grid at the peak price stage can, to a certain extent, flatten the load curve of the regional grid.It can be seen from Fig. 7 that by optimizing the scheduling of gas and electricity dual-purpose flexible loads in households and shifting their energy consumption time to the time when the electricity price is low, the gas consumption of households can be reduced to a certain extent and the local gas supply pressure can be relieved.It can be seen from Tab. 3 that after the optimization of household energy consumption equipment, the energy consumption cost on that day decreased from 61.66 euros to 51.13 euros, a decrease of 17.01%, and the local consumption rate of photovoltaic power generation was increased

Conclusion
The installation of PV in the family and optimal scheduling of flexible load are effective ways to reduce the cost of household energy consumption, without lowering the life quality, and relieve the pressure on the regional energy supply.Through this study, the following conclusions are drawn: (1) By optimizing the flexible loads with high energy consumption in the home orderly energy use can significantly reduce the cost of household energy; (2) After flexible loads optimization dispatching can smooth the load curve of the local power grid and reduce the peak pressure of gas supply;(3) This paper studies the optimal scheduling based on the existing household energy load.However, the energysaving transformation of household energy load can further reduce household energy costs.The research in this paper is the comparison of optimal scheduling research on the premise that both gas power and photovoltaic power generation are determined.If some energy supply is abnormal, the optimization results will be different.This part will be further studied in the next step of the work.

Fig. 1
Fig. 1 Schematic diagram of energy and load distribution in household 2.1 BaseloadThe basic load provides the necessary guarantee for the daily life of family members, and the demand of family members for the energy conversion results of such loads is immediate, such as lighting equipment for providing light at night, cooking equipment for daily diet, etc.The working time and energy consumption of these pieces of equipment are relatively fixed, and the interruption of work will significantly impact the lives of family members.When the energy supply is tight, priority should be given to guarantee.Its model is:

Fig. 2
Fig. 2 Temperature and PV output curve of a typical meteorological day (a) Scheme I (b) Scheme II Fig. 5 Power Balance Diagram (a) Scheme I (b) Scheme II Fig. 6 Power exchange curve between the household and power grid (a) Scheme I (b) Scheme II Fig. 7 Flow curve of gas between household and gas pipeline network Tab. 3 Comparison of operation results of two schemes Conference on Energy Systems and Electrical Power Journal of Physics: Conference Series 2584 (2023) 012028 IOP Publishing doi:10.1088/1742-6596/2584/1/0120289 5)Where:  is the electricity purchase cost;  is the gas purchase cost.Equipment energy constraints For electrical and gas dual-use equipment, only one energy source can be selected in the same dispatching period, and its constraints can be expressed as: is the electricity quantity of storage battery in period t, kWh;   and   respectively are the charging/discharging power of the storage battery in period t, kW;  and  respectively are charge/discharge efficiency.(6)Comfortconstraints In order to meet the comfort needs of family members, the following constraints should be met when optimizing the scheduling of flexible loads in the family: Where:  , is the maximum flow rate of the gas metering device installed in the household, m 3 /h.
1 Information on base load