Standard value prediction method, error monitoring method and device for current transformer

By predicting the standard current value of current transformers using the GatedFormer model, the problems of high cost and insufficient accuracy in current transformer error monitoring are solved. This enables accurate error monitoring even in the absence of standard current transformers, thereby improving the monitoring efficiency and accuracy of the power system.

CN119128440BActive Publication Date: 2025-12-26STATE GRID SICHUAN ELECTRIC POWER CO MARKETING SERVICE CENT +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411284950.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-12-26
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

Existing technologies require physical access to standard current transformers for current transformer error monitoring, resulting in wasted manpower, economic and time costs. Furthermore, the prediction accuracy based on algorithms such as BP neural networks and k-means clustering is insufficient.

Method used

The GatedFormer model is adopted, which predicts the standard current value of the current transformer through transposed embedding layer, gated attention network and feedforward neural network. It learns the time series correlation and long-term dependence by using multi-channel current data, and uses linear projection layer for output to reduce error accumulation.

Benefits of technology

It enables accurate prediction of current transformer errors in the absence of standard current transformers, reducing wasted costs and time, and improving prediction accuracy and model generalization performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128440B_ABST
    Figure CN119128440B_ABST
Patent Text Reader

Abstract

The application discloses a standard value prediction method, an error monitoring method and a device of a current transformer, and relates to power system monitoring technology. The prediction method comprises the following steps: acquiring time sequence data of a plurality of current transformers on the secondary side; processing the time sequence data through a transpose embedding layer to obtain high-dimensional features; extracting features of the high-dimensional features through a gated network attention network to obtain time sequence trend features; encoding the time sequence trend features through a feedforward neural network to obtain encoded features; and processing the encoded features through an output layer to obtain a predicted standard current value of the current transformer. Through the method of the application, an accurate standard current value can be predicted as a reference value of the current transformer, so that error monitoring of the current transformer in a circuit can be realized without a standard current transformer.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power system monitoring, and in particular to a standard value prediction method for a current transformer, an error monitoring method and a device thereof. BACKGROUND

[0002] Although the current transformer has a calibrated accuracy level, as the equipment ages, the actual error of the current transformer may exceed the calibration tolerance, so when calculating the error of the tested current transformer, a standard current transformer with known accuracy is usually introduced, the secondary side currents of the tested current transformer and the standard current transformer are measured, and the difference between them is calculated to determine the error of the tested transformer.

[0003] The standard current transformer current value is an important basis for calculating the error of the current transformer. However, this requires physically connecting a standard current transformer in each circuit, and in actual scenarios, due to the wide distribution and large number of current transformers, a large amount of work time is spent on the way to the work site, resulting in waste of manpower, economic and time costs.

[0004] In recent years, for the online monitoring technology of current transformer error, researchers have proposed a series of schemes. These schemes can be systematically divided into two categories: one focuses on designing hardware devices and signal injection methods to build online monitoring systems; the second focuses on using big data and artificial intelligence methods to analyze and calculate collected data to achieve online monitoring of current transformers. However, the main focus is on designing hardware devices and signal injection, which has a high cost in terms of cost, and in terms of big data and artificial intelligence analysis, the related theoretical research is relatively weak. At present, it is found that the prediction accuracy based on BP neural network and k-means clustering algorithms still has a certain distance from practical application, so a new artificial intelligence prediction method needs to be proposed to improve the prediction accuracy of the standard current value. SUMMARY

[0005] The present application provides a standard value prediction method for a current transformer, an error monitoring method and a device thereof to improve the accuracy of the model predicting the standard current value and solve the problem that the current standard value prediction method is difficult to apply in online monitoring of current transformers.

[0006] The present application is achieved by the following technical solutions:

[0007] In a first aspect of the present application, a standard current value prediction method for a current transformer is provided, comprising:

[0008] Obtaining time series data of the secondary side of multiple current transformers;

[0009] Processing the time series data by transposing the embedding layer to obtain high-dimensional features;

[0010] extracting features from the high-dimensional features through a gated attention network to obtain time series trend features;

[0011] encoding the time series trend features through a feedforward neural network to obtain encoded features;

[0012] processing the encoded features through an output layer to obtain predicted current transformer standard current values.

[0013] The prediction method of the present application takes multiple current data as input, transposes the time series feature dimension of the input through a transpose embedding layer, so that the subsequent model pays more attention to the correlation of the time series in time, and introduces a gating structure before the attention mechanism, which evaluates the trend information of the time series part before the features enter the attention mechanism, thereby capturing the multivariate correlation, improving the ability of the gated attention network to capture the long-term dependence features of the time series, and due to the introduction of the transpose embedding processing, mapping the time series of a variable into a vector, so that the feedforward neural network can perform the same linear operation on independent time series, learning the intrinsic properties of the time series. Through the above process, a prediction result with high accuracy is finally obtained. The problem of applying a model-based prediction method to current transformer error monitoring in the absence of a reference current transformer is solved.

