Mutual inductor measurement error interval prediction method based on mixed deep learning model and Bootstrap method

Through the transformer measurement error interval prediction method based on the hybrid deep learning model and the Bootstrap method, the problem of degradation of voltage transformer measurement stability is solved, and error prediction with high accuracy and high confidence is achieved, reducing verification costs and grid operation risks.

CN119903340AActive Publication Date: 2025-04-29CHINA THREE GORGES UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411905485.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-29
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

The measurement stability of voltage transformers in smart grids is affected by industrial environmental factors and equipment aging, resulting in reduced measurement accuracy and increased operating risks. The existing verification methods are complex and costly.

Method used

The transformer measurement error interval prediction method based on the hybrid deep learning model and the Bootstrap method is adopted. The signal is decomposed by ICEEMDAN, the improved TCN and BiGRU models are extracted, and the multi-head attention mechanism and the fully connected network are processed. The Bootstrap method is used for statistical inference to generate the error distribution interval at a high confidence level.

Benefits of technology

It improves the certainty and accuracy of predictions, reduces the complexity and cost of verification, enhances the reliability and trade fairness of power grid operation, identify potential faults early, and reduces safety hazards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903340A_ABST
    Figure CN119903340A_ABST
Patent Text Reader

Abstract

The invention discloses a mutual inductor measurement error interval prediction method based on a hybrid deep learning model and a Bootstrap method, and the method comprises the steps: collecting the operation measurement error data of a voltage transformer, constructing a data set, and carrying out the ICEEMDAN to obtain a decomposition signal; carrying out feature extraction on the decomposed signal obtained in the improved TCN pair, and outputting extracted feature information yTCN; performing dependency relationship processing on the feature information yTCN obtained in the BiGRU pair, and outputting a comprehensive feature yBi; inputting the output comprehensive feature yBi into a multi-head attention mechanism network, carrying out feature processing, enabling the processed data to pass through a full-connection network, and obtaining a final output yout; and calculating according to the final output yout to obtain a prediction error yFin, carrying out statistical inference on the prediction error yFin based on an improved Bootstrap method to obtain an error distribution interval under a given confidence level, and generating an interval prediction result. According to the method, the characteristics in the operation data of the mutual inductor can be extracted more accurately, and the accuracy of ratio error prediction is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of voltage transformer error prediction, and in particular to a method for predicting a transformer measurement error interval based on a hybrid deep learning model and a Bootstrap method. Background Art

[0002] In the measurement and protection system of smart grid, voltage transformers, as basic measurement equipment in power systems, ensure real-time monitoring and control of power systems. Their measurement accuracy not only affects the safe and reliable operation of power grids, but also has a direct impact on trade fairness. However, the measurement stability of voltage transformers is easily affected by a variety of industrial environmental factors. The aging effect caused by long-term operation of the equipment will gradually weaken the measurement performance of the transformer, resulting in a decrease in measurement stability, affecting the accuracy of power metering and increasing the operation risk of the power system.

[0003] According to current standards, measuring instruments need to be calibrated regularly to ensure that their measurement performance meets the requirements of the specifications. However, the power outage verification method requires the equipment to be out of operation and the relevant lines to be powered off. Although this verification method can provide high-precision test results, it is complex to operate, has high time and labor costs, and interferes with the normal operation of the power grid. Although online verification technology does not require power outages, it is usually only applicable to short-term monitoring in high-voltage environments, resulting in a "blank" state of monitoring between two verifications.

[0004] In recent years, neural networks, as a powerful nonlinear modeling tool, have been widely used in time series prediction, signal processing, and fault detection. In smart grids, neural network-based models can effectively predict the future state of equipment by analyzing historical operating data, and then promptly discover potential problems to improve the reliability of grid operation. However, although neural networks have demonstrated powerful predictive capabilities to a certain extent, they have certain requirements for data quality, which makes them significantly limited in processing nonlinear and non-stationary signals.

[0005] First, a single neural network model often has difficulty in balancing the depth and accuracy of feature extraction when dealing with nonlinear and random signals. The transformer operates in a complex industrial environment, and its ratio difference data usually has significant non-stationarity and randomness, making it difficult for a single model to fully capture the data characteristics. Secondly, the single neural network model is not robust enough to noise interference and data anomalies, further weakening the applicability and reliability of the model. Therefore, there is an urgent need for a reliable method to model and predict the future operating status of the transformer to improve measurement accuracy and operational stability. Summary of the invention

[0006] The present invention provides a method for predicting a mutual inductor measurement error interval based on a hybrid deep learning model and a Bootstrap method, which effectively improves the certainty of the prediction.

[0007] The technical solution adopted by the present invention is:

[0008] The method for predicting the measurement error interval of a transformer based on a hybrid deep learning model and a Bootstrap method includes the following steps:

[0009] Step 1: Collect the operating measurement error data of the voltage transformer, construct a data set, and perform adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) to obtain the decomposed signal;

[0010] Step 2: Use the improved bidirectional gated recurrent unit (TCN) to extract features from the decomposed signal obtained in step 1 and output the extracted feature information y TCN ;

[0011] Step 3: Use the bidirectional gated recurrent unit (BiGRU) to perform the feature information y obtained in step 2 TCN Process the dependency relationship and output the comprehensive feature y Bi ;

[0012] Step 4: The comprehensive feature y output in step 3 Bi Input to the multi-head attention mechanism network for feature processing, and the processed data passes through the fully connected network to obtain the final output y out ;

[0013] Step 5: According to the final output y out Calculate the prediction error y Fin , based on the improved Bootstrap method, the prediction error y Fin Perform statistical inference to obtain the error distribution interval at a given confidence level and generate interval prediction results.

[0014] In the step 1, the measurement error data refers to the ratio difference data of the mutual inductor.

[0015] In step 1, the constructed data set refers to the running difference data after collection. In step 1, the adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) includes the following specific steps: Step 1.1: With the white noise sequence w j Combine and construct new sequences The formula is as follows:

[0016]

[0017] In the formula, is the original signal, i.e. the difference data after acquisition; is the first-order modal component of the j groups of white noise added to the original signal after EMD decomposition; α 0 is the noise intensity adjustment coefficient; is the new sequence constructed after adding noise.

[0018] Step 1.2: For the newly constructed sequence Apply the EMD algorithm to calculate the local mean and get the first set of residuals R 1 :

[0019]

[0020] In the formula, Indicates that the EMD algorithm is applied to the sequence to calculate the sequence The local mean of .

[0021] In step 1.2 above, the process of using the EMD algorithm to calculate the local mean is as follows:

[0022] 1) Calculate the new construction sequence All the maximum and minimum values ​​constitute the maximum value set X max and the minimum value set X min ;

[0023] 2) For the maximum value set X max and the minimum value set X min Use the spline function to interpolate and get The upper and lower envelopes x max (t), x min (t); The spline function is a common mathematical method that smoothly interpolates data points through piecewise low-order polynomials to ensure smooth transition of the interpolation curve between data points;

[0024] 3) Calculate the upper and lower envelope x max (t), x min The local mean of (t), that is, Step 1.3: Subtract the first set of residuals from the original signal to obtain the first mode function, denoted as I IMF1 :

[0025]

[0026] In the formula, Represents the collected difference data, that is, the original signal.

[0027] At this point, the first mode function has been extracted from the original signal, representing a part of the independent components in the signal.

[0028] Step 1.4: Iteratively calculate the residuals and modal components:

[0029] Each time a group of white noise is added to the residual signal, and the EMD algorithm is applied to calculate the new residual and modal components, and the various modal components in the signal are gradually extracted; the formula is as follows:

