A secondary circuit error state evaluation method, system, device and medium

Through the ensemble empirical modal decomposition and attention mechanism algorithm, the quadratic loop error timing data is decomposed and feature extraction, which solves the problems of high computing costs and strong data dependence in the existing technology, and achieves a more accurate and stable error evaluation result.

CN119005014BActive Publication Date: 2025-01-07国网福建省电力有限公司营销服务中心 +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411472868.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-07
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

The prior art has high computational cost, strong data dependence, high model complexity and real-time challenges in secondary loop error evaluation, especially in the presence of noise or outliers, which affect the accuracy and stability of the decomposition results.

Method used

The set empirical modal decomposition algorithm is used to decompose the historical error timing data, and the decomposed components are divided into high-frequency and low-frequency sequences in combination with the data compression algorithm, and the features are extracted through the self-attention mechanism and the cross-diffusion attention mechanism algorithm to integrate the error Standard deviation and mean absolute deviation are finally input to the MLP model for evaluation.

Benefits of technology

It improves the stability and reliability of the evaluation results, reduces the randomness and non-stationarity effects of the original data, and provides a more comprehensive and accurate evaluation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005014B_ABST
    Figure CN119005014B_ABST
Patent Text Reader

Abstract

The present invention relates to a secondary loop error state evaluation method, system, device and medium, comprising the following steps: collecting a historical error time series data set and an error state data set of a secondary loop; calculating an error standard deviation and a mean absolute deviation, and decomposing them using a set empirical mode decomposition algorithm; classifying the decomposed components to obtain a high-frequency sequence and a low-frequency sequence; inputting the high-frequency sequence and the low-frequency sequence into a self-attention mechanism algorithm to obtain a first feature and a second feature; normalizing the first feature and the second feature, and then inputting the normalized features into a cross-diffusion attention mechanism algorithm to obtain a third feature and a fourth feature; fusing the third feature, the fourth feature, the error standard deviation and the mean absolute deviation, extracting the fused feature, and inputting the fused feature together with the historical error state data set into an MLP model to output a secondary loop error state evaluation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a secondary circuit error state evaluation method, system, equipment and medium, belonging to the technical field of power metering online monitoring. Background Art

[0002] In the power system, the secondary circuit mainly includes the signal transmission and processing functions of protection, measurement and automation equipment. They are responsible for converting the physical quantities (such as current and voltage) from the main circuit into signals that can be used by the monitoring, protection and control system. Therefore, the accuracy of the secondary circuit directly affects the safety and stability of the power system. Accurately evaluating the error state of the secondary circuit is crucial to ensure the reliable operation of the power system.

[0003] The MLP model, or Multilayer Perceptron, is a basic and important artificial neural network model (ANN).

[0004] Traditional secondary circuit error assessment methods usually rely on statistical analysis of historical data, such as calculating mean and variance. Although these methods can provide some basic error information, they often have difficulty providing accurate assessments when faced with complex time series data and dynamically changing error characteristics. In particular, the prediction accuracy and adaptability of traditional methods are limited in the presence of variable environmental factors and equipment aging.

[0005] Prior art, such as the Chinese patent application with publication number "CN113935513A", discloses a short-term power load forecasting method based on CEEMDAN. The method includes the following steps: using CEEMDAN to decompose the original electric load sequence to obtain several IMF components and trend components; calculating the sample entropy values ​​of several IMF components and trend components, and superimposing the several IMF components and trend components according to the sample entropy values ​​to form a new subsequence; combining the new subsequence and the feature attention mechanism to construct an LSTM prediction model; using the LSTM prediction model to predict the new subsequence, and then superimposing and combining the prediction results of each new subsequence to obtain the total prediction output: the invention introduces the feature attention mechanism and the time series attention mechanism to avoid the influence of the randomness and non-stationarity of the original load data on the subsequent prediction accuracy, and improves the stability of the long time series prediction effect.

[0006] The problem with the above-mentioned prior art is that the CEEMDAN algorithm needs to add white noise multiple times and perform EMD decomposition, and then perform ensemble averaging on the results, which is a relatively time-consuming process. The performance of the CEEMDAN algorithm depends largely on the characteristics and quality of the original data. If there is large noise or outliers in the original data, the accuracy and stability of the decomposition results may be affected. In practical applications, there are defects and shortcomings such as high computational cost, strong data dependence, high model complexity, and real-time challenges. Summary of the invention

