Power system inertia assessment method, device, equipment and medium based on difference method

By combining the difference-by-difference method and neural network in the power system inertia evaluation, the inertia evaluation is used to perform inertia evaluation, and the problem of insufficient computing speed and accuracy in the prior art is solved, and a fast and accurate inertia evaluation of the power system is achieved.

CN119154388BActive Publication Date: 2025-03-14HOHAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411670759.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-14
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

Existing inertia evaluation methods for power systems have insufficient calculation speed and accuracy, especially when facing complex systems or large-scale simulations, the physical model has a long calculation time and the simplified model may not fully consider the system complexity.

Method used

The inertia evaluation method of power system based on the difference-by-difference method is used to calculate the frequency change rate through the difference-by-difference method, and combine physical models and neural networks to build a CNN-LSTM-Attention neural network. The historical data and physical model output results are used for training, and the difference between the calculated inertia value and the theoretical value is evaluated, and the evaluation results of the inertia of power system are finally obtained.

Benefits of technology

This method can quickly and effectively perform inertia evaluation of power system, improve calculation speed and accuracy, reduce data discreteness and accidental errors, and provide more objective and comprehensive inertia evaluation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119154388B_ABST
    Figure CN119154388B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of power systems, and in particular to a method, device, equipment and medium for evaluating the inertia of a power system based on a difference-by-difference method. The method comprises: using a difference-by-difference method to calculate the frequency change rate after a disturbance in the inertia evaluation of the power system; based on the frequency change rate, using a physical model derived from the rotor motion equation to calculate the estimated inertia value, and using the inertia theoretical value formula to calculate the actual inertia of the system; constructing a neural network, dividing a training set and a test set, using the output result of the physical model as the input of the neural network, and using the trained neural network to evaluate the difference between the calculated inertia value and the theoretical value; using the evaluated difference and the inertia estimated value calculated by the physical model to obtain the final power system inertia evaluation result. In the present invention, the combined method of physical and data models can quickly and effectively evaluate the inertia of the power system, solving the problem of insufficient evaluation accuracy of the physical model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to a method, device, equipment and medium for evaluating inertia of a power system based on a difference-by-difference method. Background Art

[0002] With the continuous growth of electricity demand in modern society and the rapid development of renewable energy technology, the stability and reliability of the power system have become crucial factors in ensuring energy supply. However, due to the continuous evolution of the composition structure and operating conditions of the power system, the widespread application of renewable energy such as wind power and photovoltaic power generation, and the large-scale access to energy storage and DC transmission technologies, the inertia level of the new power system has shown a trend of continuous decrease compared with the traditional power system. Specifically, it is manifested in increased volatility and reduced stability. Therefore, when facing external disturbances, if the new power system is not able to resist external disturbances sufficiently, the stability and reliability of the power system will not meet the requirements.

[0003] With the increasingly tense energy situation and the urgent need to implement green development, many countries around the world have plans to expand the scale of renewable energy power generation. In the next few decades, a number of fossil energy power sources will be gradually phased out. At the same time, the grid connection of new energy sources such as wind and solar power will reduce the proportion of traditional synchronous machines, cross-regional DC transmission will divide the system inertia, and power electronic components will be decoupled from the system. These will gradually reduce the inertia level of the power system and further increase the risk level of power grid operation. It can be seen that the accurate assessment of the inertia of the power system is of key significance for preventing the instability of the power system in the face of emergencies.

[0004] Traditional power system inertia assessment methods are mainly based on physical knowledge models, and are calculated by deeply understanding the physical principles of the power system. However, if this method uses a complete physical model, it usually requires a lot of computing time and resources, and the calculation speed is slow, especially when facing complex systems or large-scale simulations. Its establishment and maintenance require a lot of physical knowledge and computer hardware support, which makes this method likely to be limited by cost and resources in practical applications. In contrast, simplified physical models may sacrifice certain calculation accuracy, but can significantly improve the calculation speed. However, simplified models often have higher requirements for historical data and input-output relationships, and may not fully consider the complexity of the system, resulting in model limitations. With the development of data-driven methods, machine learning models have gradually shown their potential in transient stability analysis. By utilizing a large amount of historical data, machine learning models can learn the inherent mechanisms of the system and better capture the nonlinear characteristics of the system. However, the lack of data quality and diversity, as well as the handling of missing data and outliers, remain one of the challenges facing this method.

[0005] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to those skilled in the art. Summary of the invention

[0006] The present invention provides a method, device, equipment and medium for evaluating inertia of an electric power system based on a difference-by-difference method, thereby effectively solving the problems in the background technology.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is: a method for evaluating the inertia of a power system based on a difference-by-difference method, comprising the following steps:

