Grid-connected photovoltaic system wide frequency oscillation suppression method based on aco_xlstm algorithm optimized vsg parameter

By optimizing VSG parameters using the ACO_xLSTM algorithm and adjusting the virtual inertia and damping coefficient in real time, the problem of wideband oscillation caused by fixed parameters in traditional VSG control is solved, thereby improving the stability and power quality of the photovoltaic grid-connected system.

CN122246724APending Publication Date: 2026-06-19YUNNAN ELECTRIC POWER TESTING & RES INST (GRP) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YUNNAN ELECTRIC POWER TESTING & RES INST (GRP) CO LTD
Filing Date
2026-03-27
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The fixed control parameters of traditional VSG systems make it impossible to effectively suppress wideband oscillations in photovoltaic grid-connected systems, and the system stability is poor under different disturbances.

Method used

A method based on the ACO_xLSTM algorithm to optimize the parameters of a virtual synchronous generator (VSG) is adopted. By establishing a sequence impedance model and analyzing frequency coupling effects, the virtual inertia and damping coefficient are dynamically adjusted in real time to construct an adaptive optimization controller, thereby achieving precise suppression of broadband oscillations.

Benefits of technology

It has achieved improved stability and power quality of photovoltaic grid-connected systems under different disturbances, effectively suppressed broadband oscillations, and improved the dynamic response capability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122246724A_ABST
    Figure CN122246724A_ABST
Patent Text Reader

Abstract

This invention provides a broadband oscillation suppression method for grid-connected photovoltaic systems based on the ACO_xLSTM algorithm to optimize VSG parameters, belonging to the field of power system stability control technology. The method includes the following steps: First, a sequence impedance model of the virtual synchronous generator (VSG) is established, and the system oscillation characteristics are identified through broadband impedance frequency sweeping. Second, the dynamic demand patterns of the system on virtual inertia and damping coefficients at different stages of the oscillation process are analyzed. Then, a parameter optimization controller based on the combination of the Ant Optimization Algorithm (ACO) and xLSTM neural network is constructed, using the system frequency deviation and frequency change rate as inputs, and dynamically outputting the optimal virtual inertia and damping coefficients in real time. Finally, the optimized parameters are applied to the VSG control loop to achieve adaptive suppression of broadband oscillations. Compared with existing technologies, this invention effectively solves the problem that traditional VSGs, due to their fixed parameters, are difficult to adapt to varying operating conditions, significantly improving the stability of grid-connected photovoltaic systems under disturbances and reducing voltage and current harmonic distortion rates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system broadband oscillation suppression technology, and in particular to a method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm to optimize VSG parameters. Background Technology

[0002] New power systems with a high proportion of renewable energy are gradually becoming a research focus. However, the large-scale integration of power electronics-based renewable energy devices into the grid alters the system's dynamic characteristics, leading to increasingly prominent broadband oscillation problems. In recent years, subsynchronous oscillation events have occurred in multiple regions. These frequent broadband oscillation phenomena pose a serious threat and challenge to the safe and stable operation of my country's power system. Unlike traditional power sources, photovoltaic grid-connected structures are more complex. Their power output is direct current (DC), which needs to be converted to alternating current (AC) by an inverter before being connected to the grid. This process relies on power electronic devices for rapid and precise control, which helps improve the quality of grid-connected power. However, the nonlinear characteristics of the power electronic devices themselves can easily introduce new oscillations, making the stability problem of photovoltaic grid-connected systems more complex. Therefore, research on oscillation mechanisms and the development of effective broadband oscillation suppression strategies are particularly urgent.

[0003] Virtual Synchronous Generator (VSG) technology, by simulating the rotor motion equations and excitation regulation characteristics of a synchronous generator, enables inverters to possess inertia and damping support capabilities, becoming an important means to solve the grid connection stability problem of new energy sources, i.e., a grid-connected technology. However, traditional VSG control typically uses virtual rotational inertia... J and damping coefficient D Setting parameters to fixed values ​​is ineffective. When the system encounters disturbances of varying intensities, fixed parameters are unlikely to achieve optimal control under all operating conditions. Improper parameter settings not only fail to effectively suppress oscillations but may even introduce new coupled oscillations, leading to slow system recovery or persistent instability after a disturbance.

[0004] While existing literature has proposed various oscillation suppression strategies, such as virtual impedance reshaping and additional damping control, most of them do not delve into the core parameters of the VSG. J and D The real-time, adaptive collaborative optimization problem, especially during wideband oscillations, involves the dynamic variation of inertia and damping requirements at different stages of the system, which cannot be met by fixed parameters. Therefore, the challenge lies in how to dynamically adjust the VSG based on the real-time operating status of the system. J and D Determining the parameters to effectively suppress broadband oscillations is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] The purpose of this invention is to provide a method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm to optimize VSG parameters. This method can dynamically adjust the virtual inertia and damping coefficient in real time according to the system frequency deviation and rate of change, thereby effectively suppressing broadband oscillations, improving the stability and power quality of grid-connected photovoltaic systems, and solving the problem that traditional VSG control is difficult to effectively suppress broadband oscillations due to fixed parameters.

