Methods, devices and equipment for handling transient oscillations when switching energy storage converters from grid connection to off-grid operation

By using a radial basis function neural network to update the current loop control parameters in the energy storage converter, the control mode mismatch problem during the grid-to-off-grid switching process is solved, transient oscillations are significantly suppressed, and the stability and reliability of the system are improved.

CN123121659APending Publication Date: 2026-11-17SHIJIAZHUANG KE ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611582921.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

During the grid-connected to off-grid switching process of energy storage converters, transient oscillations occur, leading to reduced system reliability. In particular, overvoltage or continuous resonance is caused by mismatch between control mode and controlled object, changes in resonant frequency, and power fluctuations.

Method used

By acquiring the load impedance parameters and inputting them into a pre-trained radial basis function neural network, the target current loop control parameters are output. When the grid-connected to off-grid command is issued, the current loop control parameters of the energy storage converter are updated, and after the static transfer switch confirms the disconnection, the parameters are switched to the off-grid mode parameters to achieve load adaptive control.

Benefits of technology

It effectively suppressed transient oscillations during the switching process, improved the reliability of the energy storage converter from grid connection to off-grid and the power supply stability of the microgrid, and ensured a smooth transition of the transient process and control quality of off-grid steady-state operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123121659A_ABST
    Figure CN123121659A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and equipment for handling transient oscillations during the grid-to-off-grid transition of an energy storage converter, relating to the field of power distribution circuit technology. The invention addresses the mismatch between the control mode and the controlled object during the transition period by updating the target current loop control parameters, pre-output by a radial basis function neural network based on load impedance parameters, to the converter still operating in grid-connected mode simultaneously with the grid-to-off-grid command. This avoids voltage resonance and current surges caused by parameter mismatch, suppressing transient oscillations. During the transition period, load-adaptive current loop parameters are used to enhance stability and improve the switching success rate. Once the static transfer switch feedback confirms the disconnection, the system promptly switches to off-grid mode-specific parameters, ensuring a smooth transition during transient processes and guaranteeing the control quality in off-grid steady state. This balances transient adaptability and steady-state performance, thereby improving the reliability of the energy storage converter during grid-to-off-grid transition and the power supply stability of the microgrid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution circuit device technology, and in particular to a method, device and equipment for handling transient oscillations when switching from grid connection to off-grid operation of an energy storage converter. Background Technology

[0002] Energy storage converters are key devices in microgrid systems that enable bidirectional energy flow and support local voltage and frequency stability. In actual operation, microgrids need to have both grid-connected and off-grid modes, and be able to quickly switch from grid-connected to off-grid in case of grid anomalies or planned maintenance to ensure continuous power supply to the loads. However, the transient behavior during the switching process directly affects system reliability.

[0003] Currently, during the grid-connected to off-grid switching process, the switching strategy typically switches the converter control mode from grid-connected to off-grid only after the static transfer switch (STS) is opened. After the STS is opened, the load connection causes an increase in the equivalent impedance of the LCL filter, resulting in a change in the resonant frequency, which is prone to coincidence with harmonics of the grid or switching frequency, causing resonance. Furthermore, the STS status feedback delay causes the grid-connected mode to briefly control the off-grid load, resulting in a mismatch between the controlled object and the mode, which reduces stability. Power fluctuations during switching cause back EMF, which may lead to overvoltage or continuous resonance, and the inductive load itself lacks damping suppression capability, exacerbating transient oscillations.

[0004] Therefore, the current grid-connected to off-grid switching strategy suffers from transient oscillations, leading to reduced reliability. Summary of the Invention

[0005] This invention provides a method, apparatus, and equipment for handling transient oscillations during the grid-to-off-grid transition of an energy storage converter, thereby solving the transient oscillation problem during the grid-to-off-grid transition and improving the reliability of energy storage converter switching and the stability of microgrid power supply.

[0006] In a first aspect, embodiments of the present invention provide a method for handling transient oscillations during grid-connected to off-grid switching of an energy storage converter, comprising: acquiring the impedance parameters of the load of the energy storage converter before the grid-connected to off-grid switching; inputting the impedance parameters into a pre-trained radial basis function neural network to output target current loop control parameters; updating the current current loop control parameters of the energy storage converter in grid-connected mode to the target current loop control parameters simultaneously with the issuance of the grid-connected to off-grid command; and controlling the energy storage converter using off-grid mode-specific parameters after the static transfer switch feedback confirms the disconnection.