[0008] To solve the problem of obtaining the frequency change rate after disturbance in the inertia assessment of power system, the successive difference method is used for calculation.

[0009] Based on the obtained frequency change rate, the estimated inertia value is calculated using the physical model derived from the rotor motion equation, and the actual inertia of the system is calculated using the inertia theoretical value formula;

[0010] Construct a neural network, divide it into training set and test set, use the output of the physical model as the input of the neural network, and use the trained neural network to evaluate the difference between the calculated value and the theoretical value of the power system inertia;

[0011] The final power system inertia assessment result is obtained by using the assessed difference and the inertia estimate calculated by the physical model.

[0012] Furthermore, when the difference method is used for calculation, when the number of frequency sampling points is an even number, all data are involved in the calculation, and when the number of sampling points is an odd number, the data in the middle position is discarded.

[0013] Furthermore, in order to obtain the frequency change rate after disturbance in the power system inertia assessment, the difference method is used for calculation, including the following steps:

[0014] Build a power system model and set different disturbances at different inertia levels in the system;

[0015] Collect the frequency, disturbance nodes and disturbance size of the power system after the disturbance. For the frequency data of each generator, collect the frequency data of each generator every time. Collect once;

[0016] Using the generator frequency value collected at each time node, calculate the frequency average value as the central frequency of the time node;

[0017] The frequency change rate after the disturbance is calculated based on the difference method. When the sampling center frequency n is an even number, the data is divided from the middle, and the first value is The time interval between the values ​​is , and so on to calculate the change rate values ​​one by one, the expression is as follows:

[0018] ;

[0019] The change rate of each segment is averaged and simplified to obtain the final difference method calculation formula, which is as follows:

[0020] ;

[0021] In the formula, is the frequency change rate, is the number of sampling points, For the The average frequency of each generator in the group, is the sampling interval;

[0022] when When it is an odd number, the value in the middle position must be discarded before calculation.

[0023] Furthermore, the physical model expression is as follows:

[0024] ;

[0025] In the formula, is the per-unit value of the power imbalance after the disturbance, , is the per unit value of mechanical power, is the per unit value of electromagnetic power, This represents the estimated inertia of the system. is the rated frequency of the system.

[0026] Furthermore, the actual inertia of the system is calculated using the theoretical inertia formula, including:

[0027] ;

[0028] In the formula, is the theoretical value of the system inertia constant, and Respectively Inertia constant and rated capacity of synchronous units, is the number of generators;

[0029] The deviation between the estimated value and the theoretical value of the power system inertia is :

[0030] .

[0031] Furthermore, a neural network is constructed and a training set and a test set are divided, including the following steps:

[0032] The data collected from a certain disturbance occurring at a certain inertia level, and the estimated inertia value and theoretical value obtained under this condition are grouped together. All the collected group sample data are divided into a test set and a training set at a ratio of 9:1.

[0033] The frequency value, disturbance node, disturbance size, inertia estimation value, inertia deviation and other characteristic quantities are normalized to [0,1], and the expressions are as follows:

[0034] ;

[0035] In the formula, is the normalized data, is the original data, is the minimum value in the original data. is the maximum value in the original data;

[0036] Build a CNN-LSTM-Attention neural network based on convolutional neural network CNN, long short-term memory LSTM and attention mechanism Attention, use several CNN convolution kernels for feature extraction, generate feature maps after average pooling layer processing, dot multiplication attention mechanism, flatten the result and the original input, all input into the LSTM layer with 50 hidden layers, and get the output result after passing through the fully connected layer;

[0037] Configure the neural network parameters. The parameters that need to be adjusted include batch size, maximum number of iterations, learning rate, learning rate reduction factor, and learning rate reduction period. When adjusting the parameters, both operation time and error factors need to be considered. When training the neural network for the first time, the neural network parameters can be initialized first, and then the neural network can be trained multiple times. The parameters are adjusted continuously according to the operation results to select the optimal parameters.

[0038] Use the training set to train the neural network, input the normalized frequency value, disturbance node, disturbance size, and inertia estimation value into the neural network, use the inertia deviation as the output of the neural network, and train the CNN-LSTM-Attention neural network;

[0039] Input the input feature quantity of the test set into the neural network, compare the predicted value of the neural network with the theoretical output value, and detect the prediction effect of the trained neural network. The evaluation indicators include absolute error, mean absolute error, mean absolute error percentage, and root mean square error. The expressions are as follows:

[0040] ;

[0041] ;

[0042] ;

[0043] ;