[0030]

[0031] In the formula, R i The i-th group of residuals for this decomposition represents the signal part after removing the extracted modal components; R i-1 represents the i-1th group of residuals in this decomposition; α i-1 represents the noise intensity adjustment coefficient of the i-1th group; This is the i-th modal component of this decomposition; is the i-th order modal component after EMD decomposition of the j-group white noise added to the original signal; R i-1 Represents the residual obtained in round i-1.

[0032] Noise intensity adjustment coefficient α during decomposition i It is used to control the proportion of white noise added, which depends on the characteristics of the signal and is expressed as:

[0033]

[0034] In the formula, ε 0 E is the inverse of the signal-to-noise ratio between the first added noise and the analyzed signal; 1 (w j ) represents the first modal component extracted from the jth noise added; std(E 1 (w j )) represents E 1 (w j )’s standard deviation; represents the original signal; m is the total number of decompositions; λ represents the type of signal used to calculate the noise intensity; std(λ) represents the standard deviation of λ; when λ=R i When the noise intensity adjustment coefficient α i is directly related to the standard deviation of the residual signal of the i-th group.

[0035] Step 1.5: Finally, the complete decomposition result is obtained:

[0036]

[0037] In the formula, r represents the residual term, which means the final remaining part that cannot be decomposed during the decomposition process.

[0038] IMF i Represents the subcomponents obtained after decomposition; represents the original signal; m is the total number of decompositions.

[0039] In step 2, the improved time domain convolutional network unit (TCN) extracts features from the decomposed signal obtained in step 1, and the steps are as follows:

[0040] Step 2.1: The improved temporal convolutional network unit (TCN) receives the IMF in step 2 i As input, let x (i) =IMF i , and its calculation formula is as follows:

[0041]

[0042] In the formula, is the convolution output at the current time s; x represents the input time series; f d represents the weight of the convolution kernel; k e is the size of the convolution kernel; d is the dilation coefficient; sd·i t is the sequence corresponding to the elements in the convolution kernel; f(i t ) is the i-th convolution kernel t Weights; i t is the index, i t ∈(0,1,…,k e -1); s is the current time.

[0043] Step 2.2: TCN avoids gradient vanishing or gradient exploding by introducing residual connections. The calculation formula is as follows:

[0044] o (i) =ReLU(x (i) +F(x (i) ));

[0045] In the formula, o (i) represents the output of the residual block; F(x (i) ) represents the output of the convolution operation; ReLU represents the rectified linear unit activation function; x (i) represents the i-th input signal of x.

[0046] Step 2.3: In order to take into account the extraction of both short-term and long-term dependencies, the TCN is changed to a dual-path structure, and two TCNs with different receptive fields are used to extract features from the input sequence simultaneously, ensuring that both focus on features of different time scales. The short-term dependency path selects a smaller dilation factor and fewer convolutional layers, resulting in a smaller receptive field; the long-term dependency path selects a larger dilation factor and deeper convolutional layers, resulting in a larger receptive field;

[0047] The outputs of the two TCN paths are fused by splicing. The calculation formula of the dual-path structure dilated convolution is as follows:

[0048]

[0049] In the formula, f short (i t ) and f long (i t ) represent the i-th path of the short-term path and the long-term path respectively. t weights; is the feature extraction result of the short-term path; is the feature extraction result of the long-term path; d short is the expansion factor of the short-term path; d long is the expansion factor of the long-term path; k e is the size of the convolution kernel; s is the current moment; i t Represents the index of the element in the convolution kernel.

[0050] Step 2.4: Concatenate the final output of the TCN for short-term and long-term dependencies, and the calculation formula is as follows:

[0051]

[0052] In the formula, F short (x (i) ) represents the output of the short-term path; F long (x (i) ) represents the output of the long-term path; It is the operation after concatenation; Concat represents the concatenation operation, which combines the two outputs together along the feature dimension.

[0053] In step 3, the processing of the bidirectional gated recurrent unit (BiGRU) dependency is as follows:

[0054] Step 3.1: BiGRU contains two GRU layers, forward and reverse, which process the input signal in the forward and reverse order of time respectively. The calculation formula is as follows:

[0055]

[0056] In the formula, is the input data of the ith IMF at time step t. is the hidden state of the ith IMF at time step t-1; To update the gate vector, control the degree of updating of the hidden state; To reset the gate vector, which controls how new inputs and previous hidden states are combined; is a candidate hidden state, a temporary state generated based on the current input and the previous hidden state; is the forward hidden state of the ith IMF at time step t; W z , W r , W h Corresponding to The weight matrix of z , U r , U h Corresponding to The weight matrix from hidden state to hidden layer; b z 、b r 、b h Corresponding to The bias vector of ; σ represents the Sigmoid activation function; tanh represents the hyperbolic tangent activation function; ⊙ represents the Hadamard product.

[0057] Step 3.2: Sequence Flip and get Get As a new input, repeat step 3.1 to generate the reverse hidden state

[0058] Step 3.3: Concatenate the forward and reverse hidden states, then the output of BiGRU is:

[0059]

[0060] In the formula, is the BiGRU output of the ith IMF at time step t, obtained by concatenating the forward and reverse hidden states; [;] is the vector concatenation operation, which concatenates two vectors column by column into a longer vector.

[0061] In step 4, the feature processing of the multi-head attention mechanism network includes the following steps:

[0062] Step 4.1: Transform the Bi-GRU output matrix H (i) Mapping to query, key and value:

[0063] Q=H (i) W Q

[0064] K=H (i) W K

[0065] V=H (i) W V

[0066] In the formula, H (i) is the output matrix of the Bi-GRU of the ith IMF; Q, K, V are the query matrix, key matrix, and value matrix; W Q ,W K ,WV is the weight matrix mapping to query, key and value.

[0067] Step 4.2: Split the query, key, and value into H heads, and each head performs independent attention calculation.

[0068] Q h =Split(Q,H),K h =Split(K,H),V h =Split(V,H)

[0069] In the formula, Q h ,K h ,V h are the query, key, and value matrices of the hth attention head; H is the total number of attention heads; Split(Q,H) means splitting the query matrix Q into H sub-matrices according to the number of attention heads H, and providing a query matrix for each attention head; Split(K,H) means splitting the key matrix K into H sub-matrices according to the number of attention heads H, and providing a key matrix for each attention head; Split(V,H) means splitting the value matrix V into H sub-matrices according to the number of attention heads H, and providing a value matrix for each attention head.

[0070] Step 4.3: Attention score calculation:

[0071]

[0072] In the formula, scores h is the score matrix of the hth attention head, indicating the similarity between the query and the key; is the matrix product, calculating the dot product similarity between the query and the key; is a scaling factor to prevent the dot product value from being too large.

[0073] Step 4.4: Attention weight calculation:

[0074] α h =Softmax(scores h )

[0075] In the formula, α h The weight matrix of the h-th attention head represents the weighted coefficient on the value; the role of the Softmax function is to convert the score into a probability distribution.

[0076] Step 4.5: Weighted sum values ​​and concatenate with output map:

[0077]

[0078] In the formula, is the output matrix of the hth attention head; Concat is used to concatenate the outputs of all heads according to the feature dimension; W O is the weight matrix of the output mapping; V h Represents the value matrix of the h-th attention head; represents the weighted output of the h-th attention head; Represents the output matrix of each attention head, which represents the weighted result after each head is calculated independently.

[0079] In step 4, the calculation formula of the fully connected network is as follows:

[0080]

