Distribution network risk dynamic early warning method, system, device and storage medium

Through the dynamic early warning method of distribution network risks based on reinforcement learning algorithms, using deep reinforcement learning models and DQN algorithms, the problem of traditional early warning methods being too time-consuming is solved, achieving rapid response and efficient judgment of distribution network risks, and improving Ensure the safety and reliability of power supply.

CN114219045BActive Publication Date: 2024-10-18STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202111667786.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2024-10-18
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

Traditional distribution network risk early warning methods take too long, resulting in low early warning efficiency and inability to respond to distribution network faults in a timely manner, affecting the safety and reliability of power supply.

Method used

A dynamic early warning method for distribution network risks based on reinforcement learning algorithms is adopted. By obtaining online operation data and predicted user-side daily load data, a deep reinforcement learning model is constructed, and the DQN algorithm is used to train the distribution network risk early warning model to determine whether the power grid exists. Risks are avoided, power flow calculations are avoided, and judgment time is shortened.

Benefits of technology

It achieves rapid response and efficient judgment of distribution network risk early warning, improves early warning efficiency, shortens early warning time, and improves the safety and reliability of power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114219045B_ABST
    Figure CN114219045B_ABST
Patent Text Reader

Abstract

The present invention discloses a distribution network risk dynamic early warning method, system, device and storage medium, the method includes the steps of: obtaining the online operation data of the distribution network and the predicted daily load data of the user side; inputting the online operation data of the distribution network and the predicted daily load data of the user side as the state into the preset distribution network risk dynamic early warning model; the distribution network risk dynamic early warning model outputs the distribution network lines and nodes with risks. For the online distribution network, only the corresponding state needs to be input to determine whether the network has risks, and because the judgment process does not need to perform flow calculation on the entire distribution network, the time consumed is relatively short, so the distribution network risk dynamic early warning method based on the reinforcement learning method has the advantages of fast calculation speed and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distribution network operation warning, and specifically relates to a distribution network risk dynamic early warning method, system, device and storage medium based on a reinforcement learning algorithm. Background Art

[0002] With the rapid development of urban distribution network technology, distribution network construction has gradually entered a high reliability stage. According to statistics, more than three quarters of power outages are caused by failures in the distribution network. At the same time, the large-scale access of distributed renewable energy sources such as photovoltaic and wind power, which are intermittent and uncertain, to the power grid has also had an impact on the voltage and current of the power grid, greatly increasing the risk of distribution network operation. Therefore, it is particularly important to effectively warn of the failure risks existing in the operation of the distribution network so as to take risk prevention and control measures in a timely manner to ensure the safety and reliability of power supply.

[0003] The traditional distribution network risk warning method is mainly based on the state monitoring data of power flow, voltage, frequency, etc., and then evaluates and warns the operation risk of the distribution network. However, the network topology of the distribution network is complex, the distribution is relatively scattered, the equipment is diverse, and the equipment operation status is easily affected by external factors. Therefore, it takes a long time to use the traditional method for risk warning, which results in a long warning response time and low warning efficiency. Summary of the invention

[0004] The purpose of the present invention is to provide a distribution network risk dynamic early warning method, system, device and storage medium based on reinforcement learning algorithm, so as to solve the problems of low warning efficiency and untimely warning caused by the traditional warning method relying on flow calculation in the prior art due to the long time consumption.

[0005] In order to achieve the above object, the present invention adopts the following technical solution:

[0006] A first aspect of the present invention provides a distribution network risk dynamic early warning method based on a reinforcement learning algorithm, comprising the following steps:

[0007] Obtain online operation data of the distribution network and predicted daily load data on the user side;

[0008] The online operation data of the distribution network and the predicted daily load data of the user side are used as state inputs into a preset distribution network risk dynamic early warning model;

[0009] The distribution network risk dynamic early warning model outputs distribution network lines and nodes that are at risk.

[0010] Optionally, the distribution network risk dynamic early warning model is obtained as follows:

