Power system reliability evaluation method based on Transform encoder

By using Transformer encoder model and adaptive Latin hypercube sampling technology in power system reliability evaluation, the problems of long calculation time and unstable prediction performance in traditional methods are solved, and efficient and accurate power system reliability evaluation is achieved. Enhanced depth and adaptability of the model.

CN119249924AInactive Publication Date: 2025-01-03CHANGSHU INSTITUTE OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411776531.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the reliability evaluation process of traditional power systems, the calculation time is long and the prediction performance is unstable. Especially when facing new or unseen system states, deep network models such as CNN are prone to encounter gradient vanishing problems, which limits the depth of the model and Learning ability.

Method used

Using Transformer encoder model combined with adaptive Latin hypercube sampling technology, high-quality training data is generated, neural network is built to reduce computing time and improve prediction accuracy, and reveal the nonlinearity between system load reduction and operating parameters through attention mechanism relation.

Benefits of technology

It significantly reduces the calculation time of emergency state analysis, improves the prediction accuracy of the model in different scenarios, solves the problem of gradient vanishing, enhances the depth and learning ability of the model, and is adaptable, so that it does not need to be re-established when the system conditions change. Training can be performed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249924A_ABST
    Figure CN119249924A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power system reliability evaluation method based on a Transform encoder. The probability that an electric power system is in a normal state or a first-order fault state is calculated according to the fault probability of a generator set and a power transmission line; for each dimension d of the Latin hypercube, generating a uniformly distributed random number rd, e, and mapping the random number rd, e to a corresponding interval to generate a sample point; a final Latin hypercube sample matrix MLHS is formed, the ith column of elements of the MLHS are compared with the updated element fault probability, the operation states of each generator set and each power transmission line in the power system are determined, and an ith system state sample Si is obtained; and according to the current system state and the load reduction amount LCi, generating input of neural network training data and a corresponding label. The training data is generated by introducing the adaptive Latin hypercube sampling technology, the training data quality of the model is improved, and the accuracy and calculation efficiency of reliability evaluation of the power system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of power system reliability assessment, and the invention relates to a power system reliability assessment method based on a Transformer encoder. Background Art

[0002] The traditional power system reliability assessment process requires fault state analysis through power flow calculation and optimal power flow calculation tools, which is a time-consuming process. In recent years, machine learning technology has been applied to power system reliability assessment to improve computational efficiency and accuracy. For example, convolutional neural networks (CNNs) perform well in learning historical data patterns, but often encounter gradient vanishing problems in deep network architectures, which limits the depth and learning ability of the model. When the model faces new or unseen system states, its prediction performance will drop significantly. Therefore, the existing technology has problems such as long calculation time and unstable prediction performance, and a new method is urgently needed to solve these problems. Summary of the invention

[0003] The purpose of the present invention is to provide a power system reliability assessment method based on Transformer encoder, which reduces the calculation time of emergency state analysis by adopting Transformer encoder model, and generates high-quality training data by using adaptive Latin hypercube sampling technology, thereby improving the prediction accuracy of the model in different scenarios.

[0004] The technical solution to achieve the purpose of the present invention is: A method for constructing neural network training data for power system reliability assessment includes the following steps: S01: Calculate the probability of the power system being in a normal state or a first-order fault state based on the failure probability of the generator sets and transmission lines; S02: For each dimension of the Latin Hypercube , divide the interval [0,1] into N non-overlapping intervals, each of which has a length of 1 / N, in each dimension and each interval Generate a uniformly distributed random number , mapped to the corresponding interval to generate sample points; S03: For each dimension , N sample points generated by random sorting The positions of form the final Latin hypercube sample matrix . Because the total number of power system components (i.e. the total number of generators and transmission lines) and number of rows Equal, the total sample size N and The number of columns N is equal, use Each column element can determine the system The state of the component. No. Column elements and updated component failure probability By comparison, the operating status (fault or normal) of each generator set and each transmission line in the power system can be determined. Then, considering the system load curve, the first System status samples ; S04: According to the current system status , obtain the possible load reduction ; S05: According to the current system status and possible load reduction Generate input and corresponding labels for neural network training data.

[0005] In the preferred technical solution, the probability of the power system being in a normal state or a first-order fault state is calculated in step S03. The formula is:

[0006] in, is the total number of generating units and transmission lines, It is the updated The failure probability of a component, It is the updated The failure probability of a component, Not equal to .

