A microgrid anti-backflow control method and system based on multi-objective optimization

Through the multi-objective optimization microgrid anti-countercurrent control method, a dynamic anti-countercurrent threshold is generated using the spatiotemporal convolutional neural network and the multi-objective particle swarm optimization algorithm, which solves the problem of microgrid countercurrent control, and realizes the safe and stable operation of the power grid and the dynamic management of countercurrent risks.

CN120262411BActive Publication Date: 2025-08-08HANGZHOU KGOOER ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510749339.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-08-08
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

The existing microgrid countercurrent control technology is difficult to dynamically deal with complex and changeable operating environments, resulting in grid voltage fluctuations, equipment damage and safe operation risks.

Method used

The microgrid anti-countercurrent control method based on multi-objective optimization is adopted, and the multi-modal power grid characteristics are extracted through the spatiotemporal convolution neural network, and dynamic load prediction results are generated. Combined with the real-time output power data of the power converter PCS, a feature matrix of anti-countercurrent risk is constructed. A multi-objective particle swarm optimization algorithm is used to generate a dynamic anti-countercurrent threshold curve, and a real-time collaborative verification module is used to eliminate threshold jump conflicts, generate anti-perturbation optimization thresholds, and finally converted into PCS power regulation instructions to achieve adaptive power clamp protection.

Benefits of technology

It has improved the intelligence level of countercurrent prevention and control of microgrids, ensured the safe and stable operation of the power grid, dynamically responded to complex and changeable operating environments, and reduced the risk of countercurrent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120262411B_ABST
    Figure CN120262411B_ABST
Patent Text Reader

Abstract

The present invention discloses a microgrid backflow prevention control method and system based on multi-objective optimization. The method comprises: generating a dynamic load forecast result based on the grid-side voltage, user-side load power, and energy storage system charge state data collected in real time by the energy management system; obtaining a backflow risk quantification index based on the dynamic load forecast result; generating a corresponding dynamic backflow prevention threshold curve based on the backflow risk quantification index; correcting the dynamic backflow prevention threshold curve through a real-time collaborative verification module to generate an anti-disturbance optimization threshold; converting the anti-disturbance optimization threshold into a PCS power control instruction, synchronously displaying the threshold execution status and backfeed warning information on the energy management interface, and triggering adaptive power clamping protection when voltage exceeding the limit or power reverse is detected. The embodiments of the present invention can improve the intelligent level of backflow prevention and control in microgrids and ensure the safe and stable operation of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of microgrid backflow prevention, and in particular to a microgrid backflow prevention control method and system based on multi-objective optimization. Background Art

[0002] With the rapid development of renewable energy and the continuous improvement of distributed generation technology, microgrids, as intelligent distribution systems with independent operation capabilities, have attracted widespread attention and application. By integrating various energy resources, including photovoltaic power generation, wind power generation, energy storage equipment, and load management systems, microgrids achieve efficient energy utilization and flexible scheduling, providing a new solution for modern power systems.

[0003] However, while achieving efficient energy utilization, microgrids also face safety and stability issues such as reverse feeding (backflow). Backflow refers to the phenomenon in which, under certain operating conditions, electrical energy in a microgrid is transferred from the load side to the grid or to other microgrids. This can not only cause grid voltage fluctuations and damage equipment, but also compromise system safety and power quality. In severe cases, it can lead to grid failures and equipment failures. Existing backflow control technologies primarily rely on fixed threshold settings or simple monitoring and adjustment measures, making them difficult to dynamically adapt to the complex and changing operating environment of microgrids. Summary of the Invention

[0004] The purpose of the present invention is to provide a microgrid backflow prevention control method and system based on multi-objective optimization to address the deficiencies in the existing technology, improve the intelligence level of microgrid backflow prevention and control, and ensure the safe and stable operation of the power grid.

[0005] An embodiment of the present application provides a microgrid backflow prevention control method based on multi-objective optimization, the method comprising:

[0006] Based on the grid-side voltage, user-side load power, and energy storage system charge status data collected in real time by the energy management system, a spatiotemporal convolutional neural network is used to extract multimodal grid characteristics and generate dynamic load forecast results. The spatiotemporal convolutional neural network integrates grid fluctuation trends and user electricity consumption behavior patterns.

[0007] Based on the dynamic load forecast results and combined with the real-time output power data of the power converter PCS, an anti-backflow risk characteristic matrix is constructed, and the matrix is mapped to a multidimensional optimization space using an adaptive eigendecomposition algorithm to obtain a quantitative index of the backflow risk;

[0008] Based on the quantitative index of reverse flow risk, a multi-objective particle swarm optimization algorithm is used to determine the optimal solution set of the anti-reverse flow threshold. The multi-objective particle swarm optimization algorithm takes suppressing reverse feeding, minimizing the amount of abandoned solar and wind power, and ensuring the life of energy storage as optimization goals, and generates a corresponding dynamic anti-reverse flow threshold curve;

[0009] The dynamic anti-backflow threshold curve is modified through a real-time collaborative verification module. By combining the grid impedance parameters and the PCS response delay model, a mixed integer programming algorithm is used to eliminate the threshold jump conflict and generate an anti-disturbance optimization threshold.

[0010] The anti-disturbance optimization threshold is converted into a PCS power control instruction, and the threshold execution status and backfeed warning information are synchronously displayed on the energy management interface. When voltage exceeding the limit or power reverse is detected, the adaptive power clamp protection is triggered.

[0011] Optionally, the method extracts multimodal grid features through a spatiotemporal convolutional neural network based on the grid-side voltage, user-side load power, and energy storage system state of charge data collected in real time by the energy management system to generate dynamic load forecast results. The spatiotemporal convolutional neural network integrates grid fluctuation trends and user electricity consumption behavior patterns, including:

[0012] Based on the millisecond sampling sequence of grid-side voltage, minute-level statistics of user-side load power, and second-level variation data of energy storage state of charge, a pulse-triggered spatiotemporal alignment encoder is used to compensate for the sampling time differences of multi-source data through a dynamic time warping algorithm to generate a spatiotemporally aligned raw data tensor.

[0013] Performing chaos noise suppression processing on the raw data tensor, separating the high-frequency noise and low-frequency trend components of power grid fluctuations using a dynamic weight matrix, and outputting a noise-reduced time-frequency feature matrix;

[0014] Input the user's historical electricity consumption behavior data into the spatiotemporal attention network, match the current load characteristics with the behavior pattern library through a sliding window, generate a user behavior embedding vector, and perform cross-modal fusion of the user behavior embedding vector with the time-frequency feature matrix to obtain a multimodal power grid feature tensor;

[0015] The multimodal power grid feature tensor is input into a bidirectional gated spatiotemporal convolutional network, which captures the long-term and short-term load correlations through residual connections and outputs the dynamic load forecast results and confidence intervals for the next 15 minutes.

[0016] Optionally, based on the dynamic load forecast result and in combination with the real-time output power data of the power converter PCS, an anti-backflow risk characteristic matrix is constructed, and the matrix is mapped to a multidimensional optimization space using an adaptive eigendecomposition algorithm to obtain a quantitative index of the backflow risk, including:

[0017] Based on dynamic load forecast results and PCS real-time power data, the power deviation rate, voltage offset, and energy storage charge and discharge rate are calculated to construct a backflow prevention risk feature matrix with time and space dimensions.

[0018] Adopting an adaptive rotation factor decomposition algorithm to perform orthogonal decomposition of the risk characteristic matrix, the backfeed sensitivity factor, the curtailment factor, and the energy storage life attenuation factor are separated to generate a multi-dimensional risk characteristic vector.

[0019] Based on the real-time operation status of the power grid, the weight ratio of each factor in the multi-dimensional risk feature vector is adjusted through a dynamic game strategy;

[0020] ‌ Perform outlier detection on the adjusted multi-dimensional risk feature vector, use generative adversarial networks to simulate feature distributions in extreme scenarios, and reconstruct a multi-dimensional optimized vector with enhanced robustness;

[0021] The multidimensional optimization vector is input into the radial basis function interpolation model to generate the quantitative index of backflow risk and its probability density distribution curve.

[0022] Optionally, based on the quantitative index of the reverse flow risk, a multi-objective particle swarm optimization algorithm is used to determine the optimal solution set of the anti-reverse flow threshold, wherein the multi-objective particle swarm optimization algorithm takes suppressing reverse feeding, minimizing the amount of abandoned solar and wind power, and ensuring the life of energy storage as optimization goals, and generates a corresponding dynamic anti-reverse flow threshold curve, including:

[0023] According to the probability density distribution of the quantitative indicators of reverse flow risk, a chaotic perturbation strategy is used to initialize the particle swarm position, and a three-dimensional target space is set for backfeed suppression, minimization of solar and wind curtailment, and energy storage life guarantee.

[0024] Based on the historical optimal solution distribution of the particle swarm, the sliding mode control algorithm is used to adjust the weight coefficients of each optimization target in the three-dimensional target space in real time;

[0025] ‌Build a coupled constraint model between energy storage charge and discharge rate and PCS power output, and use a pulse-triggered constraint relaxation algorithm to eliminate infeasible solutions in particle swarm iteration;

[0026] The convex hull of the Pareto front solution set generated by the particle swarm is reconstructed, and the redundant solutions are eliminated using the dynamic density clustering algorithm to generate a high-density distributed anti-backflow threshold candidate set;

[0027] The candidate set of anti-backflow thresholds is input into the spatiotemporal smoothing filter, and the curve jump is eliminated through the Lyapunov stability constraint, and a dynamic anti-backflow threshold curve that meets the safe operation of the power grid is output.

[0028] Optionally, the dynamic anti-backflow threshold curve is corrected by a real-time collaborative verification module, and a mixed integer programming algorithm is used to eliminate threshold jump conflicts by combining grid impedance parameters and a PCS response delay model to generate an anti-disturbance optimization threshold, including:

[0029] An equivalent circuit model is constructed based on the grid impedance parameters. Combined with the PCS response delay test data, a collaborative verification model that includes transmission loss and response lag is constructed.

[0030] The dynamic anti-backflow threshold curve is input into the collaborative verification model, and the threshold jump conflict points in adjacent time windows are detected through pulse sequence scanning;

[0031] For the detected threshold jump conflict points, an optimization model including discrete time variables and continuous power variables is constructed, and the branch and bound algorithm is used to solve the anti-disturbance threshold sequence with the minimum adjustment amount;

[0032] Perform dynamic stability check on the anti-disturbance threshold sequence, enhance the robustness of the threshold curve under grid frequency fluctuations through the phase margin compensation algorithm, and generate the final anti-disturbance optimization threshold.

[0033] Optionally, converting the anti-disturbance optimization threshold into a PCS power control instruction, synchronously displaying the threshold execution status and backfeed warning information on the energy management interface, and triggering adaptive power clamping protection when voltage exceeding the limit or power reverse is detected, includes:

[0034] The anti-disturbance optimization threshold is input into the PCS power mapping model, and the threshold curve is converted into a millisecond-level power control instruction sequence through a dynamic interpolation algorithm;

[0035] ‌Build a 3D visualization engine in the energy management interface to render the execution progress of power control instructions, backfeed warning areas, and energy storage charge state heat map in real time;

[0036] ‌ Pulse edge detection technology is used to monitor the grid voltage and power direction. When voltage exceeds the limit or reverse power is detected, a graded alarm signal is triggered;

[0037] ‌According to the graded alarm signal, the corresponding multi-level power clamping protection strategy is activated.