[0011] The historical data of the distribution network involved in the risk warning of the distribution network is obtained as the data source, and the historical data of the distribution network is converted into an original sample set suitable for the reinforcement learning algorithm;

[0012] Using the original sample set to establish a distribution network system environment model, and construct a deep reinforcement learning model of the intelligent agent, the distribution network system environment model is used to receive the actions of the deep reinforcement learning model and feed back a reward / penalty function to the deep reinforcement learning model; wherein the reward / penalty function includes a distribution network risk assessment indicator;

[0013] The deep reinforcement learning model and the distribution network system environment model are used for offline training and learning to obtain a dynamic early warning model for distribution network risks.

[0014] Optionally, the original sample set is obtained as follows:

[0015] The distribution network historical operation data is converted into a data set X in a k×n matrix format; k is the number of historical records, and n is the number of influencing factors used to assess the risk of the distribution network plus 1;

[0016] Clean the data set: including processing of missing data values, outlier data values, and duplicate data values;

[0017] Kernel principal component analysis is used to extract features from the cleaned data set to determine the core data feature sequence {x1, x2, ..., x m}, where m∈[1,n-6];

[0018] Based on the data feature sequence {x1, x2, ..., x m} and necessary influencing features to generate the original sample set Y suitable for the reinforcement learning algorithm.

[0019] Optionally, the distribution network risk assessment indicators include node voltage out of bounds and line overload.

[0020] Optionally, a distribution network system environment model is constructed as follows:

[0021] Set the agent state space, including the distribution network topology, the active power output P of the generator G and voltage setting value U N 、Load power consumption P L , the transmission power of each line (line flow) P l , transmission power loss P loss 、The voltage of each node U i ;

[0022] Set the agent action space. The distribution network contains a total of n nodes and m lines. The action space includes all nodes x iand line y j All possible states, where i∈(0,1,…,n),j∈(0,1,…,m); each node has three states x i ∈(0,1,2), representing: 0 normal voltage, 1 positive voltage out of bounds, 2 negative voltage out of bounds; each line has two states y j ∈(0,1), respectively representing: 0 line is normal, 1 line is overloaded;

[0023] Action output set T = {(x1,…,x i ),(y1,…,y j )};

[0024] Set up agent reward / penalty mechanisms;

[0025] The distribution network system environment model is obtained through the above steps.

[0026] Optionally, set up the agent reward / penalty mechanism as follows:

[0027] Record all current state voltage out-of-bounds nodes x a (a≤(1,n),x a ∈(1,2)) and overload line y b (b≤(1,m),y b =1), the output set F = {(x1,…,x a ),(y1,…,y b )} includes all voltage-out-of-bounds nodes and overloaded lines;

[0028] Combine the nodes x in the set T and the set F i and line y j Compare them one by one;

[0029] When a=i, if x a =x i , then r1=100;

[0030] When b = j, if y b =y j , then r2=100;

[0031] If the states of adjacent nodes or lines are the same and do not include the 0 state, r3=40;

[0032] Let 15 minutes be a time step, and the total reward fed back to the agent by the environment model at each time step is: R = r1 + r2 + r3.

[0033] Optionally, build a deep reinforcement learning model as follows:

[0034] Initialize the replay memory unit D, which can hold N data items; initialize the real Q network and randomly generate weights ω; initialize the target Q network, with the same weights ω;

[0035] Loop through, each event episode=1,2,…,M, M is the total number of days; initialize the first state S1;

[0036] At intervals of 15 minutes, loop through each step of each event step=1,2,…,T;

[0037] Generate action a using ∈-greedy strategy t : Choose a random action a with probability ∈ t ; If the low-probability event does not occur, use the greedy strategy to select the action with the largest current value function; a t = argmax a Q(s t ,a,ω);

[0038] Execute action a in the distribution network system environment model t , receive reward r t and the new state s t+1 ; Convert the result (s t ,a t ,r t ,s t+1 ) is stored in the playback memory unit D;

