Intelligent control method and device for charging and discharging energy storage in new energy microgrid
The deep reinforcement learning PPO model is used to optimize the energy storage charging and discharging strategy of new energy microgrids, which solves the problems of low energy storage control efficiency and poor stability in the existing technology, and achieves efficient energy management and maximized benefits of new energy microgrids.
Patent Information
- Application Number
- CN202410830895.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-26
AI Technical Summary
Existing technology is difficult to achieve the optimal control strategy for energy storage charging and discharging in new energy microgrids, resulting in power waste and system stability problems. Traditional methods that rely on day-ahead prediction and real-time fine-tuning are difficult to cope with random fluctuations in new energy output and load.
The Proximal Policy Optimization (PPO) model based on deep reinforcement learning is used to establish the microgrid model and environmental reward function, and optimize the energy storage charging and discharging strategy in real time through the intelligent energy management system to maximize the cumulative net income.
It achieves precise control and optimization of the charging and discharging of energy storage in new energy microgrids, improves energy management efficiency and stability, and maximizes cumulative net income for electricity users.
Smart Images

Figure CN118381095B
Abstract
Description
Technical Field
[0001] The present invention relates to a new energy microgrid energy storage charging and discharging intelligent control method and device, belonging to the technical field of microgrid charging and discharging intelligent control. Background Art
[0002] Distributed green energy such as photovoltaics combined with battery energy storage systems (BESS) have become the main technical means to achieve "zero-carbon" green microgrids in parks under the "3060 dual carbon goals" and an important part of the new generation of smart grids. However, new green energy has high intermittent and uncertain output. Coupled with the introduction of new sources, storage, and loads, and the complex interaction between the park power grid and the large power grid, it has brought huge challenges to the stable, safe, and economical operation of modern power grids. The new energy park microgrid is not a simple combination of photovoltaics, energy storage, distribution systems, controllable smart appliances, etc., but an organic fusion, through the intelligent energy management system (Energy Management System, EMS) to form a whole to achieve "flexible green energy use", that is, to achieve friendly low-carbon interaction between the park and the power grid.
[0003] The problem of optimizing the charging and discharging of the park energy storage system is essentially an optimal solution problem for an optimization control strategy that covers multiple parameters, multiple execution steps, and predictive information of random processes: in a planned operation cycle, after the energy storage is connected to the user side, the objective function is to solve the optimal energy storage charging and discharging operation strategy with the maximum cumulative net benefit for the user throughout the entire cycle as the objective function. In essence, this is a Markov decision process (MDP) problem. There is no definite optimal solution to this problem, and it is not easy to implement its optimization control algorithm according to the traditional manual programming idea. Due to the random volatility of the output of new energy such as photovoltaic power generation and the power load of the park, the conventional energy storage timing / time-sharing charging and discharging control strategy formulated only according to the peak and valley electricity prices of the power grid cannot obtain the optimal solution for the park's benefits. In some cases, it may even cause unnecessary power waste and aggravate the stability of the system. The new method tried by the industry is to manually formulate the daytime scheduling operation curve based on the day-ahead forecast and planning information, and then make real-time fine-tuning based on the scheduling curve. Because the planned curve often deviates greatly from the actual new energy output and load changes, this method is also difficult to obtain good operating results.
[0004] Therefore, the present invention proposes a new energy microgrid energy storage charging and discharging intelligent control method and device based on an improved deep reinforcement learning PPO model. Summary of the invention
[0005] In order to solve the above problems, the present invention proposes a new energy microgrid energy storage charging and discharging intelligent control method and device, which can realize the intelligent optimization and regulation of charging and discharging of the energy storage system in the park microgrid, and bring maximized cumulative net benefits to electricity users.
[0006] The technical solution adopted by the present invention to solve the technical problem is:
[0007] In a first aspect, an embodiment of the present invention provides a new energy microgrid energy storage charging and discharging intelligent control method, comprising the following steps:
[0008] Step S1, establishing a microgrid model and designing a simulation environment according to the microgrid environment of the user-side park to generate active power of loads and photovoltaic power generation in the microgrid;
[0009] Step S2, comprehensively considering the single-objective or multi-objective optimization problem of the user-side park microgrid, and establishing an environmental reward function;
[0010] Step S3, establishing a deep reinforcement learning PPO model, performing model training and tuning, and obtaining the final microgrid energy storage charging and discharging control model;
[0011] Step S4, real-time collection of user-side park microgrid data, input into the microgrid energy storage charging and discharging control model to perform intelligent control of microgrid energy storage charging and discharging.
[0012] As a possible implementation of this embodiment, step S1 includes:
[0013] A microgrid model is established based on the user-side campus microgrid environment, wherein the microgrid model includes steady-state and dynamic characteristics of energy storage equipment, converters, and load equipment, as well as an interface model between the microgrid and an external large grid;
[0014] An expression of the microgrid state (State) is established; the expression of the microgrid state (State) is:
[0015] ,
[0016] in: is the time scale of the current moment; yes The battery state of charge (SOC) at the moment, the value range is: ; is the installed capacity of energy storage, in units of: ; Is the battery health status (SOH), the value range is: ; Is the minimum value of the battery state of charge (SOC), the value range is: ; Is the maximum value of the battery state of charge (SOC), the value range is: ; is the maximum active power of energy storage charging, in units of: ; is the maximum active power of energy storage discharge, the unit is: ; is the energy storage charge and discharge conversion efficiency, the value range is: ; is the electricity price at the current moment, in units of: ; is the load active power at the current moment, in units of: ; is the photovoltaic active output at the current moment, in units of: ; is the set demand defense threshold, in units of: ; is the anti-backflow protection threshold, the unit is: ;
[0017] Create an action expression; Control actions that need to be taken at all times :
[0018] ,
[0019] in, It is the charge and discharge active power instruction of energy storage, the unit is ; , energy storage discharge; , energy storage and charging; , energy storage is neither charged nor discharged; and , is the maximum active power of energy storage charging, is the maximum active power of energy storage discharge;
[0020] Use the python power flow calculation library pandapower to establish a microgrid simulation environment. The python power flow calculation library pandapower supports power flow, optimal power flow, state estimation, short-circuit calculation according to IEC60909, and topology map search functions;
[0021] Generates active power for loads and photovoltaic power generation in the microgrid.
[0022] As a possible implementation of this embodiment, in the process of establishing the microgrid model, the entire microgrid system satisfies the following power balance formula:
[0023] ,
[0024] in, is the power load of the microgrid system; is the photovoltaic power generation power; is the active power of energy storage operation. When it is equal to 0, the energy storage is neither charged nor discharged. When it is less than 0, the energy storage is charged. When it is greater than 0, the energy storage is discharged; It is the input power of the external large power grid. If it is greater than 0, it means that power is taken from the large power grid, and if it is less than 0, it means that power is supplied to the large power grid.
[0025] As a possible implementation of this embodiment, in the process of establishing the microgrid model, the sampling frequency of the user-side microgrid state (State) and the control action (Action) frequency of the energy storage system are both set to 1 minute, and there are 1440 sampling and control time points in a 24-hour operation cycle; It's the first day Time scale in minutes.
[0026] As a possible implementation of this embodiment, generating active power of loads and photovoltaic power generation in the microgrid includes:
[0027] Deploy an intelligent energy management system (EMS) in the target microgrid, and then use traditional methods to control the charging and discharging of energy storage for a period of time, such as one month;
[0028] Use an intelligent energy management system (EMS) to collect active power data of load and photovoltaic power generation during this period, with a sampling period of 1 minute;
[0029] Use mathematical statistics to analyze the load and active power data of photovoltaic power generation during this period and find the characteristics in the data;
[0030] Obtain the annual photovoltaic irradiance and air quality conditions at the target microgrid location;
[0031] According to the characteristics and annual photovoltaic irradiance and air quality conditions of the target microgrid location, an algorithm is used to automatically generate N years of load and photovoltaic power generation data.
[0032] As a possible implementation of this embodiment, step S2 includes:
[0033] Determine an optimization goal, wherein the optimization goal is to improve the power efficiency of the park and reduce power expenditure;
[0034] Establish an environmental reward function based on the benefits of each energy storage charge and discharge :
[0035] ,
[0036] ,
[0037] in: is the sampling time point, the sampling period is 1 minute; Is the energy storage according to the current instruction The electricity consumption of the micro-grid gateway meter in the current time period during the action is charged. The energy storage does not work. The electricity billing of the micro-grid gateway meter in the current time period; It is the electric energy sent back to the grid by the energy storage during this period; Is the energy storage according to the current instruction The power demand during operation, The energy storage does not work. The power demand at yes The power demand before the time; is the proportionality coefficient, which is determined according to the parameters of the actual microgrid;
[0038] Reduce the state vector to a low-dimensional state space and construct an intrinsic reward that represents the entropy of the state space.
[0039] As a possible implementation of this embodiment, reducing the dimension of the state vector to a low-dimensional state space and constructing an intrinsic reward representing the entropy of the state space includes:
[0040] Use a random encoder to transform the 14-dimensional state vector The state vector in the low-dimensional state space reduced to 6 dimensions , and Recording to playback buffer middle;
[0041] Use the k-nearest neighbor algorithm to retrieve the playback buffer Find the distance Recent A low-dimensional representation space state vector: ;
[0042] Calculate intrinsic reward:
[0043] ;
[0044] Calculate the expected reward:
[0045] ,
[0046] in, , as the training time increase, The purpose is to reduce the proportion of intrinsic rewards in expected rewards as the training time increases;
[0047] Use expected rewards Replacement of environmental rewards Perform model training.
[0048] As a possible implementation of this embodiment, the deep reinforcement learning PPO model applies the mechanism of deep reinforcement learning, takes maximizing expected returns as the goal, and interacts with the agent and the environment. After performing an action in a certain state, the agent will receive the next state of the environment and the corresponding reward return, thereby forming a state-action-reward return trajectory chain;
[0049] The optimization objective function of the deep reinforcement learning PPO model is:
[0050] ,
[0051] in, is the action strategy, , are the environmental reward, action and state at time t respectively;
[0052] Among all possible action strategies In this paper, we find an action strategy , the trajectory chain generated by it Get the maximum cumulative reward return, action strategy Recorded in the Actor model in the figure in the form of neural network parameters.
[0053] In a second aspect, an embodiment of the present invention provides a new energy microgrid energy storage charging and discharging intelligent control device, comprising:
[0054] The simulation environment design module is used to establish a microgrid model and design a simulation environment based on the microgrid environment of the user-side park, and generate active power of loads and photovoltaic power generation in the microgrid;
[0055] The environment reward function establishment module is used to comprehensively consider the single-objective or multi-objective optimization problem of the user-side park microgrid and establish the environment reward function;
[0056] The model building and training module is used to build a deep reinforcement learning PPO model, perform model training and optimization, and obtain the final microgrid energy storage charging and discharging control model;
[0057] The charging and discharging control module is used to collect the user-side park microgrid data in real time, and input the microgrid energy storage charging and discharging control model to perform intelligent control of the microgrid energy storage charging and discharging.
[0058] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of any of the above-mentioned new energy microgrid energy storage charging and discharging intelligent control methods.
[0059] In a fourth aspect, an embodiment of the present invention provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned new energy microgrid energy storage charging and discharging intelligent control methods are executed.
[0060] The beneficial effects of the technical solution of the embodiment of the present invention are as follows:
[0061] A new energy microgrid energy storage charging and discharging intelligent control method of the technical solution of the embodiment of the present invention includes the following steps: step S1, establish a microgrid model and design a simulation environment according to the user-side park microgrid environment, and generate the active power of the load and photovoltaic power generation in the microgrid; step S2, comprehensively consider the single-objective or multi-objective optimization problem of the user-side park microgrid, and establish an environmental reward function; step S3, establish a deep reinforcement learning PPO model, perform model training and optimization, and obtain the final microgrid energy storage charging and discharging control model; step S4, collect user-side park microgrid data in real time, and input the microgrid energy storage charging and discharging control model to perform microgrid energy storage charging and discharging intelligent control. The present invention realizes precise control and optimization of new energy microgrid energy storage charging and discharging through intelligent optimization and regulation of charging and discharging of energy storage system in park microgrid, improves the energy management efficiency and stability of microgrid, and brings maximum cumulative net benefits to electricity users.
[0062] A new energy microgrid energy storage charging and discharging intelligent control device according to the technical solution of an embodiment of the present invention has the same beneficial effects as a new energy microgrid energy storage charging and discharging intelligent control method according to the technical solution of an embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is a flow chart of a new energy microgrid energy storage charging and discharging intelligent control method according to an exemplary embodiment;
[0064] Figure 2 It is a structural schematic diagram of a new energy microgrid energy storage charging and discharging intelligent control device according to an exemplary embodiment;
[0065] Figure 3 This is a schematic diagram of the microgrid structure of the new energy park;
[0066] Figure 4 Example diagram of load curve changes before and after adding energy storage regulation to the new energy park;
[0067] Figure 5 Schematic diagram of the greedy search mechanism based on the maximum entropy optimization algorithm;
[0068] Figure 6 Schematic diagram of the state-action-reward trajectory chain for reinforcement learning;
[0069] Figure 7 Schematic diagram of the learning process of the microgrid energy storage optimization control strategy based on PPO2;
[0070] Figure 8 Schematic diagram of the neural network model structure of the present invention. DETAILED DESCRIPTION
[0071] In order to more clearly illustrate the technical features of the solution of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.
[0072] like Figure 1 As shown, an embodiment of the present invention provides a new energy microgrid energy storage charging and discharging intelligent control method, comprising the following steps:
[0073] Step S1, establishing a microgrid model and designing a simulation environment according to the microgrid environment of the user-side park to generate active power of loads and photovoltaic power generation in the microgrid;
[0074] Step S2, comprehensively considering the single-objective or multi-objective optimization problem of the user-side park microgrid, and establishing an environmental reward function;
[0075] Step S3, establishing a deep reinforcement learning PPO model, performing model training and tuning, and obtaining the final microgrid energy storage charging and discharging control model;
[0076] Step S4, real-time collection of user-side park microgrid data, input into the microgrid energy storage charging and discharging control model to perform intelligent control of microgrid energy storage charging and discharging.
[0077] As a possible implementation of this embodiment, step S1 includes:
[0078] A microgrid model is established based on the user-side campus microgrid environment, wherein the microgrid model includes steady-state and dynamic characteristics of energy storage equipment, converters, and load equipment, as well as an interface model between the microgrid and an external large grid;
[0079] An expression of the microgrid state (State) is established; the expression of the microgrid state (State) is:
[0080] ,
[0081] in: is the time scale of the current moment; yes The battery state of charge (SOC) at the moment, the value range is: ; is the installed capacity of energy storage, in units of: ; Is the battery health status (SOH), the value range is: ; Is the minimum value of the battery state of charge (SOC), the value range is: ; Is the maximum value of the battery state of charge (SOC), the value range is: ; is the maximum active power of energy storage charging, in units of: ; is the maximum active power of energy storage discharge, the unit is: ; is the energy storage charge and discharge conversion efficiency, the value range is: ; is the electricity price at the current moment, in units of: ; is the load active power at the current moment, in units of: ; is the photovoltaic active output at the current moment, in units of: ; is the set demand defense threshold, in units of: ; is the anti-backflow protection threshold, the unit is: ;
[0082] Create an action expression; Control actions that need to be taken at all times :
[0083] ,
[0084] in, It is the charge and discharge active power instruction of energy storage, the unit is ; , energy storage discharge; , energy storage and charging; , energy storage is neither charged nor discharged; and , is the maximum active power of energy storage charging, is the maximum active power of energy storage discharge;
[0085] Use the python power flow calculation library pandapower to establish a microgrid simulation environment. The python power flow calculation library pandapower supports power flow, optimal power flow, state estimation, short-circuit calculation according to IEC60909, and topology map search functions;
[0086] Generates active power for loads and photovoltaic power generation in the microgrid.
[0087] As a possible implementation of this embodiment, in the process of establishing the microgrid model, the entire microgrid system satisfies the following power balance formula:
[0088] ,
[0089] in, is the power load of the microgrid system; is the photovoltaic power generation power; is the active power of energy storage operation. When it is equal to 0, the energy storage is neither charged nor discharged. When it is less than 0, the energy storage is charged. When it is greater than 0, the energy storage is discharged; It is the input power of the external large power grid. If it is greater than 0, it means that power is taken from the large power grid, and if it is less than 0, it means that power is supplied to the large power grid.
[0090] As a possible implementation of this embodiment, in the process of establishing the microgrid model, the sampling frequency of the user-side microgrid state (State) and the control action (Action) frequency of the energy storage system are both set to 1 minute, and there are 1440 sampling and control time points in a 24-hour operation cycle; It's the first day Time scale in minutes.
[0091] As a possible implementation of this embodiment, generating active power of loads and photovoltaic power generation in the microgrid includes:
[0092] Deploy an intelligent energy management system (EMS) in the target microgrid, and then use traditional methods to control the charging and discharging of energy storage for a period of time, such as one month;
[0093] Use an intelligent energy management system (EMS) to collect active power data of load and photovoltaic power generation during this period, with a sampling period of 1 minute;
[0094] Use mathematical statistics to analyze the load and active power data of photovoltaic power generation during this period and find the characteristics in the data;
[0095] Obtain the annual photovoltaic irradiance and air quality conditions at the target microgrid location;
[0096] According to the characteristics and annual photovoltaic irradiance and air quality conditions of the target microgrid location, an algorithm is used to automatically generate N years of load and photovoltaic power generation data.
[0097] As a possible implementation of this embodiment, step S2 includes:
[0098] Determine an optimization goal, wherein the optimization goal is to improve the power efficiency of the park and reduce power expenditure;
[0099] Establish an environmental reward function based on the benefits of each energy storage charge and discharge :
[0100] ,
[0101] ,
[0102] in: is the sampling time point, the sampling period is 1 minute; Is the energy storage according to the current instruction The electricity consumption of the micro-grid gateway meter in the current time period during the action is charged. The energy storage does not work. The electricity billing of the micro-grid gateway meter in the current time period; It is the electric energy sent back to the grid by the energy storage during this period; Is the energy storage according to the current instruction The power demand during operation, The energy storage does not work. The power demand at yes The power demand before the time; is the proportionality coefficient, which is determined according to the parameters of the actual microgrid;
[0103] Reduce the state vector to a low-dimensional state space and construct an intrinsic reward that represents the entropy of the state space.
[0104] As a possible implementation of this embodiment, reducing the dimension of the state vector to a low-dimensional state space and constructing an intrinsic reward representing the entropy of the state space includes:
[0105] Use a random encoder to transform the 14-dimensional state vector The state vector in the low-dimensional state space reduced to 6 dimensions , and Recording to playback buffer middle;
[0106] Use the k-nearest neighbor algorithm to retrieve the playback buffer Find the distance Recent A low-dimensional representation space state vector: ;
[0107] Calculate intrinsic reward:
[0108] ;
[0109] Calculate the expected reward:
[0110] ,
[0111] in, , as the training time increase, The purpose is to reduce the proportion of intrinsic rewards in expected rewards as the training time increases;
[0112] Use expected rewards Replacement of environmental rewards Perform model training.
[0113] As a possible implementation of this embodiment, the deep reinforcement learning PPO model applies the mechanism of deep reinforcement learning, takes maximizing expected returns as the goal, and interacts with the agent and the environment. After performing an action in a certain state, the agent will receive the next state of the environment and the corresponding reward return, thereby forming a state-action-reward return trajectory chain;
[0114] The optimization objective function of the deep reinforcement learning PPO model is:
[0115] ,
[0116] in, is the action strategy, , are the environmental reward, action and state at time t respectively;
[0117] Among all possible action strategies In this paper, we find an action strategy , the trajectory chain generated by it Get the maximum cumulative reward return, action strategy Recorded in the Actor model in the figure in the form of neural network parameters.
[0118] This embodiment achieves precise control and optimization of the charging and discharging of energy storage in the new energy microgrid through intelligent optimization and regulation of the charging and discharging of the energy storage system in the park microgrid, improves the energy management efficiency and stability of the microgrid, and brings maximum cumulative net benefits to electricity users.
[0119] like Figure 2 As shown, an embodiment of the present invention provides a new energy microgrid energy storage charging and discharging intelligent control device, comprising:
[0120] The simulation environment design module is used to establish a microgrid model and design a simulation environment based on the microgrid environment of the user-side park, and generate active power of loads and photovoltaic power generation in the microgrid;
[0121] The environment reward function establishment module is used to comprehensively consider the single-objective or multi-objective optimization problem of the user-side park microgrid and establish the environment reward function;
[0122] The model building and training module is used to build a deep reinforcement learning PPO model, perform model training and optimization, and obtain the final microgrid energy storage charging and discharging control model;
[0123] The charging and discharging control module is used to collect the user-side park microgrid data in real time, and input the microgrid energy storage charging and discharging control model to perform intelligent control of the microgrid energy storage charging and discharging.
[0124] The main purpose of the present invention is to provide a proximal policy optimization model (PPO) based on improved artificial intelligence deep reinforcement learning (DRL) to perform intelligent optimization and regulation of charging and discharging of energy storage systems in campus microgrids, so as to overcome the shortcomings of existing methods and bring maximum cumulative net benefits to electricity users.
[0125] The specific implementation process of the present invention is as follows.
[0126] 1Design simulation environment.
[0127] The agent in deep reinforcement learning needs to interact with the environment a lot to gradually converge, and the agent's actions in the early stage of training are close to random. At the same time, the actual operating environment control cycle is 1 minute, which is very slow, so the agent training cannot be carried out in the actual environment. Therefore, it is necessary to first establish a mathematical model of the environment and design a simulation environment.
[0128] For the user-side campus microgrid environment, it is necessary to establish the steady-state and dynamic characteristics of equipment including energy storage equipment, converters, loads, electric vehicles, and the interface model between the microgrid and the external large power grid.
[0129] 1.1 Establish a microgrid model.
[0130] A typical microgrid in a new energy park is as follows: Figure 3 In a "solar energy storage" combined campus power grid system, the entire microgrid system satisfies the following power balance formula:
[0131] ,
[0132] in, is the power load of the microgrid system; is the photovoltaic power generation power; is the active power of energy storage operation. When it is equal to 0, the energy storage is neither charged nor discharged. When it is less than 0, the energy storage is charged. When it is greater than 0, the energy storage is discharged; It is the input power of the external large power grid. If it is greater than 0, it means that power is taken from the large power grid, and if it is less than 0, it means that power is supplied to the large power grid.
[0133] The time agreement of the present invention is to use 24 hours from 0 o'clock to 24 o'clock as an energy storage operation cycle. Based on this, if the user load needs to be operated in a longer cycle such as a week or a month, the control model of this solution can be configured and adjusted without affecting the operating logic and control effect of the core algorithm. In order to ensure timely control of the maximum demand, the sampling frequency of the user-side microgrid state (State) and the control action (Action) frequency of the energy storage system are set to 1min. There are 1440 sampling and control time points in a 24-hour operation cycle. It's the first day Time scale in minutes.
[0134] 1.2 Establish state expression.
[0135] For every minute Microgrid state that needs to be collected or configured (State) , the state parameter defined in the present invention is a 14-dimensional column vector:
[0136] ,
[0137] in: is the time scale of the current moment; yes The battery state of charge (SOC) at the moment, the value range is: ; is the installed capacity of energy storage, in units of: ; Is the battery health status (SOH), the value range is: ; Is the minimum value of the battery state of charge (SOC), the value range is: ; Is the maximum value of the battery state of charge (SOC), the value range is: ; is the maximum active power of energy storage charging, in units of: ; is the maximum active power of energy storage discharge, the unit is: ; is the energy storage charge and discharge conversion efficiency, the value range is: ; is the electricity price at the current moment, in units of: ; is the load active power at the current moment, in units of: ; is the photovoltaic active output at the current moment, in units of: ; is the set demand defense threshold, in units of: ; is the anti-backflow protection threshold, the unit is: .
[0138] According to the actual situation and control requirements of the user's power grid, the state parameters can be flexibly expanded or deleted. For example, if a controllable load system is installed in the user's microgrid, parameters such as the configuration of the controllable load and the controllable power range can also be included.
[0139] 1.3 Create an action expression.
[0140] Control actions that need to be generated at all times (Action) , defined as follows:
[0141] ,
[0142] That is, the charging and discharging active power instruction of energy storage , the unit is . , energy storage discharge; , energy storage and charging; , the energy storage is neither charged nor discharged. and As mentioned earlier, is the maximum active power of energy storage charging, It is the maximum active power of energy storage discharge.
[0143] 1.4 Establish a microgrid simulation environment.
[0144] The simulation environment is established using the python power flow calculation library pandapower. The library supports power flow, optimal power flow, state estimation, short circuit calculation according to IEC60909, topology map search and other functions. pandapower uses numba acceleration, and the simulation speed is extremely fast.
[0145] 1.5 Generate active power for loads and photovoltaic power generation in the microgrid.
[0146] The established microgrid simulation environment needs to be close to the actual microgrid load and photovoltaic power generation active power. In the present invention, the method for generating these data is:
[0147] a. Deploy our intelligent energy management system (EMS) in the target microgrid, and then use traditional methods to control the charging and discharging of energy storage for a period of time, such as 1 month;
[0148] b. Use the intelligent energy management system (EMS) to collect the active power data of load and photovoltaic power generation during this period, with a sampling period of 1 minute;
[0149] c. Use mathematical statistics to analyze the load and active power data of photovoltaic power generation during this period and find the characteristics in the data;
[0150] d. Obtain the annual photovoltaic irradiance and air quality conditions at the location of the target microgrid;
[0151] e. Based on the characteristics and annual photovoltaic irradiance and air quality conditions of the target microgrid location, an algorithm is used to automatically generate N years of load and photovoltaic power generation data.
[0152] 2 Design environment reward function.
[0153] Environment Reward Function in Deep Reinforcement Learning Design is the most important task. The environmental reward function determines the optimization goal of the intelligent agent. If the environmental reward function is not well designed, the intelligent agent may not converge or converge to the wrong goal. For the user-side campus microgrid, it is necessary to comprehensively consider multiple factors such as the operation and maintenance costs of the microgrid, demand defense, peak shaving and valley filling, etc., to form a single-objective or multi-objective optimization problem. The design of the environmental reward function needs to avoid the problem of too sparse rewards as much as possible.
[0154] When designing the environment reward function, in order to effectively solve the sparse reward problem (that is, only relying on the defined environment reward function , which is not enough to make the training converge to obtain a model that meets the use requirements). The present invention applies the following improved technology: based on the existing random encoder algorithm for efficient exploration to solve the sparse reward problem. The present invention uses a random encoder to reduce the 14-dimensional state vector to a 6-dimensional low-dimensional state space, and then constructs an intrinsic reward that can characterize the entropy of the state space (maximizing the intrinsic reward can maximize the entropy of the state space), thereby improving the search performance during model training.
[0155] 2.1 Determine the optimization goal.
[0156] For the park microgrid, the main optimization goal is to improve the park's power efficiency and reduce power consumption.
[0157] From the perspective of economic benefits, the two-part electricity price policy brings benefits to the users of the industrial park by reducing the basic electricity fee and electricity fee per kilowatt-hour, which is the basis for the investment income of the new energy solution on the user side. The basic electricity fee is the transformer capacity or maximum demand of the industrial enterprise under the two-part electricity price (average every 15 minutes in January). The other part of the electricity fee is the kilowatt-hour electricity price, which is charged according to the actual power consumption of the power grid and is divided into peak time, normal time and valley time according to the power consumption time.
[0158] The application of the two-part electricity price can encourage electricity users to consume electricity reasonably and avoid the waste of electricity resources. And photovoltaic power generation output It is random and uncontrollable, and what can be flexibly and accurately adjusted is the output of the energy storage system. Users can use energy storage systems to reduce their monthly maximum , thereby achieving the goal of reducing the basic electricity price. In addition, the energy storage system can store electricity during the load valley period, that is, the low electricity price period, and release the electricity during the load peak period, that is, the high electricity price period. This can not only eliminate the user's peak-valley electricity price difference, but also reduce the user's peak load and smooth the user's power load curve, such as Figure 4 shown.
[0159] 2.2 Establishing the environment reward function.
[0160] The revenue from each energy storage charge and discharge is used as the environmental reward function , which is specifically defined as follows:
[0161] ,
[0162] in: is the sampling time point, the sampling period is 1 minute; is the proportionality coefficient, which is determined according to the actual microgrid parameters. There are 1440 sampling points in a day; is the energy storage according to the current instruction ( ) is activated in the current time period (within 1 minute) when the electricity consumption of the micro-electric gateway meter is charged. Is energy storage not in action ( ) in the current time period (within 1 minute) when the electricity consumption of the micro-grid gateway meter is charged; It is the electric energy sent back to the grid by the energy storage during this period; the system samples the active power data of the external grid once every minute. The active power of the power grid outside the minute is . The power demand before time is The power demand is The calculation method is:
[0163] ,
[0164] Is the energy storage according to the current instruction ( ) Demand power during operation, Is energy storage not in action ( ) when the demand power is yes The demand power before time. The calculation method is:
[0165] ,
[0166] if , then after this iteration .
[0167] 2.3 Solve the sparse reward problem.
[0168] In order to effectively solve the sparse reward problem (that is, only relying on the defined environment reward function , which is not enough to make the training converge to obtain a model that meets the use requirements). The present invention applies the following improved techniques:
[0169] The present invention solves the sparse reward problem based on the existing random encoder algorithm for efficient exploration. First, the state vector is reduced in dimension using a random encoder, and then an intrinsic reward that can characterize the entropy of the state space is constructed (maximizing the intrinsic reward can maximize the entropy of the state space, and the larger the entropy, the more sufficient the exploration process during training), which improves the search performance of the algorithm in the early stages of training.
[0170] Figure 5 is a greedy search mechanism based on the maximum entropy optimization algorithm, such as Figure 5 As shown, the specific implementation steps are:
[0171] a. Use a random encoder (a fully connected neural network with random parameters) to transform the 14-dimensional state vector The state vector in the low-dimensional state space reduced to 6 dimensions , and Recording to playback buffer middle.
[0172] b. Use the k-nearest neighbor algorithm (k-NN) to retrieve the data from the playback buffer. Find the distance Recent A low-dimensional representation space state vector .
[0173] c. Calculate the intrinsic reward. The calculation formula for the intrinsic reward is:
[0174] .
[0175] d. Calculate the expected reward. The calculation formula for the expected reward is:
[0176] ,
[0177] in , as the training time increase, The purpose is to reduce the proportion of intrinsic reward in expected reward as the training time increases.
[0178] e. Use expected rewards Replacement of environmental rewards Train the model.
[0179] 3. Design algorithms, training and tuning.
[0180] The present invention uses the Proximal Policy Optimization (PPO) algorithm as the core control algorithm model. The PPO algorithm is a Policy Gradient algorithm. The PPO algorithm is very stable and relatively easy to converge, and supports both discrete control and continuous control.
[0181] State Space The dimension is high, and the inference cycle of the algorithm of the present invention is 1 minute, that is, there are 1440 steps in a day. The large amount of training data will require a lot of computing power, and efficient parallel training needs to be implemented to improve the output and iteration speed of the model.
[0182] Algorithm tuning is a relatively complex and time-consuming process, and it is also a major difficulty. For example, an unreasonable design of the environment reward function, too sparse rewards, or an unreasonable design of the simulation environment will make it difficult for the model to converge or only reach a local optimum. Therefore, algorithm tuning requires a combination of algorithm model fine-tuning, hyperparameter adjustment, optimization of the environment reward function design, and simulation environment optimization.
[0183] 3.1 Design algorithm.
[0184] The method described in this invention applies the mechanism of deep reinforcement learning to maximize the expected return. Through the interaction between the agent and the environment, after performing an action in a certain state, the agent will receive the next state of the environment and the corresponding reward (reward, in Represented by humans. Defining a good environment reward function to obtain a reasonable reward return is the key to the design of reinforcement learning algorithms), thus forming a state-action-reward return trajectory chain (such as Figure 6 By continuously performing actions and receiving rewards, the agent will gradually learn the best action strategy (Policy, in The solution formula is as follows. In the present invention, it is the energy storage charging and discharging strategy) to maximize the total cumulative reward return of the entire control process (in the present invention, it is the cumulative economic benefit of an operation cycle).
[0185] The optimization objective function of the reinforcement learning model of the present invention is:
[0186] ,
[0187] The above formula means that among all possible action strategy sets In this paper, we find a strategy , the trajectory chain generated by it You can get the maximum cumulative reward return.
[0188] The present invention specifically uses the PPO2 deep reinforcement learning model. The training architecture of the neural network model of this model is as follows Figure 7 As shown, the final learned action strategy Recorded in the Actor model in the figure in the form of neural network parameters.
[0189] The neural network model structure of PPO2 designed by the present invention is as follows: Figure 8 As shown in Figure 2, the two neural network models in PPO2 – the actor and critic models (Actor & Critic) both use a three-layer fully connected neural network, and the activation function uses the hyperbolic tangent function (tanh).
[0190] 3.2 Training and tuning
[0191] In order to cope with the model training and tuning challenges brought by a large amount of training data, the model training and tuning of the present invention is planned to be carried out on the kubeflow platform. Kubeflow is built on cloud native technology, and the model can be trained on a GPU cluster through training-operator. Model parameter tuning can be achieved through katib. All metadata can be managed through metadata. Deep learning workflows can be automated through ml-pipeline.
[0192] 4Deployment algorithm.
[0193] To improve the response speed, edge computing technology is deployed in the microgrid environment of the park. The edge computing platform has a certain computing power, which can perform real-time deep reinforcement learning model inference locally. At the same time, it can obtain real-time data of each device and control each device through the Internet of Things interface. Cloud-edge collaborative technology is used to realize the automatic iteration of the reinforcement learning model, while collecting more operating data and optimizing the simulation environment.
[0194] 4.1 Deployment Algorithm
[0195] The algorithm trained by the present invention is deployed as a microservice in an intelligent energy management system (EMS) based on the edgex edge computing platform. It is deployed using containerization technology (docker). The inference library uses onnxruntime. onnxruntime is easy to deploy, has fast inference speed and high inference accuracy.
[0196] 4.2 Automatic iteration algorithm model.
[0197] The algorithm of the present invention is deployed in an intelligent energy management system (EMS) based on the edgex edge computing platform, supporting the cloud-edge collaboration mechanism. The cloud is our kubeflow cloud platform. Based on the cloud-edge collaboration mechanism and the kubeflow platform, it is possible to achieve park microgrid data collection -> data preprocessing -> simulation environment construction -> distributed reinforcement learning model training -> model verification -> automatic model deployment to the edge segment, and realize automatic model iteration.
[0198] The method of the present invention has been deployed in multiple parks and has achieved good results. The following is a specific implementation case of the present invention:
[0199] For a certain park, the designed PPO2 neural network model is small and compact, with only more than 70,000 parameters (W1 is a 14x256 matrix, b1 is a 1x256 matrix, W2 is a 256x256 matrix, b2 is a 1x256 matrix, W3 is a 256x1 matrix, b3 is a 1x256 matrix). For the sample data of a park microgrid, after 10,000 episodes, the model can be trained within 8-10 hours.
[0200] The Actors generated by training require very little computing power resources during inference operation, and do not require NPU / GPU acceleration processing. They can run in mid-to-low-end EMS controller devices (CPU: 4-core Cortex-A55 2GHz, 4G RAM) to perform automatic and precise charging and discharging control operations at the minute level for the battery energy storage system configured in the park.
[0201] For a park microgrid, the overall effect is that the return on investment under the same configuration is more than 15% higher than that of traditional control methods.
[0202] The present invention applies the mechanism of deep reinforcement learning, with the goal of maximizing expected returns. Through the interaction between the agent and the environment, after performing an action in a certain state, the agent will receive the next state of the environment and the corresponding reward (reward, in Represented by humans. Defining a good environment reward function to obtain a reasonable reward return is the key to the design of reinforcement learning algorithms), thus forming a state-action-reward return trajectory chain. By continuously performing actions and receiving rewards, the agent will gradually learn the best action strategy (Policy, in Indicates that in the present invention, it is the energy storage charging and discharging strategy) to maximize the total cumulative reward return of the entire control process (in the present invention, it is the cumulative economic benefit of an operating cycle).
[0203] A computer device provided in an embodiment of the present invention includes a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of any of the above-mentioned new energy microgrid energy storage charging and discharging intelligent control methods.
[0204] Specifically, the above-mentioned memory and processor can be general-purpose memory and processor, which are not specifically limited here. When the processor runs the computer program stored in the memory, it can execute the above-mentioned new energy microgrid energy storage charging and discharging intelligent control method.
[0205] Those skilled in the art will appreciate that the structure of the computer device does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently.
[0206] In some embodiments, the computer device may also include a touch screen that can be used to display a graphical user interface (e.g., a startup interface of an application) and receive user operations on the graphical user interface (e.g., startup operations on an application). The specific touch screen may include a display panel and a touch panel. The display panel may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. The touch panel may collect the user's contact or non-contact operations on or near it, and generate pre-set operation instructions, for example, the user uses any suitable object such as a finger or stylus to operate on or near the touch panel. In addition, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and posture, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into information that the processor can process, and then sends it to the processor, and can receive and execute commands sent by the processor. In addition, the touch panel can be implemented by various types such as resistive, capacitive, infrared and surface acoustic wave, and any technology developed in the future can also be used to implement the touch panel. Further, the touch panel can cover the display panel, and the user can operate on or near the touch panel covered on the display panel according to the graphical user interface displayed on the display panel. After the touch panel detects the operation on or near it, it is transmitted to the processor to determine the user input, and then the processor provides corresponding visual output on the display panel in response to the user input. In addition, the touch panel and the display panel can be implemented as two independent components or integrated.
[0207] Corresponding to the method for starting the above-mentioned application, an embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is run by a processor, the steps of any of the above-mentioned new energy microgrid energy storage charging and discharging intelligent control methods are executed.
[0208] The application startup device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present application, its implementation principle and the technical effect produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.
[0209] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0210] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0211] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0212] In addition, each functional module in the embodiments provided in the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0213] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0214] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0215] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0216] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A new energy microgrid energy storage charging and discharging intelligent control method, It is characterized in that The steps include: Step S1, establishing a microgrid model and designing a simulation environment according to the microgrid environment of the user-side park to generate active power of loads and photovoltaic power generation in the microgrid; Step S2, comprehensively considering the single-objective or multi-objective optimization problem of the user-side park microgrid, and establishing an environmental reward function; Step S3, establishing a deep reinforcement learning PPO model, performing model training and tuning, and obtaining the final microgrid energy storage charging and discharging control model; Step S4, real-time collection of user-side park microgrid data, input into the microgrid energy storage charging and discharging control model to perform intelligent control of microgrid energy storage charging and discharging; The step S2 comprises: Determine an optimization goal, wherein the optimization goal is to improve the power efficiency of the park and reduce power expenditure; Establish an environmental reward function based on the benefits of each energy storage charge and discharge : , , in: is the sampling time point, the sampling period is 1 minute; Is the energy storage according to the current instruction The electricity consumption of the micro-grid gateway meter in the current time period during the action is charged. The energy storage does not work. The electricity billing of the micro-grid gateway meter in the current time period; It is the electric energy sent back to the grid by the energy storage during this period; Is the energy storage according to the current instruction The power demand during operation, The energy storage does not work. The power demand at yes The power demand before the time; is the proportionality coefficient, which is determined according to the parameters of the actual microgrid; Reduce the state vector to a low-dimensional state space and construct an intrinsic reward that represents the entropy of the state space; The state vector is reduced to a low-dimensional state space to construct an intrinsic reward that represents the entropy of the state space, including: Use a random encoder to transform the 14-dimensional state vector The state vector in the low-dimensional state space reduced to 6 dimensions , and Recording to playback buffer middle; Use the k-nearest neighbor algorithm to retrieve the playback buffer Find the distance Recent A low-dimensional representation space state vector: ; Calculate intrinsic reward: ; Calculate the expected reward: , in, , as the training time increase, The purpose is to reduce the proportion of intrinsic rewards in expected rewards as the training time increases; Use expected rewards Replace the environment reward function Perform model training.
2. The new energy microgrid energy storage charging and discharging intelligent control method according to claim 1, It is characterized in that The step S1 comprises: A microgrid model is established based on the user-side campus microgrid environment, wherein the microgrid model includes steady-state and dynamic characteristics of energy storage equipment, converters, and load equipment, as well as an interface model between the microgrid and an external large grid; An expression of the microgrid state is established; the expression of the microgrid state is: , in: is the time scale of the current moment; yes Battery state of charge at all times; is the installed capacity of energy storage; is the battery health status; is the minimum state of charge of the battery; is the maximum value of the battery state of charge; is the maximum active power of energy storage charging; is the maximum active power of energy storage discharge; is the energy storage charge and discharge conversion efficiency; is the electricity price at the current moment; is the load active power at the current moment; is the photovoltaic active output at the current moment; is the set demand defense threshold; is the anti-backflow protection threshold; Create action expressions; Control actions that need to be taken at all times : , in, It is the charge and discharge active power instruction of energy storage; , energy storage and discharge; , energy storage and charging; , energy storage is neither charged nor discharged; and , is the maximum active power of energy storage charging, is the maximum active power of energy storage discharge; Use the python power flow calculation library pandapower to establish a microgrid simulation environment. The python power flow calculation library pandapower supports power flow, optimal power flow, state estimation, short circuit calculation and topology map search; Generates active power for loads and photovoltaic power generation in the microgrid.
3. The new energy microgrid energy storage charging and discharging intelligent control method according to claim 2, It is characterized in that In the process of establishing the microgrid model, the entire microgrid system satisfies the following power balance formula: , in, is the power load of the microgrid system; is the photovoltaic power generation power; is the active power of energy storage operation. When it is equal to 0, the energy storage is neither charged nor discharged. When it is less than 0, the energy storage is charged. When it is greater than 0, the energy storage is discharged; It is the input power of the external large power grid. If it is greater than 0, it means that power is taken from the large power grid, and if it is less than 0, it means that power is supplied to the large power grid.
4. The new energy microgrid energy storage charging and discharging intelligent control method according to claim 2, It is characterized in that The generating active power of the load and photovoltaic power generation in the microgrid includes: Deploy an intelligent energy management system in the target microgrid, and then use traditional methods to control the charging and discharging of energy storage for a period of time, such as one month; Use the intelligent energy management system to collect the active power data of load and photovoltaic power generation during this period, with a sampling period of 1 minute; Use mathematical statistics to analyze the load and active power data of photovoltaic power generation during this period and find the characteristics in the data; Obtain the annual photovoltaic irradiance and air quality conditions at the target microgrid location; According to the characteristics and annual photovoltaic irradiance and air quality conditions of the target microgrid location, an algorithm is used to automatically generate N years of load and photovoltaic power generation data.
5. The new energy microgrid energy storage charging and discharging intelligent control method according to any one of claims 1 to 4, It is characterized in that The deep reinforcement learning PPO model applies the mechanism of deep reinforcement learning to maximize the expected return. Through the interaction between the agent and the environment, after performing an action in a certain state, the agent will receive the next state of the environment and the corresponding reward return, thus forming a state-action-reward return trajectory chain; The optimization objective function of the deep reinforcement learning PPO model is: , in, is the action strategy, , are the environmental reward, action and state at time t respectively; Among all possible action strategies In this paper, we find an action strategy , the trajectory chain generated by it Get the maximum cumulative reward return, action strategy Recorded in the actor model in the figure in the form of neural network parameters.
6. A new energy microgrid energy storage charging and discharging intelligent control device, It is characterized in that include: The simulation environment design module is used to establish a microgrid model and design a simulation environment based on the microgrid environment of the user-side park, and generate active power of loads and photovoltaic power generation in the microgrid; The environment reward function establishment module is used to comprehensively consider the single-objective or multi-objective optimization problems of the user-side park microgrid and establish the environment reward function; The model building and training module is used to build a deep reinforcement learning PPO model, perform model training and optimization, and obtain the final microgrid energy storage charging and discharging control model; The charging and discharging control module is used to collect the user-side park microgrid data in real time and input the microgrid energy storage charging and discharging control model to perform intelligent control of the microgrid energy storage charging and discharging; The environmental reward function establishment module is used to comprehensively consider the single-objective or multi-objective optimization problem of the user-side park microgrid. The specific process of establishing the environmental reward function includes: Determine an optimization goal, wherein the optimization goal is to improve the power efficiency of the park and reduce power expenditure; Establish an environmental reward function based on the benefits of each energy storage charge and discharge : , , in: is the sampling time point, the sampling period is 1 minute; Is the energy storage according to the current instruction The electricity consumption of the micro-grid gateway meter in the current time period during the action is charged. The energy storage does not work. The electricity billing of the micro-grid gateway meter in the current time period; It is the electric energy sent back to the grid by the energy storage during this period; Is the energy storage according to the current instruction The power demand during operation, The energy storage does not work. The power demand at yes The power demand before the time; is the proportionality coefficient, which is determined according to the parameters of the actual microgrid; Reduce the state vector to a low-dimensional state space and construct an intrinsic reward that represents the entropy of the state space; The state vector is reduced to a low-dimensional state space to construct an intrinsic reward that represents the entropy of the state space, including: Use a random encoder to transform the 14-dimensional state vector The state vector in the low-dimensional state space reduced to 6 dimensions , and Recording to playback buffer middle; Use the k-nearest neighbor algorithm to retrieve the playback buffer Find the distance Recent A low-dimensional representation space state vector: ; Calculate intrinsic reward: ; Calculate the expected reward: , in, , as the training time increase, The purpose is to reduce the proportion of intrinsic rewards in expected rewards as the training time increases; Use expected rewards Replace the environment reward function Perform model training.
7. A computer device, It is characterized in that It includes a processor, a memory and a bus, the memory stores machine-readable instructions executable by the processor, when the computer device is running, the processor and the memory communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the new energy microgrid energy storage charging and discharging intelligent control method as described in any one of claims 1-5.
8. A storage medium, It is characterized in that The storage medium stores a computer program, which, when executed by a processor, executes the steps of the new energy microgrid energy storage charging and discharging intelligent control method as described in any one of claims 1 to 5.