[0014] In some embodiments, the transpose embedding layer includes a mapping layer and a linear layer; and the processing of the time series data through the transpose embedding layer to obtain high-dimensional features includes:

[0015] mapping and processing the time series data through the mapping layer to obtain transpose features;

[0016] dimensionally upgrading the transpose features through the linear layer to obtain high-dimensional features.

[0017] In some embodiments, the gated attention network includes a gating network and a multi-head attention mechanism, the gating network includes a first convolutional input layer, a first activation layer connected to the first convolutional input layer, a second convolutional input layer, a second activation layer connected to the second convolutional input layer, and a feature fusion layer;

[0018] extracting features from the high-dimensional features through the gated attention network to obtain time series trend features, including:

[0019] performing first convolutional processing on the high-dimensional features through the first convolutional input layer to obtain first convolutional features, and performing first activation processing on the first convolutional features through the first activation layer to obtain first activation features; and

[0020] The second convolutional feature is obtained by performing second convolutional processing on the high-dimensional feature through the second convolutional input layer, and the second activation feature is obtained by performing second activation processing on the second convolutional feature through the second activation layer.

[0021] The fusion feature is obtained by performing feature fusion processing on the first activation feature and the second activation feature through the feature fusion layer.

[0022] The time series trend feature is obtained by processing the fusion feature through the multi-head attention mechanism.

[0023] In some embodiments, the method further comprises:

[0024] Before the time series trend feature is encoded through the feedforward neural network to obtain the encoded feature, the time series trend feature is subjected to layer normalization processing; and / or,

[0025] Before the encoded feature is processed through the output layer to obtain the predicted current transformer standard current value, the encoded feature is subjected to layer normalization processing.

[0026] In some embodiments, the output layer is a linear projection layer.

[0027] In some embodiments, the time series data includes current time series data, voltage time series data and frequency time series data.

[0028] In a second aspect of the present application, an error online monitoring method for a current transformer is provided, which comprises: calculating an actual value and a standard value of a current transformer corresponding to a time node to obtain an error of the current transformer; and the standard value is obtained through the current transformer standard current value prediction method according to any one of the first aspect of the present application.

[0029] In a third aspect of the present application, a current transformer standard current value prediction device is provided, which comprises:

[0030] A data acquisition module is configured to acquire time series data of a plurality of current transformers on a secondary side;

[0031] A standard value prediction module is configured to predict a standard value of a current transformer;

[0032] The standard value prediction module comprises a transpose embedding layer, a gated attention network, a feedforward neural network and an output layer.

[0033] The transpose embedding layer is configured to process the time series data to obtain a high-dimensional feature.

[0034] The gated attention network is configured to extract features from the high-dimensional feature to obtain a time series trend feature.

[0035] The feedforward neural network is used for encoding the time series trend features to obtain encoded features.

[0036] The output layer is used for processing the encoded features to obtain a predicted standard value of the current transformer.

[0037] In a fourth aspect, the application provides 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 current transformer standard current value prediction method of any one of the first aspect, and / or the current transformer error online monitoring method of the second aspect.

[0038] In a fifth aspect, the application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the current transformer standard current value prediction method of any one of the first aspect, and / or the current transformer error online monitoring method of the second aspect.

[0039] Compared with the prior art, the application has the following advantages and beneficial effects:

[0040] By replacing the embedding layer of the original Transformer with a transpose embedding layer, i.e., performing dimension transposition, the prediction model can input the time series as a vector, which helps the model pay more attention to the correlation of the time series in time. At the same time, the introduction of the gating attention mechanism can evaluate the trend information of the time series part before the feature enters the attention processing, learn the long-term time dependence of the time series, and thus improve the accuracy of predicting the standard current value.

[0041] Due to the introduction of the transpose embedding layer, the time series of a variable is mapped into a vector, so that the feedforward neural network can perform the same linear operation on independent time series. The neurons of the linear layer learn the intrinsic properties of the time series, such as frequency spectrum, periodicity, amplitude, etc., so that the generalization performance of the feedforward neural network is improved.

[0042] Due to the introduction of the transpose embedding layer, the time series data can be mapped into a vector and provided to the subsequent model for processing, so that the model can take the time series data of multiple current transformers as input, and the dimension of feature extraction is widened.

[0043] Using a linear projection layer as the output layer, the future multiple prediction time points can be directly output, significantly reducing the error accumulation of step-by-step prediction.

[0044] The layer normalization unifies the feature distribution of different variables, reduces the difference caused by inconsistent measurement, and since the time series of each current transformer current is taken as a vector due to the introduction of the transpose idea in the embedding layer, the layer normalization can effectively process the vector after transposition since the current values of the same node are highly correlated. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced as follows, and it should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor. In the drawings:

[0046] Figure 1 is a GatedFormer prediction model structure diagram proposed by the present application;

[0047] Figure 2 is a flow chart of a current transformer standard value prediction method based on gate attention of an embodiment of the present application;

[0048] Figure 3 is a transposed embedding processing schematic diagram of an embodiment of the present application;

[0049] Figure 4 is a structure diagram of a gate attention network of an embodiment of the present application;

[0050] Figure 5 is a Gatedformer model structure diagram after introducing layer normalization of an embodiment of the present application;

[0051] Figure 6 is a structure schematic diagram of an electronic device of an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solutions and advantages of the present application more clear and explicit, the present application will be further described in detail below in combination with embodiments and drawings, and the exemplary embodiments of the present application and their descriptions are only used to explain the present application, and are not regarded as a limitation on the present application.

[0053] It should be noted that the terms “include” and “have” and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device containing a series of steps or units does not have to be limited to or inherent to other steps or units.

[0054] The terminology used in the various embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the various embodiments of the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the present application belong. The terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

[0055] Embodiments of the present application provide a standard value prediction method, an error monitoring method and a device of a current transformer, which can predict accurate standard current values, can be applied to online prediction of errors of a current transformer, and realize real-time online monitoring of errors of a current transformer by taking the predicted value as a standard value in the absence of a standard current transformer.

[0056] In error analysis of a current transformer, ratio error and phase error are two core elements that jointly determine the measurement accuracy of the current transformer. However, in many practical application scenarios, especially in the fields of power system protection and electric energy metering, the ratio error directly affects the linearity of the measurement result and becomes a key factor determining the performance of the system. Therefore, the present application focuses on constructing an efficient and accurate ratio error prediction model to cope with the growing monitoring demand of the power system.

[0057] Therefore, the present application proposes a gated attention model (hereinafter referred to as "GatedFormer") based on a Transformer model to predict the standard value of a future current transformer. The method learns data features by using the GatedFormer model through multi-channel current data input, and accurately predicts the standard value of the future current transformer. Specifically, the method embeds time point variables through a multi-head attention mechanism to capture multivariate correlation, captures long-term dependency features of time series through a gated attention network, applies a feedforward network to learn nonlinear representation, and finally outputs the prediction result through an output layer. The method has excellent time series data processing capability and high-accuracy prediction results, provides an effective solution for state monitoring and fault warning, and has important technical support and wide application prospects for safe operation and maintenance of the power system.

[0058] Referring to Figure 1 illustrated, Figure 1 is a GatedFormer prediction model structure block diagram proposed by the present application, and the model includes a transposed embedding layer, a gated attention network, a feedforward neural network and an output layer connected in sequence.

[0059] The gatedformer model mainly uses the encoder structure of the transformer, by dimension transposing the embedding layer of the original transformer, the model can input the time sequence as a vector, which helps the model pay more attention to the correlation of the time sequence in time; at the same time, the gated attention mechanism is introduced in the encoder structure, which can evaluate the trend information of the time sequence part before the feature enters the multi-head attention processing, and is used to learn the long-term time dependence of the time sequence; then, the model uses the feedforward neural network for feature coding; finally, the prediction result is mapped through the output layer.

[0060] The traditional transformer model usually regards multiple variable features at a time as a vector, however, this cannot well extract the long-term time sequence relationship of the current. The transposed embedding layer introduced in the application maps the entire time sequence of the same current transformer into a high-dimensional feature representation, thereby independently depicting the entire history of the current transformer.

[0061] For long time sequence prediction problems, the key goal is to extract nonlinear relationships from historical data. Previous work has mostly improved the original multi-head attention mechanism, such as compressing the attention structure and only selecting attention in a specific area. The application does not change the internal structure of the multi-head attention mechanism, but constructs a gating network structure for feature pre-extraction before the feature is input into the attention structure, and combines the original multi-head attention mechanism to form a gated attention network. Since the original network structure is not improved, it is more time-saving and labor-saving in model construction and training, and the gating part can be used as a universal plug-in before the multi-head attention mechanism.

[0062] The transformer uses a feedforward neural network as a basic building block for encoding vector representation. In traditional models, the vector formed is a plurality of variable features collected at the same time, which is difficult to reflect the semantic information of a time sequence. The transposed embedding layer introduced in the application maps a time sequence of a variable into a vector, which can perform the same linear operation on independent time sequences. The neurons of the linear layer can also learn the intrinsic properties of the time sequence, such as frequency spectrum, periodicity, amplitude, etc. Therefore, using a feedforward neural network can make the model have better generalization performance.

[0063] Based on the above advantages, the current transformer standard value is predicted by the gatedformer prediction model, accurate results can be obtained, the standard current value is obtained without the need to set a standard current transformer, and the online monitoring of the error of the current transformer without a standard current transformer is realized.