[0007] In order to solve the above problems existing in the prior art, the present invention proposes a secondary loop error state evaluation method, system, device and medium.

[0008] The technical solution of the present invention is as follows:

[0009] On the one hand, the present invention provides a secondary loop error state evaluation method, comprising the following steps:

[0010] Collect historical error time series data set and secondary circuit error state data set of the secondary circuit;

[0011] The error standard deviation and error mean absolute deviation of the historical error time series data set are calculated, and the historical error time series data set is decomposed using the ensemble empirical mode decomposition algorithm to obtain different components;

[0012] The data compression algorithm is used to divide the decomposed components into high-frequency sequences and low-frequency sequences according to the sequence complexity;

[0013] The high-frequency sequence and the low-frequency sequence are used as inputs of the self-attention mechanism algorithm to obtain the first feature and the second feature; the first feature and the second feature are normalized, and the normalized first feature and the second feature are used as inputs of the cross-diffusion attention mechanism algorithm to obtain the third feature and the fourth feature;

[0014] Finally, the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation are fused, the fused features are extracted, and they are input into the MLP model together with the historical secondary loop error state data set to obtain the secondary loop error state evaluation result as output.

[0015] As a preferred implementation, the historical error time series data set E is expressed as:

[0016] ;

[0017] in, represents the error value at the tth moment, and T represents the number of moments;

[0018] The error standard deviation of the historical error time series data set The calculation method is expressed as:

[0019] ;

[0020] in, Represents the average error value of historical error time series data;

[0021] The mean absolute deviation of the error of the historical error time series data set The calculation method is expressed as:

[0022] ;

[0023] The historical error time series data set is divided into different components using the ensemble empirical mode decomposition algorithm. The specific calculation steps are as follows:

[0024] ;

[0025] Where M represents the number of modal decompositions, represents the component of the mth mode decomposition, represents the final residual signal;

[0026] Use the data compression algorithm to divide the decomposed components into high-frequency sequences and low-frequency sequences. The specific calculation steps are as follows:

[0027] S1. Calculate the components after decomposition first The mean , convert it into a binary sequence through the relationship between the historical error time series value and the mean:

[0028] ;

[0029] ;

[0030] in, represents the binary value of the mth component, and P represents the binary sequence;

[0031] Initialize the matrix and matrix It is an empty matrix, let m = 1, and the fluctuation size complexity of the binary sequence P is C (0) = 0;

[0032] S2, let the matrix ,matrix ;

[0033] S3. Judgment Is it included , if included, then the binary sequence P fluctuates in size complexity Remain unchanged, otherwise the sequence fluctuation size complexity increases by 1, and the matrix Set it as an empty matrix and let m+1;

[0034] in, represents the first empty matrix, represents the second empty matrix, represents the temporary matrix of the mth first traversal component, A temporary matrix representing the mth second traversal component;

[0035] S4, repeat step S2 until m=M;

[0036] S5. The complexity of the sequence fluctuation calculated based on each component , the complexity of sequence fluctuation size above the preset value Corresponding Classified as high-frequency sequence, the complexity of sequence fluctuation size below the preset value Corresponding Divided into low frequency sequences.

[0037] As a preferred implementation, the high-frequency sequence and the low-frequency sequence are used as inputs of the self-attention mechanism algorithm to establish an attention score matrix:

[0038] ;

[0039] ;

[0040] in, represents a high frequency sequence, represents a low-frequency sequence, , and denote the query, key, and value of the first weight matrix respectively; , and denote the query, key, and value of the second weight matrix respectively; , and They respectively represent the first query weighted high-frequency feature, the first key weighted high-frequency feature, and the first value weighted high-frequency feature of the high-frequency sequence after attention concentration; , and They respectively represent the first query weighted low-frequency feature, the first key weighted low-frequency feature, and the first value weighted low-frequency feature of the low-frequency sequence after attention concentration;

[0041] Use the softmax function to normalize the attention score matrix:

[0042] ;

[0043] ;

[0044] in, represents the high-frequency features after the first normalization, represents the low-frequency feature after the first normalization, Represents the first key weighted high frequency feature The transposed matrix of Represents the first key weighted low-frequency feature The transposed matrix of

[0045] Finally output the first feature And the second feature , the calculation method is expressed as:

[0046] ;

[0047] ;

[0048] The first feature And the second feature Normalization is performed to obtain the normalized first feature and the normalized second feature , the normalized calculation method is expressed as:

[0049] ;

[0050] ;

[0051] in, represents the first normalization function;

[0052] The first feature of the normalization and the normalized second feature As the input of the cross-diffusion attention mechanism algorithm, the attention score matrix is ​​established:

[0053] ;

[0054] ;

[0055] in, , and denote the query, key, and value of the third weight matrix, respectively; , and denote the query, key, and value of the fourth weight matrix, respectively; , and The first feature of the normalization The second query weighted high frequency features, the second key weighted high frequency features and the second value weighted high frequency features after attention concentration; , and They represent the normalized second features The second query weighted low-frequency features, the second key weighted low-frequency features, and the second value weighted low-frequency features after attention concentration;

[0056] Use the softmax function to normalize the attention score matrix:

[0057] ;

[0058] ;

[0059] in, represents the high-frequency features after the second normalization, represents the low-frequency feature after the second normalization, Represents the second key weighted high frequency feature The transposed matrix of Represents the second key weighted low frequency feature The transposed matrix of

[0060] The high-frequency features after the second normalization And the low-frequency features after the second normalization Normalization is performed to obtain the high-frequency features after the second normalization And the low-frequency features after the second normalization , the normalized calculation method is expressed as:

[0061] ;

[0062] ;

[0063] in, represents the second normalization function;

[0064] Then use the softmax function to normalize the high-frequency features after the second normalization And the low-frequency features after the second normalization To perform the fusion:

[0065] ;

[0066] ;

[0067] in, Represents the low-frequency features after the second normalization The transposed matrix of Represents the high-frequency features after the second normalization The transposed matrix of Represents the first high and low frequency features after fusion, Represents the first low-high frequency feature after fusion;

[0068] Finally, the third feature is calculated With the fourth characteristic , the calculation method is:

[0069] ;

[0070] .

[0071] As a preferred implementation, the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation are fused to obtain the fused feature , the fusion method is expressed as:

[0072] ;

[0073] in, Represents feature splicing;

[0074] Then the fused features The historical secondary loop error state data set is input into the MLP model to obtain the secondary loop error state Y. The specific process is:

[0075] ;

[0076] in, Represents the implicit function of the MLP model.

[0077] In another aspect, the present invention further provides a secondary loop error state evaluation system, comprising:

[0078] A data acquisition module, which collects historical error time series data sets and secondary circuit error state data sets of the secondary circuit;

[0079] The sequence partitioning module calculates the error standard deviation and error mean absolute deviation of the historical error time series data set, and uses the ensemble empirical mode decomposition algorithm to decompose the historical error time series data set to obtain different components; the data compression algorithm is used to divide the decomposed components into high-frequency sequences and low-frequency sequences according to the sequence complexity;

[0080] The feature extraction module uses the high-frequency sequence and the low-frequency sequence as inputs of the self-attention mechanism algorithm to obtain the first feature and the second feature; then normalizes the first feature and the second feature, and uses the normalized first feature and the second feature as inputs of the cross-diffusion attention mechanism algorithm to obtain the third feature and the fourth feature;

[0081] The result output module finally fuses the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation, extracts the fused features, and inputs them into the MLP model together with the historical secondary loop error state data set to output the secondary loop error state evaluation result.

[0082] On the other hand, the present invention further provides an electronic device having a computer program stored thereon, wherein when the computer program is executed by a processor, the secondary loop error state evaluation method as described in any embodiment of the present invention is implemented.

[0083] On the other hand, the present invention also provides a computer-readable storage medium for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the secondary loop error state evaluation method as described in any embodiment of the present invention.

[0084] The present invention has the following beneficial effects:

[0085] 1. The present invention collects historical error time series data sets and secondary circuit error state data sets of secondary circuits, integrates information from multiple dimensions, and makes the evaluation results more comprehensive and accurate. The ensemble empirical mode decomposition (EEMD) algorithm is used to decompose the data, and combined with the data compression algorithm, the self-attention mechanism algorithm and the cross-diffusion attention mechanism algorithm, the key features in the high-frequency and low-frequency sequences, as well as statistical features such as the error standard deviation and the mean absolute deviation are extracted, providing rich data support for subsequent evaluations.

[0086] 2. The present invention is based on the introduction of the self-attention mechanism algorithm and the cross-diffusion attention mechanism algorithm, which helps to reduce the impact of the randomness and non-stationarity of the original data on the evaluation results and improve the stability and reliability of the evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 The figure is a schematic diagram of the method flow of the first embodiment of the present invention.

