Transformer measurement error interval prediction method based on hybrid deep learning model and bootstrap method
By hybridizing deep learning models and the Bootstrap method, the measurement stability problem of voltage transformers in complex environments is solved, high-accuracy error interval prediction is achieved, and real-time monitoring and fault identification of smart grids are supported.
Patent Information
- Application Number
- CN202411905485.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The measurement stability of voltage transformers is easily affected by industrial environmental factors, resulting in a decrease in measurement performance. Existing technologies make it difficult to accurately predict their future status in complex environments, and online verification technology has limited monitoring effects in high-voltage environments.
A hybrid deep learning model and Bootstrap method are used to perform error interval prediction through adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN), improved bidirectional gated recurrent unit (BiGRU), multi-head attention mechanism and fully connected network, combined with the Bootstrap method to generate high-confidence prediction results.
It significantly improves the prediction accuracy and stability of transformer measurement errors, reduces the operational complexity and cost of power outage verification, provides technical support for real-time monitoring and trade fairness of smart grids, and can identify potential faults at an early stage.
Smart Images

Figure CN119903340B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of voltage transformer error prediction, and particularly relates to a transformer measurement error interval prediction method based on a hybrid deep learning model and a Bootstrap method. BACKGROUND
[0002] In the measurement and protection system of the smart grid, as the basic measurement equipment in the power system, the voltage transformer guarantees the real-time monitoring and control of the power system. Its measurement accuracy not only affects the safe and reliable operation of the power grid, but also directly affects the trade fairness. However, the measurement stability of the voltage transformer is easily affected by various industrial environment factors, and the aging effect caused by long-term operation of the equipment will gradually weaken the measurement performance of the transformer, leading to the decline of the measurement stability, affecting the accuracy of power measurement, and increasing the operation risk of the power system.
[0003] According to the current standard, the measuring instrument needs to be calibrated regularly to ensure that its measurement performance meets the specification requirements. However, the power-off verification method requires the device to exit operation, and the related line needs to be powered off. Although this verification method can provide high-precision detection results, the operation is complex, the time and labor cost is high, and it causes interference to the normal operation of the power grid. The online verification technology does not need to be powered off, but it is usually only suitable for short-term monitoring in a high-voltage environment, resulting in a "blank" state of monitoring between two verifications.
[0004] In recent years, neural networks have been widely used in time series prediction, signal processing, and fault detection as a powerful nonlinear modeling tool. In the smart grid, neural network-based models can effectively predict the future state of the device by analyzing historical operation data, and then timely discover potential problems to improve the reliability of the power grid operation. However, although neural networks exhibit strong predictive power to some extent, they have certain requirements for data quality, which limits their ability to handle nonlinear and non-stationary signals.
[0005] Firstly, 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 ratio difference data of the transformer running in a complex industrial environment usually has significant non-stationarity and randomness, making it difficult for a single model to fully capture the data features. Secondly, the robustness of a single neural network model to noise interference and data anomalies is insufficient, further weakening the applicability and reliability of the model. Therefore, a reliable method is needed to model and predict the future operation state of the transformer to improve the measurement accuracy and operation stability. SUMMARY
[0006] 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, which effectively improves the certainty of the prediction.
[0007] The technical solution adopted by the present invention is:
[0008] A method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and a Bootstrap method includes the following steps:
[0009] Step 1: Collect the operational 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 transform the feature information y obtained in step 2 TCN Process the dependency and output the comprehensive feature y Bi ;
[0012] Step 4: The comprehensive feature y output in step 3 Bi Input into 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 for 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 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: using the collected ratio difference data With the white noise sequence w j Combine to construct a new sequence The formula is as follows:
[0016]
[0017] In the formula, is the original signal, i.e. the collected difference data; is the first order modal component of the j group white noise added to the original signal after EMD decomposition; and a0 is a noise intensity adjustment coefficient; is a new sequence constructed after adding the noise.
[0018] Step 1.2: calculating the local mean of the newly constructed sequence using the EMD algorithm to obtain the first set of residuals R1:
[0019]
[0020] In the formula, represents calculating the local mean of the sequence using the EMD algorithm on the sequence.
[0021] In the above step 1.2, the process of calculating the local mean using the EMD algorithm is as follows:
[0022] 1) Calculate all the maxima and minima of the newly constructed sequence to form the maxima set X max and the minima set X min , respectively;
[0023] 2) Interpolate the maxima set X max and the minima set X min using a spline function to obtain the upper and lower envelope lines x max (t) and x min (t) of ; the spline function is a common mathematical method that smoothly interpolates data points by piecewise low-order polynomials to ensure smooth transition of the interpolated curve between data points;
[0024] 3) Calculate the local mean of the upper and lower envelope lines x max (t) and x min (t), i.e. Step 1.3: subtract the first set of residuals from the original signal to obtain the first modal function, denoted as I IMF1 :
[0025]
[0026] In the formula, represents the collected difference data, i.e. the original signal.
[0027] At this time, the first modal function has been extracted from the original signal and represents a part of the independent components in the signal.
[0028] Step 1.4: iteratively calculating the residuals and modal components:
[0029] Each time a set of white noise is added to the residual signal, and the EMD algorithm is applied to calculate the new residual and modal components, gradually extracting each modal component in the signal; the formula is as follows:
[0030]
[0031] In the formula, R i is the i-th set of residuals of this decomposition, indicating the signal part after removing the extracted modal components; R i-1 is the i-1-th set of residuals of this decomposition; α i-1 is the noise intensity adjustment coefficient of the i-1-th set; is the i-th modal component of this decomposition; is the i-th order modal component after EMD decomposition of the j-th set of white noise added to the original signal; R i-1 represents the residual obtained in the i-1-th round.
[0032] The noise intensity adjustment coefficient α i in the decomposition process is used to control the proportion of added white noise, which is determined depending on the characteristics of the signal, and is represented as:
[0033]
[0034] In the formula, ε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 extracted modal component of the j-th added noise; std(E1(w j )) represents the standard deviation of E1(w j ); represents the original signal; m is the total number of decompositions; λ represents the signal type used to calculate the noise intensity; std(λ) represents the standard deviation of λ; when λ = R i , the noise intensity adjustment coefficient α i is directly related to the standard deviation of the i-th residual signal.
[0035] Step 1.5: Finally, the complete decomposition result is obtained:
[0036]
[0037] In the formula, r represents the residual term, indicating the final remaining part that cannot be decomposed in the decomposition process.
[0038] IMF i represents the sub-component obtained after decomposition; represents the original signal; m is the total number of decompositions.
[0039] In step 2, the improved time domain convolution network unit (TCN) extracts features from the decomposition signal obtained in step 1, and the steps are as follows:
[0040] Step 2.1: The improved time domain convolution network unit (TCN) receives the IMF in step 2 i As input, let x (i) = IMF i , its calculation formula is as follows:
[0041]
[0042] In the formula, is the convolution output at the current s time; x represents the input time sequence; f d represents the weight of the convolution kernel; k e is the size of the convolution kernel; d is the expansion coefficient; s-d·i t is the sequence corresponding to the element in the convolution kernel; f(i t ) is the i t th weight of the convolution kernel; i t is the index, i t ∈(0,1,…,k e -1); s is the current time.
[0043] Step 2.2: TCN avoids gradient disappearance or gradient explosion by introducing residual connection, and its 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 extract short-term and long-term dependencies, the TCN is changed to a double-path structure, and two TCNs with different receptive fields are used to extract features from the input sequence at the same time, ensuring that both focus on features of different time scales. The short-term dependency path selects a smaller expansion factor and fewer convolution layers, and the receptive field is smaller; the long-term dependency path selects a larger expansion factor and deeper convolution layers, and the receptive field is larger;
[0047] The outputs of the two TCN paths are fused by splicing. The calculation formula of the double-path structure expansion convolution is as follows:
[0048]
[0049] Where, 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 outputs of the TCN for short-term and long-term dependencies. The calculation formula is as follows:
[0051]
[0052] Where, F short (x (i) ) represents the output of the short-term path; F long (x (i) ) represents the output of the long-term path; Concat is the concatenation operation, which combines the two outputs 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] Where, is the input data of the ith IMF at time step t, at this time is the hidden state of the i-th IMF at time step t-1; To update the gate vector, control the degree of update of the hidden state; To reset the gate vector, which controls how the new input and the previous hidden state are combined; The candidate hidden state is 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 hCorresponding respectively The weight matrix of U z 、U r 、U h Corresponding respectively The weight matrix from hidden state to hidden layer; b z 、b r 、b h Corresponding respectively 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] Where, is the BiGRU output of the i-th IMF at time step t, obtained by concatenating the forward and reverse hidden states; [;] is the vector concatenation operation, which concatenates two vectors into a longer vector by column.
[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] Where H (i) is the output matrix of the Bi-GRU of the i-th 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.
[0067] Step 4.2: Split the query, key and value into H heads, each head computes attention independently.
[0068] Q h = Split(Q, H), K h = Split(K, H), V h = Split(V, H)
[0069] where Q h , K h , V h are the query, key and value matrices of the h-th 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 the query matrix for each attention head respectively; Split(K, H) means splitting the key matrix K into H sub-matrices according to the number of attention heads H, and providing the key matrix for each attention head respectively; Split(V, H) means splitting the value matrix V into H sub-matrices according to the number of attention heads H, and providing the value matrix for each attention head respectively.
[0070] Step 4.3: Attention score calculation:
[0071]
[0072] where scores h is the score matrix of the h-th attention head, representing 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.
[0073] Step 4.4: Attention weight calculation:
[0074] α h = Softmax(scores h )
[0075] where α h is the weight matrix of the h-th attention head, representing the weighting coefficient on the value; the Softmax function is used to convert the score into a probability distribution.
[0076] Step 4.5: Weighted sum value, and concatenation and output mapping:
[0077]
[0078] where is the output matrix of the h-th attention head; the role of Concat is to concatenate the outputs of all heads according to the feature dimension; W Ois the weight matrix of the output mapping; V h represents the value matrix of the hth attention head; represents the weighted output of the hth attention head; respectively represent the output matrix of each attention head, and represent the weighted results calculated by each head independently.
[0079] In step 4, the calculation formula of the full connection 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 full connection layer; b fc-out represents the bias vector of the full connection layer. At this time, the predicted value of an IMF is obtained; T q represents the total number of time steps, i.e., the length of the time series.
[0082] According to the different sub-components IMFs obtained in step 1.5 i as input, steps 2 and 3 are repeated to obtain the predicted values of different IMFs i . Therefore, the final predicted value calculation formula is:
[0083]
[0084] In the formula, m is still the total number of decompositions in step one; y out is the final predicted 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 estimates the overall distribution characteristics by repeatedly resampling the target data y Fin . Let the original sample be y Fin ={y1,y2,…,y n}, and n be the length of the sample. Step 5 specifically includes 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] Where, 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 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 When )| 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 Consists of different blocks:
[0096] y Fin ={A1,A2,…,A n / l}
[0097] Where 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. n / l is 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 statistics: mean and variance; the population mean of K sample sets is calculated as follows:
[0100]
[0101] The population sample variance is calculated as follows:
[0102]
[0103] where represents the mean of the kth Bootstrap sample, k = 1, 2, …, K; represents the population mean; represents the variance estimate of the population mean; K is the number of rounds of repetition, i.e., the total number of sample sets.
[0104] Step 5.6: According to the sample distribution characteristics and the critical value of the standard normal distribution construct the upper limit U and the lower limit L of the prediction interval:
[0105]
[0106] where represents the mean of the sequence; According to the confidence level, the confidence level μ = 99% of the present application, i.e., α = 0.01. Step 5.7: Repeat the above steps multiple times to generate a large number of Bootstrap samples. Specifically as follows:
[0107] By repeatedly randomly drawing multiple samples from the block, for each sample set, a prediction interval is calculated by step 5.5 and step 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 prediction of the model is more accurate. Finally, count how many of the K sample sets contain the true mean.
[0108] Step 5.8: Calculate the proportion of successful coverage times to the total number of times to get the coverage rate. Verify the matching degree of the prediction interval and the true value, and generate the final prediction interval. The evaluation index of the prediction interval is represented by the following formula:
[0109]
[0110] In the formula, CR represents coverage, that is, the proportion of the prediction interval covering the true value, and the higher the value, the more reliable the prediction interval; AIW represents the average interval width, and the smaller the width, the more accurate the prediction interval; L i and U i respectively represent the lower bound and the upper bound of the i-th prediction interval; y i represents the i-th residual value; and n is the total number of samples in step 5. represents an indicator function, which is 1 if the condition is true, and 0 otherwise.
[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 skewness coefficient is proposed, and the quantile adjustment strategy is improved, so as to improve 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; S s > represents right skewness; S s <0 represents left skewness; S s =0 represents symmetric distribution; y i represents the i-th residual value. represents the mean of the residual; and n is the total number of samples in step 5.
[0115] Step 7: according to the calculated skewness result, the lower and upper bounds of the prediction interval are dynamically adjusted: for right skewed distribution, the lower quantile is appropriately reduced and the upper quantile is appropriately expanded; for left skewed distribution, the lower quantile is appropriately expanded and the upper quantile is appropriately reduced; for symmetric distribution, the quantile remains the standard value. The formula is expressed as follows:
[0116]
[0117]
[0118] In the formula, L Q represents the adjusted lower quantile of the prediction interval; U Q represents the adjusted upper quantile of the prediction interval; and μ represents the confidence level.
[0119] The mutual inductor measurement error interval prediction method based on the hybrid deep learning model and the Bootstrap method has the following technical effects:
[0120] 1) The improved time domain convolution network (TCN) of the application adopts a dual-path structure, which extracts features for short-term and long-term dependencies respectively, ensuring that the model can capture important information in the operating signal of the mutual inductor at different time scales, thereby significantly enhancing the feature extraction capability of complex signals. Through bidirectional gated recurrent units and multi-head attention mechanisms, the features in the operating data of the mutual inductor can be more accurately extracted, significantly improving the accuracy of the interval difference prediction.
[0121] 2) The application preprocesses the sequence by adaptive noise complete ensemble empirical mode decomposition ICEEMDAN, decomposes the complex signal into intrinsic mode components with different frequency amplitude changes, enhances the model's understanding of complex sequences, and improves the model's generalization performance and prediction accuracy.
[0122] 3) The application uses the Bootstrap method for interval prediction, and the improved time series sampling technique maintains the time dependence of the data in the sample set, improving the robustness and adaptability of interval prediction.
[0123] 4) The application proposes a method for dynamically adjusting quantiles based on skewness coefficients, which can optimize the prediction interval according to the data distribution characteristics (right-skewed, left-skewed or symmetric distribution), improve the coverage rate while maintaining a small interval width. Through dynamic optimization strategy, the limitations of traditional static methods under complex data distribution are effectively avoided, and the prediction performance and interval compactness are considered.
[0124] 5) The method proposed in the application provides a point prediction and interval prediction method for the future time of the voltage transformer, which can generate a high confidence level prediction interval (such as 98%). The distribution range of measurement errors is effectively statistically inferred, providing data support for online monitoring and risk assessment, reducing the operational complexity and economic cost caused by power-off verification, and providing technical support for real-time monitoring and trade fairness of smart grids. At the same time, it can also help to realize early identification of potential faults and reduce safety hazards caused by equipment degradation.
[0125] 6) The application proposes to adjust the quantile of the prediction interval by the skewness coefficient in steps 6 and 7, dynamically optimize the data with complex distribution characteristics, overcome the limitations of traditional static methods, and consider the coverage rate and compactness of the prediction interval, reducing the width redundancy. For 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 improved method can effectively adapt to complex data distribution and improve the applicability of the prediction interval, providing an efficient and flexible solution for interval optimization in machine learning and uncertainty quantification scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0126] Figure 1A schematic diagram of a time convolution network (TCN) structure.
[0127] Figure 2 A schematic diagram of an improved time convolution network (TCN) structure.
[0128] Figure 3 A diagram of the overall architecture of the model.
[0129] Figure 4 A diagram of the decomposition effect of ICEEMDAN.
[0130] Figure 5 A diagram of the prediction effect of the improved time convolution network (TCN-BIGRU-MHA) on the decomposition amount. Figure 4
[0131] Figure 6 A comparison diagram of the final prediction results of TCN-BIGRU-MHA, improved TCN-BIGRU-MHA, and ICEEMDAN-improved TCN-BIGRU-MHA.
[0132] Figure 7 A comparison diagram of the 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 support for real-time monitoring and trade fairness of smart grids. First, the adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) is used to decompose the collected voltage transformer ratio difference data into different intrinsic mode components, and the residual error is removed, which significantly reduces the interference of non-stationary signals on modeling. Then, a deep learning model based on improved double-path time convolution network and bidirectional gated recurrent unit is constructed, which enhances the capture ability of short-term and long-term time dependence and nonlinear features of input signals. In addition, the multi-head attention mechanism (MHA) is introduced to optimize the feature weight distribution, which further improves the prediction accuracy of the model. To quantify the uncertainty of the prediction results, the improved time series sampling Bootstrap method is used, which maintains the dependence of the time series and represents the distribution characteristics of the measurement error by generating the prediction interval with high confidence level and skewness adjustment. This provides a new technical solution for the operation 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 transformer measurement error interval prediction method based on hybrid deep learning model and Bootstrap method includes the following steps:
[0135] Step 1: Collect the running measurement error data of the voltage transformer, construct the data set, and perform adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) to obtain the decomposition signal;
[0136] Step 2: Use the improved two-way gated recurrent unit (TCN) to extract features from the decomposition signal obtained in step 1, and output the extracted feature information y TCN ;
[0137] Step 3: Use the bidirectional gated recurrent unit (BiGRU) to process the dependency relationship of the feature information y TCN obtained in step 2, and output the comprehensive features y Bi ;
[0138] Step 4: Input the comprehensive features y Bi output in step 3 into 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 , the predicted error y Fin is calculated, and based on the improved Bootstrap method, the predicted error y Fin is statistically inferred to obtain the error distribution interval under a given confidence level, and the interval prediction result is generated.
[0140] In step 1, the measurement error data refers to the ratio error data of the transformer.
[0141] In step 1, the data set refers to the collected running ratio error data In step 1, the adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) significantly improves the frequency aliasing and mode mixing problems in traditional empirical mode decomposition (EMD) signal processing by introducing an adaptive white noise mechanism. EMD method has been widely used in the analysis of nonlinear and non-stationary signals due to its adaptive decomposition of local features. However, the traditional EMD method is easily affected by noise, leading to the mixing of modal components, thereby affecting the accuracy and effectiveness of decomposition. ICEEMDAN improves the stability and reliability of decomposition by introducing a white noise sequence and dynamically adjusting the noise intensity during decomposition. Its iterative decomposition strategy without pre-setting the base function makes it more advantageous in processing complex nonlinear signals. The specific steps include:
[0142] Step 1.1: Construct a new sequence by combining the collected ratio error data j and the white noise sequence w The formula is as follows:
[0143]
[0144] Where, 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 is 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, 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 obtain the first set of residuals R1:
[0146]
[0147] Where, 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 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 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 for smoothly interpolating data points through piecewise low-order polynomials to ensure that the interpolation curve transitions smoothly 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] Where, The acquired ratio difference data, i.e. the original signal, is denoted as R
[0154] At this time, the first modal function has been extracted from the original signal, representing a part of the independent components in the signal.
[0155] Step 1.4: Iterative calculation of residual and modal components:
[0156] Each time, a set of white noise is added to the residual signal, and the EMD algorithm is applied to calculate the new residual and modal components, gradually extracting each modal component in the signal; the formula is as follows:
[0157]
[0158] In the formula, R i is the i-th set of residuals of this decomposition, representing the signal part after removing the extracted modal components; R i-1 represents the i-1-th set of residuals of this decomposition; α i-1 represents the noise intensity adjustment coefficient of the i-1-th set; is the i-th modal component of this decomposition; is the i-th order modal component after EMD decomposition of the j-th set of white noise added to the original signal; R i-1 represents the residual obtained in the i-1-th round.
[0159] The noise intensity adjustment coefficient α i in the decomposition process is used to control the proportion of white noise added, which is determined depending on the characteristics of the signal, and can be represented as:
[0160]
[0161] In the formula, std is the standard deviation; ε0 is the inverse of the signal-to-noise ratio between the first added noise and the analyzed signal, which is used to adjust the intensity of the noise in the initial stage of noise introduction, ensuring that the introduction of noise does not have a large impact on the signal; E1(w j ) represents the first extracted modal component of the j-th added noise; std(E1(w j )) represents the standard deviation of E1(w j ); 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 , the noise intensity adjustment coefficient α i is directly related to the standard deviation of the i-th residual signal, ensuring that in each iteration, the noise intensity can be adaptively adjusted according to the changes in 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] where r represents the residual term, and represents the final remaining part that cannot be decomposed in the decomposition process, which is usually deleted.
[0165] IMF i represents the subcomponent obtained after decomposition; represents the original signal; m is the total number of decompositions.
[0166] In step 2, the improved time-domain convolution network unit (TCN) extracts features from the decomposition signal obtained in step 1, and the steps are as follows:
[0167] Step 2.1: The core of the improved time-domain convolution network unit (TCN) is causal convolution and dilated convolution. Causal convolution only convolves the current and previous inputs, avoiding data leakage. The purpose of dilated convolution is to increase the receptive field by inserting intervals.
[0168] TCN receives IMF i as input, let x (i) = IMF i , its calculation formula is as follows:
[0169]
[0170] where, is the convolution output at the current s time; 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; s-d·i t is the sequence corresponding to the element in the convolution kernel; f(i t ) is the i t th weight of the convolution kernel; 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 explosion by introducing residual connection, and its calculation formula is as follows:
[0172] o (i) = ReLU(x (i) +F(x (i) ));
[0173] where o (i)output representing a 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 extract short-term and long-term dependencies, the TCN is changed to a double-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 expansion factor and fewer convolution layers, and the receptive field is smaller; the long-term dependency path selects a larger expansion factor and deeper convolution layers, and the receptive field is larger;
[0175] The outputs of the two TCN paths can be fused by splicing. Taking the setting of the application as an example, the calculation formula of the double-path structure expansion convolution is as follows:
[0176]
[0177]
[0178] In the formula, f short (i t ) and f long (i t ) represent the i t -th weight of the short-term path and the long-term path, respectively; 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 time; i t represents the index of the element in the convolution kernel.
[0179] Step 2.4: The final outputs of the TCN of short-term and long-term dependencies are spliced, 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; is the spliced operation; Concat represents the splicing 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 relationship is as follows:
[0183] Step 3.1: BiGRU contains two GRU layers in forward and reverse directions, which process the input signal along the time in positive and inverse order respectively, and the calculation formula is as follows:
[0184]
[0185] In the formula, is the input data of the i-th IMF at time step t, and at this time is the hidden state of the i-th IMF at time step t-1; is the update gate vector, which controls the degree of update of the hidden state; is the reset gate vector, which controls how to combine the new input and the previous hidden state; is the candidate hidden state, which is a temporary state generated based on the current input and the previous hidden state; is the forward hidden state of the i-th IMF at time step t; W z , W r , W h respectively correspond to weight matrix; U z , U r , U h respectively correspond to weight matrix of hidden state to hidden layer; b z , b r , b h respectively correspond to bias vector; σ represents the Sigmoid activation function; tanh represents the hyperbolic tangent activation function; and represents the Hadamard product.
[0186] Step 3.2: reverse the sequence to obtain Take the obtained as the new input, repeat step 3.1 to generate the reverse hidden state
[0187] Step 3.3: splice the forward and reverse hidden states, and the output of the BiGRU is:
[0188]
[0189] In the formula, is the BiGRU output of the i-th IMF at time step t, obtained by splicing the forward and reverse hidden states; and are vector splicing operations that splice two vectors into a longer vector by column.
[0190] In step 4, the feature processing of the multi-head attention mechanism network includes the following steps:
[0191] Step 4.1: Split the Bi-GRU output matrix H (i) Map to query, key and value:
[0192] Q = H (i) W Q
[0193] K = H (i) W K
[0194] V = H (i) W V
[0195] where H (i) is the output matrix of Bi-GRU for the i-th IMF; Q, K, V are the query matrix, key matrix and value matrix; W Q ,W K ,W V are the weight matrices for mapping to query, key and value.
[0196] Step 4.2: Split the query, key and value into H heads, each head performs independent attention computation.
[0197] Q h = Split(Q, H), K h = Split(K, H), V h = Split(V, H)
[0198] where Q h , K h , V h are the query, key and value matrices for the h-th 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, providing the query matrix for each attention head respectively; Split(K, H) means splitting the key matrix K into H sub-matrices according to the number of attention heads H, providing the key matrix for each attention head respectively; Split(V, H) means splitting the value matrix V into H sub-matrices according to the number of attention heads H, providing the value matrix for each attention head respectively.
[0199] Step 4.3: Attention score computation:
[0200]
[0201] where scores h is the score matrix of the h-th attention head, representing the similarity between query and key; is the matrix product, calculating the dot product similarity between query and 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] where, h is the weight matrix of the h-th attention head, and represents the weighting 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 value and concatenation and output mapping:
[0206]
[0207]
[0208] where, is the output matrix of the h-th attention head; the role 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; respectively represent the output matrix of each attention head, and represent the weighted results calculated independently by each head.
[0209] In step 4, the calculation formula of the full connection network is as follows:
[0210]
[0211] where, pred [t] represents the prediction 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 full connection layer; b fc-out represents the bias vector of the full connection layer. At this time, a prediction value of an IMF is obtained; T q represents the total number of time steps, i.e., the length of the time series.
[0212] According to the different sub-components IMF i obtained in step 1.5, repeat steps 2 and 3 to obtain the prediction values of different IMF i . Therefore, the final prediction value calculation formula is:
[0213]
[0214] Where m is the total number of decomposition in step 1; y out is the final prediction result of output; y i pred is the prediction value of the i-th IMF component.
[0215] In step 5, the calculation formula of the prediction error is as follows:
[0216]
[0217] Where y Fin is the prediction residual; is the original sequence.
[0218] In step 5, the Bootstrap method is a non-parametric interval prediction method, which statistically infers the overall distribution characteristics by repeatedly resampling the target data y Fin . In the present application, the resampling with replacement is changed to time series sampling. Assuming that the original sample is y Fin ={y1, y2, …, y n}, n is the length of the sample.
[0219] The step 5 specifically comprises the following steps:
[0220] Step 5.1: Calculate the autocorrelation function (ACF) of the prediction residual sample y Fin , and the autocorrelation coefficient at lag k A . The calculation formula of ACF(k A ) is defined as:
[0221]
[0222] Where y is the mean of the sequence y Fin ; k A is the lag value; t i is the index; ACF(k A ) represents the autocorrelation function at lag k A , which is used to measure the correlation between different time points in the time series; represents the residual value of the sequence y Fin at t i ; represents the residual value of the sequence y Fin at time step t i +k A ; n represents the total length of the sequence, i.e. 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] where τ is a pre-set threshold, and the present application takes 0.4. When |ACF(k A )| is less than the threshold τ, it is considered that the dependence of the sequence at the lag is not significant; min is the minimum value.
[0226] Step 5.3: y Fin is divided into blocks with length l, and the divided y Fin is composed of different blocks:
[0227] y Fin = {A1, A2, …, An / l} n / l}
[0228] where A is the alias of the divided block; n / l is the number of blocks that need to be spliced, which ensures that the sample length is the same as the original sequence. A1, A2, …, A n / l are the divided sequence blocks, each of which contains a subsequence with length l.
[0229] Step 5.4: Randomly draw with replacement from all blocks, and each round of random draw with replacement obtains a new sample set C. Repeat K rounds to obtain K sample sets, and at this time the sample selection of the time series sampling method is completed.
[0230] Step 5.5: For each Bootstrap sample C k , calculate the statistical quantities: mean and variance; the overall mean of the K sample sets is calculated as follows:
[0231]
[0232] The overall sample variance is calculated as follows:
[0233]
[0234] where represents the mean of the kth Bootstrap sample, k = 1, 2, …, K; represents the overall mean; represents the variance estimate of the overall mean; K is the number of rounds of repetition, i.e., the total number of sample sets.
[0235] Step 5.6: According to the sample distribution characteristics and the critical value of the standard normal distribution , the upper limit U and the lower limit L of the prediction interval are constructed:
[0236]
[0237] In the formula, represents the mean value of the sequence; According to the confidence level determination, the confidence level of the present application is μ = 99%, that is, α = 0.01. Step 5.7: The above steps are repeated multiple times to generate a large number of Bootstrap samples. Specifically as follows:
[0238] By repeatedly randomly sampling multiple samples from the block, for each sample set, a prediction interval is calculated by step 5.5 and step 5.6. For the prediction interval (L, U) of each sample set, it is checked whether the true population mean falls within this interval. If it falls within the interval, it is considered that the prediction of the model is more accurate. Finally, it is counted how many of the K sample sets contain the true mean.
[0239] Step 5.8: Calculate the proportion of the number of successful coverages to the total number of times to get the coverage rate. Verify the matching degree of the prediction interval with the true value and generate the final prediction interval. The evaluation index of the prediction interval is represented by the following formula:
[0240]
[0241] In the formula, CR represents the coverage rate, that is, the proportion of the prediction interval covering the true value, and the higher the value, the more reliable the prediction interval; AIW represents the average interval width, and the smaller the width, the more accurate the prediction 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 the indicator function, which is 1 if the condition is true, and 0 otherwise.
[0242] Further, it further includes step 6: improving the quantile adjustment strategy to skewness coefficient adjustment prediction interval quantile, specifically as follows:
[0243] In order to further improve the coverage rate or compactness of the prediction interval, the present application proposes a dynamic optimization method based on skewness coefficient, improves the quantile adjustment strategy, and thus improves 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; S s > represents right skewness; S s <0 represents left skewness; and S s = 0 represents symmetric distribution; yi represents the i-th residual value; represents the mean value of the residual; n is the total number of samples in step 5.
[0247] Step 7: According to the calculated skewness result, 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, the quantile remains the standard value. The formula is expressed as follows:
[0248]
[0249] In the formula, L Q represents the lower bound quantile of the adjusted prediction interval; U Q represents the upper bound quantile of the adjusted prediction interval; μ represents the confidence level.
[0250] Embodiment:
[0251] Figure 4 The decomposition effect diagram of ICEEMDAN can be seen that the complexity of the original sequence is reduced by ICEEMDAN decomposition, and the decomposition residual is deleted.
[0252] Figure 5 The prediction effect diagram of the decomposition amount in the improved time convolution network TCN-BIGRU-MHA is shown. Figure 4
[0253] The commonly used evaluation index, root mean square error (RMSE) and mean absolute error (MAE), can be seen that with the decrease of the complexity of each component, the prediction effect of the model on the decomposition amount is significantly improved, and the error is lower. It shows that ICEEMDAN decomposition significantly improves the prediction accuracy of the model.
[0254] Figure 6 The comparison diagram of the final prediction results of TCN-BIGRU-MHA, improved TCN-BIGRU-MHA, ICEEMDAN-improved TCN-BIGRU-MHA is shown. It can be seen that the method (ICEEMDAN-improved TCN-BIGRU-MHA) and the measured value (black dotted line) follow most closely, showing the best fitting and the smallest prediction error.
[0255] Figure 7 The comparison diagram of the prediction interval before and after improvement (98% confidence level) is shown. It can be seen that the skewness adjusted prediction interval has a narrower prediction interval.
[0256] Table 1 Comparison of prediction interval evaluation indexes
[0257] Table 1 Comparison of prediction interval evaluation indexes name CR AIW Unbiased Adjusted Prediction Intervals 0.97935 3.3966*10 -3 ]]> Skewness-adjusted prediction intervals 0.98185 3.3319*10 -3 ]]>
[0258] Table 1 is a comparison of the unbiased and biased adjusted prediction interval evaluation metrics (98% confidence level). From the results, the biased adjusted prediction intervals have a greater ability to cover the true values than the unadjusted, and provide tighter prediction intervals. It can be seen that the biased adjustment method provides better coverage while more accurately limiting the width of the prediction intervals.
Claims
1. A method for predicting the measurement error interval of a mutual inductor based on a hybrid deep learning model and the Bootstrap method, characterized in that The following steps are involved: Step 1: Collect the operational 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 time domain convolutional network unit TCN to extract the features of 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 process the feature information y obtained in step 2 TCN Process the dependency and output the comprehensive feature y Bi ; Step 4: The comprehensive feature y output in step 3 Bi Input into 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 for the prediction error y Fin Perform statistical inference to obtain the error distribution interval at a given confidence level and generate interval prediction results; Step 5 includes the following steps: Step 5.1: Calculate the prediction residual sample y Fin The autocorrelation function ACF, at lag k A The autocorrelation coefficient under ; Step 5.2: Determine the block length l; Step 5.3: Set y Fin Divide into blocks of length l, then the divided y Fin It is composed of different blocks; Step 5.4: Randomly draw samples with replacement from all blocks. Each round of random drawing with replacement obtains a new sample set C. Repeat K rounds to obtain K sample sets. At this point, the sample selection of the time series sampling method is completed. Step 5.5: For each Bootstrap sample C k , calculate statistics: mean and variance; Step 5.6: Based on the sample distribution characteristics and the critical value of the standard normal distribution Construct the upper limit U and lower limit L of the prediction interval; Step 5.7: Repeat the above steps multiple times to generate a large number of Bootstrap samples; the details are as follows: Repeatedly randomly draw multiple samples from the block, and for each sample set, calculate a prediction interval using 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 so, the model's prediction is considered accurate. Finally, count how many of the K sample sets' prediction intervals contain the true mean. Step 5.8: Calculate the ratio of successful coverage times to the total number of times to obtain the coverage rate; verify the matching degree between the prediction interval and the true value, and generate the final prediction interval.
2. The method for predicting the mutual inductor measurement error interval based on a hybrid deep learning model and a Bootstrap method according to claim 1, characterized in that: In step 1, the adaptive noise complete ensemble empirical mode decomposition (ICEEMDAN) includes the following specific steps: Step 1.1: After acquisition, the difference data With the white noise sequence w j Combine to construct a new sequence The formula is as follows: Where, 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 obtain the first set of residuals R1: Where, 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 Where, Represents the collected difference data, that is, the original signal; At this point, the first mode function has been extracted from the original signal and represents a part of the independent components in the signal; Step 1.4: Iteratively calculate the residuals and modal components: Each time, a set 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: Where R i The i-th group of residuals for this decomposition represents the signal portion 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 modal component after EMD decomposition of j groups of 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 j-th 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 group i; Step 1.5: Finally, we get the complete decomposition result: 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 mutual inductor measurement error interval based on the hybrid deep learning model and the 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 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 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 mutual inductor measurement error interval 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 time domain convolutional network unit TCN receives the IMF in step 2 i As input, let x (i) =IMF i , which is calculated as follows: Where, is the convolution output at the current moment s; x represents the time series of the input; f d Represents the weight of the convolution kernel; k e is the size of the convolution kernel; d is the expansion 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: To take into account the extraction of both short-term and long-term dependencies, the TCN is changed to a dual-path structure. 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: Where, 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 outputs of the TCN for short-term and long-term dependencies. The calculation formula is as follows: Where, F short (x (i) ) represents the output of the short-term path; F long (x (i) ) represents the output of the long-term path; Concat is the concatenation operation, which combines the two outputs 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: Where, is the input data of the ith IMF at time step t, at this time is the hidden state of the i-th IMF at time step t-1; To update the gate vector, control the update degree of the hidden state; r t (i) To reset the gate vector, which controls how the new input and the previous hidden state are combined; The candidate hidden state is 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 respectively r t (i) 、 The weight matrix of U z 、U r 、U h Corresponding respectively r t (i) 、 The weight matrix from hidden state to hidden layer; b z 、b r 、b h Corresponding respectively r t (i) 、 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: Where, is the BiGRU output of the i-th IMF at time step t, obtained by concatenating the forward and reverse hidden states; [;] is the vector concatenation operation, which concatenates two vectors into a longer vector by column.
6. The method for predicting the mutual inductor measurement error interval 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: 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 ; Where H (i) is the output matrix of the Bi-GRU of the i-th 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) Where Q h ,K h ,V h are the query, key, and value matrices of the h-th 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; Step 4.3: Attention score calculation: In the formula, scores h is the score matrix of the h-th attention head, indicating the similarity between the query and the key; It is a 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 ); Where, α 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; Step 4.5: Weighted sum values and concatenate with the output map: Where, is the output matrix of the h-th 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 mutual inductor measurement error interval 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: Where y pred [t] represents the predicted value at time step t; is the eigenvector 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 Indicates 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 The predicted value of ; therefore, the final predicted value calculation formula is: Where m is still the total number of decompositions in step 1; y out is the final prediction result 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, at lag k A Autocorrelation coefficient under ACF(k A )The calculation formula is defined as: Where, 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 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: y Fin ={A1,A2,…,A n / l }; Where A is the name of the segmented block; n / l is the number of blocks 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. Each round of random drawing with replacement obtains a new sample set C. Repeat K rounds to obtain K sample sets. At this point, the sample selection of the time series sampling method is completed. Step 5.5: For each Bootstrap sample C k , calculate statistics: 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: Where, represents the mean of the k-th 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 limit U and lower limit L of the prediction interval: Where, represents the mean of the series; Determined according to the confidence level, confidence level μ = 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: Repeatedly randomly draw multiple samples from the block, and for each sample set, calculate a prediction interval using 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 so, the model's prediction is considered accurate. Finally, count how many of the K sample sets' prediction intervals contain the true mean. Step 5.8: Calculate the ratio of successful coverage times to the total number of times to obtain 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 as follows: Where CR represents coverage, that is, the proportion of the predicted interval covering the true value. The higher the value, the more reliable the prediction interval. AIW represents the average interval width. The smaller the width, the more accurate the prediction 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 and 0 otherwise.
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: Where S s Represents the skewness coefficient; skewness S s > indicates right deviation; S s <0 indicates 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.
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 distributions, the lower bound quantile is appropriately reduced and the upper bound quantile is expanded; for left-skewed distributions, the lower bound quantile is appropriately expanded and the upper bound quantile is reduced; for symmetric distributions, the quantiles remain at the standard value; the formula is expressed as follows: Where, L Q represents the lower bound 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