[0007] Secondly, embodiments of the present invention provide a transient oscillation processing device for an energy storage converter switching from grid connection to off-grid operation, comprising: a parameter acquisition module for acquiring the impedance parameters of the load of the energy storage converter before the grid connection to off-grid switching; a target current loop control parameter determination module for inputting the impedance parameters into a pre-trained radial basis function neural network and outputting target current loop control parameters; a parameter update module for updating the current loop control parameters of the energy storage converter in grid connection mode to the target current loop control parameters simultaneously with the issuance of the grid connection to off-grid command; and a parameter recovery module for controlling the energy storage converter using off-grid mode dedicated parameters after the static transfer switch feedback confirmation is disconnected.

[0008] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.

[0009] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect or any possible implementation thereof.

[0010] Fifthly, embodiments of the present invention provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect or any possible implementation thereof.

[0011] In this embodiment of the invention, by simultaneously issuing the grid-to-off-grid command, updating the target current loop control parameters, pre-output by a radial basis function neural network based on load impedance parameters, to the converter still operating in grid-connected mode, the problem of mismatch between the control mode and the controlled object during the transition period is effectively solved. This avoids voltage resonance and current surges caused by parameter mismatch and significantly suppresses transient oscillations during the switching process. Simultaneously, the use of load-adaptive current loop parameters during the transition period enhances the system's stability under low-damping inductive load conditions and improves the switching success rate. Once the static transfer switch feedback confirms the disconnection, the system promptly switches to off-grid mode-specific parameters, ensuring a smooth transition during transient processes and maintaining control quality during off-grid steady-state operation. This achieves a balance between transient adaptability and steady-state performance, thereby comprehensively improving the reliability of the energy storage converter's grid-to-off-grid transition and the power supply stability of the microgrid. Attached Figure Description

[0012] Figure 1 This is an application scenario diagram of the transient oscillation handling method for energy storage converters transitioning from grid connection to off-grid provided in the embodiments of the present invention; Figure 2This is a flowchart illustrating the implementation of the transient oscillation handling method for energy storage converters transitioning from grid connection to off-grid operation provided in this embodiment of the invention. Figure 3 This is a timing diagram of the grid-connected and off-grid-connected modes of the energy storage converter provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the energy storage converter topology provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the grid-connected mode system control of the energy storage converter provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the radial basis function neural network provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of a successful grid connection and disconnection waveform provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the failure waveform of grid connection to disconnection provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0013] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0014] Figure 1 This diagram illustrates an application scenario of the transient oscillation handling method for energy storage converters transitioning from grid connection to off-grid operation, provided in an embodiment of the present invention. (Example:) Figure 1 As shown, during grid-connected operation, the grid acts as a low-impedance constant voltage source, which can suppress resonance on the output side of the converter. When the STS is disconnected, the converter's grid side switches from being connected to the grid to being connected to the load. The system impedance instantly changes from low impedance to high impedance and high inductive reactance. After switching to off-grid operation, the LCL filter circuit at the converter output terminal forms a series / parallel loop with the load. Because the system impedance changes, the inherent resonant frequency of the LCL changes. If the inherent resonant frequency of the converter coincides with the high-order harmonic frequency of the grid or the harmonic frequency of the converter's switching frequency, high-order resonance will be excited. If the inherent resonant frequency of the converter is lower than the converter's control cutoff frequency, high-order resonance will be excited.

[0015] See Figure 2 The document illustrates a flowchart of the implementation of the transient oscillation handling method for energy storage converters transitioning from grid connection to off-grid operation provided by an embodiment of the present invention, detailed below: A method for handling transient oscillations when switching from grid-connected to off-grid operation of an energy storage converter includes: Step 101: Obtain the impedance parameters of the load of the energy storage converter before the grid-connected to off-grid switching.

[0016] For example, the impedance parameter includes the load resistance. and load inductance It can be obtained in real time through the communication interface between the microgrid controller and the converter, or identified online through the voltage and current sampling values ​​of the converter itself.

[0017] Step 102: Input the impedance parameters into a pre-trained radial basis function neural network to output the target current loop control parameters.

[0018] For example, the target current loop control parameters include the proportional coefficient of the proportional-integral controller. and integral coefficient The radial basis function neural network has been trained offline through extensive mapping relationships between load conditions and optimal parameters. After inputting the load impedance, it can directly output control parameters adapted to the current load characteristics.

[0019] Step 103: Based on the target current loop control parameters, update the current loop control parameters of the energy storage converter in grid-connected mode simultaneously with the issuance of the grid-connected to off-grid command.