[0044] Where AE is absolute error, MAE is mean absolute error, MAPE is mean absolute error percentage, RMSE is root mean square error, is the sample size, is the predicted value, is the true value;

[0045] The evaluation index is used to determine whether the trained neural network is acceptable. If it is acceptable, the training is stopped.

[0046] Furthermore, the final power system inertia assessment result is obtained by using the assessed difference and the inertia estimate calculated by the physical model, including:

[0047] Use the calculated inertia value and the predicted offset , get the final inertia prediction value, the expression is as follows:

[0048] ;

[0049] In the formula, Inertia prediction value, To predict the offset, is the estimated value of inertia;

[0050] Four indicators, namely absolute error, mean absolute error, mean absolute error percentage and root mean square error, are used for evaluation and testing.

[0051] The present invention also includes a power system inertia evaluation device based on the difference method, using the above method, the evaluation device includes:

[0052] The successive difference calculation unit is used to calculate the frequency change rate after the disturbance in the power system inertia assessment by using the successive difference method;

[0053] An inertia calculation unit is used to calculate an estimated inertia value based on the obtained frequency change rate using a physical model derived from the rotor motion equation, and to calculate the actual inertia of the system using an inertia theoretical value formula;

[0054] A neural network unit is used to construct a neural network, divide the training set and the test set, use the output of the physical model as the input of the neural network, and use the trained neural network to evaluate the difference between the calculated value and the theoretical value of the inertia of the power system;

[0055] The evaluation unit is used to obtain a final power system inertia evaluation result by using the evaluated difference and the inertia estimation value calculated by the physical model.

[0056] The present invention also includes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above method is implemented.

[0057] The present invention also includes a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.

[0058] The beneficial effects of the present invention are as follows: the present invention illustrates the combination of physical and data models, which can quickly and effectively evaluate the inertia of the power system and solve the problem of insufficient accuracy of physical model evaluation. The frequency change rate calculation method based on the difference method is superior in reducing data discreteness and accidental errors, and improving calculation speed and accuracy. The neural network is used as a data-driven model to obtain the deviation between the estimated inertia value and the theoretical value, and then the total inertia level of the system is obtained. The neural network is used for inertia evaluation problems, which is more objective and comprehensive. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 is a flow chart of the method in Example 1;

[0061] Figure 2 It is a structural schematic diagram of the device in Example 1;

[0062] Figure 3 The intention of selecting the frequency sampling points in Example 2;

[0063] Figure 4 This is a schematic diagram of the comparison of the results obtained at different sampling time intervals in Example 2;

[0064] Figure 5 is a flow chart of inertia evaluation in Example 2;

[0065] Figure 6 This is the structure diagram of the CNN-LSTM-Attention neural network in Example 2;

[0066] Figure 7 This is the IEEE 10 machine 39 node system diagram in Example 2;

[0067] Figure 8 This is a comparison chart between the theoretical value and the predicted value of the inertia difference in Example 2;

[0068] Fig. 9 This is a comparison chart of the theoretical value and predicted value of CNN-LSTM-Attention inertia in Example 2;

[0069] Fig.10 This is a comparison chart of the theoretical value and predicted value of CNN-LSTM inertia in Example 2;

[0070] Fig.11 This is a comparison chart of the LSTM inertia theoretical value and the predicted value in Example 2;

[0071] Fig.12 This is a comparison chart between the theoretical value and the predicted value of CNN inertia in Example 2;

[0072] Fig.13 This is a diagram of error distribution intervals when using different neural networks in Example 2;

[0073] Fig.14 A schematic diagram of the structure of a computer device. DETAILED DESCRIPTION

[0074] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0075] Embodiment 1:

[0076] like Figure 1 As shown: A method for evaluating the inertia of a power system based on the difference method includes the following steps:

[0077] To solve the problem of obtaining the frequency change rate after disturbance in the inertia assessment of power system, the successive difference method is used for calculation.

[0078] Based on the obtained frequency change rate, the estimated inertia value is calculated using the physical model derived from the rotor motion equation, and the actual inertia of the system is calculated using the inertia theoretical value formula;

[0079] Construct a neural network, divide it into training set and test set, use the output of the physical model as the input of the neural network, and use the trained neural network to evaluate the difference between the calculated value and the theoretical value of the power system inertia;

[0080] The final power system inertia assessment result is obtained by using the assessed difference and the inertia estimate calculated by the physical model.