[0039] Uniformly randomly sample a transformation sample data (s) from the replay memory unit D k ,a k ,r k ,s k+1 ); determine whether it is the terminal state of an event. If it is the terminal state, use the TD target network parameter ω to calculate the TD reward:

[0040]

[0041] Execute a gradient descent algorithm:

[0042]

[0043] Update the network parameters θ=θ+Δθ of the action value function approximation; update the target Q network every C steps;

[0044] End the loop within each event; end the loop between events;

[0045] Get the DQN reinforcement learning model.

[0046] A second aspect of the present invention provides a system for the distribution network risk dynamic early warning method based on reinforcement learning algorithm, comprising:

[0047] Data acquisition module, used to obtain online operation data of distribution network and predicted daily load data of user side;

[0048] The prediction module is used to input the online operation data of the distribution network and the predicted daily load data of the user side as the state into the preset distribution network risk dynamic early warning model; the distribution network risk dynamic early warning model outputs the distribution network lines and nodes with risks.

[0049] According to a third aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for dynamic early warning of distribution network risks based on a reinforcement learning algorithm is implemented.

[0050] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for dynamic early warning of distribution network risks based on a reinforcement learning algorithm is implemented.

[0051] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0052] (A) The distribution network risk dynamic early warning method based on reinforcement learning algorithm provided by the present invention uses artificial intelligence algorithm to solve the distribution network risk dynamic early warning, converts the distribution network risk warning problem into a Markov decision process, selects the network structure, power generation and load of the distribution network as the state, takes the judgment of whether all nodes and lines have risks as the action, takes the correctness of risk warning as the reward, and then uses the DON reinforcement learning algorithm to train the distribution network risk warning model. For the online distribution network, only the corresponding state needs to be input to judge whether the network has risks. Because the judgment process does not need to calculate the flow of the entire distribution network, the time consumed is short. Therefore, the distribution network risk dynamic early warning method based on reinforcement learning method has the advantages of fast calculation speed and high efficiency.

[0053] (B) The DQN algorithm used in the present invention is an algorithm that is widely used in the field of reinforcement learning and has excellent performance. It is a reinforcement learning algorithm that combines deep neural networks and Q-learning. Compared with traditional Q-learning algorithms, it has a deeper neural network and stores more actions. It can solve the problem of "dimensionality curse" and is suitable for making decisions on various discrete actions. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0055] Figure 1 This is a flow chart of a method for dynamic early warning of distribution network risks based on a reinforcement learning algorithm according to an embodiment of the present invention;

[0056] Figure 2 A structural diagram of the process of interaction between a reinforcement learning agent and an environment in an embodiment of the present invention;

[0057] Figure 3 This is a structural diagram of the DQN reinforcement learning algorithm training process in an embodiment of the present invention;

[0058] Figure 4 4 is a flow chart of a Markov decision process (MDP) in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0060] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention.

[0061] In the first aspect of the embodiment of the present invention, a method for dynamic early warning of distribution network risk based on reinforcement learning algorithm is provided, which uses artificial intelligence algorithm to solve the dynamic early warning of distribution network risk. The principle is: first, the distribution network risk warning problem is converted into a Markov decision process, the network structure, power generation and load of the distribution network are selected as the state, and the judgment of whether all nodes and lines are at risk is taken as an action, and the correctness of the risk warning is taken as a reward, and then the DON reinforcement learning algorithm is used to train the distribution network risk warning model. For the online distribution network, only the corresponding state needs to be input to determine whether the network is at risk. Because the judgment process does not need to calculate the flow of the entire distribution network, the time consumed is short, so the distribution network risk dynamic early warning method based on the reinforcement learning method has the advantages of fast calculation speed and high efficiency.

[0062] like Figure 1As shown, the distribution network risk dynamic early warning method based on reinforcement learning algorithm provided by the present invention uses the reinforcement learning algorithm model to autonomously learn the risk warning process. The trained model can immediately determine whether there is a risk and the location of the risk according to the current distribution network state, including the following steps:

[0063] Step 1: Data preprocessing: select the historical data of the distribution network in a certain area as the data source, and convert the historical data involved in the theoretical risk warning of the distribution network into an original sample set suitable for the reinforcement learning algorithm.

[0064] Specifically, in this embodiment, the influencing factors in the risk warning of the distribution network are given as examples, such as active power supply P, reactive power supply Q, total line length, temperature, seasonal factors, etc., and the factors that cause the greatest risk impact on the power grid are determined through kernel principal component analysis to reduce the amount of calculation. The historical data involved in the factors that cause the greatest risk impact on the power grid is used as the data source.

[0065] Applied to the embodiment of the present invention, Kernel Principal Components Analysis (KPCA) is an algorithm suitable for nonlinear principal feature extraction, which is an improvement over linear principal component analysis (PCA). The core idea of ​​KPCA is to extract the original n-dimensional Euclidean space R n The original data with complex nonlinear relationships are transformed into Hilbert feature space by kernel function mapping, so that they present linear relationships in Hilbert space, and linear PCA is used to extract principal components in Hilbert space.

[0066] The data preprocessing process in the present invention mainly consists of the following four sub-steps:

[0067] Step 11: Convert the historical operation data records of the distribution network in a certain area into a data set X in a k×n matrix format; k is the number of historical records, and n is the number of influencing factors used to assess the risk of the distribution network plus 1;

[0068] Specifically, in the matrix format data set, each row represents a distribution network operation data at a certain time, and each column represents various factors that affect whether the distribution network has operation risks, such as active power supply P, reactive power supply Q, voltage setting value U N 、Load power consumption P L , theoretical line loss value, total line length, temperature, seasonal factors, etc.

[0069] Step 12: Clean the data set X: including processing of missing data values, outlier data values, and duplicate data values.

[0070] Specifically, data missing value processing: remove or supplement missing records and missing fields in records; data outlier processing: remove or replace data with excessive deviations; data duplicate value processing: remove duplicate data.

[0071] Step 13: Extract features from the cleaned data set X, and use kernel principal component analysis to determine the core data feature sequence {x1, x2, ..., x m}, where m∈[1,n-6];

[0072] Specifically, since there are many influencing factors in the distribution network risk warning, in order to simplify the evaluation process, it is necessary to determine the core factors {x1, x2, ..., x m}, m∈[1,n-6], as data features. At the same time, some necessary influencing factors (including the generator active power P G , voltage setting value U N 、Load power consumption P L , Theoretical transmission power loss P ioss 、The voltage of each node U i ) without feature extraction and must appear in the environmental model of the distribution network.

[0073] The features of other factors other than the necessary influencing factors are extracted. The actual influencing factors of distribution network risk assessment often present a complex nonlinear relationship in the original data sample space, so it is difficult to directly determine which factors have the greatest impact. This method uses kernel principal component analysis to map various distribution network risk assessment influencing factors in the original data sample to the Hilbert space, so that they present a linear relationship in the Hilbert space to determine the core factors {x1, x2, …, x3, …, …4, …5, …6, …7, …8, …9, …10, …11, …12, …13, …14, …15, …16, …17, …18, …19, …20, …21, …22, …23, …24, …25, …26, …27, …28, …29, …30, …31, …32, …33, …34, …35, …36, …37, …38, …39, …40, …41, …42, …43, …44, …45, …46, …47, …48, …49, …50, …51, …60, …61, …62, …63, …64, …76, …77, …89, …90, …91, …92, …93, …94, …95, …96, …97, …98, …99, …91, …9 ... m}. The specific process is as follows:

[0074] Introduce the transformation X=Φ(x) from the original sample space Rn to the Hilbert space, that is:

[0075] Rn → Hilbert

[0076] X→X=Φ(x)

[0077] And assume that Φ(xi) has been centered, and calculate the covariance matrix C of each point in the Hilbert space;

