A capacitive voltage transformer error prediction method, device and storage medium
The capacitive voltage transformer error prediction model is constructed through a combination of dynamic attention convolution network and nested SRU network, which solves the problem of insufficient error prediction accuracy in the existing technology, and achieves more efficient and accurate CVT error prediction to ensure power The stable operation of the system.
Patent Information
- Application Number
- CN202411106600.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-13
AI Technical Summary
In the prior art, the accuracy of error prediction of capacitive voltage transformers is insufficient, which makes it difficult to accurately predict the error change trend of CVT, affecting the stable operation of the power system.
The capacitive voltage transformer error prediction model is constructed by combining dynamic attention convolution network and nested SRU network. By pre-processing and normalizing the historical running data, the dynamic attention convolution network is used to independently select attention and adjust it. Convolution, combined with nested SRU network to extract timing features, improve the accuracy of prediction results.
It improves the calculation efficiency of the model and the accuracy of the prediction results, reduces useless feature information, enhances the prediction ability of the change trend of CVT errors, and early warning of potential CVT risks.
Smart Images

Figure CN118642030B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method, a device and a storage medium for predicting a capacitive voltage transformer error, and belongs to the technical field of electric power metering and monitoring. Background Art
[0002] In the power system, electric energy metering devices play a vital role. They are not only the basis for power trading, but also an important means of monitoring the operation status of the power grid. As the core component of the electric energy metering device, the accuracy and stability of the metering performance of the capacitive voltage transformer (CVT) are directly related to the economic and social benefits of the power system. CVT is mainly divided by series capacitors, and then stepped down and isolated by electromagnetic transformers for voltage conversion. Compared with traditional electromagnetic voltage transformers, CVT has the advantages of higher impact insulation strength, simpler manufacturing process, smaller size and weight, etc.
[0003] However, in actual operation, due to environmental factors, equipment aging and other reasons, CVT may have measurement errors or even measurement deviations that exceed the limit. These errors not only affect the economic operation of the power system, but may also pose a threat to the safe and stable operation of the power grid. Therefore, accurate and rapid diagnosis of CVT errors and prediction of their degradation trends have become important tasks in maintaining the stable operation of the power system.
[0004] At present, due to the influence of acquisition principles and environmental factors, the sources of CVT errors are diversified, making error diagnosis and prediction more difficult. In addition, with the expansion of power grid scale and the increase of operation complexity, higher requirements are placed on the accuracy of CVT error prediction.
[0005] Therefore, how to accurately predict the error change trend of the capacitive voltage transformer (CVT) to provide early warning of the risks of CVT has become a technical problem that needs to be solved urgently.
[0006] Existing technologies such as the invention patent with patent number "CN114062993A" discloses a CVT error state prediction method based on a time convolutional network. After the time series is subjected to outlier removal and smoothing processing, it is trained using a time convolutional network, so that the system can predict the future system operation error state based on historical operation error state data and determine whether there is a possibility of CVT error exceeding the tolerance;
[0007] However, the traditional static convolution used in the above technical solution has poor correlation with the input data, resulting in poor feature extraction results. There is too much useless feature information in the extracted features, which increases unnecessary resource usage and makes the prediction efficiency insufficient. Summary of the invention
[0008] In order to solve the above problems existing in the prior art, the present invention proposes a capacitor voltage transformer error prediction method, device and storage medium.
[0009] The technical solution of the present invention is as follows:
[0010] In one aspect, the present invention provides a method for predicting a capacitor voltage transformer error, comprising the following steps:
[0011] Collect historical operation data of capacitor voltage transformers, and construct training sets after preprocessing the historical operation data;
[0012] Constructing a capacitor voltage transformer error prediction model, and training the model through a training set to obtain a trained capacitor voltage transformer error prediction model;
[0013] The real-time operation data of the capacitor voltage transformer is obtained, and the data is input into the trained error prediction model of the capacitor voltage transformer to obtain the error prediction result of the capacitor voltage transformer.
[0014] As a preferred implementation manner of the present invention, the historical operation data of the capacitor voltage transformer includes secondary side voltage data, temperature data, frequency data, secondary load data and an actual error value of the capacitor voltage transformer.
[0015] As a preferred embodiment of the present invention, each data sequence consisting of secondary side voltage data, temperature data, frequency data, secondary load data and actual error value of the capacitor voltage transformer is subjected to normalization preprocessing, as shown in the following formula:
[0016]
[0017] in: is the normalized data value in the corresponding data sequence; is the original data value in the corresponding data sequence; and are the minimum and maximum values in the corresponding data series respectively.
[0018] As a preferred embodiment of the present invention, the capacitive voltage transformer error prediction model is composed of a dynamic attention convolutional network and a nested SRU network, and is trained by the following steps:
[0019] The dynamic attention convolutional network calculates the linear attention weight and the scaled dot product attention weight of each sample in the training set, and constructs the linear attention weight matrix and the scaled dot product attention weight matrix of the training set respectively;
[0020] An attention evaluation function is constructed through the linear attention weight matrix and the scaled dot product attention weight matrix of the training set, and the optimal attention between the linear attention and the scaled dot product attention is evaluated through the attention evaluation function;
[0021] Based on the optimal attention, the convolution adjustment coefficient corresponding to each sample in the training set is calculated and constructed as a convolution adjustment coefficient set. For the training set input into the dynamic attention convolutional network, the corresponding convolution adjustment coefficient in the convolution adjustment coefficient set is selected according to different samples in the training set to adjust the convolution and extract features, and the time series features of the training set are constructed in chronological order. Then, the time series feature sequence of the training set is input into the nested SRU network, and the hidden state value output by the nested SRU network is used as the prediction error value of the capacitive voltage transformer.
[0022] The mean square error loss between the predicted error value and the actual error value based on the capacitive voltage transformer is calculated through the mean square error loss function. The weight of each parameter of the model is adjusted according to the loss function through the back propagation algorithm and then re-trained. The above steps are repeated until the prediction accuracy of the model reaches the preset value and the model training is completed.
[0023] As a preferred embodiment of the present invention, the linear attention weight calculation formula is:
[0024]
[0025] in: Represents the linear attention weight of the corresponding sample; and They represent the query vector and key vector corresponding to the calculation of the linear attention weight of the corresponding sample; , , is a learnable hyperparameter; is the hyperbolic tangent activation function;
[0026] The scaled dot product attention weight calculation formula is:
[0027]
[0028] in: represents the scaled dot product attention weight of the corresponding sample; , , They represent the query vector, key vector, and value vector when calculating the scaled dot product attention weights of the corresponding samples respectively; is the length of the key vector; is the normalized exponential activation function.
[0029] As a preferred embodiment of the present invention, the calculation formula of the attention evaluation function is:
[0030]
[0031] in: is the attention evaluation function; Represents the total number of attention weights in the corresponding attention weight matrix; Indicates Linear attention weights; represents the mean of the linear attention weights; Indicates scaled dot-product attention weights; Represents the mean of the scaled dot-product attention weights.
[0032] As a preferred implementation of the present invention, the convolution adjustment coefficient calculation formula is as follows:
[0033]
[0034] in: Represents a set of convolution adjustment coefficients; Represents the total number of samples in the training set; Indicates that the optimal attention is The query vector corresponding to the sample; Indicates that the optimal attention is The key vector corresponding to each sample; Represents the mean of the query vectors corresponding to all samples of the optimal attention; Represents the mean of the key vectors corresponding to all samples of the optimal attention; Indicates that the optimal attention is The value vector corresponding to the samples;
[0035] The temporal characteristics of the training set are shown as follows:
[0036]
[0037] in: Represents the temporal characteristics of the training set; Indicates the sample size is training set; Represents the set of convolution adjustment coefficients corresponding to the training set; are learnable weight parameters.
[0038] As a preferred embodiment of the present invention, the nested SRU network is composed of two layers of nested SRU networks, which are divided into an inner SRU network and an outer SRU network;
[0039] The inner SRU network includes an inner linear unit, an inner forget gate, and an inner reset gate;
[0040] The outer SRU network includes an outer linear unit, an outer forget gate, and an outer reset gate;
[0041] The calculation process of the nested SRU network is shown in the following formula:
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051] Among them: Among them: Representing time series characteristics middle Characteristic sequence of moments; After entering the nested SRU network, the corresponding results are first calculated by the outer linear unit, outer forget gate, and outer reset gate of the outer SRU network. , , , the calculation results of the outer SRU network are input into the inner linear unit, inner forget gate, and inner reset gate of the inner SRU network to further calculate the corresponding results , , , according to the calculation results of the inner SRU network, output The internal state of the SRU network is nested at all times and the hidden state of the inner SRU network , and then through the hidden state of the inner SRU network Calculate the hidden state of the outer SRU network And output; express Activation function; represents the hyperbolic tangent activation function; , , and , , They are the weight coefficient matrix and bias value corresponding to the calculation of the outer linear unit, the outer forget gate, and the outer reset gate; , , and , , They are the weight coefficient matrix and bias value corresponding to the calculation of the inner linear unit, inner forget gate, and inner reset gate respectively; express The internal state of the SRU network is nested at all times.
[0052] On the other hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any embodiment of the present invention is implemented.
[0053] In yet another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention.
[0054] The present invention has the following beneficial effects:
[0055] 1. The present invention proposes a dynamic attention convolution, which can autonomously select appropriate attention according to the input data, generate attention convolution adjustment coefficients, and adaptively adjust the convolution to solve the problems of poor feature extraction results and a lot of useless feature information caused by the poor correlation between conventional static convolution and input data, thereby improving the computational efficiency of the model.
[0056] 2. The present invention proposes a nested SRU network, which can enable two layers of SRU networks to act on their own internal information memory units at the same time, thereby improving the accuracy of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a flow chart of the method of the present invention;
[0058] Figure 2 This is a structural diagram of the error prediction model of the capacitor voltage transformer of the present invention;
[0059] Figure 3 This is a diagram of the structure of the nested SRU network unit of the present invention. DETAILED DESCRIPTION
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0065] Embodiment 1:
[0066] See also Figure 1 , a capacitor voltage transformer error prediction method, comprising the following steps:
[0067] Collect historical operation data of capacitor voltage transformers, and construct training sets after preprocessing the historical operation data;
[0068] Constructing a capacitor voltage transformer error prediction model, and training the model through a training set to obtain a trained capacitor voltage transformer error prediction model;
[0069] The real-time operation data of the capacitor voltage transformer (including secondary side voltage data, secondary load data, frequency data, and temperature data) is obtained, and the data is input into the trained capacitor voltage transformer error prediction model to obtain the error prediction result of the capacitor voltage transformer.
[0070] As a preferred implementation manner of this embodiment, the historical operation data of the capacitor voltage transformer includes secondary side voltage data, temperature data, frequency data, secondary load data and an actual error value of the capacitor voltage transformer.
[0071] As a preferred implementation of this embodiment, normalization preprocessing is performed on each data sequence consisting of the secondary side voltage data, temperature data, frequency data, secondary load data and the actual error value of the capacitor voltage transformer, as shown in the following formula:
[0072]
[0073] in: is the normalized data value in the corresponding data sequence; is the original data value in the corresponding data sequence; and are the minimum and maximum values in the corresponding data series respectively.
[0074] In this embodiment, the training set is a one-dimensional error time series data set and a multivariate time series data set combining the error data and environmental parameters (including temperature data, frequency data, and secondary load data);
[0075] As a preferred implementation of this embodiment, see Figure 2 The capacitive voltage transformer error prediction model is composed of a dynamic attention convolutional network and a nested SRU network, and is trained by the following steps:
[0076] Because the convolution kernel size is usually regarded as a hyperparameter when conventional convolution is used for feature extraction and needs to be manually set, this embodiment proposes dynamic attention convolution, which can automatically adjust the shape and size of the convolution kernel according to the characteristics of the input data to adapt to different input data.
[0077] The dynamic attention convolutional network calculates the linear attention weight and the scaled dot product attention weight of each sample in the training set, and constructs the linear attention weight matrix and the scaled dot product attention weight matrix of the training set respectively;
[0078] Specifically, in this embodiment, it is assumed that the training set The dimension is , that is, 4 samples, each with 3 features, as shown in the following formula:
[0079]
[0080] To generate feature maps, we first apply a convolution operation. Suppose we use a convolution kernel , convolve the input training set:
[0081]
[0082]
[0083]
[0084] In the dynamic attention mechanism, the query vector , key vector Sum value vector It is usually obtained by linear transformation of feature maps, assuming that there is a linear transformation matrix , as well as , which are used to calculate the query vector, key vector and value vector respectively:
[0085]
[0086]
[0087]
[0088] Calculating the query vector , key vector Sum value vector :
[0089]
[0090]
[0091]
[0092] The larger the standard deviation of the attention weight distribution in the attention matrix, the higher the discrimination of the weight distribution in this type of attention, which means that this type of attention has a better effect on the current data and can pay more attention to the effective features in the data. Therefore, the attention evaluation function is constructed by the linear attention weight matrix and the scaled dot product attention weight matrix of the training set, and the optimal attention between the linear attention and the scaled dot product attention is evaluated by the attention evaluation function.
[0093] Based on the optimal attention, the convolution adjustment coefficient corresponding to each sample in the training set is calculated and constructed as a convolution adjustment coefficient set. For the training set input into the dynamic attention convolutional network, the corresponding convolution adjustment coefficient in the convolution adjustment coefficient set is selected according to different samples in the training set to adjust the convolution and extract features, and the time series features of the training set are constructed in chronological order. Then, the time series feature sequence of the training set is input into the nested SRU network, and the hidden state value output by the nested SRU network is used as the prediction error value of the capacitive voltage transformer.
[0094] The predicted error value and the actual error value of the capacitor voltage transformer are based on the mean square error loss function to calculate the mean square error loss between the predicted error value and the actual error value. Through the back propagation algorithm, the gradient of the loss function is passed back to each parameter of the model, and the training model adjusts its weight to reduce the prediction error; finally, the model gradually learns to extract useful feature information from the input data to more accurately predict the error, thereby training to become an effective error prediction model. Specifically, in this embodiment, the prediction error value is calculated using the mean square error loss function. The actual error value The loss between them is shown in the following formula:
[0095]
[0096] in: is the total number of samples; and Respectively The predicted error value and actual error value of samples;
[0097] The model parameters are optimized through the back-propagation algorithm. The process of updating parameters uses the gradient descent method or its variants, such as stochastic gradient descent (SGD) or Adam optimizer. The parameter update formula is as follows:
[0098]
[0099] in: represents the model parameters; represents the learning rate; is the loss function with respect to the parameters gradient.
[0100] As a preferred implementation of this embodiment, by training the The query vector , key vector Sum value vector Calculate the linear attention weight and scaled dot product attention weight of each sample. The linear attention weight calculation formula is:
[0101]
[0102] in: Represents the linear attention weight of the corresponding sample; and They represent the query vector and key vector corresponding to the calculation of the linear attention weight of the corresponding sample; , , is a learnable hyperparameter; is the hyperbolic tangent activation function;
[0103] The training set is obtained by calculating the above formula The linear attention weight matrix for:
[0104]
[0105] The scaled dot product attention weight calculation formula is:
[0106]
[0107] in: represents the scaled dot product attention weight of the corresponding sample; , , They represent the query vector, key vector, and value vector when calculating the scaled dot product attention weights of the corresponding samples respectively; is the length of the key vector; is the normalized exponential activation function;
[0108] The training set is obtained by calculating the above formula The scaled dot product attention weight matrix for:
[0109]
[0110] As a preferred implementation of this embodiment, the calculation formula of the attention evaluation function is:
[0111]
[0112] in: is the attention evaluation function; Represents the total number of attention weights in the corresponding attention weight matrix; Indicates Linear attention weights; represents the mean of the linear attention weights; Indicates scaled dot-product attention weights; represents the mean of the scaled dot product attention weights;
[0113] Through the above formula and After evaluation, it is concluded that the scaled dot product attention is the optimal attention.
[0114] As a preferred implementation of this embodiment, the correlation between the optimal attention query vector and the key vector is calculated by the Pearson correlation coefficient, and then multiplied by the corresponding value vector to obtain the convolution adjustment coefficient corresponding to different time sequence positions of the input data, as shown in the following formula:
[0115]
[0116] in: Represents a set of convolution adjustment coefficients; Represents the total number of samples in the training set; Indicates that the optimal attention is The query vector corresponding to the sample; Indicates that the optimal attention is The key vector corresponding to each sample; Represents the mean of the query vectors corresponding to all samples of the optimal attention; Represents the mean of the key vectors corresponding to all samples of the optimal attention; Indicates that the optimal attention is The value vector corresponding to the samples;
[0117] By dynamically adjusting the convolution in combination with the convolution adjustment coefficient, the temporal feature results of the attention dynamic convolution extraction can be obtained, that is, the temporal feature of the training set is shown in the following formula:
[0118]
[0119] in: Represents the time series characteristics of the training set, which can be expressed as ; Indicates the sample size is training set; Represents the set of convolution adjustment coefficients corresponding to the training set; are learnable weight parameters.
[0120] As a preferred implementation of this embodiment, see Figure 3 In the nested SRU network, two layers of SRU are used to act on its own internal information memory unit at the same time, so that the input information of the current time step and the state information of the previous time step are further interactively integrated, thereby outputting a more accurate error prediction result. The two layers of SRU are an inner SRU network and an outer SRU network respectively;
[0121] The inner SRU network includes an inner linear unit, an inner forget gate, and an inner reset gate;
[0122] The outer SRU network includes an outer linear unit, an outer forget gate, and an outer reset gate;
[0123] The calculation process of the nested SRU network is shown in the following formula:
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133] Among them: Among them: Representing time series characteristics middle Characteristic sequence of moments; After entering the nested SRU network, the corresponding results are first calculated by the outer linear unit, outer forget gate, and outer reset gate of the outer SRU network. , , , the calculation results of the outer SRU network are input into the inner linear unit, inner forget gate, and inner reset gate of the inner SRU network to further calculate the corresponding results , , , according to the calculation results of the inner SRU network, output The internal state of the SRU network is nested at all times and the hidden state of the inner SRU network , and then through the hidden state of the inner SRU network Calculate the hidden state of the outer SRU network And output; express Activation function; represents the hyperbolic tangent activation function; , , and , , They are the weight coefficient matrix and bias value corresponding to the calculation of the outer linear unit, the outer forget gate, and the outer reset gate; , , and , , They are the weight coefficient matrix and bias value corresponding to the calculation of the inner linear unit, inner forget gate, and inner reset gate respectively; express The internal state of the SRU network is nested at all times.
[0134] Embodiment 2:
[0135] A capacitive voltage transformer error prediction system, comprising a data acquisition module, a model training module and an error prediction module;
[0136] The data acquisition module is used to collect historical operation data of the capacitor voltage transformer, and construct a training set after preprocessing the historical operation data;
[0137] The model training module is used to construct a capacitor voltage transformer error prediction model, and train the model through a training set to obtain a trained capacitor voltage transformer error prediction model;
[0138] The error prediction module is used to input the real-time operation data of the capacitor voltage transformer (including secondary side voltage data, secondary load data, frequency data, and temperature data) into the trained capacitor voltage transformer error prediction model to obtain the error prediction result of the capacitor voltage transformer.
[0139] This embodiment is used to implement the functions in the first embodiment, which will not be described in detail here.
[0140] Embodiment three:
[0141] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the capacitor voltage transformer error prediction method as described in any embodiment of the present invention is implemented.
[0142] Embodiment 4:
[0143] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the capacitor voltage transformer error prediction method as described in any embodiment of the present invention is implemented.
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] 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 method for predicting a capacitor voltage transformer error, characterized in that: The following steps are involved: Collect historical operation data of capacitor voltage transformers, and construct training sets after preprocessing the historical operation data; A capacitive voltage transformer error prediction model is constructed based on a combination of a dynamic attention convolutional network and a nested SRU network, wherein the dynamic attention convolutional network calculates the linear attention weight and the scaled dot product attention weight of each sample in the training set, and constructs the linear attention weight matrix and the scaled dot product attention weight matrix of the training set respectively; An attention evaluation function is constructed through the linear attention weight matrix and the scaled dot product attention weight matrix of the training set, and the optimal attention between the linear attention and the scaled dot product attention is evaluated through the attention evaluation function; Based on the optimal attention, the convolution adjustment coefficient corresponding to each sample in the training set is calculated and constructed as a convolution adjustment coefficient set. For the training set input into the dynamic attention convolutional network, the corresponding convolution adjustment coefficient in the convolution adjustment coefficient set is selected according to different samples in the training set to adjust the convolution and extract features, and the time series features of the training set are constructed in chronological order. Then, the time series feature sequence of the training set is input into the nested SRU network, and the hidden state value output by the nested SRU network is used as the prediction error value of the capacitive voltage transformer. The mean square error loss between the predicted error value and the actual error value of the capacitor voltage transformer is calculated through the mean square error loss function, and the weight of each parameter of the model is adjusted according to the loss function through the back propagation algorithm and then retrained. The above steps are repeated until the prediction accuracy of the model reaches the preset value to complete the model training; The real-time operation data of the capacitor voltage transformer is obtained, and the data is input into the trained error prediction model of the capacitor voltage transformer to obtain the error prediction result of the capacitor voltage transformer.
2. A capacitor voltage transformer error prediction method according to claim 1, characterized in that: The linear attention weight calculation formula is: in: Represents the linear attention weight of the corresponding sample; and They represent the query vector and key vector corresponding to the calculation of the linear attention weight of the corresponding sample; , , is a learnable hyperparameter; is the hyperbolic tangent activation function; The scaled dot product attention weight calculation formula is: in: represents the scaled dot product attention weight of the corresponding sample; , , They represent the query vector, key vector, and value vector when calculating the scaled dot product attention weights of the corresponding samples respectively; is the length of the key vector; is the normalized exponential activation function.
3. A capacitor voltage transformer error prediction method according to claim 1, characterized in that: The calculation formula of the attention evaluation function is: in: is the attention evaluation function; Represents the total number of attention weights in the corresponding attention weight matrix; Indicates Linear attention weights; represents the mean of the linear attention weights; Indicates scaled dot-product attention weights; Represents the mean of the scaled dot-product attention weights.
4. A capacitor voltage transformer error prediction method according to claim 1, characterized in that: The convolution adjustment coefficient calculation formula is as follows: in: Represents a set of convolution adjustment coefficients; Represents the total number of samples in the training set; Indicates that the optimal attention is The query vector corresponding to the sample; Indicates that the optimal attention is The key vector corresponding to each sample; Represents the mean of the query vectors corresponding to all samples of the optimal attention; Represents the mean of the key vectors corresponding to all samples of the optimal attention; Indicates that the optimal attention is The value direction corresponding to each sample; The temporal characteristics of the training set are shown as follows: in: Represents the temporal characteristics of the training set; Indicates the sample size is training set; Represents the set of convolution adjustment coefficients corresponding to the training set; is the learnable weight parameter.
5. A capacitor voltage transformer error prediction method according to claim 1, characterized in that: The nested SRU network is composed of two layers of nested SRU networks, which are divided into an inner SRU network and an outer SRU network; The inner SRU network includes an inner linear unit, an inner forget gate, and an inner reset gate; The outer SRU network includes an outer linear unit, an outer forget gate, and an outer reset gate; The calculation process of the nested SRU network is shown in the following formula: in: Representing time series characteristics middle Characteristic sequence of moments; After entering the nested SRU network, the corresponding results are first calculated by the outer linear unit, outer forget gate, and outer reset gate of the outer SRU network. , , , the calculation results of the outer SRU network are input into the inner linear unit, inner forget gate, and inner reset gate of the inner SRU network to further calculate the corresponding results , , , according to the calculation results of the inner SRU network, output The internal state of the SRU network is nested at all times and the hidden state of the inner SRU network , and then through the hidden state of the inner SRU network Calculate the hidden state of the outer SRU network And output; express Activation function; represents the hyperbolic tangent activation function; , , and , , They are the weight coefficient matrix and bias value corresponding to the calculation of the outer linear unit, the outer forget gate, and the outer reset gate; , , and , , They are the weight coefficient matrix and bias value corresponding to the calculation of the inner linear unit, inner forget gate, and inner reset gate respectively; express The internal state of the SRU network is nested at all times.
6. 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 method according to any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
