Energy scheduling method of household energy management system based on mixed integer programming
By using a home energy management system based on mixed integer programming, and combining the charging and discharging strategies of energy storage batteries and electric vehicles, home energy dispatch is optimized, solving the problem of low energy dispatch efficiency in existing systems and achieving efficient and flexible energy management and improved grid stability.
Patent Information
- Application Number
- CN202511169130.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-12-02
AI Technical Summary
Existing home energy management systems suffer from limitations in energy dispatching due to static or linear programming models that struggle to handle discrete decision-making problems. Furthermore, the matching between electric vehicle charging behavior and household electricity demand is inadequate, resulting in low system efficiency, high computational complexity, and difficulty in real-time operation.
A home energy management system is established using a mixed integer programming approach. By combining the charging and discharging strategies of energy storage batteries and electric vehicles, the system optimizes home energy scheduling through a mixed integer programming model, taking into account power balance, battery capacity, and charging and discharging rate. This optimizes the charging and discharging behavior of energy storage batteries and electric vehicles, thus establishing an intelligent home energy management system.
It achieves efficient energy dispatching of the home energy management system, reduces electricity costs, enhances grid stability, improves system flexibility and adaptability, extends battery life, optimizes electricity trading, and demonstrates the intelligence and efficiency of the home energy management system.
Smart Images