[0038] Another embodiment of the present application provides a microgrid backflow prevention control system based on multi-objective optimization, the system comprising:

[0039] An extraction module, which is used to extract multimodal grid characteristics using a spatiotemporal convolutional neural network based on grid-side voltage, user-side load power, and energy storage system state-of-charge data collected in real time by the energy management system, to generate dynamic load forecast results. The spatiotemporal convolutional neural network integrates grid fluctuation trends and user electricity consumption behavior patterns.

[0040] A construction module is used to construct an anti-backflow risk characteristic matrix based on the dynamic load forecast result and the real-time output power data of the power converter PCS, and map the matrix to a multidimensional optimization space using an adaptive eigendecomposition algorithm to obtain a quantitative index of the backflow risk;

[0041] A generation module is used to determine the optimal solution set of the anti-backflow threshold based on the reverse flow risk quantitative index using a multi-objective particle swarm optimization algorithm, wherein the multi-objective particle swarm optimization algorithm takes suppressing backfeeding, minimizing the amount of abandoned solar and wind power, and ensuring the life of energy storage as optimization goals, and generates a corresponding dynamic anti-backflow threshold curve;

[0042] A correction module is used to correct the dynamic anti-backflow threshold curve through a real-time collaborative verification module, combine the grid impedance parameters and the PCS response delay model, use a mixed integer programming algorithm to eliminate the threshold jump conflict, and generate an anti-disturbance optimization threshold;

[0043] The control module is used to convert the anti-disturbance optimization threshold into a PCS power control instruction, synchronously display the threshold execution status and backfeed warning information on the energy management interface, and trigger the adaptive power clamp protection when voltage exceeding the limit or power reverse is detected.

[0044] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when run.

[0045] Yet another embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the above methods.

[0046] Compared with the existing technology, the present invention provides a microgrid backflow prevention control method based on multi-objective optimization, which generates dynamic load forecast results according to the grid-side voltage, user-side load power and energy storage system charge status data collected in real time by the energy management system; obtains a backflow risk quantitative index based on the dynamic load forecast result; generates a corresponding dynamic backflow prevention threshold curve according to the backflow risk quantitative index; corrects the dynamic backflow prevention threshold curve through a real-time collaborative verification module to generate an anti-disturbance optimization threshold; converts the anti-disturbance optimization threshold into a PCS power control instruction, and synchronously displays the threshold execution status and reverse power supply warning information on the energy management interface; triggers adaptive power clamping protection when voltage exceeding the limit or power reverse is detected, thereby improving the intelligence level of microgrid backflow prevention and control and ensuring safe and stable operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A hardware structure block diagram of a computer terminal for a microgrid anti-backflow control method based on multi-objective optimization provided by an embodiment of the present invention;

[0048] Figure 2A schematic flow chart of a microgrid backflow prevention control method based on multi-objective optimization provided by an embodiment of the present invention;

[0049] Figure 3 A schematic structural diagram of a microgrid backflow prevention control system based on multi-objective optimization provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limiting the present invention.

[0051] The embodiment of the present invention first provides a microgrid backflow prevention control method based on multi-objective optimization. The method can be applied to electronic devices, such as computer terminals, specifically ordinary computers.

[0052] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a microgrid anti-backflow control method based on multi-objective optimization provided by an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0053] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can enable a processor to execute any microgrid backflow prevention control method based on multi-objective optimization.

[0054] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0055] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any microgrid backflow prevention control method based on multi-objective optimization.

[0056] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0057] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0058] See also Figure 2 The embodiment of the present invention provides a microgrid backflow prevention control method based on multi-objective optimization, which may include the following steps:

[0059] S201, based on the grid-side voltage, user-side load power, and energy storage system state of charge data collected in real time by the energy management system, extract multimodal grid characteristics through a spatiotemporal convolutional neural network to generate a dynamic load forecast result, wherein the spatiotemporal convolutional neural network integrates grid fluctuation trends and user electricity consumption behavior patterns. Specifically, this may include:

[0060] S2011 uses a pulse-triggered spatiotemporal alignment encoder based on the millisecond-level sampling sequence of grid-side voltage, minute-level statistics of user-side load power, and second-level variation data of energy storage state of charge. This encoder uses a dynamic time warping algorithm to compensate for sampling time differences in multi-source data, generating a spatiotemporally aligned raw data tensor.

[0061] This step uses multi-source data spatiotemporal alignment technology to solve the timing misalignment problem caused by differences in data sampling frequencies between the power grid, users, and energy storage, laying the foundation for subsequent feature extraction.

[0062] ‌Pulse-Triggered Spatiotemporal Encoder‌:

[0063] Data input format:

[0064] Grid-side voltage: 1000 sampling points per second (millisecond level), data format is a three-dimensional tensor (timestamp × voltage value × phase angle). For example, the data at a certain moment is [1620000000123, 220.5V, 30°];

[0065] User load power: Statistics are collected once every minute (minute level) in the form of a two-dimensional matrix (timestamp × total power), for example, [1620000000, 15.6kW];

[0066] Energy storage SOC (State of Charge): collected once per second (second level), in a single-dimensional sequence format, for example, [1620000000, 65%].

[0067] Time Window Alignment: Using a 10-second alignment period, 10,000 millisecond points (10 seconds x 1000 Hz) on the grid side, one minute point (considering 10 seconds as a minute-level segment) on the user side, and 10 second-level points on the energy storage side are aligned to a 10-second time window. For example, the alignment window starts at 1620000000000 and ends at 1620000010000.

[0068] Dynamic Time Warping (DTW) algorithm:

[0069] Function: Stretch or compress data curves with different sampling rates to eliminate time axis deviation. For example, one data point per minute on the user side can be interpolated into a linear curve over 10 seconds to match the millisecond data on the grid side.

[0070] Parameter settings: Time window sliding step = 100ms, warp path search radius = 5%, limit the maximum time offset to no more than ±200ms.

[0071] Output: Generates a spatiotemporally aligned raw data tensor with the dimensions (time window number × data source type × feature dimension). For example, 10 × 3 × 10,000 represents 10 time windows, 3 types of data sources (grid / user / energy storage), and 10,000 feature points in each window.

[0072] Application Example: In a microgrid system, within a 10-second alignment period, the grid collects 10,000 voltage points (fluctuating between 220.5 V ± 0.3 V). The user-side interpolation generates 10 load power points (linearly increasing from 15.6 kW to 16.2 kW). The energy storage SOC decreases from 65% to 64.7%. This ultimately generates an alignment tensor of 1 × 3 × 10,000, which serves as input for subsequent processing.

[0073] S2012, performing chaos noise suppression processing on the original data tensor, separating the high-frequency noise and low-frequency trend components of the power grid fluctuation using a dynamic weight matrix, and outputting a noise-reduced time-frequency feature matrix;

[0074] This step uses nonlinear filtering technology to eliminate random noise in the power grid data and extract interpretable time-frequency features. Chaotic Noise Suppression:

[0075] Noise type identification: Chaotic noise in grid voltage is primarily manifested as high-frequency random fluctuations (>100 Hz) and low-frequency harmonic interference (sub- and super-harmonics around the 50 Hz fundamental). For example, a 105 Hz harmonic component was detected in a certain section of voltage data, with an amplitude of 3% of the fundamental.

[0076] Dynamic Weight Matrix (DWM):

[0077] ‌Architecture Design‌: Construct a trainable weight matrix with the same dimension as the input tensor (e.g. 10000×10000). The initial weights are empirically set to a Gaussian distribution (mean = 0, standard deviation = 0.01).

[0078] Adaptive Adjustment: Uses sliding window energy entropy as the optimization objective and updates weights via gradient descent. For example, the proportion of high-frequency noise energy in a window can be reduced from 25% to 8%.

[0079] Frequency Domain Separation Operation:

[0080] High-frequency noise suppression: Wavelet packet transform (WPT) is applied to the grid-side voltage data, using the db4 wavelet basis function. Decomposition is performed up to the sixth layer, with a threshold set to 0.1 × max(coefficients). High-frequency components are filtered out using the hard thresholding method.

[0081] Low-Frequency Trend Extraction: Performs a moving average (window = 100ms) on the filtered signal to generate a low-frequency trend curve. For example, if the voltage of a certain section rises slowly from 220.3V to 221.1V, the trend curve will be smoother by 60%.

[0082] Output: The denoised time-frequency feature matrix, which contains two sub-matrices:

[0083] High-frequency noise matrix: records the suppressed high-frequency components, with the dimension of time window × frequency component. For example, 10 × 512 means 10 time windows and 512 frequency bands.

[0084] Low-frequency trend matrix: The extracted grid fundamental wave and slow-changing trend, with dimensions of time window × time point, for example, 10 × 10,000.

[0085] Application Example: During noise suppression, the dynamic weighting matrix reduced the 105Hz harmonic amplitude from 3% to 0.5% while maintaining the amplitude stability of the 50Hz fundamental (fluctuations were reduced from ±0.3V to ±0.1V). The low-frequency trend matrix clearly displayed the load growth trend.

[0086] S2013: Inputting historical user electricity consumption behavior data into a spatiotemporal attention network, matching current load characteristics with a behavior pattern library through a sliding window, generating a user behavior embedding vector, and cross-modally fusing the user behavior embedding vector with the time-frequency feature matrix to obtain a multimodal power grid feature tensor;

[0087] This step enhances the personalized accuracy of load forecasting through user behavior modeling and cross-modal fusion.

[0088] ‌Spatiotemporal Attention Network‌:

[0089] Input data: User historical load data (past 30 days, 1 point per minute), in the format of 43200 × 2 (timestamp × power value).

[0090] ‌Sliding Window Matching‌:

[0091] Window length: 15 minutes (900 seconds), sliding step = 1 minute, generating 900 windows;

[0092] Behavioral pattern library: Typical patterns generated by pre-trained clustering (such as "industrial morning rush hour" and "residential evening rush hour"). The library stores 100 patterns, each represented as a 900×1 power sequence.

[0093] Similarity Calculation: Dynamic Time Warping (DTW) distance is used to match the current window with the pattern library, and the top three similar patterns are selected. For example, the pattern with the smallest DTW distance in the current window is "Industrial Morning Rush Hour," with a distance of 12.5.

[0094] User behavior embedding vector: The DTW distances of the top-3 patterns are normalized and used as weights. The pattern features are weighted and fused to generate a 128-dimensional embedding vector (for example, [0.45, 0.32, 0.23] corresponds to the weights of the three patterns).

[0095] ‌Cross-Modal Fusion‌:

[0096] ‌Time-frequency feature matrix expansion‌: The low-frequency trend matrix (10×10000) is compressed into a 10×128 encoding vector through a fully connected layer;

[0097] Fusion operation: The user behavior embedding vector (1×128) is element-wise multiplied with the encoding vector (10×128) of each time window to generate a multimodal power grid feature tensor (10×256), where the first 128 dimensions are power grid features and the last 128 dimensions are user behavior features.

[0098] Application Example: The current load window of users in an industrial park matches the "industrial morning peak" pattern by 87%. The embedded vector highlights the rapid rise in power. After fusion with the low-frequency trend matrix of the power grid, the user behavior weight in the feature tensor accounts for 35%.

[0099] In S2014, the multimodal power grid feature tensor is input into a bidirectional gated spatiotemporal convolutional network, which captures the long-term and short-term load correlations through residual connections and outputs the dynamic load forecast results and confidence intervals for the next 15 minutes.