[0020] For example, Figure 3 This is a timing diagram for the grid-connected to off-grid mode switching of an energy storage converter. During the grid-connected to off-grid switching process, the converter will only switch control modes after the STS (Search Switch System) is disconnected. Due to the delay in STS disconnection feedback, the converter operates in an off-grid load state for a period of time during grid-connected control. This mismatch between the control mode and the controlled object reduces the stability of the control system. Furthermore, the power fluctuations of the converter before and after STS disconnection generate a back EMF that suppresses sudden changes in the inductor current. If the system control is rigid at this time, the converter will experience a momentary overvoltage fault. When the system becomes momentarily unstable, resonance occurs. Because of the low damping characteristics of the inductive load, there is no ability to suppress resonance, exacerbating the fault situation.

[0021] like Figure 3 As shown, before the switchover, the converter's grid-connected control parameters are the standard grid-connected parameters, and it operates normally in grid-connected mode. At time T1, a grid-connected to off-grid switching command is issued. At this time, the STS (Signal Switching System) has not yet disconnected or has just disconnected, and the converter is still operating in grid-connected mode, but the load is already an off-grid load. Optimized target current loop control parameters are used to address this mismatch period; that is, the updated target current loop control parameters are used to control the off-grid load in grid-connected mode. At time T2, the STS status feedback confirms the disconnection, and the converter switches to off-grid mode. The converter's grid-connected control parameters switch to off-grid mode-specific parameters. Therefore, the aforementioned target current loop control parameters are designed to solve the stability problem during the "transition period" after the STS disconnects and before the mode switchover is complete.

[0022] Step 104: After the static transfer switch feedback confirms the disconnection, the energy storage converter is controlled using off-grid mode dedicated parameters.

[0023] For example, the off-grid mode-specific parameters are control parameters pre-designed for voltage source control mode, including voltage outer loop proportional-integral parameters and current inner loop proportional-integral parameters. This set of parameters is tuned offline based on the converter's rated capacity, filter parameters, and typical load characteristics to ensure the stability of the output voltage amplitude and frequency in off-grid mode. When the STS status feedback is confirmed to be disconnected, the converter control mode switches from grid-connected current source mode to off-grid voltage source mode, and simultaneously switches the current loop control parameters to off-grid mode-specific parameters, enabling the converter to enter a steady-state off-grid operation state.

[0024] In this embodiment, by simultaneously issuing the grid-to-off-grid command, the target current loop control parameters, pre-output by a radial basis function neural network based on load impedance parameters, are updated in the converter still operating in grid-connected mode. This effectively solves the problem of mismatch between the control mode and the controlled object during the transition period, avoids voltage resonance and current surges caused by parameter mismatch, and significantly suppresses transient oscillations during the switching process. Simultaneously, the use of load-adaptive current loop parameters during the transition period enhances the system's stability under low-damping inductive load conditions, improving the switching success rate. Once the static transfer switch feedback confirms the disconnection, the system promptly switches to off-grid mode-specific parameters, ensuring a smooth transition during transient processes and maintaining control quality during off-grid steady-state operation. This achieves a balance between transient adaptability and steady-state performance, thereby comprehensively improving the reliability of the energy storage converter's grid-to-off-grid transition and the power supply stability of the microgrid.

[0025] In one embodiment, before inputting the impedance parameter into the pre-trained radial basis function neural network, the method for handling transient oscillations of the energy storage converter from grid connection to off-grid connection further includes: Step 105: Construct the training sample set.

[0026] In this training sample set, the phase crossover frequency, amplitude crossover frequency, and cutoff frequency of each group of samples satisfy the preset stability constraints.

[0027] Step 105 includes: Step 1051: Determine the impedance parameter range of the energy storage converter in off-grid mode, and set the current loop control parameter range of the current loop proportional-integral controller.

[0028] In some embodiments, the impedance parameter range includes the load resistance range and the load inductance range. The current loop control parameter range includes the proportional coefficient range and the integral coefficient range.

[0029] For example, setting the initial sample set Where k represents the sample number and p is the number of samples. When k=1, it represents the first sample. This is the k-th input layer matrix of the radial basis function neural network; This represents the k-th output layer matrix of a radial basis function neural network. ; , . ; , The minimum proportionality coefficient, This is the maximum scaling factor; , The minimum integral coefficient, is the coefficient of the maximum integral. , This refers to the load parameter value.

[0030] For example, the present invention can set the load resistance range and load inductance range according to the converter load power or apparent power. Minimum load resistance Maximum load resistance ;in, The active power consumed by the load under rated voltage, with a purely resistive load and at full load. Equal to the rated active power of the converter .

[0031] Minimum load inductance = Maximum load inductance = ; This refers to the apparent power of the converter; under rated voltage, the apparent power of the load must not exceed the rated apparent power of the converter, and this is the basis for this determination. Subtract the current resistance Active power consumed The remaining capacity budget is allocated to the inductor, ensuring that the total current of the converter never exceeds the safe limit, regardless of changes in the load power factor. Since the converter is bidirectional power, the load resistance range is... , .