[0081] In the formula, y pred [t] represents the predicted value at time step t; is the feature vector of the attention output matrix at time step t; W fc-out is the weight matrix of the fully connected layer; b fc-out Represents the bias vector of the fully connected layer. At this time, an IMF prediction value is obtained; T q Represents the total number of time steps, that is, the length of the time series.

[0082] According to the different sub-component IMFs obtained in step 1.5 i As input, repeat steps 2 and 3 to obtain different IMFs. i Therefore, the final prediction value calculation formula is:

[0083]

[0084] Where m is still the total number of decompositions in step 1; y out is the final prediction result of the output; y i pred is the predicted value of the ith IMF component.

[0085] In step 5, the calculation formula of the prediction error is as follows:

[0086]

[0087] In the formula, y Fin is the prediction residual; is the original sequence.

[0088] In step 5, the Bootstrap method is to Fin Perform multiple resampling to statistically infer the overall distribution characteristics, and change the sampling with replacement to time series sampling. Let the original sample be y Fin ={y 1 ,y 2,…,y n}, n is the length of the sample. The step 5 specifically comprises the following steps:

[0089] Step 5.1: Calculate the prediction residual sample y Fin The autocorrelation function (ACF) of A The autocorrelation coefficient under ACF(k A ) The calculation formula is defined as:

[0090]

[0091] In the formula, is the sequence y Fin The mean of k A is the hysteresis value; t i is the index; ACF(k A ) represents the autocorrelation function at lag k A The autocorrelation coefficient under the step is used to measure the correlation between each moment in the time series; Represents the sequence y Fin In t i The residual value of It represents the sequence y Fin At time step t i +k A The residual value of ; n represents the total length of the sequence, that is, the total number of samples in step 5.

[0092] Step 5.2: Determine the block length l:

[0093] l=min{k A :|ACF(k A )|<τ}

[0094] Where τ is a preset threshold. A )| is less than the threshold τ, it is considered that the dependence of the sequence at this lag is not significant.

[0095] Step 5.3: Set y Fin Divide into blocks of length l, then the divided y Fin It consists of different blocks:

[0096] y Fin ={A 1 ,A 2 ,…,A n / l}

[0097] In the formula, A is the name of the segmented block; n / l is the number of blocks that need to be spliced ​​to ensure that the sample length is the same as the original sequence. 1 ,A 2 ,…,A n / lis the segmented sequence block, each block contains a subsequence of length l.

[0098] Step 5.4: Randomly draw samples with replacement from all blocks, and obtain a new sample set C in each round of random drawing with replacement. Repeat K rounds to obtain K sample sets, and the sample selection of the time series sampling method is completed.

[0099] Step 5.5: For each Bootstrap sample C k , calculate the statistic: mean and variance; the overall mean of the K sample sets The calculation formula is as follows:

[0100]

[0101] Overall sample variance The calculation formula is as follows:

[0102]

[0103] In the formula, represents the mean of the kth Bootstrap sample, k = 1, 2, ..., K; represents the overall mean; Represents the variance estimate of the population mean; K is the number of repeated rounds, that is, the total number of sample sets.

[0104] Step 5.6: Based on the sample distribution characteristics and the critical value of the standard normal distribution Construct the upper and lower limits U and L of the prediction interval:

[0105]

[0106] In the formula, represents the mean of the series; According to the confidence level, the confidence level of the present invention is μ=99%, that is, α=0.01. Step 5.7: Repeat the above steps multiple times to generate a large number of Bootstrap samples. The details are as follows:

[0107] By repeatedly randomly extracting multiple samples from the block, a prediction interval is calculated for each sample set through steps 5.5 and 5.6. For each sample set's prediction interval (L, U), check whether the true population mean falls within this interval. If it falls within the interval, it is considered that the model's prediction is relatively accurate. Finally, count how many of the prediction intervals of the K sample sets contain the true mean.

[0108] Step 5.8: Calculate the ratio of successful coverage times to total times to get the coverage rate. Verify the matching degree between the prediction interval and the true value, and generate the final prediction interval. The evaluation index of the prediction interval is expressed by the following formula:

[0109]

[0110] In the formula, CR represents coverage, that is, the proportion of the predicted interval covering the true value. The higher the value, the more reliable the predicted interval; AIW represents the average interval width. The smaller the width, the more accurate the predicted interval; L i and U i are the lower and upper bounds of the i-th prediction interval respectively; y i represents the i-th residual value; n is the total number of samples in step 5; Represents an indicator function, which is 1 if the condition is met, otherwise it is 0.

[0111] It also includes step 6: In order to further improve the coverage or compactness of the prediction interval, a dynamic optimization method based on the skewness coefficient is proposed to improve the quantile adjustment strategy, thereby improving the adaptability and accuracy of the prediction interval.

[0112] The skewness coefficient of the residual is calculated as follows:

[0113]

[0114] In the formula, S s Represents the skewness coefficient; skewness S s > indicates right deviation; S s <0 means left deviation; S s =0 indicates symmetrical distribution; y i represents the i-th residual value; represents the mean of the residuals; n is the total number of samples in step 5.

[0115] Step 7: According to the calculated skewness results, dynamically adjust the upper and lower bounds of the prediction interval: for right-skewed distribution, appropriately reduce the lower bound quantile and expand the upper bound quantile; for left-skewed distribution, appropriately expand the lower bound quantile and reduce the upper bound quantile; for symmetric distribution, keep the quantile at the standard value. The formula is as follows:

[0116]

[0117]

[0118] Where, L Q Represents the lower quantile of the adjusted prediction interval; U Q represents the upper quantile of the adjusted prediction interval; μ represents the confidence level.

[0119] The present invention provides a method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method, and the technical effects are as follows:

[0120] 1) The improved time domain convolutional network (TCN) of the present invention adopts a dual-path structure to extract features for short-term dependencies and long-term dependencies respectively, ensuring that the model can capture important information in the transformer operation signal at different time scales, thereby significantly enhancing the feature extraction capability of complex signals. And through the bidirectional gated recurrent unit and multi-head attention mechanism, it can more accurately extract the features in the transformer operation data, significantly improving the accuracy of the ratio difference prediction.

[0121] 2) The present invention pre-processes the sequence through the adaptive noise complete ensemble empirical mode decomposition ICEEMDAN, decomposing the complex signal into intrinsic mode components with different frequency amplitude variations, thereby enhancing the model's ability to understand complex sequences and improving the model's generalization performance and prediction accuracy.

[0122] 3) The present invention uses the Bootstrap method to perform interval prediction, and the improved time series sampling technology maintains the time dependence of the data in the sample set, thereby improving the robustness and adaptability of the interval prediction.

[0123] 4) This paper proposes a method for dynamically adjusting quantiles based on the skewness coefficient, which can optimize the prediction interval according to the data distribution characteristics (right skewness, left skewness or symmetrical distribution), improve the coverage while maintaining a smaller interval width. Through the dynamic optimization strategy, the limitations of traditional static methods under complex data distribution are effectively avoided, and both prediction performance and interval compactness are taken into account.

[0124] 5) The method proposed in the present invention provides a point prediction and interval prediction method for the future moment of a voltage transformer, which can generate a prediction interval with a high confidence level (such as 98%). Effective statistical inference is performed on the distribution range of measurement errors, providing data support for online monitoring and risk assessment, reducing the operational complexity and economic costs caused by power outage verification, and providing technical support for real-time monitoring and trade fairness of smart grids. At the same time, it can also help to achieve early identification of potential faults and reduce safety hazards caused by equipment degradation.

