Closed-loop current prediction method based on residual error correction
By constructing a CNN-BiLSTM neural network model and combining it with a Markov chain model to correct the residuals, the problem of low accuracy in loop current prediction was solved, thereby improving the power supply reliability and stability of the power grid.
Patent Information
- Application Number
- CN202511582061.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-17
AI Technical Summary
Existing technologies have low accuracy in predicting closed-loop current, making it difficult to handle source-load uncertainties and timing characteristics. Traditional methods are also difficult to adapt to complex power grid conditions, resulting in insufficient information for equipment protection and system operation optimization, which affects power supply reliability and stability.
A residual-corrected method for predicting closed-loop current is adopted. A CNN-BiLSTM neural network model is constructed for preliminary prediction, and a Markov chain model is used to correct the residuals to improve the prediction accuracy.
It significantly improves the accuracy of loop current prediction, provides reliable data support for the safe and stable operation of the power grid, and reduces errors caused by source-load uncertainty.
Smart Images

Figure CN121542604A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution network operation control technology, specifically to a method for predicting closed-loop current based on residual correction. Background Technology
[0002] When a distribution network performs load transfer, it generates a significant loop current. The inrush current at the moment of loop closing can cause protection malfunctions, resulting in power outages and significantly reducing power supply reliability. Furthermore, with economic development, more and more users are seeking more stable power quality. Accurate prediction of the loop current is crucial for maintaining grid stability and improving the reliability of the power system. However, the large-scale integration of distributed energy sources, primarily photovoltaic and wind power, and the increasing complexity of load demands make loop current prediction increasingly complex. Therefore, considering the uncertainties of source and load and the fluctuations in output, accurate prediction of the loop current plays a vital role in improving the safety and stability of the power system.
[0003] Traditional loop current calculations only consider a single point in time, neglecting the temporal characteristics of the loop current and failing to provide comprehensive and effective information for equipment safety protection and system operation optimization. Besides the coupling relationship between distributed energy output and load demand and the loop current affecting the calculation accuracy, the loop current is also coupled with meteorological factors due to the significant influence of distributed energy and load demand on these factors, greatly impacting the results. Traditional loop current calculation methods are ill-suited to the increasingly complex power grid conditions of today. Modeling the load size in feeders, the output of distributed power sources, and the topology is complex and highly stochastic.
[0004] Meanwhile, the development of Supervisory Control and Data Acquisition (SCADA) systems and data-driven models has provided new approaches to loop current calculation, abstracting the original problem into loop current prediction involving multiple factors. This allows for the acquisition of loop current time-period results, providing important data for improving power supply reliability and stability. While data-driven models offer new insights for loop current prediction, single prediction models struggle to simultaneously address feature extraction and time-series dependency capture capabilities, and errors caused by source-load fluctuations remain unresolved. Therefore, a high-precision loop current prediction method that can effectively handle complex data characteristics and reduce the impact of uncertainties is urgently needed. Summary of the Invention
[0005] To address the problems of low accuracy in loop current prediction and difficulty in handling source-load uncertainties and timing characteristics in existing technologies, this invention provides a loop current prediction method based on residual correction to improve the accuracy of loop current prediction and provide support for the safe and stable operation of distribution networks.
[0006] The technical solution adopted in this invention is as follows:
[0007] The closed-loop current prediction method based on residual correction includes the following steps:
[0008] Step 1, Data Acquisition and Preprocessing: Collect relevant data on the loop current of the distribution network, including historical data of the loop current, historical data of the source and load, and power system operation data;
[0009] Step 2, Preliminary Prediction: Construct a CNN-BiLSTM neural network model, input the preprocessed data into the CNN-BiLSTM neural network model for feature extraction and time series prediction, and obtain the preliminary predicted value of the loop current;
[0010] Step 3, Residual Correction: Calculate the residual sequence between the preliminary predicted value of the closed loop current and the actual value of the closed loop current. Use a Markov chain model to analyze and predict the residual sequence. Based on the predicted residual, correct the preliminary predicted value to obtain the final predicted value of the closed loop current.
[0011] In step 1, the relevant data for the closed-loop current includes:
[0012] Historical data on loop closing current, including the time, location, and current value of historical loop closing operations;
[0013] Historical source and load data, including output data from nearby photovoltaic and wind power plants, as well as historical bus load data;
[0014] Power system operation data, including generator output power and operating status, as well as voltage and current measurements at each node;
[0015] The acquisition interval for loop current related data is 10 minutes, and high-frequency sampling is triggered when a voltage surge or switching signal is detected to capture the loop transient process data.
[0016] In step 2, the CNN-BiLSTM neural network model includes:
[0017] CNN feature extraction module: includes convolutional layers, pooling layers, activation function layers, and fully connected layers;
[0018] The convolutional layer extracts local features by performing convolution operations on the input intrinsic mode function and residual components using convolution kernels; the specific formula is as follows:
[0019]
[0020] In formula (1): Let m be the output value of the j-th feature map in the L-th layer; m is the number of input feature maps. This represents the j-th feature map in the (L-1)-th layer; For trainable convolutional kernels; This is a bias term.
[0021] The activation function layer uses the ReLU function to introduce nonlinearity. The ReLU activation function formula is:
[0022] f(x) = max(0,x) (2);
[0023] Finally, the output of the convolutional layer is:
[0024]
[0025] In equation (3), The output value of the convolutional layer; f(i) is the output value of the j-th feature map in the L-th layer; f(i) is the activation function.
[0026] The pooling layer uses max pooling or average pooling to reduce the dimension of the feature map. The specific formula is as follows:
[0027]
[0028] In equation (4): This is the output value of the pooling layer; is the output value of the convolutional layer; down(·) is the downsampling function.
[0029] The fully connected layer integrates the extracted local features into global features and maps the previous mappings to the corresponding positions, making the model structure more complete.
[0030] BiLSTM time series prediction module: Composed of forward LSTM model and backward LSTM model, it receives global features output by CNN feature extraction module, captures long-term data dependencies through forward and backward propagation, and outputs preliminary prediction value of closed loop current.
[0031] Step 2 involves constructing a closed-loop current prediction model based on a CNN-BiLSTM neural network model, which includes the following steps:
[0032] S2.1: Data preprocessing: Remove loop current data that deviates too much from the normal value, and take the average value of data with large fluctuations to make the whole data more complete.
[0033] S2.2: Feature Extraction: CNNs directly achieve deep data mining and obtain deep features by adjusting the size and direction of the convolution kernel.
[0034] S2.3: Result Prediction: Input the deep features obtained by CNN into BiLSTM for forward and backward propagation prediction.
[0035] S2.4: Output Predicted Value: The predicted values of each component are summed to obtain the output predicted value of the closed-loop current x. t .
[0036] Step 3 includes the following steps:
[0037] S3.1: Calculate the residual sequence values:
[0038] The residual sequence σ is obtained by subtracting the actual value of the closed-loop current from the predicted value based on the CNN-BiLSTM neural network model. t =(σ1,σ2,σ3,…,σ n ), σ t This represents the difference between the actual value and the predicted value.
[0039] S3.2: Divide the state interval:
[0040] Calculate the sample mean of the residual sequence And the standard deviation μ, using the mean-standard deviation grading method, the residual sequence is divided into 5 intervals, namely:
[0041] S3.3: Construct the state transition matrix:
[0042] Let state E i To E j The one-step transition probability is P ij The specific formula is:
[0043] P ij =m ij / M i (5);
[0044] In equation (5): m ij For E i One step to E j The number of times; M i For state E i The total number of transitions. Then, denote the one-step transition matrix as...
[0045]
[0046] Based on the memoryless and homogeneous properties of Markov chains, the multi-step transition matrix P can be obtained. (k) P (k) =P (1)k .
[0047] S3.4: Make a prediction:
[0048] According to P (1) The current state vector E is obtained. i The state vector E at the next momentj If the state vector E at the next moment j Satisfy: P ij =max{P i1 P i2 ...P in}, where P ij The residual value is determined by state E. i After a step, the state transitions to state E. j If the transition probability is such that E is considered to be... j This represents the state interval for the next time step.
[0049] S3.5: Residual correction:
[0050] The median value of the error interval is taken as the predicted value and combined with the predicted value obtained from the CNN-BiLSTM neural network model to obtain the corrected model prediction value Y. t =x t +0.5(E j1 +E j2 ), where Y t x is the corrected model prediction; t E represents the predicted value obtained by the CNN-BiLSTM model. j1 With E j2 To determine the upper and lower limits of the residual state interval, if the state interval is in E1, the lower limit is the minimum value of the sequence; if the state interval is in E5, the upper limit is the maximum value of the sequence.
[0051] This invention provides a closed-loop current prediction method based on residual correction, with the following technical advantages:
[0052] 1) In step 1 of the present invention, considering the time-varying nature of the loop current and source load, as well as the instantaneous impact current during loop closure, data is acquired at 10-minute intervals. Furthermore, when a voltage surge or switching signal is detected, the high-frequency sampling module (high-speed ADC) is triggered to briefly operate to capture the loop closure transient process, thereby supplementing the data integrity and improving the accuracy of the data.
[0053] 2) In step 2 of the present invention, convolutional neural networks (CNNs) are usually used to process high-dimensional data. However, since the data has temporal characteristics, BiLSTM neural networks with strong temporal analysis capabilities are introduced to predict the data and improve the accuracy.
[0054] 3) In step 3 of the present invention, due to the uncertainty of the source load and the fluctuation of the output, there will be certain errors in the actual prediction of the closed loop current. Therefore, in order to make the prediction results more accurate, the present invention introduces a Markov chain model to perform residual correction on the predicted value of the closed loop current, thereby further improving the prediction accuracy.
[0055] 4) This invention can effectively extract hidden features of data, capture time-series dependencies, and reduce errors caused by source-load uncertainty, significantly improving the accuracy of loop current prediction and providing reliable data support for the safe and stable operation of the power grid. Attached Figure Description
[0056] The present invention will be further described below with reference to the accompanying drawings and examples;
[0057] Figure 1 This is a schematic diagram of the LSTM structure.
[0058] Figure 2 This is a schematic diagram of the BiLSTM structure.
[0059] Figure 3 This is a flowchart of the prediction method.
[0060] Figure 4 This is a flowchart for residual correction. Detailed Implementation
[0061] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0062] This paper presents a residual-corrected method for predicting closed-loop current. Addressing the issue of insufficient prediction accuracy due to large-scale distributed energy integration and complex load demands, this method constructs a CNN-BiLSTM neural network model for initial prediction. Then, a Markov chain model is introduced to correct the prediction residuals, ultimately outputting a high-precision closed-loop current prediction result. The method includes the following steps:
[0063] Step 1: Data Acquisition and Preprocessing
[0064] Collect data related to the closed-loop current of the distribution network, including:
[0065] ① Historical data of loop closing current: the time, location and current value of historical loop closing operations, as well as the changes in voltage and current of the system after loop closing. Record the currents at the two ends of the loop closing line, denoted as Ia and Ib.
[0066] ② Source and load historical data: output data of nearby photovoltaic and wind power, as well as historical data of related bus loads;
[0067] ③ Power system operation data: generator output power and operating status, as well as voltage and current measurements at each node, etc.
[0068] Meanwhile, the acquisition interval for the closed-loop current related data is 10 minutes, and high-frequency sampling is triggered when a voltage surge or switching signal is detected to capture the closed-loop transient process data.
[0069] Step 2, Preliminary Prediction:
[0070] Convolutional Neural Networks (CNNs) are a type of feedforward neural network capable of processing grid-like data. CNNs are suitable for processing and analyzing large-scale data, possessing efficient parallel computing capabilities that allow for rapid processing of large amounts of data and extraction of useful features. This study utilizes CNNs to perform convolution operations on multivariate data of closed-loop current at different time points, fully mining the temporal characteristics of the data and achieving global feature extraction of the closed-loop current data.
[0071] The CNN network is mainly divided into the following parts:
[0072] 1) Convolutional layer: Consists of multiple convolutional kernels. These kernels slide across the input data and perform convolution operations to extract features. The specific formula is:
[0073]
[0074] In formula (1): Let m be the output value of the j-th feature map in the L-th layer; m is the number of input feature maps. This represents the j-th feature map in the (L-1)-th layer; For trainable convolutional kernels; This is a bias term.
[0075] 2) Activation Function Layer: Introducing non-linearity enables the neural network to learn more complex features. Commonly used activation functions include ReLU, Sigmoid, and Tanh. ReLU is one of the most commonly used activation functions; it sets all negative values to 0, keeps positive values unchanged, and is differentiable at all points. Therefore, ReLU can solve the vanishing and exploding gradient problems in backpropagation of neural networks. The activation function layer uses ReLU to introduce non-linearity. The ReLU activation function formula is:
[0076] f(x) = max(0,x) (2);
[0077] Finally, the output of the convolutional layer is:
[0078]
[0079] In equation (3), The output value of the convolutional layer; f(i) is the output value of the j-th feature map in the L-th layer; f(i) is the activation function.
[0080] 3) Pooling Layer: This layer reduces the dimensionality of the feature map, decreases computation, and further extracts information from the feature map, primarily serving to deeply mine the internal features of the data. Common pooling methods include max pooling and average pooling. Max pooling selects the maximum value within the pooling window as the pooling result, while average pooling calculates the average value within each pooling window as the output. The specific formula is as follows:
[0081]
[0082] In equation (4): This is the output value of the pooling layer; is the output value of the convolutional layer; down(·) is the downsampling function.
[0083] 4) Fully connected layer: Located at the end of the CNN, it integrates the extracted local features into global features. It can combine the outputs of the previous layers and obtain the output through linear transformation and activation functions.
[0084] LSTM is a special type of recurrent neural network (RNN) designed to process sequential data, and it performs particularly well in tasks that require capturing long-term dependencies. LSTM networks can handle prediction problems of long-term sequence data very well. Figure 1 This is a schematic diagram of an LSTM structure, mainly composed of a forget gate, an input gate, and an output gate. Through the cooperation of these three gates, LSTM can effectively determine which historical information is forgotten, which input information is retained, and which information can be output, thus processing time series more efficiently. The forget gate determines which information to discard from the cell state, generating a value between 0 and 1 through a sigmoid function, representing the degree of retention for each state value. The input gate consists of two parts: a sigmoid function determines which values will be updated, and a tanh function generates a new candidate value vector. The outputs of these two parts are multiplied to obtain the updated candidate values. The cell state is the core of the LSTM, carrying information from previous time steps, and the cell state update is obtained by adding the output of the forget gate to the output of the input gate. The output gate determines the value of the next hidden state. It uses a sigmoid function to determine which cell states will be output, then uses a tanh function to generate candidate values for the output state, and finally combines these two parts to form the final output.
[0085] The formula for LSTM operation is:
[0086] f t =σ(W f ·[h t-1 x t ]+b f );
[0087] i t =σ(W i ·[h t-1 x t ]+b i );
[0088]
[0089] o t =σ(W o ·[h t-1 x t ]+b o );
[0090] h t =o t ·tanh(C t );
[0091] Where, x t h is the input to the neural network at time t; t f is the output at time t; t i t o t These are outputs from the forget gate, input gate, and output gate, respectively. and the current input unit state; C t W represents the cell state output of the network at time t. f W i W c W o These are the weight matrices for the forget gate, input gate, current input cell state, and output gate, respectively; b f b i b c b o σ and tanh are the bias matrices for the forget gate, input gate, current input cell state, and output gate, respectively; σ and tanh are activation functions, where σ is the sigmoid function and tanh is the hyperbolic tangent function.
[0092] After calculating the output value, the update formulas for the loss value, network weights, and biases are as follows:
[0093] C = |h′(t) - h(t)|;
[0094]
[0095] Where h′(t) is the predicted output value, and h(t) is the actual value. Let W be the learning rate, and W and b be the weight matrix and bias matrix before the update, respectively. W′ and b′ are the weight matrix and bias matrix after the update, respectively.
[0096] Bidirectional Long Short-Term Memory (BiLSTM) is a variant of the LSTM model, consisting of a forward LSTM model and a backward LSTM model. While LSTM can learn sequentially over time, it only captures information from the forward flow of data, neglecting the influence of future data on the current moment. Adding a backward LSTM allows for the capture of information from the reverse flow of data, extracting past information missed by the LSTM model and thus global features. Using a BiLSTM network can reduce prediction error and improve prediction accuracy. A schematic diagram of the BiLSTM structure is shown below. Figure 2 As shown. The calculation formula for BiLSTM is:
[0097]
[0098]
[0099] Among them, w t v is the connection recurrent weight matrix of the feedforward LSTM layer; t This is the connection loop weight matrix for the backward LSTM layer.
[0100] To address the complex and non-stationary characteristics of historical loop current and source-load data, the raw data is preprocessed, then input into a CNN for deep mining to extract in-depth features. These features are then passed to a BiLSTM neural network with strong time-series analysis capabilities for prediction. The specific steps are as follows:
[0101] 1) Data preprocessing: Collect relevant data on the loop current of the distribution network, including historical data of the loop current, historical data of the source and load, and power system operation data.
[0102] 2) Feature extraction: CNN performs deep mining on the data to obtain deep features.
[0103] 3) Result prediction: The extracted features are fed into BiLSTM for forward and backward propagation.
[0104] 4) Output predicted value: The predicted values of each component are superimposed to obtain the output predicted value.
[0105] Step 3, Residual Correction:
[0106] Due to the uncertainty of source load and the fluctuation of output, there will be certain errors in the prediction of closed loop current. Therefore, in order to make the prediction results more accurate, this invention introduces a Markov chain model to perform residual correction on the predicted value of closed loop current, thereby improving the prediction accuracy.
[0107] Markov chain prediction models are stochastic process models based on the Markov property. Their core idea is that the future state of a system depends only on the current state, not on past states. This "memoryless" property makes Markov chains highly effective for processing time series data. Markov chain prediction models predict the probability of possible future states of a system and are typically applied to data with random variations and fluctuations. The Markov prediction steps are as follows:
[0108] 1) State partitioning: Divide the input samples into several states E1, E2, E3, ..., E m These states only exist in t1, t2, t3, ..., t m The state transition can be written as E1 = [a] i b i ], i=1,2,3,…,n, where a i and b i These are the upper and lower limits of the interval.
[0109] 2) Calculate the transition matrix: Let state E i To E j The one-step transition probability is P ij The specific formula is:
[0110] P ij =m ij / M i (5);
[0111] In the formula, m ij For E i One step to E j The number of times; M i For state E i The total number of transitions. Then, denote the one-step transition matrix as...
[0112]
[0113] 3) Predicting future states: If the current state is E i Satisfying P ij =max{P i1 P i2 ...P in If we consider the state after one step transition to the next time step as E, then we can assume that E is the state at the next time step transition. j .
[0114] In closed-loop current prediction, the intermittent and uncertain nature of distributed energy resources such as solar and wind power leads to significant fluctuations in the output data of nearby photovoltaic and wind power, resulting in certain errors in the prediction results. The Markov residual correction model can correct the prediction results. Using the residual between the predicted and actual values obtained from the CNN-BiLSTM neural network as the input sequence, the state transition matrix of the residual is obtained. Then, a Markov chain prediction model is applied to handle the data volatility, reducing the residual values to a smaller range and improving prediction accuracy. The specific steps are as follows:
[0115] 1) Calculate the residual sequence value: Subtract the actual value of the closed-loop current from the predicted value based on the CNN-BiLSTM model to obtain the residual sequence σ. t =:σ1,σ2,σ3,…,σ n ;;
[0116] 2) Divide the state intervals: Calculate the sample mean of the residual sequence. And the standard deviation μ, using the mean-standard deviation grading method, the residual sequence is divided into 5 intervals, namely:
[0117] 3) Construct the state transition matrix: Calculate the one-step transition matrix P (1) Based on the memoryless and homogeneous properties of Markov chains, the multi-step transition matrix P can be obtained. (k) ;
[0118] 4) Make predictions: based on P (1) E is derived i In the state vector at the next moment, if E j Satisfy: P ij =max{P i1 P i2 ...P in}, then E is considered j This represents the state interval for the next time step.
[0119] 5) Residual Correction: The median value of the error interval is taken as the predicted value and combined with the predicted value obtained from the CNN-BiLSTM neural network to obtain the corrected model prediction value.
[0120] Y t =x t +0.5(E j1 +E j2 (7);
[0121] Among them, Y t x is the corrected model prediction; t E represents the predicted value obtained by the CNN-BiLSTM model.j1 With E j2 To determine the upper and lower limits of the residual state interval, if the state interval is in E1, the lower limit is the minimum value of the sequence; if the state interval is in E5, the upper limit is the maximum value of the sequence.
[0122] Verification Example:
[0123] This invention uses a 10kV loop-closing feeder experiment in a certain region of a province as the background, covering the period from July 1st to December 1st of a certain year. Considering the time-varying nature of the loop-closing current and source loads, as well as the instantaneous inrush current during loop closure, data is collected at 10-minute intervals. A high-frequency sampling module (high-speed ADC) is triggered to briefly operate when a voltage surge or switching signal is detected to capture the loop-closing transient process. The dataset mainly includes: 1. Historical loop-closing current data (time, location, and current value of historical loop-closing operations, as well as the voltage and current changes of the system after loop closure; the currents at both ends of the loop-closing line are denoted as Ia and Ib); 2. Historical source load data (output data of nearby photovoltaic and wind power plants, as well as historical data of related bus loads); 3. Power system operation data (generator output power and operating status, and voltage and current measurements at each node, etc.).
[0124] To accurately evaluate the constructed closed-loop current prediction model, a root mean square error E is introduced. RMSE Mean absolute percentage error E MAPE Mean absolute error E MAE Maximum error E max and fitting coefficients As an indicator for evaluating model accuracy, the root mean square error Em is used. RMSE Larger errors can be penalized more severely; mean absolute percentage error E MAPE Mean Absolute Error (MEO) represents the percentage of the average deviation between predicted and actual values, and is highly sensitive to outliers; MAE The penalty for small errors is relatively small.
[0125]
[0126] In the formula, N is the number of samples. For the predicted value, x t This is the actual value. E is the average of the actual values. RMSE Highlighting the prediction deviation of the closed-loop current at extreme points, E MAPE E reflects the degree of deviation between the predicted and actual values. MAE E represents the average prediction error of the closed-loop current over a time period. max Emphasizing the limits of the predicted loop current deviation from the actual value, This reflects the degree of fit between the predicted and measured loop current curves.
[0127] To demonstrate the necessity of residual correction prediction and the feasibility of the proposed model, the prediction results of the closed loop current under the two models are compared: Model 1: prediction based on CNN-BiLSTM model; Model 2: prediction based on CNN-BiLSTM model, followed by residual correction using Markov model. The comparison is shown in Tables 1 and 2.
[0128] The network was set to have 3 layers, with a dropout layer added after each hidden layer to prevent overfitting. The dropout value was set to 0.16, the training batch size was set to 64, the training epochs were set to 100, the initial learning rate was set to 0.001, and the activation function saturation rate was set to 3. The convolutional kernel size and the number of neurons were 5 and 64, respectively, and the BiLSTM neural network had 64 neurons.
[0129] Table 1 Comparison of Ia results before and after correction
[0130]
[0131] Table 2 Comparison of Ib results before and after correction
[0132]
[0133] In Table 1, the error index E of model 2 after Markov residual correction is compared with that of model 1 without correction. RMSE E MAE E MAPE The fitting coefficients decreased by 18.75%, 23.68%, and 14.28% respectively. It increased by 5.38% at the maximum current E max The error rate dropped from 7% to 2%; and in Table 2, the error index E of the residual-corrected model 2 compared to model 1... RMSE E MAE E MAPE The fitting coefficient decreased by 22.22%, 8.33%, and 20.00% respectively. Increased by 5.32%, E max The accuracy of the closed-loop current has increased significantly after the correction, from 8% to 1%. Therefore, the residual correction prediction model proposed in this invention has good feasibility and can be well adapted to the situation of distributed energy access and uncertainty of source and load.
Claims
1. A method for predicting a closing current based on a residual correction, characterized in that The method comprises the following steps: Step 1, data acquisition and preprocessing: collecting loop current related data of the power distribution network, the data comprising loop current historical data, source and load historical data and power system operation data; Step 2, preliminary prediction: constructing a CNN-BiLSTM neural network model, inputting the data after preprocessing into the CNN-BiLSTM neural network model for feature extraction and time series prediction, and obtaining a preliminary loop current prediction value; Step 3, residual correction: calculating a residual sequence of the preliminary loop current prediction value and the actual loop current value, analyzing and predicting the residual sequence by using a Markov chain model, correcting the preliminary prediction value based on the predicted residual, and obtaining a final loop current prediction value.
2. The method of claim 1, wherein the method further comprises: In step 1, the loop current related data comprises: Loop current historical data, including the time, position and current value of historical loop operation; Source and load historical data, including output data of adjacent photovoltaic and wind power and related bus load historical data; Power system operation data, including output power and operation state of the generator and voltage and current measurement values of each node; The collection interval of the loop current related data is 10 minutes, and high-frequency sampling is triggered to capture loop transient process data when a voltage mutation or a switch signal is detected.
3. The method of claim 2, wherein the method further comprises: In step 2, the CNN-BiLSTM neural network model comprises a CNN feature extraction module, and the CNN feature extraction module comprises a convolution layer, a pooling layer, an activation function layer and a full connection layer; The convolution layer performs convolution operation on the input eigenmode function and residual component through a convolution kernel to extract local features; the specific formula is: In formula (1): is the output value of the jth feature map of the Lth layer; m is the number of input feature maps; is the jth feature map of the L-1 layer; is a trainable convolution kernel; is a bias term; The activation function layer adopts a ReLU function to introduce nonlinearity, and the ReLU activation function formula is: f(x)=max(0,x) (2); Finally, the output of the convolution layer is: In formula (3), is an output value of the convolution layer; is an output value of the jth feature map of the Lth layer; f(i) is an activation function; The pooling layer adopts maximum pooling or average pooling to reduce the feature map dimension, and the specific formula is: In formula (4), is the output value of the pooling layer; is the output value of the convolution layer; down(·) is a down-sampling function; The full connection layer integrates the extracted local features into global features, and maps the previous mapping to the corresponding position to make the model structure more perfect.
4. The method of claim 3, wherein the method further comprises: The CNN-BiLSTM neural network model comprises a BiLSTM time series prediction module, which is composed of a forward LSTM model and a backward LSTM model, receives the global features output by the CNN feature extraction module, captures long-term data dependency relationship through forward and backward propagation, and outputs a preliminary loop current prediction value.
5. The method of claim 4, wherein: In step 2, the loop current prediction model based on the CNN-BiLSTM neural network model comprises the following steps: S2.1: data preprocessing: removing loop current data with a large deviation from the normal value, and taking the average value of the data with large fluctuations; S2.2: feature extraction: CNN directly realizes deep mining of data by adjusting the size and moving direction of the convolution kernel, and obtains deep features; S2.3: result prediction: the deep features obtained by CNN are input into BiLSTM for forward and backward propagation prediction; S2.4: Output prediction: The prediction values of the components are summed to obtain the output prediction of the closed-loop current x t .
6. The method of claim 5, wherein: Step 3 comprises: calculating the residual sequence value: The actual value of the closed-loop current is subtracted from the predicted value based on the CNN-BiLSTM neural network model to obtain a residual sequence σ t = σ1, σ2, σ3,..., σ n ), σ t is the difference between the actual value and the predicted value.
7. The method of claim 6, wherein the method further comprises: Step 3 comprises: dividing the state interval: a sample mean of the sequence of residuals and a standard deviation μ, the sequence of residuals is divided into five intervals using the mean-standard deviation classification method, in order Constructing a state transition matrix: Let state E i To E j The one-step transition probability is P ij The specific formula is: P ij = m ij / M i (5) In formula (5): m ij is E i one step to E j the number of times; M i is the state E i the total number of transitions; then record the one-step transition matrix as According to the memoryless and homogeneity of Markov chain, the multi-step transition matrix P (k) can be calculated (l) = (P (1) ) k .
8. The method of claim 7, wherein the method further comprises: The step 3 includes: according to P (1) The state vector E i The state vector E j The state vector E j If the state vector E ij = max (P i1 , P i2 , … P in ), wherein P ij is the transition probability from the state E i to the state E j by one step, then the state E j is considered as the state interval of the next moment.
9. The method of claim 8, wherein the method further comprises: The step 3 comprises: taking the middle value of the error interval as a prediction value combined with the prediction value obtained by the CNN-BiLSTM neural network model to obtain a corrected model prediction value Y t = x t + 0.5(E j1 + E j2 ), wherein Y t is the corrected model prediction value; x t is the prediction value obtained by the CNN-BiLSTM model; E j1 and E j2 are the upper and lower limits of the determined residual state interval, if the state interval is in E1, the lower limit takes the minimum value of the sequence, and if the state interval is in E . , the upper limit takes the maximum value of the sequence.
10. The method of claim 9, wherein the method further comprises: determining a difference between the first and second values of the residual voltage; and adjusting the first value of the residual voltage based on the determined difference. To accurately evaluate the constructed loop current prediction model, the root mean square error E RMSE , the mean absolute percentage error E MAPE , the mean absolute error E MAE , the maximum error E max and the fitting coefficient are introduced as the indicators for evaluating the accuracy of the model; wherein the root mean square error E RMSE can give greater punishment to larger errors; the mean absolute percentage error E MAPE represents the average deviation percentage between the predicted value and the actual value, and is sensitive to outliers; the mean absolute error E MAE punishes small errors less N is the number of samples in the above formula, E is the prediction value, x t E is the actual value, E is the average value of the actual value; E RMSE E highlights the prediction deviation of the closed-loop current at the extreme point, MAPE E reflects the deviation between the prediction value and the actual value, MAE E represents the average prediction error of the closed-loop current in the time period, max E highlights the limit of the deviation of the closed-loop current prediction value from the actual value, E reflects the fitting degree of the closed-loop current prediction curve and the measured curve.