[0081] By clarifying the combination of physical and data models, this strategy can quickly and effectively evaluate the inertia of the power system, solving the problem of insufficient accuracy of physical model evaluation. The frequency change rate calculation method based on the difference method is superior in reducing data discreteness and accidental errors, and improving calculation speed and accuracy. The neural network is used as a data-driven model to obtain the deviation between the estimated inertia value and the theoretical value, and then the total inertia level of the system is obtained. The neural network is more objective and comprehensive for inertia evaluation problems.

[0082] In this embodiment, when the difference method is used for calculation, when the number of frequency sampling points is an even number, all data are involved in the calculation, and when the number of sampling points is an odd number, the data in the middle position is discarded.

[0083] In order to obtain the frequency change rate after disturbance in the power system inertia assessment, the difference method is used for calculation, including the following steps:

[0084] Build a power system model and set different disturbances at different inertia levels in the system;

[0085] Collect the frequency, disturbance nodes and disturbance size of the power system after the disturbance. For the frequency data of each generator, collect the frequency data of each generator every time. Collect once;

[0086] Using the generator frequency value collected at each time node, calculate the frequency average value as the central frequency of the time node;

[0087] The frequency change rate after the disturbance is calculated based on the difference method. When the sampling center frequency n is an even number, the data is divided from the middle, and the first value is The time interval between the values ​​is , and so on to calculate the change rate values ​​one by one, the expression is as follows:

[0088] ;

[0089] The change rate of each segment is averaged and simplified to obtain the final difference method calculation formula, which is as follows:

[0090] ;

[0091] In the formula, is the frequency change rate, is the number of sampling points, For the The average frequency of each generator in the group, is the sampling interval;

[0092] when When it is an odd number, the value in the middle position must be discarded before calculation.

[0093] The physical model expression is as follows:

[0094] ;

[0095] In the formula, is the per-unit value of the power imbalance after the disturbance, , is the per-unit value of mechanical power, is the per unit value of electromagnetic power, This represents the estimated inertia of the system. is the rated frequency of the system.

[0096] Among them, the actual inertia of the system is calculated using the inertia theoretical value formula, including:

[0097] ;

[0098] In the formula, is the theoretical value of the system inertia constant, and Respectively Inertia constant and rated capacity of synchronous units, is the number of generators;

[0099] The deviation between the estimated value and the theoretical value of the power system inertia is :

[0100] .

[0101] As a preferred embodiment of the above, constructing a neural network and dividing the training set and the test set includes the following steps:

[0102] The data collected from a certain disturbance occurring at a certain inertia level, and the estimated inertia value and theoretical value obtained under this condition are grouped together. All the collected group sample data are divided into a test set and a training set at a ratio of 9:1.

[0103] The frequency value, disturbance node, disturbance size, inertia estimation value, inertia deviation and other characteristic quantities are normalized to [0,1], and the expressions are as follows:

[0104] ;

[0105] In the formula, is the normalized data, is the original data, is the minimum value in the original data. is the maximum value in the original data;

[0106] Build a CNN-LSTM-Attention neural network based on convolutional neural network CNN, long short-term memory LSTM and attention mechanism Attention, use several CNN convolution kernels for feature extraction, generate feature maps after average pooling layer processing, dot multiplication attention mechanism, flatten the result and the original input, all input into the LSTM layer with 50 hidden layers, and get the output result after passing through the fully connected layer;

[0107] Configure the neural network parameters. The parameters that need to be adjusted include batch size, maximum number of iterations, learning rate, learning rate reduction factor, and learning rate reduction period. When adjusting the parameters, both operation time and error factors need to be considered. When training the neural network for the first time, the neural network parameters can be initialized first, and then the neural network can be trained multiple times. The parameters are adjusted continuously according to the operation results to select the optimal parameters.

[0108] Use the training set to train the neural network, input the normalized frequency value, disturbance node, disturbance size, and inertia estimation value into the neural network, use the inertia deviation as the output of the neural network, and train the CNN-LSTM-Attention neural network;

[0109] Input the input feature quantity of the test set into the neural network, compare the predicted value of the neural network with the theoretical output value, and detect the prediction effect of the trained neural network. The evaluation indicators include absolute error, mean absolute error, mean absolute error percentage, and root mean square error. The expressions are as follows:

[0110] ;

[0111] ;

[0112] ;

[0113] ;

[0114] Where AE is absolute error, MAE is mean absolute error, MAPE is mean absolute error percentage, RMSE is root mean square error, is the sample size, is the predicted value, is the true value;

[0115] The evaluation index is used to determine whether the trained neural network is acceptable. If it is acceptable, the training is stopped.

[0116] In this embodiment, the final power system inertia evaluation result is obtained by using the evaluated difference and the inertia estimation value calculated by the physical model, including:

[0117] Use the calculated inertia value and the predicted offset , get the final inertia prediction value, the expression is as follows:

[0118] ;

[0119] In the formula, Inertia prediction value, To predict the offset, is the estimated value of inertia;

[0120] Four indicators, namely absolute error, mean absolute error, mean absolute error percentage and root mean square error, are used for evaluation and testing.

[0121] like Figure 2 As shown, this embodiment also includes a power system inertia evaluation device based on the difference method. Using the above method, the evaluation device includes:

[0122] The successive difference calculation unit is used to calculate the frequency change rate after the disturbance in the power system inertia assessment by using the successive difference method;

[0123] An inertia calculation unit is used to calculate an estimated inertia value based on the obtained frequency change rate using a physical model derived from the rotor motion equation, and to calculate the actual inertia of the system using an inertia theoretical value formula;

[0124] A neural network unit is used to construct a neural network, divide the training set and the test set, use the output of the physical model as the input of the neural network, and use the trained neural network to evaluate the difference between the calculated value and the theoretical value of the inertia of the power system;

[0125] The evaluation unit is used to obtain a final power system inertia evaluation result by using the evaluated difference and the inertia estimation value calculated by the physical model.

[0126] Embodiment 2:

[0127] The knowledge data-based difference method is used to jointly drive the inertia assessment method of the power system, including the following steps:

[0128] Step 1: To solve the problem of obtaining the frequency change rate after disturbance in the power system inertia assessment, the difference method is used for calculation. When the number of frequency sampling points is an even number, all data are involved in the calculation; when the number of sampling points is an odd number, the data in the middle position is discarded. The specific steps are as follows:

[0129] 1.1: Build a power system model and set different disturbances at different inertia levels in the system;

[0130] 1.2: Collect the frequency, disturbance nodes and disturbance size of the power system after the disturbance; Figure 3This is a schematic diagram of frequency sampling points. For the frequency data of each generator, every certain period of time To collect the frequency data once, in order to eliminate the influence of the primary frequency modulation on the frequency collection as much as possible, the frequency value within 2 seconds after the disturbance occurs should be collected. At this time, the rotation inertia of the generator plays a major role in the frequency change, and the primary frequency modulation has not yet taken effect.

[0131] 1.3: Use the generator frequency value collected at each time node to calculate the frequency average value as the central frequency of the time node;

[0132] 1.4: Based on the difference method, the frequency change rate after the disturbance is calculated. When the sampling center frequency n is an even number, the data is divided from the middle, and the first value and the second value are The time interval between the values ​​is , and so on to calculate the change rate values ​​one by one, the expression is as follows:

[0133] ;

[0134] The change rate of each segment is averaged and simplified to obtain the final difference method calculation formula, which is as follows:

[0135] ;

[0136] in, is the frequency change rate, is the number of sampling points, For the The average frequency of each generator in the group, is the sampling interval.

[0137] when When it is an odd number, just discard the value in the middle and then calculate.

[0138] exist Figure 4 Assume that the slope of the blue solid line below is the actual frequency change rate, respectively , There are occasional errors in the frequency values ​​at , The frequency change rate obtained by using a larger time interval is obviously higher than The frequency change rate obtained at is closer to the true value, so it can be explained that the calculated time interval is increased to It can effectively reduce accidental errors caused by measuring devices (such as PMU).

[0139] Step 2: Based on the obtained frequency change rate, use the physical model derived from the rotor motion equation to calculate the estimated inertia value, and use the inertia theoretical value formula to calculate the actual inertia of the system. The specific steps are as follows:

[0140] 2.1: Using the physical model derived from the rotor motion equation, calculate the estimated value of inertia. The physical model expression is as follows:

[0141] ;

[0142] in, is the per-unit value of the power imbalance after the disturbance, , is the per-unit value of mechanical power, is the per unit value of electromagnetic power, This represents the estimated inertia of the system. is the rated frequency of the system.

[0143] 2.2: Use the theoretical inertia formula to calculate the actual inertia of the system. The expression is as follows:

[0144] ;

[0145] in, is the theoretical value of the system inertia constant, and Respectively Inertia constant and rated capacity of synchronous units, is the number of generators.

[0146] 2.3: Calculate the deviation between the estimated value of power system inertia and the theoretical value , the expression is as follows:

[0147] ;

[0148] Step 3: Build a CNN-LSTM-Attention neural network, divide it into training set and test set, use the output of the physical model as the input of the neural network, and after training a usable neural network, evaluate the difference between the calculated value and the theoretical value of the power system inertia. Figure 5 That is, the flowchart of inertia evaluation driven by knowledge data. The specific steps are as follows:

[0149] 3.1: The data collected from a certain disturbance occurring at a certain inertia level, as well as the estimated and theoretical inertia values ​​obtained under this condition, are recorded as a group, and all the collected group sample data are divided into a test set and a training set at a ratio of 9:1;

[0150] 3.2: Normalize the frequency value, disturbance node, disturbance size, inertia estimation value, inertia deviation and other characteristic quantities to [0,1], as shown below:

[0151] ;

[0152] in, is the normalized data, is the original data, is the minimum value in the original data. is the maximum value in the original data.

[0153] 3.3: Build CNN-LSTM-Attention neural network, Figure 6 This is the schematic diagram of the neural network structure. Multiple CNN convolution kernels are used for feature extraction. The size of the first convolution kernel is 3×1×1, and the number of channels is 32, so the size of the second convolution kernel can be set to 1×1×32. The generated feature map is processed by the average pooling layer, and the point multiplication attention mechanism is used to flatten the result and the original input. All of them are input into the LSTM layer with 50 hidden layers, and the output result is obtained after passing through the fully connected layer;

[0154] 3.4: Configure the neural network parameters. The parameters that need to be adjusted include batch size, maximum number of iterations, learning rate, learning rate reduction factor, learning rate reduction period, etc. When adjusting the parameters, both operation time and error factors need to be considered. When training the neural network for the first time, the neural network parameters can be initialized first, and then the neural network can be trained multiple times. According to the running results, the parameters are adjusted continuously to select the optimal parameters;

[0155] 3.5: Use the training set to train the neural network, input the normalized frequency value, disturbance node, disturbance size, and inertia estimation value into the neural network, use the inertia deviation as the output of the neural network, and train the CNN-LSTM-Attention neural network;

[0156] 3.6: Input the input feature of the test set into the neural network, compare the predicted value of the neural network with the theoretical output value, and detect the prediction effect of the trained neural network. The evaluation indicators include absolute error, mean absolute error, mean absolute error percentage, and root mean square error. The expressions are as follows:

[0157] ;

[0158] ;

[0159] ;

[0160] ;

[0161] Among them, AE is absolute error, MAE is mean absolute error, MAPE is mean absolute error percentage, RMSE is root mean square error, is the sample size, is the predicted value, is the true value.

[0162] Step 3.7: Determine whether the trained neural network is acceptable based on the evaluation index. If it is acceptable, proceed to step 4, otherwise return to step 3.3;

[0163] Step 4: Use the estimated difference and the estimated inertia value calculated by the physical model to obtain the final power system inertia assessment result. The specific steps are as follows:

[0164] 4.1: Using calculated inertia values ​​and predicted offsets , get the final inertia prediction value, the expression is as follows:

[0165] ;

[0166] in, Inertia prediction value, To predict the offset, is the estimated value of inertia.

[0167] 4.2: Use four indicators: absolute error, mean absolute error, mean absolute error percentage, and root mean square error for evaluation and testing.

[0168] In order to verify the above method, a Figure 7 In the IEEE39 system shown in the figure, G1-G10 represents 10 generators, and 39 buses are numbered. 1-39 in the figure represent the node numbers of each bus. The inertia level of the system is changed by randomly modifying the inertia time constant of the G1-G9 generators. In order to simulate the operation of the power system after being subjected to power disturbances of different sizes, each generator node and load node, except for the balance node, generates a machine or load shedding fault with the same probability. The frequency change values ​​of the 10 generators within 1s after the disturbance are collected respectively, and one point is collected every 0.1s, so the dimension of the sampling data set is 10×10. After obtaining the central frequency values ​​of the 10 time nodes, the size of the data set becomes 10×1. In addition, the disturbance size and disturbance node need to be collected, and a total of 1000 groups of samples are generated.

[0169] For each set of frequency data, the frequency change rate is calculated according to the difference method. In order to verify the superiority of this method, three methods are compared: the difference method, the change rate of adjacent items is calculated successively and then the average value is taken, and the Matlab toolbox is called for fitting. The calculation time comparison of different methods for 1000 sets of sample data is shown in Table 1.

[0170] Table 1 Comparison of calculation time under different methods

[0171] Difference conventional Fitting Time / s 0.000260 0.000411 1.961705

[0172] After obtaining the estimated inertia value according to the physical model and the theoretical inertia value according to the theoretical value calculation formula, and then obtaining the inertia deviation, the above samples are randomly shuffled and divided into training set and test set according to the ratio of 9:1. After multiple runs to adjust the neural network parameters, the final parameters are set according to Table 2 and Table 3.