[0007] In the preferred technical solution, step S02 also includes updating the random number : .

[0008] In the preferred technical solution, the method of generating the input of the neural network training data and the corresponding labels in step S05 includes: Enter the bus related input , Line related input The matrix serves as the input data for the neural network:

[0009] The labels output by the neural network are:

[0010] in, is the number of buses in the power system, is the number of lines, Indicates Available generating capacity on each busbar, Indicates The load demand on each busbar, and Respectively represent The bus numbers at the beginning and end of the line, It is used for DC power flow calculation. The susceptance of the line, Indicates The available transmission capacity of the lines, Indicates the load reduction amount under the current system status, Indicates the total installed capacity of the system.

[0011] The present invention also discloses a power system reliability assessment method based on a Transformer encoder, comprising the following steps: Build the Transformer encoder model; Constructing input data for a neural network using any of the methods described above; The relationship between the load reduction amount and the system state variables of the power system is obtained through the trained Transformer encoder model; Calculate reliability indicators of power systems.

[0012] In the preferred technical solution, the Transformer encoder model includes 10 layers, each layer performs a transformation ,in Indicates the number of layers, Represents two independent fully connected operations, which transform the inputs associated with the busbars into and line-related inputs Convert to output and ,pass The operation will and Mapped to D dimensions, Abandon the load head , and Splice them together and then get them through batch normalization operation , then Input to , , , , and In the Transformer encoder composed of , in the Transformer encoder, and is the batch normalization operation, is the attention operation, and is the residual connection operation, It is a two-layer perceptron with ELU activation function, and also includes two layers of fully connected operations; through Operation Extraction The first line of , and through the inclusion of a fully connected operation and an ELU activation function Processing, generation load reduction .

[0013] In the preferred technical solution, the Input in the attention operation By three different weight matrices Perform matrix multiplication respectively to obtain query matrices , key matrix Sum Matrix , the calculation formula is , perform a dot product operation on the query matrix and the key matrix, and divide each dot product result by Scaling is performed, and then the softmax function is applied to obtain the weights on the value matrix, which is calculated as follows: .

[0014] In the preferred technical solution, the learning rate of the ELU activation function is dynamically reduced, and the method includes: Establish an initial learning rate and choose a monitoring metric; After completing each epoch, the monitoring metric is evaluated, and if the performance does not improve within a set time, the learning rate is reduced by a predetermined factor.

[0015] In the preferred technical solution, the load reduction amount of the system state predicted by the neural network is used to calculate the reliability index of the power system, including the expected shortage power EDNS and the load loss probability LOLP; when calculating the LOLP index, the system state with a load reduction amount greater than 0 is regarded as a fault state, otherwise it is a normal state; To evaluate the predictive performance of the model, the performance indicators of the neural network model are as follows:

[0016]

[0017]

[0018]

[0019]

[0020]

[0021] Among them, MAE is the mean absolute error, MSE is the mean square error, ACC is the accuracy, PR is the precision, RC is the recall, and F1 is the F1 score. N represents the total number of predicted system state samples, represents the predicted load reduction, Indicates the actual load reduction amount, Indicates A sample of system status; , represents the number of samples that are predicted to be in a fault state and are actually in a fault state, It indicates the number of samples that are predicted to be normal and are actually normal. represents the number of samples that are predicted to be in a fault state but are actually in a normal state. Indicates the number of samples that were predicted to be in a normal state but were actually in a fault state.

[0022] The present invention further discloses a computer storage medium on which a computer program is stored. When the computer program is executed, the method for constructing neural network training data for power system reliability assessment described in any one of the above items is implemented.

[0023] Compared with the prior art, the present invention has the following significant advantages: 1. Improve computational efficiency: By adopting the Transformer encoder model, the computational time of emergency state analysis is reduced.

[0024] 2. Enhanced prediction accuracy: Adaptive Latin hypercube sampling technology is used to generate high-quality training data, which improves the prediction accuracy of the model in different scenarios.

[0025] 3. Solve the gradient vanishing problem: The Transformer model effectively solves the gradient vanishing problem in deep networks and enhances the depth and learning ability of the model.

[0026] 4 Strong adaptability: When the system operating conditions or component reliability parameters change, the model can perform emergency status analysis without retraining, and has strong adaptability.

[0027] 5. Revealing nonlinear relationships: Through the attention mechanism, the model is able to focus on key input features, which helps to reveal the nonlinear relationship between system load reduction and operating parameters, thereby improving the accuracy of prediction.

