Electric power safety assessment method based on multilayer extreme learning machine and related equipment
By applying the power safety evaluation method of multi-layer extreme learning machines in the power system, the traditional method is solved inefficient and poor adaptability when processing real-time dynamic data and complex pattern recognition, achieving higher prediction accuracy and real-time performance, ensuring the safe and stable operation of the power system.
Patent Information
- Application Number
- CN202411502888.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-28
AI Technical Summary
Traditional power system safety assessment methods are inefficient when processing real-time dynamic data and complex pattern recognition, difficult to adapt to rapid changes in power systems, and difficult to accurately capture the complex behavior of the system when dealing with nonlinear characteristics.
Using a power safety evaluation method based on a multi-layer limit learning machine, a large amount of historical data and offline simulation data of the power system are efficiently processed through the automatic encoder characteristics of the limit learning machine, multiple hidden layers are stacked to learn the deep features of the data, and the hidden layer weight is not adjusted during the training process to reduce training time.
It improves the prediction accuracy and real-time performance of power system safety assessment, can promptly detect and predict potential risks, and ensure the safe and stable operation of the power system.
Smart Images

Figure CN119538714A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power safety detection, and in particular to a power safety assessment method and related equipment based on a multi-layer extreme learning machine. Background Art
[0002] As an important infrastructure in modern society, the safe and stable operation of the power system is of great significance to ensuring the normal operation of the national economy and social life. With the continuous expansion of the scale of the power system and the connection of new energy sources to the grid, the complexity of the system is increasing, which puts higher requirements on the safe and stable operation of the power system.
[0003] As a huge nonlinear system, the power system has the characteristics of large data volume and complex data types. Its safety assessment requires the comprehensive use of state estimation, voltage and frequency stability analysis and other technologies. However, with the increase in the complexity of the power system and the amount of data, traditional methods have limitations in processing real-time dynamic data and complex pattern recognition. Summary of the invention
[0004] In view of this, the purpose of this application is to propose a power safety assessment method and related equipment based on a multi-layer extreme learning machine.
[0005] As one aspect of the present application, a power safety assessment method based on a multi-layer extreme learning machine is provided, comprising:
[0006] According to the power data set, an input data set and an output data set are determined; the power data set includes historical data and offline simulation data of the power system; the input data set is used to characterize the electrical data; the output data set is used to characterize the safety level category of the electrical data;
[0007] Determine a first weight matrix and a bias matrix of a multi-layer extreme learning machine model; the multi-layer extreme learning machine model includes an input layer, a hidden layer and an output layer; the first weight matrix is used to represent a weight matrix from the input layer to the hidden layer;
[0008] Based on an extreme learning machine autoencoder, mapping the input data set to the hidden layer, and determining a feature vector of the hidden layer according to the first weight matrix and the bias matrix;
[0009] Using the feature vector as the input vector of the next hidden layer, and using the extreme learning machine autoencoder to determine the feature vectors of the nth and n-1th hidden layers;
[0010] According to the output data set and the characteristic vector of the n-1th hidden layer, a second weight matrix is determined to complete the training; the second weight matrix is used to represent the weight matrix from the nth hidden layer to the output layer.
[0011] Optionally, the feature vector of the hidden layer satisfies the following expression:
[0012] H=s f (W1X+B);
[0013] Wherein, W1 is the first weight matrix, B is the bias matrix, s f It is an activation function used to add nonlinear mapping to the extreme learning machine network.
[0014] Optionally, the step of using the feature vector as an input vector of the next hidden layer and using the extreme learning machine autoencoder to determine the feature vectors of the nth and n-1th hidden layers includes:
[0015] Mapping the feature vector to the next hidden layer to obtain an input vector of the next hidden layer;
[0016] Determine a reconstruction matrix of the first weight matrix; the reconstruction matrix is a transposed matrix of the first weight matrix;
[0017] Determine a feature vector of the next hidden layer according to the input vector and the reconstruction matrix;
[0018] Based on the extreme learning machine autoencoder, the feature vectors of the nth layer and the n-1th layer in the hidden layer are determined; wherein the feature vector of the nth layer of the hidden layer satisfies the following expression:
[0019]
[0020] Among them, H n is the feature vector of the hidden layer in the nth layer, H n-1 is the feature vector of the hidden layer in the n-1th layer, is the reconstruction matrix of the nth hidden layer.
[0021] Optionally, the second weight matrix satisfies the following expression:
[0022]
[0023] Wherein, W2 is the second weight matrix, H n The Moore-Penrose generalized inverse matrix, T is the output data set.
[0024] Optionally, the first weight matrix and the bias matrix satisfy the following expression:
[0025] W T W = I;
[0026] B T B = I;
[0027] Where W is the first weight matrix, W T is the transposed matrix of the first weight matrix, B is the bias matrix, and B T is the transposed matrix of the bias matrix, and I is a unit vector.
[0028] Optionally, after the training is completed, the method further includes:
[0029] Acquire a test sample set; the test sample data set is a set of sample data randomly selected from the power data set; the test sample data set includes samples and corresponding status indicators; the status indicators include safe and unsafe;
[0030] Inputting the test sample set into the multi-layer extreme learning machine model to determine the prediction result;
[0031] Based on the prediction results, the average percentage error and accuracy of the multi-layer extreme learning machine model are determined; the average percentage error satisfies the following expression:
[0032]
[0033] Among them, i is the number of samples, y i is the actual value of the i-th sample, is the predicted value of the i-th sample, y base is the pre-accident baseline value of the status indicator;
[0034] The accuracy satisfies the following expression:
[0035]
[0036] Among them, E AC1 Evaluate the accuracy of state security samples, E AC2 Evaluate the accuracy of the state-unsafe samples, N TP is the number of safe samples that are accurately assessed as safe samples, N FP is the number of safe samples misjudged as unsafe samples, N TN is the number of unsafe samples that are accurately assessed as unsafe samples, N FN is the number of unsafe samples that are misclassified as safe samples.
[0037] Optionally, hyperparameters of the multi-layer extreme learning machine model are configured; the hyperparameters include the number of layers of the hidden layer, the number of neurons in the hidden layer, and the learning rate.
[0038] As a second aspect of the present application, there is provided a power safety assessment device based on a multi-layer extreme learning machine, comprising: a determination module, and a processing module;
[0039] The determination module is used to determine an input data set and an output data set according to a power data set; the power data set includes historical data and offline simulation data of the power system; the input data set is used to characterize electrical data; the output data set is used to characterize the safety level category of the electrical data;
[0040] The determination module is further used to determine a first weight matrix and a bias matrix of a multi-layer extreme learning machine model; the multi-layer extreme learning machine model includes an input layer, a hidden layer and an output layer; the first weight matrix is used to represent a weight matrix from the input layer to the hidden layer;
[0041] The processing module is used to map the input data set to the hidden layer based on an extreme learning machine autoencoder, and determine a feature vector of the hidden layer according to the first weight matrix and the bias matrix;
[0042] The processing module is further used to use the feature vector as an input vector of the next hidden layer, and use the extreme learning machine autoencoder to determine the feature vectors of the nth and n-1th hidden layers;
[0043] The determination module is also used to determine a second weight matrix based on the output data set and the characteristic vector of the n-1th hidden layer to complete the training; the second weight matrix is used to represent the weight matrix from the nth hidden layer to the output layer.
[0044] Optionally, the feature vector of the hidden layer satisfies the following expression:
[0045] H=s f (W1X+B);
[0046] Wherein, W1 is the first weight matrix, B is the bias matrix, s f It is an activation function used to add nonlinear mapping to the extreme learning machine network.
[0047] Optionally, the processing module is specifically used to map the feature vector to the next hidden layer to obtain an input vector of the next hidden layer;
[0048] Determine a reconstruction matrix of the first weight matrix; the reconstruction matrix is a transposed matrix of the first weight matrix;
[0049] Determine a feature vector of the next hidden layer according to the input vector and the reconstruction matrix;
[0050] Based on the extreme learning machine autoencoder, the feature vectors of the nth layer and the n-1th layer in the hidden layer are determined; wherein the feature vector of the nth layer of the hidden layer satisfies the following expression:
[0051]
[0052] Among them, H n is the feature vector of the hidden layer in the nth layer, H n-1 is the feature vector of the hidden layer in the n-1th layer, is the reconstruction matrix of the nth hidden layer.
[0053] Optionally, the second weight matrix satisfies the following expression:
[0054]
[0055] Wherein, W2 is the second weight matrix, H n The Moore-Penrose generalized inverse matrix, T is the output data set.
[0056] Optionally, the first weight matrix and the bias matrix satisfy the following expression:
[0057] W T W = I;
[0058] B T B = I;
[0059] Where W is the first weight matrix, W T is the transposed matrix of the first weight matrix, B is the bias matrix, and B T is the transposed matrix of the bias matrix, and I is a unit vector.
[0060] Optionally, the power safety assessment device based on a multi-layer extreme learning machine also includes an acquisition module.
[0061] The acquisition module is used to acquire a test sample set; the test sample data set is a set of sample data randomly selected from the power data set; the test sample data set includes samples and corresponding status indicators; the status indicators include safe and unsafe;
[0062] The determination module is further used to input the test sample set into the multi-layer extreme learning machine model to determine the prediction result;
[0063] The determination module is further used to determine the average percentage error and accuracy of the multi-layer extreme learning machine model based on the prediction result; the average percentage error satisfies the following expression:
[0064]
[0065] Among them, i is the number of samples, y i is the actual value of the i-th sample, is the predicted value of the i-th sample, y base is the pre-accident baseline value of the status indicator;
[0066] The accuracy satisfies the following expression:
[0067]
[0068] Among them, E AC1 Evaluate the accuracy of state security samples, E AC2 Evaluate the accuracy of the state-unsafe samples, N TP is the number of safe samples that are accurately assessed as safe samples, N FP is the number of safe samples misjudged as unsafe samples, N TN is the number of unsafe samples that are accurately assessed as unsafe samples, N FN is the number of unsafe samples that are misclassified as safe samples.
[0069] Optionally, the power safety assessment device based on a multi-layer extreme learning machine also includes a configuration module.
[0070] The configuration module is used to configure the hyperparameters of the multi-layer extreme learning machine model; the hyperparameters include the number of layers of the hidden layer, the number of neurons in the hidden layer, and the learning rate.
[0071] As the third aspect of the present application, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the power safety assessment method based on the multi-layer extreme learning machine as described above is implemented.
[0072] As the fourth aspect of the present application, a non-transitory computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable the computer to execute the above-mentioned power safety assessment method based on multi-layer extreme learning machine provided in the present application.
[0073] From the above, it can be seen that the power safety assessment method and related equipment based on a multi-layer extreme learning machine provided in the present application can efficiently process a large amount of historical data and offline simulation data of the power system by utilizing the autoencoder characteristics of the extreme learning machine, which helps to quickly extract key features in the data and provide strong support for the safety assessment of the power system. Furthermore, the multi-layer extreme learning machine model stacks multiple hidden layers, uses the feature vector of the current layer as the input vector of the next hidden layer, and uses the autoencoder to determine the feature vectors of the nth and n-1th hidden layers, so that the model can learn the deep features of the data, thereby improving the prediction accuracy of the model. In addition, the extreme learning machine is characterized in that the weights of the hidden layers do not need to be adjusted during the training process, thereby significantly reducing the training time of the model, saving computing resources, and enabling the power system to detect and predict potential risks in a timely manner, ensuring the safe and stable operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0075] Figure 1 A schematic diagram of a flow chart of a power safety assessment method based on a multi-layer extreme learning machine provided in an embodiment of the present application;
[0076] Figure 2 A flowchart of another power safety assessment method based on a multi-layer extreme learning machine provided in an embodiment of the present application;
[0077] Figure 3 A network structure diagram of a power safety assessment method based on a multi-layer extreme learning machine provided in an embodiment of the present application;
[0078] Figure 4 A flowchart of another power safety assessment method based on a multi-layer extreme learning machine provided in an embodiment of the present application;
[0079] Figure 5 A flowchart of another power safety assessment method based on a multi-layer extreme learning machine provided in an embodiment of the present application;
[0080] Figure 6 A flowchart of another power safety assessment method based on a multi-layer extreme learning machine provided in an embodiment of the present application;
[0081] Figure 7A schematic diagram of the composition of a power safety assessment device based on a multi-layer extreme learning machine provided in an embodiment of the present application;
[0082] Figure 8 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0084] It should be noted that, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a concrete way. Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the usual meaning understood by people with ordinary skills in the field to which the present application belongs. SUMMARY OF THE INVENTION
[0086] In the related technologies, the safety assessment of power systems mainly relies on physical models and numerical calculations, including state estimation, load flow analysis, and fault impact analysis. These technologies analyze the stability and reliability of power systems by building mathematical models, which is crucial to ensuring the safe operation of power systems. However, with the continuous expansion of the scale of power systems and the connection of new energy sources to the grid, existing model-based safety assessment methods usually require long computing time and high computing resources. These traditional methods are insufficient in terms of real-time performance, adaptability, and accuracy.
[0087] The inventors of this application found that, firstly, the real-time dynamic data and complex pattern recognition of large-scale power grids place higher demands on the computational efficiency of related technologies, while traditional methods are inefficient in processing these data; secondly, the rapid changes in power systems require that the evaluation methods be able to respond in a timely manner, but related technologies are often difficult to adapt to such rapid changes; in addition, traditional methods also have limitations when dealing with the nonlinear characteristics of power systems, making it difficult to accurately capture the complex behavior of the system.
[0088] In order to solve the above problems, the present application provides a power security assessment method based on a multi-layer extreme learning machine. By utilizing the autoencoder characteristics of the extreme learning machine, it can efficiently process a large amount of historical data and offline simulation data of the power system, which helps to quickly extract key features in the data and provide strong support for the security assessment of the power system. Furthermore, the multi-layer extreme learning machine model stacks multiple hidden layers, uses the feature vector of the current layer as the input vector of the next hidden layer, and uses the autoencoder to determine the feature vectors of the nth and n-1th hidden layers, so that the model can learn the deep features of the data, thereby improving the prediction accuracy of the model. In addition, the extreme learning machine is characterized in that the weights of the hidden layers do not need to be adjusted during the training process, thereby significantly reducing the training time of the model, saving computing resources, and enabling the power system to detect and predict potential risks in a timely manner, ensuring the safe and stable operation of the power system.
[0089] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.
[0090] Figure 1 A flowchart of a power safety assessment method based on a multi-layer extreme learning machine is provided in an embodiment of the present application. Figure 1 As shown, the power safety assessment method based on a multi-layer extreme learning machine provided in this application specifically includes the following steps:
[0091] S101. Determine an input data set and an output data set according to a power data set.
[0092] Among them, the power data set includes historical data and offline simulation data of the power system; the input data set is used to characterize the electrical data; and the output data set is used to characterize the safety level category of the electrical data.
[0093] In some embodiments, a high-precision sensor network is used to collect multi-dimensional operating data of the power system in real time (such as voltage, current, frequency, temperature, etc.). The power data set includes but is not limited to the active and reactive demand of the load bus, the state of the power transformer tap, the active output of the power plant and other electrical data; the output data set may include four categories: safety, critical safety, emergency and danger, and the four safety categories can be further divided into multiple sub-safety levels. Further, the power data set is cleaned and normalized, and the preprocessing process can use denoising and outlier detection algorithms such as denoising technology based on wavelet transform or anomaly detection model based on Bayesian method to provide more accurate data processing results in complex environments. Further, appropriate data expansion is performed, and the data is divided into input data sets and output data sets.
[0094] It should be understood that smart sensors based on Internet of Things technology can be used in the data collection process. These sensors can collect and transmit data more efficiently. In addition, optical fiber sensing technology can also be used to detect physical quantities such as temperature, stress, and electromagnetic fields in the power system, thereby further improving the accuracy and reliability of data collection.
[0095] In some embodiments, Figure 2 As shown, before S101, the power safety assessment method based on a multi-layer extreme learning machine provided in the embodiment of the present application further includes the following S100:
[0096] S100. Configure the hyperparameters of the multi-layer extreme learning machine model.
[0097] Among them, the hyperparameters include the number of hidden layers, the number of neurons in the hidden layers, and the learning rate.
[0098] In some embodiments, a multi-layer extreme learning machine (ML-ELM) model is a neural network model, which is characterized by learning the features of data layer by layer to achieve accurate prediction of complex data. Compared with the extreme learning machine (ELM), it has more hidden layers, stronger representation ability, and can learn more complex mapping relationships. Before training the model, the number of hidden layers, the number of neurons in the hidden layers, and the learning rate are set to control the learning ability and complexity of the model.
[0099] It should be noted that the optimal number of hidden layers is determined by setting an initial value, such as 2 or 3 layers, and then gradually adjusting it according to the performance of the validation set; the optimal number of neurons is determined by adopting empirical rules, such as 1.5 times the number of nodes in the input layer, or through cross-validation.
[0100] S102: Determine a first weight matrix and a bias matrix of a multi-layer extreme learning machine model.
[0101] The multi-layer extreme learning machine model includes an input layer, a hidden layer and an output layer; the first weight matrix is used to represent the weight matrix from the input layer to the hidden layer.
[0102] In some embodiments, in ML-ELM, the first weight matrix and bias matrix from the input layer to the hidden layer are randomly initialized, and the values of the weight matrix and the bias matrix can be randomly generated by using uniform distribution or normal distribution and remain unchanged during training.
[0103] It should be noted that the first weight matrix is the input weight matrix of each layer in ML-ELM except the output layer. In each hidden layer of ML-ELM, the first weight matrix and the bias matrix are randomly initialized and generated by the current layer network. The initialization method includes randomly selecting values from Gaussian distribution (normal distribution) or uniform distribution. For example, the first weight matrix can be randomly selected from a Gaussian distribution with a mean of 0 and a standard deviation of 1, and the bias matrix B can be selected from a uniform distribution.
[0104] In some embodiments, the first weight matrix and the bias matrix satisfy the following expressions:
[0105] W T W = I;
[0106] B T B = I;
[0107] Among them, W is the first weight matrix, W T is the transposed matrix of the first weight matrix, B is the bias matrix, and B T is the transposed matrix of the bias matrix, and I is the unit vector.
[0108] S103, based on the extreme learning machine autoencoder, mapping the input data set to the hidden layer, and determining the eigenvector of the hidden layer according to the first weight matrix and the bias matrix.
[0109] In some embodiments, an extreme learning machine auto-encoder (ELM-AE) is used to extract features of input data. The autoencoder is an unsupervised learning algorithm that learns the compressed representation of input data by minimizing the reconstruction error. ELM-AE optimizes the selection of weights and improves the prediction accuracy and generalization ability of the network. By using ELM-AE for layer-by-layer unsupervised training, the problems caused by random weights can be effectively avoided, and the nonlinear mapping ability of the network is improved, which can effectively characterize complex functions and improve prediction accuracy and generalization ability.
[0110] In some embodiments, the input data set is: X = {x i |1≤i≤N}, the output data set is: T={t i |1≤i≤N}, where N is the number of instances in the data set. In addition, the feature vector of the hidden layer is H = {h i |1≤i≤N}, where h i is the feature vector corresponding to the i-th instance, then the input data set X is sent to the network, and the data will be mapped from the input layer to the feature space of the hidden layer. Further, the key information set extracted from the input data set is used for subsequent processing. The feature vector of the hidden layer satisfies the following expression:
[0111] H=s f (W1X+B);
[0112] Among them, W1 is the first weight matrix, B is the bias matrix, s f It is an activation function used to add nonlinear mapping to the extreme learning machine network.
[0113] It should be understood that in ELM, the activation function is used to add nonlinear mapping to the network. Common activation functions include Sigmoid, Tanh, and ReLU.
[0114] S104, using the feature vector as the input vector of the next hidden layer, and using the extreme learning machine autoencoder to determine the feature vectors of the nth and n-1th hidden layers.
[0115] In some embodiments, Figure 3 As shown in the figure, x is the input data set, y is the output data set, h is the feature vector, H is the input vector, W is the input weight matrix, and β is the reconstruction matrix. By stacking multiple hidden layers, the depth of the model is increased and the learning ability of the model is improved. The feature vector of one hidden layer is used as the input of the next layer to realize multi-layer feature extraction. This process is repeated until the preset number of hidden layers is reached.
[0116] It should be understood that the nth and n-1th hidden layers are any hidden layers in the ML-ELM, and the number of hidden layers of the ML-ELM is not limited.
[0117] In some embodiments, Figure 4 As shown, S104 can be specifically implemented as follows S1041-S1044:
[0118] S1041. Map the feature vector to the next hidden layer to obtain the input vector of the next hidden layer.
[0119] In some embodiments, when information is passed in ML-ELM, each layer extracts different features, allowing the model to learn more complex patterns. The input data is converted into feature vectors through the weight matrix and bias matrix of the first hidden layer, which are then used as input vectors for the next hidden layer, enabling information flow in the network and deep learning.
[0120] S1042: Determine a reconstruction matrix of the first weight matrix.
[0121] The reconstruction matrix is the transposed matrix of the first weight matrix.
[0122] In some embodiments, the reconstruction matrix is the transposed matrix of the first weight matrix, which is used to map the feature vector of the hidden layer back to the input space to achieve reconstruction of the feature vector, which helps the model learn a more robust feature representation and improve the generalization ability of the model. The calculation of the reconstruction matrix can be completed by an optimization algorithm, such as using a gradient descent method or an orthogonal matching pursuit (OMP) algorithm to approximate the optimal reconstruction of the weight matrix.
[0123] S1043. Determine the feature vector of the next hidden layer according to the input vector and the reconstruction matrix.
[0124] In some embodiments, the reconstruction matrix is used as the first weight matrix of the next hidden layer, and the input vector is mapped to the next hidden layer using a randomly initialized bias matrix, as described in S103 above, to obtain the feature vector of the next hidden layer.
[0125] S1044. Based on the extreme learning machine autoencoder, determine the feature vectors of the nth layer and the n-1th layer in the hidden layer.
[0126] In some embodiments, in a multi-layer extreme learning machine model, by stacking multiple hidden layers, deeper feature learning can be achieved, and the idea of ELM-AE is used to determine the feature vectors of the nth and n-1th hidden layers. The feature vector of the nth hidden layer satisfies the following expression:
[0127]
[0128] Among them, H n is the feature vector of the nth hidden layer, H n-1 is the feature vector of the n-1th hidden layer, is the reconstruction matrix of the nth hidden layer.
[0129] S105. Determine a second weight matrix according to the output data set and the feature vector of the n-1th hidden layer, and complete the training.
[0130] The second weight matrix is used to represent the weight matrix from the nth hidden layer to the output layer.
[0131] In some embodiments, the output weight matrix connecting the last hidden layer and the output layer, i.e., the second weight matrix, determines the final output of the model. Then, the following formula is minimized by solving the second weight matrix:
[0132] min‖H n W2-T‖;
[0133] The second weight matrix satisfies the following expression:
[0134]
[0135] Where W2 is the second weight matrix, H n The Moore-Penrose generalized inverse matrix of , and T is the output dataset.
[0136] It should be understood that the Moore-Penrose Pseudoinverse is used to calculate the weight matrix so that the output layer weights can be directly obtained through the least squares solution, ensuring that a stable solution can be obtained even if the eigenvector is not full rank.
[0137] It should be noted that in order to avoid overfitting of the model, a regularization term is introduced, and the objective function satisfies the following expression:
[0138]
[0139] Where λ is the regularization coefficient and ε = W2H-T is the training error of the entire network;
[0140] Taking the regularization term into account, the second weight matrix satisfies the following expression:
[0141]
[0142] Among them, H T is the transposed matrix of H.
[0143] The power safety assessment method based on a multi-layer extreme learning machine provided in the present application can efficiently process a large amount of historical data and offline simulation data of the power system by utilizing the autoencoder characteristics of the extreme learning machine, which helps to quickly extract key features in the data and provide strong support for the safety assessment of the power system. Furthermore, the multi-layer extreme learning machine model stacks multiple hidden layers, uses the feature vector of the current layer as the input vector of the next hidden layer, and uses the autoencoder to determine the feature vectors of the nth layer and the n-1th layer of the hidden layer, so that the model can learn the deep features of the data, thereby improving the prediction accuracy of the model. In addition, the extreme learning machine is characterized in that the weights of the hidden layers do not need to be adjusted during the training process, thereby significantly reducing the training time of the model, saving computing resources, and enabling the power system to detect and predict potential risks in a timely manner, thereby ensuring the safe and stable operation of the power system.
[0144] In some embodiments, Figure 5 As shown, the power safety assessment method based on the multi-layer extreme learning machine provided in the embodiment of the present application also includes the following S201-S203:
[0145] S201: Obtain a test sample set.
[0146] In some embodiments, the test sample data set is a set of sample data randomly selected from the power data set. This part of the data did not participate in the previous model training process and is mainly used to verify the performance of the model on unknown data. The test sample data set includes samples and corresponding status indicators. The status indicators include safe and unsafe, which are category labels used to represent the operating status of the power system. This is the target variable that the model needs to predict.
[0147] S202: Input the test sample set into the multi-layer extreme learning machine model to determine the prediction result.
[0148] In some embodiments, the test sample set is input into the trained ML-ELM model, the model will process the input features of each test sample, the model will make predictions based on its learned weights and biases, and output a security status prediction corresponding to the sample.
[0149] S203: Based on the prediction results, determine the average percentage error and accuracy of the multi-layer extreme learning machine model.
[0150] In some embodiments, the accuracy of the model is evaluated by comparing the predicted output of the model with the actual state indicators in the test sample set, and the average percentage error is used as an indicator to measure the difference between the model prediction value and the actual value. It is obtained by calculating the difference between the predicted value and the actual value, then dividing it by the actual value, and finally averaging these differences for all samples. The smaller the average percentage error, the more accurate the model's prediction. The average percentage error satisfies the following expression:
[0151]
[0152] Among them, i is the number of samples, y i is the actual value of the i-th sample, is the predicted value of the i-th sample, y base is the pre-accident baseline value of the status indicator;
[0153] Accuracy is another important indicator to measure the correctness of model prediction. It is obtained by calculating the ratio of the number of state indicators correctly predicted by the model to the total number of samples. The higher the accuracy, the stronger the prediction ability of the model. The accuracy satisfies the following expression:
[0154]
[0155] Among them, E AC1 Evaluate the accuracy of state security samples, E AC2 Evaluate the accuracy of the state-unsafe samples, N TP is the number of safe samples that are accurately assessed as safe samples, N FP is the number of safe samples misjudged as unsafe samples, NTN is the number of unsafe samples that are accurately assessed as unsafe samples, N FN is the number of unsafe samples that are misclassified as safe samples.
[0156] In some embodiments, a set of events that require power system security assessment or prediction is formulated. Next, the corresponding input data is formed, and the data is normalized and cleaned to ensure the quality and consistency of the data. Subsequently, the processed input data is input into the ML-ELM network that has been trained offline for security assessment. The ML-ELM network outputs the assessment results based on the input data. These output data are denormalized to obtain the safety indicators of each disturbance event. Then, these safety indicators are combined to evaluate the state safety of each event. Furthermore, in order to improve the generalization ability of the ML-ELM network, the input and output data obtained during the online evaluation process can be fed back to the offline training samples to expand the historical data set. This helps the model learn more features and patterns, and improves its accuracy and reliability in future evaluations.
[0157] It should be noted that in the calculation of safety assessment indicators, fuzzy logic or gray system theory can handle higher-dimensional uncertainties and provide more flexible system safety assessment results. In the prediction process, the fault diagnosis and risk prediction of the power system can be realized through the embedded rule base and knowledge base, or the multi-agent system can be used to simulate the interactive behavior of different subsystems in the power system to predict risks. In addition, through intuitive charts, augmented reality technology or virtual reality technology, the operating status and prediction results of the power system can be visualized in three-dimensional space, providing a more intuitive decision support tool.
[0158] As an example scenario, this solution can be applied in smart grids to evaluate the security of distributed energy systems and ensure the balance and stability of the grid between different power sources.
[0159] As another example scenario, this solution can be applied in complex industrial control systems, such as automation control systems in chemical and manufacturing industries, to monitor and predict the operating status of equipment in real time and prevent equipment failures.
[0160] As another exemplary scenario, the present solution can be applied in intelligent transportation systems to monitor and predict the operating status of transportation networks, especially when dealing with peak traffic, to help prevent traffic congestion and accidents.
[0161] As another exemplary scenario, this solution can be applied in aerospace systems to evaluate the safety status of aircraft or satellites, monitor their operating parameters in real time, predict possible system failures, and ensure the safety of flight missions.
[0162] It should be understood that the present solution is not limited to the above exemplary scenarios. In practical applications, the present solution is applicable to any application scenario that requires security monitoring and evaluation.
[0163] like Figure 6 As shown, the embodiment of the present application provides a flow chart of a power safety assessment method based on a multi-layer extreme learning machine. First, the database of the power system is initialized to obtain a power data set, and the data is preprocessed to obtain an input data set and an output data set. For a specific description, please refer to the relevant description of S101 above, which will not be repeated in this application. Then, the hyperparameters of ML-ELM are configured, including the number of hidden layers, the number of neurons in the hidden layer, and the learning rate, etc. For a specific description, please refer to the relevant description of S100 above, which will not be repeated in this application. Then, the ML-ELM model is trained, starting from the first hidden layer, an autoencoder is introduced, orthogonal random encoder weights and bias terms are generated, namely, a first weight matrix and a bias matrix, and the reconstruction matrix of the first weight matrix is solved to obtain the eigenvector of the hidden layer. For a specific description, For details, please refer to the relevant description of S102-S103 above, which will not be described in detail in this application. Furthermore, the feature vector is used as the input vector of the next hidden layer, and the feature vectors of the nth and n-1th hidden layers are determined by using the extreme learning machine autoencoder. For details, please refer to the relevant description of S104 above, which will not be described in detail in this application. Finally, the weight matrix from the last hidden layer to the output layer is obtained by layer-by-layer training to complete the training. For details, please refer to the relevant description of S105 above, which will not be described in detail in this application. In addition, the ML-ELM model is tested by a group of sample data randomly selected from the power data set, and the model error is calculated by denormalizing the data to obtain the trained model performance. For details, please refer to the relevant description of S201-S203 above, which will not be described in detail in this application.
[0164] The power safety assessment method based on the multi-layer extreme learning machine provided in this application can ensure that the model maintains a certain stability during the training process, avoid overfitting of the model, and improve the generalization ability of the model by imposing constraints on the weight matrix and the bias matrix. Then, by evaluating the performance of the model through the test sample set, the prediction accuracy of the model can be intuitively understood, which is helpful for further optimization and adjustment of the model, thereby improving the reliability and accuracy of the model. By comprehensively improving the evaluation accuracy of the state samples, it is possible to accurately distinguish the safe state and unsafe state of the power system, reduce false alarms and missed alarms, ensure that the system safety can be effectively monitored and managed under various operating conditions, and improve the overall reliability of the system.
[0165] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0166] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0167] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides an electric power safety assessment device based on a multi-layer extreme learning machine.
[0168] refer to Figure 7 , the power safety assessment device based on the multi-layer extreme learning machine includes: a determination module 701 and a processing module 702;
[0169] The determination module 701 is used to determine an input data set and an output data set according to a power data set; the power data set includes historical data and offline simulation data of the power system; the input data set is used to characterize electrical data; the output data set is used to characterize the safety level category of the electrical data;
[0170] The determination module 701 is also used to determine a first weight matrix and a bias matrix of a multi-layer extreme learning machine model; the multi-layer extreme learning machine model includes an input layer, a hidden layer and an output layer; the first weight matrix is used to represent a weight matrix from the input layer to the hidden layer;
[0171] The processing module 702 is used to map the input data set to the hidden layer based on an extreme learning machine autoencoder, and determine the feature vector of the hidden layer according to the first weight matrix and the bias matrix;
[0172] The processing module 702 is further configured to use the feature vector as an input vector of the next hidden layer, and use the extreme learning machine autoencoder to determine the feature vectors of the nth and n-1th hidden layers;
[0173] The determination module 701 is also used to determine a second weight matrix based on the output data set and the feature vector of the n-1th hidden layer to complete the training; the second weight matrix is used to represent the weight matrix from the nth hidden layer to the output layer.
[0174] In some embodiments, the feature vector of the hidden layer satisfies the following expression:
[0175] H=s f (W1X+B);
[0176] Wherein, W1 is the first weight matrix, B is the bias matrix, s f It is an activation function used to add nonlinear mapping to the extreme learning machine network.
[0177] In some embodiments, the processing module 702 is specifically used to map the feature vector to the next hidden layer to obtain an input vector of the next hidden layer;
[0178] Determine a reconstruction matrix of the first weight matrix; the reconstruction matrix is a transposed matrix of the first weight matrix;
[0179] Determine a feature vector of the next hidden layer according to the input vector and the reconstruction matrix;
[0180] Based on the extreme learning machine autoencoder, the feature vectors of the nth layer and the n-1th layer in the hidden layer are determined; wherein the feature vector of the nth layer of the hidden layer satisfies the following expression:
[0181]
[0182] Among them, H n is the feature vector of the hidden layer in the nth layer, H n-1 is the feature vector of the hidden layer in the n-1th layer, is the reconstruction matrix of the nth hidden layer.
[0183] In some embodiments, the second weight matrix satisfies the following expression:
[0184]
[0185] Wherein, W2 is the second weight matrix, H n The Moore-Penrose generalized inverse matrix, T is the output data set.
[0186] In some embodiments, the first weight matrix and the bias matrix satisfy the following expression:
[0187] WT W = I;
[0188] B T B = I;
[0189] Where W is the first weight matrix, W T is the transposed matrix of the first weight matrix, B is the bias matrix, and B T is the transposed matrix of the bias matrix, and I is a unit vector.
[0190] In some embodiments, the power safety assessment device based on a multi-layer extreme learning machine further includes an acquisition module 703 .
[0191] The acquisition module 703 is used to acquire a test sample set; the test sample data set is a set of sample data randomly selected from the power data set; the test sample data set includes samples and corresponding state indicators; the state indicators include safe and unsafe;
[0192] The determination module 701 is also used to input the test sample set into the multi-layer extreme learning machine model to determine the prediction result;
[0193] The determination module 701 is further used to determine the average percentage error and accuracy of the multi-layer extreme learning machine model based on the prediction result; the average percentage error satisfies the following expression:
[0194]
[0195] Among them, i is the number of samples, y i is the actual value of the i-th sample, is the predicted value of the i-th sample, y base is the pre-accident baseline value of the status indicator;
[0196] The accuracy satisfies the following expression:
[0197]
[0198] Among them, E 2C1 Evaluate the accuracy of state security samples, E AC2 Evaluate the accuracy of the state-unsafe samples, N TP is the number of safe samples that are accurately assessed as safe samples, N FP is the number of safe samples misjudged as unsafe samples, N TN is the number of unsafe samples that are accurately assessed as unsafe samples, N FN is the number of unsafe samples that are misclassified as safe samples.
[0199] In some embodiments, the power safety assessment device based on a multi-layer extreme learning machine further includes a configuration module 704 .
[0200] The configuration module 704 is used to configure the hyperparameters of the multi-layer extreme learning machine model; the hyperparameters include the number of layers of the hidden layer, the number of neurons in the hidden layer, and the learning rate.
[0201] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0202] The device of the above embodiment is used to implement the corresponding power safety assessment method based on the multi-layer extreme learning machine in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0203] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the power safety assessment method based on a multi-layer extreme learning machine described in any of the above embodiments is implemented.
[0204] Figure 8 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0205] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0206] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0207] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0208] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0209] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0210] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0211] The electronic device of the above embodiment is used to implement the corresponding power safety assessment method based on the multi-layer extreme learning machine in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0212] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the power safety assessment method based on the multi-layer extreme learning machine as described in any of the above embodiments.
[0213] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0214] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the power safety assessment method based on the multi-layer extreme learning machine as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0215] Based on the same inventive concept, corresponding to the power security assessment method based on a multi-layer extreme learning machine described in any of the above embodiments, the present disclosure also provides a computer program product, which includes a computer program. In some embodiments, the computer program is executable by one or more processors so that the processor executes the power security assessment method based on a multi-layer extreme learning machine. Corresponding to the execution subject corresponding to each step in each embodiment of the power security assessment method based on a multi-layer extreme learning machine, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0216] The computer program product of the above embodiment is used to enable the processor to execute the power safety assessment method based on the multi-layer extreme learning machine as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0217] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0218] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0219] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0220] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A power safety assessment method based on a multi-layer extreme learning machine, characterized in that: The method comprises: According to the power data set, an input data set and an output data set are determined; the power data set includes historical data and offline simulation data of the power system; the input data set is used to characterize the electrical data; the output data set is used to characterize the safety level category of the electrical data; Determine a first weight matrix and a bias matrix of a multi-layer extreme learning machine model; the multi-layer extreme learning machine model includes an input layer, a hidden layer and an output layer; the first weight matrix is used to represent a weight matrix from the input layer to the hidden layer; Based on an extreme learning machine autoencoder, mapping the input data set to the hidden layer, and determining a feature vector of the hidden layer according to the first weight matrix and the bias matrix; Using the feature vector as the input vector of the next hidden layer, and using the extreme learning machine autoencoder to determine the feature vectors of the nth and n-1th hidden layers; According to the output data set and the characteristic vector of the n-1th hidden layer, a second weight matrix is determined to complete the training; the second weight matrix is used to represent the weight matrix from the nth hidden layer to the output layer.
2. According to the method of claim 1, the feature vector of the hidden layer satisfies the following expression: H=s f (W1X+B); in, W1 is the first weight matrix, B is the bias matrix, s f It is an activation function used to add nonlinear mapping to the extreme learning machine network.
3. The method according to claim 1, characterized in that The step of using the feature vector as an input vector of the next hidden layer and using the extreme learning machine autoencoder to determine the feature vectors of the nth and n-1th hidden layers includes: Mapping the feature vector to the next hidden layer to obtain an input vector of the next hidden layer; Determine a reconstruction matrix of the first weight matrix; the reconstruction matrix is a transposed matrix of the first weight matrix; Determine a feature vector of the next hidden layer according to the input vector and the reconstruction matrix; Based on the extreme learning machine autoencoder, the feature vectors of the nth layer and the n-1th layer in the hidden layer are determined; wherein the feature vector of the nth layer of the hidden layer satisfies the following expression: Among them, H n is the feature vector of the hidden layer in the nth layer, H n-1 is the feature vector of the hidden layer in the n-1th layer, is the reconstruction matrix of the nth hidden layer.
4. According to the method of claim 3, the second weight matrix satisfies the following expression: in, W2 is the second weight matrix, H n The Moore-Penrose generalized inverse matrix, T is the output data set.
5. The method according to claim 1, characterized in that: The first weight matrix and the bias matrix satisfy the following expression: W T W=I; B T B=I; Where W is the first weight matrix, W T is the transposed matrix of the first weight matrix, B is the bias matrix, and B T is the transposed matrix of the bias matrix, and I is a unit vector.
6. The method according to claim 1, characterized in that After the training is completed, the method further includes: Acquire a test sample set; the test sample data set is a set of sample data randomly selected from the power data set; the test sample data set includes samples and corresponding state indicators; the state indicators include safe and unsafe; Inputting the test sample set into the multi-layer extreme learning machine model to determine the prediction result; Based on the prediction results, the average percentage error and accuracy of the multi-layer extreme learning machine model are determined; the average percentage error satisfies the following expression: Among them, i is the number of samples, y i is the actual value of the i-th sample, is the predicted value of the i-th sample, y base is the pre-accident baseline value of the status indicator; The accuracy satisfies the following expression: Among them, E AC1 Evaluate the accuracy of state security samples, E AC2 Evaluate the accuracy of the state-unsafe samples, N TP is the number of safe samples that are accurately assessed as safe samples, N FP is the number of safe samples misjudged as unsafe samples, N TN is the number of unsafe samples that are accurately assessed as unsafe samples, N FN is the number of unsafe samples that are misclassified as safe samples.
7. The method according to claim 1, characterized in that The method further comprises: The hyperparameters of the multi-layer extreme learning machine model are configured; the hyperparameters include the number of layers of the hidden layer, the number of neurons in the hidden layer, and the learning rate.
8. A power safety assessment device based on a multi-layer extreme learning machine, characterized in that: The device comprises: a determination module and a processing module; The determination module is used to determine an input data set and an output data set according to a power data set; the power data set includes historical data and offline simulation data of the power system; the input data set is used to characterize electrical data; the output data set is used to characterize the safety level category of the electrical data; The determination module is further used to determine a first weight matrix and a bias matrix of a multi-layer extreme learning machine model; the multi-layer extreme learning machine model includes an input layer, a hidden layer and an output layer; the first weight matrix is used to represent a weight matrix from the input layer to the hidden layer; The processing module is used to map the input data set to the hidden layer based on an extreme learning machine autoencoder, and determine a feature vector of the hidden layer according to the first weight matrix and the bias matrix; The processing module is further used to use the feature vector as an input vector of the next hidden layer, and use the extreme learning machine autoencoder to determine the feature vectors of the nth and n-1th hidden layers; The determination module is also used to determine a second weight matrix based on the output data set and the characteristic vector of the n-1th hidden layer to complete the training; the second weight matrix is used to represent the weight matrix from the nth hidden layer to the output layer.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program. 10 . A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to claim 1 .