A power grid three-phase unbalance degree prediction method and system based on digital twinning

By using digital twin technology and time-series prediction models, the power grid load switching events are accurately captured, and an imbalance prediction curve is generated. This solves the problem of excessive three-phase imbalance in the power grid in traditional methods, and enables active control and stable operation of the power grid.

CN122456569APending Publication Date: 2026-07-24DOMAIN ELECTRIC GRP NANJING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DOMAIN ELECTRIC GRP NANJING CO LTD
Filing Date
2026-06-24
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Traditional methods are unable to effectively capture the nonlinear and stochastic characteristics of intermittent loads in the power grid, leading to excessive three-phase imbalance and a lack of predictive and proactive control strategies, which affects the safe and stable operation of the power grid.

Method used

The method for predicting three-phase imbalance in power grids based on digital twins collects data from intermittent load branches, constructs an event response sample library, and combines a time-series prediction model with long short-term memory networks and attention mechanisms to generate imbalance prediction curves, thereby realizing an active control strategy.

Benefits of technology

It improves the accuracy of three-phase imbalance prediction in the power grid, provides the ability to predict in advance and intervene proactively, reduces equipment damage and economic losses, and improves power supply reliability and grid adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122456569A_ABST
    Figure CN122456569A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of power grid power quality analysis, and provides a power grid three-phase unbalance degree prediction method and system based on digital twinning, which comprises: collecting instantaneous analysis data of intermittent load branch, determining whether a load switching event is triggered, if triggered, packaging event data of the load switching event, and arranging the event data in a historical period to obtain a load switching event sequence and perform response matching, establishing an event response sample library, constructing a digital twinning model and calibrating the model using the event response sample library, if a current load switching event is triggered, predicting using the digital twinning model to obtain a simulated response value prediction curve, constructing a time series prediction model to perform prediction, generating a learning response value prediction curve, and fusing the learning response value prediction curve with the simulated response value prediction curve to obtain an unbalance degree prediction curve, performing prediction unbalance degree over-standard determination based on the obtained unbalance degree prediction curve, and generating an active control strategy if over-standard.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power grid power quality analysis technology, specifically a method and system for predicting three-phase imbalance of power grid based on digital twins. Background Technology

[0002] In the operation and management of smart grids, three-phase imbalance is one of the key indicators for measuring power quality. With the grid connection of new energy sources, the popularization of distributed generation technology, and the widespread application of nonlinear loads, the proportion of intermittent loads in the power grid has increased significantly. These loads are characterized by discontinuous electricity consumption behavior, random switching, violent power fluctuations, and uncertain operating time. Their dynamic changes can lead to imbalances in the amplitude and phase of the three-phase current and voltage in the power grid, which in turn can cause problems such as increased transformer losses, line heating, relay protection malfunctions, and shortened lifespan of electrical equipment, seriously threatening the safe and stable operation of the power grid and the quality of power supply.

[0003] In traditional power grid planning and operation management, loads are usually assumed to be in a steady-state or slowly changing state. However, in actual operation, instantaneous actions such as the start-up and shutdown of electric arc furnaces and the high-power charging and discharging of charging stations can cause drastic fluctuations in three-phase currents, leading to a significant exceedance of three-phase imbalance in a short period of time. To address the problem of significant exceedance of three-phase imbalance, load switching events in the power grid are detected. Existing methods for detecting load switching events mainly include traditional threshold detection methods and pure physical model detection methods. However, traditional threshold detection methods are difficult to adapt to the random fluctuation characteristics of intermittent loads, often resulting in missed or false detections, causing subsequent predictions to lose key inputs. Pure physical models, on the other hand, are difficult to capture the nonlinear and random characteristics of load switching. Furthermore, existing methods mostly focus on post-event analysis and lack proactive control strategies based on prediction, making it impossible to achieve preventive intervention before the imbalance exceeds the standard.

[0004] To address the aforementioned problems, this invention proposes a method and system for predicting three-phase imbalance in power grids based on digital twins. Summary of the Invention

[0005] In order to overcome the shortcomings of the prior art, at least one technical problem raised in the background art is solved.