[0028] In summary, the present invention has significant advantages in terms of computational efficiency, prediction accuracy, and model adaptability, and can effectively improve the overall performance of power system reliability assessment. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A flowchart of a method for constructing neural network training data for power system reliability assessment in a preferred embodiment; Figure 2 The structure diagram of the Transformer encoder model for risk assessment state analysis; Figure 3 This is the internal structure diagram of the attention layer; Figure 4 is the ELU activation function. DETAILED DESCRIPTION

[0030] The principle of the present invention is: an innovative architecture is proposed: densely connected convolutional neural network (DenseNet), which aims to overcome the gradient vanishing problem and enhance generalization ability and prediction accuracy. In addition, the present invention also uses a method for power system reliability assessment in DenseNet training data generation to improve the representativeness and effectiveness of training data, thereby improving the accuracy of risk assessment. Example

[0031] like Figure 1 As shown, a method for constructing neural network training data for power system reliability assessment includes the following steps: S01: Calculate the probability of the power system being in a normal state or a first-order fault state based on the failure probability of the generator sets and transmission lines; S02: For each dimension of the Latin Hypercube , divide the interval [0,1] into N non-overlapping intervals, each of which is 1 / N in length, in each dimension and each interval Generate a uniformly distributed random number , updated and mapped to the corresponding interval to generate sample points ; S03: For each dimension , N sample points generated by random sorting ) forms the final Latin hypercube sample matrix . Because the total number of components in the power system and number of rows Equal, the total sample size N and The number of columns N is equal, use Each column element can determine the system The state of the component. No. Column elements and updated component failure probability By comparison, the operating status (fault or normal) of each generator set and each transmission line in the power system can be determined. Then, considering the system load curve, the first System status samples .

[0032] S04: According to the current system status , obtain the possible load reduction ; S05: According to the current system status and possible load reduction Generate input and corresponding labels for neural network training data.

[0033] In a preferred embodiment, the probability of the power system being in a normal state or a first-order fault state is calculated in step S03. The formula is:

[0034] in, is the total number of generating units and transmission lines, It is the updated The failure probability of a component, Indicates the updated The probability of failure of a component.

[0035] In a preferred embodiment, step S02 further includes updating the random number : .

[0036] In a preferred embodiment, the method of generating the input of the neural network training data and the corresponding labels in step S05 includes: Enter the bus related input , Line related input The matrix serves as the input data for the neural network:

[0037]

[0038] The labels output by the neural network are:

[0039] in, is the number of buses in the power system, is the number of lines, Indicates Available generating capacity on each busbar, Indicates The load demand on each busbar, and Respectively represent The bus numbers at the beginning and end of the line, It is used for DC power flow calculation. The susceptance of the line, Indicates The available transmission capacity of the lines, Indicates the load reduction amount under the current system status, Indicates the total installed capacity of the system.

[0040] It should be noted that the above only provides a preferred embodiment, and other known calculation methods can also be used to obtain the result. The fact that a detailed description is not given here does not mean that it cannot be implemented.

[0041] Another embodiment is a computer storage medium having a computer program stored thereon, wherein the computer program, when executed, implements any of the above-mentioned methods for constructing neural network training data for power system reliability assessment.

[0042] In another embodiment, a method for evaluating reliability of a power system based on a Transformer encoder comprises the following steps: Build the Transformer encoder model; Constructing input data for a neural network using any of the methods described above; The relationship between the load reduction amount and the system state variables of the power system is obtained through the trained Transformer encoder model; Calculate reliability indicators of power systems.

[0043] In a preferred embodiment, the Transformer encoder model comprises 10 layers, each layer performing a transformation ,in Indicates the number of layers, Represents two independent fully connected operations, which transform the inputs associated with the busbars into and line-related inputs Convert to output and ,pass The operation will and Mapped to D dimensions, Abandon the load head , and Splice them together and then get them through batch normalization operation , then Input to , , , , and In the Transformer encoder composed of , in the Transformer encoder, and is the batch normalization operation, is the attention operation, and is the residual connection operation, It is a two-layer perceptron with ELU activation function, and also includes two layers of fully connected operations; through Operation Extraction The first line of , and through the inclusion of a fully connected operation and an ELU activation function Processing, generation load reduction .