[0100] This step achieves high-precision load forecasting through deep learning models and quantifies forecast uncertainty.

[0101] ‌Bidirectional Gated Spatiotemporal CNN‌:

[0102] ‌Network Structure‌:

[0103] Forward convolution layer: 3 layers of spatiotemporal convolution, with a kernel size of 3×3 (time × space), and the number of channels increasing from 64 to 256. Backward convolution layer: Mirrored structure, capturing historical and future correlations. Gating mechanism: GLU (Gated Linear Unit) is used to control information flow, and gating weights are generated using a sigmoid function.

[0104] Residual connection: Each layer’s output is added to the input to prevent vanishing gradients. For example, the output of layer 2 = original input + convolution result × gated weight.

[0105] ‌Training parameters‌:

[0106] Optimizer: Adam (learning rate lr = 0.001, β1 = 0.9, β2 = 0.999); batch size (batch_size) = 32; loss function: Huber loss (δ = 1.0), balancing the advantages of MAE and MSE.

[0107] Confidence interval calculation: Monte Carlo Dropout: randomly drop 20% of neurons during the prediction phase and repeat the prediction 100 times;

[0108] Statistical Method: Take the 5% and 95% quantiles of 100 predictions and form a 90% confidence interval. For example, if a prediction is 16.5kW, the confidence interval is [15.8kW, 17.3kW].

[0109] Application Example: A microgrid system predicts that the load will increase from 16.2kW to 18.5kW in the next 15 minutes, with a confidence interval width of ±4.3% (0.8kW). The model has a mean absolute error (MAE) of 1.2% on the test set.

[0110] This step integrates grid voltage (millisecond sampling), user load power (minute-by-minute variations), and energy storage state of charge (second-by-second data). A spatiotemporal convolutional neural network (combining temporal convolution with spatial attention) extracts correlations between grid fluctuation trends (such as voltage sags and harmonic disturbances) and user behavior patterns (such as cyclical electricity usage). The network uses a dynamic time warping algorithm to align the time differences between multiple data sources and captures long- and short-term load correlations through residual connections. It outputs a 15-minute load forecast and confidence intervals, providing input for backflow prevention control. This addresses the problem of traditional load forecasting ignoring spatiotemporal correlations. Multimodal feature fusion improves forecast accuracy, accurately capturing the coupled impact of grid fluctuations and user behavior, laying the data foundation for subsequent backflow risk quantification and avoiding misjudgments or control lags caused by forecast bias.

[0111] S202: Based on the dynamic load forecast results and in combination with the real-time output power data of the power converter PCS, a backflow prevention risk feature matrix is constructed, and the matrix is mapped to a multidimensional optimization space using an adaptive eigendecomposition algorithm to obtain a quantitative index of backflow risk. Specifically, this may include:

[0112] S2021: Based on the dynamic load forecast results and PCS real-time power data, calculate the power deviation rate, voltage offset, and energy storage charge and discharge rate, and construct an anti-backflow risk feature matrix with time and space dimensions;

[0113] This step constructs a multi-dimensional risk characteristic matrix by quantifying the key parameters of the grid operation status, providing structured input for subsequent reverse flow risk assessment.

[0114] Power Deviation Rate (PDR):

[0115] Definition and Calculation: The instantaneous difference between the dynamic load forecast (e.g., 16.5 kW for the next 15 minutes) and the PCS real-time power output (e.g., current actual output of 15.8 kW) as a percentage of the forecast value. Example formula: PDR = |(Forecast Power - Actual Power)| / Forecast Power × 100%.

[0116] Numerical example: If the predicted value is 16.5 kW and the actual output is 15.8 kW, then PDR = |16.5 - 15.8| / 16.5 × 100% ≈ 4.24%.

[0117] Function: Reflects the matching degree between power generation and load demand. Too high PDR may lead to curtailment of solar and wind power or reverse feeding.

[0118] Voltage Deviation (VD):

[0119] Definition and calculation: The percentage deviation between the real-time grid voltage (e.g., 220.5V) and the rated voltage (e.g., 220V).

[0120] Formula example: VD = |(measured voltage - rated voltage)| / rated voltage × 100%

[0121] Numerical example: If the measured voltage is 223 V, then VD = |223 - 220| / 220 × 100% ≈ 1.36%.

[0122] Purpose: Voltage exceeding the limit may trigger the action of protective devices, and its correlation with reverse current risk needs to be monitored.

[0123] Energy Storage Rate (ESR):

[0124] Definition and Calculation: The energy storage system's state of charge (SOC) is measured at a rate of change in seconds (e.g., SOC drops from 65% to 64.7% / second) and its rated capacity (e.g., 100kWh) is used to calculate the actual power.

[0125] Formula example: ESR = ΔSOC × rated capacity / time interval

[0126] Numerical example: If ΔSOC = 0.3% / second and rated capacity = 100kWh, then ESR = 0.3% × 100kWh / 1 second = 0.3kW / s.

[0127] Function: Too fast a charge and discharge rate will accelerate the attenuation of energy storage life and needs to be constrained as a risk factor.

[0128] ‌Risk characteristic matrix construction‌:

[0129] Time dimension: Continuously record the time series data of PDR, VD, and ESR using a 1-minute time window. For example, a 10-minute window generates a 10 × 3 matrix (10 time points × 3 indicators).

[0130] Spatial Dimension: Based on the microgrid topology (e.g., the distribution of photovoltaic, wind power, and energy storage nodes), the risk indicators for each node are expanded into a spatial matrix. For example, the matrix consisting of three photovoltaic nodes and two energy storage nodes is 10 × 3 × 5 (time × indicator × space).

[0131] Application Example: Within 10 minutes, a microgrid system detected a PDR increase from 4.2% to 8.1% (increased risk of curtailment), a VD fluctuation from 1.2% to 2.5% (decreased voltage stability), and an ESR surge from 0.3 kW / s to 1.2 kW / s (energy storage overload). The constructed matrix clearly reflects the temporal and spatial distribution of risk.

[0132] In S2022, an adaptive rotation factor decomposition algorithm is used to perform orthogonal decomposition of the risk characteristic matrix, separating the backfeed sensitivity factor, the curtailment impact factor, and the energy storage lifetime attenuation factor, generating a multidimensional risk characteristic vector.

[0133] This step extracts key risk factors through matrix decomposition technology, clarifies the contribution of each factor to the backflow risk, and provides a quantitative basis for multi-objective optimization.

[0134] ‌Adaptive Rotational Factor Decomposition (ARFD)‌:

[0135] ‌Algorithm Principle‌: Based on the improvement of principal component analysis (PCA), the rotation angle (RA) is dynamically adjusted to make the factor loading matrix (Loading Matrix) meet the orthogonality constraints while maximizing the factor explained variance.

[0136] Parameter settings: Initial number of factors = 3 (backfeed, curtailment of solar and wind power, and energy storage lifetime); Maximum number of iterations = 1000, Convergence threshold = 1e-6; Rotation angle step size = 0.1°, Search range ±45°.

[0137] ‌Decomposition process‌:

[0138] Flatten the risk signature matrix (e.g., 10 × 3 × 5) to generate a two-dimensional matrix of 50 × 3 (50 = time × space);

[0139] Calculate the covariance matrix and extract the initial principal components (PC1, PC2, PC3);

[0140] Adjust the direction of the principal components through Varimax rotation (maximizing the variance of factor loadings) so that each factor is strongly correlated with only a few original variables;

[0141] Assign factor meanings based on factor loading values (LV):

[0142] Backfeed sensitivity factor: strongly correlated with PDR and VD (LV>0.7); curtailment impact factor: strongly correlated with PDR and ESR; energy storage life attenuation factor: strongly correlated with ESR.

[0143] Output: A multidimensional risk feature vector (e.g., [0.85, 0.62, 0.91]), representing the normalized weights (0-1 range) of the three factors.

[0144] Application Example: In a certain decomposition, the weight of the backfeed sensitivity factor is 0.85 (high correlation), indicating that current PDR and VD fluctuations are the main causes of backflow; the weight of the curtailment factor is 0.62, reflecting the insufficient matching between renewable energy output and load; and the weight of the energy storage life factor is 0.91, indicating the need to urgently limit the charge and discharge rate.

[0145] S2023, based on the real-time operation status of the power grid, adjust the weight ratio of each factor in the multi-dimensional risk feature vector through a dynamic game strategy;

[0146] This step dynamically balances the priorities of different risk factors through a game theory model to adapt to the rapid changes in the grid's operating status.

[0147] Dynamic Game Strategy:

[0148] ‌Participant Definition‌: The three risk factors are considered as game participants, each of which aims to maximize its own weight to influence the final decision.

[0149] Game rules:

[0150] Status input: Real-time monitoring of grid parameters (e.g., load factor = 80%, renewable energy penetration = 45%, energy storage SOC = 65%);

[0151] ‌Benefit function‌: The benefit of each factor is positively correlated with its sensitivity to the current grid state. For example:

[0152] If the load rate is >90%, the benefits of the reverse feeding factor will increase; if the new energy penetration rate is >50%, the benefits of the curtailed solar and wind power factors will increase; if the energy storage SOC is <30%, the benefits of the life attenuation factor will increase.

[0153] Nash equilibrium solution: Iteratively adjust the weight ratio until all factors cannot increase returns by unilaterally changing their weights.

[0154] ‌Weight Adjustment Example‌:

[0155] Initial weights: [0.85, 0.62, 0.91]; after detecting a sudden increase in renewable energy penetration to 60%, the benefits of curtailed solar and wind power factors increased, and the final weights were adjusted to [0.78, 0.85, 0.72].

[0156] Application Example: During the midday peak of PV output in a microgrid, the renewable energy penetration rate increased from 40% to 65%. Dynamic game analysis increased the weight of the curtailment factor from 0.62 to 0.85, prioritizing limiting PCS power output to avoid curtailment.

[0157] In S2024, outlier detection is performed on the adjusted multi-dimensional risk feature vector. Generative adversarial networks are used to simulate the feature distribution in extreme scenarios to reconstruct a multi-dimensional optimized vector with enhanced robustness.

[0158] This step enhances the robustness of the model through anomaly detection and adversarial training, ensuring the reliability of backflow risk assessment in extreme scenarios.

[0159] Anomaly Detection:

[0160] Algorithm selection: The Isolation Forest (IF) algorithm is used to identify data points in low-density areas by randomly dividing the feature space.

[0161] Parameter settings: Number of trees = 100, Number of subsampling = 256; Anomaly score threshold = 0.65 (score > 0.65 is considered anomaly).

[0162] Detection process: Input the adjusted multidimensional feature vector (for example, [0.78, 0.85, 0.72]). Calculate its path length in the isolation forest. The shorter the path, the higher the probability of an anomaly. If the anomaly score exceeds the threshold, trigger an alarm and record the anomaly context data.

[0163] Generative Adversarial Network (GAN):

[0164] ‌Network Structure‌:

[0165] Generator: 3-layer fully connected network (input layer = 3D, hidden layer = 128 neurons, output layer = 3D) with ReLU activation.

[0166] Discriminator: 3-layer fully connected network (input layer = 3D, hidden layer = 64 neurons, output layer = 1D) with sigmoid activation.

[0167] ‌Training process‌:

[0168] The generator generates synthetic feature vectors, and the discriminator distinguishes between real and synthetic data. Adversarial training is performed until the discriminator's accuracy falls below 55% (Nash equilibrium). Extreme scenario simulations force the generator to generate samples in unusual regions (e.g., backfeed factor > 0.9). Reconstructing the optimized vector: The original vector is weightedly fused with the GAN-generated samples (weight = 0.7:0.3) to generate an optimized vector with enhanced robustness.