[0088] Figure 2 It is a schematic diagram of the recognition accuracy and precision rate of each secondary circuit of the present invention. DETAILED DESCRIPTION

[0089] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0090] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.

[0091] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0092] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0093] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0094] Embodiment 1:

[0095] See also Figure 1 The present invention proposes a secondary loop error state evaluation method, comprising the following steps:

[0096] Collect historical error time series data set and secondary circuit error state data set of the secondary circuit;

[0097] The error standard deviation and error mean absolute deviation of the historical error time series data set are calculated, and the historical error time series data set is decomposed using the ensemble empirical mode decomposition algorithm to obtain different components;

[0098] The data compression algorithm is used to divide the decomposed components into high-frequency sequences and low-frequency sequences according to the sequence complexity;

[0099] The high-frequency sequence and the low-frequency sequence are used as inputs of the self-attention mechanism algorithm to obtain the first feature and the second feature; the first feature and the second feature are normalized, and the normalized first feature and the second feature are used as inputs of the cross-diffusion attention mechanism algorithm to obtain the third feature and the fourth feature;

[0100] Finally, the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation are fused, the fused features are extracted, and they are input into the MLP model together with the historical secondary loop error state data set to obtain the secondary loop error state evaluation result as output.

[0101] The present invention collects historical error time series data sets and secondary circuit error state data sets of the secondary circuit, integrates information from multiple dimensions, and makes the evaluation results more comprehensive and accurate. The ensemble empirical mode decomposition (EEMD) algorithm is used to decompose the data, and combined with the data compression algorithm, the self-attention mechanism algorithm and the cross-diffusion attention mechanism algorithm, the key features in the high-frequency and low-frequency sequences, as well as statistical features such as the error standard deviation and the mean absolute deviation are extracted, providing rich data support for subsequent evaluations.

[0102] In addition, the introduction of the self-attention mechanism algorithm and the cross-diffusion attention mechanism algorithm helps to reduce the impact of the randomness and non-stationarity of the original data on the evaluation results, and improve the stability and reliability of the evaluation results.

[0103] As a preferred implementation, the historical error time series data set E is expressed as:

[0104] ;

[0105] in, represents the error value at the tth moment, and T represents the number of moments;

[0106] The error standard deviation of the historical error time series data set The calculation method is expressed as:

[0107] ;

[0108] in, Represents the average error value of historical error time series data;

[0109] The mean absolute deviation of the error of the historical error time series data set The calculation method is expressed as:

[0110] ;

[0111] The historical error time series data set is divided into different components using the ensemble empirical mode decomposition algorithm. The specific calculation steps are as follows:

[0112] ;

[0113] Where M represents the number of modal decompositions, represents the component of the mth mode decomposition, represents the final residual signal;

[0114] Use the data compression algorithm to divide the decomposed components into high-frequency sequences and low-frequency sequences. The specific calculation steps are as follows:

[0115] S1. Calculate the components after decomposition first The mean , convert it into a binary sequence through the relationship between the historical error time series value and the mean:

[0116] ;

[0117] ;

[0118] in, represents the binary value of the mth component, and P represents the binary sequence;

[0119] Initialize the matrix and matrix It is an empty matrix, let m = 1, and the fluctuation size complexity of the binary sequence P is C (0) = 0;

[0120] S2, let the matrix ,matrix ;

[0121] S3. Judgment Is it included , if included, then the binary sequence P fluctuates in size complexity Remain unchanged, otherwise the sequence fluctuation size complexity increases by 1, and the matrix Set it as an empty matrix and let m+1;

[0122] in, represents the first empty matrix, represents the second empty matrix, represents the temporary matrix of the mth first traversal component, A temporary matrix representing the mth second traversal component;

[0123] S4, repeat step S2 until m=M;

[0124] S5. The complexity of the sequence fluctuation calculated based on each component , the complexity of sequence fluctuation size above the preset value Corresponding Classified as high-frequency sequence, the complexity of sequence fluctuation size below the preset value Corresponding Divided into low frequency sequences.

[0125] This implementation method combines the ensemble empirical mode decomposition algorithm with the data compression algorithm to further improve the prediction accuracy.

[0126] As a preferred implementation, the high-frequency sequence and the low-frequency sequence are used as inputs of the self-attention mechanism algorithm to establish an attention score matrix:

[0127] ;

[0128] ;