[0006] The technical solution adopted by this invention to solve the technical problem is: a method for predicting three-phase imbalance of a power grid based on digital twins, comprising: Instantaneous analysis data of intermittent load branches are collected to determine whether a load switching event is triggered. If triggered, the event data of the load switching event is encapsulated and processed within a historical time period to obtain a load switching event sequence. For load switching events that do not include the current load switching event within the load switching event sequence, response matching is performed to establish an event response sample library. A digital twin model is constructed and the model parameters are calibrated using the event response sample library. If a load switching event is triggered, the digital twin model is used for simulation and prediction to obtain the simulation response value prediction curve. A temporal prediction model combining long short-term memory network and attention mechanism is constructed. The model is used to make predictions based on event data of the current load switching event, generating a learning response value prediction curve. This curve is then fused with the simulated response value prediction curve to obtain the imbalance prediction curve. Based on the obtained imbalance prediction curve, the imbalance is predicted to exceed the standard. If the imbalance exceeds the standard, an active control strategy is generated. The method for determining whether a load switching event has been triggered is as follows: For intermittent load branches, three-phase instantaneous current and three-phase instantaneous voltage are collected in real time. The differential method is used to approximate the instantaneous current change rate between adjacent sampling points. The periods in the intermittent load branch where no load switching event occurred in the historical time period are marked as historical no-switching periods. Based on the mean of the instantaneous current change rate in the historical no-switching periods, the detection current change rate threshold is set according to the load type of the intermittent load branch, and a cumulative sum function is constructed. If the cumulative sum function value is greater than 0 and the duration exceeds the confirmation time threshold, a load switching event is determined to be triggered. The response matching method is as follows: After a load switching event occurs, the three-phase current phasor data at the point of common coupling, including amplitude and phase, are obtained. A complex operator is introduced, and the symmetrical component method is used to calculate the effective values ​​of the positive-sequence and negative-sequence currents. The actual unbalance response value is then calculated using the negative-sequence current unbalance formula. A hysteresis period is set starting from the time corresponding to the load switching event. A response period is extracted from the end of the hysteresis period. The hysteresis period and the response period are integrated and marked as the future period corresponding to the load switching event. All actual response values ​​of imbalance within the response period are obtained and compared. The largest actual response value of imbalance is selected as the response value of the corresponding load switching event to complete the response matching. The event response sample library is established as follows: The event data and response values ​​of each matched load switching event are integrated to form an event response sample pair. The cosine similarity between any two event response sample pairs is calculated. If it is greater than the preset similarity threshold, the two event response sample pairs are integrated into one event response sample pair by averaging. The time of the event response sample pair is retained as the corresponding time of the earlier time sequence in the two event response sample pairs used for averaging. All event response sample pairs are analyzed to obtain the event response sample library. The method for obtaining the simulated response value prediction curve is as follows: A digital twin model is constructed and its parameters are calibrated using an event response sample library. The input to the digital twin model is the event data of the load switching event and the effective value of the positive sequence current. The model is used for simulation and prediction, and the output is the predicted curve of the simulated response value in the future time period. Based on the event response sample library, a loss function is constructed and the model parameters are iteratively solved using the gradient descent method until a set of model parameters is found that minimizes the loss function, thus obtaining the calibrated digital twin model. The model is then used for simulation and prediction based on the event data of the current load switching event to obtain the predicted curve of the simulated response value. The learning response value prediction curve is obtained as follows: A temporal prediction model combining a long short-term memory network and an attention mechanism is constructed. The input data is integrated, including a sequence of temporal sample pairs obtained by integrating event response sample pairs from the event response sample library according to the time sequence, and event data of the current load switching event. The input data is processed and converted into a temporal matrix before being input into the temporal prediction model for training. The attention mechanism calculates the cosine similarity between the event data in the event response sample pair and the event data of the current load switching event to obtain attention weights, performs targeted analysis, outputs the predicted response value in the future time period, and generates a learning response value prediction curve. The imbalance prediction curve is obtained as follows: The future time period is divided into two equal time periods. Based on the two time periods, the analytic hierarchy process is used to assign different segment weights to the learning response value prediction curve and the simulated response value prediction curve in the two time periods. The learning response value prediction curve and the simulated response value prediction curve are weighted and fused together by combining the segment weights to obtain the imbalance prediction curve. The method for determining whether the predicted imbalance exceeds the standard is as follows: A sliding window is set for the imbalance prediction curve. The duration of the sliding window is fixed. It slides within a future time period, and the imbalance prediction curve within the sliding window is captured and marked as the window curve. The peak value within the window curve is obtained and compared with the preset power grid imbalance operation threshold. If the peak value exceeds the preset power grid imbalance operation threshold for a consecutive preset number of sliding windows within a future time period, it is determined that the predicted imbalance exceeds the standard. The active control strategy is obtained as follows: Active control strategies include the actual compensation current of the static var transmitter and the commutation switch control strategy; The unbalance prediction curve is used as a feedforward signal. Combined with the positive sequence current RMS value of the corresponding common coupling point, the compensation current of the static var transmitter is calculated. The calculated compensation current is dynamically adjusted using a model predictive control algorithm to obtain the actual compensation current of the static var transmitter. The time corresponding to the peak value of the unbalance prediction curve is obtained and marked as the peak time. The optimal switching time for the commutator is set to the time before the preset duration of the peak time. The grid operation state after the execution of the commutator control strategy is simulated and evaluated using a digital twin model. If the evaluation effect is good, the commutator control strategy is obtained; otherwise, it is replanned.