[0044] A preferred embodiment, the Input in the attention operation By three different weight matrices Perform matrix multiplication respectively to obtain query matrices , key matrix Sum Matrix , the calculation formula is , perform a dot product operation on the query matrix and the key matrix, and divide each dot product result by Scaling is performed, and then the softmax function is applied to obtain the weights on the value matrix, which is calculated as follows: .

[0045] A preferred embodiment dynamically reduces the learning rate of the ELU activation function, the method comprising: Establish an initial learning rate and choose a monitoring metric; After completing each epoch, the monitoring metric is evaluated, and if the performance does not improve within a set time, the learning rate is reduced by a predetermined factor.

[0046] In a preferred embodiment, the load reduction amount of the system state predicted by the neural network is used to calculate the reliability index of the power system, including the expected shortage power EDNS and the load loss probability LOLP; when calculating the LOLP index, the system state with a load reduction amount greater than 0 is regarded as a fault state, otherwise it is a normal state; To evaluate the predictive performance of the model, the performance indicators of the neural network model are as follows:

[0047]

[0048]

[0049]

[0050]

[0051]

[0052] Among them, MAE is the mean absolute error, MSE is the mean square error, ACC is the accuracy, PR is the precision, RC is the recall, and F1 is the F1 score. N represents the total number of predicted system state samples, represents the predicted load reduction, Indicates the actual load reduction amount, Indicates A sample of system status; , represents the number of samples that are predicted to be in a fault state and are actually in a fault state, It indicates the number of samples that are predicted to be normal and are actually normal. represents the number of samples that are predicted to be in a fault state but are actually in a normal state. Indicates the number of samples that were predicted to be in a normal state but were actually in a fault state.

[0053] Specifically, the following describes a power system reliability assessment method based on a Transformer encoder using a specific example, as follows: Transformer encoder for fault state analysis: A. Neural Network Architecture The present invention proposes a Transformer Encoder Model (TEM) for evaluating the reliability level of a power system. Figure 2 TEM uses the operating data of the current system state as input, which is detailed in equations (10)-(11) to predict the possible load reduction of the current system state.

[0054] To illustrate the architecture of the model, we define a The neural network of the layer, its input is the system operation parameter matrix Each layer performs a transformation ,in The index of the layer. This transform It may be a composite operation, including operations such as fully connected (FC) operations, batch normalization (BN) operations, or exponential linear units (ELU). The output of the layer is represented as .

[0055] exist Figure 2 middle, Represents two independent FC operations, which transform the bus-related inputs by matrix multiplication (representing a real matrix of n rows and 3 columns) and line-related input (representing a real number matrix with m rows and 4 columns) are converted to output and Here, n and m represent the number of buses and lines in the power system, respectively, and D is the dimension of the embedding layer of the TEM model. TEM maintains a constant latent vector size D in all subsequent layers, by The operation will and Mapped to D dimensions. Abandon the load head (represents a 1-row, D-column zero-element matrix), and Concatenate them and then perform batch normalization (BN) to obtain Then Input to , , , , and In the Transformer encoder composed of In the encoder, and is a BN operation, is the attention operation, and is the residual connection operation, is a two-layer perceptron with ELU activation. The first layer FC output , the second layer FC output , so that the encoder can be stacked. Operation Extraction The first line of (representing a D-dimensional real vector) and through the FC operation and ELU Processing, generation load reduction .

[0056] It is also important to note that Figure 2The N× symbol in the encoder part indicates that N encoders can be stacked to obtain a deeper neural network architecture. In this study, D is set to 28 and N is equal to 4.

[0057] Figure 3 Shown The internal structure of the attention mechanism. Input By three different weight matrices Perform matrix multiplication respectively to obtain query matrices , key matrix Sum Matrix , as shown in formula (1). Then, dot product operations are performed on the query matrix and the key matrix, and each dot product result is divided by Scaling is performed and then the softmax function is applied to obtain the weights on the value matrix, as shown in formula (2).

[0058] (1) (2) B. ELU and dynamic learning rate The exponential linear unit (ELU) activation function, such as Figure 4 As shown, it is a commonly used activation function in neural networks, designed to address some limitations of the ReLU (rectified linear unit) activation function, such as the "dead" ReLU problem. One problem with ReLU is that it always outputs zero for negative input values, which can cause neurons to "die". In contrast, the ELU function generates a small negative output for negative inputs, thus avoiding this problem. The ELU activation function is defined as follows: (3) In this study, α is set to 1.582 in order to make the curve pass through (-1,-1) so that the absolute value of the negative value obtained by formula (12) is within 1.