[0006] To achieve the above-mentioned objectives, the technical solution provided by this invention is as follows: A method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm to optimize VSG parameters, the method comprising: S101. Establish the sequence impedance model of the virtual synchronous generator (VSG) and verify the sequence impedance model by wideband impedance sweep. S102. Analyze the dynamic requirements of virtual inertia and damping coefficient at different stages during the oscillation process of the grid-connected photovoltaic system; S103. Construct a VSG parameter adaptive optimization controller based on the ACO_xLSTM algorithm, and calculate and output the optimal virtual inertia and optimal damping coefficient in real time. S104. Apply the optimal virtual inertia and optimal damping coefficient to VSG control, and implement a wideband oscillation suppression strategy according to the system disturbance.

[0007] Furthermore, in S101, a mathematical model of the positive and negative sequence impedances of the VSG is established considering the frequency coupling effect. By injecting a series of small-amplitude voltage disturbance signals at the power grid common coupling point, the voltage and current response is measured and the wideband impedance is calculated. The frequency sweep test results are obtained and compared with the theoretical model to verify the accuracy of the sequence impedance model.

[0008] Furthermore, the voltage and current response is measured and the wideband impedance is calculated, specifically including: An impedance measuring device is connected in series between the power electronic device under test (PED) and the power grid. First, the voltage and current at the input terminal of the PED are detected when no disturbance is applied. Then, a disturbance voltage is injected into the PED to induce a current response. Next, the voltage change and current response caused by the disturbance are measured at the input interface of the PED and the difference is calculated with the voltage and current when no disturbance is applied. Based on the voltage difference and current difference at the disturbance frequency, the impedance at the corresponding frequency is calculated.

[0009] Furthermore, the specific implementation process of S102 includes: S201. Analyze the grid-connected active power characteristics of VSG and clarify the influence of virtual inertia and damping coefficient on the dynamic characteristics of grid-connected photovoltaic system. S202. Divide the oscillation waveform of the system in one cycle into four regions. Combine the deviation of angular frequency, rate of change and amplitude change in each stage to determine the dynamic requirements of virtual inertia and damping coefficient in different stages of the system oscillation process.

[0010] Furthermore, in S103, the construction of a VSG parameter adaptive optimization controller based on the ACO_xLSTM algorithm specifically includes the following steps: S301. Establish the dynamic response equations for the virtual inertia and damping coefficient of the VSG, as the target basis for the adaptive optimization of VSG parameters. S302. Predict the parameters of the xLSTM neural network using the ACO algorithm, and find the network structure that can best predict the system control parameters. S303. Train the xLSTM neural network optimized by the output of the ACO algorithm so that the predicted virtual inertia and damping coefficient can minimize system oscillation and frequency deviation.

[0011] Furthermore, step S302 specifically includes the following steps: S401. Initialize the ant colony. Each ant represents a set of potential xLSTM network parameters. The position vector of each ant represents the initial parameters of the network. The goal of the ants is to find the network structure that can optimally predict the control parameters of the system by exploring the parameter space. The input of each ant is the frequency deviation and the rate of change of frequency. The predicted output is the virtual inertia and the damping coefficient. The effectiveness of the predicted output is evaluated by the fitness function. S402. Perform a local search based on the position of the optimal ant; S403. Introduce random individual positions for ants in the ant colony to avoid local optima; S404. Introducing a convergence factor allows the ACO algorithm to gradually transition from global exploration to local development, thereby ensuring that the optimal solution is found.

[0012] Furthermore, in step S104, the optimal virtual inertia and optimal damping coefficient are applied to the VSG control, specifically including the following steps: S501. Use the ACO algorithm to find the optimal weight and bias values ​​in the xLSTM neural network; S502. Input the optimal weight values ​​and bias values ​​into the xLSTM neural network. The xLSTM neural network dynamically outputs the virtual inertia and damping coefficient based on the input and the optimal weight and bias values. S503: Input the virtual inertia and damping coefficient output by S502 into the dynamic response equation to achieve adaptive closed-loop control of virtual inertia and damping coefficient.

