Mutual inductor error ultra-short time prediction method, storage medium and electronic device

Through fully connected layer and two-dimensional feature extraction, the transformer error prediction model is constructed, which distinguishes long-term and short-term relationships, and solves the problem of difficulty in mining long-term dependencies in the existing technology, realizes high-precision transformer error prediction, and improves the power system stability and operation efficiency.

CN119322930APending Publication Date: 2025-01-17STATE GRID WUYI COUNTY POWER SUPPLY CO +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411213041.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The prior art is difficult to effectively mine the long-term dependency relationship in the transformer error data, which makes it difficult to accurately predict the transformer error based on the long-term dependency relationship and the short-term relationship, affecting the stability and operating efficiency of the power system.

Method used

By distinguishing data that reflects long-term dependencies from short-term relations, and using full-connection layer and two-dimensional feature extraction to construct a transformer error prediction model, perform analysis to mine long-term dependencies in the data, achieving high levels at different time scales Precision error prediction.

Benefits of technology

It improves the robustness and stability of transformer error prediction, ensures prediction accuracy and timeliness at different time scales, and solves the problem of difficulty in accurately predicting transformer errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322930A_ABST
    Figure CN119322930A_ABST
Patent Text Reader

Abstract

The invention discloses a mutual inductor error ultra-short time prediction method, a storage medium and an electronic device, and belongs to the technical field of data processing, and the method comprises the steps: S1, decomposing white noise to obtain a target white noise component, and decomposing a first mutual inductor historical error sequence into a historical low-frequency component and a historical high-frequency component based on the target white noise component; s2, constructing a mutual inductor error prediction model based on a full connection layer and two-dimensional feature extraction, inputting the historical high-frequency component into the mutual inductor error prediction model for primary analysis to obtain a predicted high-frequency component, and inputting the historical low-frequency component into the mutual inductor error prediction model for secondary analysis to obtain a predicted low-frequency component; and S3, obtaining an error prediction result of the to-be-predicted mutual inductor based on the predicted high-frequency component and the predicted low-frequency component. The problem that the mutual inductor error is difficult to accurately predict according to the long-term dependency relationship and the short-term relationship due to the fact that the long-term dependency relationship in the mutual inductor error data is difficult to effectively excavate is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to an ultra-short-time prediction method for mutual inductor errors, a storage medium and an electronic device. Background Art

[0002] In the power system, the mutual inductor is a vital metering and protection device, responsible for key tasks such as dynamic monitoring, circuit protection and electricity metering. At present, the commonly used detection methods include regular offline calibration and online calibration. However, offline calibration requires power off, which affects the power supply. Although online calibration does not require power off, it is necessary to establish a detection bypass, which is complicated to operate and requires professional personnel to carry out construction, which increases the time cost and operation complexity. Therefore, a method that can predict the mutual inductor error is needed to arrange maintenance in time and improve the efficiency and stability of the power system operation. For example, a method and device for short-term prediction of the mutual inductor metering error state with patent number CN113821938B is proposed. First, the error stripping method is used to pre-process the CVT error data, and the ARIMA algorithm is used to construct a trend prediction model. The mutual inductor's own error prediction value and the additional error prediction value are added to predict the error value in the recent time period and obtain the mutual inductor error state prediction curve. By making a short-term prediction of the transformer error state, data support is provided for the risk warning of the transformer, thereby ensuring the stability of the power grid operation. However, the above scheme is limited to the time series change characteristics within a short period of time. Therefore, it is difficult to effectively mine the long-term dependencies in the transformer error data, resulting in difficulty in accurately predicting the transformer error based on the long-term dependencies and short-term relationships. Summary of the invention

[0003] In view of the problem that it is difficult to effectively mine the long-term dependencies in the transformer error data in the prior art, which makes it difficult to accurately predict the transformer error based on the long-term dependencies and short-term relationships, the present invention provides an ultra-short-time prediction method, storage medium and electronic device for transformer errors. The method distinguishes the data reflecting the long-term dependencies from the short-term dependencies and inputs them into a transformer error prediction model constructed based on a fully connected layer and two-dimensional feature extraction for analysis, thereby mining the long-term dependencies in the data. This solves the problem that it is difficult to effectively mine the long-term dependencies in the transformer error data in the prior art, which makes it difficult to accurately predict the transformer error based on the long-term dependencies and short-term relationships. Finally, the prediction accuracy and timeliness at different time scales are achieved. At the same time, the robustness and stability of error prediction are improved by deeply mining the data characteristics.