Figure CN121055296A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy dispatching technology, and specifically to an energy dispatching method for a home energy management system based on mixed integer programming. Background Technology
[0002] With the acceleration of globalization and the rapid development of technology, global energy consumption has shown a continuous upward trend. According to a report by the International Energy Agency (IEA), global energy demand has grown at a rate of approximately 2% per year over the past few decades, and this trend is expected to continue in the coming decades. This growth has not only put enormous pressure on energy supply but has also had a serious impact on the environment, especially as the massive consumption of fossil fuels has exacerbated the problem of global climate change.
[0003] Home Energy Management Systems (HEMS) integrate smart devices and information technology to achieve intelligent management and optimization of home energy. HEMS can automatically adjust the operating status of home appliances based on electricity price signals and household electricity consumption habits by monitoring home energy consumption in real time, thus achieving rational energy allocation and use. However, existing HEMS systems still have many shortcomings in energy dispatching. For example, many existing systems use static or linear programming models, which are difficult to handle discrete decision-making problems in home energy management, resulting in limited optimization effects of dispatching strategies. Many existing systems do not fully consider the dynamic charging needs of electric vehicles and their synergistic optimization with the home energy system, causing electric vehicle charging behavior to fail to effectively match electricity price fluctuations and household electricity demand, reducing the overall efficiency of the system. Furthermore, some existing models are computationally too complex to run in real time within HEMS systems, limiting their practical application value.
[0004] To address the aforementioned issues, there is an urgent need for a more efficient and flexible method for home energy dispatching to improve energy utilization efficiency, reduce electricity costs, and enhance grid stability. Summary of the Invention
[0005] This invention proposes an energy dispatching method for a home energy management system based on mixed-integer programming. This method adjusts energy dispatching strategies to enable users to purchase more energy during off-peak hours, thereby reducing energy purchases during peak hours and achieving cost savings and supply-demand balance. By establishing a mixed-integer programming model and comprehensively considering constraints such as power balance, battery capacity, and charge / discharge rate, the method optimizes the charging and discharging actions of energy storage batteries and electric vehicles, achieving efficient energy dispatching for the home energy management system.
[0006] The technical solution adopted in this invention is as follows:
[0007] An energy dispatching method for a home energy management system based on mixed-integer programming includes the following steps:
[0008] Step 1: Establish a home energy management system;
[0009] Step 2: Establish an energy dispatch model that considers the integration of electric vehicles;
[0010] Step 3: Establish a mixed-integer programming model;
[0011] Step 4: Optimize home energy dispatching strategies under the GAMS environment.
[0012] Step 1 includes the following steps:
[0013] 1.1: Construct a home energy management network platform, including: a home energy control center, distributed energy supply, smart switches, home appliances, smart meters, energy storage devices, and network communication, such as... Figure 1 As shown, this platform utilizes smart meters to exchange and transmit electricity price information and demand response commands, and sends household electricity consumption information back to the power grid. The system can directly use photovoltaic power generation to supply home appliances, store excess electricity for later use, and even sell electricity back to the grid when necessary.
[0014] 1.2: Establishing an energy storage model:
[0015] The task of energy storage devices is to accumulate solar power and electricity purchased when electricity prices are low, and to provide power during peak electricity price periods. Electric vehicles, as part of the system, store energy during off-peak hours. The system, through a home energy manager, adjusts the charging and discharging behavior of batteries and electric vehicles according to energy storage strategies to maintain power balance with the grid. The energy storage model represents the dynamic energy state of the storage battery at a certain time step, as follows:
[0016]
[0017] Where B(t) represents the energy state of the energy storage battery at time t; P char P represents the charging rate, η represents the charging efficiency; dis Δt represents the discharge efficiency; Δt represents the time step; B(t-1) represents the remaining energy of the battery at the previous time step (t-1).
[0018] The capacity of energy storage batteries is constrained by physical conditions. Controlling the available battery power within a certain range helps extend the battery's lifespan.
[0019] B min <B(t)<B max (2);
[0020] Among them, B min B represents the minimum battery capacity. max This indicates the maximum battery capacity.
[0021] Step 2 includes the following steps:
[0022] Step 2.1: First, the electric vehicle (EV) is treated as a controllable electrical load, capable of storing electricity while parked at home, thus optimizing energy consumption and costs. It is assumed that the power consumption of the EV at one time step is positively correlated with the remaining power at the previous time step. Equation (3) represents the energy state of the EV at a given time step.
[0023]
[0024] Where EV(t) represents the energy of EV at time t; EV(t-1) represents the remaining energy of the battery at the previous time (t-1); P EV (t-1) represents the charging power at the previous time (t-1); t start Indicates the start time of permitted charging; t end θ represents the end time at which charging is permitted; θ represents the correlation coefficient.
[0025] To ensure smooth travel for electric vehicle users, the energy of electric vehicles (EVs) must be kept within a certain range. The energy constraint is shown in equation (4):
[0026] EV min <EV(t)<EV max (4);
[0027] In equation (4): EV max This indicates the upper limit of EV battery capacity. min This indicates the minimum battery level required for an electric vehicle to operate normally.
[0028] Assuming the electric vehicle is charged at a fixed charging rate, the charging power of the electric vehicle at time t is as shown in equation (5):
[0029] P EV (t)=δ(t·P EVchar (5);
[0030] In equation (5): P EV δ(t) represents the photovoltaic power generation at time t; δ(t) represents the charging status of the electric vehicle at time t, where δ(t) = 1 represents charging and δ(t) = 0 represents not charging; P EVchar This represents the charging rate of an electric vehicle.
[0031] The system allows for flexible charging based on power demand and electricity price fluctuations. Once the preset power level is reached, charging automatically stops, improving charging flexibility and efficiency.
[0032] Step 2.2: Divide electric vehicles into two modes: home charging and outdoor power consumption, as shown in Equations (6) and (7). This allows for precise management of household energy consumption, especially under demand response and electricity price fluctuations. The charging process is divided into time periods, each charged at a fixed rate. This helps extend battery life and ensures the safety and efficiency of the charging process.
[0033] P charge (t)=η·P EV_charge (6);
[0034]
[0035] Equation (6) represents the situation where an electric vehicle is at home, where P charge (t) is the charging power at time t, η is the charging efficiency, and P EV_charge It refers to the charging power of electric vehicles.
[0036] Equation (7) represents the situation where the electric vehicle leaves home. Where P discharge P(t) is the power consumed at time t. load (t) is the load power of the electric vehicle, and λ is the discharge efficiency.
[0037] Electricity consumption is directly related to daily driving mileage and is also affected by driver behavior. An energy consumption prediction system is established based on driving behavior modeling, and daily electricity consumption is calculated by Equation (8), where the acceleration integral term quantifies the impact of driving aggression.
[0038]
[0039] Among them, E daily D represents the total daily power consumption; D represents the daily mileage; a(t) represents the instantaneous acceleration (unit: m / s²). 2 ); α represents the average speed (unit: km / h); α represents the energy consumption coefficient per unit distance (unit: kWh / km); β represents the penalty coefficient for aggressive driving; γ represents the speed influence coefficient.
[0040] By intelligently scheduling and optimizing the charging behavior of electric vehicles, the energy efficiency of households can be improved. The objective function of the intelligent charging optimization model is as follows:
[0041]
[0042] Among them, C grid (t) represents the electricity price during time period t (unit: yuan / kWh); λ represents the grid load smoothing coefficient; P represents the average charging power. EV (t) represents the charging power at time t.
[0043] The constraints are as follows:
[0044] (1) Power demand constraint:
[0045]
[0046] Among them, T charge represents the set of time periods allowed for charging; P EV (t) represents the charging power of the electric vehicle at time t; ∆t represents the time step; E required represents the daily necessary charging amount of the user.
[0047] (2) Charging power limit:
[0048] 0 ≤ P EV (t) ≤ P max (11);
[0049] Among them, P EV (t) represents the charging power of the electric vehicle at time t; P max represents the maximum charging power allowed by the battery.
[0050] (3) Grid interaction constraint:
[0051] <00,00163>
[0052] Among them,N represents the total number of electric vehicles participating in scheduling in the region; P EV,i (t) represents the charging power of the i-th electric vehicle at time t; ∆P grid,max represents the maximum power fluctuation that the grid can withstand in the t period. Reduce the electricity cost, enhance the stability of the grid, and promote the utilization of renewable energy. <00001,67>Step 3 includes the following steps:<OOO0168>
[0054] 3.1: Establish a mixed integer programming model, including:
[0055]
[0056] In Equation (13), MinZ = z(t,x,u) represents the objective function, setting the minimum value of z as the goal; z(t,x,u) represents the specific form of the objective function, which depends on time t, state variable x, and control variable u; t represents time, x represents the state variable; u represents the control variable, and the boundary of u defines the range of the control variable; s.t.g(v,u) = 0 represents the equality constraint of the model; v represents the variable related to the control variable u; u-min < u < u-max represents the inequality constraint;
[0057] The control variables in set x include "Load" and "Price", which refer to the user's electricity consumption and the real-time electricity price, respectively. The control variables in set u include "gb" and "gs", where "gb" refers to the electrical energy purchased from the power system and "gs" refers to the electrical energy sold to the power system.
[0058] 3.2: The mixed-integer programming model satisfies the following equality constraints:
[0059] Since electric vehicles cannot be charged while away from home, it is necessary to establish load power balance equations for both home and away states, as follows:
[0060] Battery(t)+PV(t)+EV(t)+Load(t)=grid(t) (14);
[0061] Battery(t)+PV(t)+Load(t)=grid(t) (15);
[0062] Equation (14) corresponds to the situation when the electric vehicle is at home, and Equation (15) corresponds to the situation when the electric vehicle is out.
[0063] Where Battery(t) represents the amount of charge and discharge of the battery at time t, EV(t) represents the amount of charge of the EV at time t, Load(t) represents the amount of user load consumed at time t, grid(t) represents the amount of electricity traded with the grid at time t, and PV(t) represents the amount of photovoltaic power generated at time t.
[0064] 3.3: Minimize the electricity cost of the home energy management system after trading with the grid within a 48-hour control cycle. Under the premise of ensuring power balance and satisfying inequality constraints, the total electricity cost after the control cycle is completed is calculated using equation (16);
[0065] z=sum(t,(buy(t)-sell(t))*Price(t)) (16);
[0066] In equation (16), z represents the total electricity cost, which is the electricity cost of the home energy management system after trading with the grid within a 48-hour control cycle; sum(·) represents summing over time t; buy(t) represents the amount of electricity purchased from the grid at time t; sell(t) represents the price at which the electricity is sold to the grid at time t; and Price(t) refers to the real-time electricity price per hour.
[0067] Step 4 includes the following steps:
[0068] Based on photovoltaic data from a typical winter day, the data integrates parameters such as household electricity consumption over a continuous 48-hour period, real-time electricity price, photovoltaic power generation, and initial battery charge. Specific data are shown in Table 1.
[0069] Table 1. Photovoltaic power generation, household load, and real-time electricity price data for a typical winter day (48 hours).
[0070]
[0071] Based on comprehensive consideration of power balance, battery charge / discharge state changes, and physical constraints, and referring to the specific constraints in the above formulas (2), (3), (4), and (5), the demand response problem in home energy management is constructed as a mixed integer programming (MIP) model, and the CPLEX solver is used to determine the optimal strategy. Using the MIP model established by formula (13), key data such as household electricity consumption, instantaneous electricity price, solar power generation, and initial battery charge over a continuous 48-hour period are input.
[0072] A 48-hour control cycle was established, and the CPLEX mixed-integer programming solver was used to determine the optimal home energy dispatch strategy. This strategy aims to minimize total electricity costs while satisfying all the aforementioned constraints. Specifically, the optimal home energy dispatch strategy includes the following aspects: purchasing electricity from the grid during periods of low electricity prices to reduce overall electricity costs; reducing electricity purchases from the grid during periods of high electricity prices to avoid unnecessary expenses; prioritizing the use of solar power during periods of high solar power generation to reduce dependence on grid power; and charging batteries during periods of low electricity prices and discharging them during periods of high electricity prices to balance electricity demand and supply and improve energy efficiency.
[0073] This invention provides an energy scheduling method for a home energy management system based on mixed integer programming, with the following technical advantages:
[0074] 1) Advantages of Step 1 of this invention: Establishing a home energy management system (DA) can effectively extract optimization strategies from complex home energy usage data, thereby achieving intelligent energy management. This system compresses real-time data on home energy consumption and supply into schedulable strategies, learns an efficient representation of energy usage patterns, and minimizes electricity costs through optimization algorithms. It optimizes system parameters using a cost minimization function to achieve the best energy scheduling effect.
[0075] 2) Advantages of step 2 of the present invention: By establishing an energy dispatch model that considers the integration of electric vehicles (EVs), and by integrating electric vehicles as controllable loads, the energy use of households is optimized, electricity costs are reduced, the grid demand response capability is enhanced, the system flexibility and adaptability are improved, electricity trading is optimized, battery life is extended, environmental impact is reduced, grid stability is improved, and economic benefits are brought to household users, demonstrating the effective integration of advanced technology and modern household energy management.
[0076] 3) Advantages of step 3 of the present invention: The establishment of a mixed integer programming model provides a powerful optimization framework. It can not only make accurate decisions and comprehensively schedule various household energy resources, but also effectively respond to changes in grid demand, reduce electricity costs, enhance system stability, and has high flexibility and operability in practical applications, thereby maximizing economic benefits and minimizing environmental impact.
[0077] 4) Advantages of step 4 of the present invention: The optimization of home energy scheduling strategy under the GAMS environment can effectively provide edge information from different angles, improve the robustness of detection and reduce possible misjudgments by a single algorithm. Attached Figure Description
[0078] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0079] Figure 1 The architecture of a home energy management system.
[0080] Figure 2 A schematic diagram showing the user's electricity load, real-time electricity price, and battery charging and discharging operations.
[0081] Figure 3 A diagram illustrating user load, real-time electricity price, and electric vehicle charging operations.
[0082] Figure 4 This is a comparison chart of electricity costs under demand response and non-demand response conditions. Detailed Implementation
[0083] An energy dispatching method for a home energy management system based on mixed-integer programming includes the following steps:
[0084] Step 1: Establish a home energy management system;
[0085] Step 2: Establish an energy dispatch model that considers the integration of electric vehicles (EVs);
[0086] Step 3: Establish a mixed-integer programming model;
[0087] Step 4: Optimize home energy dispatching strategies under the GAMS environment.
[0088] This scheduling method enables home energy management systems to intelligently manage the charging and discharging of energy storage batteries and electric vehicles. Specifically, it charges when electricity prices are low and outputs power during peak hours, ensuring that the power supply for home users is adequately met. Simulation results show that when implementing demand response strategies, this energy scheduling method effectively reduces home users' electricity bills and improves energy efficiency, validating its practical application value and effectiveness in the field of home energy management.
[0089] Step 1 involves establishing a home energy management system, including the following steps:
[0090] Energy storage systems play a crucial role in mitigating fluctuations in renewable energy generation, helping to reduce instability factors and ensure stable grid operation. The charging and discharging process of a battery involves three states: charging, discharging, and standby. This is a discrete process, and its capacity and speed are limited by physical characteristics. Therefore, when formulating energy storage strategies, it is necessary to consider the physical properties of the battery to ensure both safe and efficient operation. This model presents the energy state changes of an energy storage battery over a specific period.
[0091]
[0092] Where B(t) represents the energy state of the energy storage battery at time t; P char P represents the charging rate, η represents the charging efficiency; dis ζ represents the discharge rate; ζ represents the discharge efficiency; Δt represents the time step.
[0093] The capacity of energy storage batteries is often limited by their physical characteristics. Keeping the battery charge within a reasonable range is beneficial to extending the battery's lifespan.
[0094] B min <B(t)<B max
[0095] Among them, B min B represents the minimum battery capacity. max This indicates the maximum battery capacity.
[0096] Step two involves establishing an energy dispatch model that considers the integration of electric vehicles (EVs), including the following steps:
[0097] In this invention, an electric vehicle is defined as a dispatchable electrical load capable of storing energy while parked at home. Charging automatically terminates when the battery reaches a predetermined charge level, unconstrained by a specific time frame, thus reducing electricity costs by choosing to charge during periods of lower electricity prices. The electric vehicle exhibits two different energy consumption patterns depending on whether it is at home or away: charging and electricity consumption. Charging is a phased, discrete event, with each phase proceeding at a constant rate. The energy consumption of an electric vehicle is typically proportional to its daily mileage, which is closely related to the driver's driving behavior. This invention assumes that at a specific point in time, the energy consumption of an electric vehicle is proportional to its remaining charge at the previous moment, and uses this assumption to build a model to simulate the real-world energy consumption of an electric vehicle.
[0098]
[0099] Where represents the charging power of the electric vehicle at time t; represents the start time of permitted charging; represents the end time of permitted charging; and represents the correlation coefficient.
[0100] To ensure that electric vehicle (EV) users can drive smoothly, the battery level of the EV needs to be maintained at a specific level.
[0101] EV min <EV(t)<EV max
[0102] Where EV(t) represents the energy state of the electric vehicle at time point t; EV max Indicates the maximum battery capacity of an electric vehicle; EV min This indicates the minimum amount of electricity required to ensure that an electric vehicle can operate normally.
[0103] Assuming the electric vehicle is charged at a constant charging rate, the charging power at time t can be expressed by the following formula:
[0104] P EV (t)=δ(t)*P EVchar
[0105] Where δ(t) represents the charging state of the electric vehicle at time t, δ(t) = 1 represents charging, and δ(t) = 0 represents not charging; P EVchar This represents the charging rate of the EV.
[0106] Step 3 involves establishing a mixed-integer programming model, including the following steps:
[0107] Mixed integer programming (MIP) is a mathematical optimization technique that plays an important role in solving specific types of decision-making problems. In the practical application of linear programming, if there are decision variables that need to take integer values, such problems are defined as integer programming. When all variables must be integers, it is called pure integer programming; while only some variables need to be integers, such problems are called mixed integer programming.
[0108] Step S3.1: Construct the mathematical expressions used in the present invention as follows:
[0109] MinZ = z(t, x, u)
[0110] s.t. g(v, u) = 0
[0111] u - min < u < u - max
[0112] Among them, the formula MinZ = z(t, x, u) represents the objective function of the present invention, setting the minimum value of z as the goal; the formula s.t. g(v, u) = 0 represents the equality constraint of the model; the formula u - min < u < u - max represents the inequality constraint. Among them, x represents the state variable, u represents the control variable, and the boundaries of u define the range of the control variable.
[0113] The control variables in the set x cover "Load" and "Price", which respectively refer to the power consumption of the user and the spot price. The control variables in the set u include "gb" and "gs", where "gb" refers to the electric energy purchased from the power system, and "gs" refers to the electric energy sold to the power system.
[0114] Step S3.2: The equality constraint that the mixed integer programming model needs to satisfy: the load power balance equation. Since the electric vehicle cannot be charged during the period away from home, it is necessary to establish the load power balance equation for the electric vehicle in two states: at home and away from home, respectively.
[0115] Battery(t) + PV(t) + EV(t) + Load(t) = grid(t)
[0116] Battery(t) + PV(t) + Load(t) = grid(t)
[0117] Formula (8) corresponds to the situation when the electric vehicle is at home, and formula (9) corresponds to the situation when the electric vehicle is away. Among them, Battery(t) represents the charge and discharge amount of the battery at time t, EV(t) represents the charging amount of the EV at time t, Load(t) represents the user load consumption at time t, grid(t) represents the electricity transaction amount with the power grid at time t, and PV(t) represents the photovoltaic power generation at time t.
[0118] Step S3.3: The present invention aims to minimize the electricity cost of a home energy management system after trading with the grid within a 48-hour control cycle. Under the premise of ensuring power balance and satisfying inequality constraints, the total electricity cost after the control cycle is completed can be calculated using formula (10);
[0119] z=sum(t,(buy(t)-sell(t))*Price(t))
[0120] Here, buy(t) represents the amount of electricity purchased from the grid at time t, sell(t) represents the price at which electricity is sold to the grid at time t, and Price(t) refers to the real-time hourly electricity price. Following grid metering regulations, the prices for electricity purchase and sale remain consistent in this scenario. The optimization algorithm achieves the lowest electricity cost by adjusting battery charging / discharging behavior and electric vehicle charging behavior. During the control period, the electricity cost may be negative because the purchased electricity volume may be lower than the sold electricity volume.
[0121] Step 4, the optimization of home energy dispatching strategy under the GAMS environment, includes the following steps:
[0122] Based on solar power generation data from a standard day in winter, the GAMS platform integrates predetermined parameters such as household electricity consumption, real-time electricity price, solar power generation, and initial battery charge over a continuous 48-hour period. Taking into account power balance, changes in battery charge / discharge state, and physical constraints, this invention develops an energy dispatch framework for household energy management. This invention constructs the demand response problem in household energy management as a mixed-integer programming (MIP) model and uses a CPLEX solver to determine the optimal strategy. The model sets a 48-hour control cycle and uses the CPLEX mixed-integer programming solver to determine the best energy dispatch scheme.
[0123] The battery charge and discharge management results and details of the electric vehicle charging plan are shown in Table 2.
[0124] The battery charging action is set to a positive value, the discharging action to a negative value, and the resting state to zero. Using Tables 2 and 3, the battery charging and discharging strategy can be obtained: A = {1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, ...}
[0125] -1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,1,-1,-1,1,1,-1}。
[0126] Table 2 48h Battery Charging Actions
[0127]
[0128] Table 3 48h Battery Charging Actions
[0129]
[0130] The action of charging the electric vehicle is marked as a positive number, while the action of not charging is marked as 0. In this model, the electric vehicle leaves home at 8:00 and arrives home at 18:00, during which time no charging action occurs.
[0131] Based on Table 4, the electric vehicle charging strategy is: B = {0, 1, 1, 1, 1, 1, 1, -, -, -, -, -, -, -, -, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -, -, -, -, -, -, -, 0, 0, 1, 0, 0, 1, 1, 1}. Based on the battery charging and discharging scheme and the electric vehicle charging plan, the minimum electricity cost for the user within 48 hours is calculated to be negative 3.35 yuan.
[0132] Table 4. Charging activities and electricity costs of electric vehicles within a 48-hour period.
[0133]
[0134] Figure 2 This displays the charging and discharging behavior of the battery within one control cycle. In demand response mode, such as... Figure 2 As shown, during peak hours of 7-22 and 35-46, batteries tend to discharge to meet the demand for high electricity prices and high power consumption; conversely, during periods when batteries are charged more frequently, electricity prices and demand are lower.
[0135] Assuming the electric vehicle departs at 8:00 AM and returns home at 5:00 PM, the charging time is scheduled from 5:00 PM to 9:00 AM the following day. Taking the period from 5:00 PM to 8:00 PM the following day as an example, the charging behavior of the electric vehicle during this time is as follows: Figure 3 As shown. From Figure 3 As can be seen, between 5 PM and 10 PM, electric vehicles generally do not charge due to higher user electricity demand and prices; while between 10 PM and 11 PM, user electricity demand and prices are lower, and electric vehicles mainly charge during this period.
[0136] Without employing a demand response mechanism, a fixed electricity price is set that remains constant throughout all time periods, and this fixed value is an average calculated based on real-time electricity prices. This setup means that users have no incentive to adjust their battery charging and discharging plans according to electricity price fluctuations, because they are faced with a constant electricity price.
[0137] like Figure 4 As shown, in the non-demand response mode, residential users purchase more electricity from the grid than they sell to it within a control cycle. This results in a significantly higher electricity cost compared to the demand response mode. This comparison highlights the advantages of energy dispatch strategies under the demand response mechanism, namely, reducing electricity costs by flexibly adjusting charging and discharging schedules. This strategy not only reduces residential users' electricity expenditures but also improves the flexibility and economy of energy use, demonstrating the importance and practicality of demand response in modern energy management. In this way, residential users can better respond to changes in grid demand, optimize their energy consumption habits, and thus achieve both cost savings and improved energy efficiency.
Claims
1. An energy dispatching method for a home energy management system based on mixed integer programming, characterized in that... It includes the following steps: Step 1: Establish a home energy management system; Step 2: Establish an energy scheduling model considering the integration of electric vehicles; Step 3: Establish a mixed integer programming model; Step 4: Optimize the home energy scheduling strategy under the GAMS environment.
2. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 1, characterized in that: The said Step 1 includes: constructing a home energy management network platform, including: a home energy control center, decentralized energy supply, intelligent switches, household appliances, smart meters, energy storage devices, and network communication. This platform uses smart meters for the interactive transmission of electricity price information and demand response instructions, and feeds back the home electricity consumption information to the power grid; the system can directly use photovoltaic power generation to supply household appliances, or store the excess power for later use, or sell the power back to the grid.
3. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 2, characterized in that: Establish an energy storage model, and the energy storage model represents the dynamic energy state of the energy storage battery at a certain time step, specifically as follows: Where B(t) represents the energy state of the energy storage battery at time t; P char P represents the charging rate, η represents the charging efficiency; dis The discharge efficiency is represented by Δt; the time step is represented by Δt; and B(t-1) represents the remaining energy of the battery at the previous time step (t-1). The capacity of the energy storage battery is restricted by physical conditions, and the available battery power is controlled within a certain range. B min <B(t)<B max (2); Among them, B min B represents the minimum battery capacity. max This indicates the maximum battery capacity.
4. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 3, characterized in that: The said Step 2 includes the following steps: Step 2.1: First, regard the electric vehicle EV as a controllable power load, which can store electricity during the parking period at home to optimize energy consumption and cost; assume that the power consumption of the electric vehicle in one time step is positively correlated with the remaining power at the previous moment; Equation (3) represents the energy state of the electric vehicle at a certain time step. Where EV(t) represents the energy of EV at time t; EV(t-1) represents the remaining energy of the battery at the previous time (t-1); P EV (t-1) represents the charging power at the previous time (t-1); t start Indicates the start time of permitted charging; t end This indicates the end time of the allowed charging; θ represents the correlation coefficient. To ensure the smooth travel of electric vehicle users, the energy of the electric vehicle (EV) needs to be maintained within a certain range; the power quantity constraint is shown in Equation (4): THIS min <EV(t)<EV max (4); In equation (4): EV max This indicates the upper limit of the battery capacity of an EV. min This indicates the minimum battery level required for an electric vehicle to operate normally. Assume that the electric vehicle is charged at a fixed charging rate, and the charging power of the electric vehicle at time t is shown in Equation (5): P EV (t)=δ(t)·P EVchar (5); In equation (5): P EV δ(t) represents the photovoltaic power generation at time t; δ(t) represents the charging status of the electric vehicle at time t, where δ(t) = 1 represents charging and δ(t) = 0 represents not charging; P EVchar Represents the charging rate of electric vehicles; Step 2.2: Divide the electric vehicle into two modes: charging at home and consuming power when out, as shown in Equation (6) and Equation (7); under the circumstances of demand response and electricity price fluctuations; the charging process is divided into periods, and each period is charged at a fixed speed. P charge (t)=η·P EV_charge (6); Equation (6) represents the situation where an electric vehicle is at home, where P charge (t) is the charging power at time t, η is the charging efficiency, and P EV_charge This refers to the charging power of electric vehicles; Equation (7) represents the situation where the electric vehicle leaves home; where P discharge P(t) is the power consumed at time t. load (t) is the load power of the electric vehicle, and λ is the discharge efficiency; The power consumption is directly related to the daily driving mileage and is affected by the driving behavior habits of the driver; establish an energy consumption prediction system based on driving behavior modeling, and calculate the daily power consumption through Equation (8), where the acceleration integral term quantifies the influence of the driving aggressiveness degree. Among them, E daily The total daily power consumption is represented by ; D represents the daily mileage; a(t) represents the instantaneous acceleration. α represents the average speed; β represents the energy consumption coefficient per unit distance; β represents the penalty coefficient for aggressive driving; and γ represents the speed influence coefficient.
5. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 4, characterized in that: By intelligently scheduling and optimizing the charging behavior of the electric vehicle, improve the utilization efficiency of home energy, and establish the objective function of the intelligent charging optimization model as follows: Among them, C grid (t) represents the electricity price during time period t; λ represents the grid load smoothing coefficient; Indicates average charging power; P EV (t) represents the charging power at time t.
6. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 5, characterized in that: The constraint conditions are as follows: (1) Power quantity demand constraint: Among them, T charge P represents the set of time periods during which charging is permitted; EV (t) represents the electric vehicle charging power at time t; Δt represents the time step; E required This indicates the user's daily required charging amount; (2) Charging power limit: 0≤P EV (t)≤P max (11); Among them, P EV (t) represents the charging power of the electric vehicle at time t; P max Indicates the maximum allowable charging power of the battery; (3) Grid interaction constraint: Where N represents the total number of electric vehicles participating in the dispatch within the region; P EV,i (t) represents the charging power of the i-th electric vehicle at time t; △P grid,max This represents the maximum power fluctuation that the power grid can withstand during time period t.
7. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 6, characterized in that: The said Step 3 includes the following steps: 3.1: Establish a mixed integer programming model, including: In Equation (13), MinZ = z(t,x,u) represents the objective function, and set the minimum value of z as the goal; z(t,x,u) represents the specific form of the objective function, which depends on time t, state variable x, and control variable u; t represents time, x represents the state variable; u represents the control variable, and the boundary of u defines the range of the control variable; s.t.g(v,u)=0 represents the equality constraint of the model; v represents the variable related to the control variable u; u - min < u < u - max represents the inequality constraint. The control variables in set x include "Load" and "Price", which refer to the user's electricity consumption and the instantaneous electricity price, respectively; while the control variables in set u include "gb" and "gs", where "gb" refers to the electrical energy purchased from the power system and "gs" refers to the electrical energy sold to the power system. 3.2: Minimize the electricity cost of the home energy management system after trading with the grid within a 48-hour control cycle; Under the premise of ensuring power balance and satisfying inequality constraints, the total electricity cost after the control cycle is completed is calculated by equation (16); z=sum(t,(buy(t)-sell(t))*Price(t)) (16); In equation (16), z represents the total electricity cost, which is the electricity cost of the home energy management system after trading with the grid within a 48-hour control cycle; sum(·) represents summing over time t; buy(t) represents the amount of electricity purchased from the grid at time t; sell(t) represents the price at which the electricity is sold to the grid at time t; and Price(t) refers to the real-time electricity price per hour.
8. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 7, characterized in that: The mixed-integer programming model satisfies the following equality constraints: Since electric vehicles cannot be charged while away from home, it is necessary to establish load power balance equations for both home and away states, as follows: Battery(t)+PV(t)+EV(t)+Load(t)=grid(t) (14); Battery(t)+PV(t)+Load(t)=grid(t) (15); Equation (14) corresponds to the situation when the electric vehicle is at home, and Equation (15) corresponds to the situation when the electric vehicle is out. Where Battery(t) represents the amount of charge and discharge of the battery at time t, EV(t) represents the amount of charge of the EV at time t, Load(t) represents the amount of user load consumed at time t, grid(t) represents the amount of electricity traded with the grid at time t, and PV(t) represents the amount of photovoltaic power generated at time t.
9. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 8, characterized in that: Step 4 includes: based on photovoltaic data of a typical winter day, parameters such as household electricity consumption, real-time electricity price, photovoltaic power generation and initial battery charge over a continuous 48-hour period are integrated; Based on comprehensive consideration of power balance, changes in battery charge and discharge state and physical constraints, the specific constraints in the above formulas (2), (3), (4) and (5) were referenced. The demand response problem in home energy management is constructed as a mixed integer programming (MIP) model, and the CPLEX solver is used to determine the optimal strategy. Using the MIP model established by formula (13), key data such as home electricity consumption, instantaneous electricity price, solar power generation and initial battery charge are input over a continuous 48-hour period.
10. The energy dispatching method for a home energy management system based on mixed integer programming according to claim 9, characterized in that: A 48-hour control cycle was set, and the CPLEX mixed-integer programming solver was used to determine the optimal home energy dispatch strategy. This strategy aims to minimize the total electricity cost while satisfying all the above constraints. Specifically, the optimal home energy dispatch strategy includes the following aspects: purchasing electricity from the grid during periods of low electricity prices to reduce overall electricity costs; reducing electricity purchases from the grid during periods of high electricity prices to avoid unnecessary expenses; prioritizing the use of solar power during periods of high solar power generation to reduce dependence on grid power; charging batteries during periods of low electricity prices and discharging them during periods of high electricity prices to balance electricity demand and supply and improve energy efficiency.