Demand response method and system
By optimizing the electricity trading price in P2P energy trading and establishing an energy state model of ESS and EV, the problems of short ESS life and insufficient monitoring of EV power state are solved, and household electricity load optimization and energy utilization are achieved.
Patent Information
- Application Number
- CN202510413172.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-22
AI Technical Summary
The traditional P2P energy trading method does not consider the demand response of ESS and EVs within the home, resulting in short ESS life, insufficient energy density and insufficient monitoring of EV power status, limiting the flexibility and efficiency of energy trading.
During the demand response process, by selecting the lowest electricity price for electricity trading, establishing a mathematical model of energy state of ESS and EV, optimizing the trading price of electricity, considering the energy storage life and EV power state, achieving the rational use of ESS and EV, establishing a model of purchasing and selling electricity, and optimizing the trading price of electricity.
Extend the life of ESS, improve energy utilization, reduce energy consumption, achieve optimization of household electricity load, and improve the flexibility and efficiency of P2P energy transactions.
Smart Images

Figure CN120355140A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power systems, and particularly relates to a demand response method and system. Background Art
[0002] Due to factors such as information and communication technology, power electronics technology, demand side management systems, electric vehicle (EV) technology, energy storage systems (ESS), photovoltaic (PV) and wind turbine price declines, environmental issues, and policies, distributed generation (DG) has been promoted globally. According to the EU Energy Technology Plan, small-scale behind-the-meter structures will become the core of future energy systems. According to a report by the International Energy Agency, since 2009, the price of solar photovoltaic modules has decreased by nearly 80%, and by 2025, the average electricity cost of solar photovoltaic power generation (PV) will be 59% lower than in 2015. The total share of wind and solar power generation in Turkey was 11% in 2019 and is expected to reach 36% by 2040. From 2015 to 2018, the cost of ESS decreased by nearly 70%, and the sales volume of electric vehicles in 2019 increased steadily by 63% compared to the previous year. In addition, under the sustainable development scenario, it is expected that the sales volume of electric vehicles will exceed 130 million by 2030. DGs make operations such as increasing energy demand, forecasting problems of renewable energy power plants, instantaneous high power demands, and uncertainties in electric vehicle charging times and locations quite important, thus avoiding power grid interruptions and also bringing benefits to consumers. In this context, the increase in the number of small-scale electricity users and their active participation in the energy market are of great significance for operations. Users can sell excess energy to the power grid through feed-in tariffs (FiT), which enables users to actively participate in energy trading. However, the benefits obtained by consumers from electricity prices are very meager.
[0003] As an emerging energy trading method, peer-to-peer (P2P) energy trading provides new ideas and methods for energy environment considerations by promoting the development of distributed energy. In this mode, energy producers and consumers can directly conduct energy trading without using traditional energy suppliers or grid operators as intermediaries. The core advantage of P2P energy trading lies in its decentralized nature, which allows energy producers and consumers to directly negotiate trading conditions, including price, quantity, and time, thereby improving the efficiency and flexibility of the energy market and reducing transaction costs. In addition, P2P energy trading also allows energy producers and consumers to set trading goals according to their own needs, such as maximizing the remaining electricity or pursuing the profit maximization of producers and consumers, making the trading more intelligent and fair.
[0004] The traditional P2P energy trading method refers to the energy trading between two or more photovoltaic grid-connected parties, where the commodity of energy trading is usually solar energy. In this way, any surplus energy can be transferred or sold to other users through a secure platform. Specifically, a household with solar photovoltaics first consumes the energy they produce, and then can sell the excess energy to its neighbors or store it in a microgrid storage system for future use.
[0005] However, the traditional P2P energy trading method does not consider the demand response of ESS and EV within the household, and there is no specific limit on the energy sold.
[0006] Currently, the traditional energy trading method has the following deficiencies:
[0007] 1) It does not consider the lifespan of ESS. The lifespan of ESS is relatively short, which may limit its long-term energy trading ability.
[0008] 2) The energy density and size issues of ESS. The energy density and size of ESS will limit its application scope and efficiency. For example, the energy density of the battery may not be sufficient to support long-time or long-distance energy trading.
[0009] 3) It cannot monitor the charging and discharging conditions of EV in real time, resulting in limitations on the flexibility and convenience of its energy trading; it cannot monitor the state of energy (SoE) of electric vehicles. Summary of the Invention
[0010] To solve the problem that the existing technology does not consider the energy lifespan and the electrical energy state of electric vehicles, the present invention provides a demand response method and system, which consider the energy lifespan and the electrical energy state of electric vehicles during the demand response process, can reduce the electricity load while ensuring household electricity consumption, ensure the stability of the power grid and improve the energy utilization rate.
[0011] The present invention adopts the following technical solutions.
[0012] The first aspect of the present invention provides a demand response method, and the method includes the following contents:
[0013] Select the lowest electricity price from the grid electricity price and the electricity price in the peer-to-peer P2P energy trading market as the electricity trading price, purchase electricity according to the electricity trading price, and use the purchased electricity and the electricity generated by the household itself for household loads;
[0014] Based on the energy storage life, establish a mathematical model of the energy state of the home ESS and ESS constraints. Considering the state of charge of the electric vehicle, establish a mathematical model of the energy state of the EV initial and operating states and EV constraints. After using the remaining electric energy of the home load for the ESS and EV based on the mathematical model of the energy state of the ESS and the mathematical models of the energy state of the EV initial and operating states, obtain the remaining electric energy of the demand response;
[0015] Based on the constraint relationship between the purchased electric energy and the sold electric energy of the home, establish a model of the purchased electric energy and the sold electric energy. Send the remaining electric energy of the demand response into the P2P energy trading market based on the established model of the purchased electric energy and the sold electric energy and the sensitivity parameter optimization model, where the sensitivity parameter optimization model is used to determine the current electric energy trading price.
[0016] Optionally, calculate the total daily energy cost of each home according to the purchased electricity price as shown in the following formula:
[0017] ψ = λ gt1 ·P gt1 ·ΔT + λ pt1 ·P pt1 ·ΔT
[0018] λ gt1 <λ pt1 ,λ pt1 =0
[0019] λ gt1 >λ pt1 ,λ gt1 =0
[0020] Where,
[0021] ψ represents the total home energy cost during ΔT, in yuan per kilowatt-hour,
[0022] λ gt1 represents the price of purchasing energy from the power grid during ΔT, in yuan per kilowatt-hour,
[0023] λ pt1 represents the price of purchasing energy from the P2P energy market during ΔT, in yuan per kilowatt-hour,
[0024] P gt1 represents the total electricity purchased by the home from the power grid during ΔT, in kilowatts,
[0025] P pt1 represents the total electricity purchased by the home from the P2P energy market during ΔT, in kilowatts.
[0026] Optionally, based on the energy storage life, establish a mathematical model of the energy state of the home ESS and ESS constraints, including:
[0027] Establish a mathematical model of the energy state of the household ESS according to the following formula:
[0028]
[0029] Based on the energy storage life, establish the following ESS constraints to keep the energy state of the ESS within the ESS limit values:
[0030]
[0031] Among them,
[0032] P esscht represents the ESS charging power of the household during period t, with the unit of kilowatt,
[0033] P essdischt represents the ESS discharging power of the household during period t, with the unit of kilowatt,
[0034] SoE esst represents the energy state of the household ESS during period t, with the unit of kilowatt-hour,
[0035] CE ess represents the charging efficiency of the household using the ESS,
[0036] SoE ess0 represents the initial energy consumption state of the household ESS, with the unit of kilowatt-hour,
[0037] SoE essmin represents the lowest energy consumption state of the household ESS, with the unit of kilowatt-hour,
[0038] SoE essmax represents the maximum energy consumption state of the household ESS, with the unit of kilowatt-hour,
[0039] ΔT represents the usage duration of the ESS.
[0040] Optionally, based on the state of charge of the electric vehicle, establish a mathematical model of the energy state of the EV initial and operating states and EV constraints, including:
[0041] Calculate the state of charge of the electric vehicle based on the charging and discharging losses of the electric vehicle. The mathematical model of the energy state of the EV initial and operating states is expressed by the following formula:
[0042]
[0043] Establish the following EV constraints to keep the state of charge of the electric vehicle within the EV limit values:
[0044]
[0045] Among them,
[0046] TA represents the arrival time of the electric vehicle,
[0047] TD represents the departure time of the electric vehicle,
[0048] P evdischt represents the discharge power of the electric vehicle during t, in kilowatts,
[0049] P evcht represents the charging power of the home electric vehicle during t, in kilowatts,
[0050] CE ev represents the charging efficiency of the electric vehicle,
[0051] SoE evt represents the energy consumption of the electric vehicle at home during t, in kilowatt-hours,
[0052] SoE evmin represents the minimum energy consumption of the electric vehicle, in kilowatt-hours,
[0053] SoE evmax represents the maximum energy consumption of the electric vehicle, in kilowatt-hours,
[0054] When t is not within the range of TA to TD, all variables in the mathematical model of the energy state of the EV initial and operating states are zero.
[0055] Optionally, after using the remaining electric energy of the home load for the ESS and the EV based on the mathematical model of the ESS energy state and the mathematical model of the EV initial and operating states energy state, the remaining electric energy obtained from the demand response includes:
[0056] Calculating the discharge power of the ESS according to the mathematical model of the ESS energy state and the ESS constraints;
[0057] Calculating the discharge power of the electric vehicle according to the mathematical model of the EV initial and operating states energy state and the EV constraints;
[0058] Calculating the ESS power P esst1 used by the home and the electric vehicle power P evt1 used based on the following power balance:
[0059]
[0060] Wherein,
[0061] P1 represents the total electric energy purchased by the home during t, in kilowatts,
[0062] P pvt represents the available power of the photovoltaic power generation of the home during t, in kilowatts,
[0063] Pevt1 Represents the electric vehicle power used by the household during period t, in kilowatts,
[0064] P esst1 Represents the ESS power used by the household during period t, in kilowatts,
[0065] P loadt Represents the household load of the household during period t, in kilowatts,
[0066] P evcht Represents the electric vehicle charging power of the household during period t, in kilowatts,
[0067] P esscht Represents the ESS charging power of the household during period t, in kilowatts;
[0068] The remaining electric energy of the demand response is calculated according to the following formula:
[0069]
[0070] P2 = P esst2 + P evt2
[0071] Where,
[0072] P2 represents the remaining electric energy of the demand response,
[0073] P esst1 Represents the ESS power used by the household during period t, in kilowatts,
[0074] P esst2 Represents the remaining electric energy of the ESS used by the household during period t, in kilowatts,
[0075] P essdischt Represents the ESS discharge power of the household during period t, in kilowatts,
[0076] DE ess Represents the ESS discharge efficiency of the household,
[0077] P evt1 Represents the electric vehicle power used by the household during period t, in kilowatts,
[0078] P evt2 Represents the remaining electric energy of the electric vehicle used by the household during period t, in kilowatts,
[0079] P evdischt Represents the discharge power of the electric vehicle during period t, in kilowatts,
[0080] DE ev Represents the charging efficiency of the household's electric vehicle.
[0081] Optionally, establishing the purchased electricity and sold electricity models includes:
[0082] Set a binary variable u gt , and based on the binary variable u gt establish the purchased electricity and sold electricity models, where the purchased electricity is based on established, and the sold electricity is based on established;
[0083] Set the constraint ranges for the household purchase power and sales power of the purchased electricity and sold electricity models. The constraint ranges for the household purchase power and sales power are expressed by the following formula:
[0084]
[0085] where,
[0086] If powered by the grid during period t, then u gt takes the value of 1. If selling electricity to the P2P energy trading market, then u gt takes the value of 0. The binary variable u gt is used to represent that the constraint relationship between the household's purchased electricity and sold electricity is that grid buying and selling cannot be carried out simultaneously,
[0087] N1 represents the maximum power that can be purchased from the grid, in kilowatts,
[0088] N2 represents the maximum power that can be sold to the P2P energy trading market, in kilowatts,
[0089] P1 represents the total electricity purchased by the household during period t, in kilowatts,
[0090] P2 represents the total electricity sold by the household during period t, that is, the remaining electricity from demand response, in kilowatts.
[0091] Optionally, the sensitivity parameter optimization model is expressed as follows:
[0092]
[0093] where,
[0094] λ pt represents the electricity trading price in the P2P market during time period t, in yuan per kilowatt-hour,
[0095] λ gt1 represents the price of purchasing energy from the grid during period t, in yuan per kilowatt-hour,
[0096] λ gt2 represents the price of purchasing energy from the P2P energy market during period t, in yuan per kilowatt-hour,
[0097] γ t represents the sensitivity parameter determined by the excess electric energy
[0098] P loadt represents the household load of household n during period t, in kilowatts
[0099] P pvt represents the available power of the photovoltaic power generation of the household during period t, in kilowatts
[0100] Optionally, the sensitivity parameter is calculated according to the following formula:
[0101]
[0102] wherein
[0103] γ t represents the sensitivity parameter during period t
[0104] λ p(t-1),i represents the price of the i-th electric energy transaction in the P2P trading market during period t - 1
[0105] n represents the number of P2P electric energy transactions during period t - 1
[0106] w i represents the weight coefficient of the i-th electric energy transaction
[0107] The second aspect of the present invention provides a demand response system, including:
[0108] A first calculation module, configured to select the lowest electricity price as the electricity transaction price from the grid electricity price and the electricity price in the peer-to-peer P2P energy trading market, purchase electricity according to the electricity transaction price, and use the purchased electricity and the electricity generated by the household itself for the household load
[0109] A first establishment module, configured to establish a mathematical model of the ESS energy state and ESS constraints of the household based on the energy storage life
[0110] A second establishment module, configured to establish a mathematical model of the EV initial and operating state energy states and EV constraints based on the electric energy state of the electric vehicle
[0111] A second calculation module, configured to obtain the remaining electricity of the demand response after using the remaining electricity of the household load for the ESS and EV based on the mathematical model of the ESS energy state and the mathematical models of the EV initial and operating state energy states
[0112] A third establishment module, configured to establish a model of the purchased electricity and the sold electricity based on the constraint relationship between the purchased electricity and the sold electricity of the household
[0113] The fourth establishment module is used to establish a sensitivity parameter optimization model for determining the current electricity trading price.
[0114] The transmission module is used to send the remaining electricity of the demand response into the P2P energy trading market based on the established electricity purchase and electricity sale models and the sensitivity parameter optimization model.
[0115] Optionally, when the first establishment module considers the energy storage life to establish the mathematical model of the home ESS energy state and the ESS constraints, it includes:
[0116] Establish the mathematical model of the home ESS energy state according to the following formula:
[0117]
[0118] Based on the energy storage life, establish the following ESS constraints to make the energy state of the ESS within the ESS limit value:
[0119]
[0120] Among them,
[0121] P esscht represents the ESS charging power of the home during period t, with the unit of kilowatt,
[0122] P essdischt represents the ESS discharging power of the home during period t, with the unit of kilowatt,
[0123] SoE esst represents the ESS energy state of the home during period t, with the unit of kilowatt-hour,
[0124] CE ess represents the charging efficiency of the home using the ESS,
[0125] SoE ess0 represents the initial energy consumption state of the home ESS, with the unit of kilowatt-hour,
[0126] SoE essmin represents the lowest energy consumption state of the home ESS, with the unit of kilowatt-hour,
[0127] SoE essmax represents the maximum energy consumption state of the home ESS, with the unit of kilowatt-hour,
[0128] ΔT represents the ESS usage duration.
[0129] Optionally, when the second establishment module considers the electric vehicle energy state to establish the mathematical model of the EV initial and operating state energy state and the EV constraints, it includes:
[0130] Calculate the state of electric energy of an electric vehicle based on the charging and discharging losses of the electric vehicle. The mathematical model of the initial and operating state energy of the EV is expressed by the following formula:
[0131]
[0132]
[0133] Establish the following EV constraints to keep the state of electric energy of the electric vehicle within the EV limit values:
[0134]
[0135] Wherein,
[0136] TA represents the arrival time of the electric vehicle,
[0137] TD represents the departure time of the electric vehicle,
[0138] P evdischt represents the discharge power of the electric vehicle during t, in kilowatts,
[0139] P evcht represents the charging power of the home electric vehicle during t, in kilowatts,
[0140] CE ev represents the charging efficiency of the electric vehicle,
[0141] SoE evt represents the energy consumption of the home electric vehicle during t, in kilowatt-hours,
[0142] SoE evmin represents the minimum energy consumption of the electric vehicle, in kilowatt-hours,
[0143] SoE evmax represents the maximum energy consumption of the electric vehicle, in kilowatt-hours,
[0144] When t is not within the range of TA to TD, all variables in the mathematical model of the initial and operating state energy of the EV are zero.
[0145] Optionally, when the second calculation module is used to obtain the remaining electric energy of the demand response after using the remaining electric energy of the home load for the ESS and the EV based on the ESS energy state mathematical model and the EV initial and operating state energy state mathematical model, it includes:
[0146] Calculate the discharge power of the ESS according to the ESS energy state mathematical model and the ESS constraints;
[0147] Calculate the discharge power of the electric vehicle according to the EV initial and operating state energy state mathematical model and the EV constraints;
[0148] The ESS power P used by the household is calculated based on the following power balance esst1 and the electric vehicle power P used evt1 :
[0149]
[0150] where
[0151] P1 represents the total electric energy purchased by the household during period t, in kilowatts
[0152] P pvt represents the available power of the photovoltaic power generation of the household during period t, in kilowatts
[0153] P evt1 represents the electric vehicle power used by the household during period t, in kilowatts
[0154] P esst1 is the ESS power used by the household during period t, in kilowatts
[0155] P loadt represents the household load of the household during period t, in kilowatts
[0156] P evcht represents the electric vehicle charging power of the household during period t, in kilowatts
[0157] P esscht represents the ESS charging power of the household during period t, in kilowatts;
[0158] The remaining electric energy of the demand response is calculated according to the following formula:
[0159]
[0160] P2 = P esst2 + P evt2
[0161] where
[0162] P2 represents the remaining electric energy of the demand response
[0163] P esst1 represents the ESS power used by the household during period t, in kilowatts
[0164] P esst2 represents the remaining electric energy of the ESS used by the household during period t, in kilowatts
[0165] P essdischt represents the ESS discharge power of the household during period t, in kilowatts
[0166] DEess Represents the ESS discharge efficiency of the household,
[0167] P evt1 represents the electric vehicle power used by the household during period t, in kilowatts,
[0168] P evt2 represents the remaining electric energy of the household's electric vehicle during EV use in period t, in kilowatts,
[0169] P evdischt represents the discharge power of the electric vehicle during period t, in kilowatts,
[0170] DE ev represents the charging efficiency of the household's electric vehicle.
[0171] Optionally, when the third establishment module is used to establish the purchased electric energy and sold electric energy model, it includes:
[0172] Set the binary variable u gt , and based on the binary variable u gt establish the purchased electric energy and sold electric energy model, where the purchased electric energy is based on established, and the sold electric energy is based on established;
[0173] Set the constraint ranges of the household's purchase power and sales power for the purchased electric energy and sold electric energy model. The constraint ranges of the household's purchase power and sales power are expressed by the following formula:
[0174]
[0175] where,
[0176] If the power grid supplies power during period t, then u gt takes the value of 1. If electric energy is sold to the P2P energy trading market, then u gt takes the value of 0. The binary variable u gt is used to characterize that the constraint relationship between the household's purchased electric energy and sold electric energy is that power grid buying and selling cannot be carried out simultaneously,
[0177] N1 represents the maximum power that can be purchased from the power grid, in kilowatts,
[0178] N2 represents the maximum power that can be sold to the P2P energy trading market, in kilowatts,
[0179] P1 represents the total electric energy purchased by the household during period t, in kilowatts,
[0180] P2 represents the total electric energy sold by the household during period t, that is, the remaining electric energy from demand response, in kilowatts.
[0181] Optionally, when the fourth establishment module is used to establish a sensitivity parameter optimization model, it includes:
[0182] The sensitivity parameter optimization model is expressed as follows:
[0183]
[0184] Wherein,
[0185] λ pt represents the electricity trading price in the P2P market during time t, with the unit of yuan per kilowatt-hour,
[0186] λ gt1 represents the price of purchasing energy from the power grid during t, with the unit of yuan / kWh,
[0187] λ gt2 represents the price of purchasing energy from the P2P energy market during t, with the unit of yuan / kWh,
[0188] γ t represents the sensitivity parameter determined by the excess electricity,
[0189] P loadt represents the household load of household n during t, with the unit of kilowatt,
[0190] P pvt represents the available power of photovoltaic power generation of the household during t, with the unit of kilowatt.
[0191] Optionally, when the fourth establishment module is used to establish a sensitivity parameter optimization model, the sensitivity parameter is calculated according to the following formula:
[0192]
[0193] Wherein,
[0194] γ t represents the sensitivity parameter during t,
[0195] λ p(t-1),i represents the electricity trading price of the i-th time in the P2P trading market during t - 1;
[0196] n represents the number of P2P electricity trading times during t - 1,
[0197] w i represents the weight coefficient of the i-th electricity trading.
[0198] The third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, the above-mentioned demand response method is implemented.
[0199] The fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned demand response method.
[0200] The beneficial effects of the present invention are as follows. Compared with the prior art, the present invention:
[0201] 1) P2P electricity trading eliminates the participation of third-party intermediaries in traditional energy trading, such as electricity suppliers or grid operators, and realizes direct trading between producers and consumers. This decentralized feature reduces trading costs and improves the flexibility and efficiency of trading. Since P2P energy trading allows producers and consumers to directly negotiate trading conditions, including price, quantity, and time, etc., it can better meet the needs of both parties and improve the efficiency of the energy market.
[0202] 2) Reduces intermediate links and avoids intermediary fees and other additional fees that may occur in traditional energy trading, thereby reducing trading costs. P2P energy trading provides a more convenient market access way for distributed energy systems. The electricity generated by distributed energy systems such as solar photovoltaic panels and wind turbines can be directly sold to consumers through the P2P platform, thus stimulating more people's enthusiasm for investing in and using distributed energy and promoting the development of distributed energy.
[0203] 3) The present invention takes into account the impacts of ESS and EV on households in peer-to-peer energy trading, prevents deep charging of ESS, extends the battery life of ESS, and conducts real-time monitoring of EV to reduce energy consumption.
[0204] 4) Allows consumers to choose appropriate energy suppliers and trading conditions according to their own needs to meet personalized requirements. At the same time, producers can also adjust production plans and sales strategies according to market demands to achieve a more flexible production and sales model. BRIEF DESCRIPTION OF THE DRAWINGS
[0205] Figure 1 is a simplified diagram of an object scenario applicable to a demand response method provided by an embodiment of the present invention;
[0206] Figure 2 is a schematic flowchart of a demand response method provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0207] To make the objectives, technical solutions, and advantages of the present invention more clear, the following will clearly and completely describe the technical solutions of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments of this application are only a part of the embodiments of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present invention.
[0208] In conjunction with Figure 1 as shown, the embodiments of the present invention are applied to an environment such as Figure 1 described. Taking the family as an example, the embodiments of the present invention propose a demand response strategy based on P2P energy trading, and the applicable objects have universality. Users include Family 1, Family 2, Family 3, Family n, which are connected to the distribution network. In terms of energy transmission, it is transmitted from the power grid to the substation, and then from the substation to the household load through the distribution network. The household load generates a bill and sends it to the distribution system operator. Figure 1 In, the thick solid line represents the power grid electricity price, and the thin solid line represents the energy transmission path. The family obtains the trading price through the P2P energy trader, and the profit after selling the energy is returned to the family, where the thick dashed line and the thin dashed line respectively represent the energy price of the P2P transaction and the profit generated by the energy transaction
[0209] The core of P2P (peer-to-peer) energy trading lies in allowing direct energy trading between energy producers and consumers without the need for traditional energy suppliers or grid operators as intermediaries. P2P energy trading removes the centralized energy supply and management institutions, making energy trading more direct and efficient. This helps reduce transaction costs, improve the flexibility and response speed of the market. The P2P market structure helps reduce energy costs and improve social welfare by determining the optimal price among local households. The developed model optimizes the energy costs of four different participants in four different scenarios, and the resulting control returns and costs can be viewed through the developed interface. The photovoltaic, ESS, and electric vehicle loads of the household are used in various power generation and consumption scenarios, and the roles of various household scenarios in various system scenarios are also studied. Consumers can determine the most cost-effective way to use the energy they produce and consume through this system, thus actively participating in the market. This directness helps meet the personalized needs of both parties and improve market efficiency.
[0210] In conjunction with Figure 2 as shown, Embodiment 1 of the present invention provides a demand response method, which is special in that: it not only takes into account the supply and demand and sales situation of photovoltaic, but also takes into account the lifespan of ESS and the power state of EV, extends the service life of ESS, reduces the energy consumption of the charging pile, and finally achieves the purpose of reducing energy expenditure and promoting sustainable development. The method includes the following steps:
[0211] S1. Select the lowest electricity price from the grid electricity price and the electricity price in the peer-to-peer (P2P) energy trading market as the electricity trading price, and use the purchased electricity and the electricity generated by the household itself for household loads according to the electricity trading price. Calculate the total daily energy cost for each household based on the purchased electricity price.
[0212] Specifically, in S1, the total daily energy cost for each household is calculated according to the following formula based on the purchased electricity price:
[0213] ψ = λ gt1 ·P gt1 ·ΔT + λ pt1 ·P pt1 ·ΔT (1)
[0214] λ gt1 <λ pt1 , λ pt1 =0
[0215] λ gt1 >λ pt1 , λ gt1 =0
[0216] Where:
[0217] ψ represents the total household energy cost during ΔT, in yuan per kilowatt-hour;
[0218] λ gt1 represents the price of purchasing energy from the grid during ΔT, in yuan per kilowatt-hour;
[0219] λ pt1 represents the price of purchasing energy from the P2P energy market during ΔT, in yuan per kilowatt-hour;
[0220] P gt1 represents the total electricity purchased from the grid by the household during ΔT, in kilowatts;
[0221] P pt1 represents the total electricity purchased from the P2P energy market by the household during ΔT, in kilowatts.
[0222] In the embodiments of the present invention, the electricity provided by the P2P energy trading market is considered during the household's electricity purchase process, enabling the household to compare the prices of the grid and the P2P energy trading market and purchase electricity at the lowest price, thereby reducing the energy cost.
[0223] S2. Establish a mathematical model of the energy state of the household ESS and ESS constraints based on the energy storage life, establish a mathematical model of the energy state of the EV initial and operating states and EV constraints based on the state of charge of the electric vehicle, and obtain the remaining electric energy of the demand response after using the remaining electric energy of the household load for the ESS and EV based on the mathematical model of the energy state of the ESS and the mathematical model of the energy state of the EV initial and operating states.
[0224] Specifically, in S2, establishing a mathematical model of the energy state of the household ESS and ESS constraints based on the energy storage life includes:
[0225] Establish a mathematical model of the energy state of the household ESS according to the following formula:
[0226]
[0227] Establish the following ESS constraints based on the energy storage life to make the energy state of the ESS within the ESS limit value:
[0228]
[0229] Among them,
[0230] P esscht represents the ESS charging power of the household during period t, with the unit of kilowatt,
[0231] P essdischt represents the ESS discharging power of the household during period t, with the unit of kilowatt,
[0232] SoE esst represents the energy state of the household ESS during period t, with the unit of kilowatt-hour,
[0233] CE ess represents the charging efficiency of the household using the ESS,
[0234] SoE ess0 represents the initial energy consumption state of the household ESS, with the unit of kilowatt-hour,
[0235] SoE essmin represents the lowest energy consumption state of the household ESS, with the unit of kilowatt-hour,
[0236] SoE essmax represents the maximum energy consumption state of the household ESS, with the unit of kilowatt-hour,
[0237] ΔT represents the ESS usage duration.
[0238] Specifically, t = 1 represents the initial state of the household ESS, and t > 1 represents that the household ESS is not in the initial state. Equation (2) establishes a mathematical model for the specific ESS energy state, giving the energy state formula of the ESS. Equation (3) represents the energy state of the initial ESS, and Equation (4) gives the ESS constraint, indicating the maximum and minimum values that limit the energy state of the ESS. Through this limitation, deep discharge can be prevented and the ESS lifespan can be extended.
[0239] In this embodiment, a mathematical model for the ESS energy state is established, the ESS energy state is constrained within the limited values, the limited values of the energy states of both are given, deep discharge of the ESS is restricted, the ESS lifespan is extended, and the energy consumption of the charging pile is reduced.
[0240] Optionally, in S2, based on the electric energy state of the electric vehicle, a mathematical model for the initial and operating state energy states of the EV and EV constraints are established, including:
[0241] Based on the charging and discharging losses of the electric vehicle, the electric energy state of the electric vehicle is calculated, and the mathematical model for the initial and operating state energy states of the EV is expressed by the following formula:
[0242]
[0243] The following EV constraints are established to keep the electric energy state of the electric vehicle within the EV limited values:
[0244]
[0245] Wherein,
[0246] TA represents the arrival time of the electric vehicle,
[0247] TD represents the departure time of the electric vehicle,
[0248] P evdischt represents the discharge power of the electric vehicle during t, in kilowatts,
[0249] P evcht represents the charging power of the household electric vehicle during t, in kilowatts,
[0250] CE ev represents the charging efficiency of the electric vehicle,
[0251] SoE evt represents the energy consumption of the household electric vehicle during t, in kilowatt-hours,
[0252] SoE evmin represents the minimum energy consumption of the electric vehicle, in kilowatt-hours,
[0253] SoE evmaxRepresents the maximum energy consumption of the electric vehicle, in kilowatt-hours.
[0254] When t is not within the range from TA to TD, all variables in the mathematical model of the energy state of the EV in the initial and operating states are zero.
[0255] Specifically, Equations (5) and (6) establish a specific EV energy state model, and Equation (7) assumes that all variables outside the range from TA to TD are zero, preventing charging and discharging of the electric vehicle when it is not at home and reducing the energy consumption of the charging pile.
[0256] Optionally, after using the remaining electric energy of the household load for the ESS and the EV based on the mathematical model of the energy state of the ESS and the mathematical model of the energy state of the EV in the initial and operating states in S2, the remaining electric energy obtained from the demand response includes:
[0257] S2.1. Calculate the discharge power of the ESS according to the mathematical model of the energy state of the ESS and the ESS constraints;
[0258] S2.2. Calculate the discharge power of the electric vehicle according to the mathematical model of the energy state of the EV in the initial and operating states and the EV constraints;
[0259] S2.3. Calculate the ESS power P esst1 used by the household and the electric vehicle power P evt1 used by the household based on the following power balance:
[0260]
[0261] Wherein,
[0262] P1 represents the total electric energy purchased by the household during t, in kilowatts,
[0263] P pvt represents the available power of the photovoltaic power generation of the household during t, in kilowatts,
[0264] P evt1 represents the electric vehicle power used by the household during t, in kilowatts,
[0265] P esst1 The ESS power used by the household during t, in kilowatts,
[0266] P loadt represents the household load of the household during t, in kilowatts,
[0267] P evcht represents the electric vehicle charging power of the household during t, in kilowatts,
[0268] P esschtRepresents the ESS charging power of the household during period t, in kilowatts.
[0269] S2.4. Calculate the remaining electrical energy of the demand response according to the following formula:
[0270]
[0271] P2 = P esst2 +P evt2 (11)
[0272] Where
[0273] P2 represents the remaining electrical energy of the demand response,
[0274] P esst1 represents the ESS power used by the household during period t, in kilowatts,
[0275] P esst2 represents the remaining electrical energy of the ESS used by the household during period t, in kilowatts,
[0276] P essdischt represents the ESS discharge power of the household during period t, in kilowatts,
[0277] DE ess represents the ESS discharge efficiency of the household,
[0278] P evt1 represents the electric vehicle power used by the household during period t, in kilowatts,
[0279] P evt2 represents the remaining electrical energy of the electric vehicle used by the household during period t, in kilowatts,
[0280] P evdischt represents the discharge power of the electric vehicle during period t, in kilowatts,
[0281] DE ev represents the charging efficiency of the household's electric vehicle.
[0282] S3. Based on the constraint relationship between the purchased electrical energy and the sold electrical energy of the household, establish a purchased electrical energy and sold electrical energy model. Send the remaining electrical energy of the demand response into the P2P energy trading market based on the established purchased electrical energy and sold electrical energy model and the sensitivity parameter optimization model. The sensitivity parameter optimization model is used to determine the current electrical energy trading price.
[0283] Specifically, in S3, establishing the purchased electrical energy and sold electrical energy model includes:
[0284] Set the binary variable u gt , based on the binary variable u gtEstablish a model for purchased electricity and sold electricity. The purchased electricity is based on established, and the sold electricity is based on established;
[0285] Set the constraint ranges for the household purchase power and sales power of the purchased electricity and sold electricity model. The constraint ranges for the household purchase power and sales power are expressed by the following formula:
[0286]
[0287] where,
[0288] If the power grid supplies electricity during period t, then u gt takes the value of 1. If electricity is sold to the P2P energy trading market, then u gt takes the value of 0. The binary variable u gt is used to represent that the constraint relationship between household purchased electricity and sold electricity is that power grid buying and selling cannot be carried out simultaneously.
[0289] N1 represents the maximum power that can be purchased from the power grid, with the unit of kilowatt.
[0290] N2 represents the maximum power that can be sold to the P2P energy trading market, with the unit of kilowatt.
[0291] P1 represents the total electricity purchased by the household during period t, with the unit of kilowatt.
[0292] P2 represents the total electricity sold by the household during period t, that is, the remaining electricity from demand response, with the unit of kilowatt.
[0293] Specifically, in S3, the sensitivity parameter optimization model is expressed as follows:
[0294]
[0295] where,
[0296] λ pt represents the electricity trading price in the P2P market during time period t, with the unit of yuan per kilowatt-hour.
[0297] λ gt1 represents the price of purchasing energy from the power grid during period t, with the unit of yuan / kWh.
[0298] λ gt2 represents the price of purchasing energy from the P2P energy market during period t, with the unit of yuan per kilowatt-hour.
[0299] γ t represents the sensitivity parameter determined by the excess electricity.
[0300] P loadtDenote the household load of household n during period t in kilowatts.
[0301] P pvt Denote the available power of the photovoltaic power generation of the household during period t in kilowatts.
[0302] In Equation (14), when P loadt rises, the price rises; when P pvt rises, the price falls. The total remaining electric energy of the household is sold at this transaction price. When there is no transaction for prosumers, the electricity purchase price increases, and the P2P electricity transaction price also increases.
[0303] Optionally, the present invention introduces a sensitivity parameter γ determined by the excess electric energy t to achieve pricing. γ t is determined according to the minimum value of the total bills provided in each transaction value. The sensitivity parameter is calculated according to the following formula:
[0304] γ t = min{λ p(t-1),i , i ∈ n} (15)
[0305] where
[0306] γ t denotes the sensitivity parameter during period t.
[0307] λ p(t-1),i denotes the electricity transaction price of the i-th time in the P2P transaction market during period t - 1;
[0308] n denotes the number of P2P electricity transactions during period t - 1.
[0309] Optionally, the sensitivity parameter is calculated according to the following formula:
[0310]
[0311] where
[0312] γ t denotes the sensitivity parameter during period t.
[0313] λ p(t-1),i denotes the electricity transaction price of the i-th time in the P2P transaction market during period t - 1;
[0314] n denotes the number of P2P electricity transactions during period t - 1.
[0315] w i denotes the weight coefficient of the i-th electricity transaction.
[0316] In this embodiment, calculating the trading price in period t based on the trading price in period t-1 can facilitate subsequent adjustment of the demand response strategy according to market demand, and achieve a more flexible production and sales model.
[0317] Embodiment 2 of the present invention provides a demand response system that operates according to the method described in Embodiment 1. The system includes:
[0318] A first calculation module, configured to select the lowest electricity price from the grid electricity price and the electricity price in the peer-to-peer (P2P) energy trading market as the electricity trading price, purchase electricity according to the electricity trading price, and use the purchased electricity and the electricity generated by the household's own power generation for household loads;
[0319] A first establishment module, configured to establish a mathematical model of the energy state of the household energy storage system (ESS) and ESS constraints based on the ESS life;
[0320] A second establishment module, configured to establish a mathematical model of the energy state of the initial and operating states of the electric vehicle (EV) and EV constraints based on the electricity state of the EV;
[0321] A second calculation module, configured to obtain the remaining electricity of the demand response after using the remaining electricity of the household load for the ESS and the EV based on the mathematical model of the ESS energy state and the mathematical models of the initial and operating states of the EV;
[0322] A third establishment module, configured to establish a model of the purchased electricity and the sold electricity based on the constraint relationship between the purchased electricity and the sold electricity of the household;
[0323] A fourth establishment module, configured to establish a sensitivity parameter optimization model for determining the current electricity trading price;
[0324] A transmission module, configured to send the remaining electricity of the demand response into the P2P energy trading market based on the established model of the purchased electricity and the sold electricity and the sensitivity parameter optimization model.
[0325] Regarding the system in the above embodiments, the specific manner in which each unit performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0326] Embodiment 3 of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements the method described in Embodiment 1.
[0327] Embodiment 4 of the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it implements the method described in Embodiment 1.
[0328] Compared with the prior art, the beneficial effects of the present invention at least include:
[0329] 1) P2P electricity trading eliminates the participation of third-party intermediaries in traditional energy trading, such as electricity suppliers or grid operators, and enables direct trading between producers and consumers. This decentralized feature reduces transaction costs and improves the flexibility and efficiency of trading. Since P2P energy trading allows producers and consumers to directly negotiate trading conditions, including price, quantity, and time, etc., it can better meet the needs of both parties and improve the efficiency of the energy market.
[0330] 2) It reduces intermediate links and avoids intermediary fees and other additional fees that may occur in traditional energy trading, thus reducing transaction costs. P2P energy trading provides a more convenient market access for distributed energy systems. Electricity generated by distributed energy systems such as solar photovoltaic panels and wind turbines can be directly sold to consumers through the P2P platform, thus stimulating more people's enthusiasm for investing in and using distributed energy and promoting the development of distributed energy.
[0331] 3) The present invention takes into account the impacts of ESS and EV on households in peer-to-peer energy trading, prevents deep charging of ESS, extends the battery life of ESS, and conducts real-time monitoring of EV to reduce energy consumption.
[0332] 4) It allows consumers to select appropriate energy suppliers and trading conditions according to their own needs to meet personalized requirements. At the same time, producers can also adjust production plans and sales strategies according to market demands to achieve a more flexible production and sales model.
[0333] Those skilled in the art should understand that the embodiments of the present application can provide a new method for energy trading. Therefore, the present application can adopt the form of a completely software embodiment or a form combining software and hardware embodiments.
[0334] The present disclosure can be a system, a method, and / or a computer program product. The computer program product can include a computer-readable storage medium having computer-readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
[0335] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punched card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as being a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0336] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to respective computing / processing devices, or can be downloaded to an external computer or an external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include a copper transmission cable, an optical fiber transmission, a wireless transmission, a router, a firewall, a switch, a gateway computer, and / or an edge server. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0337] Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.
[0338] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent substitutions can still be made to the specific embodiments of the present invention. Any modification or equivalent substitution without departing from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.
Claims
1. A demand response method, characterized in that, Including: Select the lowest electricity price from the grid electricity price and the electricity price in the peer-to-peer (P2P) energy trading market as the electricity trading price, purchase electricity according to the electricity trading price, and use the purchased electricity and the electricity generated by the household's own power generation for household loads; Based on the energy storage life, establish a mathematical model of the energy state of the household energy storage system (ESS) and ESS constraints, based on the state of charge of the electric vehicle, establish a mathematical model of the initial and operating state energy state of the electric vehicle (EV) and EV constraints, and after using the remaining electricity of the household load for the ESS and EV based on the mathematical model of the ESS energy state and the mathematical model of the initial and operating state energy state of the EV, obtain the remaining electricity of the demand response; Based on the constraint relationship between the electricity purchased and sold by the household, establish a model of the electricity purchased and sold, and send the remaining electricity of the demand response into the P2P energy trading market based on the established model of the electricity purchased and sold and the sensitivity parameter optimization model, where the sensitivity parameter optimization model is used to determine the current electricity trading price.
2. The demand response method according to claim 1, wherein: Based on the energy storage life, establish a mathematical model of the energy state of the household ESS and ESS constraints, including: Establish a mathematical model of the energy state of the household ESS according to the following formula: Based on the energy storage life, establish the following ESS constraints to keep the energy state of the ESS within the ESS limit value: Wherein, P esscht represents the ESS charging power of the household during period t, in kilowatts, P essdischt represents the ESS discharge power of the household during period t, in kilowatts, SoE esst represents the ESS energy state of the household during period t, in kilowatt-hours, CE ess Indicates the charging efficiency of the ESS for household use SoE ess0 Indicates the initial energy consumption state of the home ESS, in kilowatt-hours SoE essmin Indicates the minimum energy consumption state of the home ESS, in kWh SoE essmax Indicates the maximum energy consumption state of the home ESS, in kilowatt-hours, ΔT represents the usage duration of the ESS.
3. The demand response method according to claim 1, wherein: Based on the state of charge of the electric vehicle, establish a mathematical model of the initial and operating state energy state of the electric vehicle EV and EV constraints, including: Calculate the state of charge of the electric vehicle based on the charge and discharge loss of the electric vehicle, and the mathematical model of the initial and operating state energy state of the EV is expressed as follows: Establish the following EV constraints to keep the state of charge of the electric vehicle within the EV limit value: Wherein, TA represents the arrival time of the electric vehicle, TD represents the departure time of the electric vehicle, P evdischt represents the discharge power of the electric vehicle during period t, with the unit of kilowatt, P evcht represents the charging power of the household electric vehicle during the period t, with the unit of kilowatt CE ev represents the charging efficiency of an electric vehicle SoE evt represents the electric vehicle energy consumption of the household during period t, in kilowatt-hours SoE evmin represents the minimum energy consumption of an electric vehicle, in kilowatt-hours SoE evmax Represents the maximum energy consumption of an electric vehicle, in kilowatt-hours When t is not within the range from TA to TD, all variables in the mathematical model of the initial and operating state energy state of the EV are zero.
4. The demand response method according to claim 1, wherein: After using the remaining electricity of the household load for the ESS and EV based on the mathematical model of the ESS energy state and the mathematical model of the initial and operating state energy state of the EV, obtain the remaining electricity of the demand response, including: Calculate the discharge power of the ESS according to the mathematical model of the ESS energy state and the ESS constraints; Calculate the discharge power of the electric vehicle according to the mathematical model of the initial and operating state energy state of the EV and the EV constraints; The ESS power P used by the household is calculated based on the following power balance esst1 and the electric vehicle power P used evt1 : Wherein, P1 represents the total electricity purchased by the household during t, in kilowatts, P pvt represents the available power of the household's photovoltaic power generation during period t, with the unit of kilowatt. P evt1 represents the electric vehicle power used by the household during period t, in kilowatts, P esst1 The ESS power used by the household during period t, in kilowatts, P loadt represents the household load of the family during period t, in kilowatts, P evcht represents the electric vehicle charging power of the household during period t, in kilowatts, P esscht represents the ESS charging power of the household during period t, in kilowatts; Calculate the remaining electricity of the demand response according to the following formula: Wherein, P2 represents the remaining electricity of the demand response, P esst1 represents the ESS power used by the household during period t, in kilowatts, P esst2 represents the remaining electrical energy used by the household for ESS during period t, in kilowatts P essdischt represents the ESS discharge power of the household during period t, in kilowatts, DE ess Indicates the ESS discharge efficiency of the household P evt1 represents the electric vehicle power used by the household during period t, in kilowatts, P evt2 represents the remaining electric energy used by the household electric vehicle during the period t, in kilowatts P evdischt represents the discharge power of the electric vehicle during period t, with the unit of kilowatt, DE ev Indicates the charging efficiency of an electric vehicle for a household.
5. The demand response method according to claim 1, wherein: Establishing a model of the electricity purchased and sold includes: Set the binary variable u gt , and based on the binary variable u gt , establish a model for purchased electric energy and sold electric energy. The purchased electric energy is established based on , and the sold electric energy is established based on ; Set the constraint range of the household purchase power and sales power of the model of the electricity purchased and sold, and the constraint range of the household purchase power and sales power is expressed as follows: Wherein, If the power is supplied by the power grid during period t, then u gt takes the value of 1. If electrical energy is sold to the P2P energy trading market, then u gt takes the value of 0. The binary variable u gt is used to represent the constraint relationship between the electrical energy purchased and sold by the household, that is, the grid purchase and sale cannot be carried out simultaneously. N1 represents the maximum power that can be purchased from the power grid, in kilowatts. N2 represents the maximum power that can be sold to the P2P energy trading market, in kilowatts. P1 represents the total electrical energy purchased by the household during period t, in kilowatts. P2 represents the total electrical energy sold by the household during period t, that is, the remaining electrical energy from demand response, in kilowatts.
6. The demand response method according to claim 1, wherein: The sensitivity parameter optimization model is expressed as follows: Wherein, λ pt represents the electricity trading price in the P2P market during time t, in yuan per kilowatt-hour λ gt1 represents the price of purchasing energy from the power grid during period t, in yuan per kilowatt-hour λ gt2 represents the price of purchasing energy from the P2P energy market during period t, in yuan per kilowatt-hour γ t represents the sensitivity parameter determined by the excess electric energy P loadt represents the household load of household n during period t, in kilowatts, P pvt Indicates the available power of the household's photovoltaic power generation during period t, with the unit of kilowatt.
7. The demand response method according to claim 6, wherein: The sensitivity parameter is calculated according to the following formula: Wherein, γ t represents the sensitivity parameter during period t λ p(t-1),i represents the electricity price of the i-th electricity transaction in the P2P trading market during the period t-1; n represents the number of P2P electricity trading times during t-1. w i Represents the weight coefficient of the i-th electricity energy transaction.
8. A demand response system using the demand response method according to any one of claims 1-7, characterized in that, including: The first calculation module is used to select the lowest electricity price between the grid electricity price and the electricity price in the peer-to-peer P2P energy trading market as the electricity trading price, purchase electricity according to the electricity trading price, and use the purchased electricity and the electricity generated by the household's own power generation for household loads. The first establishment module is used to establish a mathematical model of the household ESS energy state and ESS constraints based on the energy storage life. The second establishment module is used to establish a mathematical model of the EV initial and operating state energy states and EV constraints based on the electric vehicle's electricity state. The second calculation module is used to obtain the remaining electricity from demand response after using the remaining electricity of the household load for the ESS and EV based on the mathematical model of the ESS energy state and the mathematical models of the EV initial and operating state energy states. The third establishment module is used to establish a model of the purchased electricity and the sold electricity based on the constraint relationship between the household's purchased electricity and the sold electricity. The fourth establishment module is used to establish a sensitivity parameter optimization model, and the sensitivity parameter optimization model is used to determine the current electricity trading price. The transmission module is used to send the remaining electricity from demand response into the P2P energy trading market based on the established model of the purchased electricity and the sold electricity and the sensitivity parameter optimization model.
9. The demand response system according to claim 8, wherein: When the first establishment module is used to establish a mathematical model of the household ESS energy state and ESS constraints based on the energy storage life, it includes: Establish a mathematical model of the household ESS energy state according to the following formula: Consider the energy storage life and establish the following ESS constraints to make the energy state of the ESS within the ESS limit value: Wherein, P esscht represents the ESS charging power of the household during period t, in kilowatts, P essdischt represents the ESS discharge power of the household during period t, in kilowatts, SoE esst Indicates the ESS energy state of the household during period t, in kilowatt-hours, CE ess Indicates the charging efficiency of the ESS for home use SoE ess0 Indicates the initial energy consumption state of the home ESS, in kWh SoE essmin Indicates the minimum energy consumption state of the household ESS, in kilowatt-hours SoE essmax Indicates the maximum energy consumption state of the home ESS, in kilowatt-hours ΔT represents the ESS usage duration.
10. The demand response system according to claim 8, wherein: When the second establishment module is used to establish a mathematical model of the EV initial and operating state energy states and EV constraints based on the electric vehicle's electricity state, it includes: Calculate the electric vehicle's electricity state based on the charge and discharge loss of the electric vehicle, and the mathematical model of the EV initial and operating state energy states is expressed as follows: Establish the following EV constraints to make the electric vehicle's electricity state within the EV limit value: Wherein, TA represents the arrival time of the electric vehicle. TD represents the departure time of the electric vehicle. P evdischt represents the discharge power of the electric vehicle during period t, in kilowatts P evcht represents the charging power of the household electric vehicle during period t, in kilowatts, CE ev represents the charging efficiency of an electric vehicle SoE evt represents the electric vehicle energy consumption of the household during period t, in kilowatt-hours SoE evmin Indicates the minimum energy consumption of an electric vehicle, in kilowatt-hours SoE evmax represents the maximum energy consumption of an electric vehicle, in kilowatt-hours When t is not within the range from TA to TD, all variables in the mathematical model of the EV initial and operating state energy states are zero.
11. The demand response system according to claim 8, wherein: When the second calculation module is used to obtain the remaining electric energy of demand response after using the remaining electric energy of household load for ESS and EV based on the ESS energy state mathematical model and the EV initial and operating state energy state mathematical models, it includes: Calculating the discharge power of the ESS according to the ESS energy state mathematical model and the ESS constraint; Calculating the discharge power of the electric vehicle according to the EV initial and operating state energy state mathematical model and the EV constraint; The ESS power P used by the household is calculated based on the following power balance esst1 and the electric vehicle power P used evt1 : Wherein, P1 represents the total electric energy purchased by the household during t, in kilowatts, P pvt represents the available power of the household's photovoltaic power generation during period t, in kilowatts P evt1 represents the electric vehicle power used by the household during period t, in kilowatts, P esst1 The ESS power used by the household during period t, in kilowatts, P loadt represents the household load of the family during period t, in kilowatts, P evcht represents the electric vehicle charging power of a household during period t, in kilowatts, P esscht represents the ESS charging power of the household during period t, in kilowatts; The remaining electric energy of demand response is calculated according to the following formula: P2 = P esst2 + P evt2 Wherein, P2 represents the remaining electric energy of demand response, P esst1 represents the ESS power used by the household during period t, in kilowatts, P esst2 represents the remaining electrical energy used by the household for ESS during period t, in kilowatts P essdischt represents the ESS discharge power of the household during period t, in kilowatts, DE ess Indicates the ESS discharge efficiency of the household P evt1 represents the electric vehicle power used by the household during period t, in kilowatts, P evt2 represents the remaining electric energy used by the household electric vehicle during period t, in kilowatts, P evdischt represents the discharge power of the electric vehicle during period t, in kilowatts, DE ev represents the charging efficiency of the household electric vehicle.
12. The demand response system according to claim 8, wherein: When the third establishment module is used to establish the purchased electric energy and sold electric energy model based on the constraint relationship between the purchased electric energy and sold electric energy of the household, it includes: Set the binary variable u gt , and based on the binary variable u gt establish a model for purchased electricity and sold electricity. The purchased electricity is established based on , and the sold electricity is established based on ; Setting the constraint ranges of the household purchase power and sales power of the purchased electric energy and sold electric energy model, and the constraint ranges of the household purchase power and sales power are expressed by the following formula: Wherein, If the power grid supplies power during period t, then u gt takes the value of 1. If electrical energy is sold to the P2P energy trading market, then u gt takes the value of 0. The binary variable u gt is used to represent the constraint relationship between the electrical energy purchased and sold by the household, that is, buying and selling from the power grid cannot be carried out simultaneously. N1 represents the maximum power that can be purchased from the power grid, in kilowatts, N2 represents the maximum power that can be sold to the P2P energy trading market, in kilowatts, P1 represents the total electric energy purchased by the household during t, in kilowatts, P2 represents the total electric energy sold by the household during t, that is, the remaining electric energy of demand response, in kilowatts.
13. The demand response system according to claim 8, wherein: When the fourth establishment module is used to establish the sensitivity parameter optimization model, it includes: The sensitivity parameter optimization model is expressed as follows: Wherein, λ pt represents the electricity trading price in the P2P market during time t, with the unit of yuan per kilowatt-hour λ gt1 represents the price of purchasing energy from the power grid during period t, in yuan per kilowatt-hour λ gt2 represents the price of purchasing energy from the P2P energy market during period t, in yuan per kilowatt-hour, γ t represents the sensitivity parameter determined by the excess electric energy P loadt represents the household load of household n during period t, in kilowatts, P pvt Indicates the available power of the household's photovoltaic power generation during period t, in kilowatts.
14. The demand response system according to claim 13, wherein: When the fourth establishment module is used to establish the sensitivity parameter optimization model, the sensitivity parameter is calculated according to the following formula: Wherein, γ t represents the sensitivity parameter during period t λ p(t-1),i represents the electricity price of the i-th electricity transaction in the P2P trading market during the period t - 1; n represents the number of P2P electric energy trading times during t-1, w i Represents the weight coefficient of the i-th electricity energy transaction.
15. An electronic device, including a processor and a storage medium; wherein: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the demand response method according to any one of claims 1-7.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it realizes the steps of the demand response method according to any one of claims 1-7.