[0004] In order to solve the above technical problems, the present invention provides an ultra-short-time prediction method for mutual inductor error, a storage medium and an electronic device, comprising the following steps: S1: decomposing white noise to obtain a first white noise component, marking the first white noise component that meets the conditions as a target white noise component, and decomposing the first mutual inductor historical error sequence into a historical low-frequency component and a historical high-frequency component based on the target white noise component; S2: A transformer error prediction model is constructed based on a fully connected layer and two-dimensional feature extraction. The historical high-frequency component is input into the transformer error prediction model for a primary analysis to obtain a predicted high-frequency component. The historical low-frequency component is input into the transformer error prediction model for a secondary analysis to obtain a predicted low-frequency component. S3: Obtain an error prediction result of the transformer to be predicted based on the predicted high-frequency component and the predicted low-frequency component.

[0005] After adopting the above technical solution, the present invention has the following advantages: Different modes in the historical error sequence of the first mutual inductor may be difficult to separate directly due to similar frequencies, similar amplitudes or complex phase relationships. By adding the white noise component to the signal corresponding to the historical error sequence of the first mutual inductor, additional frequency and phase information can be introduced, thereby changing the relative position and relationship between different modes. This change may make the originally overlapping or intertwined modes clearer and separable. Therefore, based on the target white noise component, the historical error sequence of the first mutual inductor can be decomposed into low-frequency and high-frequency components. The robustness of the decomposition is improved, which helps to reduce the decomposition error caused by signal noise, making the decomposition result more reliable and improving the accuracy of the decomposition; The fully connected layer performs well in processing low-frequency components through its easily scalable fully connected layer structure. The two-dimensional feature extraction can extract the time variation characteristics within a cycle and the variation trends of different cycles. Therefore, a mutual inductor error prediction model is constructed based on the fully connected layer and two-dimensional feature extraction. The corresponding components are input into the corresponding model for analysis, and then the long-term dependencies and short-term relationships in the data are mined and predicted. By integrating the prediction results of the two, high-precision error predictions of different time spans are achieved, ensuring the prediction accuracy and timeliness at different time scales; The problem that it is difficult to effectively mine the long-term dependency in the transformer error data and thus it is difficult to accurately predict the transformer error based on the long-term dependency and short-term relationship is solved.

[0006] Preferably, the S1 comprises: S11: within a first preset time period, obtaining a plurality of first measurement values ​​of the transformer to be predicted, and simultaneously obtaining a plurality of first reference measurement values ​​of the reference transformer, calculating a first absolute difference between each first measurement value and a first reference measurement value corresponding to each first measurement value, and obtaining a first transformer historical error sequence based on the first absolute difference; S12: acquiring a first extended sequence based on a target white noise component and a first mutual inductor historical error sequence; S13: Decomposing the first extended sequence several times to obtain several second extended sequences; S14: Decompose the historical error sequence of the first mutual inductor into a historical low-frequency component and a historical high-frequency component based on several second extended sequences and the first extended sequence. A single extended sequence may not be able to fully capture all the important features of the historical error sequence of the first mutual inductor, especially when the historical error sequence of the first mutual inductor contains multiple complex components. By obtaining multiple second extended sequences through multiple decompositions and combining them with the first extended sequence, the precision and accuracy of the decomposition can be improved, so that the historical low-frequency components and historical high-frequency components finally obtained can accurately reflect the long-term dependency and short-term relationship, so as to facilitate the subsequent feature extraction of the long-term dependency and short-term relationship, thereby making the predicted error more accurate.

[0007] Preferably, the S14 includes: S141: Obtain a residual sequence based on the average difference between the data in the several second extended sequences and the corresponding data in the first extended sequence; S142: Calculate the difference between the data in the first mutual inductor historical error sequence and the corresponding data in the residual sequence to obtain a first modal component; S143: Determine whether the decomposition condition is met, if not, execute S134, if satisfied, obtain several second white noise components, obtain several process residual sequences based on the residual sequence and the several second white noise components, obtain a third extended sequence based on the average value of the corresponding data between the several process residual sequences, use the third extended sequence as the first mutual inductor historical error sequence, and continue to execute S142; S144: The first modal components that meet the requirements among all the first modal components are taken as historical high-frequency components, and the first modal components that do not meet the requirements among all the first modal components are taken as historical low-frequency components. By iterative decomposition and the use of residual sequences, it is possible to ensure that the extracted components have higher precision and accuracy, so that the historical low-frequency components and historical high-frequency components finally obtained can accurately reflect the long-term dependency relationship and the short-term relationship, so as to facilitate the subsequent feature extraction of the long-term dependency relationship and the short-term relationship. This makes the predicted error more accurate.