[0032] For example, the present invention can determine the range of the proportional coefficient and the range of the integral coefficient based on the initial parameters of the current loop. The initial parameters of the current loop include the initial proportional coefficient. and initial integral coefficients Assuming, , Then, based on the parameter adjustment experience range [0.1-10], determine the minimum proportional coefficient, the maximum proportional coefficient, the minimum integral coefficient, and the maximum integral coefficient.

[0033] Minimum proportionality coefficient Maximum proportionality coefficient Minimum integral coefficient Maximum integral coefficient Therefore, the range of the proportionality coefficient is [ The range of integral coefficients is [ ]. , .

[0034] Step 1052: Within the range of impedance parameters and the range of current loop control parameters, the impedance parameters and current loop control parameters are used as variables for iterative combination. For each set of impedance parameters and current loop control parameters, the magnitude margin and phase margin of the open-loop transfer function are determined according to the corresponding phase crossover frequency, amplitude crossover frequency and cutoff frequency.

[0035] For example, based on the converter topology Figure 4 Grid-connected system control box for energy storage converter Figure 5 The open-loop transfer function G is derived. Figure 5 In the main current forward path, the current command is... The output current is obtained through a PI regulator, PWM modulation, inverter, and LCL filter. Then, in the main current negative feedback loop, the current is fed back to the input terminal through current sampling negative feedback. On the inverter side, the inductor... With capacitor The current in the circuit formed is from Flow to Returning to the grid-side inductor With capacitor The circuit formed from Flow to Returning to the previous state, the transfer function is usually negative due to the setting of the reference direction.

[0036] The input current i is solved using the Mason gain formula and the open-loop transfer function formula. 1ref to output current i 11 The transfer function.

[0037] The open-loop transfer function of the Mason gain formula is expressed as: (1); in, Let be the transfer function of the k-th forward path; is the cofactor corresponding to the k-th forward path, i.e., the sub-characteristic remaining after deleting the loops that contact this path. n is the number of forward paths. This refers to the system output (usually the output current). This refers to system input quantities (usually referring to input current commands).

[0038] The forward path transfer function is expressed as: (2); in, The equivalent gain of the PWM converter depends on the DC bus voltage and the modulation method, and reflects the proportional relationship between the modulated wave output by the controller and the output voltage of the converter. The transfer function for the current loop PI controller of the grid-connected energy storage converter. .

[0039] The loop transfer function is expressed as: (3); in, This is the inductance value of the inverter-side inductor (the side closest to the converter bridge arm) in the LCL filter. This refers to the capacitance value of the filter capacitor in the LCL filter; when off-grid with load, the actual grid-side inductance will be affected by the load inductance. The series connection increases the value. The equivalent network-side impedance, i.e. , This is the original inductance value of the grid-side inductor (the side closest to the grid or load) in the LCL filter. It is the load inductance. This is the load resistance.

[0040] When n=1, the cofactor corresponding to the forward path ; s is the Laplace operator.

[0041] Substituting the loop transfer function into the Mason gain formula for the open-loop transfer function, we get: = (4); For example, for a set of impedance parameters and current loop control parameters, the phase crossover frequency corresponding to that set of impedance parameters and current loop control parameters is determined by frequency sweeping. Amplitude Crossover Frequency and cutoff frequency .

[0042] (5); (6); (7); in, For phase crossing frequency, For amplitude crossover frequency, The cutoff frequency, This refers to the gain margin of the open-loop transfer function, which is the amplitude-frequency characteristic (amplitude) of the open-loop transfer function. This refers to the phase margin of the open-loop transfer function, which is the phase-frequency characteristic (phase) of the open-loop transfer function.

[0043] For example, the phase crossover frequency can be found by frequency sweeping. That is, the frequency at which the open-loop phase response reaches -180°, and then the amplitude response at that frequency point is read. Then substitute into the formula The gain margin was calculated. .

[0044] Find the amplitude crossover frequency by frequency sweeping. That is, the frequency at which the open-loop amplitude response is 0dB, and then the phase response at that frequency point is read. Then substitute into the formula The phase margin was calculated. .

[0045] Cutoff frequency This is the frequency point at which the amplitude response drops to -3dB, used to determine whether the system's response speed meets design requirements. < It is not used directly to calculate the margin, but is used as one of the stability constraints. This is the resonant frequency of the LCL.

[0046] For example, the frequency sweep interval is set to cover. , , The frequency band is set to ensure system stability and fast response. 2 And because Therefore, the frequency sweep range , , Typically set to , For switching frequency, =16kHz, that is Therefore, the frequency sweep range is [1.5]. 3.3 ].