[0169] Application Example: A backfeed factor weight of 0.95 (anomaly score of 0.82) is detected. GAN generates five extreme samples (for example, [0.92, 0.45, 0.88]). The reconstructed optimization vector is [0.89, 0.68, 0.85], eliminating the impact of abnormal fluctuations.

[0170] ‌S2025, input the multidimensional optimization vector into the radial basis function interpolation model to generate the quantitative index of backflow risk and its probability density distribution curve.

[0171] This step maps the multidimensional features into a single risk indicator through the interpolation model and quantifies its probability distribution to provide a decision-making basis for threshold optimization.

[0172] ‌Radial Basis Function Interpolation (RBFI)‌:

[0173] Kernel function selection: Gaussian kernel function, parameter σ=0.5, controls the interpolation smoothness.

[0174] ‌Input-Output Mapping‌:

[0175] Input: multi-dimensional optimization vector (e.g. [0.89, 0.68, 0.85]);

[0176] Output: Quantitative indicator of backflow risk (range 0-100, higher values indicate greater risk).

[0177] ‌Interpolation process‌:

[0178] Construct a training set based on historical data (e.g., 1,000 sets of vectors and corresponding risk indicators); calculate the Euclidean distance between the input vector and the training sample; and use Gaussian kernel weighted averaging to obtain the interpolation result.

[0179] ‌Probability density distribution curve‌:

[0180] Kernel Density Estimation (KDE):

[0181] The bandwidth is selected as 0.2, and the Epanechnikov kernel function is used; a probability density curve of the risk indicator in the range of 0-100 is generated, and the peak position indicates the most likely risk value.

[0182] Application example: The interpolation output risk index is 72.5, and the probability density curve shows that the peak is in the range of 70-75 (probability = 45%), indicating that the high risk requires immediate regulation.

[0183] Technology integration and effect verification:

[0184] Risk feature matrix construction: within a 10-minute window, successfully identified a PDR increase from 4.2% to 8.1%, a VD fluctuation to 2.5%, and an ESR surge to 1.2 kW / s. The matrix dimensions were 10 × 3 × 5.

[0185] Adaptive factorization: Backfeed factor weight = 0.85, curtailment factor = 0.62, energy storage lifetime factor = 0.91;

[0186] Dynamic Game Adjustment: When the renewable energy penetration rate reaches 60%, the weight of the curtailment factor is increased to 0.85.

[0187] ‌GAN reconstruction optimization‌: the anomaly vector [0.95, 0.45, 0.88] is reconstructed to [0.89, 0.68, 0.85], and the anomaly score is reduced from 0.82 to 0.43;

[0188] ‌Countercurrent risk quantification‌: Output risk index = 72.5, probability density peak 70-75 (probability 45%).

[0189] ‌System operation example‌:

[0190] Input: Dynamic load forecast 16.5kW, PCS real-time power 15.8kW, SOC = 65%; Processing: Risk matrix construction → Factor decomposition → Game adjustment → GAN reconstruction → RBF interpolation; Output: Backflow risk index 72.5, triggering PCS load reduction instructions.

[0191] Based on load forecast results and real-time PCS power (e.g., inverter output), the power deviation rate (the difference between the forecast and actual value), voltage offset (the degree to which the grid voltage deviates from the rated value), and energy storage charge and discharge rate (SOC change rate) are calculated to construct a risk characteristic matrix in both temporal and spatial dimensions. An adaptive rotation factorization algorithm is used to perform orthogonal decomposition of the matrix, separating the backfeed sensitivity factor (reverse power risk), the curtailment factor (insufficient renewable energy absorption), and the energy storage lifespan degradation factor (overcharge / over-discharge risk). This generates a multidimensional risk vector. A generative adversarial network (GAN) is then used to simulate extreme scenarios and reconstruct robustness indicators. Ultimately, a quantitative value and probability distribution for backfeed risk are output. This decomposes complex risk characteristics into quantifiable multidimensional indicators, identifies the dominant risk type in different scenarios, and provides precise input for multi-objective optimization, avoiding the limitations of single indicators (e.g., power backfeed) that cannot comprehensively assess risk.

[0192] S203: Based on the quantitative index of reverse flow risk, a multi-objective particle swarm optimization algorithm is used to determine the optimal solution set of the reverse flow prevention threshold. The multi-objective particle swarm optimization algorithm is optimized to suppress backfeeding, minimize the amount of curtailed solar and wind power, and ensure the life of energy storage, and generates a corresponding dynamic reverse flow prevention threshold curve. Specifically, the method may include:

[0193] S2031: Based on the probability density distribution of the quantitative indicators of reverse flow risk, a chaotic perturbation strategy is used to initialize the particle swarm position and set a three-dimensional target space for backfeed suppression, minimization of solar and wind curtailment, and energy storage life assurance.

[0194] This step enhances the diversity and coverage of particle swarm initialization through chaotic dynamic characteristics, and defines a three-dimensional target space in combination with multi-objective optimization requirements, providing a basic framework for subsequent optimization.

[0195] Chaotic Perturbation Strategy:

[0196] Chaotic sequence generation: A chaotic sequence is generated using a logistic map, using the formula x_{n+1} = μ × x_n× (1 - x_n), where μ = 3.99 (chaotic state) and x_0 = 0.31 (non-periodic initial point). 1000 chaotic values are iteratively generated and mapped to particle swarm position ranges (e.g., the target range for backfeed suppression [0, 100], the range for minimizing solar and wind curtailment [0, 50], and the range for ensuring energy storage lifetime [0, 200]).

[0197] Particle Position Initialization: Distribute the chaotic sequence to the particle swarm by dimension. For example, the 3D position of the i-th particle is (x_chaos_i × 100, x_chaos_i × 50, x_chaos_i × 200), where x_chaos_i is the i-th chaotic value. This method ensures uniform particle coverage of the target space, avoiding the localized clumping problem caused by traditional random initialization.

[0198] Application Example: For a microgrid scenario, 500 particles were initialized, covering backfeed suppression target values of 1.2-98.7, curtailed solar and wind power rates of 0.5-49.3, and energy storage lifetime guarantee values of 5.6-198.2, significantly outperforming traditional uniform distribution (which only covers ranges of 30-70, 10-40, and 50-150).

[0199] ‌3D target space definition‌:

[0200] Backfeed suppression: The grid reverse power threshold (e.g., ≤5kW) is used as a constraint. The objective function is F1 = 1 / (1 + reverse power). The value range is normalized to [0, 100]. Higher values indicate better suppression.

[0201] Minimize curtailment of solar and wind power: With the curtailment rate of renewable energy (e.g., ≤10%) as a constraint, the objective function is F2 = 1 - curtailment rate, with the value range mapped to [0, 50]. Higher values indicate better utilization of renewable energy.

[0202] Energy storage life protection: The attenuation rate of the energy storage charge and discharge cycles (e.g., ≤0.1% / time) is used as a constraint. The objective function is F3 = 1000 / (1 + attenuation rate). The range is extended to [0, 200]. Higher values indicate better life protection.

[0203] Spatial visualization example: Particle distribution is displayed using a 3D scatter plot, with F1 on the X-axis, F2 on the Y-axis, and F3 on the Z-axis. The ideal Pareto front is a curved surface covering the high F1-F3 region.

[0204] S2032, based on the historical optimal solution distribution of the particle swarm, the weight coefficients of each optimization objective in the three-dimensional target space are adjusted in real time through the sliding mode control algorithm;

[0205] This step uses the dynamic switching characteristics of sliding mode control (SMC) to achieve adaptive adjustment of multi-objective weight coefficients and balance the priorities of different optimization objectives.

[0206] Historical Optimal Solution Analysis: Records the historical optimal position (pBest) and global optimal position (gBest) of each particle during the particle swarm iteration process, and calculates their distribution density in the three-dimensional target space. For example, if 80% of the pBests are concentrated in the area where F1>80, F2>30, and F3>150, it indicates that the system is currently focusing on backfeed suppression and energy storage life assurance.

[0207] The importance probability of each target dimension is calculated using kernel density estimation (KDE). For example, if the density peaks of F1, F2, and F3 are 0.85, 0.45, and 0.92, respectively, the initial weight ratio is set to [0.85, 0.45, 0.92], which is normalized to [0.38, 0.20, 0.42].

[0208] Sliding mode control algorithm design:

[0209] Sliding surface definition: Using the weight coefficient deviation as the control variable, set the sliding surface S = e(t) + λ × ∫e(t)dt, where e(t) is the deviation between the actual weight and the desired weight, and λ = 0.5 (integral gain).

[0210] Switching logic: When the particle swarm convergence speed (CS) is lower than the threshold (e.g., CS < 0.1 / iteration), increase λ to 0.8 to accelerate weight adjustment; when the particle swarm diversity (D) is lower than the threshold (e.g., D < 0.3), trigger random perturbation (PA = 0.2) to avoid local optimality.

[0211] ‌Weight Adjustment Example‌:

[0212] Initial weights: [0.38, 0.20, 0.42]; if stagnation of F2 dimension progress is detected (no improvement after 10 iterations), sliding mode control increases the F2 weight to 0.35, and the adjusted weights are [0.35, 0.35, 0.30]; if a sudden reverse flow in the power grid is detected at the same time (reverse power > 10 kW), the F1 weight is urgently increased to 0.50, resulting in [0.50, 0.30, 0.20].

[0213] Application Example: During midday PV output fluctuations in a microgrid, sliding mode control increased the F2 weight from 0.20 to 0.40, prompting the particle swarm to prioritize searching for the solution with the lowest curtailment rate, significantly reducing the curtailment rate.

[0214] S2033: Construct a coupled constraint model between the energy storage charge and discharge rate and the PCS power output, and use a pulse-triggered constraint relaxation algorithm to eliminate infeasible solutions in the particle swarm iteration.

[0215] This step ensures that the particle swarm search process complies with the physical limitations of energy storage and PCS through dynamic constraint management, while avoiding the problem of poor solution set caused by excessive constraints.

[0216] ‌Coupled constraint model construction‌:

[0217] Energy storage charge and discharge rate constraint: Based on the real-time SOC value (e.g., 65%) and the rated capacity (e.g., 100kWh), the maximum charge and discharge rate (e.g., 0.5C for charging and 1.0C for discharging, corresponding to ±50kW) is set.

[0218] PCS power output constraint: Set a power change rate limit (e.g., ±20 kW / s) based on the PCS rated capacity (e.g., 200 kW) and the grid's carrying capacity.

[0219] Coupling Relationship Modeling: When the energy storage is discharging (SOC decreases), the PCS must reduce its output power to prevent reverse flow. When the energy storage is charging (SOC increases), the PCS can increase its power to absorb excess renewable energy. The relationship is established: P_pcs = P_pv + P_wind - P_load ± P_ess, where P_pcs is the output power of the power conversion system (PCS), P_pv is the real-time generated power of the photovoltaic system, P_wind is the real-time output power of the wind turbine system, P_load is the total user-side load power (i.e., electricity demand) within the microgrid, and P_ess is the charge and discharge power of the energy storage system (ESS). The sign of P_ess is determined by the charge and discharge status.

[0220] Pulse-Triggered Constraint Relaxation (PTCR):