[0008] Preferably, S2 includes: S21: within a second preset time period, obtaining a plurality of second measurement values ​​of the transformer to be predicted, and simultaneously obtaining a plurality of second reference measurement values ​​of the reference transformer, calculating a second absolute difference between each second measurement value and a second reference measurement value corresponding to each second measurement value, and obtaining a second transformer historical error sequence based on the second absolute difference; S22: constructing a transformer error prediction model based on a fully connected layer and two-dimensional feature extraction, processing the historical error sequence of the second transformer to obtain pre-input data, and training the constructed transformer error prediction model based on the pre-input data; S23: inputting the historical high-frequency component into the trained mutual inductor error prediction model, thereby extracting period information from the historical high-frequency component, and obtaining a predicted high-frequency component based on the extracted period information; S24: inputting the historical low-frequency component into the trained mutual inductor error prediction model, obtaining a prediction sequence and an output sequence, and obtaining a predicted low-frequency component based on the prediction sequence and the output sequence.

[0009] The fully connected layer performs well in processing low-frequency components through its easily scalable fully connected layer structure. The two-dimensional feature extraction can extract the time change characteristics within the cycle and the change trends of different cycles. Therefore, the mutual inductor error prediction model is constructed based on the fully connected layer and the two-dimensional feature extraction. The mutual inductor error prediction model is trained by inputting the data into the mutual inductor error prediction model after targeted processing, so that the mutual inductor error prediction model can better adapt to different application scenarios and data distribution, thereby improving the performance of the mutual inductor error prediction model in practical applications. The historical high-frequency component contains rapid changes and short-term fluctuations in the sequence. These changes are often closely related to the periodic behavior of the sequence. By extracting the periodic information in the historical high-frequency component, the laws behind these rapid changes can be more accurately grasped. The historical high-frequency component often contains more noise and random fluctuations, which may interfere with the prediction of the model. By extracting the periodic information, these noises can be filtered out to a certain extent, making the prediction results smoother and more stable. Thereby improving the accuracy of the overall prediction.

[0010] Preferably, in S22, the processing of the second transformer historical error sequence to obtain pre-input data, and training the constructed transformer error prediction model based on the pre-input data comprises: Based on a preset white noise component and a historical error sequence of a second mutual inductor, a first reserve extension sequence is acquired; Decomposing the first reserve extension sequence several times to obtain several second reserve extension sequences; Based on several second reserve extension sequences and first reserve extension sequences, the second transformer historical error sequence is decomposed into pre-input low-frequency components and pre-input high-frequency components, and the pre-input low-frequency components and pre-input high-frequency components are respectively input into the constructed transformer error prediction model for training. The pre-input low-frequency component reflects the long-term trend and periodic changes of the error, while the pre-input high-frequency component contains short-term fluctuations and noise. Processing these two components separately helps the transformer error prediction model to capture their characteristics more accurately, thereby improving the accuracy of the prediction, and can significantly improve the generalization ability and prediction accuracy of the transformer error prediction model.

[0011] Preferably, in S23, obtaining the predicted high-frequency component based on the extracted periodic information includes: The historical high-frequency components are converted into a two-dimensional tensor based on periodic information; Extract time series features from two-dimensional tensors based on deep learning models, and transform the time series features into one-dimensional representations; The weighted summation is calculated based on the intensity of the frequency corresponding to each element in the one-dimensional representation to obtain the predicted high-frequency component.

[0012] Two-dimensional tensors can provide information in more dimensions. By converting historical high-frequency components into two-dimensional tensors, it helps to better capture the hidden features in historical high-frequency components. Time series features include periodicity, seasonality and other features related to historical high-frequency components. Deep learning models have powerful feature extraction capabilities and can automatically learn and extract time series features that are useful for predicting high-frequency components. They can screen and integrate the extracted features, and fuse the features of different frequency components together through weighted summation to obtain the final predicted high-frequency components. This weighted summation method can take into account the contribution of different frequency components to the high-frequency components, making the prediction results more accurate.

[0013] Preferably, the S24 includes: S241: inputting the historical low-frequency component into the trained mutual inductor error prediction model, and mapping the historical low-frequency component to obtain a low-dimensional vector; S242: Processing the low-dimensional vector based on a mapping function to obtain a first prediction sequence and a first output sequence; S243: Obtain the residual component based on the historical low-frequency component and the first output sequence, and determine whether the residual component meets the input condition. If not, the residual component is used as the historical low-frequency component, and S241 is continued to be executed. If it is satisfied, all residual variables are comprehensively analyzed to obtain the predicted low-frequency component. Through continuous iteration, the mutual inductor error prediction model can gradually adapt to and learn complex changes, thereby enhancing the robustness and adaptability of the mutual inductor error prediction model, and at the same time helping to integrate information in all iterative processes, eliminate possible noise and interference, and thus obtain more accurate and stable prediction results. By setting the input condition to determine whether the residual component meets the requirements, the iteration can be stopped after reaching a certain accuracy, thereby optimizing the calculation efficiency while ensuring the prediction accuracy.