[0125] 6) In step 6 and step 7 of the present invention, it is proposed to adjust the prediction interval quantile by the skewness coefficient, dynamically optimize the data with complex distribution characteristics, overcome the limitations of traditional static methods, take into account the coverage and compactness of the prediction interval, and reduce width redundancy. According to different distribution characteristics (right-skewed, left-skewed or symmetric distribution), a data-driven dynamic adjustment strategy is designed to effectively improve the robustness and generalization ability of interval modeling. The above-mentioned improved method can effectively adapt to complex data distribution, improve the applicability of prediction intervals, and provide an efficient and flexible solution for interval optimization in machine learning and uncertainty quantification scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0126] Figure 1 Schematic diagram of the temporal convolutional network TCN structure.

[0127] Figure 2 Schematic diagram of the improved temporal convolutional network TCN structure.

[0128] Figure 3 This is the overall architecture diagram of the model.

[0129] Figure 4 This is the decomposition effect diagram of ICEEMDAN.

[0130] Figure 5 For the improved temporal convolutional network TCN-BIGRU-MHA Figure 4 The predicted effect diagram of the decomposition amount.

[0131] Figure 6 Comparison chart of the final prediction results of TCN-BIGRU-MHA, improved TCN-BIGRU-MHA, and ICEEMDAN-improved TCN-BIGRU-MHA.

[0132] Figure 7 Comparison chart of prediction intervals before and after improvement (98% confidence level). DETAILED DESCRIPTION

[0133] The voltage transformer measurement error interval prediction method based on hybrid deep learning and Bootstrap method provides technical guarantee for real-time monitoring and trade fairness of smart grid. First, the collected voltage transformer ratio difference data is decomposed into different intrinsic mode components using adaptive noise complete set empirical mode decomposition (ICEEMDAN), and the residual is eliminated, which significantly reduces the interference of non-stationary signals on modeling. Then, a deep learning model based on an improved dual-path time domain convolutional network and a bidirectional gated recurrent unit is constructed to enhance the ability to capture short-term and long-term time dependencies and nonlinear features of the input signal. In addition, the multi-head attention mechanism (MHA) is introduced to optimize the feature weight distribution, further improving the prediction accuracy of the model. In order to quantify the uncertainty of the prediction results, the present invention adopts an improved Bootstrap method of time series sampling, maintains the dependency of the time series, and characterizes the distribution characteristics of the measurement error by generating a prediction interval adjusted by skewness at a high confidence level. It provides a new technical solution for the operating state of the voltage transformer, with high accuracy and generalization performance, and provides reliable data support for the safe operation and precise operation and maintenance of smart grid equipment.

[0134] The method for predicting the measurement error interval of a transformer based on a hybrid deep learning model and a Bootstrap method includes the following steps:

[0135] Step 1: Collect the operating measurement error data of the voltage transformer, construct a data set, and perform adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) to obtain the decomposed signal;

[0136] Step 2: Use the improved bidirectional gated recurrent unit (TCN) to extract features from the decomposed signal obtained in step 1 and output the extracted feature information y TCN ;

[0137] Step 3: Use the bidirectional gated recurrent unit (BiGRU) to perform the feature information y obtained in step 2 TCN Process the dependency relationship and output the comprehensive feature y Bi ;

[0138] Step 4: The comprehensive feature y output in step 3 Bi Input to the multi-head attention mechanism network for feature processing, and the processed data passes through the fully connected network to obtain the final output y out ;

[0139] Step 5: According to the final output y out Calculate the prediction error y Fin , based on the improved Bootstrap method, the prediction error y FinPerform statistical inference to obtain the error distribution interval at a given confidence level and generate interval prediction results.

[0140] In the step 1, the measurement error data refers to the ratio difference data of the mutual inductor.

[0141] In step 1, the constructed data set refers to the running difference data after collection. In the step 1, the adaptive noise complete set empirical mode decomposition (ICEEMDAN) significantly improves the frequency aliasing and mode mixing problems of traditional empirical mode decomposition (EMD) in signal processing by introducing an adaptive white noise mechanism. The EMD method has been widely used in the analysis of nonlinear and non-stationary signals because it adaptively decomposes the local characteristics of the signal. However, the traditional EMD method is easily affected by noise, resulting in the mixing of modal components, thereby affecting the accuracy and effectiveness of the decomposition. ICEEMDAN introduces a white noise sequence and dynamically adjusts the noise intensity during the decomposition process, thereby improving the stability and reliability of the decomposition. It does not require an iterative decomposition strategy with a preset basis function, which makes this method more advantageous in processing complex nonlinear signals. It includes the following specific steps:

[0142] Step 1.1: Collect the difference data With the white noise sequence w j Combine and construct new sequences The formula is as follows:

[0143]

[0144] In the formula, is the original signal, i.e. the difference data after acquisition; is the first-order modal component of the j groups of white noise added to the original signal after EMD decomposition; α 0 is the noise intensity adjustment coefficient; A new sequence constructed after adding noise. By introducing a white noise sequence, each modal component in the signal can be extracted more independently. Through multiple iterative decompositions, the effect of noise is gradually eliminated, thus ensuring the stability and accuracy of each decomposition.

[0145] Step 1.2: For the newly constructed sequence Apply the EMD algorithm to calculate the local mean and get the first set of residuals R 1 :

[0146]

[0147] In the formula, Indicates that the EMD algorithm is applied to the sequence to calculate the sequence The local mean of .

[0148] In step 1.2 above, the process of using the EMD algorithm to calculate the local mean is as follows:

[0149] 1) Calculate the new construction sequence All the maximum and minimum values ​​constitute the maximum value set X max and the minimum value set X min ;

[0150] 2) For the maximum value set X max and the minimum value set X min Use the spline function to interpolate and get The upper and lower envelopes of x max (t), x min (t); The spline function is a common mathematical method that smoothly interpolates data points through piecewise low-order polynomials to ensure smooth transition of the interpolation curve between data points;

[0151] 3) Calculate the upper and lower envelope x max (t), x min The local mean of (t), that is, Step 1.3: Subtract the first set of residuals from the original signal to obtain the first mode function, denoted as

[0152]

[0153] In the formula, Represents the collected difference data, that is, the original signal.

[0154] At this point, the first mode function has been extracted from the original signal, representing a part of the independent components in the signal.

[0155] Step 1.4: Iteratively calculate the residuals and modal components:

[0156] Each time a group of white noise is added to the residual signal, and the EMD algorithm is applied to calculate the new residual and modal components, and the various modal components in the signal are gradually extracted; the formula is as follows:

[0157]

[0158] In the formula, R i The i-th group of residuals for this decomposition represents the signal part after removing the extracted modal components; R i-1 represents the i-1th group of residuals in this decomposition; α i-1 represents the noise intensity adjustment coefficient of the i-1th group; This is the i-th modal component of this decomposition; is the i-th order modal component after EMD decomposition of the j-group white noise added to the original signal; Ri-1 Represents the residual obtained in round i-1.

[0159] Noise intensity adjustment coefficient α during decomposition i It is used to control the proportion of white noise added, which depends on the characteristics of the signal and can be expressed as:

[0160]