[0047] Open-loop transfer function G according to Figure 4 and Figure 5 Equation (4) is derived from this. The transfer function for the current loop PI controller of the grid-connected energy storage converter. .

[0048] Step 1053: Based on the magnitude margin, the phase margin, and the preset stability constraints, determine the optimal current loop control parameters corresponding to each set of impedance parameters.

[0049] For example, step 1053 includes: for each set of impedance parameters and current loop control parameters, determining whether the current loop control parameters meet the preset stability constraints based on the magnitude margin and the phase margin.

[0050] The preset stability constraints include an amplitude margin greater than six dB, a phase margin between thirty and sixty degrees, and a cutoff frequency less than a preset resonant frequency; the preset resonant frequency is the LCL filter resonant frequency after considering the load effect. .

[0051] For example, the formulas for each preset stability constraint are as follows: (8); (9); (10); in, For the magnitude margin, For phase margin, The inductance value of the inverter side of the LCL filter in the converter. This refers to the inductance value on the grid side of the LCL filter in the converter. This refers to the filter capacitor value of the LCL filter in the converter. Frequency, equivalent network-side impedance considering load effects of The calculation formula is expressed as: (11).

[0052] It should be noted that formula (11) is used in calculating the LCL resonant frequency. To facilitate engineering calculations and subsequent frequency domain constraint comparisons, certain approximations were made. Specifically, only the load inductance was considered when calculating the resonant frequency. The increase in equivalent grid-side inductance due to series connection (i.e.) ), while intentionally ignoring the load resistance. The influence of this is mainly because: on the one hand, the resistor primarily acts as a damper in the system, and its impact on the resonant frequency shift is relatively small; on the other hand, if it includes... Substituting the complete equivalent mesh-side impedance into the LC resonance formula will result in a complex resonant frequency, which will then be incompatible with the cutoff frequency in the real domain. Numerical comparisons are performed (i.e., constraints of formula (10) cannot be directly applied). Therefore, using equivalent inductance for order reduction estimation is a conservative yet practical engineering simplification.

[0053] Furthermore, equations (9) to (10) together constitute the core stability constraints for optimizing system parameters. The gain margin GM must be greater than 6 dB, and the phase margin PM must be within... to The purpose of this interval is to ensure the relative stability and dynamic response quality of the system; while the cutoff frequency... It must be less than the LCL resonant frequency This is to prevent excessive control bandwidth from triggering high-frequency resonant peaks in the filter. Only control parameters that simultaneously meet these conditions during the traversal search will be retained as candidate parameters, thus facilitating the next step of selecting the optimal current loop control parameters (e.g., selecting those with the closest phase margin). A reliable candidate set is provided by the candidate with the highest cutoff frequency or the highest overall score.

[0054] If the above-mentioned preset stability constraints are met, then the current loop control parameter is recorded as a candidate control parameter under the impedance parameter.

[0055] For each set of impedance parameters, the optimal set is selected from all candidate control parameters as the optimal current loop control parameters corresponding to that set of impedance parameters.

[0056] For example, the optimal current loop control parameters are as follows: among all candidate control parameters that satisfy a gain margin greater than 6dB, a phase margin between 30° and 60°, and a cutoff frequency less than the LCL resonant frequency, to balance speed and stability, the set of proportional and integral coefficients that makes the phase margin closest to 45° can be selected; alternatively, to obtain a faster current response speed, the parameter with the highest cutoff frequency can be selected; alternatively, to enhance robustness, the parameter with the largest gain margin can be selected first; alternatively, a normalized weighted score can be performed on the phase margin, gain margin, and cutoff frequency, and the parameter with the highest comprehensive score can be selected.

[0057] Step 1054: Combine the optimal current loop control parameters with the corresponding impedance parameters to form training sample pairs; all training sample pairs constitute the training sample set.

[0058] For example, regarding steps 1051-1054, the specific algorithm steps involve using three nested loops to traverse all possible load conditions and control parameter combinations, evaluating the frequency domain stability index of each set of parameters using a frequency sweep method, and finally selecting the optimal control parameters that satisfy the constraints under each load condition to form a training sample set. Step 1: Settings initial value Set as This defines the search boundaries for the load resistance and inductance; This is the minimum value of the load resistance. This is the minimum value of the load inductance; initial value Set as This defines the search boundaries for the proportional coefficient and the integral coefficient; This is the minimum value of the proportionality coefficient. This is the minimum value of the integral coefficient; the power resolution is set to 0.01 times the rated apparent power, therefore... Step length Set the sweep step size to 0.01 × 1.587 = 0.01587. =1Hz.

