A method and system for adaptively adjusting inverter grid-following and grid-building control modes
By constructing a multi-scale fusion deep assessment model, obtaining grid status parameters in real time and adaptively selecting control modes, the problem of insufficient inertia of inverters in power systems with a high proportion of renewable energy access is solved, accurate identification and rapid response to disturbances are achieved, and the stability and robustness of the system are improved.
Patent Information
- Application Number
- CN202510804696.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-17
AI Technical Summary
In power systems with a high proportion of renewable energy access, the inverter lacks inertia and damping, resulting in delayed disturbance response and untimely mode switching. Existing methods find it difficult to identify the time scale differences of disturbances and their combined effects on system stability, and lack the state perception capability and control mode adaptation mechanism for all operating conditions and all time domains.
A multi-scale fusion deep evaluation model is constructed. By acquiring grid state parameters in real time, multi-scale embedding modules and branch memory networks are used to extract disturbance characteristics at different time scales, generate grid state evaluation indicators, adaptively select control modes, and adjust the control parameters of the inverter in combination with a global optimization model.
It significantly improves the grid's recognition depth and time sensitivity to disturbance behavior, enhances the response speed and robustness of the inverter control strategy, and improves the system's stability and adaptability under multiple disturbances and multiple operating conditions.
Smart Images