[0064] Referring to Figure 2 illustrated,Figure 2 is a flowchart of a current transformer standard value prediction method based on a gated attention provided by an embodiment of the present application, which comprises:

[0065] S1, obtaining time series data of the secondary side of the multi-channel current transformer;

[0066] S2, processing the time series data by transposing the embedding layer to obtain high-dimensional features;

[0067] S3, extracting features from the high-dimensional features by the gated attention network to obtain time series trend features;

[0068] S4, encoding the time series trend features by the feedforward neural network to obtain the encoded features;

[0069] S5, processing the encoded features by the output layer to obtain the predicted current transformer standard current value.

[0070] The time series data of the secondary side of the multi-channel current transformer can be obtained by collecting the distributed current data of the secondary side of the multi-channel current transformer in real time through a collection platform. The distributed current data is collected and stored in real time by the collection platform, and the distributed current data set is obtained by sorting. The distributed current data set includes the actual collected secondary side current value, voltage value, frequency and other information of each circuit three-phase.

[0071] Considering that the sampling interval of the distributed current data is generally 15 minutes, when processing the time series data, the time span of the historical window is first set, and the data in a historical window is constructed into a time series data according to the collection time sequence. For example, set the time span of one day, two days, four days and seven days, a total of four historical windows, including 96, 192, 384 and 672 data points respectively.

[0072] When training the model, the time series data of the historical window with different time spans is used as the training sample to train the GatedFormer model. On this basis, the GatedFormer model can effectively capture the long and short term time sequence features in the window. In addition, multiple prediction periods are configured, and prediction windows with different time spans are delineated to predict the secondary side standard current transformer value at future time. For example, 12, 24, 48 and 96 time units, respectively corresponding to the prediction of current standard value data for 12 hours, one day, two days and 4 days in the future. The GatedFormer model is trained by different historical windows and prediction windows to improve its capture of long and short time sequences and output of multiple prediction lengths.

[0073] In making the prediction, the input of the Gatedformer model is the current data of each node in a given time interval, which is used to make the prediction. Assuming that the input time period is P historical current values at time points, denoted as: X = X t-P+1 ,X t-P+2 ,...,X t , X t ∈R P×N , where N represents the current data of N current transformers detected at the time. Assuming that the output is the predicted current data at Q time points, denoted as: Y = X t+1 ,X t+2 ,...,X t+Q . Then the time series prediction algorithm f is able to accurately predict Y from X, and the prediction performance of the model is evaluated by comparing the error between the predicted value Y and the true current standard value. The prediction algorithm can be simply represented as follows.

[0074] X t+1 ,X t+2 ,...,X t+Q = f(X t-P+1 ,X t-P+2 ,...,X t )

[0075] In step S2, the transpose embedding layer maps the entire time series of the same current transformer into a high-dimensional feature representation, which can be seen from the transpose embedding processing schematic diagram shown in FIG. 2. Figure 3

[0076] In an embodiment, the transpose embedding layer uses a mapping layer and a linear layer. The mapping layer is used to perform transpose mapping on the input features, and the linear layer is used to perform dimensionality increase on the input features. The specific process of processing the time series data through the transpose embedding layer to obtain the high-dimensional features is as follows.

[0077] First, the mapping layer is used to perform mapping processing on the time series data to obtain the transpose features, and the expression is as follows:

[0078] X∈R P×N →X∈R N×P

[0079] where X is the input time series data, X = X t-P+1 ,X t-P+2 ,...,X t , P is the number of data points, and N is the number of current transformers, i.e., the secondary side time series data of the input N current transformers.

[0080] Then, the linear layer is used to increase the dimension of the transposed features, denoted by D, to obtain the high-dimensional features, and the expression is as follows:

[0081] ​X e R N×P → X' e R N×D

[0082] In an embodiment, the input time series data X described above can not only be current data, but also include secondary side voltage data, frequency data, etc. Due to the acquisition error caused by the collector, etc., multi-dimensional data can improve the reliability of prediction.

[0083] In step S3, the high-dimensional features are first filtered by the gating network in the gating attention network, and then input into the multi-head attention mechanism, and finally learn the trend features of the input time series data.

[0084] Referring to Figure 4 illustrated, Figure 4 is a structural block diagram of the gating attention network. The module uses two convolutional layers as filters and gate structures, specifically including a first convolutional input layer, a first activation layer connected to the first convolutional input layer, a second convolutional input layer, a second activation layer connected to the second convolutional input layer, and a feature fusion layer. The output features of the feature fusion layer are used as input features of the multi-head attention mechanism.