[0059] Using too large a learning rate can lead to overly aggressive weight updates, which may push the input of a neuron into the negative region, making its output always zero (corresponding to the ReLU activation function) or small (corresponding to the ELU activation function). This problem can be alleviated by reducing the learning rate. This study applied a dynamic learning rate reduction strategy, which involves gradually reducing the learning rate during training. This approach aims to promote rapid convergence in the early stages of training and enhance the fine-tuning ability of the model in the later stages, thereby preventing neuron inactivity caused by excessive weight updates. The implementation steps of the dynamic learning rate are as follows: Step 1) Establish an initial learning rate and choose a monitoring metric (e.g., validation set loss).

[0060] Step 2) After completing each epoch, evaluate the performance on the validation set. If the performance does not improve within a specified duration (e.g., 2 epochs), reduce the learning rate by a predetermined factor (e.g., 20% of the current value).

[0061] C. Model Performance Indicators The load shedding predicted by TEM can be used to calculate reliability indicators of the power system, such as loss of load probability (LOLP) and expected demand not supplied (EDNS). During the state analysis process, if the predicted load reduction exceeds 0, the system state is considered to be a fault state; otherwise, the system state is considered to be a normal state.

[0062] To evaluate the regression performance of the model, we use the Mean Absolute Error (MAE) and Mean Square Error (MSE) metrics. In addition, the model classification effect can be measured by Accuracy (ACC), Precision (PR), Recall (RC), and F1 score (F1). ACC represents the ratio of the number of correctly predicted system states to the total number of predictions. PR measures the accuracy of identifying that the predicted fault state is actually a fault state. RC evaluates the ability of the model to accurately identify the actual fault state. F1 combines PR and RC, providing an important metric in the case of imbalanced class distribution.

[0063] The performance indicators for measuring neural network models are defined in detail as follows: (4) (5) (6) (7) (8) (9) in, N is the total number of predicted system state samples, X is the predicted load reduction, Y The actual load reduction is obtained through power flow calculation and optimal power flow calculation. Indicates System status samples; , It indicates the number of system states that are predicted to be faulty and are actually faulty. It indicates the number of system states that are predicted to be normal and are actually normal. It indicates the number of system states that are predicted to be faulty but are actually normal. Indicates the number of system states that were predicted to be normal but were actually faulty.

[0064] Adaptive Latin Hypercube Sampling Method: A. TEM model training data format This study uses the matrices shown in formulas (10)-(11) as the input data of the proposed TEM model. The output of TEM prediction is expressed by formula (12), where positive values ​​represent the load reduction of the current system state and negative values ​​represent the relative robustness of the system. From the perspective of power generation system reliability, smaller negative values ​​indicate higher system reliability. Using negative values ​​instead of simple zero values ​​as labels can improve the effect of model training. In addition, the absolute values ​​of these negative values ​​are less than 1, mainly because the main purpose of the TEM model is to accurately predict the load reduction.

[0065] (10) (11) (12) in, is the number of buses in the power system, is the number of lines, Indicates Available generating capacity on busbars , Indicates The load demand on each busbar, and Respectively represent Lines The busbar numbers at the beginning and end, It is used for DC power flow calculation. The susceptance of the line, Indicates The available transmission capacity of the lines, Indicates the load reduction amount under the current system status, Indicates the total installed capacity of the system.

[0066] B. Method for obtaining TEM model training data In this study, an adaptive Latin Hypercube Sampling (LHS) method is proposed to generate training data for TEM. The power system follows the N-1 principle, which ensures that the system can meet the system peak load demand even if any component fails. It is worth noting that the probability of the system being in a normal or first-order fault state is usually high. However, these states do not directly contribute to the reliability index, and their proportion can be artificially reduced in the training data of the neural network to adjust their importance. The adjustment ratio can be achieved by amplifying the probability of component failure so that the combined probability of normal and first-order fault states is lower than a certain threshold ρ. This method increases the proportion of samples that contribute to the reliability index, improves the data quality, and helps the neural network learn the relationship between system operating parameters and load reduction. The specific steps of the adaptive LHS method are as follows: Step 1) Determine the power system parameters, including deterministic data, random parameters, and initial sample number , the shrinkage percentage ρ (e.g., 0.01), the magnification factor γ = 1, and the total sample size N (e.g., 200,000) as the termination criterion.