[0161] In the formula, std is the standard deviation; ε 0 It is the inverse of the signal-to-noise ratio between the first added noise and the analyzed signal. This parameter is used to adjust the intensity of the noise in the initial stage of noise introduction to ensure that the introduction of noise will not have too great an impact on the signal. 1 (w j ) represents the first modal component extracted from the jth noise added; std(E 1 (w j )) represents E 1 (w j )’s standard deviation; represents the original signal; m is the total number of decompositions; λ represents the type of signal used to calculate the noise intensity; std(λ) represents the standard deviation of λ; when λ=R i When the noise intensity adjustment coefficient α i It is directly related to the standard deviation of the residual signal of the i-th group, ensuring that in each iteration, the noise intensity can be adaptively adjusted with the change of the residual signal to optimize the decomposition effect. This ensures that in each round of decomposition, the addition of noise can effectively remove modal aliasing while avoiding excessive interference with the useful information of the signal.

[0162] Step 1.5: Finally, the complete decomposition result is obtained:

[0163]

[0164] In the formula, r represents the residual term, which means the final remaining part that cannot be decomposed during the decomposition process and is usually deleted.

[0165] IMF i Represents the subcomponents obtained after decomposition; represents the original signal; m is the total number of decompositions.

[0166] In step 2, the improved time domain convolutional network unit (TCN) extracts features from the decomposed signal obtained in step 1, and the steps are as follows:

[0167] Step 2.1: The core of the improved temporal convolutional network unit (TCN) is causal convolution and dilated convolution. Causal convolution allows it to perform convolution operations only on the current and previous inputs to avoid data leakage. The purpose of dilated convolution is to increase the receptive field by inserting intervals.

[0168] TCN receives IMF in step 2 i As input, let x (i) =IMF i , and its calculation formula is as follows:

[0169]

[0170] In the formula, is the convolution output at the current time s; x represents the input time series; f d represents the weight of the convolution kernel; k e is the size of the convolution kernel; d is the dilation coefficient; sd·i t is the sequence corresponding to the elements in the convolution kernel; f(i t ) is the i-th convolution kernel t Weights; i t is the index, i t ∈(0,1,…,k e -1); s is the current time.

[0171] Step 2.2: TCN avoids gradient vanishing or gradient exploding by introducing residual connections. The calculation formula is as follows:

[0172] o (i) =ReLU(x (i) +F(x (i) ));

[0173] In the formula, o (i) represents the output of the residual block; F(x (i) ) represents the output of the convolution operation; ReLU represents the rectified linear unit activation function; x (i) represents the i-th input signal of x.

[0174] Step 2.3: In order to take into account the extraction of both short-term and long-term dependencies, the TCN is changed to a dual-path structure, and two TCNs with different receptive fields are used to extract features from the input sequence simultaneously, ensuring that both focus on features of different time scales. The short-term dependency path selects a smaller dilation factor and fewer convolutional layers, resulting in a smaller receptive field; the long-term dependency path selects a larger dilation factor and deeper convolutional layers, resulting in a larger receptive field;

[0175] The outputs of the two TCN paths can be fused by splicing. Taking the configuration of the present invention as an example, the calculation formula of the dilated convolution of the dual-path structure is as follows:

[0176]

[0177]

[0178] In the formula, f short (i t ) and f long (i t ) represent the i-th path of the short-term path and the long-term path respectively. t weights; is the feature extraction result of the short-term path; is the feature extraction result of the long-term path; d short is the expansion factor of the short-term path; d long is the expansion factor of the long-term path; k e is the size of the convolution kernel; s is the current moment; i t Represents the index of the element in the convolution kernel.

[0179] Step 2.4: Concatenate the final output of the TCN for short-term and long-term dependencies, and the calculation formula is as follows:

[0180]

[0181] In the formula, F short (x (i) ) represents the output of the short-term path; F long (x (i) ) represents the output of the long-term path; It is the operation after concatenation; Concat represents the concatenation operation, which combines the two outputs together along the feature dimension.

[0182] In step 3, the processing of the bidirectional gated recurrent unit (BiGRU) dependency is as follows:

[0183] Step 3.1: BiGRU contains two GRU layers, forward and reverse, which process the input signal in the forward and reverse order of time respectively. The calculation formula is as follows:

[0184]

[0185] In the formula, is the input data of the ith IMF at time step t. is the hidden state of the ith IMF at time step t-1; To update the gate vector, control the degree of updating of the hidden state; To reset the gate vector, which controls how new inputs and previous hidden states are combined; is a candidate hidden state, a temporary state generated based on the current input and the previous hidden state; is the forward hidden state of the ith IMF at time step t; W z , W r , W h Corresponding to The weight matrix of z , U r , U h Corresponding to The weight matrix from hidden state to hidden layer; b z , b r , b h Corresponding to The bias vector of ; σ represents the Sigmoid activation function; tanh represents the hyperbolic tangent activation function; ⊙ represents the Hadamard product.

[0186] Step 3.2: Sequence Flip and get Get As a new input, repeat step 3.1 to generate the reverse hidden state

[0187] Step 3.3: Concatenate the forward and reverse hidden states, then the output of BiGRU is:

[0188]

[0189] In the formula, is the BiGRU output of the ith IMF at time step t, obtained by concatenating the forward and reverse hidden states; [;] is the vector concatenation operation, which concatenates two vectors column by column into a longer vector.

[0190] In step 4, the feature processing of the multi-head attention mechanism network includes the following steps:

[0191] Step 4.1: Convert the Bi-GRU output matrix H (i) Mapping to query, key and value:

[0192] Q=H (i) W Q

[0193] K=H (i) W K

[0194] V=H (i) W V

[0195] In the formula, H (i)is the output matrix of the Bi-GRU of the ith IMF; Q, K, V are the query matrix, key matrix, and value matrix; W Q ,W K ,W V is the weight matrix mapping to query, key and value.

[0196] Step 4.2: Split the query, key, and value into H heads, and each head performs independent attention calculation.

[0197] Q h =Split(Q,H),K h =Split(K,H),V h =Split(V,H)

[0198] In the formula, Q h ,K h ,V h are the query, key, and value matrices of the hth attention head; H is the total number of attention heads; Split(Q,H) means splitting the query matrix Q into H sub-matrices according to the number of attention heads H, and providing a query matrix for each attention head; Split(K,H) means splitting the key matrix K into H sub-matrices according to the number of attention heads H, and providing a key matrix for each attention head; Split(V,H) means splitting the value matrix V into H sub-matrices according to the number of attention heads H, and providing a value matrix for each attention head.

[0199] Step 4.3: Attention score calculation:

[0200]

[0201] In the formula, scores h is the score matrix of the hth attention head, indicating the similarity between the query and the key; is the matrix product, calculating the dot product similarity between the query and the key; is a scaling factor to prevent the dot product value from being too large.

[0202] Step 4.4: Attention weight calculation:

[0203] α h =Softmax(scores h )

[0204] In the formula, α h The weight matrix of the h-th attention head represents the weighted coefficient on the value; the role of the Softmax function is to convert the score into a probability distribution.

[0205] Step 4.5: Weighted sum values ​​and concatenate with output map:

[0206]

[0207]

[0208] In the formula, is the output matrix of the hth attention head; Concat is used to concatenate the outputs of all heads according to the feature dimension; W O is the weight matrix of the output mapping; V h Represents the value matrix of the h-th attention head; represents the weighted output of the h-th attention head; Represents the output matrix of each attention head, which represents the weighted result after each head is calculated independently.

[0209] In step 4, the calculation formula of the fully connected network is as follows:

[0210]

[0211] In the formula, y pred [t] represents the predicted value at time step t; is the feature vector of the attention output matrix at time step t; W fc-out is the weight matrix of the fully connected layer; b fc-out Represents the bias vector of the fully connected layer. At this time, an IMF prediction value is obtained; T q Represents the total number of time steps, that is, the length of the time series.