[0007] A digital twin-based three-phase imbalance prediction system for power grids includes the following modules: Event identification module: Collects instantaneous analysis data of intermittent load branches, determines whether a load switching event is triggered, and if triggered, encapsulates the event data of the load switching event and organizes it within the historical time period to obtain the load switching event sequence; Simulation Response Module: Matches responses to other load switching events within the load switching event sequence that do not include the current load switching event, establishes an event response sample library, constructs a digital twin model, and uses the event response sample library to calibrate model parameters. If a load switching event is triggered, the digital twin model is used to perform simulation prediction to obtain the simulation response value prediction curve. Learning prediction module: Constructs a time-series prediction model that combines long short-term memory network and attention mechanism, makes predictions based on event data of the current load switching event, generates a learning response value prediction curve, and fuses it with the simulated response value prediction curve to obtain the imbalance prediction curve. Strategy generation module: Based on the obtained imbalance prediction curve, it predicts whether the imbalance exceeds the standard. If it does, it generates an active control strategy.

[0008] The beneficial effects of this invention are as follows: 1. This invention accurately captures dynamic change nodes in the power grid by collecting instantaneous analysis data of intermittent load branches and determining load switching events. After compiling the load switching event sequence, an event response sample library is established to calibrate the parameters of the digital twin model, making the model more realistic. Combined with the time series prediction model, a learning response value prediction curve is generated and merged with the simulation curve, which greatly improves the prediction accuracy and provides a reliable basis for understanding the changes in the three-phase imbalance of the power grid in advance, thus ensuring the stable operation of the power grid.

[0009] 2. This invention uses an accurately obtained imbalance prediction curve to determine if the imbalance exceeds the standard, enabling early detection of potential risks to the power grid. Once an imbalance is detected, a targeted proactive control strategy can be quickly generated to adjust the power grid's operating status in a timely manner, avoiding accidents such as equipment damage and power outages caused by excessive three-phase imbalance. This not only reduces power grid operation and maintenance costs and economic losses, but also improves power supply reliability, provides users with better power services, and enhances the power grid's adaptability in complex environments. Attached Figure Description

[0010] The invention will now be further described with reference to the accompanying drawings.

[0011] Figure 1 This is a flowchart illustrating the steps of a method for predicting three-phase imbalance in a power grid based on digital twins, as described in an embodiment of the present invention. Figure 2 This is a module architecture diagram of a power grid three-phase imbalance prediction system based on digital twins, as described in an embodiment of the present invention. Detailed Implementation

