Resident demand response optimization method based on multi-agent deep reinforcement learning
Through the multi-agent deep reinforcement learning method, some of the considerable Markov game models are established, and the agent strategy is trained, which solves the demand response and dimensional disaster problems of multivariate heterogeneous user equipment, and achieves efficient energy management and improved distribution network stability.
Patent Information
- Application Number
- CN202411158497.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-29
AI Technical Summary
The existing technology is difficult to effectively respond to the demand response problem of multivariate heterogeneous user equipment, and is prone to dimensional disasters. Traditional model-based methods are difficult to accurately model and optimize, and cannot make full use of the power reserves of distributed energy and energy storage equipment.
Adopting the residents' demand response optimization method based on deep reinforcement learning of multi-agents, by establishing a partially visible Markov game model, using multi-agent deep deterministic strategy gradient algorithm to train the agent strategy, generate an optimized power consumption decision solution, combined with long-term Short-term memory neural network processes uncertain feature data, introduces a penalty mechanism to avoid load peaks, and adopts an actuator-commentator structure for strategy optimization.
Effectively solve the problem of dimensional disasters, optimize the demand response of multivariate heterogeneous user equipment, realize efficient energy management, reduce user electricity costs, improve distribution network operation efficiency and stability, promote the utilization of distributed energy and energy storage equipment, and improve User electricity experience and satisfaction.
Smart Images