[0085] The first convolutional input layer and the first activation layer are filter structures of the gating network. First, the first convolutional input layer is used to perform convolutional processing on the high-dimensional features to obtain first convolutional features. Then, the first activation layer is used to perform first activation processing on the first convolutional features to obtain first activation features.

[0086] The second convolutional input layer and the second activation layer are gate structures of the gating network. First, the second convolutional input layer is used to perform convolutional processing on the high-dimensional features to obtain second convolutional features. Then, the second activation layer is used to process the second convolutional features to obtain second activation features.

[0087] Then, the feature fusion layer of the gating network is used to perform feature fusion processing on the first activation features and the second activation features to obtain fusion features. Finally, the fusion features are used as input features of the multi-head attention mechanism, and the multi-head attention mechanism is used to process the fusion features to obtain time series trend features. Since the improvement of the present application is to add a gating network before the existing multi-head attention mechanism, the processing in the multi-head attention mechanism is the same as the existing method, and only a brief introduction is given to this part.

[0088] The first activation layer and the second activation layer obtain the nonlinear relationship of the current value in the time series. Since the input of the time series as a vector feature is formed in the previous transpose embedding layer, the gating attention mechanism can capture the trend features of the current transformer in the time series.

[0089] In an implementation, the first activation layer can employ a tanh activation function, and the second activation layer can employ a sigmoid activation function. In this structure, the processing in the gated attention network can include the following.

[0090] (1) The processing of the filter module is defined as follows:

[0091] filter = tanh(convs1(X'))

[0092] where X' represents the high-dimensional feature obtained after the transposed embedding layer processing, convs1() represents the first convolution processing, and tanh() represents the first activation processing.

[0093] (2) The processing of the gate module is defined as follows:

[0094] gate = sigmoid(convs2(X'))

[0095] where X' represents the high-dimensional feature obtained after the transposed embedding layer processing, convs2() represents the second convolution processing, and sigmoid() represents the second activation processing.

[0096] (3) The output of the final gated network is represented as:

[0097] X gate = filter O gate

[0098] where X gate represents the input vector of the multi-head attention mechanism after the gated network structure, and O represents the fusion processing, which in this case employs the multiplication of two vectors.

[0099] (4) The processing of the multi-head attention mechanism is defined as follows:

[0100] Q = X gate W Q

[0101] K = X gate W K

[0102] V = X gate W V

[0103] where Q, K, and V are three input representation vectors used in the multi-head attention mechanism, W Q , W K , and W V are corresponding learnable parameters, and the attention scores are obtained through matrix operations, which are represented as follows.

[0104]

[0105] where d h represents the dimension of vector X gate , (K) T is the transpose of vector K, and softmax() is an activation function.

[0106] Finally, the output of the gated attention network is: Z=AV.

[0107] In the original Transformer model, a feedforward neural network is used as the basic building block for encoding vector representation. The present application still uses this setting for vector encoding. Due to the pre-introduced transpose embedding layer, each time series data is mapped to a high-dimensional feature, so that the feedforward neural network can learn the intrinsic properties of the time series, improving the generalization of the model.

[0108] In this scheme, the feedforward neural network is essentially a linear layer, so a linear layer or a fully connected layer (MLP) can be used.

[0109] The output layer part can use a linear projection layer to directly output the future multiple prediction time points in order to avoid the cumulative error of step-by-step prediction. This multi-step prediction method can significantly reduce the accumulation of prediction error.

[0110] In one embodiment, in order to improve the stability and convergence of model training, layer normalization is introduced between the gated attention network and the feedforward neural network, and between the feedforward neural network and the output layer, as shown in Figure 5 The structure diagram of the Gatedformer model after introducing layer normalization is shown. The use of layer normalization in the previous transformer results in uniform distribution between variables, reducing the difference between variables. Once the time points collected are not aligned in time, the operation will also introduce interaction noise between non-causal or delayed processes. However, due to the introduction of the transpose idea in the embedding layer in the present application, the time series of each current transformer current is taken as a vector. Since the current values of the same node are definitely highly correlated, the use of layer normalization can effectively process the transposed vector. In addition, since all sequences are normalized as normal distribution, the difference caused by inconsistent measurements can be reduced. On the contrary, in the previous architecture, different time step markers will be normalized, resulting in excessive smoothing of the sequence.

[0111] The second aspect of the present application also provides a training method for the GatedFormer model, and the model structure is referred to Figure 1 and Figure 5As shown, the training data is obtained from a multi-channel current transformer secondary side distributed current data set collected in real time from a collection platform, the time series values of the secondary side current data, voltage data and frequency data are used as model inputs, the input time series is historical time series, and the prediction time series is future time series, so the future time series corresponding to the input time series is taken as the prediction target, and the model is iteratively trained. On this basis, the historical time series data of different time windows and the corresponding prediction time series data of different time windows are intercepted, the ability of the model to capture long and short term time series features is trained, and the ability to output the prediction sequence of the prediction time window is trained.

[0112] In a third aspect of the application, an online current transformer error monitoring method based on gated attention is provided, which specifically comprises: calculating the actual value and the standard value of the current transformer corresponding to the time node, thereby obtaining the error of the current transformer.

[0113] It can be understood that the online current transformer error monitoring is a real-time monitoring process, the standard current value of the future period is predicted by the current transformer standard current value prediction method based on the GatedFormer model provided by the application, and the actual value of the current transformer is collected in real time at the corresponding time node. Error calculation, error evaluation by difference method. Since the GatedFormer model can accurately predict the standard current value, accurate error monitoring results can also be obtained when it is applied to error monitoring. The advantages of the GatedFormer model have been described in detail in the foregoing embodiments, and the accuracy thereof will not be emphasized here.

[0114] In addition, when performing error monitoring, the prediction of the future standard current value will also be a real-time continuous process, the historical data of the previous P time points is continuously obtained, the standard current value of the future Q time points at the current time point is predicted, and the standard current value of the future time point is also updated in real time through continuous prediction. Thus eliminating the influence of time variable on the predicted value.

[0115] In a fourth aspect of the application, a current transformer standard current value prediction device based on gated attention is provided, which comprises a data acquisition module and a standard value prediction module. The data acquisition module is used to acquire time series data of the secondary side of a multi-channel current transformer, and the standard value prediction module is used to predict the standard value of the current transformer.

[0116] The data acquisition module can directly interact with the power collection platform, directly acquire distributed current data, and perform corresponding data processing to obtain time series data for inputting into the standard value prediction module. The processing requirements and methods for time series data can be referred to the foregoing embodiments.

[0117] The standard value prediction module is configured to predict the standard current value by using the GatedFormer model and the corresponding method. Specifically, the standard value prediction module comprises a transpose embedding layer, a gated attention network, a feedforward neural network, and an output layer. The transpose embedding layer is configured to process the time series data to obtain high-dimensional features. The gated attention network is configured to extract features from the high-dimensional features to obtain time trend features. The feedforward neural network is configured to encode the time trend features to obtain encoded features. The output layer is configured to process the encoded features to obtain the predicted current transformer standard value.

[0118] In an embodiment, the standard value prediction module further comprises a first layer normalization layer and a second layer normalization layer. The first layer normalization layer is connected between the gated attention network and the feedforward neural network, and is configured to perform layer normalization on the time trend features. The second layer normalization layer is connected between the feedforward neural network and the output layer, and is configured to perform layer normalization on the encoded features.

[0119] In addition, in order to verify the effect of the Gatedformer model on the online monitoring of the current transformer, the state evaluation system dataset provided by the CT measurement performance evaluation function detection platform is used for experiment. The dataset includes the one-in-two-out current of the current transformer A. The rated primary current of the outgoing branch is 100 A, and the rated primary current of the incoming branch is 200 A, which means that there are three current features at each time point. The experimental platform simulates a sampling frequency of 15 minutes once, and there are a total of 70078 standard current value data in two years. It is assumed that the actual current load of one collection interval is constant (i.e., the current error is in the same percentage value). At the same time, RMSE, MSE, and MAPE are selected as comprehensive evaluation indexes of the model performance. The experimental process and experimental results are briefly introduced as follows.

[0120] (I) Experimental setup

[0121] The experimental display card is configured as NVIDIA GeForce GTX 1080Ti, the display memory size is 12GB, the programming language is Python3.9, the framework is Pytorch1.7.1, and the experiment is tested on a Linux system. The main hyperparameters in the Gatedformer model are the history time period P, the future prediction time period Q, the model stacking block number M, and the high-dimensional embedding D of the input X. In this paper, P is set to 672, which contains complete historical current data of a week, so that the model can learn the cycle information of each day and each week; Q is set to four values: 12, 24, 48, and 96, which can better verify the accuracy of the model for future prediction; M is set to 3, and D is set to 1024, which has been verified to be the best performance of the model; the epoch of the model is set to 10, and the batchsize is 128. To measure the prediction accuracy of a model, multiple evaluation indicators need to be analyzed, so this paper selects mean square error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) to comprehensively evaluate the performance of the model, and the formulas are as follows:

[0122]

[0123]

[0124] wherein n is the number of samples, y i is the true value, is the model prediction value.

[0125] (II) Baseline model comparison

[0126] Since there are almost no similar applications of the Transformer model to solve the current transformer prediction scheme in China, this paper selects the models that perform well in the field of time series prediction for comparison, in order to verify that the model proposed in this paper can best adapt to the task of online prediction of current transformers.

[0127] In the experimental results section, the Gatedformer model proposed in this invention is compared with Autoformer, FiLM, FEDforme, Dlinear, Reformer, Informer, NonstationaryTransformer, Transformer, TiDE, PatchTST, Pyraformer, LightTS, Crossformer, Times Net and other classic and most advanced time series prediction models under different prediction windows (12, 24, 48, 96). The time point is 15 minutes, that is, the current value of the current transformer can be predicted for up to one day in the future.

[0128] The experimental results are shown in Table 1, which lists the performance of each model in terms of mean squared error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE), further verifying the superior performance of Gatedformer in the current prediction task in current transformers.

[0129] It can be found that the dependence of previous models on long time series and the volatility of long-term prediction may present certain challenges. In particular, the TimesNet model performs better in the public dataset, but its performance significantly decreases when predicting longer windows (such as 24, 48, and 96). In contrast, our proposed model maintains stability when predicting future 96 windows, highlighting the robustness of Gatedformer in long time series prediction, which helps to more accurately detect the current value of the current transformer. Moreover, under longer prediction windows (48 and 96), the MSE and MAE of Gatedformer are significantly lower than those of other models, demonstrating its excellent performance in long-term time series data modeling. This result again confirms the superiority of Gatedformer in the current prediction task in current transformers. The final result shows that when using the Gatedformer-based current transformer online monitoring method, the prediction error of the model for the standard current value of the current transformer is only 0.090% when using the previous week's time current value as the historical window for prediction. This result again highlights the efficiency and accuracy of Gatedformer in handling time series prediction tasks, providing a reliable solution for current transformer online monitoring, further verifying the effectiveness and reliability of the method in practical applications.

[0130] Table 1 Comparison of MSE, MAE, and MAPE of each prediction model

[0131]

[0132]

[0133] (Three) Comparison of ablation experiments

[0134] In the ablation experiment, the advantages of the Gatedformer model in capturing long-term dependencies were verified, and the impact of the gating mechanism on the model performance was explored. We selected multiple past time windows 96, 192, 384, 672 for comparison, that is, using the current value of the current transformer for the longest week to predict the current value of the future day. The results in Table 2 show the performance of the model with and without the gating network. By comparing different time windows, it can be observed that the Gatedformer model performs best in long-term prediction intervals. Specifically, when the prediction window is 672 time intervals, that is, the time span of the current value of the current transformer for a week, the prediction effect of Gatedformer is best, which shows that the model can learn the periodic information of the current value of the current transformer for a week. In all time windows, the Gatedformer model using the gating network performs better, which shows that the gating network is significantly helpful for extracting long-term sequence dependencies, thereby improving the prediction ability of the model.

[0135] In terms of performance indicators, the Gatedformer using the gating network performs better in all time windows in terms of lower mean square error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). For example, when the prediction window is 672, the MSE of the Gatedformer using the gating network is 0.0023, the MAE is 0.0377, and the MAPE is 0.0839, while the corresponding values without the gating network are 0.0024, 0.0390, and 0.0866, respectively. Intuitively, this module can reduce the current standard value prediction error by 3.22%, which further verifies the role of the gating network in improving the performance of the Gatedformer model.

[0136] Table 2 Comparison of MSE, MAE, and MAPE indicators of prediction models with and without gating network

[0137]

[0138]

[0139] In summary, the ablation experiment results fully verify the advantages of the Gatedformer model in capturing long-term dependencies and processing long-time span data, and highlight the importance of the gating mechanism for the model performance. This finding further consolidates the reliability and effectiveness of Gatedformer in time series prediction tasks, especially in the field of current transformer online monitoring, which can well predict the virtual standard value and improve the monitoring accuracy and stability of the system.

[0140] In a fifth aspect, the present application provides an electronic device, such asFigure 6 As shown, Figure 6 Fig. 1 is a schematic diagram of an electronic device according to an embodiment of the present application. The electronic device includes a processor 60, a memory 61, an input device 62, an output device 63, and a communication device 66. The number of processors 60 in the computer device can be one or more. The processor 60 can be a general purpose processor, a dedicated processor, or a combination of the two. The processor 60 can be a single core processor, a multi-core processor, or a combination of the two. Figure 6 The processor 60 in the electronic device is taken as an example. The processor 60, the memory 61, the input device 62, and the output device 63 in the electronic device can be connected by a bus or other means. Figure 6 The connection by the bus is taken as an example.

[0141] The memory 61 is a computer readable storage medium, which can be used to store software programs, computer executable programs, and modules. The processor 60 executes various functions of the electronic device by running the software programs, instructions, and modules stored in the memory 61, so as to implement the standard value prediction method of the current transformer according to any one of the embodiments of the present application, and / or the error online monitoring method of the current transformer according to any one of the embodiments.

[0142] The memory 61 can mainly include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required by a function. The data storage area can store data created according to the use of the terminal. In addition, the memory 61 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the memory 61 can further include a memory remotely arranged with respect to the processor 60, which can be connected to the electronic device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0143] The input device 62 can be used to receive a user ID, an instruction, current transformer related data, etc. The output device 63 is used to output a prediction result, a network configuration page, etc.