[0078] Solving for λ v =C vThe eigenvector v corresponding to the λ and non-zero λ in , where v must be in the range of Φ(x1), Φ(x2), …, Φ(x m ), then v can be expressed as: i , we get the dual characteristic equation mλα=Kα, α=[α1…αm] T , where K ij =<Φ(x i ),Φ(x j )> is a Gram matrix; let λ n <α n , α n >=1, that is, the eigenvector is normalized; then calculate each Φ(x i ) on v i (x), where g i (x) corresponds to Φ(x i )’s nonlinear principal component;

[0079] All projection values ​​g i (x) into a vector g(x) = [g1(x),…,g n (x)] T , as the eigenvector of the sample; the ratio represents the component g i (x) Contribution to the overall variance of the sample, select a number of lambdas with the largest eigenvalues ​​(the number depends on the actual situation) i The corresponding eigenvector v i The feature subspace required for the experiment is constructed, that is, the data feature extraction is completed.

[0080] Step 14: According to the data feature sequence {x1, x2, ..., x m} and necessary influence features to generate the original sample set Y suitable for the reinforcement learning algorithm. Y is a k×(m+6) matrix. In the sample set Y, each row represents a known distribution network operation data at a certain time, and each column represents the core data feature sequence {x1, x2, …, x m} and necessary influencing features.

[0081] Step 2: Establish distribution network risk assessment indicators;

[0082] When a transmission line fails and stops operating, the active power flow will shift, and there is a risk of line overload and node voltage crossing near the fault point. The indicators are: Line overload: Node voltage out of bounds:

[0083] Step 3: Use the preprocessed data to establish a distribution network system environment model and build a deep reinforcement learning model of the intelligent agent. Integrate the risk assessment index into the reward (penalty) function, use the DQN reinforcement learning model and simulation environment for offline training and learning, and obtain a distribution network risk dynamic early warning model that meets the error requirements;

[0084] Specifically, reinforcement learning can effectively solve the control and decision-making problems of complex physical systems. Figure 2 It is a reinforcement learning process for the interaction between the agent and the system environment. Each time the system environment executes an action given by the agent, it returns a new system state and calculates the corresponding reward value; and the agent, based on the current state, aims to output a control action that can maximize the expected value of the reward, and continuously learns and improves its action strategy in the process of interacting with the actual environment.

[0085] As an example, in traditional Q learning algorithms, due to the curse of dimensionality, reinforcement learning is difficult to solve large-scale MDP problems. Therefore, a representative algorithm of deep reinforcement learning, deep Q network (DQN), was developed based on the Q learning algorithm and deep neural network. This method fits the action value function through a neural network, learns the Q value of all state-action pairs in the process of interaction between a limited number of states and the environment, and thus learns the optimal strategy.

[0086] like Figure 3 As shown, Figure 3 For the DQN algorithm training process, step 3 specifically includes the following steps:

[0087] Step 31: Construct a distribution network system environment model;

[0088] Applied to the embodiment of the present invention, the distribution network system environment model is the power system environment that interacts with the intelligent agent, that is, for each action given by the reinforcement learning intelligent agent, it can be calculated whether there is a risk under this strategy, and the reward function can be fed back to update the strategy, and it is continuously iterated until the optimal strategy is learned.

[0089] As an example, a power grid is essentially a graph consisting of nodes corresponding to substations connected to loads, generators, and power lines. Generators generate electricity, loads consume electricity, and power lines transmit electricity between substations. Substations and transmission lines are regarded as nodes and edges respectively, and the power grid topology is represented by an undirected graph G(V,E), where V is the node set and E is the edge set.

[0090] In this embodiment, each substation has two buses, that is, a double bus system. The components connected to the substation, namely the load, generator and power line, can be assigned to one and the power is only transmitted through the components on the same bus. Therefore, each substation is regarded as divided into two nodes. The other power flow calculation parts are calculated by the power flow calculation software matpower.

[0091] In this embodiment, the environment is formalized as a Markov decision process (MDP).