[0212] According to the different sub-component IMFs obtained in step 1.5 i As input, repeat steps 2 and 3 to obtain different IMFs. i Therefore, the final prediction value calculation formula is:

[0213]

[0214] Where m is still the total number of decompositions in step 1; y out is the final prediction result of the output; y i pred is the predicted value of the ith IMF component.

[0215] In step 5, the calculation formula of the prediction error is as follows:

[0216]

[0217] In the formula, y Fin is the prediction residual; is the original sequence.

[0218] In step 5, the Bootstrap method is a non-parametric interval prediction method. Fin Multiple resampling is performed to statistically infer the overall distribution characteristics. The present invention changes the sampling with replacement to time series sampling. Assume that the original sample is y Fin ={y 1 ,y 2 ,…,y n}, n is the length of the sample.

[0219] The step 5 specifically includes the following steps:

[0220] Step 5.1: Calculate the prediction residual sample y Fin The autocorrelation function (ACF) of A The autocorrelation coefficient under ACF(k A ) The calculation formula is defined as:

[0221]

[0222] In the formula, is the sequence y Fin The mean of k A is the hysteresis value; t i is the index; ACF(k A ) represents the autocorrelation function at lag k A The autocorrelation coefficient under the step is used to measure the correlation between each moment in the time series; It represents the sequence y Fin In t i The residual value of It represents the sequence y Fin At time step t i +k A The residual value of ; n represents the total length of the sequence, that is, the total number of samples in step 5. The autocorrelation function describes the correlation of the time series at different lags.

[0223] Step 5.2: Determine the block length l:

[0224] l=min{k A :|ACF(k A )|<τ}

[0225] Wherein, τ is a preset threshold value, which is 0.4 in the present invention. A )| is less than the threshold τ, it is considered that the dependence of the sequence at this lag is not significant; min is the minimum value.

[0226] Step 5.3: Set y Fin Divide into blocks of length l, then the divided y Fin It consists of different blocks:

[0227] y Fin ={A 1 ,A 2 ,…,A n / l}

[0228] In the formula, A is the name of the segmented block; n / l is the number of blocks that need to be spliced ​​to ensure that the sample length is the same as the original sequence. 1 ,A 2 ,…,A n / l is the segmented sequence block, each block contains a subsequence of length l.

[0229] Step 5.4: Randomly draw samples with replacement from all blocks, and obtain a new sample set C in each round of random drawing with replacement. Repeat K rounds to obtain K sample sets, and the sample selection of the time series sampling method is completed.

[0230] Step 5.5: For each Bootstrap sample C k , calculate the statistic: mean and variance; the overall mean of the K sample sets The calculation formula is as follows:

[0231]

[0232] Overall sample variance The calculation formula is as follows:

[0233]

[0234] In the formula, represents the mean of the kth Bootstrap sample, k = 1, 2, ..., K; represents the overall mean; Represents the variance estimate of the population mean; K is the number of repeated rounds, that is, the total number of sample sets.

[0235] Step 5.6: Based on the sample distribution characteristics and the critical value of the standard normal distribution Construct the upper and lower limits U and L of the prediction interval:

[0236]

[0237] In the formula, represents the mean of the series; According to the confidence level, the confidence level of the present invention is μ=99%, that is, α=0.01. Step 5.7: Repeat the above steps multiple times to generate a large number of Bootstrap samples. The details are as follows:

[0238] By repeatedly randomly extracting multiple samples from the block, a prediction interval is calculated for each sample set through steps 5.5 and 5.6. For each sample set's prediction interval (L, U), check whether the true population mean falls within this interval. If it falls within the interval, it is considered that the model's prediction is relatively accurate. Finally, count how many of the prediction intervals of the K sample sets contain the true mean.

[0239] Step 5.8: Calculate the ratio of successful coverage times to total times to get the coverage rate. Verify the matching degree between the prediction interval and the true value, and generate the final prediction interval. The evaluation index of the prediction interval is expressed by the following formula:

[0240]

[0241] In the formula, CR represents coverage, that is, the proportion of the predicted interval covering the true value. The higher the value, the more reliable the predicted interval; AIW represents the average interval width. The smaller the width, the more accurate the predicted interval; L i and U i are the lower and upper bounds of the i-th prediction interval respectively; y i represents the i-th residual value; n is the total number of samples in step 5; Represents an indicator function, which is 1 if the condition is met, otherwise it is 0.

[0242] Furthermore, step 6 is included: improving the quantile adjustment strategy to adjust the prediction interval quantile for the skewness coefficient, as follows:

[0243] In order to further improve the coverage or compactness of the prediction interval, the present invention proposes a dynamic optimization method based on the skewness coefficient and improves the quantile adjustment strategy, thereby improving the adaptability and accuracy of the prediction interval.

[0244] The skewness coefficient of the residual is calculated as follows:

[0245]

[0246] In the formula, S s Represents the skewness coefficient; skewness S s > indicates right deviation; S s <0 means left deviation; S s =0 indicates symmetrical distribution; y i represents the i-th residual value; represents the mean of the residuals; n is the total number of samples in step 5.

[0247] Step 7: According to the calculated skewness results, dynamically adjust the upper and lower bounds of the prediction interval: for right-skewed distribution, appropriately reduce the lower bound quantile and expand the upper bound quantile; for left-skewed distribution, appropriately expand the lower bound quantile and reduce the upper bound quantile; for symmetric distribution, keep the quantile at the standard value. The formula is as follows:

[0248]

[0249] Where, L Q Represents the lower quantile of the adjusted prediction interval; U Q represents the upper quantile of the adjusted prediction interval; μ represents the confidence level.

[0250] Example:

[0251] Figure 4 This is the decomposition effect diagram of ICEEMDAN. It can be seen that the complexity of the original sequence is reduced through the decomposition of ICEEMDAN, and the decomposition residual is deleted.

[0252] Figure 5 For the improved temporal convolutional network TCN-BIGRU-MHA Figure 4 The predicted effect diagram of the decomposition amount.

[0253] We selected the common evaluation indicators - root mean square error (RMSE) and mean absolute error (MAE). It can be seen that as the complexity of each component decreases, the prediction effect of the model on the decomposition amount increases significantly, showing a lower error. This shows that ICEEMDAN decomposition significantly improves the prediction accuracy of the model.

[0254] Figure 6 The final prediction results of TCN-BIGRU-MHA, improved TCN-BIGRU-MHA, and ICEEMDAN-improved TCN-BIGRU-MHA are compared. It can be seen that the method proposed in the present invention (ICEEMDAN-improved TCN-BIGRU-MHA) follows the measured value (black dashed line) most closely, showing the best fit and the smallest prediction error.

[0255] Figure 7 The comparison chart of the prediction intervals before and after improvement (98% confidence level) shows that the skewness-adjusted prediction interval has a narrower prediction interval.

[0256] Table 1 Comparison of prediction interval evaluation indicators

[0257] name CR AIW Unbiased Adjusted Prediction Intervals 0.97935 <![CDATA[3.3966*10 -3 ]]> Prediction intervals with skewness adjustment 0.98185 <![CDATA[3.3319*10 -3 ]]>

[0258] Table 1 compares the evaluation indicators of the prediction interval without bias adjustment and the prediction interval with bias adjustment (98% confidence level). From the results, the prediction interval with bias adjustment is better than before adjustment in covering the true value and provides a more compact prediction interval. It can be seen that the bias adjustment method can more accurately limit the width of the prediction interval while providing better coverage.

Claims