[0067] Step 2) Update the failure probability of the generator set and transmission line according to formula (13): (13) ,in It is The original failure probability of each component is The definition is as follows:

[0068] Among them, MTTF represents the mean time between failures of components, and MTTR represents the mean time to repair components.

[0069] For example, for a generator set, the mean trouble-free working time is 1900 hours and the mean repair time is 100 hours. Then the component failure probability of the generator set is calculated according to the formula 100 / (100 + 1900) = 1 / 20 = 0.05. The mean trouble-free working time MTTF and mean repair time MTTR of the components can be obtained through the relevant statistical data of this type of equipment. is the updated component failure probability, is the total number of generating units and transmission lines in the system.

[0070] Step 3) Use formula (14) to calculate the probability that the system is in a normal state or a first-order fault state .if If it is less than the threshold ρ, go to step 4; otherwise, update And return to step 2.

[0071] (14) Step 4) System Share elements, the corresponding Latin hypercube has Dimensions. For each dimension , divide the interval [0,1] into N non-overlapping intervals, each of which has a length of 1 / N. and each interval Generate a uniformly distributed random number Update the random number according to formula (15) , mapped to the corresponding interval to generate sample points .

[0072] (15) Step 5) For each dimension , N sample points generated by random sorting The positions of form the final Latin hypercube sample matrix , as shown in formula (16). This step ensures that the sample points in each dimension are independent and each interval contains exactly one sample point.

[0073] (16) Step 6) Because of the total number of power system components (in power system risk assessment, the components in the power system usually refer to transmission lines or generators, It expresses the total number of components of the transmission lines and generators in a power system, where the subscript G represents the generator and the subscript L represents the transmission line. and number of rows Equal, the total sample size N and The number of columns N is equal, use Each column element can determine the system The state of the component. No. Column elements and updated component failure probability By comparison, the operating status (fault or normal) of each generator set and each transmission line in the power system can be determined. Then, considering the system load curve, the first System status samples .

[0074] Step 7) Analyze using power flow and optimal power flow tools and calculate the possible load reduction .

[0075] Step 8) According to (10)-(12), the current system status and load reduction Prepare input and corresponding labels for neural network training.

[0076] Step 9) Check the number of samples Is it greater than N? If so, terminate the process; otherwise, update And return to step 6.

[0077] The proposed method is used to evaluate the reliability of the IEEE RTS-79 standard test system. The IEEE RTS-79 system consists of 24 buses, 32 generators, and 38 transmission lines, with a total installed capacity of 3405 MW and a peak load of 2850 MW.

[0078] The proposed method is implemented in Python, and the computing platform is AMD Ryzen 9 5950X CPU and NVIDIA GeForceRTX 3060 GPU. To collect data, we used DC power flow and DC optimal power flow methods for fault state analysis and load reduction calculation. In the neural network training stage, we set the training cycle and batch size to 200 and 50 respectively, and used Adam optimizer with a learning rate of 0.001.

[0079] A. Different data acquisition methods In this experiment, 200,000 samples were generated using the random sampling method and the proposed adaptive Latin Hypercube Sampling (LHS) method, respectively, of which 10% of the samples were used as the test set of the TEM model and the remaining 90% were used as the training set of the TEM model. In the training set, 10% was further designated as a validation set to dynamically adjust the learning rate. M1 is a neural network trained using data obtained by random sampling, while M2 is a neural network trained using data obtained by the proposed adaptive LHS method. The performance indicators of the two models were evaluated using the test set of the random sampling method, as described in Table 1.

[0080] Table 1. Performance comparison of TEM models trained with different training datasets

[0081] Table 1 shows that the error metrics of M2 are significantly reduced compared to M1. Specifically, the mean square error (MSE) is reduced by 92.6% and the mean absolute error (MAE) is reduced by 11.3%. In terms of classification accuracy, both models have an ACC of over 98% and an RC of over 95%. However, in terms of PR and F1 metrics, M2 significantly outperforms M1, indicating that the training data used for M2 is of higher quality.

[0082] B. IEEE RTS-79 The previous section illustrates the superiority of the proposed adaptive LHS data generation method in terms of model performance indicators. This section evaluates the effectiveness of the proposed model architecture in fault state analysis from the perspective of actual reliability assessment. Table 2 shows the annual reliability indicators of the IEEERTS-79 system under three different peak load levels. EDNS The traditional non-sequential Monte Carlo simulation (NSMCS) method with a value of 2% is used as a benchmark. The TEM method uses M2 in Table 1 as a fault state analysis tool. When using TEM to analyze the system state, 1000 states are predicted each time. It should be noted that the neural network-based fault state analysis can analyze thousands of system states at the same time, limited only by the GPU memory size.