[0129] in, represents a high frequency sequence, represents a low-frequency sequence, , and denote the query, key, and value of the first weight matrix respectively; , and denote the query, key, and value of the second weight matrix respectively; , and They respectively represent the first query weighted high-frequency feature, the first key weighted high-frequency feature, and the first value weighted high-frequency feature of the high-frequency sequence after attention concentration; , and They respectively represent the first query weighted low-frequency feature, the first key weighted low-frequency feature, and the first value weighted low-frequency feature of the low-frequency sequence after attention concentration;

[0130] Use the softmax function to normalize the attention score matrix:

[0131] ;

[0132] ;

[0133] in, represents the high-frequency features after the first normalization, represents the low-frequency feature after the first normalization, Represents the first key weighted high frequency feature The transposed matrix of Represents the first key weighted low-frequency feature The transposed matrix of

[0134] Finally output the first feature And the second feature , the calculation method is expressed as:

[0135] ;

[0136] ;

[0137] The first feature And the second feature Normalization is performed to obtain the normalized first feature and the normalized second feature , the normalized calculation method is expressed as:

[0138] ;

[0139] ;

[0140] in, represents the first normalization function;

[0141] The first feature of the normalization and the normalized second feature As the input of the cross-diffusion attention mechanism algorithm, the attention score matrix is ​​established:

[0142] ;

[0143] ;

[0144] in, , and denote the query, key, and value of the third weight matrix, respectively; , and denote the query, key, and value of the fourth weight matrix, respectively; , and The first feature of the normalization The second query weighted high frequency features, the second key weighted high frequency features and the second value weighted high frequency features after attention concentration; , and They represent the normalized second features The second query weighted low-frequency features, the second key weighted low-frequency features, and the second value weighted low-frequency features after attention concentration;

[0145] Use the softmax function to normalize the attention score matrix:

[0146] ;

[0147] ;

[0148] in, represents the high-frequency features after the second normalization, represents the low-frequency feature after the second normalization, Represents the second key weighted high frequency feature The transposed matrix of Represents the second key weighted low frequency feature The transposed matrix of

[0149] The high-frequency features after the second normalization And the low-frequency features after the second normalization Normalization is performed to obtain the high-frequency features after the second normalization And the low-frequency features after the second normalization , the normalized calculation method is expressed as:

[0150] ;

[0151] ;

[0152] in, represents the second normalization function;

[0153] Then use the softmax function to normalize the high-frequency features after the second normalization And the low-frequency features after the second normalization To perform the fusion:

[0154] ;

[0155] ;

[0156] in, Represents the low-frequency features after the second normalization The transposed matrix of Represents the high-frequency features after the second normalization The transposed matrix of Represents the first high and low frequency features after fusion, Represents the first low-high frequency feature after fusion;

[0157] Finally, the third feature is calculated With the fourth characteristic , the calculation method is:

[0158] ;

[0159] .

[0160] Combining the use of the self-attention mechanism algorithm with the cross-diffusion attention mechanism algorithm is conducive to information exchange between different modalities and improves model accuracy.

[0161] As a preferred implementation, the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation are fused to obtain the fused feature , the fusion method is expressed as:

[0162] ;

[0163] in, Represents feature splicing;

[0164] Then the fused features The historical secondary loop error state data set is input into the MLP model to obtain the secondary loop error state Y. The specific process is:

[0165] ;

[0166] in, Represents the implicit function of the MLP model.

[0167] See also Figure 2 The present invention evaluates the error state of the secondary circuit and promptly discovers the out-of-tolerance secondary circuit, thereby ensuring the stability of the power grid operation.

[0168] Among them, the horizontal axis represents the secondary loop number, and the vertical axis represents the accuracy ACC and the precision P.

[0169] Define the secondary circuit operating state out of tolerance as a positive example, and the secondary circuit operating state is normal as a negative example. The number of correct and incorrect positive and negative examples is counted respectively, and the accuracy rate ACC and precision rate P are used as the effectiveness measurement indicators. The accuracy rate describes the probability that the error estimation state of this method is consistent with the actual state, and the precision rate describes the probability of actual out-of-tolerance in all secondary circuits judged to be out of tolerance. The calculation formula is expressed as:

[0170] ;

[0171] ;

[0172] In the formula, TP: the sample is positive and the prediction result is positive; FP: the sample is negative and the prediction result is positive; TN: the sample is negative and the prediction result is negative; FN: the sample is positive and the prediction result is negative.