Figure CN120320405B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of power system stability control, and specifically relates to a method and system for adaptively adjusting inverter grid following and grid construction control modes. Background Art
[0002] In the current context of high renewable energy access, power system operation faces multiple challenges, including frequent disturbances, insufficient inertial support, and reduced stability margins. Especially under weak grid conditions, traditional stabilization mechanisms centered around synchronous generators are gradually failing, and there is an urgent need to rely on the voltage and frequency support capabilities of inverters to ensure the system's dynamic performance. However, the inverter itself lacks inherent inertia and damping, and its response to disturbances is highly dependent on the degree of matching between the control parameter configuration and the current grid state. This leads to problems such as delayed response, untimely mode switching, and even system oscillation and instability when facing disturbances of varying intensities. Existing methods often rely on static parameter adjustments or models based on single disturbance characteristics, making it difficult to effectively identify differences in the time scales of disturbances and their combined effects on system stability. They also lack state perception capabilities and control mode adaptation mechanisms for all operating conditions and the entire time domain.
[0003] Therefore, there is an urgent need to build an intelligent modeling framework that can integrate multi-timescale disturbance information, dynamically perceive the stability of the power grid and guide the adaptive switching of control strategies to enhance the stability and robustness of the power system under the dominance of the inverter. Summary of the Invention
[0004] In response to the deficiencies in the existing technology, the main purpose of this application is to provide a method and system for adaptively adjusting the grid-following and grid-forming control modes of an inverter. This application aims to adaptively adjust the grid-following and grid-forming control modes of the inverter to improve the dynamic stability and disturbance response capability of the power system.
[0005] To achieve the above objectives, this application provides the following technical solutions:
[0006] A method for adaptively adjusting inverter grid-following and grid-forming control modes, the method comprising: acquiring current grid state parameters in real time; constructing and training a multi-scale fusion deep assessment model; inputting the current grid state parameters into the trained multi-scale fusion deep assessment model, and outputting current grid state evaluation indicators; adaptively selecting a control mode based on the current grid state evaluation indicators, the control modes including a grid-following inverter-dominated mode, a grid-forming inverter-dominated mode, and a transition mode; and verifying, based on the selected control mode, whether the grid state satisfies constraint conditions; and if not, globally optimizing the inverter control parameters.
[0007] Optionally, the multi-scale fusion deep evaluation model includes: an input layer, a multi-scale embedding module, a branch memory network and an output layer, wherein the input layer is used to input the current power grid state parameters; the multi-scale embedding module is used to extract the disturbance characteristics of different time scales in the current power grid state parameters; the branch memory network is used to perform time series modeling on the disturbance characteristics of different time scales and generate current power grid state evaluation indicators; the output layer is used to output the current power grid state evaluation indicators.
[0008] Optionally, the multi-scale embedding module includes: a first branch, a second branch and a third branch, wherein the first branch is used to extract short-term disturbance characteristics in power grid operation; the second branch is used to extract medium-term disturbance characteristics in power grid operation; and the third branch is used to identify long-term disturbance trends in power grid operation.
[0009] Optionally, the branch memory network includes: a first branch, a second branch and a third branch, wherein the first branch is used to capture the mutation characteristics in the short-term disturbance characteristics; the second branch is used to capture the trends and dynamic processes in the medium-term disturbance characteristics; and the third branch is used to extract the structural evolution characteristics in the long-term disturbance trends.
[0010] Optionally, the multi-scale fusion deep assessment model is trained through the following steps: obtaining historical state parameter data of the power grid and corresponding state evaluation indicators to form a data set, and dividing the data set into a training set and a validation set; setting training parameters, and training the multi-scale fusion deep assessment model through the training set until the maximum number of iterations is reached; using back propagation to fine-tune the multi-scale fusion deep assessment model to ensure that the difference between the state evaluation indicators output by the model and the true values is minimized, wherein the multi-scale fusion deep assessment model is fine-tuned using back propagation, including: using the validation set to verify the trained multi-scale fusion deep assessment model, calculating the state evaluation indicator prediction error of the model on the validation set, and when the error is <0.05, the verification is passed; otherwise, the ratio of the training set and the validation set is redivided or the training parameters are adjusted to retrain the model until the verification is passed.
[0011] Optionally, the adaptively selecting the control mode according to the current power grid state evaluation index includes: grading the current power grid state evaluation index; and selecting the control mode based on the graded current power grid state evaluation index and the power grid state.
[0012] Optionally, the grading of the current power grid state evaluation indicators includes: dividing the current power grid state evaluation indicators into a stable state, a critical state and an unstable state.
[0013] Optionally, the globally optimizing the control parameters of the inverter includes: online optimizing the control parameters of the inverter by constructing a global optimization model, wherein the global optimization model is expressed as follows:
[0014] in, is the global optimization objective function, which means that under a given control parameter set The comprehensive performance cost of the power grid is used to measure the weighted overall evaluation of multiple indicators such as stability, synchronization accuracy, damping ratio control capability and operating efficiency of grid-following and grid-forming inverters under the current control parameter configuration; Represents the stable energy offset, which is used to measure the power imbalance between the two inverters under disturbance conditions, and the unit is per unit value; It represents the weighted synchronization error index, which is used to measure the tracking and maintenance capabilities of the grid-following and grid-forming inverters to the target phase angle. The unit is radian. The smaller it is, the better the phase synchronization between the inverter and the grid is, and the stronger the tracking performance is. Indicates the damping ratio contribution, which is used to reflect the current control set The improvement effect of the inverter on the key modal damping ratio of the power grid under the following conditions: Indicates grid operation loss, including inverter switching loss , loss caused by the filter and cable line losses , the unit is pu; represents the stability energy weight, indicating that the stability energy offset term is given priority when the network is weak and the disturbance is severe; is the synchronization performance weight, which represents the acceleration of synchronization consistency error; Denotes the damping ratio contribution The weight of represents the grid's attention to oscillation mode control; Represents the running loss weight.
[0015] The present application also provides an inverter grid-following and grid-forming control mode adaptive adjustment system, the system including: an acquisition module for real-time acquisition of current grid state parameters; a model construction and training module for constructing and training a multi-scale fusion deep evaluation model; an evaluation index acquisition module for inputting the current grid state parameters into the trained multi-scale fusion deep evaluation model and outputting the current grid state evaluation index; a control mode selection module for adaptively selecting a control mode according to the current grid state evaluation index, the control mode including a grid-following inverter dominant mode, a grid-forming inverter dominant mode and a transition mode; a global optimization module for verifying whether the grid state meets the constraint conditions according to the selected control mode, and if not, performing global optimization on the control parameters of the inverter.
[0016] Optionally, the control mode selection module includes: a grading submodule for grading the current power grid state evaluation index; and a selection submodule for selecting a control mode based on the graded current power grid state evaluation index and the power grid state.
[0017] This application can bring the following beneficial effects:
[0018] By constructing a multi-scale fusion deep assessment model, this application can achieve accurate extraction and dynamic expression of grid disturbance characteristics at different time scales, and can significantly improve the grid's recognition depth and time sensitivity to disturbance behavior; at the same time, through the control mode switching mechanism driven by state evaluation indicators, the inverter control strategy can be adaptively adjusted in real time according to the grid state, thereby enhancing the system's stability, response speed and robustness under multiple disturbances and multiple operating conditions, breaking through the limitations of traditional inverter control strategies that rely on fixed parameters, and has broad engineering adaptability and promotion value. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a flow chart of a method for adaptively adjusting inverter grid-following and grid-building control modes provided by an embodiment of the present application;
[0020] Figure 2 is a structural diagram of a multi-scale fusion depth assessment model provided by another embodiment of the present application;
[0021] Figure 3 This is a structural diagram of an inverter grid-following and grid-building control mode adaptive adjustment system provided by another embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0023] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0024] In this application, unless otherwise specified or limited, the terms "connection" and "fixation" should be understood in a broad sense. For example, "fixation" can mean fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two elements or interaction between two elements, unless otherwise specified. For those skilled in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0025] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the meaning of "and / or" appearing throughout the text includes three parallel schemes. Taking "A and / or B" as an example, it includes scheme A, or scheme B, or a scheme in which A and B are satisfied at the same time. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement it. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0026] Figure 1 An exemplary embodiment of the present application provides a method for adaptively adjusting the inverter grid-following and grid-building control modes, such as Figure 1 As shown, the method includes the following steps:
[0027] S100: Acquire current grid state parameters in real time, where the grid state parameters include, for example, voltage, current, frequency, and phase angle.
[0028] S200: Build and train a multi-scale fusion depth assessment model;
[0029] S300: Inputting the current grid state parameters into the trained multi-scale fusion deep assessment model, and outputting a current grid state evaluation index, wherein the grid state evaluation index refers to a quantitative score for the grid state, and its essential function is to compress the complex, multi-dimensional grid operation state into a comprehensive score reflecting stability, disturbance degree, or control adaptability through an algorithm;
[0030] S400: Adaptively selecting a control mode according to a current grid state evaluation index, wherein the control mode includes a grid-following inverter-dominated mode, a grid-forming inverter-dominated mode, and a transition mode;
[0031] S500: Verify whether the grid state satisfies the constraint conditions according to the selected control mode; if not, perform global optimization on the control parameters of the inverter.
[0032] In another exemplary embodiment, in step S200, Figure 2As shown, the multi-scale fusion deep assessment model includes an input layer, a multi-scale embedding module, a branch memory network and an output layer. The input layer is used to input the current power grid state parameters. The multi-scale embedding module divides the input current power grid state parameters according to different time perception granularities and extracts representative disturbance features from different scales. The multi-scale embedding module sets three parallel time windows, including a first time window (5~10s, short-term disturbance), a second time window (15~25s, medium-term disturbance) and a third time window (30~60s, long-term trend). Accordingly, the multi-scale embedding module includes three branches, corresponding to the first time window, the second time window and the third time window respectively. The first branch is used to extract short-term disturbance features from power grid operation. It specifically includes a multi-scale parallel convolution block, a frequency domain feature enhancement module, a local contrast enhancement module, a channel attention module, and a first embedded feature output layer. The multi-scale parallel convolution module is configured with three parallel one-dimensional convolution channels, with kernel sizes set to 3, 5, and 7, respectively, to extract short-term disturbance features under different perception conditions. For example, small-scale convolution (kernel size 3) focuses on high-frequency, small disturbances (such as spike jitter) in short-term disturbance features, medium-scale convolution (kernel size 5) focuses on medium-scale sudden changes (such as surge edges) in short-term disturbance features, and large-scale convolution (kernel size 7) focuses on morphological changes within a wider window (such as transient jumps). Each convolution channel is followed by batch normalization (BatchNorm) and ReLU activation functions to enhance nonlinear response capabilities. The outputs of the three convolutional channels are concatenated in the time dimension and then compressed and fused using a 1×1 convolution to generate a multi-scale short-term disturbance response feature map, which serves as the basis for the initial disturbance representation of the first branch. The frequency domain feature enhancement module takes the multi-scale short-term disturbance response feature map as input and extracts several segments according to time windows. A fast Fourier transform (FFT) is then performed on each time segment to obtain the spectral distribution, and the real part of the spectrum is truncated to describe the high-frequency components. This truncated real part of the spectrum is then input into a two-layer fully connected network (MLP) for feature encoding to obtain the encoded frequency domain features. Finally, the encoded frequency domain features are concatenated with the time domain convolution output in the channel dimension to obtain a joint time-frequency feature representation. This module effectively captures high-frequency disturbances such as frequency ripples and short-term oscillations that are difficult to identify in the time domain. The local contrast enhancement module takes the joint time-frequency feature representation as input and uses a sliding window approach to perform local context modeling on the features at each moment in the joint time-frequency feature representation. Specifically, the module extracts the feature mean in its neighboring area at each time point and performs a difference operation with the current feature value to capture the disturbance changes of the background at each time point.This process is equivalent to extracting first-order local differences, which has an edge enhancement effect and can amplify abnormal disturbances with small magnitude but significant perturbation behavior, such as voltage spikes or frequency jumps. Ultimately, this module outputs a local contrast-enhanced feature tensor, providing clearer perturbation structure information for subsequent attention modeling and perturbation identification. The channel attention module, taking the local contrast-enhanced feature tensor as input, first performs global average pooling on each channel to extract the overall channel response strength. It then generates channel weight factors through two fully connected layers and a sigmoid activation function. Finally, each channel in the local contrast-enhanced feature tensor is weighted multiplicatively to form a channel-weighted perturbation feature tensor. The channel attention module can significantly enhance the representation of the dominant perturbation dimension in multi-channel scenarios (such as multiphase voltage / current). The first embedding feature passes the channel-weighted perturbation feature tensor through a linear normalization layer and a GELU activation function for normalization and nonlinear transformation. It then passes it through a fully connected layer to map the high-dimensional tensor into an embedding vector of uniform dimensionality. This vector retains a series of processing characteristics such as time-frequency joint expression, local mutation contrast enhancement, and channel-focused perturbation response, and serves as the final short-term perturbation representation result of the first branch.
[0033] The first branch primarily models short-term disturbances of 5 to 10 seconds, aiming to accurately extract the high-frequency perturbation features that appear in the power grid. This branch enhances the ability to identify transient disturbances in both the time and frequency domains. The convolution kernel sizes are set to 3, 5, and 7 to cover different receptive fields, effectively capturing local disturbances such as spikes and voltage jitter. Simultaneously, frequency domain analysis extracts high-frequency features through fast Fourier transforms, enhancing the model's perception of invisible frequency mutations. The local contrast enhancement module further highlights the edge information of abnormal disturbance points through sliding window differentiation. The channel attention mechanism weights and highlights key disturbance dimensions in multi-phase electrical quantities. In summary, this branch can effectively improve the model's sensitivity and discriminability to short-term mutation signals.
[0034] The second branch is used to extract medium-term disturbance characteristics from power grid operations. It specifically includes a dilated convolution trend extraction module, a dynamic time series modeling module, a multidimensional feature fusion layer, and a second embedded feature output layer. The dilated convolution trend extraction module performs preliminary extraction of trend disturbances within the medium-term time scale. This module employs three parallel one-dimensional convolution channels with different dilation rates (e.g., 1, 2, and 4). This maintains a wide receptive field while minimizing computational overhead, enabling it to capture multiple time scales of medium-term variations such as phase drift, current ramping, and voltage offset. Each one-dimensional convolution channel is coupled with batch normalization (BatchNorm) and a GELU activation function, and the outputs of all channels are concatenated to form a medium-term trend response tensor. The dynamic time series modeling module incorporates a convolutional gated recurrent unit (ConvGRU). Compared to traditional gated recurrent units, this convolutional gated recurrent unit not only retains the memory mechanism in the temporal dimension but also incorporates the advantages of convolutional structures in extracting spatially localized features, enabling it to directly operate on the joint spatial-temporal features of the medium-term trend response tensor. In the specific modeling process, ConvGRU dynamically controls the updating and forgetting of information through a gating mechanism, and can identify the starting time, changing trend, duration, and coupling and conduction relationship between different feature dimensions of the disturbance behavior. Especially for non-transient disturbance behaviors such as slow drift, low-frequency periodic oscillation, and delayed response, ConvGRU has stronger representation and discrimination capabilities, which can effectively make up for the structural deficiencies of static convolutional models in time modeling, thereby being able to truly restore the gradual evolution of disturbance events on the timeline. Among them, ConvGRU includes gating structures such as reset gates and update gates, which enable it to have strong local feature capture capabilities while maintaining time dependence. The multi-dimensional feature fusion layer is used to unify the medium-term features from the dilated convolution extraction module and the dynamic time series modeling module. This layer first concatenates and fuses the output features from the dilated convolution extraction module and the dynamic time series modeling module in the channel dimension to form a medium-term joint feature tensor with trend and dynamic information; then introduces a channel attention mechanism (such as Squeeze-and-Excitation) to adjust the feature strength according to the channel weight. This mechanism includes three stages: channel compression, nonlinear mapping, and Sigmoid activation, which are used to highlight the dominant perturbation dimension and suppress redundant information. The medium-term joint feature tensor is input to the second embedding output layer, which maps the high-dimensional features to a fixed-dimensional medium-term perturbation embedding vector through a fully connected layer. , this vector has the ability to represent information in both trend and dynamic dimensions, and can accurately reflect the slowly changing characteristics and structural disturbances of the power grid state on a medium-term scale.
[0035] The second branch primarily models medium-term disturbances lasting 15 to 25 seconds. Its core function is to accurately extract the characteristics of slow-varying disturbances in the power grid, such as phase drift, current ramp-up, and voltage offset, and effectively characterize the evolution and coupling mechanisms of these disturbances. By implementing one-dimensional convolutional channels with varying dilation rates, the second branch can cover multiple timescales while maintaining computational efficiency. Combined with a convolutional gated recurrent unit (ConvGRU), this branch dynamically models medium-term disturbances along the time axis, enhancing its responsiveness to non-transient disturbances. Combining multidimensional feature fusion with a channel-wise attention mechanism, this branch can highlight key disturbance features amidst redundant information, improving the model's accuracy and robustness in discerning slow-varying trends. The resulting medium-term disturbance embedding vector provides stable and interpretable trend-based features for overall state evaluation, significantly enhancing the model's perception and adaptability under moderate disturbance conditions.
[0036] The third branch is used to identify long-term disturbance trends in power grid operation. It specifically includes a deformable convolution trend modeling module, a global average modeling module, a temporal position encoding enhancement module, a residual fusion and channel attention mechanism, and a third embedding feature output layer. The deformable convolution trend modeling module includes a deformable convolution (1D). Deformable convolution not only extracts local information but also automatically adjusts its temporal position, thereby capturing deformation structures or slow turning points in long-term sequences. For example, as photovoltaic power output slowly increases from early morning to noon, standard convolution may overlook inflection points or gradual transitions. However, deformable convolution can adaptively locate key transitions and enhance perception. This module outputs a set of long-term trend response tensors that are aware of heterogeneous structures, providing a structural foundation for subsequent global modeling. The long-term trend response tensors extracted by deformable convolution may still contain localized high-frequency residual disturbances (such as short-period oscillations and power spikes), which can interfere with the expression of long-term trends. To further enhance trend purity, the global average modeling module first performs global smoothing on the input features. This involves two steps: first, using large-step average pooling to extract stable temporal trajectories and eliminate fluctuations caused by minor perturbations; second, low-pass filtering the sequence using a sliding weighted average or a smoothing kernel (such as a Gaussian kernel) to preserve the main trend signal. This module generates a set of noise-suppressed, morphologically continuous long-term variation feature vectors that represent the overall path of the system over a large time scale. This module not only enhances the stability of trend representation but also provides a purer dynamic context for subsequent structure injection. The long-term variation feature vectors obtained by the global average modeling module are often highly sensitive to temporal position. For example, the physical meanings of the early, middle, and late stages of a sequence may differ significantly (e.g., at the beginning of illumination, mid-load ramp-up, and at the end of the inertia release). To empower the model with temporal sequence recognition, the temporal position encoding enhancement module introduces learnable position encoding information for each moment. Position encoding can be implemented in two ways: using a Transformer-based sine-cosine periodic encoding (where position is a function of the time step), or constructing a set of trainable embedding vectors as time labels for each time point. These position vectors are added to the feature tensor channel by channel and time point by time point to form a time-aware representation of long-term trends. This allows the model to distinguish perturbation patterns across different phases and more accurately model their temporal evolution.The residual fusion and channel attention mechanism fuses and reconstructs the channels of features extracted by the deformable convolution trend modeling module, the global average modeling module, and the temporal position encoding enhancement module. First, a residual connection is used to add and fuse the original input with the long-term trend features output by the module to obtain a fused long-term feature vector. This method preserves key contextual information in the original data while preventing gradient vanishing and feature over-compression during deep modeling. A channel attention mechanism (such as the Squeeze-and-Excitation Block) then weights the fused long-term feature vector. This mechanism extracts channel response strengths through global average pooling, generates a channel weight distribution through two fully connected layers, and outputs a channel importance score using a sigmoid function. Finally, each channel feature is multiplied by its weight to achieve dynamic channel selection. This process emphasizes dimensions that play a decisive role in long-term trends (such as phase voltage, frequency, or power), suppresses redundant and interfering dimensions, and improves the discernibility and interpretability of the overall feature representation. The third embedding feature output layer takes the weighted fused long-term feature vector as input. The layer includes a normalization layer, an activation function GELU and a fully connected layer, which is used to map the weighted fused long-term feature vector into a vector representation of a fixed dimension, that is. , this vector has a highly compressed long-term dynamic expression capability, and comprehensively integrates trend structure information, time position characteristics, channel selection results and global morphological contours, thereby providing a long-term state perception basis for the model.
[0037] The third branch mentioned above mainly models long-term disturbance trends of 30 to 60 seconds. Its core function is to accurately identify and express slow-changing trends and structural evolution processes in power grid operation. By introducing a deformable convolution module, this branch can adaptively perceive the deformation structure and key turning points in the sequence, making up for the limitations of standard convolution in capturing long-term features. In conjunction with the global average modeling module, the feature sequence is smoothed and low-pass processed to effectively remove high-frequency noise and purify the main trend features. Combined with the time position encoding enhancement mechanism, the model has time awareness and can distinguish the physical meaning contained in disturbances at different stages. Further, through the residual connection and channel attention mechanism, multi-source long-term features are fused and weighted to highlight the decisive disturbance dimension, thereby improving feature selectivity and expression clarity. The final output long-term embedding vector not only retains the trend structure, time sequence and dimensional weight information, but also provides a highly compressed and highly interpretable long-term state representation for the stability assessment of the system in strong power grid or slow evolution scenarios.
[0038] The branch memory network includes a first branch, a second branch and a third branch. The first branch is used to capture the mutation characteristics in the short-term disturbance characteristics to improve the response ability to high-frequency transient fluctuations. The first branch specifically includes a first GRU (gated recurrent neural network) layer, a first residual connection layer and a first RBM (Restricted Boltzmann Machine) layer. The first GRU layer uses the first time series embedding vector As input, it captures the first time series embedding vector The temporal variation law and transient response characteristics in the time series are analyzed, and the short-term time series state is output. ; The first residual connection layer includes the first normalization layer and the first ReLU activation function. The first normalization layer is used to adjust the short-term time series state. Normalization is performed, and the first ReLU activation function is used to normalize the short-term time series state after normalization. Activate; further, the first residual connection layer converts the short-term time series state of the first GRU layer output Added to the output of the first ReLU activation function to obtain the enhanced short-term time series state , which helps to improve the representation ability of state evaluation indicators; the first RBM layer is based on the enhanced short-term time series state , construct the energy function under short-term perturbation :
[0039]
[0040] in, It is the visible unit of the first RBM layer, representing the short-term disturbance embedding feature vector (such as transient features such as voltage sag and current surge), which comes from the disturbance feature samples in the training set or test set, such as original grid parameters such as voltage, current, and frequency; Indicates the first RBM layer The bias term of each visible unit is iteratively optimized in the training set during the unsupervised training phase; Indicates the first RBM layer The bias term of the hidden unit is obtained by iterative optimization in the training set during the unsupervised training phase; is the hidden unit of the first RBM layer, With the first connection weight Calculate and obtain the probability sampling through the activation function; Represents the first connection weight matrix, used to connect the first RBM layer visible units and The hidden units characterize the coupling strength of short-term perturbation features and are obtained by iterative optimization in the training set during the unsupervised training phase.
[0041] Furthermore, based on the energy function under short-term perturbations And output short-term state evaluation indicators through restricted Boltzmann machine (RBM) :
[0042]
[0043] in, Represents the Sigmoid activation function, which is used to convert the short-term energy function Mapping to short-term state evaluation indicators .
[0044] The energy function under the short-term perturbation This is achieved through restricted Boltzmann machine (RBM) modeling, which characterizes the energy of transient features such as voltage sags and current surges in the power grid over short timescales. This energy function takes the disturbance embedding vector as input, constructs the coupling relationship between visible and implicit units, and optimizes the connection weights and biases through training to explore the inherent energy coupling mechanism between disturbance features and system stability. This significantly enhances the model's response sensitivity and identification accuracy to short-term, high-frequency disturbances (such as spikes and voltage jitter). It also generates short-term state evaluation indicators through sigmoid mapping, providing a precise and timely quantitative basis for subsequent control mode switching and parameter optimization, thereby improving the inverter's rapid response and stable control capabilities to sudden grid disturbances.
[0045] The second branch is used to model the trend and dynamic process of the medium-term disturbance features, specifically including the second GRU layer, the second residual connection layer and the second RBM layer. The second GRU layer uses the second time series embedding vector As input, it captures the second time series embedding vector The mid-term disturbance characteristics such as phase-locked offset and power regulation lag are detected, and the mid-term time series state is output. The second residual connection layer includes the second batch normalization layer and the second ReLU activation function. The second batch normalization layer is used to adjust the mid-term time series state. Normalization is performed, and the second ReLU activation function is used to normalize the mid-term time series state after normalization Activate; further, the second residual connection layer converts the mid-term time series state of the second GRU layer output Add the output of the second ReLU activation function and output the enhanced mid-term time series state , to enhance the network's ability to recognize medium-perturbation features; the second RBM layer is based on the enhanced medium-term time series state , construct the energy function under medium-term perturbation :
[0046]
[0047] in, is the visible unit of the second RBM layer, representing the mid-term perturbation embedding feature vector (such as phase-locked drift and steady-state error accumulation); Indicates the first The bias term of the visible unit; Indicates the first The bias term of the hidden unit; is the hidden unit of the second RBM layer; Represents the second connection weight matrix, used to connect the second RBM layer visible units and hidden units, representing the disturbance transmission path.
[0048] Furthermore, based on the energy function under mid-term perturbation And output mid-term state evaluation indicators through restricted Boltzmann machine (RBM) :
[0049]
[0050] The energy function under the medium-term perturbation Similarly, a restricted Boltzmann machine (RBM) is used for modeling, aiming to capture slowly varying dynamic characteristics of power grid operation within a 15-25 second timeframe, such as phase-lock drift, power regulation lag, and steady-state error accumulation. This energy function takes the medium-term disturbance embedding vector as input and constructs a coupling structure between these characteristics through the connection weights between visible and hidden units, reflecting the energy contribution of the disturbance to the system's trend. Through unsupervised training, the RBM learns the underlying distribution patterns of key variables during the disturbance's evolution. This mechanism, through collaborative modeling using a GRU and RBM, not only characterizes the temporal evolution of the disturbance but also quantifies the degree to which the disturbance's trend deviates from the steady state. Finally, a sigmoid function outputs a medium-term state evaluation indicator, providing a reliable basis for the control system to identify slowly varying risks such as regulation lag and phase drift, thereby enhancing the inverter's dynamic response and trend adaptability to moderate-intensity disturbances.
[0051] The third branch is used to extract the structural evolution features in the long-term disturbance trend, which specifically includes the third GRU layer, the third residual connection layer and the third RBM layer. The third GRU layer uses the third time series embedding vector As input, it captures the third time series embedding vector The long-term disturbance characteristics such as grid-following and grid-forming control switching, voltage drop, etc. are detected, and the long-term time series state is output. ; The third residual connection layer includes the third batch normalization layer and the third ReLU activation function. The third batch normalization layer is used to adjust the long-term time series state. Normalization is performed, and the third ReLU activation function is used to normalize the long-term time series state after normalization Activate; further, the third residual connection layer converts the long-term time series state of the third GRU layer output Add the output of the third ReLU activation function and output the enhanced long-term time series state , to guide the network to pay attention to long-term change trends; the third RBM layer is based on the enhanced long-term time series state , construct the energy function under long-term perturbation :
[0052]
[0053] in, is the visible unit of the third RBM layer, representing the long-term perturbation embedded feature vector (such as mode switching, voltage drop, and photovoltaic trend change); Indicates the third RBM layer The bias term of the visible unit; Indicates the third RBM layer The bias term of the hidden unit; is the hidden unit of the third RBM layer; Represents the third connection weight matrix, which is used to connect the third RBM layer visible units and hidden units to capture the interaction between long-term features.
[0054] Furthermore, based on the energy function under long-term perturbations And output long-term state evaluation indicators through restricted Boltzmann machine (RBM) :
[0055]
[0056] Energy function under long-term perturbations The third branch, a restricted Boltzmann machine (RBM) model, aims to capture the structural disturbance characteristics of the long-term trend evolution of the power grid over a 30-60 second timescale, such as the switching between grid-forming and grid-following control modes, voltage droop, and renewable energy output fluctuations. This energy function, taking the long-term disturbance embedding vector as input and combining it with the weight matrix between visible and implicit units in the RBM, constructs a deep coupling structure between these features and explores the potential impact of long-term disturbances on system stability. By integrating multiple sources of features, such as trend deformation, temporal location, and channel attention, the long-term energy function can sensitively capture system-level dynamic evolution mechanisms, such as operating strategy adjustments, load evolution paths, and changes in power support capacity. The long-term state evaluation indicator, output after sigmoid mapping, not only reflects the current system trend stability but also provides a quantifiable basis for medium- and long-term control strategies, such as control mode prediction and power dispatch planning. This significantly enhances the adaptability, foresight, and robustness of the inverter control system in the face of persistent and structurally changing disturbances.
[0057] The output layer is used to evaluate the state of the three branches in the branch memory network. 、 、 The output is weighted fusion to obtain the final state evaluation index :
[0058]
[0059]
[0060] in, 、 、 Represent short-term state evaluation indicators , mid-term status evaluation indicators , long-term status evaluation indicators The weight of 、 、 The SCR can be dynamically adjusted according to the grid strength. For example, in a weak grid (SCR < 2.5) environment, the response capability to transients (short-term disturbances) should be improved. Higher; in the medium network (2.5≤SCR ≤4.0) environment, emphasize mid-term drift control, High; in a strong network environment (SCR>4.0), pay attention to network switching and long-term trend stability. Higher.
[0061] The branched memory network, by setting up three parallel time series modeling branches: short-term, medium-term, and long-term, can achieve comprehensive perception and hierarchical modeling of disturbance characteristics at different time scales. Each branch combines a gated recurrent unit (GRU) with a restricted Boltzmann machine (RBM), which not only captures the temporal evolution of the disturbance but also models the intrinsic coupling relationship between disturbance characteristics and system stability through energy functions, thereby exploring the deep-seated impact mechanism of disturbance behavior. This network structure can enhance the model's ability to respond to changes in power grid status at different time dimensions, improve the timeliness, accuracy, and interpretability of status evaluation, and provide high-quality time series feature support for subsequent state quantity fusion and adaptive selection of control modes.
[0062] In summary, the multi-scale fusion deep assessment model constructs three independent time series branches: short-term, medium-term, and long-term, to model grid state parameters at multiple time scales. This model effectively captures different types of disturbance characteristics (e.g., short-term, medium-term, and long-term disturbance characteristics) and outputs separate state evaluation indicators. Each branch combines GRU and RBM structures to model the temporal evolution of disturbances and extract the potential energy coupling relationship between disturbances and stability. Ultimately, a unified grid state evaluation indicator is output through dynamic weighted fusion of the three scores. This network demonstrates superior generalization and response accuracy in complex scenarios with large variations in grid strength, multiple disturbance types, and significant differences in response times. This not only improves the system's accuracy in identifying weak grids and abnormal operating conditions, but also provides a highly reliable quantitative basis for adaptive switching of control strategies.
[0063] The final status evaluation indicators mentioned above Characterizes the dynamic stability level of the power grid under the current overload specific working condition (such as the current known power grid strength SCR), that is, the state evaluation index It is not global and constant, but changes with the working conditions. First, it can be used to compare the stability change trend before and after the disturbance; second, it can be used to determine whether the control mode needs to be switched or optimized.
[0064] During actual control, when the grid is operating under a specific short-circuit ratio (SCR) condition (e.g., SCR = 2.0 or 4.5), the extracted current grid state parameters (such as voltage, current, and frequency) are input into the multi-scale fusion deep assessment model. This model calculates grid state evaluation indicators for the current operating condition and adaptively selects the optimal control mode and parameter configuration based on these indicators. This design implements a control mechanism that "refines features through global analysis and drives decisions based on local operating conditions," effectively balancing stability across all operating conditions with precision in response to a single operating condition.
[0065] In another exemplary embodiment, in step S200, the multi-scale fusion depth estimation model is trained by the following steps:
[0066] S201: Obtain historical state parameter data of the power grid and corresponding state evaluation indicators (which can be obtained through time-domain simulation analysis, such as PSCAD, MATLAB / Simulink) to form a data set, and divide the data set into a training set and a validation set, for example, with a division ratio of 7:3;
[0067] S202: Setting training parameters, for example, setting the learning rate to 0.01 and the batch size to 32, and training the multi-scale fusion depth evaluation model using the training set until the maximum number of iterations is reached (for example, the maximum number of iterations is 300);
[0068] S203: Fine-tune the model using back propagation to ensure that the difference between the state evaluation index output by the model and the true value is minimized, wherein fine-tuning the entire model using back propagation specifically includes:
[0069] S2031: Define a loss function, which may be, for example, a mean square error (MSE):
[0070]
[0071] in, represents the total number of samples, Indicates the The true status evaluation index of the sample; Indicates the The predicted status evaluation index of the sample;
[0072] S2032: Calculate the power grid status evaluation index of each input sample through the model;
[0073] S2033: Calculate the gradient of the loss function with respect to the network parameters and use gradient descent to update the weights and biases of each layer;
[0074] S2034: Continuously perform forward propagation and backward propagation until the loss function converges, and the network training is completed.
[0075] S204: Use the validation set to validate the trained network to calculate the prediction error of the model's state evaluation index on the validation set (such as MSE). When MSE < 0.05, the validation is passed; otherwise, redivide the ratio of the training set and the validation set (for example, it can be divided into 8:2) or adjust the training parameters (for example, adjust the learning rate to 0.001 and the batch size to 64) to retrain the model until the validation is passed.
[0076] In another exemplary embodiment, in step S400, adaptively selecting a control mode according to a current grid state evaluation index includes the following steps:
[0077] S401: Classify the status evaluation indicators;
[0078] In this step, the status evaluation indicators can be divided into the following levels:
[0079] steady state: < ( represents the first threshold, for example, = 0.3);
[0080] Critical state: < < ( represents the second threshold, for example, = 0.6);
[0081] Unstable state: > .
[0082] It should be noted that It can be adjusted dynamically. The adjustment rules are as follows:
[0083]
[0084] in, Indicates the basic threshold, for example, it can be 0.3, which is dynamically adjusted with SCR. For example, when SCR increases, It can be appropriately relaxed to meet the stability requirements of the power grid; represents the adjustment coefficient, which can be 0.05, for example.
[0085] S402: Dynamically select a control mode based on the classified status evaluation index and the power grid status.
[0086] In this step, when > And if SCR<2.5 (weak grid), select the grid-type inverter dominant mode to provide voltage and frequency support and improve the system's anti-interference ability. It should be noted that after selecting the grid-type inverter dominant mode, the stability of the grid may still be affected by other factors, such as instantaneous changes in grid status, load fluctuations or other disturbances. Therefore, after choosing to switch to the grid-type inverter dominant mode, you should first evaluate whether the system meets the stability requirements of the grid, especially under weak grid conditions. In order to cope with this situation, it is necessary to monitor the dynamic response of the grid in real time and make dynamic adjustments. Even after switching to the grid-type inverter dominant mode, if the grid is still in an unstable state, a short-term feedback mechanism can be used to adjust the control mode (that is, calculate the grid status evaluation index in real time and compare it with the set threshold, and dynamically adjust the control mode according to the current stability. For example, if If the power drops to a critical state, it triggers the switch from the grid-forming inverter leading mode to the grid-following inverter leading mode; if Once the power supply reaches a stable state, the system switches back to the grid-connected inverter dominant mode).
[0087] when < If SCR>4.0 (strong grid), select the grid-following inverter dominant mode to optimize the phase-locked loop tracking performance and improve control efficiency.
[0088] when < < If 2.5 ≤ SCR ≤ 4.0, a transition mode is used, which dynamically allocates the control weights of the two types of inverters. The weights are calculated as follows:
[0089]
[0090]
[0091] in, represents the weight of the grid-connected inverter, Indicates the weight of the grid-connected inverter.
[0092] For example, if SCR=3.0, that is, in a medium-intensity grid state, =0.67, which means that the grid-forming inverter will take on 67% of the control tasks, while the remaining 33% will be taken on by the grid-following inverter.
[0093] In another exemplary embodiment, in step S500, verifying whether the grid state satisfies the constraint conditions according to the selected control mode, and if not, performing global optimization on the control parameters of the inverter includes the following steps:
[0094] S501: Set constraints, for example: , ;
[0095] in, Indicates voltage deviation in units of (Per unit value), indicating the actual voltage With the system rated voltage deviation, that is ; Indicates frequency deviation in Hz (Hertz), indicating the actual frequency of the coefficient With rated frequency deviation, that is .
[0096] By setting the above constraints, we can ensure that the optimization results are within the safe range of operation. In addition, it should be noted that the above constraints are set based on:
[0097] About voltage deviation setting:
[0098] In the design and operation of power systems, ±10% is often used as the allowable voltage fluctuation range, that is, the per-unit value range [0.9 pu, 1.1 pu]. However, considering that this application is aimed at scenarios with a high proportion of renewable energy grid connection, especially under weak grid conditions, voltage stability deteriorates and disturbance conduction capability increases. In order to ensure that the optimization model has higher control accuracy and response robustness in actual deployment, this application will allow the voltage deviation range to be appropriately tightened to Compared with the aforementioned loose voltage tolerance range, this setting is more stringent and helps to: suppress voltage swings caused by inverter output; avoid protection actions caused by local overvoltage / undervoltage; improve the constraints of the optimization objective function on the voltage response quality; and ensure voltage stability under the coordinated operation of grid-connected / grid-following inverters.
[0099] Regarding the setting of frequency deviation:
[0100] According to GB / T 15945 and grid dispatching operation specifications, the normal operating frequency of the industrial frequency system is 50 Hz, and the deviation should not exceed ±0.5 Hz. In scenarios with high penetration of new energy, frequency stability is crucial. This limit is intended to, on the one hand, improve the control system's response constraints to frequency disturbances, and on the other hand, ensure that the frequency and phase control terms in the optimization process do not sacrifice synchronization quality due to the reduction of the objective function.
[0101] S502: Evaluate whether the voltage deviation and frequency deviation of the power grid meet the requirements for stable operation based on the current power grid operating conditions and the selected control mode. If the voltage deviation and frequency deviation meet the constraints, no optimization is required; otherwise, execute step S403:
[0102] S503: Determine an initial control parameter set according to the selected control mode ,in, Indicates the virtual inertia of the grid-connected inverter, in seconds, which determines the system's immunity to frequency disturbances. It represents the proportional gain of the phase-locked loop of the grid-following inverter. The unit is dimensionless and affects the phase-lock speed and accuracy. It represents the damping coefficient of the grid-type inverter, which is dimensionless and controls the system oscillation.
[0103] S504: Based on the initial control parameter set A global optimization objective function is constructed, which is expressed as follows:
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111] in, is the global optimization objective function, which means that under a given control parameter set The comprehensive performance cost of the power grid is used to measure the weighted overall evaluation of multiple indicators such as stability, synchronization accuracy, path control capability and operating efficiency of grid-following and grid-forming inverters under the current control parameter configuration; Represents the stable energy offset, which is used to measure the power imbalance between the two inverters under disturbance conditions, and the unit is per unit value; Indicates the grid-connected inverter at time and control parameters The instantaneous output active power under , in KW; Indicates the grid-following inverter at time and control parameters The output active power under , in KW; 、 Indicates the start and end time of the disturbance simulation, in seconds (s); Represents the weighted synchronization error, which is used to measure the tracking and maintenance capabilities of the grid-following and grid-forming inverters to the target phase angle. The unit is radian (rad). The smaller it is, the better the phase synchronization between the inverter and the grid is, and the stronger the tracking performance is. Indicates the instantaneous phase angle of the grid-connected inverter output voltage; Indicates the grid reference potential in radians (rad); Indicates the output phase of the phase-locked loop (PLL) of the grid-following inverter, in radians (rad); Represents the weight factor, which is used to control the influence of the network error term on the overall target. For example, it can be set to 0.3~0.7; Indicates the norm order, for example, it can take values of 3 to 5, which is used to control the error sensitivity; Indicates the damping ratio contribution, which is used to reflect the current control set The improvement effect of the inverter on the key modal damping ratio of the power grid under the following conditions: Indicates the The importance weight of each mode ranges from [0,1]; Indicates the The damping ratio of the mode, superscript Indicates that in the current control set The optimized damping ratio is shown below; Indicates the The damping ratio of a mode under the reference control parameters (e.g. before disturbance), superscript Indicates the baseline value; Indicates the total number of key modes involved in the analysis; Indicates grid operation loss, including inverter switching loss , loss caused by the filter and cable line losses (Each loss can be obtained by real-time acquisition of key parameters such as switching frequency, current, resistance, etc., and simulation estimation in simulation software), the unit is pu (per unit); represents the stability energy weight, indicating that the stability energy offset term is given priority when the network is weak and the disturbance is severe; Indicates the benchmark weight coefficient, for example, it is set to 0.5~2; Indicates the maximum short-circuit ratio, for example, 10; Indicates the minimum allowable value of the short-circuit ratio, for example, 1.1; Indicates short-circuit ratio; Indicates the disturbance adjustment factor, which controls the sensitivity to the disturbance period, for example, it is set to 0.1~0.3; Represents the periodic behavior of grid or load disturbances; Indicates the grid disturbance frequency; Represents the current or simulation time variable, in seconds (s); is the synchronization performance weight, which represents the acceleration of the synchronization consistency error (i.e., the phase change trend). The weight increases when the synchronization disturbance is large; Indicates the synchronization sensitivity reference constant, which is dimensionless and can be set to 0.1 to 2, depending on the control priority of synchronization accuracy. Phase-locked phase The second derivative of , in rad / s² (radians per second squared), represents the phase-locked phase The rate of change of acceleration; Denotes the damping ratio contribution The weight of represents the grid's attention to oscillation mode control; It represents the maximum weight reference coefficient, which is dimensionless and is set to 0.5 to 0.6; Indicates the minimum baseline damping ratio among all current modes; Indicates the running loss weight, set to 0.1 ~ 0.5.
[0112] The global optimization objective function includes the stable energy offset , weighted synchronization error , Damping ratio contribution and grid operation losses , each item is multiplied by a different weight, and its priority is dynamically set based on the grid operating conditions (such as the short-circuit ratio (SCR)). This objective function, as the core evaluation metric of the optimization algorithm, guides the adaptive optimization of control parameters, taking into account stability, responsiveness, oscillation suppression, and energy efficiency. This achieves the globally optimal configuration of the inverter control strategy in multiple disturbance scenarios, thereby improving the security and robustness of the grid.
[0113] S505: Performing online optimization of the control parameters of the inverter based on the constructed global optimization objective function, including the following steps:
[0114] Step 1: Set initial control parameters based on the current state of the grid (such as short-circuit ratio SCR, voltage, frequency, renewable energy output, etc.):
[0115] In this step, if the grid is weak (SCR < 2.5), it is necessary to prioritize enhancing the grid inertia and set a higher virtual inertia of the grid-connected inverter, for example:
[0116]
[0117] If the grid is strong (SCR>4.0), it is necessary to focus on optimizing the synchronization accuracy of the grid-following inverter and reducing the phase-locked loop phase error. For example:
[0118]
[0119] If in transition state ( ), the control weights of the two types of inverters need to be dynamically allocated.
[0120] Step 2: Run the above parameter combination on a simulation platform (such as MATLAB / Simulink) and output the indicators , , , And voltage and frequency deviation, and further calculate the objective function value J based on each indicator, and check the voltage deviation and frequency deviation Whether the constraints are exceeded.
[0121] The calculation logic example of the simulation platform is as follows:
[0122] Function[ , , , ] = EvaluatePerformance(q, SCR 0, SCR1, t0, t1, SimulinkModel)
[0123] Input:
[0124] / / Control parameter set
[0125] t0, t1 / / simulation evaluation time window
[0126] SimulinkModel / / Built control-grid simulation model
[0127] Step 1: Inject parameter q into the Simulink model
[0128] Set(H GFM ) ->GFM controller
[0129] Set(K PLL ) ->PLL module
[0130] Step 2: Simulate grid disturbances
[0131] Set SCR = SCR0 to run 0~t switch Second
[0132] Set SCR = SCR1 to run t switch ~t1 second
[0133] Injection of sudden changes (such as voltage drop, frequency disturbance)
[0134] Step 3: Simulation Run
[0135] Run(SimulinkModel, time = [t0, t1])
[0136] Record variables:
[0137] -P GFM (t;q), P GSM (t;q)
[0138] - (t;q), (t),
[0139] - (q),
[0140] -P loss (q)
[0141] Step 4: Calculate metrics
[0142] / / 1. Energy offset stability
[0143]
[0144] / / 2. Phase-lock consistency error
[0145]
[0146] / / 3. Damping ratio adjustment effect
[0147]
[0148] / / 4. Average loss
[0149]
[0150] Output:
[0151] Return ( , , , )
[0152] EndFunction
[0153] It should be noted that SCR1 and SCR0 are set to simulate the actual changes before and after the grid disturbance. During the simulation process, two stages of state are usually set to evaluate the dynamic response of the grid. By setting SCR0 and SCR1, the grid behavior before and after the disturbance can be clearly distinguished. Among them, SCR0 represents the short-circuit ratio in the initial grid state, which is usually the stable state before the grid disturbance occurs. SCR1 represents the grid state after the disturbance occurs, simulating the weakening or strengthening of the grid after the disturbance. These two values are used to reflect the change process during the grid disturbance and help evaluate the control system's response ability under different grid states.
[0154] It should also be noted that the timing of injecting the mutation amount should be coordinated with the change of SCR, usually at the following two key moments:
[0155] Before disturbance occurs (SCR0): When the grid reaches a stable state, the initial response of the grid can be used as a reference.
[0156] After the disturbance occurs (SCR1): When the grid strength changes (for example, the short-circuit ratio changes), the grid response is verified to confirm whether the grid can operate stably under the changed grid state.
[0157] It should be further explained that setting SCR0 and SCR1 to run for a period of time is to simulate the transition process of the power grid. By running in stages, we can better observe the impact of the dynamic changes in the power grid state on the control mode. Specifically: Stage 1 (0 to t switch ): The grid operates in the SCR0 state, simulating the initial stability of the grid. This stage allows the grid to operate stably for a period of time and obtain a stable benchmark. Phase 2 (t switch To t1): Operation in SCR1 mode simulates the grid experiencing a disturbance. This phase aims to verify the grid's responsiveness and stability after a state change (such as a change in the short-circuit ratio) and to verify whether grid stability can be maintained.
[0158] In summary, the setting of these two time periods helps to analyze and evaluate whether the inverter control strategy can adapt to changes in the grid under different grid conditions, and adjust the control mode in time to ensure stable grid operation.
[0159] Step 3: Based on the objective function value of each indicator J The indicator is optimized based on the contribution ratio.
[0160] In this step, each indicator is J The contribution ratio of the value is determined based on:
[0161] If the phase angle deviation is large and the phase lock is unstable (such as frequency drift and phase offset), then Xiang Da;
[0162] If the power difference between the two types of inverters after the disturbance is significant, that is, the power response is not synchronized and the inertial support is unbalanced, then Xiang Da;
[0163] If the system has low-frequency oscillations and weak damping (e.g. voltage / power oscillations do not decay quickly), then Xiang Da;
[0164] If the objective function is mainly dominated by the loss term, then Xiang Da.
[0165] Contribution ratio of each item ,in,
[0166] For example, the contribution ratios of various items are shown in Table 1:
[0167] Table 1
[0168]
[0169] Based on Table 1, we have:
[0170] , , , .
[0171] According to the above ratio, it can be seen that the main contributions are stability offset and damping ratio effect, among which stability offset It mainly reflects the power imbalance during disturbance, and essentially reflects the virtual inertia characteristics of the inverter. The two correspond to each other. The damping ratio effect describes the strength of the damping effect, while the damping coefficient determines the damping size. In view of this, it is necessary to give priority to optimizing these two corresponding parameters (such as , ), for example, the following optimization methods may be specifically adopted:
[0172] For virtual inertia In weak grid conditions (SCR < 2.5), the low grid inertia makes rapid frequency fluctuations more likely. Therefore, increasing the inverter's virtual inertia is necessary to enhance its ability to suppress power imbalances and frequency variations. Based on power system engineering experience, the inertia constant of traditional synchronous generators is generally between 3 and 6 seconds. In weak grid scenarios, to provide stronger inertial support, the virtual inertia is typically increased to 7 to 8 seconds, equivalent to 1.5 to 2 times the synchronous generator's inertia. This range, determined through extensive simulation analysis and actual engineering optimization, compares power response, frequency stability, and energy offset under different virtual inertia settings to achieve a relatively optimal range. This effectively improves grid dynamic stability in weak grid environments. In strong grid conditions (SCR > 4.0), the grid inherently has high inertia and strong frequency support capabilities. In these cases, the inverter does not need to provide excessive virtual inertia, as this can slow the grid's response and reduce its ability to follow rapid disturbances. Therefore, the virtual inertia is usually controlled within a moderate range of 3 to 5 seconds, which is equivalent to the inertia level of traditional synchronous generators. This ensures frequency stability while improving the grid's ability to respond quickly to short-term power fluctuations and phase changes, thereby avoiding dynamic regulation lag or control redundancy caused by excessive inertia. At the same time, it is necessary to compare the results before and after the disturbance. and If the area is reduced, it means the optimization is effective, otherwise Make a small increase, such as to 6.5, or Slightly reduce, under weak network conditions, for example, from 1.2 to 1.0, and then fix , calculate the integrated area again, and further judge the changes.
[0173] For the damping coefficient In the case of low-frequency oscillation or slow decay of modal response in the power grid, the damping coefficient of the grid-connected inverter should be optimized. To improve the oscillation suppression capability of the power grid. For example, the initial value (such as SCR = 3.0) is set based on the current power grid strength. = 0.6), inject disturbances into the simulation platform to evaluate the contribution of the damping ratio The proportion in the global objective function. If the proportion is significant, it means that the current damping is insufficient and should be gradually increased within the range allowed by the constraints. (For example, increase it to 0.8), and continuously monitor the phase angle synchronization error and system power loss to avoid other performance degradation due to excessive damping. Finally, the system is selected under the premise of maintaining the balance between system synchronization and energy consumption. Significantly reduce the objective function J (q) Minimum optimal value.
[0174] 4. Input the adjusted parameters into the objective function and recalculate J Value and verify:
[0175] If the voltage deviation and frequency deviation The constraints are met and the recalculated J If the value is reduced, it means that the control performance is effectively improved ( J A lower value is equivalent to greater stability, higher synchronization accuracy, more precise damping ratio control, and less grid energy consumption. J The decrease in the value indicates that the overall control performance of the inverter is approaching the optimal point within the constraints, and the theoretical value is 0). If any constraint is not met, or the recalculated J If the value does not decrease significantly, return to the optimization stage, readjust the parameters and verify again.
[0176] In addition, it should be noted that this application focuses on comprehensively improving the comprehensive stability of the power grid under multiple types of disturbances, with emphasis on transient stability (coping with large disturbances such as voltage sags and power mutations), small disturbance stability (suppressing micro-oscillations and enhancing structural robustness), synchronization stability (improving the inverter's phase-locked tracking capability to prevent loss of lock) and steady-state energy efficiency performance (achieving low-loss operation after the power grid is restored to stability). By constructing a global optimization objective function that integrates stable energy offset, synchronization consistency error, damping ratio control capability and power grid loss, online optimization and dynamic adjustment of control parameters are achieved to ensure rapid response and long-term reliable operation of the power grid under complex operating conditions.
[0177] In another exemplary embodiment, Figure 3 As shown, the present application also provides an inverter grid-following and grid-forming control mode adaptive adjustment system, the system including: an acquisition module 100, for acquiring current grid state parameters in real time; a model construction and training module 200, for constructing and training a multi-scale fusion deep evaluation model; an evaluation index acquisition module 300, for inputting the current grid state parameters into the trained multi-scale fusion deep evaluation model, and outputting the current grid state evaluation index; a control mode selection module 400, for adaptively selecting a control mode according to the current grid state evaluation index, the control mode including a grid-following inverter dominant mode, a grid-forming inverter dominant mode and a transition mode; a global optimization module 500, for verifying whether the grid state meets the constraint conditions according to the selected control mode, and if not, performing global optimization on the control parameters of the inverter.
[0178] Optionally, the control mode selection module includes: a grading submodule for grading the state evaluation indicators; and a selection submodule for selecting a control mode based on the graded state evaluation indicators and the power grid state.
[0179] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for adaptively adjusting inverter grid-following and grid-building control modes, characterized in that: The method comprises: Obtain current power grid status parameters in real time; Build and train a multi-scale fusion depth assessment model; The multi-scale fusion depth evaluation model includes: an input layer, a multi-scale embedding module, a branch memory network and an output layer, wherein: The input layer is used to input the current power grid state parameters; The multi-scale embedding module is used to extract disturbance features of different time scales in the current power grid state parameters; The branch memory network is used to perform time series modeling of disturbance characteristics at different time scales and generate evaluation indicators for the current power grid status; The output layer is used to output the current power grid status evaluation indicators; Inputting the current power grid state parameters into the trained multi-scale fusion depth assessment model, and outputting the current power grid state evaluation index; The control mode is adaptively selected based on the current grid status evaluation index. The control modes include the grid-following inverter dominant mode, the grid-forming inverter dominant mode, and the transition mode. The transition mode refers to the dynamic allocation of control weights for the grid-following inverter and the grid-forming inverter. The weights are calculated as follows: in, represents the weight of the grid-connected inverter, Indicates the weight of the grid-following inverter, SCR Indicates the strength of the power grid; According to the selected control mode, it is verified whether the grid state meets the constraint conditions. If not, the control parameters of the inverter are globally optimized.
2. The method for adaptively adjusting the inverter grid-following and grid-building control modes according to claim 1, characterized in that: The multi-scale embedding module includes: The first branch, the second branch and the third branch, wherein The first branch is used to extract the short-term disturbance characteristics in power grid operation; The second branch is used to extract the medium-term disturbance characteristics in power grid operation; The third branch is used to identify long-term disturbance trends in power grid operation.
3. The method for adaptively adjusting the inverter grid-following and grid-building control modes according to claim 2, characterized in that: The branch memory network includes: The first branch, the second branch and the third branch, wherein The first branch is used to capture the mutation feature in the short-term disturbance feature; The second branch is used to capture the trends and dynamic processes in the medium-term disturbance characteristics; The third branch is used to extract the structural evolution characteristics in the long-term disturbance trend.
4. The method for adaptively adjusting inverter grid-following and grid-building control modes according to claim 1, characterized in that: The multi-scale fusion depth estimation model is trained through the following steps: Obtain historical state parameter data of the power grid and corresponding state evaluation indicators to form a data set, and divide the data set into a training set and a validation set; Set the training parameters and train the multi-scale fusion depth evaluation model using the training set until the maximum number of iterations is reached; Backpropagation is used to fine-tune the multi-scale fusion depth evaluation model to ensure that the difference between the state evaluation indicators output by the model and the true value is minimized. The backpropagation method is used to fine-tune the multi-scale fusion depth evaluation model, including: The trained multi-scale fusion depth evaluation model is verified using the validation set, and the prediction error of the model's state evaluation index on the validation set is calculated. When the error is <0.05, the verification is passed; otherwise, the ratio of the training set and the validation set is redivided or the training parameters are adjusted and the model is retrained until the verification is passed.
5. The method for adaptively adjusting inverter grid-following and grid-building control modes according to claim 1, characterized in that: The adaptive selection of the control mode according to the current grid state evaluation index includes: Classify the current power grid status evaluation indicators; The control mode is selected based on the classified current grid status evaluation indicators and grid status.
6. The method for adaptively adjusting the inverter grid-following and grid-building control modes according to claim 5, characterized in that: The grading of the current power grid status evaluation indicators includes: The current power grid state evaluation indicators are divided into stable state, critical state and unstable state.
7. The method according to claim 1, characterized in that The globally optimizing the control parameters of the inverter includes: The control parameters of the inverter are optimized online by constructing a global optimization model, which is expressed as follows: in, is the global optimization objective function, which means that under a given control parameter set The comprehensive performance cost of the power grid is used to measure the weighted overall evaluation of multiple indicators such as stability, synchronization accuracy, damping ratio control capability and operating efficiency of grid-following and grid-forming inverters under the current control parameter configuration; Represents the stable energy offset, which is used to measure the power imbalance between the two inverters under disturbance conditions, and the unit is per unit value; It represents the weighted synchronization error index, which is used to measure the tracking and maintenance capabilities of the grid-following and grid-forming inverters to the target phase angle. The unit is radian. The smaller it is, the better the phase synchronization between the inverter and the grid is, and the stronger the tracking performance is. Indicates the damping ratio contribution, which is used to reflect the current control set The improvement effect of the inverter on the key modal damping ratio of the power grid under the following conditions: Indicates grid operation loss, including inverter switching loss , loss caused by the filter and cable line losses , the unit is pu; represents the stability energy weight, indicating that the stability energy offset term is given priority when the network is weak and the disturbance is severe; is the synchronization performance weight, which represents the acceleration of synchronization consistency error; Denotes the damping ratio contribution The weight of represents the grid's attention to oscillation mode control; Represents the running loss weight.
8. An inverter grid-following and grid-building control mode adaptive adjustment system, characterized in that: The system comprises: Acquisition module, used to obtain current power grid status parameters in real time; Model construction and training module, used to build and train a multi-scale fusion depth assessment model; The multi-scale fusion depth evaluation model includes: an input layer, a multi-scale embedding module, a branch memory network and an output layer, wherein: The input layer is used to input the current power grid state parameters; The multi-scale embedding module is used to extract disturbance features of different time scales in the current power grid state parameters; The branch memory network is used to perform time series modeling of disturbance characteristics at different time scales and generate evaluation indicators for the current power grid status; The output layer is used to output the current power grid status evaluation indicators; An evaluation index acquisition module is used to input the current power grid state parameters into the trained multi-scale fusion deep evaluation model and output the current power grid state evaluation index; The control mode selection module is used to adaptively select the control mode according to the current grid state evaluation index. The control modes include the grid-following inverter dominant mode, the grid-forming inverter dominant mode and the transition mode. The transition mode refers to the dynamic allocation of control weights of the grid-following inverter and the grid-forming inverter. The weights are calculated as follows: in, represents the weight of the grid-connected inverter, Indicates the weight of the grid-following inverter, SCR Indicates the strength of the power grid; The global optimization module is used to verify whether the grid state meets the constraint conditions according to the selected control mode. If not, the control parameters of the inverter are globally optimized.
9. The inverter grid-following and grid-building control mode adaptive adjustment system according to claim 8, characterized in that: The control mode selection module includes: The grading submodule is used to grade the current power grid status evaluation indicators; The selection submodule is used to select a control mode based on the classified current power grid state evaluation index and the power grid state.
Citation Information
Patent Citations
High-order grid-connected converter control method and system based on virtual double-machine parallel connection technology
CN117353379A
Impedance self-adaptive control method for combined network-following and network-constructing converter
CN119154381A
Cited By
Variable weighted fusion control method based on voltage source and current source fusion
CN122178396A