[0083] Table 2 IEEE RTS-79 annual reliability indicators at different peak load levels

[0084] At the original peak load level, the NSMCS method required 770 seconds and 646,000 samples to obtain 1.1502×10 -3 LOLP and 1.4738×10 -1 The EDNS of the proposed method has a relative error of 6.47% and 0.39%, respectively. Meanwhile, the proposed TEM method takes 244 seconds and 640,000 samples to obtain 1.2406×10 -3 LOLP and 1.4505×10 -1 The relative errors of EDNS are 0.88% and 1.20%, respectively. At a variance coefficient of 5%, the reliability index obtained by TEM is close to that of the traditional NSMCS method, proving the accuracy of the model prediction. Replacing the traditional fault state analysis tools (i.e., power flow and optimal load flow calculation) with the neural network model significantly reduces the overall calculation time.

[0085] In addition, Table 2 shows that as the system peak load level increases, the TEM method can still obtain highly accurate system reliability indicators, even though there are no system state samples with high load levels in the TEM model training data set. In addition, considering regional economic changes, the actual system peak load may fluctuate, such as the peak load of the power system increases with the growth of the regional economy and decreases with the recession of the regional economy. Our analysis also calculated the scenario where the peak load is reduced to 95% of the initial level. The results in the table show that the proposed TEM model can accurately evaluate the reliability indicators of the system at this time, while significantly reducing the analysis time required to obtain the reliability indicators.

[0086] C. Modified RTS-79 As the actual power system operation time increases, the system components will gradually age, resulting in an increase in the probability of component failure, and the corresponding component mean time between failures (MTTF) will decrease. Table 3 shows the reliability indicators of generator sets and transmission lines under aging scenarios. Specifically, the MTTF of generator set components in scenario 1 is reduced by 10%, while the MTTF of transmission line components in scenario 2 is reduced by 10%. EDNS The traditional non-sequential Monte Carlo simulation (NSMCS) method of 2% is used as the benchmark value.

[0087] Table 3 Annual reliability indicators under the modified RTS-79 system

[0088] In S1, the NSMCS method takes 592 seconds and 504,000 samples to obtain 1.4702×10 -3 LOLP and 1.9938×10 -1 The EDNS of the proposed TEM model was 8.20% and 4.20% respectively compared with the reference value. In contrast, the proposed TEM model was used as a fault state analysis tool with a total time of 170 seconds and 450,000 samples. The calculated LOLP and EDNS were 1.6644×10 -3 and 2.0793×10 -1 , and the relative errors are 3.93% and 0.09%, respectively. When the EDNS coefficient of variance is 5%, the reliability index obtained by TEM is closer to the reference value, providing a more accurate assessment than the traditional NSMCS method.

[0089] In S2, the NSMCS method takes 689 seconds and 593,000 samples to obtain 1.2226×10 -3 LOLP and 1.4996×10 -1 The relative errors of EDNS were 0.47% and 1.11%, respectively. Using the TEM method, the total time was 230 seconds and 610,000 samples, and the obtained EDNS was 1.2246×10 -3 LOLP and 1.5157×10 -1 The relative errors of EDNS are 0.63% and 0.05% respectively. EDNS When the reliability index is 5%, it can be considered that the reliability indicators obtained by TEM and traditional NSMCS are reasonable.

[0090] The analysis shows that even if the failure probability of system components changes due to various reasons, the TEM model trained based on the initial system conditions can still be used as an effective state analysis tool without retraining. This helps to calculate the reliability level of the system more quickly.

[0091] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A method for constructing neural network training data for power system reliability assessment, characterized in that: The following steps are involved: S01: Calculate the probability of the power system being in a normal state or a first-order fault state based on the failure probability of the generator sets and transmission lines; S02: For each dimension of the Latin Hypercube , divide the interval [0,1] into N non-overlapping intervals, each of which has a length of 1 / N, in each dimension and each interval Generate a uniformly distributed random number , mapped to the corresponding interval to generate sample points; S03: For each dimension , N sample points generated by random sorting The positions of form the final Latin hypercube sample matrix ,Will No. The elements in the column are compared with the updated component failure probability to determine the operating status of each generator set and each transmission line in the power system, and the first System status samples ; S04: According to the current system status , obtain the possible load reduction ; S05: According to the current system status and possible load reduction Generate input and corresponding labels for neural network training data.