[0013] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention establishes an accurate VSG sequence impedance model and combines it with wideband impedance sweep, which can accurately identify the oscillation risk points of the system and provide a precise theoretical basis for suppression strategies. 2. This invention combines the Ant Optimization Algorithm (ACO) with the xLSTM neural network. By using ACO to optimize the initial parameters of the neural network, the convergence speed and generalization ability of the neural network are significantly improved, avoiding getting trapped in local optima, and thus finding the optimal parameters of VSG more effectively. 3. This invention proposes an adaptive cooperative control strategy based on frequency deviation and frequency change rate, which can adjust the virtual inertia and damping coefficient in real time and dynamically according to different stages of the oscillation process, thereby achieving precise suppression of broadband oscillations. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only preferred embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of the overall process of the method provided in the embodiments of the present invention; Figure 2 This is the main circuit topology and control block diagram of VSG control; Figure 3 It is the dynamic characteristic curve of the output power of the grid-connected inverter; Figure 4 This is a flowchart of the ACO-xLSTM neural network optimizing VSG parameters; Figure 5 This is a comparison chart of the VSG positive sequence impedance model and the results of frequency sweep measurement; Figure 6 This is the grid-connected voltage and current waveform without suppression strategy under 10% disturbance; Figure 7 This is the voltage FFT analysis result without the addition of a suppression strategy under a 10% perturbation; Figure 8 This is the FFT analysis result of the current without the addition of a suppression strategy under a 10% perturbation; Figure 9 This is the grid-connected voltage and current waveform without suppression strategy under 20% disturbance; Figure 10 This is the voltage FFT analysis result without the addition of a suppression strategy under a 20% perturbation; Figure 11 This is the FFT analysis result of the current without the addition of a suppression strategy under a 20% perturbation; Figure 12 This is the grid-connected voltage and current waveform after incorporating the suppression strategy of this invention under a 20% disturbance; Figure 13 This is the voltage FFT analysis result with the suppression strategy of this invention added under 20% perturbation; Figure 14 This is the FFT analysis result of the current under 20% perturbation with the suppression strategy of this invention added; Figure 15 This is the grid-connected voltage and current waveform with the suppression strategy of this invention added under 35% disturbance; Figure 16 This is the voltage FFT analysis result with the suppression strategy of this invention added under 35% perturbation; Figure 17 The results are FFT analysis of the current under 35% perturbation with the suppression strategy of this invention applied. Detailed Implementation

[0016] The principles and features of the present invention are described below with reference to the accompanying drawings. The listed embodiments are only used to explain the present invention and are not intended to limit the scope of the present invention.

[0017] This embodiment provides a method for suppressing broadband oscillations in grid-connected photovoltaic systems by optimizing VSG parameters based on the ACO_xLSTM algorithm. The photovoltaic VSG system incorporates an optimization mechanism combining ACO and xLSTM neural networks to achieve real-time dynamic collaborative optimization of virtual inertia and damping coefficients. This adaptive collaborative control strategy based on frequency deviation and frequency conversion rate can autonomously adjust control parameters according to the system's operating state, effectively suppressing broadband oscillations and improving the system's dynamic stability and anti-interference capability. (Refer to...) Figure 1 The method includes the following steps: S101. Establish the sequence impedance model of the virtual synchronous generator (VSG) and verify the sequence impedance model by wideband impedance sweep.

[0018] S102. Analyze the impact of virtual inertia on different stages during the oscillation process of a grid-connected photovoltaic system. J and damping coefficient D Dynamic requirements.

[0019] S103. Construct a VSG parameter adaptive optimization controller based on the ACO_xLSTM algorithm, and calculate and output the optimal virtual inertia in real time. and optimal damping coefficient .

[0020] S104, Optimal virtual inertia and optimal damping coefficient It is applied to VSG control to implement a wideband oscillation suppression strategy based on system disturbance conditions.

[0021] Figure 2 This embodiment presents the main circuit topology and control block diagram of the VSG control. The main circuit topology adopts a three-phase full-bridge inverter structure, connected to the grid via an LC filter. The DC side is connected to the photovoltaic array, and the AC side is coupled to the grid through a connecting inductor. The VSG control block diagram includes a power calculation module, a virtual synchronous machine core algorithm, and a dual closed-loop regulator. By simulating the rotor motion equation and excitation regulation characteristics of a synchronous generator in real time, a voltage reference signal is generated. After SPWM modulation, this signal drives the inverter switching transistors, enabling the grid-connected inverter to have inertia support and damping regulation capabilities.

[0022] In step S101, a mathematical model of positive and negative sequence impedance of VSG is established considering frequency coupling effect. By injecting a series of small-amplitude voltage disturbance signals at the power grid common coupling point, the voltage and current response is measured and the wideband impedance is calculated. The frequency sweep test results are obtained and compared with the theoretical model to verify the accuracy of the sequence impedance model.

[0023] Specifically, the photovoltaic system's generator-side converter uses VSG control, with the following specific control measures: The active power-frequency control loop simulates both the rotor motion equation and primary frequency regulation of a synchronous generator. By mimicking the rotor motion equation, the VSG control can provide inertia and damping to the power grid, while the primary frequency regulation allows the inverter to participate in grid frequency regulation. The characteristic expression of the active power-frequency control loop is:

[0024] In the above formula, The active power reference value set for VSG; This refers to the actual electromagnetic output power of the VSG; This is the active power droop coefficient; This refers to the actual operating angular velocity; Rated angular velocity; This is virtual inertia; The damping coefficient; This represents the rotor angle.

[0025] The reactive power-voltage control loop simulates the excitation regulator of a synchronous generator. When the grid connection point voltage changes, the system adjusts the reactive power to change the internal electromotive force of the VSG output. This enables support for the grid voltage. The expression is:

[0026] In the above formula, This refers to the integral time constant coefficient in the excitation regulation circuit; n This refers to the proportional or damping coefficient in the excitation regulation circuit; sFor the Laplace operator; This refers to the reactive power droop factor. This is the gain coefficient of the voltage error signal; The given reactive power reference value; This represents the actual reactive power output of the VSG. This is the reference value for the rated voltage. This represents the actual voltage amplitude at the point of common coupling.