[0014] Preferably, S3 includes: When predicting the mutual inductor error within the third preset time period, the weights of the predicted low-frequency component and the predicted high-frequency component are respectively set based on the time difference between the third preset time period and the time period threshold, and the error prediction result of the mutual inductor to be predicted is obtained based on the weights set for the predicted low-frequency component and the predicted high-frequency component. The predicted low-frequency component reflects the long-term trend and slow change of the sequence, while the predicted high-frequency component contains the short-term fluctuation and noise of the sequence. The importance and influence of these two components in the prediction vary depending on the time period. The time difference between the third preset time period and the time period threshold reflects the time scale and urgency of the prediction. A shorter time difference means that more attention needs to be paid to the change of the predicted high-frequency component, because the predicted high-frequency component may produce large fluctuations in a short time, while a longer time difference may require more attention to the long-term trend of the predicted low-frequency component. According to different time periods, the weights of the predicted low-frequency component and the predicted high-frequency component are reasonably set, which can make the prediction result closer to the actual error situation and improve the accuracy and reliability of the prediction.

[0015] Beneficial effects of this program: Different modes in the historical error sequence of the first mutual inductor may be difficult to separate directly due to similar frequencies, similar amplitudes or complex phase relationships. By adding the white noise component to the signal corresponding to the historical error sequence of the first mutual inductor, additional frequency and phase information can be introduced, thereby changing the relative position and relationship between different modes. This change may make the originally overlapping or intertwined modes clearer and separable. Therefore, based on the target white noise component, the historical error sequence of the first mutual inductor can be decomposed into low-frequency and high-frequency components. The robustness of the decomposition is improved, which helps to reduce the decomposition error caused by signal noise, making the decomposition result more reliable and improving the accuracy of the decomposition; The fully connected layer performs well in processing low-frequency components through its easily scalable fully connected layer structure. The two-dimensional feature extraction can extract the time change characteristics within a period and the change trends of different periods. Therefore, a mutual inductor error prediction model is constructed based on the fully connected layer and two-dimensional feature extraction. The corresponding components are input into the corresponding model for analysis and then the change characteristics are extracted. The prediction is made based on the long-term change characteristics and short-term change characteristics. By integrating the prediction results of the two, high-precision error predictions of different time spans are achieved, ensuring the prediction accuracy and timeliness at different time scales; The pre-input low-frequency component usually reflects the long-term trend and periodic change of the error, while the pre-input high-frequency component contains short-term fluctuations and noise. By inputting the two components into the transformer error prediction model for training, the characteristics of the components can be captured more accurately, thereby improving the accuracy of the prediction, and significantly improving the generalization ability and prediction accuracy of the transformer error prediction model. The problem that it is difficult to effectively mine the long-term dependency in the transformer error data and thus it is difficult to accurately predict the transformer error based on the long-term dependency and short-term relationship is solved.

[0016] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for ultra-short-time prediction of mutual inductor errors are implemented.

[0017] The present invention also 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 steps of the ultra-short-time prediction method for mutual inductor errors when executing the computer program. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts.

[0019] Figure 1 A schematic diagram of a method flow of an ultra-short-time prediction method for mutual inductor error according to the present invention; Figure 2 A diagram showing the prediction results of high-frequency components of a mutual inductor error prediction model and other models in a mutual inductor error ultra-short-time prediction method of the present invention; Figure 3 A result diagram of predicting low-frequency components under a mutual inductor error prediction model and other models in a mutual inductor error ultra-short-time prediction method of the present invention; Figure 4 This is a diagram of mutual inductor error prediction results of a mutual inductor error prediction model and other models in a mutual inductor error ultra-short-time prediction method of the present invention. DETAILED DESCRIPTION

[0020] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation method described herein is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0021] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the drawings; the process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0022] Embodiment 1: like Figure 1 As shown, a method for ultra-short-time prediction of mutual inductor error comprises the following steps: S1: decomposing white noise to obtain a first white noise component, marking the first white noise component that meets the conditions as a target white noise component, and decomposing the first mutual inductor historical error sequence into a historical low-frequency component and a historical high-frequency component based on the target white noise component.

[0023] The S1 includes: S11: within a first preset time period, obtaining a plurality of first measurement values ​​of the transformer to be predicted, and simultaneously obtaining a plurality of first reference measurement values ​​of the reference transformer, calculating a first absolute difference between each first measurement value and a first reference measurement value corresponding to each first measurement value, and obtaining a first transformer historical error sequence based on the first absolute difference; S12: acquiring a first extended sequence based on a target white noise component and a first mutual inductor historical error sequence; S13: Decomposing the first extended sequence several times to obtain several second extended sequences; S14: Decomposing the first mutual inductor historical error sequence into a historical low-frequency component and a historical high-frequency component based on the plurality of second extended sequences and the first extended sequence.