[0059] Step Two: fixed, . The step size for iterating over the load impedance parameters.

[0060] Step 3: fixed, Frequency sweep, solve according to formulas (8)~(10) , , . The step size for traversing the current loop control parameters.

[0061] Step 4: After completing step 3, return to step 3 and continue until... Traversal complete.

[0062] Step 5: After completing step 4, Proceed to step three until... After traversal is complete, use equations (8) to (10) under the objective constraints to find the optimal solution and update the offline training set. .

[0063] Step 6: After completing step 5, Perform the second step until... The traversal is complete, the process ends, and the offline training set is obtained. P represents the sample size.

[0064] Step 106: Train the radial basis function neural network using the training sample set to form a trained radial basis function neural network.

[0065] In some embodiments, the radial basis function neural network includes an input layer, a hidden layer, and an output layer; the data centers of each node in the hidden layer are determined by clustering the input samples in the training sample set using the K-means clustering algorithm, and the width parameter of each node is determined by the standard deviation of the distance from the samples in each cluster to the data center.

[0066] For example, step 106 includes: Step 1061: Input the impedance parameters in the training sample set into the radial basis function neural network, and calculate the estimated value through forward propagation.

[0067] Step 1062: Calculate the error based on the estimated value and the expected value of the output layer sample in the sample set.

[0068] Step 1063: Based on the error, calculate the gradient of the loss function with respect to the weight matrix using backpropagation with the chain rule.

[0069] In some embodiments, the gradient reflects the direction and magnitude of the error as the weight matrix changes; that is, it indicates how the weight matrix can be adjusted to reduce the error.

[0070] Step 1064: The Adam algorithm is used to adaptively adjust the learning rate according to the gradient and update the weight matrix. This process is repeated until the error converges or the preset maximum number of iterations is reached, thus obtaining the trained radial basis function neural network.

[0071] It should be noted that, to ensure stable operation in grid-connected mode and off-grid mode, this invention requires adjusting the control parameters in grid-connected mode based on the load impedance. This is achieved by utilizing the RBF (Radial Basis Function) neural network's ability to approximate any nonlinear function to tune the current loop control parameters, such as... Figure 6 The diagram shows the structure of an RBF neural network, which consists of an input layer, hidden layers, and an output layer. The hidden layer maps the input layer to a high-dimensional space using radial basis functions, and then to the output layer using a weight matrix. The number of nodes in the input layer, hidden layer, and output layer are l, m, and u, respectively.

[0072] The input layer of the RBF (Radial Basis Function) neural network is designed as follows: , The input layer matrix is The number of input layer nodes is l=2.

[0073] The output layer of the RBF (Radial Basis Function) neural network is designed as follows: , The output layer matrix is This is the weight matrix from the hidden layer to the output layer of the neural network. This represents the output of the Gaussian function in the hidden layer to the input layer. The number of nodes in the output layer is u=2.

[0074] The hidden layer of the RBF (Radial Basis Function) neural network is designed as follows: ,in , Let be the center vector and width of the m-th Gaussian function, respectively. for and The Euclidean distance between them is determined by the empirical formula for the number of hidden layer nodes in an RBF neural network. The compensation coefficient 'a' used to calculate the number of nodes is usually a constant between 1 and 10. Here, we take 2, and the calculated value is m=4. Therefore, the number of hidden layer nodes is m=4.

[0075] The training set for the RBF (Radial Basis Function) neural network is set as follows: The optimal expectation matrix is ​​solved by the frequency sweep method and the objective constraint conditions. Set the sample set input , The frequency sweep interval covers the key frequency band of the cross-frequency range. , ].

[0076] During grid-connected / off-grid switching, the RBF neural network updates the converter grid-connected current loop control parameters according to the load conditions.

[0077] Optionally, this invention also sets the hidden layer parameters of the RBF neural network. The hidden layer parameters require setting the node data center. ,width Node Data Center The K-means clustering algorithm is used. K-means is the most classic and commonly used clustering algorithm in unsupervised learning. Its core principle is to automatically divide the data into K clusters, making samples within each cluster as similar as possible and samples between clusters as different as possible. This is achieved by iteratively minimizing the "whole-cluster sum of squares (WCSS)" to cluster the training input sample data into K classes, with the centroid of each class being the centroid. The number of clusters K in K-means is equal to the number of neurons in the hidden layer, which is 4.

[0078] The objective function is as follows (12), where For the j-th cluster, Let j be the centroid of the j-th cluster. This is a data sample.