[0027] The specific steps for modeling the VSG sequence impedance are as follows: Based on the characteristics of frequency coupling, when frequency coupling exists in a virtual synchronous generator (VSG), the disturbance frequency component and the coupled frequency component will appear in pairs. Therefore, after injecting a positive-sequence small-signal disturbance into the grid side in the time domain, the VSG's... a The output voltage and current and the filter inductor current can be expressed as follows:

[0028]

[0029]

[0030] In the above formula, , and These represent the amplitudes of the fundamental voltage, current, and filter inductor current, respectively. , and These represent the amplitudes of the positive-sequence perturbation frequency voltage, current, and filter inductor current, respectively. , and These represent the amplitudes of the coupling frequency voltage, current, and filter inductor current, respectively. The fundamental angular frequency of the power grid; and These are the disturbance angular frequency and the coupling angular frequency, respectively. The initial phase angle of the fundamental current; and These are the initial phase angles of the fundamental current and the inductor current, respectively. , and These are the initial phase angles of the positive-sequence perturbation frequency voltage, current, and inductor current, respectively. , and These are the initial phase angles of the negative-sequence coupling frequency voltage, current, and inductor current, respectively.

[0031] Based on the system's operating principle, injecting a positive-sequence disturbance frequency voltage into the grid side will induce a response current at the corresponding frequency and its coupled frequencies. The key to impedance modeling lies in constructing the transfer function relationship between the disturbance voltage and the response current at the point of common coupling (PCC). Specifically, the main circuit establishes the relationship between the disturbance voltage, the response current, and the arm voltages, while the control circuit establishes the transfer function from the disturbance voltage and response current to the modulation wave. The modulation wave and the arm voltages are interconnected through the DC-side voltage. By jointly solving these three relationships, the transfer function between the disturbance voltage and the response current can be obtained, thus yielding the output sequence impedance of the VSG.

[0032] Injection frequency to the network side is When subjected to a positive-sequence harmonic voltage disturbance, a current response signal with two frequency components is generated. a Taking the phase as an example, considering the frequency coupling effect, the equivalent small-signal model of the main circuit can be decomposed into: Equivalent circuit of frequency and Equivalent circuit of coupling frequency. According to The equivalent circuit of the frequency can be used to obtain the perturbation frequency. The small-signal model of the main circuit is:

[0033] according to The equivalent circuit of the coupling frequency can be used to obtain the coupling frequency. The small-signal model of the main circuit is as follows:

[0034] In the above formula, and They are respectively Download VSG a Phase voltage and current; and PCC points respectively a Phase voltage and current; s For the Laplace operator; For filtering inductors; For filtering capacitors; It is a damping resistor.

[0035] Furthermore, the VSG coupling admittance matrix considering frequency coupling effects can be solved, as shown below:

[0036] In the formula, Represents frequency s Self-admittance at the location; Indicated by coupling frequency s 2 to frequency s Mutual admittance; Indicated by frequency s to coupling frequency s 2's mutual admittance; Indicates coupling frequency s Self-admittance at point 2.

[0037] When the frequency applied on the network side is Positive sequence voltage disturbance At that time, due to the asymmetry of the power outer loop control, the system not only generates a frequency of Positive sequence current response It will also generate a frequency of The negative sequence current response. Subject to grid impedance. The output current of these two frequencies will be affected. This causes voltage disturbances at the corresponding frequency. and Subsequently, these two voltage disturbances trigger corresponding frequency current responses through the control loop and the main circuit, respectively, forming a closed-loop feedback.

[0038] By introducing grid impedance It can eliminate frequencies of The variables are converted so that the effects of coupling terms are equivalently factored into the output impedance, thus simplifying the original single-input dual-output system into a single-input single-output system. This simplification facilitates impedance measurement and system stability analysis. Equivalent output impedance Zs The expression is:

[0039] Measuring voltage and current response and calculating wideband impedance, specifically including: An impedance measuring device is connected in series between the power electronic device under test (TEB) and the power grid. First, the voltage and current at the device's input are measured when no disturbance is applied. Then, a small disturbance voltage is injected into the TEB, causing a corresponding current response in the device. Next, the voltage change and current response caused by the disturbance are measured at the device's input interface, and the difference is calculated between these values ​​and the voltage and current values ​​when no disturbance is applied. Based on the voltage and current differences at the disturbance frequency, the impedance at the corresponding frequency can be calculated. By following this procedure, measurements at all target frequencies can be completed, thus achieving broadband impedance measurement of the TEB.

[0040] To measure the impedance of a passive component, simply apply a voltage of a certain frequency to the passive component, and then measure the voltage value and the current flowing through the passive component. The impedance at that frequency can then be directly calculated, as shown in the following formula:

[0041] In the formula, For measuring frequency; The impedance of a passive component; The voltage across the passive component; It represents the current flowing through the passive component.

[0042] For impedance measurement of active components such as power electronic equipment systems, directly applying measurement methods for passive components may lead to inaccurate impedance measurements due to the presence of equivalent voltage or current sources within the active equipment, especially at the fundamental frequency, specific subharmonic frequencies, and high frequencies. For impedance measurement of such active equipment, it is necessary to first detect the voltage and current on the device under test without applying a disturbance. Then, a disturbance voltage at the desired measurement frequency is injected. By comparing the changes in voltage and current before and after the disturbance injection, the impedance value at that frequency is calculated. The following formula illustrates this:

[0043] In the formula, For measuring frequency; The impedance of the active device; This is the voltage difference between the voltage after disturbance injection and before disturbance injection on an active device. It is the difference between the current flowing through the active device after the disturbance injection and before the disturbance injection.

[0044] The specific implementation process of S102 includes: S201. Analyze the grid-connected active power characteristics of VSG and clarify the influence of virtual inertia and damping coefficient on the dynamic characteristics of grid-connected photovoltaic systems.

[0045] The equivalent impedance between the grid voltage and the inverter output voltage is generally inductive, therefore the active power of the VSG connected to the grid is... Represented as:

[0046] In the formula, For the angle of attack; and The parameters are, in order, grid voltage amplitude and line equivalent inductive reactance; This refers to the output voltage amplitude. This is the rated angular frequency; This represents the synchronization voltage coefficient. Ignoring the influence of the VSG's voltage-current dual-loop dynamic response characteristics on its active-frequency outer loop, and combining this with the VSG's rotor motion equations, it can be seen that the VSG's... Dynamic oscillation problems are mainly affected by the active power setpoint. The impact of the disturbance, and The closed-loop transfer function can be written as:

[0047] In the formula, express arrive The closed-loop transfer function; This represents a small disturbance in the output electromagnetic power. This indicates a small disturbance relative to the active power command.

[0048] According to the above formula, it can be seen that the VSG grid-connected active power closed-loop equivalent control system, when introduced... J It then becomes a second-order oscillating system, that is Its in When disturbances occur, dynamic oscillations and power overshoot are likely to occur. The characteristic parameters of the second-order oscillatory system described by the above equation are as follows:

[0049] In the formula, and These are the system's natural angular frequencies, i.e., its damping ratios. From the above equation, it can be seen that... and Will follow J The simultaneous increase and decrease of the value indicates that the active power response speed of the VSG system will slow down and the dynamic oscillations will intensify. Furthermore, Will follow D The value increases with the value, indicating that the active dynamic oscillation of the VSG system will increase with... D Increases and decreases.

[0050] S202. Divide the oscillation waveform of the system in one cycle into four regions. Combine the deviation of angular frequency, rate of change and amplitude change in each stage to determine the dynamic requirements of virtual inertia and damping coefficient in different stages of the system oscillation process.

[0051] To clearly analyze the entire process, this embodiment divides the oscillation waveform of one cycle into four regions and analyzes the power and angular frequency variation characteristics of the four regions. See Table 1 and... Figure 3 As shown, the system undergoes a complete oscillation cycle after the disturbance, which includes four characteristic phases: Phase 1 a In this case, a step increase in input power leads to a larger positive value in the angular frequency deviation, and the output power catches up with the input power. At this point, the moment of inertia should be increased. J and damping coefficient D To suppress the rate of change and deviation of angular frequency; stage b In the middle, the rate of change of angular frequency turns negative, the deviation gradually decreases but remains positive, and needs to be reduced. J To accelerate frequency recovery and continue to increase D To suppress change; stage c In the middle, the rate of change of angular frequency remains negative, and the deviation decreases further, so it needs to be increased again. J and DTo jointly suppress changes and reduce bias; stage d In the middle, the rate of change of angular frequency turns positive, the deviation is negative but gradually decreases, and needs to be reduced. J To accelerate the frequency recovery. This periodic characteristic repeats itself in different oscillation cycles, and can be adjusted in a timely manner. J and D It can effectively suppress oscillations and accelerate the system's recovery to stability.

[0052] Table 1

[0053] Reference Figure 4 In step S103, the construction of a VSG parameter adaptive optimization controller based on the ACO_xLSTM algorithm specifically includes the following steps: S301. Establish the dynamic response equations of the virtual inertia and damping coefficient of the VSG as the target basis for the adaptive optimization of VSG parameters.

[0054] The dynamic response equations for the VSG virtual inertia and damping coefficients are expressed as follows:

[0055] In the formula, Angular velocity; J This is virtual inertia; D The damping coefficient; For virtual mechanical power; The electromagnetic power output by the VSG; Rated angular velocity; This represents the rotor angle.

[0056] S302. Predict the parameters of the xLSTM neural network using the ACO algorithm, and find the network structure that can optimally predict the system control parameters. This includes the following steps: S401. Initialize the ant colony. Each ant represents a set of potential xLSTM network parameters (e.g., weights, biases, etc.). The position vector of each ant represents the initial parameters of the network. The goal of the ants is to explore the parameter space and find the network structure that can optimally predict the control parameters of the system. The input of each ant is the frequency deviation. and frequency change rate The predicted output is virtual inertia. J and damping coefficient D The effectiveness of the predicted output is evaluated using a fitness function, typically by calculating the error due to frequency variation. The goal is to make the system more stable and reduce oscillations. The fitness function is expressed as follows:

[0057] In the formula, ,β and γ The weighting coefficients reflect the importance of each indicator in the optimization; THD represents the total harmonic distortion rate, used to measure power quality. Indicates the first i The current position vector of an ant in the parameter search space is the candidate solution corresponding to that ant.