[0173] Table 2 Parameter configuration

[0174] Batch size Maximum number of iterations Learning Rate Learning rate reduction factor Learning rate reduction cycle 100 200 0.01 0.1 150

[0175] Table 3 CNN-LSTM-Attention network structure parameters

[0176] Network Layer Dimensions Step Length Number of channels Remark Input Layer 13×1×1 — — Convolutional layer 1 3×1×1 1 32 Feature map size 11×1×32 Average pooling layer 1 1×1×32 1 — Convolutional Layer 2 1×1×32 1 64 Feature map size 11×1×64 Average pooling layer 2 11×1×64 1 — Fully connected layer 1 — — 32 Fully connected layer 2 — — 64 LSTM Layer 50×1 — — Fully connected layer 3 — — 1 Output Layer 1×1 — —

[0177] The entire system takes 100MW as the benchmark, inputs 13 input features such as the node number of 900 training sets into the CNN-LSTM-Attention neural network, and uses the deviation as the output feature to train the neural network. The evaluation index results of the 100 test sets are shown in Table 4. The theoretical values ​​and predicted values ​​are shown in Figure 8 shown.

[0178] Table 4 Inertia difference prediction error

[0179] MAE / s MAPE RMSE 17.5648 0.1015 22.611

[0180] The estimated inertia value plus the predicted offset is the predicted inertia value, which is compared with the theoretical inertia value as shown in the figure below. Fig. 9 To verify the superiority of the proposed neural network, CNN-LSTM, LSTM, and CNN neural networks were used for comparative experiments. The prediction results are shown in Figures 10 to 12 The inertia evaluation results obtained by the four methods are compared, as shown in Table 5. In order to more intuitively compare the effects of data-driven and joint-driven, the number of each interval of the 100 test set errors is counted, and the statistical results are shown in Fig.13 shown.

[0181] Table 5 Inertia difference prediction error

[0182] Time / s MAE / s MAPE RMSE CNN-LSTM-Attention 0.011756 17.5648 0.022455 22.6115 CNN-LSTM 0.011143 19.3751 0.024565 24.1620 LSTM 0.008392 20.0648 0.025538 25.3326 CNN 0.010012 23.9348 0.030653 29.9945

[0183] When using the CNN-LSTM-Attention neural network, the error of 80% of the data is controlled within 5%, while the other three methods are slightly inferior. When the error is within 1%, the sample data using the CNN-LSTM-Attention neural network accounts for more than 30%, the highest proportion among the four methods. Therefore, the proposed method can basically accurately evaluate the inertia of the power system.

[0184] See also Fig.14 A computer device 400 provided in an embodiment of the present application includes: a processor 410 and a memory 420, wherein the memory 420 stores a computer program executable by the processor 410, and when the computer program is executed by the processor 410, the above method is executed.

[0185] The embodiment of the present application further provides a storage medium 430 on which a computer program is stored. When the computer program is run by the processor 410, the above method is executed.

[0186] Among them, the storage medium 430 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0187] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.

[0188] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0189] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0190] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0191] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0192] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0193] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0194] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A method for evaluating the inertia of a power system based on the difference method, characterized in that: The steps include: To solve the problem of obtaining the frequency change rate after disturbance in the inertia assessment of power system, the successive difference method is used for calculation. Based on the obtained frequency change rate, an estimated inertia value is calculated using a physical model derived from a rotor motion equation, and an actual inertia of the system is calculated using an inertia theoretical value formula; Constructing a neural network, dividing it into a training set and a test set, using the output result of the physical model as the input of the neural network, and using the trained neural network to evaluate the difference between the calculated value and the theoretical value of the inertia of the power system; Using the evaluated difference and the estimated inertia value calculated by the physical model, a final power system inertia evaluation result is obtained; In the calculation using the successive difference method, when the number of frequency sampling points is an even number, all data are involved in the calculation, and when the number of sampling points is an odd number, the data in the middle position is discarded; The problem of obtaining the frequency change rate after disturbance in the power system inertia assessment is solved by using the difference method, which includes the following steps: Build a power system model and set different disturbances at different inertia levels in the system; Collect the frequency, disturbance nodes and disturbance size of the power system after the disturbance. The frequency data of each generator is collected every time Δt. Using the generator frequency value collected at each time node, calculate the frequency average value as the central frequency of the time node; The frequency change rate after disturbance is calculated based on the difference method. When the number of sampling center frequencies n is an even number, the data is divided from the middle. The time interval between the values ​​is The change rate values ​​are calculated one by one in this way, and the expression is as follows: The change rate of each segment is averaged and simplified to obtain the final difference method calculation formula, which is as follows: Where ROCOF is the frequency change rate, n is the number of sampling center frequencies, and f i is the average frequency of each generator at the i-th sampling time node, and Δt is the sampling interval; When n is an odd number, the value in the middle position needs to be discarded before calculation; The physical model expression is as follows: Where ΔP is the per-unit value of power imbalance after disturbance, ΔP = P T -P E , P T is the mechanical power per unit value, P E is the per-unit value of electromagnetic power, H cal This represents the estimated inertia of the system, f n is the rated frequency of the system; The actual inertia of the system is calculated using the inertia theoretical value formula, including: In the formula, H sys is the theoretical value of the system inertia constant, H Gi and S Gi are the inertia constant and rated capacity of the i-th synchronous unit respectively, and n is the number of generators.