[0079] Clustering loss function (12); width To fit the data distribution, the standard deviation of the samples within the cluster to the centroid is selected as the width, as shown in equation (13), where, It is the number of samples in the j-th cluster.

[0080] (13); Optionally, the weight matrix of the RBF neural network is trained offline in this invention.

[0081] Step 1: Input layer matrix = = .

[0082] Step 2: Output layer matrix .

[0083] Step 3: Set the hidden layer to... .

[0084] Step 4: Train the weight matrix The algorithm is trained using gradient descent and computed via forward propagation of an RBF neural network. Output the estimation matrix, which is the expected output value obtained from the offline training set. The estimation error is calculated as shown in equation (14), and the loss function is shown in equation (15).

[0085] (14); (15); The Jacobian information matrix of the loss function with respect to the weight matrix is ​​calculated using the backpropagation method of equation (16). Update the weight matrix according to the iterative formula (17). Repeat the iteration until the loss function E converges to a preset threshold. Or the number of iterations reaches the maximum number of iterations. Stop, and finally obtain the neural network weight matrix. In the formula For learning rate, If the learning rate is too small, convergence is slow and it's easy to get stuck in local optima; if the learning rate is too large, oscillations, non-convergence, or even divergence may occur. The selection of the learning rate is crucial for solving the problem. The fixed-value method requires manual adjustment based on the loss curve, and the same learning rate is used for all parameters and all time points. This method has the problems of difficult parameter adjustment, slow convergence, and easy oscillation. Therefore, the Adam algorithm is used to adaptively update the learning rate as shown in equations (18) to (22). Default parameters =0.001, the exponential decay coefficient of the first moment estimate. =0.9, the exponential decay coefficient of the second moment estimate. =0.999, = . This is the corrected estimate of the first-order moment deviation. Here, ϵ is the second-order moment deviation correction estimate, and ϵ is a local constant. Let be the weight matrix of the neural network in the t-th iteration. Let be the weight matrix of the neural network in the (t+1)th iteration. Let be the gradient value of the t-th iteration. This is the first moment estimate of the gradient. This is the second moment estimate of the gradient.

[0086] (16); (17); +(1- ) (18); +(1- ) (19); (20); (twenty one); (twenty two); Optionally, this invention can update parameters online using an RBF neural network. Before the grid-to-off-grid command is issued, the microgrid controller adjusts the off-grid load impedance. , resistance The load impedance parameters are sent to the converter, which then inputs them into the RBF neural network. The RBF neural network outputs the current loop control parameters. , The converter updates the grid-connected mode current loop control parameters at the same time as it sends the grid-connected to off-grid command to the STS. Figure 7 The method of this invention is used to switch waveforms that tend to converge successfully after resonance under the same operating conditions. Figure 8 The waveform represents the failed switching of the resonant divergence when the load is inductive.

[0087] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0088] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.

[0089] Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. The electronic device 2 of this embodiment includes a processor 20 and a memory 21. The memory 21 stores a computer program 22. When the processor 20 executes the computer program 22, it implements the steps in the various method embodiments described above. Alternatively, when the processor 20 executes the computer program 22, it implements the functions of each module / unit in the various device embodiments described above.

[0090] For example, computer program 22 may be divided into one or more modules / units, which are stored in memory 21 and executed by processor 20 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 22 in electronic device 2.

[0091] Electronic device 2 may include, but is not limited to, processor 20 and memory 21. Those skilled in the art will understand that... Figure 9 This is merely an example of electronic device 2 and does not constitute a limitation on electronic device 2. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 2 may also include input / output devices, network access devices, buses, etc.

[0092] The processor 20 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0093] The memory 21 can be an internal storage unit of the electronic device 2, such as a hard disk or RAM. The memory 21 can also be an external storage device of the electronic device 2, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 21 can include both internal and external storage units of the electronic device 2. The memory 21 is used to store the computer program 22 and other programs and data required by the electronic device 2. The memory 21 can also be used to temporarily store data that has been output or will be output.

[0094] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.

[0095] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.

[0096] This invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.

[0097] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0098] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0099] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for handling transient oscillations when switching from grid-connected to off-grid operation of an energy storage converter, characterized in that, include: Obtain the load impedance parameters of the energy storage converter before the grid-connected to off-grid switching; The impedance parameters are input into a pre-trained radial basis function neural network, which outputs the target current loop control parameters. At the same time as the grid-connected to off-grid command is issued, the current current loop control parameters of the energy storage converter in grid-connected mode are updated to the target current loop control parameters. After the static transfer switch feedback confirms the disconnection, the energy storage converter is controlled using dedicated parameters for off-grid mode.