Figure CN119047774A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system planning, and more specifically, to a resident demand response optimization method based on multi-agent deep reinforcement learning. Background Art
[0002] With the increase in the penetration rate of distributed energy resources (DER) and the development of technologies such as big data, the Internet of Things, mobile communications, and smart metering, the flexibility and controllability of loads have been greatly improved, and users can actively manage their own electricity consumption and interact with the power grid in real time. However, the inherent intermittent nature of DER and the large-scale growth of electricity loads have brought new challenges to the safe and stable operation of distribution networks, which are specifically manifested in problems such as load spikes, network congestion, and node voltage offsets. To this end, it is urgent to develop active distribution network operation and control measures to effectively adjust the load curve and mobilize its flexibility.
[0003] Demand response technology has become a key measure to support the stable and efficient operation of distribution networks. Price-based demand response is a common form. From the user's perspective, it adjusts power consumption or shifts power consumption time periods while meeting the comfort level of electricity consumption, which is conducive to reducing electricity costs; from the perspective of the distribution network, it helps to better tap the flexibility of electricity consumption on the user side and alleviate the contradiction between power supply and consumption. Early research focused on one-way demand response technology and power load transfer strategies. Such scheduling strategies are conducive to reducing load peaks, alleviating power supply pressure on the power system, and reducing user electricity costs. However, one-way demand response technology is mainly used to shift electricity demand during peak periods, and cannot fully mobilize the power reserves of electric vehicles, energy storage and other equipment to provide power support for the power system.
[0004] With the popularization of DER, distributed energy storage, and electric vehicle bidirectional charging and discharging technology, it is increasingly important to conduct in-depth research on the practical application of bidirectional demand response. By making full use of the dynamic electricity price mechanism and guiding users to charge and discharge at appropriate time periods, high-quality energy management can be achieved. In addition, the development of smart metering and communication technology enables the power system to respond to demand in real time, further improving the load-side response potential and distribution network operation efficiency.
[0005] However, it is difficult to accurately model residential electrical equipment using traditional model-based methods for demand response strategy optimization and energy management, and the uncertainty of parameters such as DER output and electricity price is strong, which limits the optimization performance of the model-based approach. If a scenario-based stochastic programming method is used to deal with uncertainty, there may be a large difference between the assumed probability distribution and the actual distribution, resulting in inaccurate solution results. In order to overcome the dependence on the construction of a comprehensive and accurate model, the model-free idea and self-optimizing strategy learning method of deep reinforcement learning (DRL) can be used. The advantage of the model-free method is that it does not require any prior knowledge of the system, and the intelligent agent learns strategies by interacting with the environment to maximize the return. In recent years, DRL has been widely used in decision-making and control under uncertain scenarios, and has achieved initial application in the field of power system demand response.
[0006] However, single-agent DRL needs to deal with high-dimensional continuous actions and state variables, which easily leads to the curse of dimensionality problem. Therefore, there is a need for multi-agent deep reinforcement learning (MADRL). However, the relevant technology is still in the initial and exploratory stage. The existing methods are difficult to deal with multiple heterogeneous user devices and are prone to the curse of dimensionality problem.
[0007] In summary, there is an urgent need to develop a resident online demand response optimization technology based on model-free MADRL, aiming to overcome the problems of traditional model-based solution dependence on precise modeling and low scalability, as well as the problem that the existing DRL method cannot cope with multiple heterogeneous user devices and is prone to dimensionality disasters. Summary of the invention
[0008] In order to overcome the problems of traditional model-based solving relying on precise modeling and low scalability, as well as the problem that the existing DRL method cannot cope with multiple heterogeneous user devices and is prone to the curse of dimensionality, the present invention provides a resident demand response optimization method based on multi-agent deep reinforcement learning.
[0009] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0010] A resident demand response optimization method based on multi-agent deep reinforcement learning includes the following steps:
[0011] Taking each resident as an intelligent agent, a partially observable Markov game model is established for the demand response behavior of the resident intelligent agent;
[0012] Use the multi-agent deep deterministic policy gradient algorithm to train and optimize the agent's strategy;
[0013] The trained intelligent agent strategy is applied to the resident demand response system to generate optimized electricity decision-making plans based on real-time electricity price information and residents' electricity demand.
[0014] Furthermore, the online optimization problem of residential load demand response is modeled as a partially observable Markov game model, consisting of a state set S, an action set of N agents {A 1:N}, state transition function and reward function R of each agent N composition;
[0015] Define the observation quantity of agent n as o n , the goal of each agent is to learn the strategy π n , so that the cumulative discount reward maximum,
[0016] Wherein, the discount rate γ∈[0,1) is used to balance short-term and long-term returns; T is the total number of demand response periods.
[0017] Furthermore, the observation amount o of agent n in time period t n,t Including time t, real-time electricity price every 5 minutes in the past 24 hours Electricity price Photovoltaic power generation Uncontrollable load power And the operating status of all user-side devices at time t.
[0018] Furthermore, a long short-term memory neural network is used to take the uncertainty feature data of the past 24 hours as the original input, extract the time series correlation features, and assist the intelligent agent in decision-making, so as to improve the strategy's ability to cope with multi-source uncertainty.
[0019] Furthermore, the action a of agent n in time period t n,t include Its value indicates the ratio of the actual power of the equipment to its maximum rated power.
[0020] Among them, when the power of an electric vehicle is a positive value, it indicates charging, and when it is a negative value, it indicates discharging.
[0021] Furthermore, a penalty item related to travel demand is added to ensure that the user's electric vehicle travel plan is not disturbed by demand response behavior, as shown in Formula 1;
[0022]
[0023] In the above formula, k1 is the penalty factor, The minimum amount of electricity required for users to travel;
[0024] Add a reward correction mechanism, that is, add a penalty item for the part exceeding the original peak value to avoid the generation of a new load peak, as shown in Formula 2;
[0025]
[0026] Among them, κ2 is the penalty factor, P pk is the load peak value of the original load curve;
[0027] Therefore, the modified reward function is shown in Equation 3:
[0028]
[0029] Among them, the basic reward function It is the negative value of the user’s total electricity cost.
[0030] Furthermore, the multi-agent deep deterministic policy gradient algorithm adopts an actuator-judge structure;
[0031] Among them, the critic network is denoted as Q θ , with state s t and action a t As input, the Q function estimates the value Q θ (s t ,a t ) is the output, responsible for judging the pros and cons of the current strategy;
[0032] The actor network is denoted as μ φ , with state st as input and action μ φ (s t ) is the output, which is responsible for improving the agent’s strategy based on the Q value given by the critic network.
[0033] Furthermore, the training goal of the multi-agent deep deterministic policy gradient algorithm is to make the performance function According to performance gradient direction is maximized, where ρ μ The distribution is for discount status.
[0034] Furthermore, according to the deterministic policy gradient theory, the performance gradient of the policy is:
[0035]
[0036] The performance gradient of each agent is expressed as:
[0037]
[0038] The multi-agent joint Q-value function of resident n is approximately:
[0039] Q θ (o1,t ,…,o N,t ,a 1,t ,…,a N,t )≈Q θ (o n,t ,a n,t ,L n,t ,D n,t ) (6)
[0040] Where, L n,t and D n,t Respectively represent the total electricity consumption and total discharge of all residents other than resident n; after approximation (o n,t ,a n,t ,ψ n,t ,ξ n,t ) is a low-dimensional vector, replacing the original high-dimensional observation value and action value vector (o 1,t ,…,o N,t ,a 1,t ,…,a N,t ), used to improve learning efficiency and avoid the curse of dimensionality;
[0041] At the same time, an experience replay pool mechanism is introduced to randomly extract small batches of samples for training at each step, mix the newly generated samples with the past samples, and weaken the temporal correlation between samples.
[0042] Furthermore, the definitions and mathematical expressions of the observations o, actions a, and rewards r of each resident agent are consistent and can be stored as interactive experience in a consistent format;
[0043] The experience generated by agent n in the interaction with the environment during period t is (o n,t ,a n,t ,r n,t ,o n,t+1 ,L n,t ,D n,t ,L n,t+1 ,D n,t+1 ) and put them into the experience replay pool to improve learning efficiency;
[0044] Then, the time series difference error of the training data is calculated, the data priority is sorted, and the probability of sampling experience j is defined as The expression is:
[0045]
[0046] In the formula, parameter β represents the priority of sampling. is the priority associated with experience (n,j), For experience pool According to the absolute timing differential error The order of (n,j) when sorting;
[0047] The definition is shown in formula 8:
[0048]
[0049] In the formula, Q θ′ (·) is the target critic;
[0050] The critic network loss function can be described as the weighted mean square temporal difference error of small samples NJ:
[0051]
[0052] In the formula, is the importance sampling weight;
[0053] The policy gradient for updating the actor network is:
[0054]
[0055] The present invention provides a method for optimizing resident demand response based on multi-agent deep reinforcement learning, establishes a resident demand response optimization framework, describes the problem as a partially observable Markov game model, and proposes a MADDPG algorithm for training and solving. Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0056] 1. Effectively deal with high-dimensional problems: Single-agent deep reinforcement learning is prone to cause the problem of dimensionality curse when dealing with high-dimensional continuous actions and state variables; this invention decomposes complex high-dimensional problems through multi-agent collaborative learning, making the learning process more efficient and solving the problem of dimensionality curse;
[0057] 2. Optimizing the demand response of multiple heterogeneous user devices: Existing DRL methods are difficult to deal with the demand response problem of multiple heterogeneous user devices; the present invention adopts a multi-agent deep deterministic policy gradient algorithm, which can better handle the response requirements of different types of user devices and achieve more refined and efficient demand response optimization;
[0058] 3. Efficient energy management under dynamic electricity price mechanism: The present invention makes full use of the dynamic electricity price mechanism to guide users to charge and discharge in appropriate time periods, achieve high-quality energy management, reduce users' electricity costs, and improve the load balance and stability of the power grid;
[0059] 4. Improve the operating efficiency of the distribution network: Through real-time demand response optimization, the present invention can effectively alleviate problems such as load peaks, network congestion and node voltage offset, and improve the operating efficiency and stability of the distribution network;
[0060] 5. Promote the utilization of distributed energy and energy storage equipment: The two-way demand response optimization technology of the present invention can fully mobilize the power reserves of electric vehicles, energy storage and other equipment, provide effective power support for the power system, and promote the efficient utilization of distributed energy and energy storage equipment;
[0061] 6. Improve user experience and satisfaction: Under the premise of satisfying the user's comfort level, the present invention reduces the user's electricity cost and improves the user's experience and satisfaction by optimizing the electricity decision-making scheme;
[0062] 7. Enhance the intelligence level of the demand response system: By adopting advanced multi-agent deep reinforcement learning algorithms, the present invention improves the intelligence level of the demand response system, enabling the system to better cope with complex and changeable electricity consumption environments and demands, and has higher decision-making efficiency and effectiveness. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 A flowchart of a resident demand response optimization method based on multi-agent deep reinforcement learning of the present invention;
[0065] Figure 2 A management framework diagram for residents’ demand side;
[0066] Figure 3 This is the execution framework diagram of the MADDPG algorithm;
[0067] Figure 4 It is a curve showing the change of residents' daily average electricity cost with training algebra;
[0068] Figure 5 Schematic diagram of the aggregate charging and discharging power of all residents' smart devices. DETAILED DESCRIPTION
[0069] In order to better understand the purpose, structure and function of the present invention, the technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific preferred embodiments.
[0070] In the description of the present invention, it should be understood that the terms "left side", "right side", "upper part", "lower part", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. "First", "second", etc. do not indicate the importance of the parts, and therefore cannot be understood as a limitation on the present invention. The specific dimensions used in the embodiments are only for illustrating the technical solution and do not limit the scope of protection of the present invention. It is understandable to those skilled in the art that some well-known structures and their descriptions in the drawings may be omitted.
[0071] Unless otherwise clearly specified and limited, the terms "install", "set", "connect", "fix" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0072] Embodiment 1:
[0073] like Figure 1 As shown, the present invention provides a technical solution:
[0074] A resident demand response optimization method based on multi-agent deep reinforcement learning includes the following steps:
[0075] Taking each resident as an intelligent agent, a partially observable Markov game model is established for the demand response behavior of the resident intelligent agent;
[0076] Use the multi-agent deep deterministic policy gradient algorithm to train and optimize the agent's strategy;
[0077] The trained intelligent agent strategy is applied to the resident demand response system to generate optimized electricity decision-making plans based on real-time electricity price information and residents' electricity demand.
[0078] Embodiment 2:
[0079] Based on Example 1, the online optimization problem of residential load demand response is modeled as a partially observable Markov game model, consisting of a state set S, an action set of N agents {A 1:N}, state transition function and reward function R of each agent N composition;
[0080] Define the observation quantity of agent n as o n , the goal of each agent is to learn the strategy πn , so that the cumulative discount reward maximum,
[0081] Wherein, the discount rate γ∈[0,1) is used to balance short-term and long-term returns; T is the total number of demand response periods.
[0082] Furthermore, the partially observable Markov game model consists of observations, actions, and reward functions. The meaning of each part is explained in detail as follows:
[0083] (1) Observation quantity
[0084] The observation o of agent n at time period t n,t Including time t, real-time electricity price every 5 minutes in the past 24 hours Electricity price Photovoltaic power generation Uncontrollable load power And the operating status of all user-side devices at time t (two-dimensional status array).
[0085] Furthermore, due to the different operating characteristics of each device, the agent's perception information is complex and diversified, forming a high-dimensional state space. Among the observations, the operating state of the equipment represented by the two-dimensional array is directly affected by the action. Although factors such as photovoltaic output, uncontrollable load power, and electricity prices are not affected by the action, they are highly uncertain and volatile, and have a great impact on the decision-making optimization of the agent. To this end, based on the idea of deep learning, this paper does not rely on precise modeling and prior knowledge of model parameters. It uses a long short-term memory (LSTM) neural network to take the uncertainty feature data of the past 24 hours as the original input, extract its time series correlation features, assist the agent's decision-making, and improve the strategy's ability to cope with multi-source uncertainty.
[0086] (2) Action
[0087] The action a of agent n in time period t n,t include The value indicates the ratio of the actual power of the equipment to its maximum rated power.
[0088] Among them, when the electric vehicle power is positive, it means charging, and when it is negative, it means discharging.
[0089] (3) Reward Function
[0090] Add a penalty item related to travel demand to ensure that the user's electric vehicle travel plan is not disturbed by demand response behavior, as shown in Formula 1;
[0091]
[0092] In the above formula, κ1 is the penalty factor, The minimum amount of electricity required for users to travel;
[0093] Since the optimization goal of user demand response is to minimize the total electricity cost, it is easy to cause a large number of users to choose to respond at the same time, that is, to use the transferable load when the electricity purchase price is the lowest, and to discharge electric vehicles when the electricity sales price is high, which may lead to new load peaks and affect the safe and stable operation of the distribution network;
[0094] A reward correction mechanism is further added, that is, a penalty item is added for the part exceeding the original peak value to avoid the generation of a new load peak, as shown in Formula 2;
[0095]
[0096] Among them, κ2 is the penalty factor, P pk is the load peak value of the original load curve;
[0097] Therefore, the modified reward function is shown in Equation 3:
[0098]
[0099] Among them, the basic reward function It is the negative value of the user’s total electricity cost.
[0100] Embodiment 3:
[0101] Based on Example 1, the multi-agent deep deterministic policy gradient algorithm adopts an actor-critic (AC) structure;
[0102] Among them, the critic network is denoted as Q θ , with state s t and action a t As input, the Q function estimates the value Q θ (s t ,a t ) is the output, responsible for judging the pros and cons of the current strategy;
[0103] The actor network is denoted as μ φ , with state st as input and action μ φ (s t ) is the output, which is responsible for improving the agent’s strategy based on the Q value given by the critic network.
[0104] Furthermore, the learning goal of the multi-agent deep deterministic policy gradient algorithm is to make the performance function According to performance gradient direction is maximized, where ρ μ The distribution is for discount status.
[0105] Furthermore, according to the deterministic policy gradient theory, the performance gradient of the policy is:
[0106]
[0107] The performance gradient of each agent is expressed as:
[0108]
[0109] If the online optimization problem of residential demand response is trained in a centralized manner, that is, the load aggregator / agent is used as a single intelligent agent for learning, the input dimension of the intelligent agent will increase exponentially with the action, state dimension and the number of residential loads, causing dimensional disaster. Therefore, the function of the residential load aggregator in this paper is mainly information interaction. On the one hand, it issues demand response related information to residents, and on the other hand, it collects the operating status of residents' smart loads. The specific electricity consumption actions of residents are learned by their respective intelligent agents.
[0110] The multi-agent joint Q-value function of resident n is approximately:
[0111] Q θ (o 1,t ,…,o N,t ,a 1,t ,…,a N,t )≈Q θ (o n,t ,a n,t ,L n,t ,D n,t ) (6)
[0112] Where, L n,t and D n,t Respectively represent the total electricity consumption and total discharge of all residents other than resident n; after approximation (o n,t ,a n,t ,ψ n,t ,ξ n,t ) is a low-dimensional vector, replacing the original high-dimensional observation value and action value vector (o 1,t ,…,o N,t ,a 1,t ,…,a N,t ), used to improve learning efficiency and avoid the curse of dimensionality;
[0113] At the same time, the experience replay pool mechanism is introduced to randomly extract small batches of samples for training at each step, which can mix the newly generated samples with the past samples and weaken the temporal correlation between samples.
[0114] Furthermore, from the definitions of the resident load model and the Markov game model, it can be seen that the definitions and mathematical expressions of the observations o, actions a, and rewards r of each resident agent are consistent and can be stored as interactive experience in a consistent format;
[0115] The experience generated by agent n in the interaction with the environment during period t is (o n,t ,a n,t ,r n,t ,o n,t+1 ,L n,t ,D n,t ,L n,t+1 ,D n,t+1 ), can be put into the experience replay pool to improve learning efficiency;
[0116] Then, the time series difference error of the training data is calculated, the data priority is sorted, and the probability of sampling experience j is defined as The expression is:
[0117]
[0118] In the formula, parameter β represents the priority of sampling. is the priority associated with experience (n,j), For experience pool According to the absolute timing differential error The order of (n,j) when sorting;
[0119] The definition is shown in formula 8:
[0120]
[0121] In the formula, Q θ′ (·) is the target critic;
[0122] The critic network loss function can be described as the weighted mean square temporal difference error of small samples NJ:
[0123]
[0124] In the formula, is the importance sampling weight;
[0125] The policy gradient for updating the actor network is:
[0126]
[0127] This method first proposes Figure 2The resident demand-side response optimization framework is shown in the figure, and then a multi-agent deep reinforcement learning method is proposed with each resident as an agent and the goal of minimizing the residents' electricity cost. This includes the establishment of a partially observable Markov game model, and then the use of a multi-agent deep deterministic policy gradient algorithm to train the neural network.
[0128] In summary, the execution framework of the MADDPG algorithm adopted in the present invention is as follows: Figure 3 shown.
[0129] Among them, the residential load electricity consumption model is constructed as follows:
[0130] For any resident smart power device that can participate in demand response, the present invention uses a two-dimensional array to describe the controllability and real-time operating status of the device; the operating status of the device at time t can be described by array o t Describe:
[0131] o t =(μ t ,ω t ) (11)
[0132] Where: μ t ∈{0,1} indicates the controllability of the device. Its value is 1, indicating that the device is in operation at time t and can be controlled (such as the air conditioner or water heater is running, or the electric vehicle is connected to the grid and charging). 0 indicates that the device is not operational at time t (such as the air conditioner or water heater is not started, or the electric vehicle is not connected to the grid for charging). ω t ∈[0,1] represents the completion progress of the task of the device at time t.
[0133] The operating status of the air conditioner is related to the room temperature and the set temperature. Its operating status array is defined as:
[0134]
[0135] Where: For air conditioning cooling / heating progress, is the room temperature at time t, To set the room temperature, The initial room temperature.
[0136] Air conditioning operating power The size can be The air conditioning operation progress at time t+1 can be expressed as:
[0137]
[0138] Where: Δt is the time interval, C AC is the equivalent specific heat capacity of the air conditioner.
[0139] Similarly, the operating status of the water heater is related to the water tank temperature and the set temperature. Its operating status array is defined as:
[0140]
[0141] Where: For the water heater working progress, is the water temperature at time t, To set the water temperature, is the initial temperature of the water tank.
[0142] Water heater operating power The size can be If the water heater is adjusted between t and 1, the running progress of the water heater at time t+1 can be expressed as follows:
[0143]
[0144] Where: C WH is the specific heat capacity of water, V tak is the water tank capacity.
[0145] The state array of the electric vehicle at time t is defined as:
[0146]
[0147] Where: Indicates the state of charge of the electric vehicle battery at time t.
[0148] Considering that the power of air conditioners and water heaters can only be positive, and electric vehicles have the ability to interact with the power grid in both directions, the power of electric vehicles at time t is expressed as Positive values indicate charging, negative values indicate discharging.
[0149] The size can be adjusted within the range shown in formula (19), where It is the maximum charging and discharging power of electric vehicles. The value also depends on the upper and lower limits of the battery capacity, as shown in formula (20):
[0150]
[0151] Where: is the battery capacity; η EVC and η EVD are charging and discharging efficiencies respectively; assuming the highest state of charge is 1, The lowest state of charge that does not affect the user's travel plans and battery life.
[0152] The state of charge of the battery at time t+1 can be expressed as:
[0153]
[0154] Therefore, the net load of resident n at time t is l n,t As shown in formula (22):
[0155]
[0156] Next, based on the load model, a Markov model is constructed; then, the MADDPG algorithm is proposed for optimization.
[0157] In summary, the proposed optimization algorithm based on MADDPG can effectively reduce the electricity cost of residents; moreover, the proposed algorithm has high training efficiency and strong convergence stability, and can be applied to actual user demand response management optimization scenarios; the proposed optimization mechanism is conducive to incentivizing users to shift their electricity consumption periods to low-price periods, smoothing the distribution network load curve, and the proposed reward correction mechanism can avoid the generation of new load peaks after the response, and maintain the safe and stable operation of the local distribution network.
[0158] Embodiment 4:
[0159] On the basis of Example 1, real residential electricity consumption data provided by a state grid company is used as an example application scenario to verify the effectiveness of the proposed MADDPG algorithm. The data contains residential electricity consumption data with a collection cycle and control period of 30 minutes from March 1, 2019 to April 30, 2019. One week was randomly selected from the February data as the test set, and the rest of the data was the training set. The total number of residential users is 100, and each resident is equipped with 1 EV, 1 water heater and 2 air conditioners. In order to simulate the diversity of residents' electricity consumption habits and the diversity of the operation of electrical equipment, the truncated normal distribution is used to set the parameters of residential electrical equipment. The equipment parameters are shown in Table 1.
[0160] Table 1. Operating parameters of residential electrical equipment
[0161]
[0162] To reduce the randomness of the results during training, 5 random seeds were generated each time. Each algorithm was trained for 5000 rounds in each random seed. Each round was a training day, including 48 periods, and testing was performed every 50 rounds. Figure 4 is the average daily total electricity cost of 100 residents using the proposed MADDPG algorithm on 5 random seeds.
[0163] Depend on Figure 4 From the results, we can see that the algorithm begins to converge after about 2000 rounds of training, and the convergence results are stable.
[0164] Figure 5The figure shows the aggregated charging and discharging power of all smart electrical devices of 100 residents after training convergence, where positive indicates electricity consumption and negative indicates EV discharge.
[0165] Depend on Figure 5 It can be seen that:
[0166] 1) EV, AC and WH loads tend to charge and use electricity during the 0-16 and 41-48 hours (low electricity purchase price periods) to reduce costs;
[0167] 2) The period from 16:00 to 40:00 is often the peak period for non-demand response loads, with higher electricity prices. EVs choose to discharge in reverse. The net power consumption of EVs during the period from 18:00 to 28:00 is still positive, which is related to the travel habits of users, as some users choose to charge at their workplace during this period.
[0168] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A resident demand response optimization method based on multi-agent deep reinforcement learning, characterized in that: The following steps are involved: Taking each resident as an intelligent agent, a partially observable Markov game model is established for the demand response behavior of the resident intelligent agent; Use the multi-agent deep deterministic policy gradient algorithm to train and optimize the agent's strategy; The trained intelligent agent strategy is applied to the resident demand response system to generate optimized electricity decision-making plans based on real-time electricity price information and residents' electricity demand.
2. The resident demand response optimization method based on multi-agent deep reinforcement learning according to claim 1 is characterized in that: The online optimization problem of residential load demand response is modeled as a partially observable Markov game model, consisting of a state set S, an action set of N agents {A 1:N }, state transition function and reward function R of each agent N composition; Define the observation quantity of agent n as o n , the goal of each agent is to learn the strategy π n , so that the cumulative discount reward maximum; Wherein, the discount rate γ∈[0,1) is used to balance short-term and long-term returns; T is the total number of demand response periods.
3. The resident demand response optimization method based on multi-agent deep reinforcement learning according to claim 2 is characterized in that: The observation o of agent n at time period t n,t Including time t, real-time electricity price every 5 minutes in the past 24 hours Electricity price Photovoltaic power generation Uncontrollable load power And the operating status of all user-side devices at time t.
4. The resident demand response optimization method based on multi-agent deep reinforcement learning according to claim 2 is characterized in that: A long short-term memory neural network is used to take the uncertainty feature data of the past 24 hours as the original input, extract the time series correlation features, and assist the intelligent agent in decision-making, so as to improve the strategy's ability to cope with multi-source uncertainty.
5. The resident demand response optimization method based on multi-agent deep reinforcement learning according to claim 2 is characterized in that: The action a of agent n in time period t n,t include Its value indicates the ratio of the actual power of the equipment to its maximum rated power; Among them, when the electric vehicle power is positive, it means charging, and when it is negative, it means discharging.
6. The method for optimizing resident demand response based on multi-agent deep reinforcement learning according to claim 2 is characterized in that: Add a penalty item related to travel demand to ensure that the user's electric vehicle travel plan is not disturbed by demand response behavior, as shown in Formula 1; In the above formula, k1 is the penalty factor, The minimum amount of electricity required for users to travel; Add a reward correction mechanism, that is, add a penalty item for the part exceeding the original peak value to avoid the generation of a new load peak, as shown in Formula 2; Among them, k2 is the penalty factor, P pk is the load peak value of the original load curve; Therefore, the modified reward function is shown in Equation 3: Among them, the basic reward function It is the negative value of the user’s total electricity cost.
7. The method for optimizing resident demand response based on multi-agent deep reinforcement learning according to claim 1 is characterized in that: The multi-agent deep deterministic policy gradient algorithm adopts an actuator-judge structure; Among them, the critic network is denoted as Q θ , with state s t and action a t As input, the Q function estimates the value Q θ (s t ,a t ) is the output, responsible for judging the pros and cons of the current strategy; The actor network is denoted as μ φ , with state st as input and action μ φ (s t ) is the output, which is responsible for improving the agent’s strategy based on the Q value given by the critic network.
8. The method for optimizing resident demand response based on multi-agent deep reinforcement learning according to claim 7 is characterized in that: The training goal of the multi-agent deep deterministic policy gradient algorithm is to make the performance function According to performance gradient direction is maximized, where ρ μ The distribution is for discount status.
9. The method for optimizing resident demand response based on multi-agent deep reinforcement learning according to claim 8 is characterized in that: According to the deterministic policy gradient theory, the performance gradient of the policy is: The performance gradient of each agent is expressed as: The multi-agent joint Q-value function of resident n is approximately: Q θ (o 1,t ,…,o N,t ,a 1,t ,…,a N,t )≈Q θ (o n,t ,a n,,t ,L n,t ,D n,t ) (6) Where, L n,t and D n,t Respectively represent the total electricity consumption and total discharge of all residents other than resident n; after approximation (o n,t ,a n,t ,ψ n,t ,ξ n,t ) is a low-dimensional vector, replacing the original high-dimensional observation value and action value vector (o 1,t ,…,o N,t ,a 1,t ,…,a N,t ), used to improve learning efficiency and avoid the curse of dimensionality; At the same time, an experience replay pool mechanism is introduced to randomly extract small batches of samples for training at each step, mix the newly generated samples with the past samples, and weaken the temporal correlation between samples.
10. The method for optimizing resident demand response based on multi-agent deep reinforcement learning according to claim 9, characterized in that: The definitions and mathematical expressions of the observations o, actions a, and rewards r of each resident agent are consistent and can be stored as interactive experience in a consistent format; The experience generated by agent n in the interaction with the environment during period t is (o n,t ,a n,t ,r n,t ,o n,t+1 ,L n,t ,D n,t ,L n,t+1 ,D n,t+1 ) and put them into the experience replay pool to improve learning efficiency; Then, the time series difference error of the training data is calculated, the data priority is sorted, and the probability of sampling experience j is defined as The expression is: In the formula, parameter β represents the priority of sampling. is the priority associated with experience (n,j), For experience pool According to the absolute timing differential error The order of (n,j) when sorting; The definition is shown in formula 8: In the formula, Q θ′ (·) is the target critic; The critic network loss function can be described as the weighted mean square temporal difference error of small samples NJ: In the formula, is the importance sampling weight; The policy gradient for updating the actor network is:
Citation Information
Cited By
Self-adaptive optimization method, device and equipment for residential electricity demand and storage medium
CN120296377A