[0092] Specifically, MDP can be defined as a tuple (S, A, P, R, γ), which represents the state space, action space, state transition probability, reward function and discount factor respectively. The agent observes the state s from the environment t ∈S, and takes action a at time step t t ∈A, the agent with probability P(s t+1 |s t ,a t ) arrives at a new state s t+1 , and receive reward r(s t ,a t ,s t+1 ). Its state transformation process is as follows Figure 4 shown.

[0093] Step 32: Agent state space;

[0094] Specifically, the state of the distribution network is composed of various features extracted from the distribution network environment model, including the distribution network topology (connectivity of each power line and busbar allocation in each substation), the active power output P of the generator G and voltage setting value U N 、Load power consumption P L , the transmission power of each line (line flow) P l , transmission power loss P loss 、The voltage of each node U i wait.

[0095] Step 33: Agent action space;

[0096] In this embodiment, the action is directly selected through the reinforcement learning model without the need for complex calculations.

[0097] Specifically, the distribution network contains a total of n nodes and m lines, and the action space includes all nodes x i and line y j All possible states, where i∈(0,1,…,n),j∈(0,1,…,m). Each node has three states x i∈(0,1,2), representing: 0 normal voltage, 1 positive voltage out of bounds, 2 negative voltage out of bounds; each line has two states y j ∈(0,1), respectively representing: 0 line is normal, 1 line is overloaded.

[0098] Action output set T = {(x1,…,x i ),(y1,…,y j )}.

[0099] Step 34: Agent reward (punishment) mechanism;

[0100] Applied to the embodiment of the present invention, the agent maximizes its cumulative reward through continuous learning within a time period, and sets an agent reward (penalty) mechanism for the distribution network system, so that the predicted voltage crossing nodes and overloaded lines are as accurate as possible. The specific method is:

[0101] (1) Record all current state voltage out-of-bounds nodes x a (a≤(1,n),x a ∈(1,2)) and overload line y b (b≤(1,m),y b =1), the output set F = {(x1,…,x a ),(y1,…,y b )} includes all voltage-out-of-bounds nodes and overloaded lines;

[0102] (2) The nodes x in sets T and F are i and line y j Compare them one by one;

[0103] (3) When a=i, if x a =x i , then r1=100;

[0104] (4) When b = j, if y b =y j , then r2=100;

[0105] (5) If the states of adjacent nodes or lines are the same (excluding the 0 state), r3 = 40;

[0106] Let 15 minutes be a time step, and the total reward fed back to the agent by the environment model at each time step is:

[0107] R=r1+r2+r3

[0108] Step 35: DQN algorithm process;

[0109] In this embodiment, DQN is used to transform the Q-table update into a function fitting problem. A function is fitted to replace the Q-table to generate the Q value, so that similar states obtain similar output actions. Deep neural networks are very effective in extracting complex features, so DeepLearning is combined with Reinforcement Learning to generate the DQN algorithm.

[0110] Preferably, another part of the innovation of the DQN algorithm is to solve the correlation and non-static distribution problems through the experience replay method; using a real network to generate the current Q value and using another target network to generate the Target Q.

[0111] The specific algorithm flow is as follows:

[0112] (1) Initialize the playback memory unit D, which can accommodate N data items;

[0113] (2) Initialize the real Q network and randomly generate weights ω;

[0114] (3) Initialize the target Q network with the same weight ω;

[0115] (4) Loop through, each event episode = 1, 2, ..., M (M is the total number of days);

[0116] (5) Initialize the first state S1;

[0117] (6) Loop through each step of each event step = 1, 2, ..., T; (divide a day into 96 points at intervals of 15 minutes, T = 96);

[0118] (7) Generate action a using ∈-greedy strategy t : Choose a random action a with probability ∈ t ; If the low-probability event does not occur, use the greedy strategy to select the action with the largest current value function;

[0119]

[0120] (8) Execute action a in the distribution network system environment model t , receive reward r t and the new state s t+1 ;

[0121] (9) The conversion result (s t ,a t ,r t ,s t+1 ) is stored in D;

[0122] (10) Uniformly randomly sample a transformation sample data (s) from D k ,a k ,r k ,s k+1 );