[0144] In a sixth aspect of the present application, a computer readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the standard value prediction method of the current transformer according to any one of the embodiments of the present application, and / or the error online monitoring method of the current transformer according to any one of the embodiments is implemented. The storage medium can be a ROM / RAM, a magnetic disk, an optical disk, etc.

[0145] In a seventh aspect of the present application, a computer program product is provided. When the computer program product is run on a computer, the computer executes the standard value prediction method of the current transformer according to any one of the embodiments of the present application, and / or the error online monitoring method of the current transformer according to any one of the embodiments.

[0146] The above detailed description of the specific embodiments of the present application is provided for the purpose of further explaining the objects, technical solutions and advantages of the present application, and it should be understood that the above description is only a specific embodiment of the present application and is not used to limit the protection scope of the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A standard current value prediction method of a current transformer, characterized by, The method comprises: obtaining time sequence data of a secondary side of a multi-channel current transformer, wherein the time sequence data comprises current time sequence data; processing the time sequence data through a transposed embedding layer to obtain high-dimensional features; extracting features of the high-dimensional features through a gated attention network to obtain time sequence trend features; encoding the time sequence trend features through a feedforward neural network to obtain encoded features; processing the encoded features through an output layer to obtain predicted current transformer standard current values of future time.

2. The standard current value prediction method of a current transformer according to claim 1, characterized by, The transposed embedding layer comprises a mapping layer and a linear layer; processing the time sequence data through the transposed embedding layer to obtain high-dimensional features comprises: mapping processing the time sequence data through the mapping layer to obtain transposed features; dimensional processing the transposed features through the linear layer to obtain high-dimensional features.