[0024] The S14 includes: S141: Obtain a residual sequence based on the average difference between the data in the several second extended sequences and the corresponding data in the first extended sequence; S142: Calculate the difference between the data in the first mutual inductor historical error sequence and the corresponding data in the residual sequence to obtain a first modal component; S143: Determine whether the decomposition condition is met, if not, execute S134, if satisfied, obtain several second white noise components, obtain several process residual sequences based on the residual sequence and the several second white noise components, obtain a third extended sequence based on the average value of the corresponding data between the several process residual sequences, use the third extended sequence as the first mutual inductor historical error sequence, and continue to execute S142; S144: taking the first modal components that meet the requirements among all the first modal components as historical high-frequency components, and taking the first modal components that do not meet the requirements among all the first modal components as historical low-frequency components.

[0025] The white noise is decomposed to obtain a plurality of first white noise components. The condition setting is determined according to the specific signal processing task, such as the signal frequency band to be retained, the noise suppression level, etc. In this embodiment, the first white noise component is taken as the target white noise component, and the target white noise component is added to the first mutual inductor historical error sequence to obtain the first extended sequence: X1 (i) =x+b1E1(w (i) ), where b1 represents the first signal-to-noise ratio; w (i) is the target white noise component, E1(w (i) ) represents the first white noise component of the decomposition, the first extended sequence is decomposed multiple times to obtain several second extended sequences, and the difference and average of the first mutual inductor historical error sequence are obtained to obtain the residual sequence R and the first first modal component IMF1, R = <X (i) -E j (X j (i) )>, where X (i) is the historical error sequence of the first mutual inductor, <> indicates averaging, j is the number of times the first extended sequence is decomposed, IMF1=xR, where x is the historical error sequence of the first mutual inductor, multiple groups of second white noise components are added to the residual sequence, and the third extended sequence is obtained after averaging. After subtracting from the residual sequence, the second first modal component IMF2 can be obtained. Subsequent multiple iterations are performed to obtain several first modal components, and the first modal components with zero crossing rates greater than the preset zero crossing rate in all first modal components are taken as historical high-frequency components, and the first modal components with zero crossing rates less than or equal to the preset zero crossing rate in all first modal components are taken as historical low-frequency components. When the first mutual inductor historical error sequence is decomposed for the first time, whether the decomposition condition is met is determined by determining whether the first mutual inductor historical error sequence meets the decomposition condition. In the subsequent iterative decomposition, it is determined whether the third extended sequence meets the decomposition condition. When the energy or maximum amplitude of the third extended sequence is lower than the set threshold, it is considered that the third extended sequence no longer contains meaningful signal components, so the decomposition is stopped. The decomposed historical high-frequency and historical low-frequency components are normalized: In the formula, x′ is the normalized data, x min and x maxare the minimum and maximum values ​​in the interval respectively. Through the above steps, the historical error sequence of the first mutual inductor is decomposed into high-frequency components and low-frequency components to achieve noise reduction of the sequence and facilitate subsequent processing, so that the historical low-frequency components and historical high-frequency components finally obtained can accurately reflect the long-term dependency and short-term relationship, so as to facilitate the subsequent feature extraction of the long-term dependency and short-term relationship, thereby making the predicted error more accurate.

[0026] S2: A transformer error prediction model is constructed based on the fully connected layer and two-dimensional feature extraction. The historical high-frequency component is input into the transformer error prediction model for a primary analysis to obtain the predicted high-frequency component. The historical low-frequency component is input into the transformer error prediction model for a secondary analysis to obtain the predicted low-frequency component.

[0027] The S2 includes: S21: within a second preset time period, obtaining a plurality of second measurement values ​​of the transformer to be predicted, and simultaneously obtaining a plurality of second reference measurement values ​​of the reference transformer, calculating a second absolute difference between each second measurement value and a second reference measurement value corresponding to each second measurement value, and obtaining a second transformer historical error sequence based on the second absolute difference; S22: constructing a transformer error prediction model based on a fully connected layer and two-dimensional feature extraction, processing the historical error sequence of the second transformer to obtain pre-input data, and training the constructed transformer error prediction model based on the pre-input data; S23: inputting the historical high-frequency component into the trained mutual inductor error prediction model, thereby extracting period information from the historical high-frequency component, and obtaining a predicted high-frequency component based on the extracted period information; S24: inputting the historical low-frequency component into the trained mutual inductor error prediction model, obtaining a prediction sequence and an output sequence, and obtaining a predicted low-frequency component based on the prediction sequence and the output sequence.

[0028] In S22, the processing of the second transformer historical error sequence to obtain pre-input data, and training the constructed transformer error prediction model based on the pre-input data includes: Based on a preset white noise component and a historical error sequence of a second mutual inductor, a first reserve extension sequence is acquired; Decomposing the first reserve extension sequence several times to obtain several second reserve extension sequences; Based on several second reserve extension sequences and the first reserve extension sequence, the second mutual inductor historical error sequence is decomposed into a pre-input low-frequency component and a pre-input high-frequency component, and the pre-input low-frequency component and the pre-input high-frequency component are respectively input into the constructed mutual inductor error prediction model for training.