[0058] S402. Perform a local search based on the position of the optimal ant.

[0059] In ACO (Alternating Current Organic Search), ants influence each other and gradually move closer to the optimal solution. In this process, ants with higher fitness become "information sources," attracting other ants to their location within the search space. The update formula for this process determines how ants perform locally refined searches based on the current optimal solution:

[0060] In the formula, The optimal position for the ant; The random number between [0,1] controls the step size for moving towards the optimal individual, ensuring a detailed search around the optimal solution; Indicates the ant in the th k The position vector in the parameter search space at each iteration essentially represents a set of candidate solutions corresponding to the ant at that time.

[0061] S403. Introduce random individual positions for ants in the ant colony to avoid local optima.

[0062] To avoid getting trapped in local optima, ants also perform global exploration, meaning they have a certain probability of leaving the current solution and randomly choosing a new search location. This mechanism helps the algorithm maintain search diversity and improves its global optimization capabilities, and can be represented as:

[0063] In the formula, The location of a randomly selected ant individual within the population; These are random coefficients.

[0064] S404. Introducing a convergence factor allows the ACO algorithm to gradually transition from global exploration to local development, thereby ensuring that the optimal solution is found.

[0065] As the number of iterations increases, the algorithm gradually converges to a local optimum. The introduction of a convergence factor allows the algorithm to gradually transition from global exploration to local exploration, thus ensuring that the optimal solution is found.

[0066] In the formula, This represents the maximum number of iterations. This represents the current iteration number. Based on this, the comprehensive update formula is:

[0067] As the iterations proceed... As the size decreases, the algorithm gradually shifts from global exploration to local development.

[0068] S303. Train the xLSTM neural network optimized by the output of the ACO algorithm so that the predicted virtual inertia and damping coefficient can minimize system oscillation and frequency deviation.

[0069] The xLSTM neural network controller is:

[0070] In the formula, It is the weight matrix of xLSTM; It is a bias term; It is the input vector; This indicates that the xLSTM neural network controller is at time [time]. t The output vector, i.e., the controller's output vector based on the current input state. x (t) The control quantity obtained by calculation.

[0071] The xLSTM neural network consists of an input layer, multiple LSTM units, hidden layers, and an output layer. In this process, xLSTM uses LSTM units to capture the dynamic features of time series data and leverages the rapid learning capabilities of extreme learning machines to improve training speed. The LSTM units are fed input data... To update the hidden state and capture long-term dependency information, represented as:

[0072] in, It is the hidden state at the current time step; It is an activation function; It is a weight matrix; It is a bias term; This is the input data.

[0073] The core idea of ​​LSTM is to control the flow of information through a gating structure (forget gate, input gate, and output gate). The output of each gate is determined by the current input and the hidden state of the previous time step.

[0074] The forget gate determines which information needs to be discarded, using the following formula:

[0075] In the formula, It is the output of the forget gate; It is the weight matrix of the forget gate; It is the bias term of the forget gate; It is the Sigmoid activation function, and its expression is:

[0076] The input gate controls the input of new information, and the formula is:

[0077] In the formula, It is the output of the input gate; It is the weight matrix of the input gate; It is the bias term of the input gate.

[0078] The candidate layer calculates new candidate memory units using the following formula:

[0079] In the formula, These are candidate memory units, containing new candidate information for the current time step; This is the weight matrix for candidate memory units; The bias term for candidate memory units.

[0080] The output gate determines the current hidden state, using the following formula:

[0081] In the formula, The output of the output gate determines how much information is output at the current time step; This is the weight matrix of the output gate; This is the bias term for the output gate.

[0082] Through the control of the forget gate and the input gate, the state of the memory cells in the LSTM is updated as follows:

[0083] Then, the output gate determines the final hidden state:

[0084] After processing by LSTM, the hidden state at the current time step is obtained. The control parameters are then predicted through the output layer. The parameters are further optimized using the fast training mechanism of the Extreme Learning Machine (ELM). The output layer passes the hidden states of the LSTM to the Extreme Learning Machine to obtain the optimal control parameters. and ,Right now:

[0085] In the formula, and These represent the weights and biases of the output layer, respectively. The goal is to train an xLSTM neural network so that the predicted virtual inertia and damping coefficients minimize system oscillations and frequency deviations, thereby achieving system stability. The performance of the VSG is optimized by minimizing the errors in frequency deviation and rate of change of frequency, as expressed in:

[0086] In the formula, This represents the loss function value during the training process of the xLSTM neural network; N This represents the total number of samples used to calculate the loss function; Indicates time t The corresponding virtual inertia target value; Indicates time t The corresponding target value of the virtual damping coefficient.

[0087] In step S104, the optimal virtual inertia and optimal damping coefficient are applied to the VSG control, specifically including the following steps: S501. Use the ACO algorithm to find the optimal weight and bias values ​​in the xLSTM neural network.

[0088] S502. Input the optimal weight and bias values ​​into the xLSTM neural network. The xLSTM neural network dynamically outputs the virtual inertia and damping coefficient based on the input and the optimal weight and bias values.