[0173] Embodiment 2:

[0174] The present invention also provides a secondary loop error state evaluation system, comprising:

[0175] The data acquisition module collects the historical error time series data set and the secondary circuit error state data set of the secondary circuit; this module is used to implement the functions in the first embodiment, which will not be described in detail here.

[0176] The sequence partitioning module calculates the error standard deviation and the error mean absolute deviation of the historical error time series data set, and uses the ensemble empirical mode decomposition algorithm to decompose the historical error time series data set to obtain different components; a data compression algorithm is used to divide the decomposed components into high-frequency sequences and low-frequency sequences according to the sequence complexity; this module is used to implement the functions in Example 1, which will not be repeated here.

[0177] The feature extraction module uses the high-frequency sequence and the low-frequency sequence as inputs of the self-attention mechanism algorithm to obtain the first feature and the second feature; then normalizes the first feature and the second feature, and uses the normalized first feature and the second feature as inputs of the cross-diffusion attention mechanism algorithm to obtain the third feature and the fourth feature; this module is used to implement the functions in Example 1, which will not be repeated here.

[0178] The result output module finally fuses the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation, extracts the fused features, and inputs them into the MLP model together with the historical secondary loop error state data set, and outputs the secondary loop error state evaluation result. This module is used to implement the functions in Example 1, which will not be repeated here.

[0179] Embodiment three:

[0180] This embodiment provides an electronic device having a computer program stored thereon, and when the computer program is executed by a processor, the secondary loop error state evaluation method as described in any embodiment of the present invention is implemented.

[0181] Embodiment 4:

[0182] This embodiment provides a computer-readable storage medium for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the secondary loop error state evaluation method as described in any embodiment of the present invention.

[0183] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0184] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0185] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0186] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