[0012] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0013] Example 1 Please see Figure 1 As shown in the embodiment of the present invention, a method for predicting three-phase imbalance of a power grid based on digital twins includes the following steps: S1: Collect instantaneous analysis data of intermittent load branches, determine whether a load switching event is triggered, and if triggered, encapsulate the event data of the load switching event and organize it within the historical time period to obtain the load switching event sequence; Specifically, in the power grid, for intermittent load branches, high-precision voltage and current sensors with a sampling rate of fs are selected and directly connected to the secondary side of the current transformer (CT) and voltage transformer (PT) of the load feeder. The NTP clock protocol is used synchronously to collect instantaneous analysis data in real time, including three-phase instantaneous current. With three-phase instantaneous voltage To ensure the consistency of the timing of the collected three-phase instantaneous current and three-phase instantaneous voltage; Where phase={a、b、c} represents the different phases, and t represents the time corresponding to the sampling point obtained based on the sampling period Ts=1 / fs; It should be noted that intermittent load branches refer to specific power supply circuits in the power grid distribution network or transmission network that are connected to intermittent loads. Intermittent loads are loads whose electricity consumption behavior is not continuous and irregular, and which have the characteristics of random switching, large power fluctuations, and uncertain operating time. For example, intermittent load branches include electric arc furnaces, large charging stations, etc. For the three-phase instantaneous current of an intermittent load branch, the rate of change of the instantaneous current between adjacent sampling points is approximately calculated using the finite difference method: ; in, This represents the three-phase instantaneous current. The change between adjacent sampling points, Ts represents the sampling period; Set the duration to end at the current time. The historical period is a sliding historical period that changes with the current time. The historical period is represented as... ,in, Indicates the current time; The periods during which no load switching events occurred in the intermittent load branch within the historical time period are marked as historical no-switching periods. The mean instantaneous current change rate within the historical no-switching periods is calculated. Set the threshold for the rate of change of the detection current according to the load type of the intermittent load branch. Construct the cumulative sum function over time t : ; in, It represents the cumulative sum function over time t-1; It should be noted that the cumulative sum function It represents the cumulative degree of deviation of the instantaneous rate of change of current over time t; when If the value is greater than 0 and the duration exceeds the confirmation time threshold, a load switching event is triggered. It should be noted that a load switching event refers to the instantaneous action of a load changing from an inactive state to an active state or from an active state to an inactive state. If no load switching event is triggered, the collection and accumulation of instantaneous analysis data and the calculation of the sum function will continue. If a load switching event is triggered, the identified load switching event is encapsulated with structured data and marked as the event data of the currently triggered load switching event. ; ; The currently triggered load switching event is the nth load switching event within the historical time period. This indicates the event type of load switching events, including start-up and stop, determined by power change. The sign of the event is determined as follows: a positive power change indicates a start-up event, while a negative power change indicates a stop-up event. Indicates the category of belonging to a particular type. This indicates a unique identifier for the load. It represents the change in power, which is obtained by processing the instantaneous current and three-phase instantaneous voltage data collected. The event data of all load switching events within the historical period are organized according to time sequence to generate a load switching event sequence. The currently triggered load switching event is the last load switching event in the historical period. It should be noted that this step ensures the timing consistency of three-phase current and voltage data through high-precision sensors and the NTP clock protocol, providing accurate raw data for subsequent event detection. The current change rate is calculated using the differential method, and combined with the cumulative sum function and time threshold, the switching behavior of intermittent loads is dynamically detected, generating structured event data and event sequences. By dynamically matching the mean of the current change rate with the threshold, the random switching of intermittent loads such as electric arc furnaces and charging stations can be accurately captured, reducing the missed detection rate. The event data encapsulates key features such as power change, time, and phase, providing standardized input for subsequent response analysis and improving data utilization efficiency. By analyzing the current change rate of adjacent sampling points and determining the duration of the cumulative sum function, the real-time performance and noise resistance of event detection are balanced. Compared with the traditional threshold method, it is more suitable for load fluctuation scenarios. The switching events are sorted by time to generate a sequence, laying the foundation for the time-series correlation analysis of subsequent event responses and breaking through the limitations of traditional single-point detection. S2: Match the responses of other load switching events in the load switching event sequence that do not include the current load switching event, establish an event response sample library, construct a digital twin model and calibrate it using the event response sample library. If the current load switching event is triggered, use the digital twin model to perform simulation prediction and obtain the simulation response value prediction curve. Specifically, for any load switching event in the load switching event sequence that does not include the current load switching event, the three-phase current phasor data at the point of common coupling (PCC) after the load switching event occurs is acquired through the Supervisory Control and Data Acquisition (SCADA) system, including amplitude and phase. The actual unbalance response value is calculated using the negative sequence current unbalance formula. : ; in, This represents the effective value of the positive sequence current. This represents the effective value of the negative sequence current. and All are calculated using the symmetrical component method with the introduction of complex operators based on three-phase current phasor data; Based on the time corresponding to the load switching event Set the duration for the starting point. The hysteresis period is defined as the period ending at the end of the hysteresis period, and a segment of duration is extracted as the load switching event. The response time period is represented as the hysteresis time period. The response time period is represented as ,Will As a future time period for load switching events, all actual response values ​​of imbalance within the response period are obtained and compared, and the largest actual response value of imbalance is selected as the response value of the corresponding load switching event.