[0089] S503: Input the virtual inertia and damping coefficient output by S502 into the dynamic response equation to achieve adaptive closed-loop control of virtual inertia and damping coefficient.

[0090] Based on the methods described in the above embodiments, to improve the stability of the photovoltaic grid-connected system, this method utilizes an adaptive coordinated control strategy of frequency deviation and frequency change rate to achieve real-time dynamic adjustment of the virtual inertia and damping coefficient of the grid-connected photovoltaic system when disturbances occur. This improves the system's dynamic response capability and stability under different disturbances. Simulations are performed, and the effectiveness of the control method is verified through comparative simulations. Figure 5-16 The technical solutions provided in the above embodiments will be further described.

[0091] Figure 5This figure compares the positive-sequence impedance model of the VSG with the results of frequency sweep measurements. To verify the accuracy of the established VSG impedance model, three-phase symmetrical positive and negative-sequence small perturbation voltage signals were injected into the grid side, and the voltage and current responses at the point of common coupling were measured. The equivalent output impedance of the VSG was calculated according to the definition of impedance and plotted on a Bode plot. In the figure, the blue solid line represents the established positive-sequence impedance model of the VSG, and the black circles represent the positive-sequence impedance data points obtained through frequency sweep measurements. The comparison shows that the frequency sweep curve coincides with the theoretical curve, and the impedance measurement results and the established impedance model agree well, proving that the established theoretical model can accurately describe the impedance characteristics of the system and provide a reliable basis for subsequent oscillation suppression strategies.

[0092] Figure 6 The figure shows the grid-connected voltage and current waveforms without the suppression strategy under a 10% disturbance. To further demonstrate the effectiveness of the proposed adaptive suppression strategy in suppressing wideband oscillations under different disturbance intensities, firstly, under conventional VSG control, a 10% disturbance was introduced into the system after a simulation time of 1 second. The system quickly recovered to stability, the grid-connected voltage and current waveforms stabilized, the voltage fluctuation amplitude was less than ±10V, and the current waveform was smooth without continuous oscillation. This indicates that conventional VSG control has a certain robustness under small disturbances.

[0093] Figure 7 and Figure 8 The results of the voltage and current FFT analysis without suppression strategies under a 10% disturbance are shown. FFT analysis was performed on the grid-connected voltage and current. Without suppression strategies, the THD is 3.87%, and the current THD is 0.92%, both within the grid-connected standard and meeting the grid-connected requirements (THD < 5%). Except for the fundamental frequency of 50Hz, the voltage and current oscillation amplitudes at 47.5Hz in the FFT spectrum are 0.49% and 0.96%, respectively, both less than 5%, further demonstrating that the traditional VSG suppression method has good suppression effect under small disturbances.

[0094] Figure 9 The figure shows the grid-connected voltage and current waveforms without suppression strategies under a 20% disturbance. When the disturbance amplitude is increased to 20%, the traditional control strategy exhibits significant instability. The system shows obvious oscillations after 0.2 seconds, with the voltage waveform exhibiting high-frequency oscillations with an amplitude of approximately ±400V, and the current waveform also showing significant distortion. The grid-connected voltage and current waveforms are severely distorted.

[0095] Figure 10 and Figure 11The results of the voltage and current FFT analysis without suppression strategies under a 20% disturbance are shown. FFT analysis was performed on the grid-connected voltage and current. Without suppression strategies, the total harmonic distortion (THD) of the voltage is as high as 61.88%, and the THD of the current is 48.54%, far exceeding the grid connection standard and failing to meet grid connection requirements. Besides the fundamental frequency of 50Hz, the voltage and current oscillation amplitudes at 97.5Hz in the FFT spectrum are 14.17% and 7.33%, respectively, both higher than 5%, indicating that the VSG grid-connected system oscillates at this frequency.

[0096] Figure 12 The figure shows the grid-connected voltage and current waveforms after incorporating the suppression strategy of this invention under a 20% disturbance. Under the same 20% disturbance condition, the system quickly recovers to stability, the grid-connected voltage and current waveforms are stable, the waveform amplitude fluctuation range is controlled within ±5V, the current waveform is smooth, and there is no continuous oscillation. The system exhibits good dynamic response performance.

[0097] Figure 13 and Figure 14 The results of voltage and current FFT analysis with the proposed suppression strategy under a 20% disturbance are shown. FFT analysis of the grid-connected voltage and current shows that the THD of the voltage is reduced to 4.32%, and the THD of the current is 2.67%, both meeting the grid-connected power quality requirements. Except for the fundamental frequency of 50Hz, the voltage and current oscillation amplitudes at 47.5Hz in the FFT spectrum are 1.30% and 2.39%, respectively, indicating that the proposed strategy can effectively suppress broadband oscillations under a 20% disturbance.

[0098] Figure 15 The grid-connected voltage and current waveforms under a 35% disturbance were compared with those of the present invention's suppression strategy. To further verify the robustness of the control strategy, the disturbance intensity was increased to 35%. After the disturbance, the system exhibited continuous oscillations with voltage fluctuations exceeding ±100V and severe distortion of the current waveform. At this point, the adaptive suppression strategy failed under this extreme condition, and the system became unstable.

