Disclosure of Invention
In order to solve the problems that the accuracy is not high and the parameters need to be manually adjusted for many times in the prediction of the metering error of the capacitor voltage transformer, the invention provides a method for predicting the metering error of the capacitor voltage transformer in a first aspect, which comprises the following steps: acquiring a plurality of error data of a mutual inductor to be detected; stripping each error data into a self error and an additional error, and processing a plurality of self errors into a time sequence; inputting the time sequence into a trained LSTM model to obtain a self error prediction value of the mutual inductor to be tested; calculating an additional error predicted value of the mutual inductor to be tested according to the temperature information and the frequency information; and fusing the error predicted value and the additional error predicted value of the mutual inductor to be tested to obtain the final predicted value of the mutual inductor to be tested.
In some embodiments of the present invention, the stripping the error data into the self error and the additional error comprises the steps of: calculating a temperature additive error; calculating a frequency additive error; and determining the self error according to the error data, the temperature additional error and the frequency additional error.
Further, the self error is calculated by the following method:
wherein: f. of(y)As self error, f(g)Is error data, Δ f(T)Adding error, Δ f, to the temperature(W)An error is added to the frequency.
Further, the temperature additive error is calculated by the following method:
whereinSFor the rated load of the transformer to be measured, sinφIs a constant;a cis the temperature coefficient, delta t is the difference between the temperature of the measuring point and 20 ℃,ω n the rated angular frequency of the mutual inductor to be measured;C 1the high-voltage capacitor is a high-voltage capacitor of the mutual inductor to be tested;C 2the low-voltage capacitor is a mutual inductor to be tested;U 1the primary side voltage of the intermediate transformer of the mutual inductor to be measured(T)An error is added to the temperature.
Further, the frequency additive error is calculated by the following method:
wherein the content of the first and second substances,ωis the average angular frequency of the transformer to be measured,ω n in order to be the nominal angular frequency,U 1is rated for medium voltage.
In some embodiments of the invention, the trained LSTM model is trained by: constructing a data set according to the time sequence, and normalizing the data set to obtain a sequence F: (A)y) (ii) a Taking the minimum root mean square error as the objective function and using the sequence F:y) And training the LSTM model until the objective function value reaches a threshold value and tends to be stable, and obtaining the LSTM model after training.
Further, the method also comprises the following steps:
selecting a time scale, and mixing F:y) Dividing the test result into a training set and a testing set;
the normalized mutual inductor self error data F' (by using the LSTM model which is not trained yety) Predicting, and outputting prediction data f' (of the error of the mutual inductor on a certain day t)p) (ii) a Wherein t represents time scale, t is more than or equal to 7 days and less than or equal to 60 days;
for the error data f' (of the mutual inductor)p) And performing inverse normalization operation to obtain the error prediction value f (p) of the mutual inductor.
In the foregoing embodiment, the acquiring the plurality of error data of the transformer to be tested includes: and carrying out exception processing on the error data of the mutual inductor to be detected by using a box line graph method.
In a second aspect of the present invention, there is provided a system for predicting a metering error of a capacitor voltage transformer, including: the acquisition module is used for acquiring a plurality of error data of the mutual inductor to be detected; a stripping module for stripping each error data into a self error and an additional error, and processing the self errors into a time series; the prediction module is used for inputting the time sequence into the LSTM model after training to obtain the self error prediction value of the mutual inductor to be tested; the fusion module is used for calculating an additional error predicted value of the mutual inductor to be tested according to the temperature information and the frequency information; and fusing the error predicted value and the additional error predicted value of the mutual inductor to be tested to obtain the final predicted value of the mutual inductor to be tested.
In some embodiments of the present invention, the stripping module comprises a first calculation unit, a second calculation unit, a determination unit, the first calculation unit for calculating a temperature added error; a second calculation unit for calculating a frequency added error; and the determining unit is used for determining the self error according to the error data, the temperature additional error and the frequency additional error.
In a third aspect of the present invention, there is provided an electronic device comprising: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method for predicting a metering error of a capacitor voltage transformer according to the first aspect of the present invention.
In a fourth aspect of the present invention, a computer-readable medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method for predicting the metering error of a capacitor voltage transformer provided in the first aspect of the present invention.
The invention has the beneficial effects that:
the invention provides a capacitance voltage transformer error state trend prediction method based on deep learning, which is characterized in that an error stripping method is adopted to preprocess CVT error data, an LSTM algorithm is utilized to construct a trend prediction model, the error prediction value of a transformer and an additional error prediction value are added, an error value in a longer time period is predicted, and an error state prediction curve of the transformer can be obtained.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1 and fig. 2, in a first aspect of the present invention, a method for predicting a metering error of a capacitor voltage transformer is provided, including: s100, acquiring a plurality of error data of a mutual inductor to be detected; s200, stripping each error data into a self error and an additional error, and processing a plurality of self errors into a time sequence; s300, inputting the time sequence into a trained LSTM (Long Short-Term Memory artificial neural network) model to obtain an error prediction value of the mutual inductor to be tested; s400, calculating an additional error prediction value of the mutual inductor to be tested according to the temperature information and the frequency information; and fusing the error predicted value and the additional error predicted value of the mutual inductor to be tested to obtain the final predicted value of the mutual inductor to be tested.
The LSTM model may be replaced with a deep learning model that extracts or generates a time sequence, such as a GRU (Gate recovery Unit), a TCN (Temporal Convolutional Network), and a transform. The self errors in one or more time periods are processed into (regarded as) a time sequence, the deep learning model is used for generating or identifying the attributes of the errors, namely the mode of the CVT error state prediction model based on the ARMA is changed, the prediction does not depend on historical data any more, manual parameter adjustment or judgment is not needed, and long-term prediction can be realized.
It should be noted that the above self error and the additional error are named only for convenience of description, and their practical meanings are equivalent to two parts of error, the self error is only related to the attributes of each element in the capacitor voltage transformer, and the additional error is only related to the external environmental factors.
In order to better distinguish errors caused by different factors and improve the accuracy of error prediction, in S200 of some embodiments of the present invention, the splitting the error data into a self error and an additional error includes the following steps: s201, calculating a temperature additional error; s202, calculating frequency additional errors; and S203, determining self errors according to the error data, the temperature additional errors and the frequency additional errors.
Further, in step S201, the temperature added error is calculated by the following method:
whereinSFor the rated load of the transformer to be measured, sinφIs a constant;a cis the temperature coefficient, delta t is the difference between the temperature of the measuring point and 20 ℃,ω n the rated angular frequency of the mutual inductor to be measured;C 1the high-voltage capacitor is a high-voltage capacitor of the mutual inductor to be tested;C 2the low-voltage capacitor is a mutual inductor to be tested;U 1the primary side voltage of the intermediate transformer of the mutual inductor to be measured(T)An error is added to the temperature. The temperature of the measuring point can be simplified into the average temperature on the day, and the additional error delta f of the temperature on the day is obtained(T)。
Further, in step S202, the frequency-added error is calculated by the following method:
wherein the content of the first and second substances,ωis the average angular frequency of the transformer to be measured,ω n in order to be the nominal angular frequency,U 1is rated for medium voltage.
In step S203, the self-error of the transformer on the day after the stripping temperature frequency is added with the error is calculated:
wherein: f. of
(y)Is self error after stripping f
(g)For the preprocessed raw error data,. DELTA.f
(T)Adding error, Δ f, to the temperature
(w)An error is added to the frequency.
In step S300 of some embodiments of the present invention, the trained LSTM model is trained by: constructing a data set according to the time sequence, and normalizing the data set to obtain a sequence F: (A)y) (ii) a Taking the minimum root mean square error as the objective function and using the sequence F:y) And training the LSTM model until the objective function value reaches a threshold value and tends to be stable or meets the training completion condition to obtain the trained LSTM model. Optionally, the training completion condition includes that the gradient is not changed any moreAnd the accuracy reaches a threshold or the iteration number reaches an upper limit, and the like.
Specifically, the method comprises the following steps:
s301, forming a time sequence of the error data of the mutual inductor as a data set, and carrying out normalization processing on the data set to obtain a sequence F: (A)y);
S302, carrying out model training on an error data set of the mutual inductor by using an LSTM algorithm, adjusting quantity parameters of hidden layers, and searching for the minimum root mean square error of a prediction model to obtain an optimal trend prediction model M;
s303, selecting time scale t (t is more than or equal to 7 and less than or equal to 60) days, and mixing F ` (Cy) Dividing the data into a training set and a testing set, and utilizing a prediction model M to normalize self error data F' (of the mutual inductor) after normalizationy) Predicting, and outputting prediction data f' (of the error of the mutual inductor on a certain day t)p) (ii) a For the error data f' (of the mutual inductor)p) And performing inverse normalization operation to obtain the error prediction value f (p) of the mutual inductor.
In step S300 of some embodiments of the present invention, an additional error prediction value of the transformer under test is calculated according to the temperature information and the frequency information; and fusing the error predicted value and the additional error predicted value of the mutual inductor to be tested to obtain the final predicted value of the mutual inductor to be tested. Specifically, temperature information T predicted corresponding to time is obtained according to external data such as weather forecast
(t)Calculating the predicted value of the temperature additive error at the time t
Adding frequency error
Default to 0, and a final transformer specific difference predicted value f (f) = delta f is obtained
’(T) + F (p) and ligated to give F
(f)And drawing an error state prediction curve for analysis and judgment.
Schematically, fig. 3 shows error estimation data for a voltage transformer at a site for about three months,
approximately 70% of the data was taken as training data and 30% as validation data, where: the abscissa represents time in days; the ordinate represents the error; and (3) predicting a time sequence diagram of the prediction result of 5 sections of data of a certain mutual inductor of a certain station through the model. The circular points are error estimation value verification data, and the square points are error prediction values.
In the foregoing embodiment, the acquiring the plurality of error data of the transformer to be tested includes: and carrying out exception processing on the error data of the mutual inductor to be detected by using a box line graph method.
Specifically, time series data of an observed system are obtained, an error estimation value is obtained through a station-level error evaluation system, and relevant data in a station of the day are collected. In actual operation, a coarse error caused by human factors and the like may occur, and abnormal value processing needs to be performed on the acquired error data. Wherein the error value
And
is eliminated to reduce the effect of outliers in the prediction. Wherein Q3 is the upper quartile, Q1 is the lower quartile, and IQR is Q3-Q1. In the prediction stage, the removed abnormal values are supplemented by a method of directly supplementing subsequent time sequence values.
Example 2
Referring to fig. 4, in a second aspect of the present invention, there is provided a system 1 for predicting a metering error of a capacitor voltage transformer, comprising: the acquisition module 11 is used for acquiring a plurality of error data of the mutual inductor to be detected; a stripping module 12, configured to strip each error data into a self error and an additional error, and process a plurality of self errors into a time series; the prediction module 13 is configured to input the time sequence into a trained LSTM model to obtain a self error prediction value of the transformer to be tested; the fusion module 14 is used for calculating an additional error prediction value of the mutual inductor to be tested according to the temperature information and the frequency information; and fusing the error predicted value and the additional error predicted value of the mutual inductor to be tested to obtain the final predicted value of the mutual inductor to be tested.
In some embodiments of the present invention, the stripping module 12 comprises a first calculating unit, a second calculating unit, a determining unit, the first calculating unit for calculating a temperature added error; a second calculation unit for calculating a frequency added error; and the determining unit is used for determining the self error according to the error data, the temperature additional error and the frequency additional error.
Example 3
Referring to fig. 5, in a third aspect of the present invention, there is provided an electronic apparatus comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of the first aspect of the invention.
The electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following devices may be connected to the I/O interface 505 in general: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; a storage device 508 including, for example, a hard disk; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more computer programs which, when executed by the electronic device, cause the electronic device to:
computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, Python, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.