[0014] The event data and response values ​​of each load switching event, excluding the current load switching event, are integrated to form event response sample pairs. For all event response sample pairs, they are organized into vectors. The cosine similarity between the corresponding vectors of any two event response sample pairs is calculated. If the cosine similarity is greater than a preset similarity threshold, the two event response sample pairs are integrated into one event response sample pair by averaging. The time of the event response sample pair is retained as the corresponding time of the earlier time in the two event response sample pairs used for averaging. All event response sample pairs are analyzed to obtain the event response sample library. A digital twin model is constructed based on the physical laws of power systems, and the model parameters are calibrated using an event response sample library. The model parameters include the system equivalent impedance, load power factor, and load transient time constant for each phase. The input of the digital twin model is the event data of load switching events and the effective value of positive sequence current. The digital twin model is used for simulation and prediction, and the output is the predicted curve of the simulated response value in the corresponding future time period. Based on the event response sample library, a loss function is constructed and the model parameters are iteratively solved using the gradient descent method until a set of model parameters is found that minimizes the loss function, thus obtaining the calibrated digital twin model. It should be noted that among the model parameters, the equivalent impedance of each phase is the core basis for the digital twin model to calculate the current distribution and quantify the imbalance. It directly affects the simulation accuracy of the digital twin model in response to load switching events. The load power factor refers to the ratio of the active power to the apparent power of the intermittent load. It directly determines the accuracy of the digital twin model in converting the relationship between load power and current. It is the bridge connecting event characteristics and grid response. The load transient time constant refers to the time characteristic parameter of the intermittent load transitioning from the moment of switching to steady-state operation. Essentially, it is a physical quantity that describes how fast the load power and current change with time.