[0187] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A secondary circuit error state evaluation method, characterized in that: The following steps are involved: Collect historical error time series data set and secondary circuit error state data set of the secondary circuit; The error standard deviation and error mean absolute deviation of the historical error time series data set are calculated, and the historical error time series data set is decomposed using the ensemble empirical mode decomposition algorithm to obtain different components; The data compression algorithm is used to divide the decomposed components into high-frequency sequences and low-frequency sequences according to the sequence complexity; The high-frequency sequence and the low-frequency sequence are used as inputs of the self-attention mechanism algorithm to obtain the first feature and the second feature; the first feature and the second feature are normalized, and the normalized first feature and the second feature are used as inputs of the cross-diffusion attention mechanism algorithm to obtain the third feature and the fourth feature; Finally, the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation are fused to extract the fused features, and they are input into the MLP model together with the secondary loop error state data set to output the secondary loop error state evaluation result; The historical error time series data set E is expressed as: ; in, represents the error value at the tth moment, and T represents the number of moments; The error standard deviation of the historical error time series data set The calculation method is expressed as: ; in, Represents the average error value of historical error time series data; The mean absolute deviation of the error of the historical error time series data set The calculation method is expressed as: ; The historical error time series data set is divided into different components using the ensemble empirical mode decomposition algorithm. The specific calculation steps are as follows: ; Where M represents the number of modal decompositions, represents the component of the mth mode decomposition, represents the final residual signal; The data compression algorithm is used to divide the decomposed components into high-frequency sequences and low-frequency sequences according to the sequence complexity. The specific calculation steps are as follows: S1. Calculate the components after decomposition first The mean , convert it into a binary sequence through the relationship between the historical error time series value and the mean: ; ; in, represents the binary value of the mth component, and P represents the binary sequence; Initialize the matrix and matrix is an empty matrix; Let m = 1, C(0) = 0; S2, let the matrix ,matrix ; S3. Judgment Is it included , if included, then the binary sequence P fluctuates in size complexity Remain unchanged, otherwise the sequence fluctuation size complexity increases by 1, and the matrix Set it as an empty matrix and let m+1; in, represents the first empty matrix, represents the second empty matrix, represents the temporary matrix of the mth first traversal component, A temporary matrix representing the mth second traversal component; S4, repeat step S2 until m=M; S5, the complexity of the fluctuation size of the binary sequence P calculated based on each component , the size complexity of the binary sequence P fluctuation that is higher than the preset value Corresponding Divided into high-frequency sequences, the binary sequence P fluctuation size complexity below the preset value Corresponding Divided into low-frequency sequences; The high-frequency sequence and the low-frequency sequence are used as inputs of the self-attention mechanism algorithm to establish an attention score matrix: ; ; in, represents a high frequency sequence, represents a low-frequency sequence, , and denote the query, key, and value of the first weight matrix respectively; , and denote the query, key, and value of the second weight matrix respectively; , and They respectively represent the first query weighted high-frequency feature, the first key weighted high-frequency feature, and the first value weighted high-frequency feature of the high-frequency sequence after attention concentration; , and They respectively represent the first query weighted low-frequency feature, the first key weighted low-frequency feature, and the first value weighted low-frequency feature of the low-frequency sequence after attention concentration; Use the softmax function to normalize the attention score matrix: ; ; in, represents the high-frequency features after the first normalization, represents the low-frequency feature after the first normalization, express The transposed matrix of express The transposed matrix of Finally output the first feature And the second feature , the calculation method is expressed as: ; ; The first feature And the second feature Normalization is performed to obtain the normalized first feature and the normalized second feature , the normalized calculation method is expressed as: ; ; in, represents the first normalization function; The first feature of the normalization and the normalized second feature As the input of the cross-diffusion attention mechanism algorithm, the attention score matrix is ​​established: ; ; in, , and denote the query, key, and value of the third weight matrix, respectively; , and denote the query, key, and value of the fourth weight matrix, respectively; , and The first feature of the normalization The second query weighted high frequency features, the second key weighted high frequency features and the second value weighted high frequency features after attention concentration; , and They represent the normalized second features The second query weighted low-frequency features, the second key weighted low-frequency features, and the second value weighted low-frequency features after attention concentration; Use the softmax function to normalize the attention score matrix: ; ; in, represents the high-frequency features after the second normalization, represents the low-frequency feature after the second normalization, express The transposed matrix of express The transposed matrix of The high-frequency features after the second normalization And the low-frequency features after the second normalization Normalization is performed to obtain the high-frequency features after the second normalization And the low-frequency features after the second normalization , the normalized calculation method is expressed as: ; ; in, represents the second normalization function; Then use the softmax function to normalize the high-frequency features after the second normalization And the low-frequency features after the second normalization To perform the fusion: ; ; in, Represents the low-frequency features after the second normalization The transposed matrix of Represents the high-frequency features after the second normalization The transposed matrix of Represents the first high and low frequency features after fusion, Represents the first low-high frequency feature after fusion; Finally, the third feature is calculated With the fourth characteristic , the calculation method is: ; 。 2. The secondary circuit error state evaluation method according to claim 1, characterized in that: The third feature, the fourth feature, the error standard deviation and the error mean absolute deviation are combined to obtain the fused feature , the fusion method is expressed as: ; in, Represents feature splicing; Then the fused features The secondary loop error state data set is input into the MLP model to obtain the secondary loop error state Y. The specific process is: ; in, Represents the implicit function of the MLP model.