[0221] Infeasible solution detection: In each iteration, the particle is checked to see if it violates the coupling constraints. For example, if a particle proposes P_pcs = 220kW (exceeding the rated power of 200kW) and P_ess = -60kW (exceeding the maximum discharge rate of 50kW), it is marked as an infeasible solution.

[0222] Relaxation strategy:

[0223] ‌Slightly out of bounds‌ (e.g. P_pcs = 205kW): Scale to the constraint bounds (205 → 200kW), retain the particle but correct its position;

[0224] Severe limit violation (e.g. P_ess = -70kW): trigger a pulse signal (Pulse Width = 10ms) to reset the particle position to the area near the historical optimal solution (pBest ± 5%).

[0225] ‌Continuous Violation‌: If the same particle exceeds the limit three times in a row, it will be eliminated and a new particle will be generated (reinitialized based on chaotic perturbations).

[0226] Application Example: In one iteration, 12% of the particles were corrected due to P_ess exceeding the limit, and 3% of the particles were eliminated and reinitialized.

[0227] ‌ S2034, reconstruct the convex hull of the Pareto front solution set generated by the particle swarm, use the dynamic density clustering algorithm to eliminate redundant solutions, and generate a high-density distributed anti-backflow threshold candidate set;

[0228] This step extracts high-quality solution sets through geometric reconstruction and cluster analysis, providing streamlined and diverse candidate solutions for threshold curve generation.

[0229] ‌Convex Hull Reconstruction‌:

[0230] ‌Algorithm Principle‌: Based on the QuickHull algorithm, boundary points are selected from the Pareto front solution set to form the minimum convex hull. For example, if the original solution set contains 500 points, 80 boundary points will be retained after the convex hull calculation.

[0231] Reconstruction optimization: Interpolate and encrypt the internal points of the convex hull, adding midpoints and centroids to enhance the solution set coverage. For example, inserting three midpoints between adjacent boundary points expands the solution set to 240 points.

[0232] Application example: A reconstruction expanded the target ranges of F1 / F2 / F3 of the solution set from [75-90, 25-40, 160-190] to [70-95, 20-45, 150-200], significantly improving the diversity of the solution set.

[0233] Dynamic Density Clustering (DDC):

[0234] Clustering parameters: The initial clustering radius r = 5 (based on the normalized scale of the target space); the density threshold MinPts = 10 (each cluster contains at least 10 solutions); Adaptive adjustment: If the standard deviation of the solution set density > 1.5, then r is reduced to 3; if < 0.5, then r is expanded to 7.

[0235] Redundant solution elimination: For the solution set within the same cluster, retain the solution with the highest weighted sum (Weighted Sum, WS) of the objective function, and mark the rest as redundant. For example, if a cluster contains 25 solutions, the top 5 are retained after sorting by WS, and the last 20 are eliminated; for isolated points (density < MinPts), if its WS is higher than the average value of the adjacent cluster, it is retained; otherwise, it is eliminated. Application example: After clustering, the solution set is reduced from 240 to 50.

[0236] For S2035, input the anti-counterflow threshold candidate set into the spatio-temporal smoothing filter, eliminate curve jumps through Lyapunov stability constraints, and output the dynamic anti-counterflow threshold curve that meets the safe operation of the power grid.

[0237] In this step, through spatio-temporal filtering and stability constraints, the discrete candidate solution set is transformed into a continuous, smooth, and stable threshold curve.

[0238] Spatio-Temporal Smoothing Filter:

[0239] Smoothing in the time dimension: Adopt a moving average window (Window Size = 5 minutes). After sorting the candidate solutions by timestamp, calculate the weighted average value of the solutions within the window (weight = WS value). For example, if a window contains 10 solutions with F1 values of [85, 88, 82, 90, 86] respectively, the output after weighted averaging is F1 = 87.2.

[0240] Smoothing in the space dimension: According to the microgrid topology (such as 3 photovoltaic nodes and 2 energy storage nodes), perform spatial consistency correction on the solutions of different nodes at the same time point. For example, if the threshold of node 1 is 90kW and that of node 2 is 85kW, it is adjusted to an average value of 87.5kW ± 2% tolerance.

[0241] Lyapunov Stability Constraint:

[0242] Construction of the energy function: Define the energy function of the threshold curve V(t) = Σ(ΔThreshold)^2, where ΔThreshold is the change in the threshold between adjacent time points.

[0243] Stability criterion: The energy function derivative, dV / dt, must be less than 0, meaning the threshold change must decrease over time. For example, if dV / dt is currently +0.5, the threshold change must be reduced. The adjustment formula is: Threshold_new = Threshold_old - 0.3 × ΔThreshold.

[0244] Conflict Elimination: For transition points that violate stability constraints (e.g., a sudden change in the threshold from 80kW to 100kW), insert transition points (e.g., 85kW, 90kW, 95kW) to ensure that the change slope is ≤10kW / min.

[0245] Application Example: A curve has a threshold jump (80 → 100 kW) between 10:00 and 10:05. After inserting transition points, the curve is adjusted to 80 → 85 → 90 → 95 → 100 kW. The slope meets the requirement and the dV / dt value decreases from +0.8 to -0.2.

[0246] Technology integration and effect verification:

[0247] Particle swarm initialization: 500 particles are generated by chaotic perturbation, covering F1=1.2-98.7, F2=0.5-49.3, F3=5.6-198.2;

[0248] Sliding mode control adjustment: weights are dynamically adjusted from [0.38, 0.20, 0.42] to [0.50, 0.30, 0.20], with a response time of <200ms.

[0249] Constraint relaxation processing: 12% of out-of-limit particles were corrected, and the feasible solution rate was increased to 93%;

[0250] Convex Hull and Clustering: The number of solutions increased from 500 to 240 to 50, and WS increased by 15%.

[0251] ‌Space-time filtering and stability‌: Threshold curve TFR=5%, SDR=8%, satisfying dV / dt<0.

[0252] ‌System operation example‌:

[0253] Input: Backflow risk index 72.5, PCS real-time power 150kW, SOC = 65%; Processing: Particle Swarm Optimization → Convex Hull Reconstruction → Dynamic Clustering → Spatiotemporal Smoothing; Output: Dynamic backflow prevention threshold curve (thresholds from 10:00 to 10:30 are 85 → 92 → 88 → 95kW), with no jumps and in compliance with grid safety constraints.

[0254] With the optimization objectives of suppressing backfeeding (preventing power reverse flow), minimizing curtailment of solar and wind power (increasing renewable energy utilization), and ensuring energy storage lifespan (avoiding frequent charging and discharging), a multi-objective particle swarm optimization algorithm (PSO) was used to search for the optimal threshold solution set in a three-dimensional target space. Sliding mode control dynamically adjusts the weights of each objective. Infeasible solutions are eliminated by combining the coupled constraint model of energy storage and PCS (such as charge and discharge rate limits). Convex hull reconstruction and density clustering are performed on the Pareto solution set to screen for high-density candidate solutions. Finally, spatiotemporal smoothing filtering is used to generate a smooth and stable dynamic anti-backflow threshold curve. This balances multiple conflicting objectives (safety, economy, and equipment lifespan), generating dynamic thresholds rather than fixed values to adapt to real-time grid fluctuations and the uncertainty of renewable energy output, thereby addressing the resource waste and safety risks caused by the rigidity of traditional threshold settings.

[0255] S204, correcting the dynamic anti-backflow threshold curve through a real-time collaborative verification module, combining grid impedance parameters with a PCS response delay model, and using a mixed integer programming algorithm to eliminate threshold jump conflicts and generate an anti-disturbance optimization threshold. Specifically, this may include:

[0256] S2041: Build an equivalent circuit model based on grid impedance parameters and, combined with PCS response delay test data, construct a collaborative verification model that includes transmission loss and response lag.

[0257] This step provides an underlying verification framework for modifying the threshold curve by accurately modeling the physical characteristics of the power grid and the dynamic response characteristics of the PCS, ensuring that the optimized threshold meets the actual power grid operation constraints.

[0258] Grid impedance parameter modeling:

[0259] Impedance Parameter Extraction: Based on the grid topology (e.g., a radial microgrid), the impedance parameters of each node are measured, including resistance (R), inductance (L), and capacitance (C). For example, the impedance parameters of a microgrid's main feeder are R = 0.05Ω / km, L = 0.3mH / km, and C = 50nF / km. An equivalent circuit model is generated through piecewise linearization.

[0260] Equivalent Circuit Construction: The power grid is decomposed into multiple π-type equivalent circuits, each consisting of a series RL element and a shunt capacitor. For example, a 1km feeder line is modeled as three π-type circuits, each consisting of R = 0.017Ω, L = 0.1mH, and C = 16.7nF.

[0261] Transmission loss calculation: Line loss is calculated using the node voltage method based on the equivalent circuit model. For example, when the PCS output power is 200kW, the line loss ΔP = 200kW × (0.05Ω / (400V)^2) ≈ 6.25kW.

[0262] ‌PCS Response Delay Modeling‌:

[0263] Delay Test Data Collection: Perform a step response test on the PCS, recording the delay from power command to actual output. For example, the test shows a PCS rise time (Tr) of 50ms, a fall time (Tf) of 70ms, and a tracking error (TE) of ±2%.

[0264] Transfer function fitting: A first-order inertia link is used to approximate the PCS dynamic characteristics. The transfer function is G(s) = K / (Ts+1), where the gain K = 0.98 (matching the steady-state error) and the time constant Ts = 0.1s (fitting Tr and Tf).

[0265] Co-verification model integration: Couple the grid equivalent circuit model with the PCS transfer function to construct a time-domain simulation model. For example, a joint model can be built in MATLAB / Simulink with a simulation step size of Δt = 1ms to simulate the entire process of transmitting power commands to the grid.

[0266] S2042: Input the dynamic anti-backflow threshold curve into the collaborative verification model, and detect threshold jump conflict points in adjacent time windows through pulse sequence scanning;

[0267] This step uses high-precision scanning and conflict detection mechanisms to identify transient instability issues in the threshold curve caused by dynamic adjustments, providing target areas for subsequent optimization.

[0268] Pulse sequence scanning design:

[0269] Pulse Parameter Definition: Generates a rectangular pulse train with adjustable frequency to simulate threshold transitions. For example, set the pulse amplitude to ±20kW (covering the typical threshold transition range), the pulse width to 10ms (matching the PCS response time), and the repetition rate to 1Hz (covering the second-level adjustment period).

[0270] Sweep trigger mechanism: The dynamic threshold curve is divided into time windows (e.g., 5 minutes per window), and a pulse sequence is injected into each window to monitor the grid response. For example, five pulses (1 minute apart) are injected into the window 10:00-10:05 to detect whether the voltage fluctuation exceeds the limit (e.g., ±5%).

[0271] Conflict point determination criteria: If a time point meets any of the following conditions, it will be marked as a conflict point:

[0272] The voltage exceeds the limit (such as >420V or <380V);

[0273] Power reverse duration> 200ms;

[0274] The energy storage charge and discharge rate exceeds the rated value by 10%.

[0275] Conflict detection process:

[0276] ‌Threshold Curve Discretization‌: Discretize the continuous threshold curve into a power command sequence with a time resolution of Δt=1s. For example, the curve from 10:00 to 10:05 is converted into 300 data points (1 point per second).

[0277] Pulse Superposition and Simulation: Superimpose pulse disturbances at each discrete point and perform simulations to co-verify the model. For example, superimposing a +20kW pulse at the threshold (120kW) at 10:02:30 would cause the voltage to rise to 425V (5V above the threshold), marking this point as a conflict point.