2. The method for handling transient oscillations when switching from grid-connected to off-grid operation of an energy storage converter according to claim 1, characterized in that, Before inputting the impedance parameter into the pre-trained radial basis function neural network, the method further includes: Construct a training sample set; the phase crossover frequency, amplitude crossover frequency, and cutoff frequency corresponding to each group of samples in the training sample set satisfy the preset stability constraints. The radial basis function neural network is trained using the training sample set to form a trained radial basis function neural network.

3. The method for handling transient oscillations when switching from grid-connected to off-grid operation of an energy storage converter according to claim 2, characterized in that, The construction of the training sample set includes: Determine the impedance parameter range of the energy storage converter in off-grid mode; Set the current loop control parameter range for the proportional-integral controller; Within the range of impedance parameters and the range of current loop control parameters, the impedance parameters and current loop control parameters are used as variables for iterative combination. For each set of impedance parameters and current loop control parameters, the magnitude margin and phase margin of the open-loop transfer function are determined according to the corresponding phase crossover frequency, magnitude crossover frequency and cutoff frequency. Based on the magnitude margin, the phase margin, and the preset stability constraints, the optimal current loop control parameters corresponding to each set of impedance parameters are determined. The optimal current loop control parameters are combined with the corresponding impedance parameters to form training sample pairs; all training sample pairs constitute the training sample set.

4. The method for handling transient oscillations when switching from grid-connected to off-grid operation of an energy storage converter according to claim 3, characterized in that, The determination of the optimal current loop control parameters for each set of impedance parameters based on the magnitude margin, the phase margin, and preset stability constraints includes: For each set of impedance parameters and current loop control parameters, based on the magnitude margin and the phase margin, it is determined whether the current loop control parameters meet the preset stability constraints. If satisfied, the current loop control parameter is recorded as a candidate control parameter under the impedance parameter. For each set of impedance parameters, the optimal set is selected from all candidate control parameters as the optimal current loop control parameters corresponding to that set of impedance parameters.

5. The method for handling transient oscillations when switching from grid-connected to off-grid operation of an energy storage converter according to claim 3, characterized in that, The preset stability constraints include an amplitude margin greater than six dB, a phase margin between thirty and sixty degrees, and a cutoff frequency less than the preset resonant frequency; the preset resonant frequency is the LCL filter resonant frequency after considering the load effect.

6. The method for handling transient oscillations when switching from grid-connected to off-grid operation of an energy storage converter according to claim 2, characterized in that, The radial basis function neural network includes an input layer, a hidden layer, and an output layer; the data centers of each node in the hidden layer are determined by clustering the input samples in the training sample set using the K-means clustering algorithm, and the width parameter of each node is determined by the standard deviation of the distance from the sample in each cluster to the data center.

7. The method for handling transient oscillations during grid-connected to off-grid transition of an energy storage converter according to claim 2, characterized in that, The step of training the radial basis function neural network using the training sample set to form a trained radial basis function neural network includes: The impedance parameters in the training sample set are input into the radial basis function neural network, and the estimated values ​​are calculated and output through forward propagation. The error is calculated based on the estimated value and the expected value of the output layer sample in the sample set; Based on the error, the gradient of the loss function with respect to the weight matrix is ​​calculated using backpropagation with the chain rule; the gradient reflects the direction and magnitude of the error as the weight matrix changes. The Adam algorithm is used to adaptively adjust the learning rate based on the gradient and update the weight matrix. This process is repeated iteratively until the error converges or the preset maximum number of iterations is reached, resulting in a trained radial basis function neural network.

8. The method for handling transient oscillations when switching from grid-connected to off-grid operation of an energy storage converter according to claim 1, characterized in that, The impedance parameters include load resistance and load inductance; the target current loop control parameters include the proportional coefficient and integral coefficient of the proportional-integral controller.

9. A device for handling transient oscillations during grid-connected to off-grid transition of an energy storage converter, comprising the method for handling transient oscillations during grid-connected to off-grid transition of an energy storage converter as described in any one of claims 1 to 8, characterized in that, include: The parameter acquisition module is used to acquire the impedance parameters of the load of the energy storage converter before the grid-connected to off-grid switching. The target current loop control parameter determination module is used to input the impedance parameters into a pre-trained radial basis function neural network and output the target current loop control parameters. The parameter update module is used to update the current loop control parameters of the energy storage converter in grid-connected mode to the target current loop control parameters at the same time as the grid-connected to off-grid command is issued. The parameter recovery module is used to control the energy storage converter with dedicated off-grid parameters after the static transfer switch feedback confirms the disconnection.

10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 8.