3. A secondary loop error state evaluation system, characterized in that: include: A data acquisition module, which collects historical error time series data sets and secondary circuit error state data sets of the secondary circuit; The sequence partitioning module calculates the error standard deviation and error mean absolute deviation of the historical error time series data set, and uses the ensemble empirical mode decomposition algorithm to decompose the historical error time series data set to obtain different components; the data compression algorithm is used to divide the decomposed components into high-frequency sequences and low-frequency sequences according to the sequence complexity; The feature extraction module uses the high-frequency sequence and the low-frequency sequence as inputs of the self-attention mechanism algorithm to obtain the first feature and the second feature; then normalizes the first feature and the second feature, and uses the normalized first feature and the second feature as inputs of the cross-diffusion attention mechanism algorithm to obtain the third feature and the fourth feature; The result output module finally fuses the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation, extracts the fused features, and inputs them into the MLP model together with the secondary loop error state data set to output the secondary loop error state evaluation result; In the sequence division module, the historical error time series data set E is expressed as: ; in, represents the error value at the tth moment, and T represents the number of moments; The error standard deviation of the historical error time series data set The calculation method is expressed as: ; in, Represents the average error value of historical error time series data; The mean absolute deviation of the error of the historical error time series data set The calculation method is expressed as: ; The historical error time series data set is divided into different components using the ensemble empirical mode decomposition algorithm. The specific calculation steps are as follows: ; Where M represents the number of modal decompositions, represents the component of the mth mode decomposition, represents the final residual signal; The data compression algorithm is used to divide the decomposed components into high-frequency sequences and low-frequency sequences according to the sequence complexity. The specific calculation steps are as follows: S1. Calculate the components after decomposition first The mean , convert it into a binary sequence through the relationship between the historical error time series value and the mean: ; ; in, represents the binary value of the mth component, and P represents the binary sequence; Initialize the matrix and matrix is an empty matrix; Let m = 1, C(0) = 0; S2, let the matrix ,matrix ; S3. Judgment Is it included , if included, then the binary sequence P fluctuates in size complexity Remain unchanged, otherwise the sequence fluctuation size complexity increases by 1, and the matrix Set it as an empty matrix and let m+1; in, represents the first empty matrix, represents the second empty matrix, represents the temporary matrix of the mth first traversal component, A temporary matrix representing the mth second traversal component; S4, repeat step S2 until m=M; S5, the complexity of the fluctuation size of the binary sequence P calculated based on each component , the size complexity of the binary sequence P fluctuation that is higher than the preset value Corresponding Divided into high-frequency sequences, the binary sequence P fluctuation size complexity below the preset value Corresponding Divided into low-frequency sequences; The feature extraction module uses the high-frequency sequence and the low-frequency sequence as inputs of the self-attention mechanism algorithm to establish an attention score matrix: ; ; in, represents a high frequency sequence, represents a low-frequency sequence, , and denote the query, key, and value of the first weight matrix respectively; , and denote the query, key, and value of the second weight matrix respectively; , and They respectively represent the first query weighted high-frequency feature, the first key weighted high-frequency feature, and the first value weighted high-frequency feature of the high-frequency sequence after attention concentration; , and They respectively represent the first query weighted low-frequency feature, the first key weighted low-frequency feature, and the first value weighted low-frequency feature of the low-frequency sequence after attention concentration; Use the softmax function to normalize the attention score matrix: ; ; in, represents the high-frequency features after the first normalization, represents the low-frequency feature after the first normalization, express The transposed matrix of express The transposed matrix of Finally output the first feature And the second feature , the calculation method is expressed as: ; ; The first feature And the second feature Normalization is performed to obtain the normalized first feature and the normalized second feature , the normalized calculation method is expressed as: ; ; in, represents the first normalization function; The first feature of the normalization and the normalized second feature As the input of the cross-diffusion attention mechanism algorithm, the attention score matrix is ​​established: ; ; in, , and denote the query, key, and value of the third weight matrix, respectively; , and denote the query, key, and value of the fourth weight matrix, respectively; , and The first feature of the normalization The second query weighted high frequency features, the second key weighted high frequency features and the second value weighted high frequency features after attention concentration; , and They represent the normalized second features The second query weighted low-frequency features, the second key weighted low-frequency features, and the second value weighted low-frequency features after attention concentration; Use the softmax function to normalize the attention score matrix: ; ; in, represents the high-frequency features after the second normalization, represents the low-frequency feature after the second normalization, express The transposed matrix of express The transposed matrix of The high-frequency features after the second normalization And the low-frequency features after the second normalization Normalization is performed to obtain the high-frequency features after the second normalization And the low-frequency features after the second normalization , the normalized calculation method is expressed as: ; ; in, represents the second normalization function; Then use the softmax function to normalize the high-frequency features after the second normalization And the low-frequency features after the second normalization To perform the fusion: ; ; in, Represents the low-frequency features after the second normalization The transposed matrix of Represents the high-frequency features after the second normalization The transposed matrix of Represents the first high and low frequency features after fusion, Represents the first low-high frequency feature after fusion; Finally, the third feature is calculated With the fourth characteristic , the calculation method is: ; 。 4. The secondary circuit error state evaluation system according to claim 3, characterized in that: The result output module combines the third feature, the fourth feature, the error standard deviation and the error mean absolute deviation to obtain the fused feature , the fusion method is expressed as: ; in, Represents feature splicing; Then the fused features The secondary loop error state data set is input into the MLP model to obtain the secondary loop error state Y. The specific process is: ; in, Represents the implicit function of the MLP model.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the secondary loop error state evaluation method according to any one of claims 1 to 2 is implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the secondary loop error state evaluation method as described in any one of claims 1 to 2 is implemented.

Citation Information

Patent Citations

  • CEEMDAN-based short-term power load prediction method

    CN113935513A

  • Power load prediction method and system based on multi-feature decomposition and fusion

    CN114707772A

  • Voltage transformer error state prediction method, system, equipment and medium

    CN116049629A