Voltage transformer error prediction method and system
By using an improved adaptive noise decomposition and XLSTM-Transformer hybrid model, the harmonic effects of voltage transformers in complex electromagnetic environments are solved, achieving high-precision error prediction and improved stability. This model is suitable for high-voltage test environments of 10kV electromagnetic voltage transformers.
Patent Information
- Application Number
- CN202511649257.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies suffer from low measurement accuracy and poor stability when dealing with the harmonic effects of voltage transformers in complex electromagnetic environments. This is especially true in high-voltage test environments, where there are many interference factors and traditional filtering and prediction models are difficult to effectively suppress noise interference and mode mixing.
An improved adaptive noise complete set empirical mode decomposition combined with a multi-level correlation adaptive threshold denoising method is adopted to perform preliminary denoising on voltage transformer signals. An XLSTM-Transformer hybrid deep learning model is used for error prediction, and the signal processing capability is improved through self-attention mechanism and residual connection.
It significantly improves the measurement reliability and accuracy of voltage transformers in harmonic environments, effectively suppresses complex interference, achieves high-precision error prediction, and supports dynamic modeling of multivariable and multi-scale data.
Smart Images

Figure CN121658778A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system metering and monitoring technology, and more specifically, to a method and system for predicting voltage transformer errors. Background Technology
[0002] With the large-scale integration of renewable energy and the improvement of power system intelligence, the volatility and nonlinearity of power grid loads are intensifying, driving the transformation of distribution networks towards intelligence and digitalization. In this process, electromagnetic voltage transformers (PTs), as core equipment, undertake voltage measurement, monitoring, and protection tasks, and their stability and accuracy are crucial to the reliability of power grid operation. Electromagnetic voltage transformers operate on the principle of electromagnetic induction and are widely used in distribution networks. However, the increasing number of nonlinear loads and power electronic devices in power systems has led to increasingly serious harmonic problems. Harmonics not only cause equipment overheating and measurement errors but can also trigger equipment failures and power grid instability, posing global risks. The impact of harmonics on electromagnetic voltage transformers is particularly significant, especially under conditions of core saturation or large load variations, where harmonics severely affect their measurement accuracy. With the advancement of power grid intelligence, voltage transformers not only need to provide accurate voltage measurements but also undertake tasks such as data acquisition and status monitoring. Their stability in harmonic environments directly affects the safety and efficiency of the power grid. In practical engineering testing environments, power system harmonic measurements face complex conditions with multi-source interference. This interference affects the accuracy of signal acquisition through various pathways, including grid harmonics, grounding loop currents, and conductor interference. In 10kV and above high-voltage testing environments, these interference effects are even more pronounced, often leading to data deviations in the transmission characteristic tests of electromagnetic voltage transformers due to interference. The State Grid Corporation of China has begun to strengthen the monitoring and optimization of power quality, placing higher demands on the research and application of harmonic processing technologies. Therefore, achieving accurate measurement and prediction of harmonic parameters under complex electromagnetic environments is of great significance for improving the power quality and operational reliability of power systems.
[0003] In practical engineering, to ensure data accuracy, it is usually necessary to filter and predict errors in the acquired signals. While common filtering algorithms such as wavelet transform and empirical mode decomposition (EMD) can extract harmonic signals and reduce noise interference, they still have limitations such as mode aliasing and endpoint effects when processing complex harmonic signals. Furthermore, commonly used neural network-based prediction models and time series analysis-based error prediction models have limited ability to model nonlinear and complex relationships and lack adaptability to dynamic changes, necessitating improvements through the integration of advanced deep learning algorithms. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing a method and system for predicting voltage transformer errors. By introducing an improved adaptive noise complete set empirical mode decomposition combined with a multi-level correlation adaptive threshold noise reduction method, it can effectively suppress complex interferences in the signal acquisition process and overcome the mode mixing problem of traditional methods.
[0005] According to a first aspect of the present invention, a method for predicting errors in a voltage transformer is provided, comprising: Step 1: Collect the raw noisy voltage signal and environmental data of the voltage transformer; Step 2: Based on the improved fully adaptive noise set empirical mode wavelet decomposition algorithm, the original noisy voltage signal is initially denoised by multi-level correlation adaptive threshold wavelet transform. Then, the signal after initial denoising is deeply decomposed and reconstructed using ANCE-EMD to obtain the reconstructed signal of the original noisy voltage signal. Step 3: Input the reconstructed signal and the environmental data as heterogeneous sequence data into the error prediction model, and output the error prediction value; The error prediction model includes a dual-branch encoder, an XLSTM network, a Transformer network, and a decoder. The dual-branch encoder is used to extract the encoded feature sequence of the heterogeneous sequence data; The XLSTM network introduces an exponential gating mechanism and residual connection blocks to output the hidden state of the encoded feature sequence; The Transformer network introduces a multi-head self-attention mechanism, which processes the hidden state based on multiple attention heads to obtain the multi-head self-attention result; The decoder is used to output the error prediction value of the voltage transformer based on the multi-head self-attention result.
[0006] According to a second aspect of the present invention, a system is provided, comprising: The acquisition module is used to acquire the raw, noisy voltage signal and environmental data of the voltage transformer. The signal reconstruction module is used to perform preliminary noise reduction on the original noisy voltage signal by multi-level correlation adaptive threshold wavelet transform based on the improved fully adaptive noise set empirical mode wavelet decomposition algorithm, and then use ANCE-EMD to perform deep decomposition and reconstruction on the preliminary noise-reduced signal to obtain the reconstructed signal of the original noisy voltage signal. The prediction module is used to input the reconstructed signal and the environmental data as heterogeneous sequence data into the error prediction model and output the error prediction value. The error prediction model includes a dual-branch encoder, an XLSTM network, a Transformer network, and a decoder. The dual-branch encoder is used to extract the encoded feature sequence of the heterogeneous sequence data; The XLSTM network introduces an exponential gating mechanism and residual connection blocks to output the hidden state of the encoded feature sequence; The Transformer network introduces a multi-head self-attention mechanism, which processes the hidden state based on multiple attention heads to obtain the multi-head self-attention result; The decoder is used to output the error prediction value of the voltage transformer based on the multi-head self-attention result.
[0007] This invention provides a method and system for predicting voltage transformer errors. By introducing an improved adaptive noise complete set empirical mode decomposition combined with a multi-level correlation adaptive threshold denoising method, it can effectively suppress complex interferences during signal acquisition and overcome the mode mixing problem of traditional methods. Furthermore, a deep learning prediction model combining a temporal convolutional network based on an attention mechanism and a long short-term memory network is constructed to achieve dynamic modeling and high-precision prediction of transformer harmonic transmission errors. This significantly improves the reliability of measurements in complex electromagnetic environments and the intelligent level of power grid state perception. Attached Figure Description
[0008] Figure 1 A flowchart of a voltage transformer error prediction method provided in one embodiment of the present invention; Figure 2 This is a flowchart illustrating the noise reduction and coupling processing of the original noisy voltage signal according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the data processing process of a Transformer network according to an embodiment of the present invention; Figure 4 A flowchart illustrating an overall method for predicting voltage transformer errors according to an embodiment of the present invention; Figure 5 This is a schematic diagram of a voltage transformer error prediction system provided in one embodiment of the present invention. Detailed Implementation
[0009] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined with each other to form feasible technical solutions. Such combinations are not constrained by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0010] The voltage transformer error prediction method provided by this invention takes as its initial input the raw, noisy voltage signal collected from a 10kV electromagnetic voltage transformer in the field, along with relevant environmental parameters (such as temperature and humidity). The raw, noisy voltage signal is then denoised and its features enhanced. An improved fully adaptive noise ensemble empirical mode wavelet decomposition algorithm is used to denoise and enhance the raw, noisy voltage signal. This algorithm first performs preliminary denoising through multi-level correlation adaptive threshold wavelet transform, and then uses ANCE-EMD for deep decomposition and reconstruction. The resulting reconstructed signal has a high signal-to-noise ratio and clear features. This signal will serve as the input for the next module. The error prediction model is responsible for predicting the transformer error based on the processed signal and other auxiliary information. Features are extracted from the input reconstructed signal, and these time-series features are then fed into the hybrid deep learning model merging XLSTM and Transformer constructed in this invention for training and prediction. Finally, the predicted future error values (such as ratio error and angle error) of the electromagnetic voltage transformer are output.
[0011] Figure 1 A flowchart of a voltage transformer error prediction method according to an embodiment of the present invention is shown, as follows: Figure 1 The method includes the following steps: Step 1: Collect the original noisy voltage signal and environmental data of the voltage transformer.
[0012] It is understood that the embodiments of the present invention collect voltage signals and environmental data (such as temperature, humidity, etc.) of each voltage transformer.
[0013] Step 2: Based on the improved fully adaptive noise set empirical mode wavelet decomposition algorithm, the original noisy voltage signal is initially denoised by multi-level correlation adaptive threshold wavelet transform. The signal after initial denoising is then deeply decomposed and reconstructed using ANCE-EMD to obtain the reconstructed signal.
[0014] Understandably, the raw voltage signal from the voltage transformer is noisy; therefore, it needs to be denoised. A flowchart of the denoising process can be found here. Figure 2 This invention proposes an improved wavelet algorithm based on traditional wavelet analysis, using Multi-Level Correlation Adaptive Thresholding (MCAT). Simultaneously, it employs the Adaptive Noise Complete-Ensemble Empirical Mode Decomposition (ANCE-EMD) algorithm to effectively resolve mode aliasing and eliminate residual noise. Furthermore, after calculating the first-order Intrinsic Mode Function (IMF) components, white noise (or the IMF components of white noise) is added back to the residuals, and the mean of the IMF components at this point is calculated. This process is iterated repeatedly, effectively improving computational efficiency while reducing reconstruction errors.
[0015] The theoretical basis of the MCAT algorithm in this embodiment of the invention lies in the difference in correlation between the signal and noise at different scales (decomposition levels) after wavelet transform, namely: 1. Signal Correlation: After wavelet transform, the energy of useful signal features (such as abrupt changes caused by fluctuations) will be distributed across multiple adjacent scales, and the wavelet coefficients at these scales will have strong correlations at the same time location.
[0016] 2. Noise is uncorrelated: After wavelet transform, the coefficients of Gaussian white noise are still approximately Gaussian white noise at all scales, and the coefficients are uncorrelated between different scales.
[0017] By utilizing this characteristic, the threshold can be dynamically adjusted based on the correlation of wavelet coefficients at adjacent scales, thereby enabling the distinction between signals and noise.
[0018] The specific processing procedure of the improved wavelet algorithm for Multi-Level Correlation Adaptive Thresholding (MCAT) is as follows: The original noisy electromagnetic current transformer acquired the following signal: The present invention conducts on it Wavelet decomposition of layers yields detail coefficients for each layer. And the approximation coefficient at the lowest level First, for each level of detail coefficients, calculate the correlation coefficient between its cross-correlation factor and the level of detail coefficients in time. As follows, this invention uses the average of the products of corresponding position coefficients for calculation: (1) in, It refers to the k-th detail coefficient of the j-th layer. This refers to the k approximation coefficients of the J-th layer. This represents the number of detail coefficients in the j-th layer.
[0019] The traditional general threshold is ,in It is an estimate of the standard deviation of the j-th layer noise, usually expressed as... Based on the aforementioned correlation factors, this invention constructs an adaptive threshold. : (2) in It is a moderating factor used to control the strength of the correlation's moderating effect on the threshold.
[0020] When the correlation between adjacent scales is strong, at this time If it approaches 1, then As the threshold approaches zero, the adaptive threshold becomes very small, and the algorithm tends to consider this a useful signal, thus retaining more wavelet coefficients. Conversely, when the correlation between adjacent scales is weak, the adaptive threshold becomes much smaller. Approaching 0, then When the threshold approaches 1, the adaptive threshold will be closer to the general threshold, and the algorithm will tend to identify this as noise and perform standard threshold denoising.
[0021] The next step is threshold quantization and signal reconstruction. In this invention, a soft thresholding function is applied to the detail coefficients of each layer for quantization as follows: (3) Finally, the present invention utilizes the processed detail factor. and unprocessed approximation coefficients An inverse wavelet transform is performed to obtain a preliminarily denoised signal, which will serve as the input for the next stage of ANCE-EMD decomposition. The core idea of this ANCE-EMD method is to add specific, processed white noise at each step of the decomposition, and then perform an overall average of the modes obtained from each decomposition to obtain the final IMF. This step-by-step addition and overall averaging method ensures that the reconstruction error is close to zero.
[0022] The mutual inductor signal after initial wavelet denoising is: This invention first extracts the first IMF, for , generating signal Secondary implementation ,in It is standard Gaussian white noise. These are the initial noise amplitude coefficients. (This is achieved through basic EMD decomposition.) Each obtains its first mode. Then, its first IMF is calculated as follows: (4) Calculate the first residual component: (5) Then extract the second IMF component, for To generate a new signal: ,in This represents the k-th mode obtained after EMD decomposition of the signal. Its second IMF is calculated as follows: (6) Calculate the second residual component: (7) Repeating the above process for the k-th IMF component yields: (8) (9) The iteration continues until the residual component becomes a monotonic function or its amplitude falls below a preset threshold, making it impossible to decompose into a new IMF. The final residual component is denoted as... .
[0023] Signal It is precisely decomposed into: (10) After decomposing the signal into a series of IMFs, the key to noise reduction in this invention lies in identifying which IMFs mainly contain noise and which mainly contain signal. Typically, high-frequency noise is concentrated in the first few (high-frequency) IMFs, while useful signals are distributed in the subsequent (mid-to-low-frequency) IMFs.
[0024] This invention employs a correlation criterion to automatically classify the signal IMF and noise IMF. It calculates the correlation between each IMF and the signal after wavelet initial denoising. Pearson correlation coefficient : (11) Meanwhile, this invention sets a correlation threshold. ,like Then it is believed The main component is noise, which is then removed. If Then it is believed The main components are signal components, which are preserved.
[0025] Ultimately, the reconstructed fault signal It is obtained by adding all the retained IMF components and residual components of the signal: (12) The reconstructed signal of the original noisy voltage signal output in this step. The noise is significantly suppressed, and the key dynamic features of the signal are preserved. This signal will serve as a high-quality data source and be input into the subsequent error prediction model for feature extraction and model training.
[0026] Step 3: Input the reconstructed signal and the environmental data as heterogeneous sequence data into the error prediction model, and output the error prediction value.
[0027] Understandably, the heterogeneous sequence data reconstructed in step 2 (including environmental data and the voltage signal of the reconstructed voltage transformer) is input into the error prediction model to predict the error of the voltage transformer.
[0028] In one embodiment of the present invention, the error prediction model adopts an innovative XLSTM-Transformer hybrid architecture. The model first utilizes the powerful temporal information capture capability of the XLSTM network to extract local dynamic features from the input sequence; then, it passes the output to the Transformer encoder and uses its self-attention mechanism to learn the global dependencies of the sequence, thereby achieving high-precision prediction of the mutual inductor error.
[0029] The error prediction model includes a dual-branch encoder, an XLSTM network, a Transformer network, and a decoder.
[0030] The dual-branch encoder is used to extract the encoded feature sequence of the heterogeneous sequence data.
[0031] Specifically, this invention designs a dual-branch encoder that extracts local features for each type of physical quantity using a lightweight encoder. The dual-branch encoder assigns an independent lightweight coding network (such as a simple fully connected layer or a one-dimensional convolutional layer) to each type of physical quantity, performing separate feature extraction and normalization on each. Then, the extracted features are concatenated and fed into the main model. This approach removes redundant information within each channel during the encoding stage and allows the model to better adapt to heterogeneous data. Mathematically, let the original multi-channel input (each type of physical quantity as a branch channel) be... , Represents the Mth type of physical quantity, each branch channel Corresponding encoding function The local coding features of each type of physical quantity are obtained: (28) The main fusion layer generates the encoded feature sequence by concatenating formula (27): (29) in This is a learnable channel weight vector. Then... The signal is fed into an improved XLSTM for time-domain modeling. The advantages of branch coding are: first, each branch can use specific normalization and filtering parameters to adapt to the statistical characteristics of the channel; second, it can remove noise and redundancy within the channel during the coding stage, reducing the learning burden on the XLSTM.
[0032] The XLSTM network introduces an exponential gating mechanism and residual connection blocks to output the hidden state of the encoded feature sequence.
[0033] Understandably, LSTM neural networks are a special type of recurrent neural network, widely used in model prediction since their inception. They effectively capture long-term dependencies by introducing gating mechanisms to control the flow of information, including forgetting, input, and output gates. This invention builds upon existing LSTM structures to construct an XLSTM structure, introducing an exponential gating mechanism. Exponential gating provides more dynamic information filtering capabilities. To prevent numerical stability issues caused by exponential gating, this invention's XLSTM incorporates additional normalization and stabilization steps in the gating calculation.
[0034] The XLSTM of this invention introduces layer normalization and learnable scaling bias, making gated computation more stable under different batches and operating conditions. In neural networks, linear transformation usually refers to a weighted summation operation on the input vector, in the form of... ,in It is the input vector. It is the hidden state from the previous moment. and These are the weight matrices. It is the bias vector. Application layer normalization can be written as: (13) (14) (15) in, and These represent the mean and variance, respectively. , For learnable scaling and bias vectors, It is a numerically stable term. This represents linearization. Subsequently, the gate calculations for each gate unit are changed to use the layer-normalized values as input: (16) in, It is the input vector, that is, the encoded characteristic sequence output by the dual-branch encoder. It is the hidden state from the previous moment. and They are the first The weight matrix of each gated unit, It is the first The bias vector of each gated unit This indicates linearization.
[0035] Furthermore, to enhance the model's ability to retain sudden information, this invention introduces an exponential gating mechanism. Traditional forgetting gates employ... Exponential gating is defined as: (17) in These are learnable or fixed hyperparameters. To avoid numerical instability caused by direct exponentiation, they can be equivalently written as: (18) in, For coefficients, It is a numerically stable term.
[0036] The candidate components of the unit are also calculated after layer normalization: (19) in, and Here is the weight matrix for the candidate units. is the bias vector of the candidate unit.
[0037] Formulas (13) to (19) above together describe the single-step computation process of the XLSTM unit. First, the input is fused through linear transformation. and the previous state Next, the transformation results are normalized using formulas (13-15); then, the normalized results are substituted into formulas (16), (18) and (19) respectively to calculate each gate signal. , , and candidate cell state Finally, the unit state is updated using these gating signals. and hidden state .
[0038] Layer normalization reduces internal covariate bias, enabling more stable model training across different batches and operating conditions. Increasing network depth helps extract more complex temporal patterns, but stacking RNN layers often faces vanishing gradients and training difficulties. This invention employs residual connections to alleviate the gradient propagation problem. To build deeper networks to extract more complex temporal patterns, multiple XLSTM layers are often stacked. Residual connections allow information to skip certain layers and propagate directly to the next layer. The principle is that the network layers learn the residuals (i.e., changes) of the input, rather than directly learning the complete output.
[0039] No. The output of the XLSTM layer is The residual connection is implemented as follows: (20) in, For the first The output of an XLSTM network, For the first The input of an XLSTM network, For the first The output of an XLSTM network, To accommodate transformations, layers can be directly added when their dimensions are consistent. Residuals allow information to bypass deep layers, and gradients can flow back more directly during backpropagation, thus allowing for the stacking of more layers to extract multi-scale temporal features.
[0040] To further stabilize training, the residual connection of this invention is often followed by layer normalization and Dropout. The implementation of layer normalization is shown in equations (21) and (22), and the implementation of Dropout is shown in equation (23): (twenty one) (twenty two) (twenty three) After processing by a multi-layered stacked XLSTM network, the output of the XLSTM network is fed into a Transformer network for further processing. The Transformer network introduces a multi-head self-attention mechanism, processing the hidden state based on multiple attention heads to obtain the multi-head self-attention result. The processing procedure of the Transformer network can be found in [link to relevant documentation]. Figure 3 .
[0041] Understandably, the attention mechanism (Transformer) structure of this invention is based on the existing XLSTM foundation, introducing a self-attention mechanism, which is the core of the Transformer. It dynamically updates the representation of each element by calculating the importance (attention weight) of each element in the sequence relative to all other elements. The calculation process involves three vectors: including the query, the key, and the value. (twenty four) in , and They represent The corresponding query vector, key vector, and value vector. , and These represent the corresponding weight matrices. This represents the hidden state output by the XLSTM network at time t.
[0042] Based on this, an attention score calculation mechanism is further introduced, and the calculation formula is as follows: (25) in, This represents the attention mechanism. Represents the query vector. Represents the key vector The device, key vector Dimensions.
[0043] The entire self-attention mechanism can be described as follows: (26) in, This represents the normalization function, which is used to calculate the attention weights.
[0044] To enhance the model's expressive power, this invention employs a multi-head attention mechanism. This mechanism doesn't use a single set of q, k, v to calculate attention; instead, it uses multiple sets (i.e., multiple heads) in parallel. Each head has its own independent weight matrix, allowing it to learn to focus on different aspects of the input sequence. For example, in harmonic error prediction, one head might focus on capturing the relationship between the fundamental amplitude and the phase of higher harmonics, while another head might focus on the long-term trend correlations between different harmonic components. This approach significantly enhances the model's expressive power.
[0045] By computing multiple attention heads in parallel, each head learns independently to capture different aspects of information in the sequence. Finally, the outputs of all heads are concatenated and linearly transformed to obtain the final attention result.
[0046] If there are x attention heads, the dimension of each head in this invention can be represented as: ,in This represents the dimension of the model's hidden layers. For each head, its query, key, and vector are obtained separately. Each head calculates its own attention separately, and then all heads are concatenated and subjected to a linear transformation to obtain the final output. (27) in, This represents the final output of the multi-head attention mechanism. The output of the x-th attention head This represents the output weight matrix.
[0047] The decoder is used to output the error prediction value of the voltage transformer based on the multi-head self-attention result.
[0048] It is understood that the overall structure of the attention mechanism of this invention can be found in [reference needed]. Figure 3 This mainly consists of multiple encoders and decoders stacked together. The encoder reads and understands the entire input sequence, compressing it into a vector (or sequence of vectors) containing contextual information. The decoder then uses this contextual information, combined with the already generated partial output, to generate the elements of the target sequence one by one, predicting the error of the voltage transformer.
[0049] The decoder layer is similar to the encoder layer, but adds a third sub-layer to hide the multi-head self-attention mechanism. This layer's main function is to prevent the decoder from acquiring information from future time steps when generating the output, thus avoiding prediction errors. Like the decoder, each sub-layer is followed by residual connections and layer normalization.
[0050] The feedforward neural network layer consists of only one two-layer fully connected network. This invention uses the ReLU activation function. Since the attention mechanism does not include recurrent or convolutional structures, positional encoding is needed to introduce positional information of the sequence. Because the Transformer network's self-attention mechanism is computed in parallel, it does not inherently contain the order information of elements in the sequence. To allow the model to know the preceding and following positions of elements, this invention adds a positional encoder to the input of the Transformer network. The positional encoder typically generates a fixed vector with the same dimension as the input vector, calculated based on position and dimension index, using sine and cosine functions: (31) (32) in, This represents the position index of the position encoder. This represents the encoded value at position pos and dimension 2g in the positional encoding. This represents the encoded value at position pos and dimension 2g+1 in the positional encoding. This represents the parameters related to the model.
[0051] In the process of training the error prediction model, this invention uses cross-entropy as the main loss function. Furthermore, auxiliary losses (such as reconstruction error or multi-task loss) can be incorporated to enhance feature learning. The combined loss of this invention is defined as follows: (30) in, To determine the mean squared error (MSE) of the reconstructed IMF, and For weight hyperparameters, This is the set of model parameters.
[0052] The optimizer of this invention uses Adam and employs learning rate scheduling. To ensure training stability, a smaller learning rate can be used for warm-up in the early stages of training, with stronger regularization applied, followed by a gradual reduction in the regularization strength to improve the final performance.
[0053] In this embodiment of the invention, the model prediction part is based on an XLSTM-Transformer error prediction model. The XLSTM network enhances the performance of LSTM by introducing an exponential gating mechanism and residual network blocks, while the Transformer network captures global dependencies in the sequence through a self-attention mechanism. The combination of the two can better handle voltage transformer error prediction under the influence of harmonics and improve the prediction accuracy.
[0054] The output of the XLSTM network serves as the input to the Transformer network. Specifically, after the XLSTM network processes the input sequence, its output hidden state sequence becomes the input sequence for the Transformer network. The Transformer then further processes these hidden states using self-attention and multi-head attention mechanisms. In the complete Transformer architecture (see attached...),... Figure 3As shown, the decoder contains a special hidden multi-head self-attention mechanism. Its function is to ensure that when generating the x-th output, the model can only focus on the inputs and already generated outputs up to and including position x, and cannot "see" future information. This is achieved by setting the score for future positions to a very large negative number when calculating the attention score, making the weights after softmax zero, thereby capturing global dependencies in the sequence.
[0055] Combining noise reduction algorithms, this invention proposes an error prediction model based on ANCE-EMD-XLSTM-Transformer, which trains and predicts the acquired voltage sensor data to achieve the prediction of error states.
[0056] The overall process of error prediction for voltage transformers in this invention is as follows: Figure 4 As shown.
[0057] Data acquired by electromagnetic voltage transformers (including the original noisy voltage signals from the transformers) is preprocessed. For data with a harmonic background, an improved adaptive noise ensemble empirical mode decomposition combined with a wavelet denoising algorithm is used to denoise and reconstruct the original signal. A pair of positive and negative white noise is added to the source signal to eliminate residual auxiliary white noise, and the residual value is updated iteratively, effectively improving computational efficiency while reducing reconstruction errors. Through this method, the IMF components and remainder terms of different frequency bands are accurately separated, achieving effective denoising of the noisy signal while preserving the main characteristics of the original sensor data.
[0058] Since the error state data collected from sensors may be affected by various factors, this invention employs correlation analysis, using both Spearman correlation coefficient and maximum mutual information coefficient methods to verify that harmonics have a significant impact on error. Based on this, multi-feature data is input under different harmonic contents for model prediction. The denoised and reconstructed data is then input into the XLSTM-Transformer error prediction model, which is trained by dividing the model into training and validation sets. The XLSTM-Transformer error prediction model includes a dual-branch encoder, an XLSTM network, a Transformer network, and a decoder. The error prediction model further obtains the transformer error state, and the model's error prediction under harmonic backgrounds provides further support for subsequent system design.
[0059] See Figure 5 A voltage transformer error prediction system according to an embodiment of the present invention is provided, comprising: Acquisition module 501 is used to acquire the raw noisy voltage signal and environmental data of the voltage transformer; The signal reconstruction module 502 is used to perform preliminary noise reduction on the original noisy voltage signal by multi-level correlation adaptive threshold wavelet transform based on the improved fully adaptive noise set empirical mode wavelet decomposition algorithm, and to perform deep decomposition and reconstruction on the preliminary noise-reduced signal using ANCE-EMD to obtain the reconstructed signal of the original noisy voltage signal. Prediction module 503 is used to input the reconstructed signal and the environmental data as heterogeneous sequence data into the error prediction model and output the error prediction value. The error prediction model includes a dual-branch encoder, an XLSTM network, a Transformer network, and a decoder. The dual-branch encoder is used to extract the encoded feature sequence of the heterogeneous sequence data; The XLSTM network introduces an exponential gating mechanism and residual connection blocks to output the hidden state of the encoded feature sequence; The Transformer network introduces a multi-head self-attention mechanism, which processes the hidden state based on multiple attention heads to obtain the multi-head self-attention result; The decoder is used to output the error prediction value of the voltage transformer based on the multi-head self-attention result.
[0060] It is understood that the voltage transformer error prediction system provided by the present invention corresponds to the voltage transformer error prediction method provided in the foregoing embodiments. The relevant technical features of the voltage transformer error prediction system can be referred to the relevant technical features of the voltage transformer error prediction method, and will not be repeated here.
[0061] The voltage transformer error prediction method and system provided in this invention have the following advantages: (1) An innovative hybrid signal processing method combining fully adaptive noise set empirical mode decomposition with wavelet threshold denoising is proposed, which can significantly improve the accuracy and robustness of harmonic signal processing under strong electromagnetic interference. Traditional methods such as empirical mode decomposition or wavelet transform generally suffer from problems such as mode aliasing, endpoint effects and noise residue when dealing with harmonic signals in complex power systems, resulting in distortion of the reconstructed signal. This invention adds a pair of positive and negative white noise to the source signal and iteratively calculates the intrinsic mode function components and residuals, which can effectively offset the error introduced by auxiliary noise. At the same time, it combines wavelet soft thresholding technology to refine the denoising of components in different frequency bands. It not only overcomes the limitations of a single algorithm, but also significantly suppresses high-frequency noise and random interference while preserving the key features of the signal. It is particularly suitable for the high-precision measurement requirements of 10kV electromagnetic voltage transformers in harmonic pollution environments. The reconstructed signal has high smoothness and good continuity, and does not introduce obvious distortion, providing high-quality data input for the error prediction model and improving the reliability and practicality of the entire system.
[0062] (2) This invention constructs a hybrid deep learning model integrating XLSTM and Transformer to accurately predict the error change trend of electromagnetic voltage transformers under the influence of harmonics. This model combines the dynamic gating mechanism of XLSTM and the global self-attention mechanism of Transformer, which can capture long-term dependencies in time series and effectively learn the complex nonlinear mapping between harmonic content and error. XLSTM introduces exponential gating and residual connections to enhance gradient flow and numerical stability, while Transformer's multi-head self-attention mechanism significantly improves the model's ability to perceive key features in the sequence and assign weights. This design enables the model to better adapt to multivariate and multi-scale input data during training and achieve high-precision prediction of error states. In addition, the model supports comparative experiments with other traditional networks, allowing for flexible algorithm selection and visualization analysis.
[0063] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0064] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0065] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0066] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0067] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0068] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0069] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for predicting errors in voltage transformers, characterized in that, include: Step 1: Collect the raw noisy voltage signal and environmental data of the voltage transformer; Step 2: Based on the improved fully adaptive noise set empirical mode wavelet decomposition algorithm, the original noisy voltage signal is initially denoised by multi-level correlation adaptive threshold wavelet transform. Then, the signal after initial denoising is deeply decomposed and reconstructed using ANCE-EMD to obtain the reconstructed signal of the original noisy voltage signal. Step 3: Input the reconstructed signal and the environmental data as heterogeneous sequence data into the error prediction model, and output the error prediction value; The error prediction model includes a dual-branch encoder, an XLSTM network, a Transformer network, and a decoder. The dual-branch encoder is used to extract the encoded feature sequence of the heterogeneous sequence data; The XLSTM network introduces an exponential gating mechanism and residual connection blocks to output the hidden state of the encoded feature sequence; The Transformer network introduces a multi-head self-attention mechanism, which processes the hidden state based on multiple attention heads to obtain the multi-head self-attention result; The decoder is used to output the error prediction value of the voltage transformer based on the multi-head self-attention result.
2. The voltage transformer error prediction method according to claim 1, characterized in that, Step 2, based on the improved fully adaptive noise set empirical mode wavelet decomposition algorithm, performs preliminary noise reduction on the original noisy voltage signal through multi-level correlation adaptive threshold wavelet transform, including: The original noisy voltage signal is to conduct Wavelet decomposition of layers yields detail coefficients for each layer. And the approximation coefficient at the lowest level , It refers to the k-th detail coefficient of the j-th layer. This refers to the k approximation coefficients of the J-th layer; Calculate the detail factor for each layer With the next level of detail coefficient Correlation coefficients of cross-correlation factors over time : ; in, This represents the number of detail coefficients in the j-th layer; Calculate the general threshold for each layer ,in, It is the standard deviation estimate of the noise in the j-th layer. Construct an adaptive threshold : ; in, It is a moderating factor used to control the strength of the correlation's moderating effect on the threshold; For each layer of detail coefficients Quantization is performed using an adaptive threshold as follows: ; Quantized detail coefficients and unprocessed approximation coefficients Perform inverse wavelet transform to obtain the signal after preliminary noise reduction. .
3. The voltage transformer error prediction method according to claim 1 or 2, characterized in that, In step S2, the signal after preliminary noise reduction is decomposed and reconstructed using ANCE-EMD to obtain the reconstructed signal, including: The voltage transformer signal after initial wavelet denoising is: Extract the first IMF component, for , generating signal Secondary implementation ,in It is standard Gaussian white noise. It is the initial noise amplitude coefficient; Basic EMD decomposition Each obtains its first mode. Then, its first IMF is calculated as follows: ; Calculate the first residual component: ; Then extract the second IMF component, for To generate a new signal: ,in This represents the k-th mode obtained after EMD decomposition of the signal, and its second IMF is calculated as follows: ; Calculate the second residual component: ; Repeating the above process for the k-th IMF component yields: ; ; The iteration continues until the residual component becomes a monotonic function or the magnitude of the residual component falls below a preset threshold, making it impossible to decompose into a new IMF. The final residual component is denoted as... ; Voltage transformer signal after initial noise reduction Decomposed into: ; Calculate each IMF component and the signal after wavelet initial noise reduction. Pearson correlation coefficient : ; Set correlation threshold ,like but Noise components are removed; if but The main components are signal components, which are preserved. Post-structural fault signals It is obtained by adding all the retained IMF components and residual components of the signal: 。 4. The voltage transformer error prediction method according to claim 1, characterized in that, The dual-branch encoder is used to extract the encoded feature sequence of the heterogeneous sequence data, including: The dual-branch encoder assigns an independent lightweight coding network as a branch channel for each type of physical quantity in the heterogeneous sequence data, performs separate feature extraction and normalization for each type of physical quantity, and then concatenates the extracted features and feeds them into the XLSTM network. Wherein, let the original multi-channel input be , Represents the Mth type of physical quantity, each branch channel Corresponding encoding function The local coding features of each type of physical quantity are obtained: ; By concatenating the local coding features of all branch channels, a coding feature sequence is obtained: ; in, This is the branch channel weight vector. For the number of branch channels, then It is fed into an improved XLSTM for time-domain modeling.
5. The voltage transformer error prediction method according to claim 4, characterized in that, The XLSTM network, by introducing an exponential gating mechanism and residual connection blocks, outputs the hidden state of the encoded feature sequence, including: In XLSTM networks, each gate signal is calculated based on an exponential gating mechanism. , and candidate cell state ,in: ; ; ; Among them, It is the input vector, that is, the encoded characteristic sequence output by the dual-branch encoder. It is the hidden state from the previous moment. and They are the first The weight matrix of each gated unit, It is the first The bias vector of each gated unit Indicates linearization, For coefficients, For numerically stable terms, and Here is the weight matrix for the candidate units. The bias vector for the candidate unit; Based on each gate signal , and candidate cell state Update candidate cell state and the hidden state of each gate unit ; For multiple stacked XLSTM network layers, a residual connection block, layer normalization, and Dropout are added after each XLSTM network layer. The layer number is... The output of the XLSTM layer is The residual connector block is implemented as follows:
6. Among them, For the first The output of an XLSTM network, For the first The input of an XLSTM network, For the first The output of an XLSTM network, To adapt to the transformation; Layer normalization is implemented as follows: ; ; Dropout is implemented as follows: ; in, The hidden state of the outputs of multiple stacked XLSTM networks.
7. The voltage transformer error prediction method according to claim 1, characterized in that, The Transformer network introduces a multi-head self-attention mechanism, processing the hidden state output by the XLSTM network based on multiple attention heads to obtain the multi-head self-attention result, including: Based on the hidden state output by the XLSTM network, the corresponding query vector, key vector, and value vector are calculated respectively: ; in , and They represent The corresponding query vector, key vector, and value vector. , and These represent the corresponding weight matrices. This represents the hidden state output by the XLSTM network at time t; Calculate attention score: ; in, This represents the attention mechanism. Represents the query vector. Represents the key vector The device, key vector The dimension; The results of a self-attention mechanism for a self-attention head are as follows: ; in, This represents the normalization function, which is used to calculate the attention weights; Based on the self-attention mechanism results of each self-attention head, the self-attention mechanism results of multiple self-attention heads are concatenated and a linear transformation is applied to obtain the multi-head self-attention result: ; in, This represents the final output of the multi-head attention mechanism. This represents the output of the x-th attention head. This represents the output weight matrix.
8. The voltage transformer error prediction method according to claim 6, characterized in that, A position encoder is added to the input of the Transformer network. The calculation formula for the position encoder is as follows: ; ; in, This represents the position index of the position encoder. This represents the encoded value at position pos and dimension 2g in the positional encoding. This represents the encoded value at position pos and dimension 2g+1 in the positional encoding. Indicates the relevant parameters of the model; The Transformer network processes the encoded values obtained from the position encoder.
9. The voltage transformer error prediction method according to claim 1, characterized in that, When training the error prediction model, a primary loss function is defined. and auxiliary loss function Form a combined loss function, the main loss function For cross-entropy loss, the auxiliary loss function To reconstruct the error loss, the combined loss function is expressed as: ; in, To determine the mean squared error (MSE) of the reconstructed IMF, and For weight hyperparameters, This is the set of model parameters.
10. A voltage transformer error prediction system, characterized in that, include: The acquisition module is used to acquire the raw noisy voltage signal and environmental data of the voltage transformer; The signal reconstruction module is used to perform preliminary noise reduction on the original noisy voltage signal by multi-level correlation adaptive threshold wavelet transform based on the improved fully adaptive noise set empirical mode wavelet decomposition algorithm, and then use ANCE-EMD to perform deep decomposition and reconstruction on the preliminary noise-reduced signal to obtain the reconstructed signal of the original noisy voltage signal. The prediction module is used to input the reconstructed signal and the environmental data as heterogeneous sequence data into the error prediction model and output the error prediction value. The error prediction model includes a dual-branch encoder, an XLSTM network, a Transformer network, and a decoder. The dual-branch encoder is used to extract the encoded feature sequence of the heterogeneous sequence data; The XLSTM network introduces an exponential gating mechanism and residual connection blocks to output the hidden state of the encoded feature sequence; The Transformer network introduces a multi-head self-attention mechanism, which processes the hidden state based on multiple attention heads to obtain the multi-head self-attention result; The decoder is used to output the error prediction value of the voltage transformer based on the multi-head self-attention result.