Power system critical inertia prediction method based on deep belief network
Through the critical inertia prediction method of power system based on deep confidence network, the problem of minimum overall inertia prediction required for grid frequency stability is solved, and fast and accurate prediction and safe and stable guarantee of grid frequency is achieved.
Patent Information
- Application Number
- CN202411592685.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art is difficult to quickly and accurately predict the minimum overall inertia required for grid frequency stability, especially when the inertia is weakened and the frequency characteristics deteriorate after large-scale grid connection of new energy.
Using the critical inertia prediction method of power system based on Deep Confidence Network (DBN), the deep confidence network model is constructed, the 36-dimensional input feature values are determined, the sample database is constructed, the training and test data sets are generated, and the neurons at each layer of the model are set to evaluate the prediction results.
It is realized that the actual equivalent inertia of the power grid is less than the critical inertia period, and the scheduling measures are made quickly and accurately, thereby ensuring the safety and stability of the power grid frequency.
Smart Images

Figure CN119651540A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system critical inertia prediction, and in particular to a power system critical inertia prediction method based on a deep belief network. Background Art
[0002] In order to meet the needs of sustainable development of resources and environment, my country has vigorously developed new energy power generation in recent years, and the installed capacity of wind power and photovoltaic power has continued to grow rapidly. However, since wind power and photovoltaic power are connected to the power supply through power electronic devices, they do not have rotational inertia and cannot provide frequency response similar to synchronous generators, which also brings about problems such as weakening of equivalent inertia of the power grid and reduced system frequency stability. Therefore, the minimum overall inertia required for power grid frequency safety should be predicted quickly and accurately so that the dispatching background can take effective measures to ensure the safety and stability of the power grid frequency.
[0003] At present, the research on the application of artificial intelligence in power system prediction mainly includes shallow algorithm research such as frequency dynamic analysis and prediction based on simplified system models. However, at this stage, power systems are becoming increasingly complex, highly nonlinear, and have huge amounts of data. Shallow learning algorithms are increasingly affected by the time and accuracy of data feature extraction and prediction and cannot solve the problem well. The application of deep learning is only in the field of grid frequency prediction. When the power system is seriously short of power, it cannot quickly and accurately determine whether the system can operate normally and stably under the disturbance. Therefore, there is an urgent need for a research method that can improve the previous shallow learning algorithm and directly predict the minimum overall inertia for the grid frequency to remain stable.
[0004] Therefore, faced with the problems of inertia weakening and frequency characteristic deterioration caused by large-scale grid connection of new energy, this paper mainly studies the minimum inertia required for frequency stability of the power grid after power shortage disturbance from the perspective of deep learning algorithm's ability to well mine the strong nonlinearity and complex and abstract data of the power grid. Summary of the invention
[0005] In order to quickly and accurately obtain the minimum overall inertia required to ensure the safety of the power grid frequency, the present invention proposes a method for predicting the critical inertia of the power system based on a deep belief network. First, an artificial intelligence algorithm that quickly and effectively mines the deep features of the data is selected to construct a deep belief network structure; then, from the perspective of factors affecting the critical inertia, the 36-dimensional input feature values of the deep belief network are determined; a sample database for predicting the critical inertia of the deep belief network is constructed to generate a sample data set for training and testing; finally, each layer of neurons of the prediction model is set, and the model prediction results are evaluated. This method can quickly and accurately take effective measures in the dispatching background during the period when the actual equivalent inertia of the power grid is less than the critical inertia, thereby ensuring the safety and stability of the power grid frequency.
[0006] The technical solution adopted by the present invention is:
[0007] The power system critical inertia prediction method based on deep belief network includes the following steps:
[0008] Step 1: Build a deep belief network DBN model;
[0009] Step 2: According to the influence of critical inertia H min The main factor that determines the input feature value x of the deep belief network DBN model k , output eigenvalue y n ;
[0010] Step 3: Construct the predicted critical inertia H min Sample database, generate training sample set and test sample set;
[0011] Step 4: Set the neurons in each layer of the deep belief network DBN model and evaluate the model prediction results.
[0012] In the step 1, the deep belief network DBN model is composed of a plurality of restricted Boltzmann machines (RBMs) and a single-layer back propagation neural network (BPNN);
[0013] The restricted Boltzmann machine (RBM) consists of two layers: the visible layer and the hidden layer. The neurons in the visible layer are called visible nodes. Each node is a unit that processes input data, accepts data input and decides whether to pass it to the next layer. The neurons in the hidden layer are called hidden nodes. Their main function is to reconstruct the input data, that is, feature transformation. By analyzing the input, more abstract and representative output features are extracted.
[0014] The single-layer back propagation neural network (BPNN) has only one layer of structure, consisting of multiple neurons, each of which has only one output, representing the predicted value of the model. Back propagation solves the problem that the hidden layer weights cannot be trained, making it possible to build deep models, allowing the model to learn statistical laws from a large number of training samples, and thus predict unknown events.
[0015] The input layer and label layer of the DBN model have k and n neurons respectively, corresponding to k input features and n output features. The input layer accepts external input information, extracts features from it, and generates neurons, that is, one neuron corresponds to one feature input; the input layer is connected to the hidden layer, which includes multiple RBM layers, each layer corresponding to a higher level of abstraction of the data; the highest layer is the label layer, which is usually composed of an RBM or other model, responsible for the extraction and representation of the final features.
[0016] A single-layer back propagation neural network (BPNN) is used to find the mapping relationship between the input feature v and the output feature h. The mapping relationship is expressed by the joint probability distribution function p(v,h):
[0017]
[0018] In formula (1), p(v,h|θ) represents the joint distribution relationship between input and output when the parameter θ is determined; Z(θ) is the partition function, which is a normalization constant that makes the probability distribution sum equal to 1; θ = (w,a,b) is the parameter of RBM, w represents the weight between the visible layer and the hidden layer; a and b represent the bias of the visible layer and the hidden layer respectively; E(v,h|θ) is the energy function, which represents the connection energy weight between layers; the partition function and energy function expressions are as follows (2) and (3):
[0019]
[0020]
[0021] In formula (3), a i 、v i Respectively represent the bias and state of the i-th neuron in the visible layer; b j 、h j They represent the bias and state of the jth neuron in the hidden layer respectively; m and n represent the number of neurons in the visible layer and the hidden layer respectively; v ij is the weight between neurons i and j; w i,j Represents the weight between the i-th visible unit in the visible layer and the j-th hidden unit in the hidden layer; lower energy means that the network is in a more ideal state, and the mapping probability between the two layers is greater, that is, the prediction error of the critical inertia of the system is lower.
[0022] Because there is no connection between the hidden layer and the visible layer, when the node state of one layer is known, the activation state of the other layer is independent. When the state value of the visible layer is given, the conditional probability of the hidden layer is:
[0023]
[0024] In formula (4), p(h j |v) indicates that when the value of the visible layer node is known, the jth neuron h in the hidden layer j The state probability distribution of p(h|v) represents the product of the state probability distribution of n neurons in the hidden layer;
[0025] Among them, the probability of calculating a single node, that is, h j =1 or v i =1 is calculated as:
[0026]
[0027] In formula (5) and formula (6), σ(x) is the sigmoid activation function, and its expression is:
[0028]
[0029] In step 1, the deep belief network DBN model also includes pre-training:
[0030] The pre-training process is as follows: starting from the input layer, every two layers are treated as a restricted Boltzmann machine (RBM), and they are trained layer by layer until the parameters of all RBMs, that is, the initial weights of RBMs, are obtained; after that, the parameter fine-tuning process uses the gradient descent algorithm to fine-tune the parameters of the entire network model so that the mapping of the entire deep belief network DBN model is optimal.
[0031] Gradient descent is a first-order iterative optimization algorithm used to find the local minimum of a given function. The basic idea is to start from an initial point and move in the direction of the negative gradient to reduce the value of the objective function. Repeat the above steps for multiple iterations until a certain convergence criterion is met. The basic principle expression is as follows:
[0032]
[0033] In formula (8) and formula (9), w t 、w t+1 They represent the values of the independent variable w at iterations t and t+1 respectively; c is the step size factor, i.e., the appropriate step size for gradient descent; ▽f wt Represents the function f in w t The first-order derivative at ; ε is a number greater than zero, which is used to judge the convergence criterion of the objective function.
[0034] The training objective of the restricted Boltzmann machine (RBM) is to train a specific set of training samples V = {v 1 ,v 2 ,...,v m}Get the product that maximizes the probability, v 1 ,v 2 ,...,v m Respectively represent the states of the 1st, 2nd, ....mth neurons in the visible layer; the model parameter θ can be obtained by maximizing the log-likelihood function L(θ) of RBM on the input training set:
[0035]
[0036] In formula (10), v k represents the state of the kth neuron in the visible layer, p(v k |h,θ) represents the probability distribution of the visible layer nodes when the model parameters and hidden layer node values are obtained, and V represents the training sample set.
[0037] In order to obtain the optimal weight parameter matrix, w ij 、a i and b j The data distribution is obtained by multiple Gibbs sampling as the expectation of the RBM definition. Among them, the parameter w ij Update as follows:
[0038]
[0039] In formula (11), is the momentum; η is the learning rate; <v i h j > data is the actual data distribution; <v i h j > model The expectation defined for the RBM model, the other two parameters a i and b j Update adjustments can also be made in a similar manner.
[0040] In step 2, the problem of predicting the frequency value of the power system after the disturbance based on the deep belief network DBN model can be described as the problem of solving the model between input X→output Y.
[0041] Input sample set:
[0042]
[0043] In formula (12), l represents the number of samples; X N l It means there are l samples; N is the number of selected input features, that is, each sample input has N feature values; there are l samples in total, and each row represents an input sample.
[0044] The output sample set corresponds to the input sample set, and each line is an output sample, which can be described as:
[0045]
[0046] In formula (13), Y i Represents the critical inertia value of output sample i; the output values of the 1st...96th neurons correspond to the changing values of the critical inertia with the change of new energy penetration rate in one day. The time resolution of new energy penetration rate is calculated as 15 minutes, and there are 96 output values in total.
[0047] A total of 36 eigenvalues were selected for the input feature set, among which: 1-23 are the steady-state characteristics of the system, reflecting the impact of fault disturbance on the critical inertia value; 24-36 are the input eigenvalues after the disturbance, reflecting the degree of system balance destruction caused by the disturbance, and the power generation of the recombined units. Specific input information 1-10, 11-20, 24-33 dimensions are the inertia time constants of each generator, the output before and after the disturbance; 34 and 35 are the value and time of the lowest frequency point of the power system after the disturbance; 21 is the total load of the system; 22-23 are the power generation power and penetration rate of new energy; 36 is the power shortage value after the system disturbance.
[0048] By giving the above input features and obtaining the dynamic frequency critical inertia curve during the training process, the established mapping network can reflect the influence of the given 36-dimensional feature values on the critical inertia.
[0049] In step 3, when a disturbance occurs, the power system frequency will change at the moment of the disturbance and then drop to the lowest point in about 3 seconds. By adjusting the inertia time constant of the generator set, the maximum value of the system frequency change rate is equal to ROCOF max At this time, the power system frequency is at the critical inertia level in the initial stage, and the equivalent inertia of the system is the critical inertia H min,1 ; Then, adjust the inertia time constant of the generator set so that the lowest point of the frequency response curve just reaches f min , then the critical inertia H under another frequency constraint condition is obtained min,2 ; Finally, take the maximum value of the above two cases to get the critical inertia H under this disturbance sample min ={H min,1 , H min,2}.
[0050] In step 4, the deep belief network DBN model is set to 7 layers, and after multiple adjustments, the number of neurons in each layer is set to 206, 100, 50, 50, 50, 50, 601, and the learning rates corresponding to each RBM layer are 0.03, 0.2, 0.01, 0.01, and 0.01, respectively. DBN is applied to regression prediction, and the output layer adopts a linear transfer function; the output neuron is 601, corresponding to the critical inertia value obtained by sampling with the change of wind power after the disturbance occurs.
[0051] In step 4, in order to verify the accuracy of the critical inertia prediction, the root mean square error RMSE is selected as the evaluation criterion. It is defined as:
[0052]
[0053] In formula (14), i is the sample number; N is the total number of samples; f(H min,i ) is the critical inertia value predicted by the i-th sample; is the theoretical critical inertia value of the i-th sample.
[0054] The present invention provides a method for predicting critical inertia of a power system based on a deep belief network, and the technical effects are as follows:
[0055] 1) For the minimum overall inertia required to ensure the frequency safety of the power grid when there is a serious power shortage in the power system, the method proposed in this invention is applied to predict the time-varying critical inertia of the power system from the perspective of artificial intelligence algorithm-deep belief network. This method is of great significance for the dispatching background to quickly and accurately take effective measures to ensure the safety and stability of the power grid frequency during the period when the actual equivalent inertia of the power grid is less than the critical inertia.
[0056] 2) In step 1 of the present invention, an artificial intelligence algorithm is selected to quickly and effectively mine the deep features of data, and a deep belief network (DBN) model network structure is constructed to provide a model basis for predicting critical inertia.
[0057] 3) In step 2 of the present invention, the description of the critical inertia prediction problem determines the model input and output characteristic values, thereby determining the input value of the main influencing factors of the critical inertia and the problem of the output model. The selected characteristic quantities indicate the characteristics of the system before and after the disturbance, and can complement each other. The prediction model can better capture the characteristics that affect the critical inertia of the system, and the prediction results will be more accurate.
[0058] 4) Step 3 of the present invention constructs a sample database for predicting critical inertia using a deep belief network (DBN) model, generating sample data sets for training and testing. A generation mechanism for large disturbance frequency response scenarios is implemented, and a large number of sample databases are obtained by continuously changing the operation mode. The equivalent inertia of the power grid is cleverly designed to be equal to the critical inertia, ensuring that each sample obtains an accurate critical inertia value. This provides massive data support for the deep belief network to predict critical inertia.
[0059] 5) Step 4 of the present invention sets neurons in each layer of the deep belief network DBN model, and evaluates the model prediction results by the root mean square error RMSE. RMSE can not only reflect the concentration of the model prediction error value, but also evaluate the discreteness of the system prediction value. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0061] Figure 1 is a flow chart of an embodiment of the present invention.
[0062] Figure 2 This is the basic structure diagram of the deep belief network.
[0063] Figure 3 It is the structure diagram of restricted Boltzmann machine.
[0064] Figure 4 This is the network topology diagram of the New England 39-node system.
[0065] Figure 5 It is a curve diagram of wind power value in each period.
[0066] Figure 6 This is the relationship between the number of training samples and the root mean square error.
[0067] Figure 7 This is a comparison chart of the prediction results of the training set.
[0068] Figure 8 This is a comparison chart of the prediction results of the test set.
[0069] Fig. 9 This is the critical inertia prediction curve for the 20th test sample. DETAILED DESCRIPTION
[0070] The critical inertia prediction method of power system based on deep belief network first selects an artificial intelligence algorithm that can quickly and effectively mine the deep features of data and constructs the deep belief network DBN model structure; then, the critical inertia H is predicted from the factors affecting the critical inertia. min The 36-dimensional input feature values of the deep belief network DBN model are determined from the perspective of the operating mode, new energy penetration rate, and disturbance information factors; and the sample database is generated by adjusting other generator parameters according to the rated load at different levels, and randomly divided into training and test sample sets, and the neurons of each layer of the prediction model are set; finally, the sample is trained, the parameters are adjusted, and the model performance is tested with the test set samples to evaluate the model prediction results, and finally the DBN critical inertia evaluation model of the system is obtained. The flow chart is as follows Figure 1 As shown, the following steps are included:
[0071] Step 1: Select an AI algorithm that can quickly and effectively mine the deep features of the data:
[0072] The critical inertia is based on satisfying the grid frequency security constraint, namely the rate of change of frequency extreme value (ROCOF max ), the lowest point of transient frequency (f min ), the minimum inertia required in the power grid has strong nonlinear dynamic characteristics. Traditional shallow machine learning algorithms cannot accurately and quickly analyze the time-varying critical inertia of the power system. When the power system contains rich operating data feature information, deep learning has the characteristics of strong feature extraction ability, better training algorithm and better fitting effect compared with other shallow learning. Among them, the typical representative of deep learning, deep belief network (DBN), has achieved good results in power system transient stability prediction and wind power prediction.
[0073] The Deep Belief Network (DBN) model is a composite model composed of multiple layers of simple learning models. It is composed of several restricted Boltzmann machines (RBMs) and a single-layer back propagation neural network (BPNN). It can effectively mine the deep features of data. Figure 2 The model diagram of the deep belief network DBN model is given in , where the input layer and label layer have k and n neurons respectively, corresponding to k feature inputs and n outputs. Among them, the optimal number of hidden layers, the optimal number of neurons in each layer, and the initial learning rate of each RBM layer need to be continuously debugged based on training experience.
[0074] The pre-training process is to start from the input layer, and every two layers are regarded as a restricted Boltzmann machine (RBM), and train them layer by layer until all the parameters of the RBM, that is, the initial weights of the RBM, are obtained.
[0075] Pre-training solves the problem of long training cycles and the model being prone to falling into local optimality caused by the random assignment of initial weights to the BP neural network. Pre-training can ensure that the mapping of the feature vector of each layer of RBM has reached the optimal level. However, it cannot guarantee the optimal feature expression of the entire deep belief network DBN model. The parameter fine-tuning process then uses the gradient descent algorithm to fine-tune the parameters of the entire network to achieve the optimal mapping of the entire deep belief network DBN model. The advantage of pre-training is that it first simplifies the deep learning problem into a hierarchical training problem of multiple restricted Boltzmann machines (RBMs), which simplifies the complexity; secondly, a better initial value is obtained through the pre-training network, which avoids the local optimality while reducing the training time, and ultimately improves the training effect.
[0076] The restricted Boltzmann machine (RBM) has only two layers. It is the basic module for building many other deep learning models such as autoencoders and deep belief networks. The main task of the restricted Boltzmann machine (RBM) is to find the mapping relationship between the input feature v and the output feature h, such as Figure 3 shown.
[0077] This mapping relationship is expressed by the joint probability distribution function p(v,h):
[0078]
[0079] In formula (1), p(v,h|θ) represents the joint distribution relationship between input and output when the parameter θ is determined; Z(θ) is the partition function, which is a normalization constant that makes the probability distribution sum equal to 1; θ = (w,a,b) is the parameter of RBM, w represents the weight between the visible layer and the hidden layer; a and b represent the bias of the visible layer and the hidden layer respectively; E(v,h|θ) is the energy function, which represents the connection energy weight between layers; the partition function and energy function expressions are as follows (2) and (3):
[0080]
[0081] In formula (3), a i 、v i Respectively represent the bias and state of the i-th neuron in the visible layer; b j 、h j Respectively represent the bias and state of the jth neuron in the hidden layer; m and n represent the number of neurons in the visible layer and the hidden layer respectively; v ij is the weight between neurons i and j; w i,j Represents the weight between the i-th visible unit in the visible layer and the j-th hidden unit in the hidden layer; lower energy means that the network is in a more ideal state, and the mapping probability between the two layers is greater, that is, the prediction error of the critical inertia of the system is lower.
[0082] Because there is no connection between the hidden layer and the visible layer, when the node state of one layer is known, the activation state of the other layer is independent. When the state value of the visible layer is given, the conditional probability of the hidden layer is:
[0083]
[0084] In formula (4), p(h j |v) indicates that when the value of the visible layer node is known, the jth neuron h in the hidden layer j The state probability distribution of ; p(h|v) represents the product of the state probability distribution of n neurons in the hidden layer
[0085] Among them, the probability of calculating a single node, that is, h j =1 or v i =1 is calculated as:
[0086]
[0087] In formula (5) and formula (6), σ(x) is the sigmoid activation function, and its expression is:
[0088]
[0089] In step 1, the deep belief network DBN model also includes pre-training:
[0090] The pre-training process is as follows: starting from the input layer, every two layers are treated as a restricted Boltzmann machine (RBM), and they are trained layer by layer until the parameters of all RBMs, that is, the initial weights of RBMs, are obtained; afterwards, the parameter fine-tuning process uses the gradient descent algorithm to fine-tune the parameters of the entire network model so that the mapping of the entire deep belief network DBN model is optimal. The gradient descent method is a first-order iterative optimization algorithm used to find the local minimum of a given function. The basic idea is to start from an initial point and move in the direction of the negative gradient to reduce the value of the objective function. Repeat the above steps for multiple iterations until a certain convergence criterion is met. The basic principle expression is as follows:
[0091]
[0092] In formula (8) and formula (9), w t 、w t+1 They represent the values of the independent variable w at iterations t and t+1 respectively; c is the step size factor, i.e., the appropriate step size for gradient descent; ▽f wt It means that the function f is in w t The first-order derivative at ; ε is a number greater than zero, which is used to judge the convergence criterion of the objective function.
[0093] The training objective of the restricted Boltzmann machine (RBM) is to train a specific set of training samples V = {v 1 ,v 2 ,...,v m}Get the product that maximizes the probability, v 1 ,v 2 ,...,v m Respectively represent the states of the 1st, 2nd, ....mth neurons in the visible layer; the model parameter θ can be obtained by maximizing the log-likelihood function L(θ) of RBM on the input training set:
[0094]
[0095] In formula (10), v k represents the state of the kth neuron in the visible layer, p(v k |h,θ) represents the probability distribution of the visible layer nodes when the model parameters and hidden layer node values are obtained, and V represents the training sample set.
[0096] In order to obtain the optimal weight parameter matrix, w ij 、a i and b j The data distribution is obtained by multiple Gibbs sampling as the expectation of the RBM definition. Among them, the parameter w ij Update as follows:
[0097]
[0098] In formula (11), is the momentum; η is the learning rate; <v i h j > data is the actual data distribution; <v i h j > model The expectation defined for the RBM model, the other two parameters a i and b j Update adjustments can also be made in a similar manner.
[0099] Step 2: Description of the critical inertia prediction problem and determination of the model input and output eigenvalues:
[0100] The problem of predicting the critical inertia of a system after a disturbance is a high-dimensional regression problem. For this type of problem, deep learning can solve accurate results more quickly than traditional methods. The problem of predicting the frequency value of a power system after a disturbance based on a deep belief network can be described as the problem of solving the model between input X → output Y.
[0101] Input sample set:
[0102]
[0103] In formula (12), l represents the number of samples; X N l It means there are l samples; N is the number of selected input features, that is, each sample input has N feature values; there are l samples in total, and each row represents an input sample.
[0104] The output sample set corresponds to the input sample set, and each line is an output sample, which can be described as:
[0105]
[0106] In formula (13), Y i Represents the critical inertia value of output sample i; the output values of the 1st...96th neurons correspond to the changing values of the critical inertia with the change of new energy penetration rate in one day. The time resolution of new energy penetration rate is calculated as 15 minutes, and there are 96 output values in total.
[0107] A total of 36 eigenvalues were selected for the input feature set, among which: 1-23 are the steady-state characteristics of the system, reflecting the impact of fault disturbance on the critical inertia value; 24-36 are the input eigenvalues after the disturbance, reflecting the degree of system balance destruction caused by the disturbance, and the power generation of the recombined units. Specific input information 1-10, 11-20, 24-33 dimensions are the inertia time constants of each generator, the output before and after the disturbance; 34 and 35 are the value and time of the lowest frequency point of the power system after the disturbance; 21 is the total load of the system; 22-23 are the power generation power and penetration rate of new energy; 36 is the power shortage value after the system disturbance.
[0108] By giving the above input features and obtaining the dynamic frequency critical inertia curve during the training process, the established mapping network can reflect the influence of the given 36-dimensional feature values on the critical inertia.
[0109] Step 3: Construct a sample database for predicting critical inertia using a deep belief network:
[0110] The operation mode, disturbance information and new energy penetration rate are the fundamental factors affecting the equivalent inertia of the power grid, and are also important factors for predicting critical inertia. Therefore, the power shortage of the power system is simulated by cutting off the generator set, and the change of critical inertia is simulated by using the time-varying new energy output. In the IEEE39 node system, the time resolution of wind power is set to 15 minutes, that is, there are 96 input change values of wind power in 24 hours a day. Under the same load level, each generator set is limited to 50% output and completely cut off separately. Under 100 different load levels with a rated load of 50%, 50.5%..., 100% and a step size of 0.5%, the G1-G10 synchronous units are cut off in turn and the output is limited. A total of 2000 groups of samples are processed in batches, and each sample outputs 96 groups of values with wind power. 75% of the samples are randomly selected as the training sample set of DBN, and 25% are used as the test sample set of DBN.
[0111] When one of the above disturbances occurs, the power system frequency will change at the moment of the disturbance and then drop to the lowest point in about 3 seconds. By adjusting the inertia time constant of the generator set, the maximum value of the system frequency change rate is equal to ROCOF max At this time, the power system frequency is at the critical inertia level in the initial stage, and the equivalent inertia of the system is the critical inertia H min,1 ; Then, adjust the generator inertia time constant so that the lowest point of the frequency response curve just reaches f min , then the critical inertia H under another frequency constraint condition is obtained min,2 ; Finally, take the maximum value of the above two cases to get the critical inertia H under this disturbance sample min ={H min,1 , H min,2}.
[0112] Step 4: Set up the neurons in each layer of the deep belief network DBN model and evaluate the model prediction results:
[0113] When predicting the critical inertia curve with the change of new energy penetration rate, in order to shorten the training time and improve the prediction accuracy, after many attempts, the deep belief network DBN model is set to 7 layers. After many adjustments, the number of neurons in each layer is set to 206, 100, 50, 50, 50, 50, 601, and the corresponding learning rates of each RBM layer are 0.03, 0.2, 0.01, 0.01, 0.01. The present invention applies the deep belief network DBN model to regression prediction, and the output layer adopts a linear transfer function. The output neuron is 601, corresponding to the critical inertia value obtained by sampling with the change of wind power after the disturbance occurs. The quantitative conjugate gradient algorithm with small storage and high stability is used in back propagation.
[0114] In order to verify the accuracy of critical inertia prediction, the root mean square error RMSE is selected as the evaluation criterion. It is defined as:
[0115]
[0116] In formula (14), i is the sample number; N is the total number of samples; f(H min,i ) is the critical inertia value predicted by the i-th sample; y Hmin,i is the theoretical critical inertia value of the i-th sample.
[0117] Step 5: The above-mentioned method for studying the prediction of critical inertia of power system based on deep belief network is verified through simulation.
[0118] In the software PSS / E, build Figure 4 The New England 39-bus system shown in the figure contains a total of ten generators (G1-G10) and an additional wind farm. The wind power time resolution is set to 15 minutes. The output of the wind farm in each period is shown in the figure. Figure 5 .
[0119] The possibility of serious faults or disturbances that have a great impact on frequency stability in actual power systems is small, and it is rare for power grids to be in critical inertia operation states. Therefore, a large number of samples for deep learning model training need to be generated through simulation. Before DBN realizes the prediction function, the first step is to generate a sample database. The basic process is:
[0120] 1) Save the New England 39-node system built by PSS / E to the corresponding named file (*.SAV) path, set the simulation step size, result output step size and result output and adjust them until the power flow converges;
[0121] 2) Under the above power flow convergence state, set a rated load, cut off one synchronous generator set, adjust the inertia time constants of other generators, and obtain the larger value of critical inertia that meets the two frequency constraints, thereby obtaining a data output file (*.txt) after a disturbance processing;
[0122] 3) Call PSS / E software through Python to generate disturbance function module, open the above file (*.txt), set disturbance information in Python, including machine cutting type, load surge, wind power parameter, and loop through all fault types of the system set before, until all disturbances are simulated, and finally generate a database of 2000 samples;
[0123] 4) Normalize the sample input eigenvalues and output values. The present invention uses the mapminmax function provided by MATLAB to normalize the input and output eigenvalues to between [0, 1];
[0124] 5) Construct a deep belief network DBN model, set the number of RBM layers, the number of neurons in each layer and the initial learning rate of each layer, and adjust the parameters until the error of the output value reaches the set value, so as to obtain a deep belief network DBN model that can accurately predict the system frequency after disturbance.
[0125] A total of 2000 sample data were generated by simulation using this method, and the randomly selected training set and test set accounted for 75% and 25% of the total samples. The present invention selects the 36 feature quantities in step 3 and normalizes them as the model input of the DBN network, and uses the critical inertia feature value after normalizing the power shortage as the output of the model. The training effect and prediction effect of the model are as follows:
[0126] (1) The relationship between the number of training samples and the root mean square error of the model is as follows Figure 6 shown. Figure 6 This is a diagram showing the training progress after setting the number of layers of the deep belief network DBN model, the number of neurons in each layer, and the initial learning rate of each layer. Figure 6 The results show that the error of the model gradually decreases with the increase of the number of training samples, and the convergence speed is fast. After the training of 1500 samples, the root mean square error is less than 0.03s, which shows that the above neuron layer and parameter adjustment select the optimal model of DBN.
[0127] (2) The actual value and predicted value results of the specific training and test data samples are as follows Figure 7 , Figure 8 shown.
[0128] Figure 7The following is a comparison chart of the prediction results of 160 samples randomly selected from the training sample set. The simulation results show that the maximum error between the predicted value and the actual value in the training sample for the critical inertia prediction value under the influence of wind power fluctuations is only ±0.15s, which shows that the deep architecture learning of the model is effective, is less affected by external factors, and is highly practical.
[0129] Figure 8 The following is a comparison chart of the prediction results of 40 samples randomly selected from the test sample set. The simulation results show that the prediction accuracy of the test set is basically consistent with the prediction accuracy of the training set, and the maximum error of the test set prediction effect is 0.2s, which shows that deep learning has good adaptability to the strong nonlinearity of critical inertia.
[0130] (3) The critical inertia curve of the 20th test sample is as follows: Fig. 9 shown. Fig. 9 For selection Figure 8 The 20th test sample with a large critical inertia error at a certain moment is taken as the observation object diagram. It can be seen from the simulation results that: under a single disturbance, the critical inertia changes with the change of wind power, which shows that the critical inertia is time-varying. The DBN model set by the present invention can quickly predict the critical inertia. Deep learning has the ability to quickly and accurately predict the 96 samples of the critical inertia output that change with wind power, which has good practical value for the power grid dispatching background to make effective measures to ensure the safety of power grid frequency.
Claims
1. A power system critical inertia prediction method based on deep belief network, characterized by The following steps are involved: Step 1: Build a deep belief network DBN model; Step 2: According to the influence of critical inertia H min The main factor that determines the input feature value x of the deep belief network DBN model k , output eigenvalue y n ; Step 3: Construct the predicted critical inertia H min Sample database, generate training sample set and test sample set; Step 4: Set the neurons in each layer of the deep belief network DBN model and evaluate the model prediction results.
2. The method for predicting critical inertia of a power system based on a deep belief network according to claim 1 is characterized in that: In the step 1, the deep belief network DBN model is composed of a plurality of restricted Boltzmann machines RBM and a single-layer back propagation neural network BPNN superimposed; The restricted Boltzmann machine (RBM) consists of two layers: the visible layer and the hidden layer. The neurons in the visible layer are called visible nodes. Each node is a unit that processes input data, accepts data input and decides whether to pass it to the next layer. The neurons in the hidden layer are called hidden nodes. Their function is to reconstruct the input data, that is, feature transformation. By analyzing the input, more abstract and representative output features are extracted. The single-layer back propagation neural network BPNN has only one layer of structure, consisting of multiple neurons, and each neuron has only one output, which represents the predicted value of the model.
3. The method for predicting critical inertia of a power system based on a deep belief network according to claim 2 is characterized in that: The input layer and label layer of the deep belief network DBN model have k and n neurons respectively, corresponding to k input features and n output features; the input layer accepts external input information, extracts features from it, and generates neurons, that is, one neuron corresponds to one feature input; The input layer is connected to the hidden layer, which includes multiple RBM layers, each of which corresponds to a higher level of abstraction of the data; the highest layer is the label layer, which includes an RBM responsible for the extraction and representation of the final features.
4. The method for predicting critical inertia of a power system based on a deep belief network according to claim 2 is characterized in that: The single-layer back propagation neural network (BPNN) is used to find the mapping relationship between the input feature v and the output feature h. The mapping relationship is expressed by the joint probability distribution function p(v,h): In formula (1), p(v,h|θ) represents the joint distribution relationship between input and output when the parameter θ is determined; Z(θ) is the partition function, which is a normalization constant that makes the probability distribution sum equal to 1; θ = (w,a,b) is the parameter of RBM, w represents the weight between the visible layer and the hidden layer; a and b represent the bias of the visible layer and the hidden layer respectively; E(v,h|θ) is the energy function, which represents the connection energy weight between layers; the partition function and energy function expressions are as follows (2) and (3): In formula (3), a i 、v i Respectively represent the bias and state of the i-th neuron in the visible layer; b j 、h j They represent the bias and state of the jth neuron in the hidden layer respectively; m and n represent the number of neurons in the visible layer and the hidden layer respectively; v ij is the weight between neurons i and j; w i,j Represents the weight between the i-th visible unit in the visible layer and the j-th hidden unit in the hidden layer; lower energy means that the network is in a more ideal state, and the mapping probability between the two layers is greater, that is, the prediction error of the critical inertia of the system is lower; Because there is no connection between the hidden layer and the visible layer, when the node state of one layer is known, the activation state of the other layer is independent; when the state value of the visible layer is given, the conditional probability of the hidden layer is: In formula (4), p(h j |v) indicates that when the value of the visible layer node is known, the jth neuron h in the hidden layer j The state probability distribution of p(h|v) represents the product of the state probability distribution of n neurons in the hidden layer; Among them, the probability of calculating a single node, that is, h j =1 or v i =1 is calculated as: In formula (5) and formula (6), σ(x) is the sigmoid activation function, and its expression is:
5. The method for predicting critical inertia of a power system based on a deep belief network according to claim 3 is characterized by: In step 1, the deep belief network DBN model also includes pre-training. The pre-training process is: starting from the input layer, every two layers are used as a restricted Boltzmann machine RBM, and they are trained layer by layer until the parameters of all RBMs, that is, the initial weights of RBMs, are obtained; then, the parameter fine-tuning process uses the gradient descent algorithm to fine-tune the parameters of the entire network model, so that the mapping of the entire deep belief network DBN model is optimal; The gradient descent method is used to find the local minimum of a given function. This method starts from an initial point and moves in the direction of the negative gradient to reduce the value of the objective function. The above steps are repeated for multiple iterations until a certain convergence criterion is met. The basic principle expression is as follows: In formula (8) and formula (9), w t 、w t+1 They represent the values of the independent variable w at iterations t and t+1 respectively; c is the step size factor, which is to select the appropriate step size for gradient descent; It means that the function f is in w t The first derivative at ; ε is a number greater than zero, which is used as the criterion for determining the convergence of the objective function.
6. The method for predicting critical inertia of a power system based on a deep belief network according to claim 5 is characterized by: The training objective of the restricted Boltzmann machine (RBM) is to train a specific set of training samples V = {v 1 ,v 2 ,...,v m }Get the product that maximizes the probability, v 1 ,v 2 ,...,v m Respectively represent the states of the 1st, 2nd, ....mth neurons in the visible layer; the model parameter θ can be obtained by maximizing the log-likelihood function L(θ) of RBM on the input training set: In formula (10), v k represents the state of the kth neuron in the visible layer, p(v k |h,θ) represents the probability distribution of visible layer nodes when the model parameters and hidden layer node values are obtained, and V represents the training sample set; In order to obtain the optimal weight parameter matrix, w ij 、a i and b j The data distribution is sampled multiple times by Gibbs as the expectation of the RBM definition; where the parameter w ij Update as follows: In formula (11), is the momentum; η is the learning rate; <v i h j>data is the actual data distribution; <v i h j>model Expectations defined for the RBM model.
7. The method for predicting critical inertia of a power system based on a deep belief network according to claim 1, characterized in that: In step 2, the problem of predicting the power system frequency value after disturbance based on the deep belief network DBN model can be described as the problem of solving the model between input X→output Y; Input sample set: In formula (12), l represents the number of samples; X N l Indicates that there are l samples; N selected input features, that is, each sample input has N feature values; there are l samples in total, and each row represents an input sample; The output sample set corresponds to the input sample set, and each line is an output sample, which can be described as: In formula (13), Y i Represents the critical inertia value of output sample i; the output values of the 1st...96th neurons correspond to the changing values of the critical inertia with the change of new energy penetration rate in one day. The time resolution of new energy penetration rate is calculated as 15 minutes, and there are 96 output values in total; A total of 36 eigenvalues were selected for the input feature set, among which: 1-23 are the steady-state characteristics of the system, reflecting the impact of fault disturbance on the critical inertia value; 24-36 are the input eigenvalues after the disturbance, reflecting the degree of system balance destruction caused by the disturbance and the power generation of the recombined units; the specific input information 1-10, 11-20, 24-33 dimensions are the inertia time constants of each generator, and the output before and after the disturbance; 34 and 35 are the value and time of the lowest frequency point of the power system after the disturbance; 21 is the total load of the system; 22-23 are the power generation power and penetration rate of new energy; 36 is the power shortage value after the system disturbance; By giving the above input features and obtaining the dynamic frequency critical inertia curve during the training process, the established mapping network can reflect the influence of the given 36-dimensional feature values on the critical inertia.
8. The method for predicting critical inertia of a power system based on a deep belief network according to claim 1, characterized in that: In step 3, when a disturbance occurs, the power system frequency will change at the moment of the disturbance and then drop to the lowest point in about 3 seconds; by adjusting the inertia time constant of the generator set, the maximum value of the system frequency change rate is equal to ROCOF max At this time, the power system frequency is at the critical inertia level in the initial stage, and the equivalent inertia of the system is the critical inertia H min,1 ; Then, adjust the inertia time constant of the generator set so that the lowest point of the frequency response curve just reaches f min , then the critical inertia H under another frequency constraint condition is obtained min,2 ; Finally, take the maximum value of the above two cases to get the critical inertia H under this disturbance sample min ={H min,1 , H min,2 }.
9. The method for predicting critical inertia of a power system based on a deep belief network according to claim 1, characterized in that: In the step 4, the deep belief network DBN model is set to 7 layers, and the number of neurons in each layer is set to 206, 100, 50, 50, 50, 50, and 601 after multiple adjustments. The learning rates corresponding to each RBM layer are 0.03, 0.2, 0.01, 0.01, and 0.01, respectively; the DBN is applied to regression prediction, and the output layer adopts a linear transfer function; the output neurons are 601, which corresponds to the critical inertia value obtained by sampling as the wind power changes after the disturbance occurs.
10. The method for predicting critical inertia of a power system based on a deep belief network according to claim 9, characterized in that: In order to verify the accuracy of the critical inertia prediction, the root mean square error RMSE is selected as the evaluation criterion; it is defined as: In formula (14), i is the sample number; N is the total number of samples; f(H min,i ) is the critical inertia value predicted by the i-th sample; is the theoretical critical inertia value of the i-th sample.
Citation Information
Cited By
Online learning examination and evaluation method and system for certificate handling in isolation area
CN120338594A
Driving steady state control method and control system based on deep belief network
CN120669607A