[0029] In S23, obtaining the predicted high-frequency component based on the extracted period information includes: The historical high-frequency components are converted into a two-dimensional tensor based on periodic information; Extract time series features from two-dimensional tensors based on deep learning models, and transform the time series features into one-dimensional representations; The weighted summation is calculated based on the intensity of the frequency corresponding to each element in the one-dimensional representation to obtain the predicted high-frequency component.

[0030] The S24 includes: S241: inputting the historical low-frequency component into the trained mutual inductor error prediction model, and mapping the historical low-frequency component to obtain a low-dimensional vector; S242: Processing the low-dimensional vector based on a mapping function to obtain a first prediction sequence and a first output sequence; S243: Obtain the residual component based on the historical low-frequency component and the first output sequence, and determine whether the residual component meets the input condition. If not, take the residual component as the historical low-frequency component and continue to execute S241. If it meets the condition, perform a comprehensive analysis on all residual variables to obtain the predicted low-frequency component.

[0031] The mutual inductor error prediction model is constructed based on the two-dimensional feature extraction of the TimesNet model, and the historical high-frequency components of the input Extract the period and convert it into a 2D tensor: Where A represents the calculated amplitude of each frequency, f k represents the frequency of the selected time series, p k represents the period length of the selected time series, f i and p i Represents the number of columns and rows of a two-dimensional tensor respectively. Padding means padding the time series that does not meet the length requirement with 0; Reshape means folding the sequence that has been padded with 0 to meet the subsequent two-dimensional modeling. For any two-dimensional tensor Since it has two-dimensional locality, it can be subjected to two-dimensional convolution to extract information, namely: For the extracted time series features, they are converted into one-dimensional space to facilitate subsequent information aggregation and in-depth processing of the time series: The obtained one-dimensional representation is weighted and summed to get the final output: In the formula, Softmax is a normalized exponential function, for The amplitude of for Through the above steps, it is possible to extract two-dimensional time series changes for multiple periods respectively, and then perform adaptive fusion time series modeling process to obtain the predicted high-frequency components.

[0032] The noise content of historical low-frequency components is low and relatively stable. Therefore, constructing a transformer error prediction model based on the fully connected layer of the N-BEATS model can speed up the prediction while ensuring high prediction accuracy. In order to enhance the ability of the transformer error prediction model to capture periodic characteristics, a seasonal module is added to the original prediction block structure. The transformer error prediction model is used to predict the low-frequency component. Part of the architecture of the transformer error prediction model consists of multiple Stack blocks, and each Stack consists of multiple blocks. The input of one block is the first transformer historical error sequence, and the output is divided into two parts. One is the prediction sequence for future data, namely the prediction sequence, and the other is the reconstructed sequence for the block input, namely the output sequence. The input of the remaining blocks is the residual sequence formed by subtracting the previous reconstruction value from the input of the previous block. In this process, the residual information omitted by the previous block is continuously fitted. is the input of the subsequent block, and is the input of the previous block. The output of each block module is and Each branch can be regarded as a two-stage mapping process: the first stage of mapping is to map the input sequence to (or ), which contains 4 FC layers and a simple linear layer, as follows: It can be understood as removing redundant input information and retaining the predicted target or The second stage of mapping is to pass the data obtained in the previous stage through the mapping function g b and g f To obtain and By The historical high-frequency components and historical low-frequency components are input into the model, and the short-term relationship and long-term dependency characteristics of the historical high-frequency components and historical low-frequency components are extracted, so as to realize the prediction of the predicted high-frequency components and the predicted low-frequency components, improve the prediction accuracy of the predicted high-frequency components and the predicted low-frequency components, and thus improve the accuracy of the mutual inductor error prediction.

[0033] S3: Obtain an error prediction result of the transformer to be predicted based on the predicted high-frequency component and the predicted low-frequency component.

[0034] The S3 includes: When predicting the mutual inductor error within the third preset time period, the weights of the predicted low-frequency component and the predicted high-frequency component are respectively set based on the time difference between the third preset time period and the time period threshold, and the error prediction result of the mutual inductor to be predicted is obtained based on the weights set for the predicted low-frequency component and the predicted high-frequency component. The predicted low-frequency component reflects the long-term trend and slow change of the sequence, while the predicted high-frequency component contains the short-term fluctuation and noise of the sequence. The importance and influence of these two components in the prediction vary depending on the time period. The time difference between the third preset time period and the time period threshold reflects the time scale and urgency of the prediction. A shorter time difference means that more attention needs to be paid to the change of the predicted high-frequency component, because the predicted high-frequency component may produce large fluctuations in a short time, while a longer time difference may require more attention to the long-term trend of the predicted low-frequency component. According to different time periods, the weights of the predicted low-frequency component and the predicted high-frequency component are reasonably set, which can make the prediction result closer to the actual error situation and improve the accuracy and reliability of the prediction.