2. The power system inertia estimation method based on the difference method according to claim 1 is characterized in that: Constructing a neural network and dividing it into training and test sets includes the following steps: The data collected from a certain disturbance occurring at a certain inertia level, and the estimated inertia value and theoretical value obtained under this condition are grouped together. All the collected group sample data are divided into a test set and a training set at a ratio of 9:

1. The frequency value, disturbance node, disturbance size, inertia estimation value, inertia deviation and other characteristic quantities are normalized to [0,1], and the expressions are as follows: In the formula, X′ is the normalized data, X is the original data, and X min is the minimum value in the original data, X max is the maximum value in the original data; Build a CNN-LSTM-Attention neural network based on convolutional neural network CNN, long short-term memory LSTM and attention mechanism Attention, use several CNN convolution kernels for feature extraction, generate feature maps after average pooling layer processing, dot multiplication attention mechanism, flatten the result and the original input, all input into the LSTM layer with 50 hidden layers, and get the output result after passing through the fully connected layer; Configure the neural network parameters. The parameters that need to be adjusted include batch size, maximum number of iterations, learning rate, learning rate reduction factor, and learning rate reduction period. When adjusting the parameters, both operation time and error factors need to be considered. When training the neural network for the first time, the neural network parameters can be initialized first, and then the neural network can be trained multiple times. The parameters are adjusted continuously according to the operation results to select the optimal parameters. Use the training set to train the neural network, input the normalized frequency value, disturbance node, disturbance size, and inertia estimation value into the neural network, use the inertia deviation as the output of the neural network, and train the CNN-LSTM-Attention neural network; Input the input feature quantity of the test set into the neural network, compare the predicted value of the neural network with the theoretical output value, and detect the prediction effect of the trained neural network. The evaluation indicators include absolute error, mean absolute error, mean absolute error percentage, and root mean square error. The expressions are as follows: AE=|y′ i -y i |; Where AE is the absolute error, MAE is the mean absolute error, MAPE is the mean absolute error percentage, RMSE is the root mean square error, n is the number of samples, and y′ i is the predicted value, y i is the true value; The evaluation index is used to determine whether the trained neural network is acceptable. If it is acceptable, the training is stopped.

3. The method for estimating inertia of a power system based on the difference method according to claim 1, characterized in that: The final power system inertia assessment results are obtained by using the assessed difference and the inertia estimate calculated by the physical model, including: Use the calculated inertia value and the predicted offset ΔH sim , get the final inertia prediction value, the expression is as follows: H sim =H cal +ΔH sim ; In the formula, H sim Predicted inertia, ΔH sim is the predicted offset, H cal is the estimated value of inertia; Four indicators, namely absolute error, mean absolute error, mean absolute error percentage and root mean square error, are used for evaluation and testing.

4. A power system inertia assessment device based on the difference method, characterized in that: Using the method according to any one of claims 1 to 3, the evaluation device comprises: The successive difference calculation unit is used to calculate the frequency change rate after the disturbance in the power system inertia assessment by using the successive difference method; An inertia calculation unit is used to calculate an estimated inertia value based on the obtained frequency change rate using a physical model derived from the rotor motion equation, and to calculate the actual inertia of the system using an inertia theoretical value formula; A neural network unit is used to construct a neural network, divide the training set and the test set, use the output of the physical model as the input of the neural network, and use the trained neural network to evaluate the difference between the calculated value and the theoretical value of the inertia of the power system; The evaluation unit is used to obtain a final power system inertia evaluation result by using the evaluated difference and the inertia estimation value calculated by the physical model.

5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.

6. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Novel electric power system equivalent inertia evaluation method and device based on neural network

    CN118157162A

  • Wind power penetration power system inertia evaluation method and system based on neural network

    CN118676957A