[0123] (11) Determine whether it is the terminal state of an event. If it is the terminal state, use the TD target network parameter ω to calculate the TD reward

[0124] (12) Execute a gradient descent algorithm;

[0125]

[0126] (13) Update the network parameters of the action value function approximation θ = θ + Δθ;

[0127] (14) Update the target Q network every C steps;

[0128] (15) End the loop within each event; end the loop between events.

[0129] After the training and learning of the above steps, a risk dynamic early warning model based on the reinforcement learning algorithm is formed, thereby realizing accurate early warning of distribution network risks.

[0130] Step 4: Directly use the predicted daily load data of power users to represent the load characteristics of the user side, and use the distribution network risk dynamic early warning model to conduct online early warning of distribution network risks. It includes the following steps:

[0131] Step 41: inputting the online operation data of the distribution network and the predicted load data into the distribution network risk dynamic early warning model as the state;

[0132] Step 42: Directly output the distribution network lines and nodes that are at risk.

[0133] 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 in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0134] 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.

[0135] 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.

[0136] 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. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0137] It is known from common technical knowledge that the present invention can be implemented by other embodiments that do not deviate from its spirit or essential features. Therefore, the above disclosed embodiments are only illustrative in all respects and are not exclusive. All changes within the scope of the present invention or within the scope equivalent to the present invention are included in the present invention.

Claims

1. A distribution network risk dynamic early warning method based on reinforcement learning algorithm, characterized in that: The steps include: Obtain online operation data of the distribution network and predicted daily load data on the user side; The online operation data of the distribution network and the predicted daily load data of the user side are used as state inputs into a preset distribution network risk dynamic early warning model; The distribution network risk dynamic early warning model outputs distribution network lines and nodes with risks; The distribution network risk dynamic early warning model is obtained as follows: The historical data of the distribution network involved in the risk warning of the distribution network is obtained as the data source, and the historical data of the distribution network is converted into an original sample set suitable for the reinforcement learning algorithm; Using the original sample set to establish a distribution network system environment model, and construct a deep reinforcement learning model of the intelligent agent, the distribution network system environment model is used to receive the actions of the deep reinforcement learning model and feed back a reward / penalty function to the deep reinforcement learning model; wherein the reward / penalty function includes a distribution network risk assessment indicator; The deep reinforcement learning model and the distribution network system environment model are used for offline training and learning to obtain a dynamic early warning model for distribution network risks.

2. The distribution network risk dynamic early warning method based on reinforcement learning algorithm according to claim 1 is characterized in that: The original sample set is obtained as follows: The distribution network historical operation data is converted into a data set X in a k×n matrix format; k is the number of historical records, and n is the number of influencing factors used to assess the risk of the distribution network plus 1; Clean the data set: including processing of missing data values, outlier data values, and duplicate data values; Kernel principal component analysis is used to extract features from the cleaned data set to determine the core data feature sequence {x1, x2, ..., x m }, where m∈[1,n-6]; Based on the data feature sequence {1, x2, ..., x m } and necessary influencing features to generate the original sample set Y suitable for the reinforcement learning algorithm.

3. The distribution network risk dynamic early warning method based on reinforcement learning algorithm according to claim 1 is characterized in that: The distribution network risk assessment indicators include node voltage out of bounds and line overload.