[0035] As shown in Table 1, it is a comparison table of the prediction effects of the mutual inductor error prediction model and other models. In order to ensure the credibility of the obtained results, multiple evaluation indicators such as mean absolute error (MAE) and root mean square error (RMSE) are used to evaluate the prediction accuracy of the mutual inductor error prediction model in different time spans. In the formula, To predict the high frequency component or to predict the low frequency component, y i are the actual high-frequency components and the actual low-frequency components in the future, and n is the size of the data set.

[0036] Table 1. Comparison of prediction effects of mutual inductor error prediction model and other models The mutual inductor error prediction model in this embodiment is compared with the traditional model, and TimesNet and LSTM are used to predict the high-frequency components respectively, as shown in FIG. Figure 2 As shown, in this embodiment, the original sequence is the actual high-frequency component of the future. By analyzing the prediction results, it can be seen that TimesNet has the best prediction effect, and most of the extreme points are closer to the true value. Therefore, when obtaining the predicted high-frequency component, choosing to use TimesNet can achieve higher prediction accuracy than the LSTM model.

[0037] Use N-BEATS and ARIMA to predict the low-frequency components. Figure 3From the analysis, it can be seen that the prediction results of the N-BEATS model for predicting low-frequency components are almost consistent with the true value, while ARIMA can only predict the general trend of the true value and cannot make accurate predictions. In this embodiment, the original sequence is the actual low-frequency component in the future. Therefore, choosing N-BEATS to predict the low-frequency component has a better prediction effect than other prediction models.

[0038] In order to ensure the accuracy and credibility of the prediction of the mutual inductor error prediction model, the present invention will adopt the following single model and combined model to use the same data set to predict the mutual inductor error, and compare the accuracy of each model at the same time, a single ARIMA prediction model, that is, a model in which the historical error sequence of the first mutual inductor is input into the ARIMA model for prediction, a single TimesNet prediction model, that is, a model in which the historical error sequence of the first mutual inductor is input into the TimesNet environment for prediction, a single N-BEATS prediction model, that is, a model in which the historical error sequence of the first mutual inductor is input into the N-BEATS model for error prediction, a combined prediction model based on ICEEMDAN-TCN (IT), that is, a combined model in which the IMF and Res obtained after the historical error sequence of the first mutual inductor is processed by ICEEMDAN are predicted by TCN, a mutual inductor error prediction model (INT), which analyzes the historical high-frequency components and historical low-frequency components obtained after decomposing the historical error sequence of the first mutual inductor, and obtains predicted high-frequency components and predicted low-frequency components, such as Figure 4 As shown, in this embodiment, the original sequence is the actual future mutual inductor error sequence. By comparing and analyzing the prediction results of each model, it can be seen that the mutual inductor error prediction model (INT) shows the highest prediction accuracy among all the tested models, and its prediction results have a very high coincidence with the true value. There will be a small deviation at some points, but it can be almost ignored. It can be seen from the verification that the present invention has better accuracy in the prediction direction of the mutual inductor error.

[0039] Embodiment 2: This embodiment further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for ultra-short-time prediction of mutual inductor errors are implemented.

[0040] Embodiment 3: This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the ultra-short-time prediction method for mutual inductor errors when executing the computer program.

[0041] The specific implementation described above is a preferred implementation of a method, storage medium and electronic device for ultra-short-time prediction of a mutual inductor error of the present invention, but it is not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to the specific implementation embodiment. All equivalent changes made in accordance with the shape and structure of the present invention are within the protection scope of the present invention.

Claims

1. A method for ultra-short-time prediction of mutual inductor error, characterized in that: The following steps are involved: S1: decomposing white noise to obtain a first white noise component, marking the first white noise component that meets the conditions as a target white noise component, and decomposing the first mutual inductor historical error sequence into a historical low-frequency component and a historical high-frequency component based on the target white noise component; S2: A transformer error prediction model is constructed based on a fully connected layer and two-dimensional feature extraction. The historical high-frequency component is input into the transformer error prediction model for a primary analysis to obtain a predicted high-frequency component. The historical low-frequency component is input into the transformer error prediction model for a secondary analysis to obtain a predicted low-frequency component. S3: Obtain an error prediction result of the transformer to be predicted based on the predicted high-frequency component and the predicted low-frequency component.

2. The ultra-short-time prediction method for mutual inductor error according to claim 1, characterized in that: The S1 includes: S11: within a first preset time period, obtaining a plurality of first measurement values ​​of the transformer to be predicted, and simultaneously obtaining a plurality of first reference measurement values ​​of the reference transformer, calculating a first absolute difference between each first measurement value and a first reference measurement value corresponding to each first measurement value, and obtaining a first transformer historical error sequence based on the first absolute difference; S12: acquiring a first extended sequence based on a target white noise component and a first mutual inductor historical error sequence; S13: Decomposing the first extended sequence several times to obtain several second extended sequences; S14: Decomposing the first mutual inductor historical error sequence into a historical low-frequency component and a historical high-frequency component based on the plurality of second extended sequences and the first extended sequence.