1. A method for predicting the measurement error interval of a transformer based on a hybrid deep learning model and the Bootstrap method, characterized in that The following steps are involved: Step 1: Collect the operating measurement error data of the voltage transformer, construct a data set, and perform adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) to obtain the decomposed signal; Step 2: Use the improved bidirectional gated recurrent unit (TCN) to extract features from the decomposed signal obtained in step 1 and output the extracted feature information y TCN ; Step 3: Use the bidirectional gated recurrent unit (BiGRU) to perform the feature information y obtained in step 2 TCN Process the dependency relationship and output the comprehensive feature y Bi ; Step 4: The comprehensive feature y output in step 3 Bi Input to the multi-head attention mechanism network for feature processing, and the processed data passes through the fully connected network to obtain the final output y out ; Step 5: According to the final output y out Calculate the prediction error y Fin , based on the improved Bootstrap method, the prediction error y Fin Perform statistical inference to obtain the error distribution interval at a given confidence level and generate interval prediction results.

2. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 1, characterized in that: The adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) in step 1 includes the following specific steps: Step 1.1: Collect the difference data With the white noise sequence w j Combine and construct new sequences The formula is as follows: In the formula, is the original signal, i.e. the difference data after acquisition; is the first-order modal component of the j groups of white noise added to the original signal after EMD decomposition; α0 is the noise intensity adjustment coefficient; is the new sequence constructed after adding noise; Step 1.2: For the newly constructed sequence Apply the EMD algorithm to calculate the local mean and get the first set of residuals R1: In the formula, Indicates that the EMD algorithm is applied to the sequence to calculate the sequence The local mean of Step 1.3: Subtract the first set of residuals from the original signal to obtain the first mode function, denoted as In the formula, Represents the collected difference data, that is, the original signal; At this point, the first mode function has been extracted from the original signal, representing a part of the independent components in the signal; Step 1.4: Iteratively calculate the residuals and modal components: Each time a group of white noise is added to the residual signal, and the EMD algorithm is applied to calculate the new residual and modal components, and the various modal components in the signal are gradually extracted; the formula is as follows: In the formula, R i This is the i-th group of residuals decomposed this time, which represents the signal part after removing the extracted modal components; R i-1 represents the i-1th group of residuals in this decomposition; α i-1 represents the noise intensity adjustment coefficient of the i-1th group; This is the i-th modal component of this decomposition; is the i-th order modal component after EMD decomposition of the j-group white noise added to the original signal; R i-1 represents the residual obtained in round i-1; Noise intensity adjustment coefficient α during decomposition i It is used to control the proportion of white noise added, which depends on the characteristics of the signal and is expressed as: Where ε0 is the inverse of the signal-to-noise ratio between the first added noise and the analyzed signal; E1(w j ) represents the first modal component extracted from the jth noise added; std(E1(w j )) represents E1(w j )’s standard deviation; represents the original signal; m is the total number of decompositions; λ represents the type of signal used to calculate the noise intensity; std(λ) represents the standard deviation of λ; when λ=R i When the noise intensity adjustment coefficient α i Directly related to the standard deviation of the residual signal of the i-th group; Step 1.5: Finally, the complete decomposition result is obtained: In the formula, r represents the residual term, which means the final remaining part that cannot be decomposed in the decomposition process; IMF i Represents the subcomponents obtained after decomposition; represents the original signal; m is the total number of decompositions.

3. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 2, characterized in that: In step 1.2 above, the process of using the EMD algorithm to calculate the local mean is as follows: 1) Calculate the new construction sequence All the maximum and minimum values ​​constitute the maximum value set X max and the minimum value set X min ; 2) For the maximum value set X max and the minimum value set X min Use the spline function to interpolate and get The upper and lower envelopes x max (t), x min (t); 3) Calculate the upper and lower envelope x max (t), x min The local mean of (t), that is, 4. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 1, characterized in that: In step 2, the improved time domain convolutional network unit (TCN) extracts features from the decomposed signal obtained in step 1, including the following steps: Step 2.1: The improved temporal convolutional network unit (TCN) receives the IMF in step 2 i As input, let x (i) =IMF i , and its calculation formula is as follows: In the formula, is the convolution output at the current time s; x represents the input time series; f d represents the weight of the convolution kernel; k e is the size of the convolution kernel; d is the dilation coefficient; sd·i t is the sequence corresponding to the elements in the convolution kernel; f(i t ) is the i-th convolution kernel t Weights; i t is the index, i t ∈(0,1,…,k e -1); s is the current moment; Step 2.2: TCN avoids gradient vanishing or gradient exploding by introducing residual connections. The calculation formula is as follows: o (i) =ReLU(x (i) +F(x (i) )): In the formula, o (i) represents the output of the residual block; F(x (i) ) represents the output of the convolution operation; ReLU represents the rectified linear unit activation function; x (i) represents the i-th input signal of x; Step 2.3: In order to take into account the extraction of both short-term and long-term dependencies, the TCN is changed to a dual-path structure, and two TCNs with different receptive fields are used to extract features from the input sequence simultaneously, ensuring that both focus on features at different time scales; The short-term dependency path selects a smaller dilation factor and fewer convolutional layers, resulting in a smaller receptive field; Long-term dependency paths select larger dilation factors and deeper convolutional layers, resulting in larger receptive fields; The outputs of the two TCN paths are fused by splicing; the calculation formula for the dilated convolution of the dual-path structure is as follows: In the formula, f short (i t ) and f long (i t ) represent the i-th path of the short-term path and the long-term path respectively. t weights; is the feature extraction result of the short-term path; is the feature extraction result of the long-term path; d short is the expansion factor of the short-term path; d long is the expansion factor of the long-term path; k e is the size of the convolution kernel; s is the current moment; i t Represents the index of the element in the convolution kernel; Step 2.4: Concatenate the final output of the TCN for short-term and long-term dependencies, and the calculation formula is as follows: In the formula, F short (x (i) ) represents the output of the short-term path; F long (x (i) ) represents the output of the long-term path; It is the operation after concatenation; Concat represents the concatenation operation, which combines the two outputs together along the feature dimension.

5. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 1, characterized in that: In step 3, the processing of the bidirectional gated recurrent unit (BiGRU) dependency is as follows: Step 3.1: BiGRU contains two GRU layers, forward and reverse, which process the input signal in the forward and reverse order of time respectively. The calculation formula is as follows: In the formula, is the input data of the ith IMF at time step t. is the hidden state of the ith IMF at time step t-1; To update the gate vector, control the degree of updating of the hidden state; To reset the gate vector, which controls how new inputs and previous hidden states are combined; is a candidate hidden state, a temporary state generated based on the current input and the previous hidden state; is the forward hidden state of the ith IMF at time step t; W z , W r , W h Corresponding to The weight matrix of z , U r , U h Corresponding to The weight matrix from hidden state to hidden layer; b z , b r , b h Corresponding to The bias vector of ; σ represents the Sigmoid activation function; tanh represents the hyperbolic tangent activation function; ⊙ represents the Hadamard product; Step 3.2: Sequence Flip and get Get As a new input, repeat step 3.1 to generate the reverse hidden state Step 3.3: Concatenate the forward and reverse hidden states, then the output of BiGRU is: In the formula, H t (i) is the BiGRU output of the ith IMF at time step t, obtained by concatenating the forward and reverse hidden states; [;] is the vector concatenation operation, which concatenates two vectors column by column into a longer vector.

6. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 1, characterized in that: In step 4, the feature processing of the multi-head attention mechanism network includes the following steps: Step 4.1: Convert the Bi-GRU output matrix H (i) Mapping to query, key and value: Q=H (i) W Q K=H (i) W K V=H (i) W V In the formula, H (i) is the output matrix of the Bi-GRU of the ith IMF; Q, K, V are the query matrix, key matrix, and value matrix; W Q ,W K ,W V is the weight matrix mapped to query, key and value; Step 4.2: Split the query, key, and value into H heads, and perform independent attention calculations on each head; Q h =Split(Q,H),K h =Split(K,H),V h =Split(V,H) In the formula, Q h ,K h ,V h are the query, key, and value matrices of the hth attention head; H is the total number of attention heads; Split(Q,H) means splitting the query matrix Q into H sub-matrices according to the number of attention heads H, and providing query matrices for each attention head; Split(K,H) means splitting the key matrix K into H sub-matrices according to the number of attention heads H, and providing key matrices for each attention head; Split(V,H) means splitting the value matrix V into H sub-matrices according to the number of attention heads H, and providing value matrices for each attention head; Step 4.3: Attention score calculation: In the formula, scores h is the score matrix of the hth attention head, indicating the similarity between the query and the key; is the matrix product, calculating the dot product similarity between the query and the key; is the scaling factor to prevent the dot product value from being too large; Step 4.4: Attention weight calculation: α h =Softmax(scores h ) In the formula, α h The weight matrix of the hth attention head represents the weight coefficient on the value; the role of the Softmax function is to convert the score into a probability distribution; Step 4.5: Weighted sum values ​​and concatenate with output map: In the formula, is the output matrix of the hth attention head; the function of Concat is to concatenate the outputs of all heads according to the feature dimension; W O is the weight matrix of the output mapping; V h Represents the value matrix of the h-th attention head; represents the weighted output of the h-th attention head; Represents the output matrix of each attention head, which represents the weighted result after each head is calculated independently.

7. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 6, characterized in that: The calculation formula of the fully connected network is as follows: In the formula, y pred [t] represents the predicted value at time step t; is the feature vector of the attention output matrix at time step t; W fc-out is the weight matrix of the fully connected layer; b fc-out Represents the bias vector of the fully connected layer; at this time, an IMF prediction value is obtained; T q Represents the total number of time steps, that is, the length of the time series; According to different sub-component IMF i As input, repeat steps 2 and 3 to obtain different IMFs. i Therefore, the final prediction value calculation formula is: Where m is still the total number of decompositions in step 1; y out is the final prediction result of the output; y i pred is the predicted value of the ith IMF component.

8. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 7, characterized in that: In step 5, the Bootstrap method is to Fin Perform multiple resampling to statistically infer the overall distribution characteristics, and change the sampling with replacement to time series sampling; let the original sample be y Fin ={y1,y2,…,y n }, n is the length of the sample; The steps include: Step 5.1: Calculate the prediction residual sample y Fin The autocorrelation function (ACF) of A Autocorrelation coefficient under ACF(k A ) The calculation formula is defined as: In the formula, is the sequence y Fin The mean of k A is the hysteresis value; t i is the index; ACF(k A ) represents the autocorrelation function at lag k A The autocorrelation coefficient under the step is used to measure the correlation between each moment in the time series; It represents the sequence y Fin In t i The residual value of Represents the sequence y Fin At time step t i +k A The residual value of ; n represents the total length of the sequence, that is, the total number of samples in step 5; Step 5.2: Determine the block length l: l=min{k A :|ACF(k A )|<τ} Where τ is a preset threshold; when |ACF(k A )| is less than the threshold τ, it is considered that the dependence of the sequence at this lag is not significant; Step 5.3: Set y Fin Divide into blocks of length l, then the divided y Fin By different blocks composition: <h2 style=";text-align:left;direction:ltr">y<h2 style=";text-align:left;direction:ltr"> Fin <h2 style=";text-align:left;direction:ltr"> (A1,A2,…,A)<h2 style=";text-align:left;direction:ltr"> n / l <h2 style=";text-align:left;direction:ltr">} In the formula, A is the name of the segmented block; n / l is the number of blocks that need to be spliced ​​to ensure that the sample length is the same as the original sequence; A1, A2, …, A n / l is the segmented sequence block, each block contains a subsequence of length l; Step 5.4: Randomly draw samples with replacement from all blocks, and obtain a new sample set C in each round of random drawing with replacement; repeat K rounds to obtain K sample sets, and the sample selection of the time series sampling method is completed; Step 5.5: For each Bootstrap sample C k , calculate the statistic: mean and variance; the overall mean of the K sample sets The calculation formula is as follows: Overall sample variance The calculation formula is as follows: In the formula, represents the mean of the kth Bootstrap sample, k = 1, 2, ..., K; represents the overall mean; Represents the variance estimate of the population mean; K is the number of repeated rounds, that is, the total number of sample sets; Step 5.6: Based on the sample distribution characteristics and the critical value of the standard normal distribution Construct the upper and lower limits U and L of the prediction interval: In the formula, represents the mean of the series; According to the confidence level, the confidence level of the present invention is μ=99%, that is, α=0.01; Step 5.7: Repeat the above steps several times to generate a large number of Bootstrap samples; the details are as follows: By repeatedly randomly extracting multiple samples from the block, a prediction interval is calculated for each sample set through steps 5.5 and 5.6; for the prediction interval (L, U) of each sample set, check whether the true population mean falls within this interval; if it falls within the interval, it is considered that the model's prediction is relatively accurate; finally, count how many of the prediction intervals of the K sample sets contain the true mean; Step 5.8: Calculate the ratio of successful coverage times to the total times to get the coverage rate; verify the matching degree between the prediction interval and the true value, and generate the final prediction interval; the evaluation index of the prediction interval is expressed by the following formula: In the formula, CR represents coverage, that is, the proportion of the predicted interval covering the true value. The higher the value, the more reliable the predicted interval; AIW represents the average interval width. The smaller the width, the more accurate the predicted interval; L i and U i are the lower and upper bounds of the i-th prediction interval respectively; y i represents the i-th residual value; n is the total number of samples in step 5; Represents an indicator function, which is 1 if the condition is met, otherwise it is 0.

9. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 8, characterized in that: It also includes step 6: in order to further improve the coverage or compactness of the prediction interval, a dynamic optimization method based on the skewness coefficient is proposed to improve the quantile adjustment strategy, thereby improving the adaptability and accuracy of the prediction interval; The skewness coefficient of the residual is calculated as follows: In the formula, S s Represents the skewness coefficient; skewness S s > indicates right deviation; S s <0 means left deviation; S s =0 indicates symmetrical distribution; y i represents the i-th residual value; y represents the mean of the residual; n is the total number of samples in step 5.

10. The method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method according to claim 9, characterized in that: According to the calculated skewness results, the upper and lower bounds of the prediction interval are dynamically adjusted: for right-skewed distribution, the lower bound quantile is appropriately reduced and the upper bound quantile is expanded; for left-skewed distribution, the lower bound quantile is appropriately expanded and the upper bound quantile is reduced; for symmetric distribution, the quantile maintains the standard value; the formula is expressed as follows: Where, L Q Represents the lower quantile of the adjusted prediction interval; U Q represents the upper quantile of the adjusted prediction interval; μ represents the confidence level.

Citation Information

Patent Citations

  • Short-term wind power prediction method based on data reconstruction and TCN-BiLSTM

    CN116070768A

  • Short-term power load prediction method based on ICEEMDAN and integrated LSTM-TCN model

    CN117592615A

  • Photovoltaic power generation power prediction method based on multivariable time sequence decomposition and multiple models

    CN118657243A

  • Short-term load prediction method considering error compensation and mode decomposition

    CN119109021A