[0278] Conflict Point Aggregation Analysis: Analyzes the temporal and spatial distribution of conflict points. For example, a curve detected 15 conflict points between 10:00 and 11:00, 80% of which occurred during periods of sudden PV output drops (e.g., 11:00 to 11:30).

[0279] S2043: For the detected threshold jump conflict points, an optimization model including discrete time variables and continuous power variables is constructed, and a branch and bound algorithm is used to solve the anti-disturbance threshold sequence with the minimum adjustment amount;

[0280] This step uses mixed integer programming (MIP) and branch and bound (B&B) algorithms to minimize the adjustment of the original threshold curve while ensuring grid security.

[0281] ‌Optimizing model building‌:

[0282] Decision variable definition:

[0283] Discrete time variable (Integer): The time offset of the conflict point, such as allowing the conflict point time to be adjusted forward or backward by Δt=10s;

[0284] Continuous power variable (Continuous): The power adjustment amount at the conflict point, such as allowing a power correction of ±5%.

[0285] Objective function: Minimize the total adjustment, as Min Σ|ΔP_i| + Σ|Δt_i|, where ΔP_i is the power adjustment at the i-th conflicting point and Δt_i is the time offset.

[0286] Constraints:

[0287] The adjusted threshold curve must pass the conflict-free test of the collaborative validation model;

[0288] The power adjustment shall not exceed ±10% of the original value;

[0289] The time offset does not exceed ±30s.

[0290] ‌Branch and bound algorithm implementation‌:

[0291] Branching strategy: Branches are performed one by one according to the time sequence of the conflict points. For example, first generate three sub-problems based on the time offsets (-10s, 0, +10s) of the first conflict point (10:02:30), and then further branch based on the power adjustment amount (-5%, 0, +5%) of each sub-problem.

[0292] Bound calculation: Calculate the lower bound (LB) of the objective function for the current partial solution at each node. For example, if a node has adjusted three conflicting points, with a total adjustment of ΔP = 8kW + Δt = 20s, then LB = 8 + 20 = 28. If the global optimal solution is known to be ≤ 25, prune the node.

[0293] Pruning rules:

[0294] When the node LB exceeds the current optimal solution, prune;

[0295] When a node violates a constraint (e.g., the adjustment amount exceeds the limit), it is pruned;

[0296] When a node cannot be decomposed further, it backtracks to the parent node.

[0297] ‌Practical application examples‌:

[0298] The original threshold of a conflict point is 120 kW, and the time is 10:02:30. Using branch-and-bound, the optimal solution is a time offset of +10 seconds (10:02:40) and a power adjustment of -5% (114 kW). After this adjustment, the conflict is resolved, and the total cost is (ΔP = 6 kW) + (Δt = 10 seconds) = 16.

[0299] Compared with the unadjusted solution (ΔP = 0, Δt = 0 but the conflict causes a reverse flow loss of 50kW), the adjusted solution has a lower total cost.

[0300] In step S2044, a dynamic stability check is performed on the anti-disturbance threshold sequence. The robustness of the threshold curve under grid frequency fluctuations is enhanced through the phase margin compensation algorithm to generate the final anti-disturbance optimization threshold.

[0301] This step uses stability verification and compensation algorithms to ensure that the optimized threshold curve can withstand disturbances such as grid frequency fluctuations and improve control robustness.

[0302] Dynamic stability check:

[0303] Frequency Domain Analysis: Perform a Fourier transform (FFT) on the threshold curve to identify the main frequency components. For example, if a curve has significant energy in the 0.1-0.5 Hz frequency band (corresponding to a photovoltaic fluctuation period of 2-10 seconds), the stability in this frequency band needs to be verified.

[0304] Time-Domain Simulation Test: Frequency perturbations (e.g., ±0.2Hz fluctuations) are injected into the co-verification model to observe the effect of the threshold curve. For example, when the grid frequency drops from 50Hz to 49.8Hz, the PCS output power increases by 2% due to frequency droop control. It is necessary to ensure that there is no reverse flow after the threshold adjustment.

[0305] Lyapunov Exponent Calculation: This method calculates the maximum Lyapunov Exponent (λ) of the threshold curve to determine the system's sensitivity to disturbances. For example, if λ < 0, the system is stable; if λ > 0, compensation is required.

[0306] Phase Margin Compensation Algorithm:

[0307] Phase Margin Measurement: A threshold control loop is inserted into the open-loop transfer function, and the phase margin (PM) is analyzed using a Bode plot. For example, the original system PM is 30°, which is below the safety threshold of 45°.

[0308] Compensator Design:

[0309] Lead Compensator: Increases the phase margin. The transfer function is Gc(s) = (1 + αTs) / (1 + Ts), with parameters α = 2 and Ts = 0.05s, improving PM to 50°.

[0310] Lag Compensator: Suppresses high-frequency noise. The transfer function is Gc(s) = (1 + βTs) / (1 + Ts), with parameters β = 0.5 and Ts = 0.1s.

[0311] Parameter Setting: Optimize the compensator parameters using trial and error or automated tuning tools such as MATLAB Control System Tuner. For example, we ultimately chose α = 1.8 and Ts = 0.06s, which resulted in a PM = 47°, close to the target.

[0312] ‌‌System operation example‌:

[0313] Input: Dynamic threshold curve (thresholds from 10:00 to 10:30 are 85 → 92 → 88 → 95 kW), grid frequency 49.8 Hz;

[0314] Processing: conflict detection → mixed integer optimization → phase compensation;

[0315] Output: Anti-disturbance optimization threshold (85→90→90→95kW), no jump and PM=47°.

[0316] Dynamic thresholds are input into the grid equivalent circuit model (taking impedance parameters into account) and the PCS response delay model (e.g., power response lag time) to detect threshold jump conflict points within adjacent time windows (e.g., sudden changes leading to device oscillation). A mixed integer programming algorithm (branch-and-bound) is used to jointly optimize the discrete time variables (threshold switching points) and the continuous power variables (threshold amplitudes) to solve for the disturbance-resistant threshold sequence with the minimum adjustment. Phase margin compensation is used to enhance stability under frequency fluctuations, ultimately generating a smooth, disturbance-resistant optimized threshold. This eliminates device oscillations or control instability caused by sudden threshold changes. Model collaborative verification improves the physical feasibility and dynamic robustness of the threshold curve, ensuring safe grid operation under disturbance scenarios.

[0317] S205: Convert the anti-disturbance optimization threshold into a PCS power control instruction, and simultaneously display the threshold execution status and backfeed warning information on the energy management interface, and trigger the adaptive power clamp protection when voltage exceeds the limit or power reverse is detected. Specifically, it may include:

[0318] S2051, input the anti-disturbance optimization threshold into the PCS power mapping model, and convert the threshold curve into a millisecond-level power control instruction sequence through a dynamic interpolation algorithm;

[0319] This step converts the optimized anti-disturbance threshold into millisecond-level instructions executable by the PCS, ensuring that the power control instructions accurately match the dynamic characteristics of the power grid and avoiding control delays or overshoots caused by insufficient time resolution.

[0320] ‌PCS power mapping model construction‌:

[0321] Model Architecture Design: The power mapping model adopts a layered structure, consisting of a time alignment layer, a power conversion layer, and an instruction verification layer. The time alignment layer uses a dynamic interpolation algorithm to generate millisecond-level instruction sequences with a Δt = 10ms interval based on the disturbance rejection optimization threshold (with a time resolution of Δt = 1 second). For example, if a disturbance rejection threshold curve is set to 100kW at 10:00:00, the model needs to decompose it into 100 microinstructions with 10ms intervals (100kW → 100kW → ...).

[0322] Dynamic interpolation algorithm: Cubic spline interpolation is used to smooth threshold jumps. For example, when the threshold jumps from 100kW at 10:00:00 to 110kW at 10:00:01, the interpolation algorithm generates power values at the intermediate 10ms points (such as 100.5kW, 101.0kW, and so on to 109.5kW), thus minimizing the impact of sudden power changes on PCS hardware.

[0323] Command Verification Mechanism: A command conflict detection module is embedded in the power conversion layer to verify whether the power command exceeds the PCS rated capacity (for example, the PCS maximum output power is 500kW). If the interpolated power is 510kW at a certain moment, it is automatically limited to 500kW and an over-limit alarm is recorded.

[0324] ‌Key parameters and examples‌:

[0325] Time resolution matching: The anti-disturbance threshold time granularity is 1 second, which is increased to 10ms after interpolation to meet the PCS control cycle requirements (typical PCS response time is 50ms).

[0326] Interpolation Error Control: Sets the interpolation error to ±0.5%. For example, the deviation between the actual interpolated power and the theoretical value must be less than 0.5kW (when the threshold is 100kW).

[0327] Application Example: During the period from 10:00:00 to 10:00:01, the disturbance rejection threshold of a microgrid increases from 80 kW to 120 kW. The dynamic interpolation algorithm generates 100 intermediate points (80 → 80.4 → 80.8 … 119.6 → 120 kW), with a total ramp time of 1 second and a slope of 40 kW / s, meeting the PCS ramp rate limit (e.g., a maximum of 50 kW / s).

[0328] S2052: Build a 3D visualization engine in the energy management interface to render real-time power control instruction execution progress, backfeed warning areas, and energy storage charge state heat maps;

[0329] This step uses a three-dimensional visualization engine to achieve human-computer interaction and data perspective, helping operation and maintenance personnel to intuitively understand the operating status of the microgrid and quickly locate risk areas.

[0330] ‌3D visualization engine architecture‌:

[0331] Engine Selection and Rendering: A browser-based 3D engine is built using the WebGL (Web Graphics Library) framework to support real-time rendering of microgrid topologies. For example, the PV array, energy storage system, and PCS nodes in the microgrid are modeled as 3D objects and dynamically bound to real-time data (such as PV output and energy storage SOC).

[0332] Data Binding and Updates: Real-time data push is achieved via the WebSocket protocol, with a refresh rate of 1Hz (update once per second). For example, the energy storage SOC heat map updates its color gradient every second (red indicates SOC < 20%, green indicates SOC > 80%).

[0333] ‌Visual element design‌:

[0334] Power Control Progress Bar: This bar displays the degree to which the current PCS power matches the target threshold (e.g., if the target is 100kW and the actual output is 98kW, the progress bar is 98% filled).

[0335] Backfeed Warning Zone: A flashing red area is marked at the grid connection point. When reverse power is detected, the area's radius increases with the reverse flow intensity (e.g., a 10-pixel radius for a 5kW reverse flow and a 40-pixel radius for a 20kW reverse flow).

[0336] Energy Storage Heat Map Overlay: Overlays a heat map on the surface of the 3D model of the energy storage device, with the color gradually changing from dark blue (SOC=0%) to bright yellow (SOC=100%), and displays value labels.

[0337] ‌Practical application examples‌:

[0338] During the midday peak of PV output in a microgrid, the energy management interface showed that the PCS control progress was 95% (target 150kW, actual output 142.5kW), there were no alarms in the backfeed warning area, and the energy storage SOC heat map showed green (SOC = 85%).

[0339] When a sudden drop in PV output causes reverse flow, a red flashing area (30-pixel radius) appears at the grid connection point in the interface, and a pop-up window prompts "Reverse power detected 15kW" and the energy storage heat map turns orange (SOC=45%).

[0340] Technical implementation details:

[0341] Heatmap Generation Algorithm: Gaussian Kernel Density Estimation is used to calculate the SOC distribution, with a kernel bandwidth of 5% (i.e., the influence range of adjacent SOC values is ±5%).

[0342] Dynamic scaling of the warning area: The mapping formula between backflow power and warning area radius is: Radius = base radius + scaling factor × backflow power, where base radius = 10 pixels and scaling factor = 2 pixels / kW.

[0343] Lightweight 3D models: GLTF (GL Transmission Format) is used to compress 3D model files, keeping the model size of a single device below 100KB to ensure smooth browser loading.

[0344] ‌S2053, uses pulse edge detection technology to monitor grid voltage and power direction, triggering graded alarm signals when voltage exceeds the limit or reverse power is detected;

[0345] This step uses high-sensitivity pulse detection and a graded alarm mechanism to achieve rapid identification and response to abnormal grid conditions, avoiding missed or false alarms caused by single threshold detection.

[0346] ‌Pulse edge detection technology implementation‌:

[0347] Voltage Over-Limit Detection: Sets the voltage safety range to 380V-420V (the national standard allows ±10% fluctuation). Using a rising edge (Rising Edge) and falling edge (Falling Edge) dual trigger mechanism, an over-limit event is recorded when the voltage exceeds 420V or falls below 380V. For example, a rising edge alarm is triggered when the voltage rises from 415V to 423V.

[0348] Power Direction Detection: A power sensor (such as a Hall effect sensor) collects the current phase and calculates the power flow direction. Reverse power is detected when the power flow direction is opposite to the preset direction (grid → microgrid). For example, if the current phase angle θ changes from +30° (positive direction) to -15° (negative direction) for 10ms, an alarm is triggered.

[0349] Pulse filtering and debounce: Sliding window averaging filtering (window size = 10ms) is used to eliminate transient noise interference. For example, a transient voltage pulse reaching 425V but lasting only 2ms is considered invalid after filtering.

[0350] ‌Graded alarm signal design‌:

[0351] Alarm level classification: Level 1 (yellow): Voltage over-limit or reverse power duration < 200ms, only log is recorded without protection; Level 2 (orange): Abnormal state lasts 200ms-1 second, triggering audible and visual alarms and notifying operation and maintenance personnel; Level 3 (red): Abnormal state lasts > 1 second, and power clamp protection is immediately activated.

[0352] Alarm signal transmission: Alarm levels are encoded into digital signals (e.g., 0x01 = level 1, 0x02 = level 2, 0x03 = level 3) via the Modbus / TCP protocol and transmitted to the energy management system and PCS controller.

[0353] Application Examples:

[0354] In a microgrid, a load dump caused the voltage to rise to 422V (lasting 180ms), triggering a Level 1 alarm. The system recorded the event but did not intervene.

[0355] If the voltage exceeds the limit for 220ms, it will be upgraded to a level 2 alarm. The energy management interface will pop up a message "Voltage limit exceeded: 422V", and the operation and maintenance personnel will manually adjust the PCS output.

[0356] If the voltage continues to rise to 428V for more than 1 second, a level 3 alarm is triggered, and power clamp protection is automatically activated, forcibly reducing the PCS output power to 80kW.

[0357] ‌S2054, according to the graded alarm signal, start the corresponding multi-level power clamping protection strategy.

[0358] This step balances safety and economy through a multi-level protection strategy to avoid the abandonment of new energy sources such as solar and wind power or over-discharge of energy storage due to excessive protection.

[0359] Multi-level power clamping strategy design:

[0360] Level 1 response (yellow alarm level): Reduce the PCS power output slope and slow down the rate of power change. For example, reduce the PCS ramp rate from 50kW / s to 20kW / s to avoid further exacerbation of grid fluctuations.

[0361] Level 2 response (orange alarm): The preset power clamp threshold is activated to limit the maximum output power of the PCS. For example, if the original threshold curve is 150kW, the limit after clamping is 120kW.

[0362] Level 3 Response (Red Alarm): Execute an emergency shutdown, phase out non-critical loads, and force the energy storage system into standby mode. For example, prioritize shutting off the air conditioning load (50kW) and then the lighting load (30kW).

[0363] Strategy execution process:

[0364] Dynamic Priority Matching: Adjusts protection intensity based on the energy storage SOC state. For example, when SOC < 30%, the secondary response power clamp threshold is lowered by 10% (from 120kW to 108kW).

[0365] Delayed trigger mechanism: The three-level response is delayed 500ms after the alarm is triggered to avoid misoperation. For example, after detecting a voltage exceeding the limit for 1 second, it will wait 500ms to confirm that the status has not recovered, and finally shut down the system.

[0366] ‌Self-recovery after protection‌: When the grid status returns to normal (voltage drops back to 410V and power direction is correct) for 5 minutes, the clamp protection is automatically released and the PCS output is gradually restored to the original threshold curve.

[0367] ‌Practical application examples‌:

[0368] A microgrid triggered a level 2 alarm due to a sudden increase in PV output. The PCS power was clamped to 100kW (original threshold: 120kW), reducing the amount of curtailed solar power.

[0369] When a grid fault causes a level 3 alarm, the system cuts off 80kW of non-critical loads after a 500ms delay, allowing the energy storage SOC to recover and avoid over-discharge damage.

[0370] ‌‌Typical operating scenario examples‌ :

[0371] Input: Anti-disturbance optimization threshold curve (90→95→100kW from 10:00 to 10:30), grid voltage 415V, power direction normal;

[0372] Process: At 10:05:00, the voltage was detected to have risen to 423V (lasting 250ms), triggering a level 2 alarm and clamping the PCS power to 90kW. The energy management interface displayed a red warning area, and the energy storage heat map turned orange (SOC = 40%). At 10:05:30, the voltage returned to 418V, the protection was lifted, and the PCS gradually recovered to 95kW.

[0373] Optimized thresholds are converted into millisecond-level power commands (such as current limits and power reference values) executable by the PCS through a dynamic interpolation algorithm. The threshold execution status (such as current thresholds and deviation alarms) and backfeed heat maps are displayed in real time on the energy management interface. Pulse edge detection technology is used to monitor grid voltage and power direction. When over-limit or reverse power is detected, multi-level power clamping protection (such as graded power reduction and emergency disconnection) is triggered. The protection strength is adaptively adjusted to minimize losses, achieving seamless conversion from thresholds to control commands and visual monitoring. A hierarchical protection mechanism rapidly responds to abnormal operating conditions, preventing equipment damage or grid failures caused by reverse flow, thereby improving the reliability of microgrid operation and the transparency of human-computer interaction.

[0374] Another embodiment of the present invention provides a microgrid anti-backflow control system based on multi-objective optimization, see Figure 3 , the system may include:

[0375] Extraction module 301 is used to extract multimodal grid characteristics through a spatiotemporal convolutional neural network based on the grid-side voltage, user-side load power, and energy storage system state of charge data collected in real time by the energy management system, and generate dynamic load forecast results, wherein the spatiotemporal convolutional neural network integrates grid fluctuation trends and user electricity consumption behavior patterns;

[0376] A construction module 302 is configured to construct an anti-backflow risk characteristic matrix based on the dynamic load forecast result and in combination with the real-time output power data of the power converter PCS, and map the matrix to a multidimensional optimization space using an adaptive eigendecomposition algorithm to obtain a quantitative index of the backflow risk;

[0377] A generation module 303 is configured to determine an optimal solution set for anti-backflow thresholds based on the backflow risk quantification index using a multi-objective particle swarm optimization algorithm, wherein the multi-objective particle swarm optimization algorithm generates a corresponding dynamic anti-backflow threshold curve with the optimization objectives of suppressing backfeeding, minimizing the amount of curtailed solar and wind power, and ensuring the life of energy storage;

[0378] A correction module 304 is configured to correct the dynamic anti-backflow threshold curve through a real-time collaborative verification module, combine the grid impedance parameters with the PCS response delay model, and use a mixed integer programming algorithm to eliminate the threshold jump conflict and generate an anti-disturbance optimization threshold;

[0379] The control module 305 is used to convert the anti-disturbance optimization threshold into a PCS power control instruction, synchronously display the threshold execution status and backfeed warning information on the energy management interface, and trigger the adaptive power clamp protection when voltage exceeding the limit or power reverse is detected.

[0380] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.

[0381] Specifically, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for performing the following steps:

[0382] S201, based on the grid-side voltage, user-side load power, and energy storage system state of charge data collected in real time by the energy management system, extract multimodal grid characteristics through a spatiotemporal convolutional neural network to generate a dynamic load forecast result, wherein the spatiotemporal convolutional neural network integrates grid fluctuation trends and user electricity consumption behavior patterns;

[0383] S202, based on the dynamic load forecast result and in combination with the real-time output power data of the power converter PCS, constructing an anti-backflow risk characteristic matrix, mapping the matrix to a multidimensional optimization space using an adaptive eigendecomposition algorithm, and obtaining a quantitative index of the backflow risk;

[0384] S203, based on the quantitative index of the reverse flow risk, a multi-objective particle swarm optimization algorithm is used to determine the optimal solution set of the anti-reverse flow threshold, wherein the multi-objective particle swarm optimization algorithm is optimized with the objectives of suppressing backfeeding, minimizing the amount of curtailed solar and wind power, and ensuring the life of the energy storage system, and generates a corresponding dynamic anti-reverse flow threshold curve;

[0385] S204, modifying the dynamic anti-backflow threshold curve through a real-time collaborative verification module, combining grid impedance parameters with a PCS response delay model, and using a mixed integer programming algorithm to eliminate threshold jump conflicts and generate an anti-disturbance optimization threshold;

[0386] S205, converting the anti-disturbance optimization threshold into a PCS power control instruction, synchronously displaying the threshold execution status and backfeed warning information on the energy management interface, and triggering adaptive power clamping protection when voltage exceeding the limit or power reverse is detected.

[0387] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

[0388] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0389] Specifically, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0390] S201, based on the grid-side voltage, user-side load power, and energy storage system state of charge data collected in real time by the energy management system, extract multimodal grid characteristics through a spatiotemporal convolutional neural network to generate a dynamic load forecast result, wherein the spatiotemporal convolutional neural network integrates grid fluctuation trends and user electricity consumption behavior patterns;

[0391] S202, based on the dynamic load forecast result and in combination with the real-time output power data of the power converter PCS, constructing an anti-backflow risk characteristic matrix, mapping the matrix to a multidimensional optimization space using an adaptive eigendecomposition algorithm, and obtaining a quantitative index of the backflow risk;

[0392] S203, based on the quantitative index of the reverse flow risk, a multi-objective particle swarm optimization algorithm is used to determine the optimal solution set of the anti-reverse flow threshold, wherein the multi-objective particle swarm optimization algorithm is optimized with the objectives of suppressing backfeeding, minimizing the amount of curtailed solar and wind power, and ensuring the life of the energy storage system, and generates a corresponding dynamic anti-reverse flow threshold curve;

[0393] S204, modifying the dynamic anti-backflow threshold curve through a real-time collaborative verification module, combining grid impedance parameters with a PCS response delay model, and using a mixed integer programming algorithm to eliminate threshold jump conflicts and generate an anti-disturbance optimization threshold;

[0394] S205, converting the anti-disturbance optimization threshold into a PCS power control instruction, synchronously displaying the threshold execution status and backfeed warning information on the energy management interface, and triggering adaptive power clamping protection when voltage exceeding the limit or power reverse is detected.