4. The distribution network risk dynamic early warning method based on reinforcement learning algorithm according to claim 1 is characterized in that: The distribution network system environment model is constructed as follows: Set the agent state space, including the distribution network topology, the active power output P of the generator G and voltage setting value U N 、Load power consumption P L , the transmission power of each line (line flow) P l , transmission power loss P loss 、The voltage of each node U i ; Set the agent action space. The distribution network contains a total of n nodes and m lines. The action space includes all nodes. i and line y j All possible states, where i∈(0,1,…,n),j∈(0,1,…,m); each node has three states x i ∈(0,1,2), representing: 0 normal voltage, 1 positive voltage out of bounds, 2 negative voltage out of bounds; each line has two states y j ∈(0,1), respectively representing: 0 line is normal, 1 line is overloaded; Action output set T = {(x1,…,x i ),(y1,...,y j ); Set up agent reward / penalty mechanisms; The distribution network system environment model is obtained through the above steps.

5. The distribution network risk dynamic early warning method based on reinforcement learning algorithm according to claim 1 is characterized in that: Set up the agent reward / penalty mechanism as follows: Record all current state voltage out-of-bounds nodes x a (a≤(1,n),x a ∈(1,2)) and overload line y b (b≤(1,m),y b =1), the output set F = {(x1,…,x a ),(y1,...,y b )} includes all voltage-out-of-bounds nodes and overloaded lines; The nodes in set T and set F are i and line y j Compare them one by one; When a=i, if x a =x i , then r1=100; When b = j, if y b =y j , then r2=100; If the states of adjacent nodes or lines are the same and do not include the 0 state, r3=40; Let 15 minutes be a time step, and the total reward fed back to the agent by the environment model at each time step is: R = r1 + r2 + r3.

6. The distribution network risk dynamic early warning method based on reinforcement learning algorithm according to claim 1 is characterized in that: Build a deep reinforcement learning model as follows: Initialize the replay memory unit D, which can hold N data items; initialize the real Q network and randomly generate weights ω; initialize the target Q network, with the same weights ω; Loop through, each event episode=1,2,…,M, M is the total number of days; initialize the first state S1; At intervals of 15 minutes, loop through each step of each event step=1,2,…,T; Generate action a using ∈-greedy strategy t : Choose a random action a with probability ∈ t ; If the low-probability event does not occur, use the greedy strategy to select the action with the largest current value function; a t = argmax a Q(s t ,a,ω); Execute action a in the distribution network system environment model t , receive reward r t and the new state s t+1 ; Convert the result (s t ,a t ,r t ,s t+1 ) is stored in the playback memory unit D; Uniformly randomly sample a transformation sample data (s) from the replay memory unit D k ,a k ,r k ,s k+1 ); determine whether it is the terminal state of an event. If it is the terminal state, use the TD target network parameter ω to calculate the TD reward: Execute a gradient descent algorithm: Update the network parameters θ=θ+Δθ of the action value function approximation; update the target Q network every C steps; End the loop within each event; end the loop between events; Get the DQN reinforcement learning model.

7. A system for the distribution network risk dynamic early warning method based on reinforcement learning algorithm, characterized in that: include: Data acquisition module, used to obtain online operation data of distribution network and predicted daily load data of user side; A prediction module is used to input the online operation data of the distribution network and the predicted daily load data of the user side as states into a preset distribution network risk dynamic early warning model; the distribution network risk dynamic early warning model outputs the distribution network lines and nodes with risks; The distribution network risk dynamic early warning model is obtained as follows: The historical data of the distribution network involved in the risk warning of the distribution network is obtained as the data source, and the historical data of the distribution network is converted into an original sample set suitable for the reinforcement learning algorithm; Using the original sample set to establish a distribution network system environment model, and constructing a deep reinforcement learning model of the intelligent agent, the distribution network system environment model is used to receive the actions of the deep reinforcement learning model and feed back a reward / penalty function to the deep reinforcement learning model; wherein the reward / penalty function includes a distribution network risk assessment indicator; The deep reinforcement learning model and the distribution network system environment model are used for offline training and learning to obtain a dynamic early warning model for distribution network risks.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for dynamic early warning of distribution network risks based on reinforcement learning algorithm as described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the distribution network risk dynamic early warning method based on a reinforcement learning algorithm as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method for predicting theoretical line loss of power distribution network based on Boosting algorithm

    CN102231144A

  • Scheduling method and device for energy storage system of wind power plant integrated with prediction and decision

    CN110414725A

  • Face recognition method and device and storage medium

    CN110610117A

  • Power distribution network voltage regulation method based on deep reinforcement learning algorithm

    CN111884213A

  • Power distribution network load transfer method based on deep reinforcement learning

    CN112149347A