2. The method for constructing neural network training data for power system reliability assessment according to claim 1, characterized in that: In step S03, the probability of the power system being in a normal state or a first-order fault state is calculated. The formula is: , in, is the total number of generating units and transmission lines, It is the updated The failure probability of a component, It is the updated The probability of failure of a component.

3. The method for constructing neural network training data for power system reliability assessment according to claim 1, characterized in that: Step S02 also includes updating the random number : 。 4. The method for constructing neural network training data for power system reliability assessment according to claim 1, characterized in that: The method of generating the input of the neural network training data and the corresponding labels in step S05 includes: Enter the bus related input , Line related input The matrix is ​​used as input data for the neural network: , The labels output by the neural network are: , in, is the number of buses in the power system, is the number of lines, Indicates Available generating capacity on each busbar, Indicates The load demand on each busbar, and Respectively represent The bus numbers at the beginning and end of the line, It is used for DC power flow calculation. The susceptance of the line, Indicates The available transmission capacity of the lines, Indicates the load reduction amount under the current system status, Indicates the total installed capacity of the system.

5. A power system reliability assessment method based on Transformer encoder, characterized in that: The following steps are involved: Build the Transformer encoder model; Constructing input data of a neural network using the method described in any one of claims 1 to 4; The relationship between the load reduction amount and the system state variables of the power system is obtained through the trained Transformer encoder model; Calculate reliability indicators of power systems.

6. The power system reliability assessment method based on Transformer encoder according to claim 5 is characterized in that: The Transformer encoder model contains 10 layers, each performing a transformation ,in Indicates the number of layers, Represents two independent fully connected operations, which transform the inputs associated with the busbars into and line-related inputs Convert to output and ,pass The operation will and Mapped to D dimensions, Abandon the load head , and Splice them together and then get them through batch normalization operation , then Input to , , , , and In the Transformer encoder composed of , in the Transformer encoder, and is the batch normalization operation, is the attention operation, and is the residual connection operation, It is a two-layer perceptron with ELU activation function, and also includes two layers of fully connected operations; through Operation Extraction The first line of , and through the inclusion of a fully connected operation and an ELU activation function Processing, generation load reduction .

7. The power system reliability assessment method based on Transformer encoder according to claim 6 is characterized in that: Said Input in the attention operation By three different weight matrices Perform matrix multiplication respectively to obtain query matrices , key matrix Sum Matrix , the calculation formula is , perform a dot product operation on the query matrix and the key matrix, and divide each dot product result by Scaling is performed, and then the softmax function is applied to obtain the weights on the value matrix, which is calculated as follows: .

8. The power system reliability assessment method based on Transformer encoder according to claim 6 is characterized in that: Dynamically reduce the learning rate of the ELU activation function. Methods include: Establish an initial learning rate and choose a monitoring metric; After completing each epoch, the monitoring metric is evaluated, and if the performance does not improve within a set time, the learning rate is reduced by a predetermined factor.

9. The power system reliability assessment method based on Transformer encoder according to claim 5 is characterized in that: The load reduction of the system state predicted by the neural network is used to calculate the reliability indicators of the power system, including the expected shortage power EDNS and the load loss probability LOLP; When calculating the LOLP index, the system state where the predicted load reduction is greater than 0 is considered as a fault state, otherwise it is a normal state; To evaluate the predictive performance of the model, the performance indicators of the neural network model are as follows: , , , , , , Among them, MAE is the mean absolute error, MSE is the mean square error, ACC is the accuracy, PR is the precision, RC is the recall, and F1 is the F1 score. N represents the total number of predicted system state samples, represents the predicted load reduction, Indicates the actual load reduction amount, Indicates A sample of system status; , represents the number of samples that are predicted to be in a fault state and are actually in a fault state, It indicates the number of samples that are predicted to be normal and are actually normal. represents the number of samples that are predicted to be in a fault state but are actually in a normal state. Indicates the number of samples that were predicted to be in a normal state but were actually in a fault state.

10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the method for constructing neural network training data for power system reliability assessment described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Comprehensive energy system reliability evaluation method based on mechanism and data hybrid driving

    CN115409369A

  • New energy power system reliability evaluation method based on convolutional neural network

    CN115564310A