[0395] It can be seen that the dynamic load forecast result is generated according to the grid-side voltage, user-side load power and energy storage system charge status data collected in real time by the energy management system; based on the dynamic load forecast result, the reverse flow risk quantitative index is obtained; according to the reverse flow risk quantitative index, the corresponding dynamic anti-reverse flow threshold curve is generated; the dynamic anti-reverse flow threshold curve is corrected by the real-time collaborative verification module to generate an anti-disturbance optimization threshold; the anti-disturbance optimization threshold is converted into a PCS power control instruction, and the threshold execution status and reverse power supply warning information are displayed synchronously on the energy management interface. When the voltage exceeds the limit or the power is reversed, the adaptive power clamping protection is triggered, thereby improving the intelligence level of the microgrid reverse flow prevention and control and ensuring the safe and stable operation of the power grid.

[0396] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the scope of implementation of the present invention is not limited to what is shown in the drawings. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which do not exceed the spirit covered by the description and drawings, should be within the scope of protection of the present invention.

Claims

1. A microgrid anti-backflow control method based on multi-objective optimization, characterized in that: The method comprises: Based on the real-time collected grid-side voltage, user-side load power and energy storage system charge state data, multimodal grid characteristics are extracted to generate dynamic load forecast results; wherein, based on the millisecond-level sampling sequence of the grid-side voltage, the minute-level statistical value of the user-side load power and the second-level change data of the energy storage charge state, the sampling time difference of the multi-source data is compensated by the dynamic time warping algorithm to generate a time-space aligned original data tensor; the original data tensor is subjected to chaotic noise suppression processing, and the high-frequency noise and low-frequency trend components of the grid fluctuation are separated by using a dynamic weight matrix to output the noise-reduced time-frequency feature matrix; the user's historical electricity consumption behavior data is input into the spatiotemporal attention network, and the current load characteristics and behavior pattern library are matched through a sliding window to generate a user behavior embedding vector, and the user behavior embedding vector is cross-modally fused with the time-frequency feature matrix to obtain a multimodal grid feature tensor; the multimodal grid feature tensor is input into the bidirectional gated spatiotemporal convolutional network, and the long-term and short-term load correlation is captured through residual connection, and the dynamic load forecast result and confidence interval for the next 15 minutes are output; Based on the dynamic load forecast results, combined with the real-time output power data of the power converter PCS, an anti-backflow risk feature matrix is constructed, and the matrix is mapped to a multi-dimensional optimization space to obtain a quantitative index of the backflow risk; wherein, according to the dynamic load forecast results and the PCS real-time power data, an anti-backflow risk feature matrix containing time and space dimensions is constructed; an adaptive rotation factor decomposition algorithm is used to perform orthogonal decomposition on the risk feature matrix to generate a multi-dimensional risk feature vector; based on the real-time operating status of the power grid, the weight ratio of each factor in the multi-dimensional risk feature vector is adjusted through a dynamic game strategy; anomaly detection is performed on the adjusted multi-dimensional risk feature vector, and a generative adversarial network is used to simulate the feature distribution under extreme scenarios to reconstruct a multi-dimensional optimization vector with enhanced robustness; the multi-dimensional optimization vector is input into a radial basis function interpolation model to generate a quantitative index of the backflow risk and its probability density distribution curve; According to the quantitative index of reverse flow risk, a multi-objective particle swarm optimization algorithm is used to determine the optimal solution set of the anti-reverse flow threshold and generate the corresponding dynamic anti-reverse flow threshold curve; wherein, according to the probability density distribution of the quantitative index of reverse flow risk, a chaotic perturbation strategy is used to initialize the particle swarm position and set the three-dimensional target space; based on the historical optimal solution distribution of the particle swarm, the weight coefficient of each optimization target in the three-dimensional target space is adjusted in real time by the sliding mode control algorithm; a coupling constraint model of the energy storage charging and discharging rate and the PCS power output is constructed, and a pulse-triggered constraint relaxation algorithm is used to eliminate infeasible solutions in the particle swarm iteration; the Pareto front solution set generated by the particle swarm is reconstructed by convex hull, and the dynamic density clustering algorithm is used to eliminate redundant solutions to generate a high-density distributed anti-reverse flow threshold candidate set; the anti-reverse flow threshold candidate set is input into the spatiotemporal smoothing filter, and the curve jump is eliminated by the Lyapunov stability constraint, and the dynamic anti-reverse flow threshold curve that meets the safe operation of the power grid is output; The dynamic anti-backflow threshold curve is corrected, and the mixed integer programming algorithm is used to eliminate the threshold jump conflict in combination with the grid impedance parameters and the PCS response delay model to generate an anti-disturbance optimization threshold; wherein, an equivalent circuit model is constructed according to the grid impedance parameters, and a collaborative verification model including transmission loss and response lag is constructed in combination with the PCS response delay test data; the dynamic anti-backflow threshold curve is input into the collaborative verification model, and the threshold jump conflict points in adjacent time windows are detected by pulse sequence scanning; for the detected threshold jump conflict points, an optimization model including discrete time variables and continuous power variables is constructed, and the branch and bound algorithm is used to solve the anti-disturbance threshold sequence with the minimum adjustment amount; a dynamic stability check is performed on the anti-disturbance threshold sequence, and the robustness of the threshold curve under grid frequency fluctuations is enhanced by the phase margin compensation algorithm to generate the final anti-disturbance optimization threshold; The anti-disturbance optimization threshold is converted into a PCS power control instruction, and the threshold execution status and reverse power supply warning information are synchronously displayed on the energy management interface. When voltage exceeding the limit or power reverse is detected, adaptive power clamping protection is triggered; wherein, the anti-disturbance optimization threshold is input into the PCS power mapping model, and the threshold curve is converted into a millisecond-level power control instruction sequence through a dynamic interpolation algorithm; a three-dimensional visualization engine is constructed on the energy management interface to render the power control instruction execution progress, reverse power supply warning area and energy storage charge state heat map in real time; pulse edge detection technology is used to monitor the grid voltage and power direction, and when voltage exceeding the limit or reverse power is detected, a hierarchical alarm signal is triggered; according to the hierarchical alarm signal, the corresponding multi-level power clamping protection strategy is started.

2. A microgrid anti-backflow control system based on multi-objective optimization, characterized in that: The system comprises: The extraction module is used to extract multimodal grid features and generate dynamic load forecast results based on the real-time collected grid-side voltage, user-side load power and energy storage system charge state data; wherein, based on the millisecond-level sampling sequence of the grid-side voltage, the minute-level statistical value of the user-side load power and the second-level change data of the energy storage charge state, the sampling time difference of the multi-source data is compensated by the dynamic time warping algorithm to generate a time-space aligned original data tensor; the original data tensor is subjected to chaotic noise suppression processing, and the high-frequency noise and low-frequency trend components of the grid fluctuation are separated by a dynamic weight matrix to output the noise-reduced time-frequency feature matrix; the user's historical electricity consumption behavior data is input into the spatiotemporal attention network, and the current load characteristics and behavior pattern library are matched through a sliding window to generate a user behavior embedding vector, and the user behavior embedding vector is cross-modally fused with the time-frequency feature matrix to obtain a multimodal grid feature tensor; the multimodal grid feature tensor is input into the bidirectional gated spatiotemporal convolutional network, and the long-term and short-term load correlation is captured through residual connection to output the dynamic load forecast result and confidence interval for the next 15 minutes; A construction module is used to construct an anti-backflow risk feature matrix based on the dynamic load forecast results and the real-time output power data of the power converter PCS, map the matrix to a multi-dimensional optimization space, and obtain a quantitative index of the backflow risk; wherein, according to the dynamic load forecast results and the real-time power data of the PCS, an anti-backflow risk feature matrix containing time and space dimensions is constructed; an adaptive rotation factor decomposition algorithm is used to perform orthogonal decomposition on the risk feature matrix to generate a multi-dimensional risk feature vector; based on the real-time operating status of the power grid, the weight ratio of each factor in the multi-dimensional risk feature vector is adjusted through a dynamic game strategy; anomaly detection is performed on the adjusted multi-dimensional risk feature vector, and a generative adversarial network is used to simulate the feature distribution under extreme scenarios to reconstruct a multi-dimensional optimization vector with enhanced robustness; the multi-dimensional optimization vector is input into a radial basis function interpolation model to generate a quantitative index of the backflow risk and its probability density distribution curve; A generation module is used to determine the optimal solution set of the anti-backflow threshold based on the reverse flow risk quantitative index using a multi-objective particle swarm optimization algorithm, and generate a corresponding dynamic anti-backflow threshold curve; wherein, according to the probability density distribution of the reverse flow risk quantitative index, a chaotic perturbation strategy is used to initialize the particle swarm position and set the three-dimensional target space; based on the historical optimal solution distribution of the particle swarm, the weight coefficient of each optimization target in the three-dimensional target space is adjusted in real time through the sliding mode control algorithm; a coupling constraint model of the energy storage charging and discharging rate and the PCS power output is constructed, and a pulse-triggered constraint relaxation algorithm is used to eliminate infeasible solutions in the particle swarm iteration; the Pareto front solution set generated by the particle swarm is reconstructed by convex hull, and redundant solutions are eliminated using a dynamic density clustering algorithm to generate a high-density distributed anti-backflow threshold candidate set; the anti-backflow threshold candidate set is input into a spatiotemporal smoothing filter, and the curve jump is eliminated through the Lyapunov stability constraint, and a dynamic anti-backflow threshold curve that meets the requirements of safe operation of the power grid is output; A correction module is used to correct the dynamic anti-backflow threshold curve, combine the grid impedance parameters and the PCS response delay model, use a mixed integer programming algorithm to eliminate the threshold jump conflict, and generate an anti-disturbance optimization threshold; wherein, an equivalent circuit model is constructed according to the grid impedance parameters, and a collaborative verification model including transmission loss and response lag is constructed in combination with the PCS response delay test data; the dynamic anti-backflow threshold curve is input into the collaborative verification model, and the threshold jump conflict points in adjacent time windows are detected by pulse sequence scanning; for the detected threshold jump conflict points, an optimization model including discrete time variables and continuous power variables is constructed, and a branch and bound algorithm is used to solve the anti-disturbance threshold sequence with the minimum adjustment amount; a dynamic stability check is performed on the anti-disturbance threshold sequence, and the robustness of the threshold curve under grid frequency fluctuations is enhanced by a phase margin compensation algorithm to generate the final anti-disturbance optimization threshold; A control module is used to convert the anti-disturbance optimization threshold into a PCS power control instruction, and simultaneously display the threshold execution status and reverse power supply warning information on the energy management interface, and trigger the adaptive power clamping protection when voltage exceeding the limit or power reverse is detected; wherein, the anti-disturbance optimization threshold is input into the PCS power mapping model, and the threshold curve is converted into a millisecond-level power control instruction sequence through a dynamic interpolation algorithm; a three-dimensional visualization engine is constructed on the energy management interface to render the power control instruction execution progress, reverse power supply warning area and energy storage charge state heat map in real time; pulse edge detection technology is used to monitor the grid voltage and power direction, and when voltage exceeding the limit or reverse power is detected, a hierarchical alarm signal is triggered; according to the hierarchical alarm signal, the corresponding multi-level power clamping protection strategy is started.

3. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to claim 1 when executed.

4. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to claim 1 .

Citation Information

Patent Citations

  • Source load system anti-reflux control method and device and source load system

    CN114498703A

  • Anti-countercurrent control method of micro-grid system and micro-grid system

    CN115207900A