[0015] If a load switching event is triggered, the event data of the current load switching event and the calculated positive sequence current effective value of the common connection point are input into the digital twin model for simulation and prediction, and the simulation response value prediction curve for the future time period starting from the current time is obtained. It should be noted that this step involves obtaining the three-phase current phasors at the PCC point from the SCADA system, calculating the actual response value of the unbalance, integrating similar samples through cosine similarity to build a highly reliable sample library, and using this sample library to optimize the parameters of the digital twin model based on physical laws, thereby improving the model's simulation accuracy for load switching. Integrating similar event responses through cosine similarity reduces redundant data, enhances the representativeness of the sample library, and makes model training more efficient. The digital twin model is calibrated by combining the physical laws of the power system with historical data, ensuring the physical interpretability of the model while improving prediction accuracy through data optimization. The positive and negative sequence currents are calculated based on the complex operators of the three-phase current phasors, accurately quantifying the unbalance. Compared with the traditional amplitude comparison method, this is more in line with the actual operating characteristics of the power system. At the same time, it optimizes core parameters such as the system's equivalent impedance and power factor, enabling the digital twin model to achieve comprehensive and accurate simulation of current distribution, power conversion, and transient processes, breaking through the limitations of single parameter optimization. S3: Construct a temporal prediction model that combines long short-term memory network and attention mechanism, make predictions based on event data of the current load switching event, generate a learning response value prediction curve, and fuse it with the simulated response value prediction curve to obtain the imbalance prediction curve. Specifically, a time-series prediction model combining a Long Short-Term Memory (LSTM) network and an attention mechanism is constructed. The input data is integrated, including a sequence of time-series sample pairs obtained by integrating event response sample pairs from the event response sample library according to the time sequence, and event data of the current load switching event. For missing values ​​and outliers in the time-series sample pairs, statistical analysis methods are used to identify, supplement, and correct them. Before training the time-series prediction model, the input data is normalized to map features of different magnitudes to the same range, avoiding the impact of data scale differences on the training effect of the time-series prediction model. To prevent overfitting, a Dropout layer is added between the LSTM layer and the fully connected layer to randomly drop some neurons, thereby enhancing the generalization ability of the time-series prediction model. After normalization, the input data is converted into a time series matrix and then input into the time series prediction model for training. In the Attention layer of the time series prediction model, the cosine similarity between the event data in the event response sample pair and the event data of the current load switching event is calculated to obtain the event response sample pairs that have a greater impact on the current prediction by highlighting the attention weights. The LSTM layer uses the attention weights to capture the complex interaction effects between events and the recovery law of the system, outputs the predicted response value in the future time period, and generates the learning response value prediction curve. By combining the simulated response value prediction curve, the generated learning response value prediction curve is fused with the simulated response value prediction curve. Specifically, the future time period is divided into two uniform time periods. Based on the two time periods, the analytic hierarchy process is used to assign different segment weights to the learning response value prediction curve and the simulated response value prediction curve in the two time periods. The learning response value prediction curve and the simulated response value prediction curve are then weighted and fused together to obtain the imbalance prediction curve. It should be noted that this step utilizes LSTM combined with an attention mechanism to capture the temporal dependencies of event responses and weight key historical events, thereby enhancing the predictive model's ability to capture complex interactive effects. The simulated response prediction curve of the digital twin model and the learned response prediction curve of the time-series prediction model are fused in a segmented and weighted manner to generate a more robust imbalance prediction curve. LSTM processes long-term time-series data, while the attention mechanism highlights historical events that have a significant impact on the current prediction, effectively addressing the randomness and nonlinearity of intermittent load switching. The physical constraints of the digital twin model and the data-driven advantages of the LSTM model complement each other. The segmented and weighted fusion adapts to the prediction characteristics of different time periods, reducing the error of a single model. Compared to traditional time-series models, it more accurately captures the causal relationships of load switching. Based on the analytic hierarchy process (AHP), weights are allocated to future time periods in stages, allowing the digital twin model and the time-series prediction model to leverage their respective strengths at different times, improving the dynamic adaptability of the prediction. S4: Based on the obtained imbalance prediction curve, determine whether the imbalance exceeds the standard. If it does, generate an active control strategy. Specifically, a sliding window approach is used to analyze the unbalance prediction curve. A sliding window is set for the unbalance prediction curve, with a fixed duration. The sliding window slides within a future time period, and the unbalance prediction curve within the sliding window is captured and marked as the window curve. The peak value within the window curve is obtained and compared with a preset power grid unbalance operating threshold. If the peak value exceeds the preset power grid unbalance operating threshold for a consecutive preset number of sliding windows within a future time period, it is determined that the predicted unbalance exceeds the standard, triggering an active control process. If the predicted imbalance does not exceed the standard, the active control process will not be triggered, and the collection and subsequent analysis of instantaneous analysis data will continue to predict the power grid imbalance. It should be noted that the purpose of using a sliding window is to effectively avoid false triggering caused by short-term fluctuations; If the active control process is triggered, an active control strategy is generated. The active control strategy includes the actual compensation current of the static var transmitter and the commutation switch control strategy. The unbalance prediction curve is used as a feedforward signal. Combined with the positive sequence current RMS value of the corresponding point of common coupling, the compensation current of the static var transmitter (SVG) is calculated. The model predictive control (MPC) algorithm is used to dynamically adjust the calculated compensation current based on the real-time operating status of the power grid, the capacity limit of the SVG, and the compensation effect data in the historical period, so as to obtain the actual compensation current of the SVG. The phase switching control strategy is set according to the imbalance prediction curve. The time corresponding to the peak value of the imbalance prediction curve is obtained and marked as the peak time. The optimal switching time of the phase switching is set before the preset time of the peak time. The power grid operation status after the phase switching control strategy is executed is simulated and evaluated using a digital twin model. It is determined whether the phase switching control strategy can effectively balance the three-phase load and ensure the safe operation of the power grid. If it can, the evaluation effect is good, and the phase switching control strategy is recorded. Otherwise, it is replanned. The imbalance prediction curve is integrated with the active control strategy and sent to the operation and maintenance personnel's terminal for early warning, so that the operation and maintenance personnel can quickly understand the situation and respond. It should be noted that the purpose of this step is to analyze the unbalance prediction curve through a sliding window, determine the risk of unbalance exceeding the standard by combining the peak value of the continuous window, trigger the active control process, use the prediction curve as a feedforward signal, calculate the SVG compensation current by combining the MPC algorithm, optimize the switching time of the commutator, and evaluate the control effect through simulation using a digital twin model. Based on the sliding window analysis of the unbalance prediction curve, it avoids false triggering due to short-term fluctuations, realizes early intervention for unbalance exceeding the standard, reduces the risk of power grid operation, and combines SVG compensation with commutator control to take into account both dynamic compensation accuracy and load phase adjustment, thereby improving the comprehensiveness and effectiveness of three-phase balance control.

[0016] The technical solution of this invention is as follows: Instantaneous analysis data of intermittent load branches is collected to determine whether a load switching event is triggered. If triggered, the event data of the load switching event is encapsulated and processed within a historical time period to obtain a load switching event sequence. Response matching is performed on other load switching events within the load switching event sequence that do not include the current load switching event. An event response sample library is established. A digital twin model is constructed and calibrated using the event response sample library. If a load switching event is currently triggered, the digital twin model is used for simulation prediction to obtain a simulated response value prediction curve. A time-series prediction model combining a long short-term memory network and an attention mechanism is constructed. Prediction is performed using the event data of the current load switching event to generate a learned response value prediction curve. This curve is then fused with the simulated response value prediction curve to obtain an imbalance prediction curve. Based on the obtained imbalance prediction curve, an imbalance exceeding the standard is determined. If the standard is exceeded, an active control strategy is generated.