[0099] Figure 16 and Figure 17 The results show the voltage and current FFT analysis under a 35% disturbance with the suppression strategy of this invention applied. FFT analysis was performed on the grid-connected voltage and current. After adding a 35% disturbance, the total harmonic distortion (THD) of the voltage with the suppression strategy is as high as 93.71%, and the THD of the current is 63.69%, far exceeding the grid connection standard and failing to meet the grid connection requirements. Except for the fundamental frequency of 50Hz, the voltage and current oscillation amplitudes at 122.5Hz in the FFT spectrum are 42.66% and 21.23%, respectively, both higher than 5%, indicating that the adaptive suppression strategy cannot maintain system stability under the extreme condition of a large disturbance of 35%.

[0100] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm to optimize VSG parameters, characterized in that, The method includes: S101. Establish the sequence impedance model of the virtual synchronous generator (VSG) and verify the sequence impedance model by wideband impedance sweep. S102. Analyze the dynamic requirements of virtual inertia and damping coefficient at different stages during the oscillation process of the grid-connected photovoltaic system; S103. Construct a VSG parameter adaptive optimization controller based on the ACO_xLSTM algorithm, and calculate and output the optimal virtual inertia and optimal damping coefficient in real time. S104. Apply the optimal virtual inertia and optimal damping coefficient to VSG control, and implement a wideband oscillation suppression strategy according to the system disturbance.

2. The method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm for optimizing VSG parameters, as described in claim 1, is characterized in that... In step S101, a mathematical model of positive and negative sequence impedance of VSG is established considering frequency coupling effect. By injecting a series of small-amplitude voltage disturbance signals at the power grid common coupling point, the voltage and current response is measured and the wideband impedance is calculated. The frequency sweep test results are obtained and compared with the theoretical model to verify the accuracy of the sequence impedance model.

3. The method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm for optimizing VSG parameters, as described in claim 2, is characterized in that... Measuring voltage and current response and calculating wideband impedance, specifically including: An impedance measuring device is connected in series between the power electronic device under test (PED) and the power grid. First, the voltage and current at the input terminal of the PED are detected when no disturbance is applied. Then, a disturbance voltage is injected into the PED to induce a current response. Next, the voltage change and current response caused by the disturbance are measured at the input interface of the PED and the difference is calculated with the voltage and current when no disturbance is applied. Based on the voltage difference and current difference at the disturbance frequency, the impedance at the corresponding frequency is calculated.

4. The method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm for optimizing VSG parameters, as described in claim 1, is characterized in that... The specific implementation process of S102 includes: S201. Analyze the grid-connected active power characteristics of VSG and clarify the influence of virtual inertia and damping coefficient on the dynamic characteristics of grid-connected photovoltaic system. S202. Divide the oscillation waveform of the system in one cycle into four regions. Combine the deviation of angular frequency, rate of change and amplitude change in each stage to determine the dynamic requirements of virtual inertia and damping coefficient in different stages of the system oscillation process.

5. The method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm for optimizing VSG parameters, as described in claim 1, is characterized in that... In step S103, the construction of the VSG parameter adaptive optimization controller based on the ACO_xLSTM algorithm specifically includes the following steps: S301. Establish the dynamic response equations for the virtual inertia and damping coefficient of the VSG, as the target basis for the adaptive optimization of VSG parameters. S302. Predict the parameters of the xLSTM neural network using the ACO algorithm, and find the network structure that can best predict the system control parameters. S303. Train the xLSTM neural network optimized by the output of the ACO algorithm so that the predicted virtual inertia and damping coefficient can minimize system oscillation and frequency deviation.

6. The method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm for optimizing VSG parameters, as described in claim 5, is characterized in that... S302 specifically includes the following steps: S401. Initialize the ant colony. Each ant represents a set of potential xLSTM network parameters. The position vector of each ant represents the initial parameters of the network. The goal of the ants is to find the network structure that can optimally predict the control parameters of the system by exploring the parameter space. The input of each ant is the frequency deviation and the rate of change of frequency. The predicted output is the virtual inertia and the damping coefficient. The effectiveness of the predicted output is evaluated by the fitness function. S402. Perform a local search based on the position of the optimal ant; S403. Introduce random individual positions for ants in the ant colony to avoid local optima; S404. Introducing a convergence factor allows the ACO algorithm to gradually transition from global exploration to local development, thereby ensuring that the optimal solution is found.

7. A method for suppressing broadband oscillations in grid-connected photovoltaic systems based on the ACO_xLSTM algorithm for optimizing VSG parameters, as described in claim 5, is characterized in that... In step S104, the optimal virtual inertia and optimal damping coefficient are applied to the VSG control, specifically including the following steps: S501. Use the ACO algorithm to find the optimal weight and bias values ​​in the xLSTM neural network; S502. Input the optimal weight values ​​and bias values ​​into the xLSTM neural network. The xLSTM neural network dynamically outputs the virtual inertia and damping coefficient based on the input and the optimal weight and bias values. S503: Input the virtual inertia and damping coefficient output by S502 into the dynamic response equation to achieve adaptive closed-loop control of virtual inertia and damping coefficient.