3. The ultra-short-time prediction method for mutual inductor error according to claim 2, characterized in that: The S14 includes: S141: Obtain a residual sequence based on an average difference between data in a plurality of second extended sequences and corresponding data in the first extended sequence; S142: Calculate the difference between the data in the historical error sequence of the first mutual inductor and the corresponding data in the residual sequence to obtain a first modal component; S143: Determine whether the decomposition condition is met, if not, execute S134, if met, obtain a plurality of second white noise components, obtain a plurality of process residual sequences based on the residual sequence and the plurality of second white noise components, obtain a third extended sequence based on the average of corresponding data between the plurality of process residual sequences, use the third extended sequence as the first mutual inductor historical error sequence, and continue to execute S142; S144: taking the first modal components that meet the requirements among all the first modal components as historical high-frequency components, and taking the first modal components that do not meet the requirements among all the first modal components as historical low-frequency components.

4. The ultra-short-time prediction method for mutual inductor error according to claim 1, characterized in that: The S2 includes: S21: within a second preset time period, obtaining a plurality of second measurement values ​​of the transformer to be predicted, and simultaneously obtaining a plurality of second reference measurement values ​​of the reference transformer, calculating a second absolute difference between each second measurement value and a second reference measurement value corresponding to each second measurement value, and obtaining a second transformer historical error sequence based on the second absolute difference; S22: constructing a transformer error prediction model based on a fully connected layer and two-dimensional feature extraction, processing the historical error sequence of the second transformer to obtain pre-input data, and training the constructed transformer error prediction model based on the pre-input data; S23: inputting the historical high-frequency component into the trained mutual inductor error prediction model, thereby extracting period information from the historical high-frequency component, and obtaining a predicted high-frequency component based on the extracted period information; S24: inputting the historical low-frequency component into the trained mutual inductor error prediction model, obtaining a prediction sequence and an output sequence, and obtaining a predicted low-frequency component based on the prediction sequence and the output sequence.

5. The ultra-short-time prediction method for mutual inductor error according to claim 4, characterized in that: In S22, the processing of the second transformer historical error sequence to obtain pre-input data, and training the constructed transformer error prediction model based on the pre-input data includes: Based on a preset white noise component and a historical error sequence of a second mutual inductor, a first reserve extension sequence is acquired; Decomposing the first reserve extension sequence several times to obtain several second reserve extension sequences; Based on several second reserve extension sequences and the first reserve extension sequence, the second mutual inductor historical error sequence is decomposed into a pre-input low-frequency component and a pre-input high-frequency component, and the pre-input low-frequency component and the pre-input high-frequency component are respectively input into the constructed mutual inductor error prediction model for training.

6. The ultra-short-time prediction method for mutual inductor error according to claim 4, characterized in that: In S23, obtaining the predicted high-frequency component based on the extracted period information includes: The historical high-frequency components are converted into a two-dimensional tensor based on periodic information; Extract time series features from two-dimensional tensors based on deep learning models, and transform the time series features into one-dimensional representations; The weighted summation is calculated based on the intensity of the frequency corresponding to each element in the one-dimensional representation to obtain the predicted high-frequency component.

7. The ultra-short-time prediction method for mutual inductor error according to claim 4, characterized in that: The S24 includes: S241: inputting the historical low-frequency component into the trained mutual inductor error prediction model, and mapping the historical low-frequency component to obtain a low-dimensional vector; S242: Processing the low-dimensional vector based on a mapping function to obtain a first prediction sequence and a first output sequence; S243: Obtain the residual component based on the historical low-frequency component and the first output sequence, and determine whether the residual component meets the input condition. If not, take the residual component as the historical low-frequency component and continue to execute S241. If it meets the condition, perform a comprehensive analysis on all residual variables to obtain the predicted low-frequency component.

8. The ultra-short-time prediction method for mutual inductor error according to claim 1, characterized in that: The S3 includes: when predicting the mutual inductor error within a third preset time period, respectively setting weights for predicting a low-frequency component and a high-frequency component based on a time difference between the third preset time period and a time period threshold, and obtaining an error prediction result of the mutual inductor to be predicted based on the weights respectively set for predicting the low-frequency component and the high-frequency component.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the ultra-short-time prediction method for mutual inductor error according to any one of claims 1 to 8 are implemented.

10. 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 computer program, the steps of the method for ultra-short-time prediction of mutual inductor error according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • A method and apparatus for short-term prediction of metering error status of instrument transformers

    CN113821938B