[0017] Example 2 like Figure 2 As shown in the embodiment of the present invention, a power grid three-phase imbalance prediction system based on digital twins includes the following modules: Event identification module: Collects instantaneous analysis data of intermittent load branches, determines whether a load switching event is triggered, and if triggered, encapsulates the event data of the load switching event and organizes it within the historical time period to obtain the load switching event sequence; Simulation Response Module: Matches responses to other load switching events within the load switching event sequence that do not include the current load switching event, establishes an event response sample library, constructs a digital twin model, and uses the event response sample library to calibrate model parameters. If a load switching event is triggered, the digital twin model is used to perform simulation prediction to obtain the simulation response value prediction curve. Learning prediction module: Constructs a time-series prediction model that combines long short-term memory network and attention mechanism, makes predictions based on event data of the current load switching event, generates a learning response value prediction curve, and fuses it with the simulated response value prediction curve to obtain the imbalance prediction curve. Strategy generation module: Based on the obtained imbalance prediction curve, it predicts whether the imbalance exceeds the standard. If it does, it generates an active control strategy.

[0018] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for predicting three-phase imbalance in a power grid based on digital twins, characterized in that: include: Instantaneous analysis data of intermittent load branches are collected to determine whether a load switching event is triggered. If triggered, the event data of the load switching event is encapsulated and processed within a historical time period to obtain a load switching event sequence. For load switching events that do not include the current load switching event within the load switching event sequence, response matching is performed to establish an event response sample library. A digital twin model is constructed and the model parameters are calibrated using the event response sample library. If a load switching event is triggered, the digital twin model is used for simulation and prediction to obtain the simulation response value prediction curve. A temporal prediction model combining long short-term memory network and attention mechanism is constructed. The model is used to make predictions based on event data of the current load switching event, generating a learning response value prediction curve. This curve is then fused with the simulated response value prediction curve to obtain the imbalance prediction curve. Based on the obtained imbalance prediction curve, the imbalance is predicted to exceed the standard. If the imbalance exceeds the standard, an active control strategy is generated.

2. The method for predicting three-phase imbalance of a power grid based on digital twins according to claim 1, characterized in that: The method for determining whether a load switching event has been triggered is as follows: For intermittent load branches, three-phase instantaneous current and three-phase instantaneous voltage are collected in real time. The differential method is used to approximate the instantaneous current change rate between adjacent sampling points. The periods in the intermittent load branch where no load switching event occurred in the historical time period are marked as historical no-switching periods. Based on the average instantaneous current change rate in the historical no-switching periods, a detection current change rate threshold is set according to the load type of the intermittent load branch, and a cumulative sum function is constructed. If the cumulative sum function value is greater than 0 and the duration exceeds the confirmation time threshold, a load switching event is determined to be triggered.

3. The method for predicting three-phase imbalance of a power grid based on digital twins according to claim 1, characterized in that: The response matching method is as follows: After a load switching event occurs, the three-phase current phasor data at the point of common coupling, including amplitude and phase, are obtained. A complex operator is introduced, and the symmetrical component method is used to calculate the effective values ​​of the positive-sequence and negative-sequence currents. The actual unbalance response value is then calculated using the negative-sequence current unbalance formula. A hysteresis period is set starting from the time corresponding to the load switching event. A response period is extracted from the end of the hysteresis period. The hysteresis period and the response period are integrated and marked as the future period corresponding to the load switching event. All actual response values ​​of imbalance within the response period are obtained and compared. The largest actual response value of imbalance is selected as the response value of the corresponding load switching event, thus completing the response matching.

4. The method for predicting three-phase imbalance of a power grid based on digital twins according to claim 3, characterized in that: The event response sample library is established as follows: The event data and response values ​​of each matched load switching event are integrated to form event response sample pairs. The cosine similarity between any two event response sample pairs is calculated. If it is greater than the preset similarity threshold, the two event response sample pairs are integrated into one event response sample pair by averaging. The time of the event response sample pair is retained as the corresponding time of the earlier time sequence of the two event response sample pairs used for averaging. All event response sample pairs are analyzed to obtain the event response sample library.