3. The standard current value prediction method of a current transformer according to claim 1, characterized by, The gated attention network comprises a gating network and a multi-head attention mechanism, and the gating network comprises a first convolutional input layer, a first activation layer connected with the first convolutional input layer, a second convolutional input layer, a second activation layer connected with the second convolutional input layer, and a feature fusion layer; extracting features of the high-dimensional features through the gated attention network to obtain time sequence trend features comprises: first convolutional processing the high-dimensional features through the first convolutional input layer to obtain first convolutional features, and first activation processing the first convolutional features through the first activation layer to obtain first activation features; and second convolutional processing the high-dimensional features through the second convolutional input layer to obtain second convolutional features, and second activation processing the second convolutional features through the second activation layer to obtain second activation features; feature fusion processing the first activation features and the second activation features through the feature fusion layer to obtain fusion features; processing the fusion features through the multi-head attention mechanism to obtain time sequence trend features.

4. The standard current value prediction method of a current transformer according to claim 3, characterized by, The method further comprises: before encoding the time sequence trend features through the feedforward neural network to obtain encoded features, performing layer normalization processing on the time sequence trend features; and / or before processing the encoded features through the output layer to obtain predicted current transformer standard current values, performing layer normalization processing on the encoded features.

5. The standard current value prediction method of a current transformer according to claim 1, characterized by, The output layer is a linear projection layer.

6. The method of claim 1-5, wherein, The time sequence data further comprises current time sequence data, voltage time sequence data, and frequency time sequence data.

7. A method for on-line monitoring of errors in a current transformer, characterized in that The method comprises: calculating actual values and standard values of a current transformer corresponding to a time node to obtain errors of the current transformer; the standard values are obtained through the current transformer standard current value prediction method of any one of claims 1-6.

8. A standard current value prediction device of a current transformer, characterized by, The method comprises: a data acquisition module configured to obtain time sequence data of a secondary side of a multi-channel current transformer, wherein the time sequence data comprises current time sequence data; a standard value prediction module configured to predict standard values of a current transformer; the standard value prediction module comprises a transposed embedding layer, a gated attention network, a feedforward neural network, and an output layer; the transposed embedding layer is configured to process the time sequence data to obtain high-dimensional features; the transposed embedding layer is configured to process the time sequence data to obtain high-dimensional features; The gated attention network is used for feature extraction on the high-dimensional features to obtain time trend features; The feedforward neural network is used for encoding the time trend features to obtain encoded features; The output layer is used for processing the encoded features to obtain a predicted standard value of the current transformer at a future time.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the current transformer standard current value prediction method in any one of claims 1-6, and / or the current transformer error online monitoring method in claim 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the current transformer standard current value prediction method in any one of claims 1-6, and / or the current transformer error online monitoring method in claim 7.

Citation Information

Patent Citations

  • Traffic flow prediction method of space-time attention graph convolutional network based on multi-feature fusion

    CN116168548A

  • Capacitive voltage transformer metering error prediction method and system

    CN118427613A