5. The method for predicting three-phase imbalance of a power grid based on digital twins according to claim 4, characterized in that: The method for obtaining the simulated response value prediction curve is as follows: A digital twin model is constructed and its parameters are calibrated using an event response sample library. The inputs to the digital twin model are the event data of load switching events and the RMS value of positive sequence current. The model is used for simulation and prediction, and the output is the predicted curve of the simulated response value in the future time period. Based on the event response sample library, a loss function is constructed and the model parameters are iteratively solved using the gradient descent method until a set of model parameters is found that minimizes the loss function, thus obtaining the calibrated digital twin model. The model is then used for simulation and prediction based on the event data of the current load switching event to obtain the predicted curve of the simulated response value.

6. The method for predicting three-phase imbalance of a power grid based on digital twins according to claim 3, characterized in that: The method for obtaining the learning response value prediction curve is as follows: A temporal prediction model combining a long short-term memory network and an attention mechanism is constructed. The input data is integrated, including a sequence of temporal sample pairs obtained by integrating event response sample pairs from the event response sample library according to the time sequence, and event data of the current load switching event. The input data is processed and converted into a temporal matrix before being input into the temporal prediction model for training. The attention mechanism calculates the cosine similarity between the event data in the event response sample pair and the event data of the current load switching event to obtain attention weights, performs targeted analysis, outputs the predicted response value in the future time period, and generates a learning response value prediction curve.

7. The method for predicting three-phase imbalance of a power grid based on digital twins according to claim 6, characterized in that: The imbalance prediction curve is obtained as follows: The future time period is divided into two equal time periods. Based on the two time periods, the analytic hierarchy process (AHP) is used to assign different segment weights to the learned response value prediction curve and the simulated response value prediction curve in the two time periods. The learned response value prediction curve and the simulated response value prediction curve are then weighted and fused together to obtain the imbalance prediction curve.

8. The method for predicting three-phase imbalance of a power grid based on digital twins according to claim 6, characterized in that: The method for determining whether the predicted imbalance exceeds the standard is as follows: A sliding window is set for the imbalance prediction curve. The duration of the sliding window is fixed and it slides within a future time period. The imbalance prediction curve within the sliding window is captured and marked as the window curve. The peak value within the window curve is obtained and compared with the preset power grid imbalance operation threshold. If the peak value exceeds the preset power grid imbalance operation threshold for a consecutive preset number of sliding windows within a future time period, it is determined that the predicted imbalance exceeds the standard.

9. The method for predicting three-phase imbalance of a power grid based on digital twins according to claim 3, characterized in that: The active control strategy is obtained as follows: Active control strategies include the actual compensation current of the static var transmitter and the commutation switch control strategy; The unbalance prediction curve is used as a feedforward signal. Combined with the positive sequence current RMS value of the corresponding common coupling point, the compensation current of the static var transmitter is calculated. The calculated compensation current is dynamically adjusted using a model predictive control algorithm to obtain the actual compensation current of the static var transmitter. The time corresponding to the peak value of the unbalance prediction curve is obtained and marked as the peak time. The optimal switching time for the commutator is set to the time before the preset duration of the peak time. The grid operation state after the execution of the commutator control strategy is simulated and evaluated using a digital twin model. If the evaluation effect is good, the commutator control strategy is obtained; otherwise, it is replanned.

10. A power grid three-phase imbalance prediction system based on digital twins, the system being used to implement the prediction method as described in any one of claims 1-9, characterized in that: Includes the following modules: Event identification module: Collects instantaneous analysis data of intermittent load branches, determines whether a load switching event is triggered, and if triggered, encapsulates the event data of the load switching event and organizes it within the historical time period to obtain the load switching event sequence; Simulation Response Module: Matches responses to other load switching events within the load switching event sequence that do not include the current load switching event, establishes an event response sample library, constructs a digital twin model, and uses the event response sample library to calibrate model parameters. If a load switching event is triggered, the digital twin model is used to perform simulation prediction to obtain the simulation response value prediction curve. Learning prediction module: Constructs a time-series prediction model that combines long short-term memory network and attention mechanism, makes predictions based on event data of the current load switching event, generates a learning response value prediction curve, and fuses it with the simulated response value prediction curve to obtain the imbalance prediction curve. Strategy generation module: Based on the obtained imbalance prediction curve, it predicts whether the imbalance exceeds the standard. If it does, it generates an active control strategy.