Optical storage grid-connected system VSG control method and system based on artificial neural network

By using a VSG control strategy based on RBF neural network to adjust virtual inertia and damping parameters in real time, a photovoltaic-storage hybrid microgrid topology is constructed. This solves the frequency stability problem of the virtual synchronous machine control strategy in low inertia and fluctuation scenarios, achieving faster response speed and smaller fluctuation range, and enhancing the stability and adaptability of the system.

CN120855441APending Publication Date: 2025-10-28SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510722760.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing virtual synchronous machine control strategies are unable to dynamically match the power output of new energy sources and the support needs of energy storage when dealing with the low inertia and strong fluctuation characteristics of microgrids. This results in lag in frequency response, increased frequency overshoot, and aggravated DC bus voltage fluctuations. Furthermore, the lack of cross-scale coordinated control makes it difficult to smooth out power fluctuations.

Method used

A VSG control strategy based on radial basis function (RBF) neural network is adopted. Through adaptive capability, virtual inertia and damping parameters are dynamically optimized to construct a photovoltaic-storage hybrid microgrid topology. Virtual regulation parameters are adjusted in real time. Combined with two-stage energy storage device and multi-timescale energy compensation, the system stability and response performance are optimized.

Benefits of technology

It effectively reduces overshoot and fluctuation range in the frequency response process, improves the dynamic response speed and stability of the system, enhances the adaptability and stability to the dynamic operating conditions of the power grid, and achieves cross-dimensional improvement in frequency stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120855441A_ABST
    Figure CN120855441A_ABST
Patent Text Reader

Abstract

The invention discloses an optical storage grid-connected system VSG control method and system based on an artificial neural network, and relates to the technical field of virtual synchronous generator control, and the method comprises the steps: constructing an optical storage hybrid grid-connected system model, and obtaining the active power and reactive power of a grid-connected coupling point in the model in real time; calculating a reference voltage amplitude, a phase angle, a real-time angular frequency and an angular frequency change rate according to the acquired data; on the basis of the RBF neural network, the real-time angular frequency deviation value and the angular frequency change rate serve as input, an error result is calculated through a performance evaluation function, then a gradient descent method is adopted to be combined with the error result to adjust the weight of a hidden layer in the neural network in real time, and current virtual adjustment parameters are output on the basis of the RBF neural network with the updated weight; and adjusting the frequency and voltage of the optical storage hybrid grid-connected system according to the virtual adjustment parameters output by the RBF neural network in combination with PWM modulation to complete VSG control of the system. The dynamic response performance of the system can be optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtual synchronous generator control technology, and in particular to a VSG control method and system for a photovoltaic-storage grid-connected system based on artificial neural networks. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] With the increasing proportion of renewable energy, the power system is accelerating its transformation towards power electronics. However, the addition of power electronic devices significantly reduces system inertia, leading to prominent stability risks, which has become a major obstacle to the development of new power systems. To address this, it is necessary to establish a collaborative operation system for new energy sources and energy storage, and develop active support technologies that simulate the characteristics of synchronous machines to maintain grid stability through virtual inertia compensation. Existing virtual synchronous machine control strategies still face multi-dimensional technical challenges when dealing with the low inertia and strong fluctuation characteristics of microgrids, especially in dynamic parameter matching and energy storage support efficiency in multi-source collaborative scenarios, including:

[0004] (1) Challenges in matching reduced system inertia with dynamic parameters. After new energy sources replace traditional synchronous generators, the system inertia decreases, leading to a deterioration in frequency response characteristics. When power surges, the system lacks sufficient inertial buffer, resulting in steep frequency changes and increased overshoot (e.g., when new energy output fluctuates or load surges). Traditional virtual synchronous generators (VSGs) rely on fixed inertia parameters, which cannot be adjusted in real time. This makes it difficult to dynamically match the randomness of new energy output and the demands of low-inertia scenarios, resulting in frequency response lag and frequency overshoot. The overshoot cannot be effectively suppressed, and insufficient inertia causes power fluctuations to be directly transmitted to the DC bus, exacerbating DC bus voltage fluctuations and impairing voltage stability.

[0005] (2) Insufficient energy storage support efficiency and prolonged regulation time. Low inertia systems place higher demands on the dynamic response capability of energy storage. Existing energy storage strategies mostly adopt energy compensation on a single time scale (such as second-level inertia support), lacking a coordinated design for minute-level energy smoothing, resulting in low utilization of energy storage resources. When new energy sources change abruptly, if energy storage relies solely on fixed modes to provide short-term support, the insufficient energy storage response speed leads to frequency recovery delays and makes it difficult to smooth out continuous power fluctuations, which will prolong the frequency regulation time and weaken voltage stability.

[0006] (3) Multi-timescale coupling conflicts and expanded fluctuation range. The randomness of new energy sources combined with low inertia characteristics exacerbates the contradiction between inertial support and the goals of primary and secondary frequency regulation. Traditional VSG control often lacks cross-scale coordinated control, making it difficult to balance short-term inertial response and long-term energy compensation, resulting in an expanded frequency fluctuation range. For example, if the power difference caused by new energy fluctuations is not effectively mitigated through multi-timescale linkage compensation, the risk of grid-side impact will increase significantly.

[0007] In other words, the existing virtual synchronous machine (VSG) control algorithm has a theoretical and practical gap at the dynamic interaction level of "source-storage-grid". There is an urgent need to build a composite control architecture that integrates adaptive inertia adjustment, dynamic energy storage support and multi-time scale energy compensation in order to achieve a cross-dimensional improvement in the frequency stability of highly elastic microgrids. Summary of the Invention

[0008] To address the shortcomings of existing technologies, this invention provides a VSG control method and system for a photovoltaic-storage grid-connected system based on artificial neural networks. It designs a photovoltaic-storage hybrid microgrid topology based on a virtual synchronous generator (VSG) control strategy, employs a two-stage energy storage dynamic support structure and multi-timescale energy compensation to improve system stability and reliability. The VSG control strategy, based on radial basis function (RBF) neural networks, leverages its adaptive capabilities to collaboratively and dynamically optimize the system's virtual inertia and damping parameters, effectively enhancing the stability and robustness of the photovoltaic-storage microgrid, reducing overshoot, settling time, and fluctuation range during power and frequency response, and optimizing the system's dynamic response performance.

[0009] In a first aspect, the present invention provides a VSG control method for a photovoltaic-storage grid-connected system based on an artificial neural network.

[0010] A VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks includes:

[0011] Construct a model of a photovoltaic-storage hybrid grid-connected system and obtain the active and reactive power of the grid-connected coupling points in the model in real time;

[0012] Based on the real-time acquired data, calculate the reference voltage amplitude, phase angle, real-time angular frequency, and rate of change of angular frequency;

[0013] Based on the RBF neural network, the real-time angular frequency deviation and angular frequency change rate are used as inputs. The error results are calculated by the performance evaluation function. Then, the gradient descent method is used to adjust the weights of the hidden layers in the neural network in real time based on the error results. Based on the RBF neural network with updated weights, the current virtual adjustment parameters are output.

[0014] Based on the virtual adjustment parameters output by the RBF neural network, combined with PWM modulation, the frequency and voltage of the photovoltaic-storage hybrid grid-connected system are adjusted to complete the VSG control of the system.

[0015] A further technical solution is that the photovoltaic-storage hybrid grid-connected system model includes a photovoltaic array, an energy storage device containing supercapacitors and batteries, a Boost converter connected to a DC bus, a bidirectional DC / DC converter, and a DC / AC inverter.

[0016] The photovoltaic array is connected to the Boost converter, and then integrated with the energy storage device through a two-stage bidirectional DC / DC converter. It is then connected to the grid via a grid-side DC / AC inverter, with the photovoltaic array and the energy storage device sharing a DC bus.

[0017] A further technical solution employs a neural network algorithm to adjust the virtual adjustment parameters of the virtual synchronizer VSG in real time, including:

[0018] Construct an RBF neural network based on an input layer, hidden layer, and output layer;

[0019] Based on the RBF neural network, the two state variables, the angular frequency deviation and the rate of change of angular frequency, which are obtained in real time in the grid-connected system, are used as the input of the neural network, and the output is virtual adjustment parameters, namely, the output of virtual moment of inertia J and damping coefficient D.

[0020] The input to the hidden layer is processed by a Gaussian function and then output. The output of the hidden layer is then weighted and input to the output layer, which outputs the virtual moment of inertia J and the damping coefficient D.

[0021] A further technical solution is to use the mean square error function of the angular frequency in the system as the performance evaluation function of the neural network, and calculate the error result, i.e. the performance evaluation index, based on the real-time acquired angular frequency.

[0022] The gradient descent method combined with a performance evaluation function is used to adjust the weights of the hidden layer in real time. An inertial element is also introduced to accelerate the algorithm's convergence rate. The weight adjustment formula is expressed as:

[0023]

[0024] in, η and α represent the learning rate and inertia coefficient, respectively; ω0 represents the synchronous angular frequency, i.e., the reference angular frequency; ω represents the angular frequency of the generator rotor. The weights are the weights of the RBF neural network, and the parameter l is the label used to distinguish the output layer nodes, that is, to distinguish the output of virtual inertia J and damping coefficient D.

[0025] Further technical solutions, simplifying the weight adjustment formula, include:

[0026] Based on the weight adjustment formula, the current update amount is adjusted by adjusting the direction of the historical gradient;

[0027] The adjustment of the historical gradient direction is transformed into measuring the relative change of angular frequency and virtual moment of inertia, and a sign function is used to approximate the gradient direction of this relative change, resulting in a simplified weight adjustment method:

[0028]

[0029] Where η and α represent the learning rate and the inertia coefficient, respectively. This represents the relative change in angular frequency ω(k) and virtual moment of inertia J(k), where sign() is the sign function. Let f represent the weights of the RBF neural network, and let f() represent the output function of the RBF neural network. This is the output function of the hidden layer.

[0030] A further technical solution, based on a simplified weight adjustment method, adjusts the step size by adjusting the learning speed η to balance accuracy and real-time performance.

[0031] Secondly, the present invention provides a VSG control system for a photovoltaic-storage grid-connected system based on an artificial neural network.

[0032] A VSG control system for a photovoltaic-storage grid-connected system based on artificial neural networks includes:

[0033] The model building and data acquisition module is used to build a model of a photovoltaic-storage hybrid grid-connected system and acquire the active and reactive power of the grid-connected coupling points in the model in real time.

[0034] The data processing module is used to calculate the reference voltage amplitude, phase angle, real-time angular frequency, and rate of change of angular frequency based on the real-time acquired data.

[0035] The virtual adjustment parameter acquisition module is used to calculate the error result based on the RBF neural network, taking the real-time angular frequency deviation value and angular frequency change rate as input, and then using the gradient descent method to adjust the weights of the hidden layer in the neural network in real time based on the error result. Based on the RBF neural network with updated weights, the module outputs the current virtual adjustment parameter.

[0036] The control module is used to adjust the frequency and voltage of the photovoltaic-storage hybrid grid-connected system based on the virtual adjustment parameters output by the RBF neural network and in combination with PWM modulation, thereby completing the VSG control of the system.

[0037] Thirdly, the present invention also provides an electronic device, comprising: a memory for storing executable instructions; and a processor for implementing the above-described VSG control method for a photovoltaic-storage grid-connected system based on an artificial neural network when executing the executable instructions stored in the memory.

[0038] Fourthly, the present invention also provides a computer-readable storage medium storing executable instructions for causing a processor to execute the executable instructions to implement the above-described VSG control method for a photovoltaic-storage grid-connected system based on an artificial neural network.

[0039] Fifthly, the present invention also provides a computer program product comprising executable instructions stored in a computer-readable storage medium; wherein, when the processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, it implements the above-mentioned VSG control method for a photovoltaic-storage grid-connected system based on an artificial neural network.

[0040] The above one or more technical solutions have the following beneficial effects:

[0041] 1. This invention provides a VSG control method and system for a photovoltaic-storage grid-connected system based on artificial neural networks. It designs a photovoltaic-storage hybrid microgrid topology based on a virtual synchronous generator (VSG) control strategy and employs a VSG control strategy based on radial basis function (RBF) neural networks. Through its adaptive capability, the system's virtual inertia and damping parameters are dynamically optimized. This control method eliminates the need for manually designed nonlinear transformations and can automatically adapt and adjust parameters. This method overcomes the shortcomings of traditional virtual synchronous generators, which only adaptively adjust the rotational inertia J while neglecting adaptive control of the damping coefficient D. It not only effectively reduces power and suppresses overshoot during frequency response but also significantly improves response speed, reduces adjustment time and fluctuation range. Ultimately, it achieves synergistic optimization of the microgrid system's disturbance rejection capability and dynamic stability, effectively enhancing the stability and robustness of the photovoltaic-storage microgrid.

[0042] 2. The method proposed in this invention designs a photovoltaic-storage hybrid microgrid topology based on a virtual synchronous generator (VSG) control strategy. Under high photovoltaic penetration, the introduced hybrid energy storage unit can actively participate in grid-side frequency regulation and power support, and can smooth the power difference between photovoltaic and grid sides. Through bidirectional energy flow, it smooths power fluctuations, ensuring the stability of DC bus voltage and enabling energy storage and photovoltaic output to form a complementary relationship. This collaborative mechanism provides bidirectional support capability for grid-side inverters to actively respond to grid power / frequency fluctuations, enhancing the system's adaptability and stability to dynamic grid conditions.

[0043] 3. The adaptive virtual synchronous machine control method based on radial basis function neural network (RBF-NN) proposed in this invention can be used to improve the dynamic performance of photovoltaic hybrid energy storage virtual synchronous generator (VSG) microgrids. It constructs a collaborative adjustment mechanism for virtual inertia and damping coefficient, utilizing the powerful nonlinear fitting capability of RBF-NN to optimize the electromechanical transient characteristics of the VSG in real time. Specifically, it selects the RBF-NN architecture, which has a simple algorithm structure and high learning efficiency, to dynamically adjust the key parameters of the VSG rotor motion equation online. On the one hand, it achieves adaptive parameter matching through the nonlinear mapping of the rotor motion equation by the neural network; on the other hand, it establishes a dynamic coupling relationship between the virtual inertia and damping parameters by leveraging the fast convergence characteristic of RBF-NN. Compared with traditional fixed-parameter virtual synchronous machine strategies, this control strategy, through real-time automatic adjustment of virtual inertia and damping coefficient during transient processes, simultaneously improves the response speed and stability when the system is disturbed. This not only improves the dynamic quality of frequency tracking but also effectively suppresses transient overshoot, ultimately achieving synergistic optimization of the microgrid system's disturbance rejection capability and dynamic stability.

[0044] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0045] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0046] Figure 1 This is an overall flowchart of the VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks, as described in an embodiment of the present invention.

[0047] Figure 2 This is a topology diagram of a photovoltaic hybrid energy storage microgrid in an embodiment of the present invention;

[0048] Figure 3 This is a block diagram of the adaptive control based on the RBF neural network in an embodiment of the present invention;

[0049] Figure 4 This is a schematic diagram of the RBF neural network structure in an embodiment of the present invention;

[0050] Figure 5 This is a flowchart of the RBF neural network parameter update process in an embodiment of the present invention;

[0051] Figure 6 This is a block diagram of the voltage and current dual closed-loop control in an embodiment of the present invention;

[0052] Figure 7 This is a comparison chart of frequency fluctuation effects in an embodiment of the present invention. Detailed Implementation

[0053] It should be noted that the following detailed descriptions are exemplary and are intended only to describe specific embodiments and to provide further explanation of the invention, and are not intended to limit the scope of exemplary embodiments of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0054] Example 1

[0055] This embodiment provides a VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks, such as... Figure 1 As shown, it includes the following steps:

[0056] Step S1: Construct a model of a photovoltaic-storage hybrid grid-connected system and obtain the active and reactive power of the grid-connected coupling points in the model in real time.

[0057] Specifically, to mitigate the impact of photovoltaic power fluctuations and grid disturbances on photovoltaic-storage microgrid systems, such as... Figure 2 As shown, a photovoltaic-storage hybrid grid-connected system model is first constructed, consisting of a photovoltaic array, an energy storage device, a Boost converter connected to the DC bus, a bidirectional DC / DC converter, a DC / AC inverter, and a grid-connected interface. The photovoltaic array is connected to the Boost converter and then integrated with the energy storage device via a two-stage bidirectional DC / DC converter. This energy storage device is a combination of a supercapacitor and a battery, and is then connected to the grid via a grid-side DC / AC inverter. The system employs incremental conductance method for maximum power point tracking control of the photovoltaic array to ensure efficient power generation. Simultaneously, the photovoltaic and energy storage devices form a unified DC section through a shared DC bus structure, with the goal of maintaining a constant bus voltage.

[0058] With the above settings, compared to the existing technology that treats the DC side as an ideal constant voltage power supply, this embodiment fully considers the access of new energy sources and the coordination between new energy sources and DC side energy storage systems, integrates VSG technology into the photovoltaic hybrid energy storage microgrid system, and fully considers the impact on the DC side and effectively solves it according to the microgrid topology.

[0059] Regarding dynamic support for energy storage, compared to the traditional single-stage structure which suffers from limited input voltage range, susceptibility to interference due to the coupling between MPPT and inverter control, and instability risks due to over-reliance on a single control element for power quality, this embodiment adopts a two-stage structure: the front-stage DC-DC converter can focus on achieving a function similar to Maximum Power Point Tracking (MPPT) in photovoltaic systems, dynamically optimizing input power to maximize efficiency, while the rear-stage inverter focuses on grid connection or load requirements, ensuring grid stability. Compared to the coupled control of a single-stage structure, the two stages have clear division of labor, effectively improving overall efficiency. Furthermore, the front-stage DC-DC converter can be designed with multiple inputs to be compatible with various DC power sources, including photovoltaic, battery, and fuel cell power supplies, greatly enhancing its compatibility. In addition, the two-stage structure employs a two-stage independent filtering design, effectively suppressing high-frequency noise and electromagnetic interference (EMI) in stages. This avoids the problems of traditional single-stage structures relying on a single filtering element, which are prone to exceeding EMI limits due to parameter mismatch and other issues, affecting system stability and reliability.

[0060] Furthermore, in this embodiment, the energy storage unit is composed of a supercapacitor and a battery. The supercapacitor handles high-frequency power fluctuations (on the order of seconds to minutes), while the battery provides low-frequency power support (on the order of hours). Together, they mitigate the power difference between the grid side and the energy storage side at different time scales. Compared to existing technologies, this approach can more accurately address different types of power fluctuations. The supercapacitor, with its high power density, responds quickly to high-frequency power changes, while the battery, with its high energy density, ensures stable support for low-frequency power, resulting in superior power difference mitigation. Additionally, the energy management within the energy storage unit is optimized, allowing the supercapacitor and battery to function at their respective preferred time scales, improving the overall performance of the energy storage system and extending the lifespan of the energy storage equipment. Compared to the traditional approach of using a single energy storage device to handle all power fluctuations, this method is more scientific, rational, and advantageous.

[0061] In this embodiment, the aforementioned energy storage device can adjust the dynamic difference between photovoltaic output and grid-side power demand in real time. By smoothing power fluctuations through bidirectional energy flow, it not only ensures the stability of DC bus voltage but also enables energy storage and photovoltaic output to form a complementary relationship. This collaborative mechanism provides bidirectional support for the grid-side inverter to actively respond to grid power / frequency fluctuations, enhancing the system's adaptability and stability to dynamic grid conditions.

[0062] Furthermore, based on the aforementioned constructed photovoltaic-storage hybrid grid-connected system model, the active power P at the grid-connected coupling point in the model is acquired in real time. e and reactive power Q out (or denoted as Q) e This is to facilitate subsequent calculations.

[0063] Step S2: Calculate the reference voltage amplitude, phase angle, real-time angular frequency, and angular frequency change rate based on the real-time acquired data.

[0064] like Figure 3 As shown, based on the real-time acquired active power P e and reactive power Q out By combining active frequency and reactive voltage control, the mechanical power P is calculated. m The reference voltage amplitude E and phase angle θ are used to calculate the angular frequency ω and the rate of change of angular frequency dω / dt.

[0065] Specifically, real-time acquisition of active power P e and reactive power Q e Based on the active power-frequency droop characteristic equation, the deviation Δω between the current angular frequency ω and the synchronous angular frequency ω0 is substituted into the equation, combined with the active power reference value P. ref and proportionality coefficient K p The mechanical power P was calculated. m The active-frequency droop characteristic equation is as follows:

[0066] P m =P ref -K p (ω-ω0) (1)

[0067] Secondly, based on the virtual excitation control equation, the reactive power reference value Q is... ref With actual reactive power Q out The deviation, and the voltage reference value U ref Substituting the deviation from the actual voltage U, and combining it with the integral gain coefficient K... v and proportionality coefficient k q The reference voltage amplitude E is calculated. The virtual excitation control equation is:

[0068]

[0069] Next, the calculated mechanical power P m and electromagnetic power P e Substituting into the swing equation, and combining the inertial constant J, damping coefficient D, and synchronous angular frequency ω0, the angular frequency ω and its rate of change dω / dt are obtained. The swing equation is:

[0070] Finally, the deviation Δω between the angular frequency and the synchronous angular frequency is integrated to obtain the phase angle θ.

[0071]

[0072] In the above formula, P m P represents mechanical power, the power supplied to the generator rotor by the prime mover;e ω represents the electromagnetic power, the electromagnetic power output by the generator to the power grid; J represents the inertia constant of the generator rotor, reflecting the magnitude of the rotor's rotational inertia; ω represents the angular frequency of the generator rotor; D represents the damping coefficient, indicating the magnitude of the damping torque in the system; ω0 represents the synchronous angular frequency, i.e., the reference angular frequency, which the generator should synchronize with during normal grid operation; θ represents the phase angle of the rotor relative to the synchronous rotation; P ref This represents the active power reference value, which is the given expected active power; K p The proportional gain of the virtual speed governor is used to adjust mechanical power to maintain a stable angular frequency; E represents the reference voltage amplitude; E0 represents the initial reference voltage amplitude; K v Q represents the integral coefficient of the virtual excitation control; ref This represents the reactive power reference value, which is the given expected reactive power; Q represents the actual output reactive power; k q The proportional gain represents the voltage regulation coefficient, used to adjust the reference voltage amplitude to maintain voltage stability; U ref The voltage reference value represents the desired voltage amplitude; U represents the actual voltage amplitude.

[0073] Step S3: Based on the RBF neural network, the real-time angular frequency deviation and angular frequency change rate are used as inputs. The error result is calculated by the performance evaluation function. Then, the gradient descent method is used to adjust the weights of the hidden layers in the neural network in real time in combination with the error result. Based on the RBF neural network with updated weights, the current virtual adjustment parameters are output.

[0074] Specifically, to ensure a stable power output to the external power grid during photovoltaic-storage grid connection and to actively participate in grid-side primary frequency regulation and power adjustment, a virtual synchronous generator (VSG) control strategy is implemented for the established photovoltaic-storage hybrid microgrid model. Addressing the power fluctuations and frequency shifts caused by grid-side load changes—specifically, the power-frequency fluctuations encountered during grid-side power and frequency regulation—and considering the technical bottleneck of traditional virtual synchronous generators' inability to dynamically adapt operating parameters under grid power / frequency disturbances, this embodiment proposes using an artificial neural network algorithm to adjust the inertia and damping coefficients of the virtual synchronous generator in real time. Specifically, a radial basis function (RBF) neural network is used to construct a collaborative control strategy. This RBF-NN improves the traditional virtual synchronous generator control, enabling the inertia and damping parameters to be adaptively adjusted online based on real-time changes in the electrical angular frequency.

[0075] Furthermore, based on the photovoltaic-storage hybrid VSG inverter microgrid system built in step S1, the overall control objective is to reduce overshoot, settling time, and fluctuation range during power and frequency response, and optimize the dynamic response performance of the system's power / frequency. To this end, this embodiment constructs an RBF neural network based on an input layer, a hidden layer, and an output layer. The state variables (i.e., electrical angular velocity deviation Δω and angular frequency change rate dω / dt) collected in real-time within the microgrid system are used as the input to the neural network, and the two output nodes correspond to virtual adjustment parameters (i.e., virtual moment of inertia J and damping coefficient D).

[0076] like Figure 4 The diagram shows the input-output structure of the constructed RBF neural network. j, i, and l represent the number of nodes in the input layer, hidden layer, and output layer, respectively. To cover the input space while maintaining high computational efficiency and good generalization ability, the hidden layer is set to have 5 hidden neurons, employing a 2-5-2 topology RBF neural network model (2 input layer nodes - 5 hidden layer nodes - 2 output layer nodes). Based on the real-time operating status of the power grid, the virtual inertia and damping coefficient are dynamically optimized online to achieve coordinated adaptive adjustment of key control parameters. Preferably, considering that the rotational inertia of the decision output cannot be negative, a sigmoid activation function is added to the output layer for constraint.

[0077] Furthermore, for ease of distinction, the variables in the formula are represented by superscripts (1), (2), and (3) to denote the input layer, hidden layer, and output layer of the RBF neural network, respectively. The input variables of the neural network are the angular frequency deviation Δω and the rate of change of angular frequency dω / dt. The output of the input layer can be expressed as:

[0078]

[0079] In the above formula, x1=ω-ω0=Δω, x2=dω / dt, This is the output function of the input layer, and the parameter j is the label used to distinguish the input layer nodes.

[0080] The input to the hidden layer is:

[0081]

[0082] In the above formula, This is the input function for the neural network.

[0083] The output of the hidden layer is:

[0084]

[0085] In the above formula, This is the output function of the hidden layer, where the parameter i is a label used to distinguish the hidden layer nodes.

[0086] The hidden layer function g(x) uses a Gaussian function, and is:

[0087]

[0088] In the above formula, b i Let c be the width vector of the Gaussian function. i Let be the center vector of the i-th hidden layer neuron, and exp() denote the natural exponential function.

[0089] The input to the hidden layer is processed by a Gaussian function and then output. The output of the hidden layer is then weighted and input to the output layer, which outputs the virtual moment of inertia J and the damping coefficient D. The weights can be expressed as follows:

[0090]

[0091] In the above formula, The weights are the weights of the RBF neural network, and the parameter l is the label used to distinguish the output layer nodes, that is, to distinguish the output of virtual inertia J and damping coefficient D.

[0092] The outputs of the output layer are the virtual inertia J and the damping coefficient D, respectively, expressed as:

[0093]

[0094] The output function of the RBF neural network is:

[0095]

[0096] In the above formula, u1 and u2 are the upper limits of the moment of inertia and the damping coefficient, respectively.

[0097] Furthermore, such as Figure 5 As shown, the mean square error function of the angular frequency in the system is used as the performance evaluation function of the neural network. Based on the real-time acquired angular frequency, the performance of the network-side frequency tracking is quantitatively evaluated by using the mean square error of the real-time electrical angular frequency in the system as the performance index (i.e., the error result). The performance evaluation function of this neural network is as follows:

[0098]

[0099] Subsequently, gradient descent and a performance evaluation function are used to adjust the weights in the hidden layer in real time. An inertial element is also introduced to accelerate the algorithm's convergence rate. The weight adjustment formula is expressed as:

[0100]

[0101] In the above formula, η and α represent the learning rate and the inertia coefficient, respectively.

[0102] As one implementation method, considering that the goal during neural network training is to find the weight combination that minimizes the loss function, the gradient of the loss function is considered when the weights approach a local minimum. This value will become very small, even close to zero. At this point, the step size of the traditional gradient descent with no momentum term will decrease drastically, causing training to stagnate and the weights to be unable to escape local minima. Therefore, in this embodiment, the weight adjustment formula is designed as follows: This is for updating the current gradient direction, i.e., basic gradient descent. To calculate the weighted accumulation of historical update directions, i.e., the momentum term, set a momentum term. By accumulating historical update directions, "inertia" is provided for weight updates. Even if the current gradient is small, such as near a local minimum, the momentum term retains the "inertia" of previous updates, continuing to push the weights towards a better direction, thus avoiding getting trapped in a local minimum. Specifically, based on the weight adjustment formula, the current update amount is adjusted by adjusting the historical gradient direction to avoid getting trapped in a local minimum. This gradient direction can be expressed as:

[0103]

[0104] In the aforementioned weight update process, the adjustment of the historical gradient direction is difficult to calculate. Therefore, based on the finite difference method in numerical differentiation, the difference at discrete time points is used to approximate the continuous partial derivatives, thereby simplifying the calculation process. This can then be converted into the relative change of the measured angular frequency ω(k) and the virtual moment of inertia J(k), expressed as:

[0105]

[0106] The above conversion method can further simplify the calculation. Although it will introduce some error, through multiple iterations of optimization by the neural network, the parameters will be adjusted in each iteration, so that the overall system tends to the correct solution, and the error will gradually decrease.

[0107] Furthermore, since directional adjustment takes precedence over precise numerical adjustment, the key in the weight update process is to determine the direction of weight adjustment rather than precisely calculate the magnitude of the adjustment. Therefore, it is sufficient to determine whether the weights should be increased or decreased simply by clarifying whether the gradient direction is positive or negative. This is because regardless of the magnitude of the gradient, the parameters only need to be adjusted in the opposite direction of the gradient according to the preset learning rate η. The introduction of the learning rate η essentially decouples the gradient direction from the step size of the parameter update. The direction is determined by the gradient sign, while the step size is controlled by the learning rate η. Moreover, in multiple iterations, by continuously adjusting the weights, the system can gradually approach the optimal solution. Even if the value of each adjustment is not precise, as long as the adjustment direction is correct, the system can gradually converge to the optimal direction after multiple iterations. Therefore, in this step, it is only necessary to determine whether the sign of equation (11) is positive or negative. That is, because gradient calculation is complex, a sign function is used to approximate the direction of the relatively changing gradient to simplify the calculation, which can be expressed as:

[0108]

[0109] By using the above method that only requires determining the sign, the computational complexity can be greatly reduced, the calculation process can be simplified, the computational efficiency can be improved, and the numerical calculation errors that may be introduced by directly calculating the gradient can be avoided, thus improving the accuracy of the adjustment.

[0110] This leads to the simplified weight adjustment method, which is:

[0111]

[0112] The aforementioned sign function retains only the gradient direction (i.e., positive or negative). The step size is controlled by adjusting the learning rate η, sacrificing some accuracy to improve real-time performance, thus balancing accuracy and real-time performance. Specifically, appropriately increasing η significantly increases the weight adjustment amplitude Δw, accelerating the network's search speed in the parameter space, reducing the required number of iterations, and consequently shortening the training time. Although accuracy decreases somewhat, the system's real-time response capability is improved, and the iteration speed is accelerated, thereby compensating for the insufficient accuracy in a single computation.

[0113] In summary, the 2-5-2 structured RBF neural network constructed using the above formula achieves efficient coverage of the input space through a Gaussian function and employs gradient descent and sign function optimization mechanisms for weight updates. Based on real-time acquired electrical angular velocity ω and its rate of change of angular frequency dω / dt, the network dynamically adjusts its weight parameters, ultimately outputting virtual inertia J and damping coefficient D. This enables real-time adjustment of the dynamic response of the virtual synchronous machine strategy, completing the adaptive dynamic matching process of system inertia and damping characteristics.

[0114] Based on the above RBF neural network setup, the VSG controller transmits the acquired angular frequency deviation Δω and angular frequency change rate dω / dt to the RBF neural network. The RBF network calculates the error result by substituting the current input ω and dω / dt into the evaluation function, and adjusts the weights in the hidden layer. Then, it calculates the moment of inertia and damping coefficient at this time.

[0115] Step S4: Based on the virtual adjustment parameters output by the RBF neural network and combined with PWM modulation, adjust the frequency and voltage of the photovoltaic-storage hybrid grid-connected system to complete the VSG control of the system.

[0116] In this embodiment, the adjusted moment of inertia and damping coefficient are reapplied to the VSG controller. The updated controller sends the frequency signal at this moment into the integrator to obtain the phase angle θ. Finally, according to the above formulas (1) to (3), the voltage amplitude E and phase angle θ are calculated and output to generate a reference voltage. The voltage and current control loop generates a modulation signal, which is then sent to the PWM signal generator to generate a pulse signal to control the DC-AC converter, thereby completing the VSG control of the system.

[0117] Specifically, the output voltage E of the virtual synchronous generator power loop is the converter bridge arm midpoint voltage reference value u. A voltage and current control loop is added after the power control loop, and the terminal voltage reference value u is calculated using the output voltage reference value u of the virtual synchronous generator power loop. c The terminal voltage is controlled in a closed loop to generate a current reference value, and then the terminal voltage modulation signal u is generated through the converter-side output current control loop. m Based on the stator electrical equations of a synchronous generator, the filter capacitor C is neglected. f The purpose of this is to establish the relationship between the midpoint voltage of the bridge arm, the terminal voltage, and the inductor current on the converter side, as shown in the following formula:

[0118]

[0119] In the above formula, u cabc The terminal voltage in the abc coordinate system; i abc The converter-side output current in the abc coordinate system; u abc L represents the bridge arm voltage in the abc coordinate system. f For filter inductance; R f It is the sum of the internal resistance of the filter inductor and the internal resistance of the power device. The subscript "abc" indicates the component in the abc coordinate system.

[0120] The above equation is decomposed using terminal voltage vector orientation, and the voltage-current relationship in the dq coordinate system is shown below:

[0121]

[0122] In the above formula, i 1d i 1q The converter-side output current in the dq coordinate system; u d ,u q The dq-axis components of the bridge arm voltage are obtained by dq decomposition using terminal voltage vector orientation; u cd ,u cq Y is the dq-axis component of the terminal voltage; Y is the impedance matrix; X is the impedance matrix. f X is the inductive reactance of the filter circuit. f =ωL f .

[0123] The phase angle θ mentioned above represents the phase angle difference between the voltage vector at the midpoint of the bridge arm and the voltage vector at the machine terminal. It is equal to the integral of the difference between the virtual rotor angular velocity ω of the virtual synchronous control and the electrical angular velocity ω0 of the machine terminal voltage, as shown in the following formula:

[0124]

[0125] According to the above formula (18), the terminal voltage parameter can be obtained through the bridge arm voltage reference value and sent to the voltage and current control loop. The entire voltage and current control loop structure is as follows: Figure 6 As shown, Figure 6 middleu * cd ,u * cq The terminal voltage dq axis command value, u cd ,u cq For the terminal voltage dq-axis component, u md ,u mq For the dq-axis modulated wave of the terminal voltage, u mabc For the terminal voltage modulation wave in the abc coordinate system, i 1d i 1q ω represents the dq-axis component of the converter-side inductor current, and ω represents the virtual electrical angular frequency of the virtual synchronous generator. The entire control loop is completed in a synchronous rotating coordinate system. Both the voltage and current loops use PI controllers. In addition, decoupling compensation is added to eliminate the cross-coupling of the dq-axis voltage and current, thereby improving the dynamic performance of the system.

[0126] That is, the entire control strategy consists of two parts: a power control loop and a voltage and current control loop. After the power loop and the reference voltage calculation link generate the terminal voltage reference, the voltage and current control loop in the dq coordinate system obtains the corresponding modulation wave, which is sent to the PWM signal generator to generate a pulse signal to control the DC-AC converter to switch on and off, thereby controlling the virtual synchronous generator to output the required voltage and current.

[0127] To verify the superiority of the method proposed in this embodiment, simulation verification was conducted. Specifically, based on the selected 2-5-2 radial basis function neural network architecture, a simulation environment was built using the MATLAB 2023b / Simulink platform, integrating an online real-time dynamic parameter adjustment module. The control algorithm was implemented using a radial basis function neural network containing a Gaussian kernel function, and the network weight parameters were continuously corrected through adaptive learning units in the Simulink model.

[0128] The technical effects were compared through simulations in the MATLAB 2023b / Simulink environment. Specifically, the constructed radial basis function (RBF) neural network was embedded into the traditional virtual synchronous generator (VSG) control system, replacing the original mechanical rotor motion equations. The improved VSG system was then integrated into the photovoltaic-storage hybrid power generation system. In this scenario, the load in the microgrid increased by P1 in 1 second, while the photovoltaic power output remained constant during this period. The frequency fluctuations during this time period were compared with those of a photovoltaic-storage hybrid microgrid using a traditional virtual synchronous generator control strategy. The comparison results are shown below. Figure 7 As shown, by Figure 6 As shown, after adopting this scheme, the system frequency overshoot, adjustment time and fluctuation range are significantly reduced in the same time period, which further demonstrates the superiority of the adaptive virtual synchronous generator control strategy proposed in this embodiment.

[0129] Example 2

[0130] This embodiment provides a VSG control system for a photovoltaic-storage grid-connected system based on an artificial neural network, including:

[0131] The model building and data acquisition module is used to build a model of a photovoltaic-storage hybrid grid-connected system and acquire the active and reactive power of the grid-connected coupling points in the model in real time.

[0132] The data processing module is used to calculate the reference voltage amplitude, phase angle, real-time angular frequency, and rate of change of angular frequency based on the real-time acquired data.

[0133] The virtual adjustment parameter acquisition module is used to calculate the error result based on the RBF neural network, taking the real-time angular frequency deviation and angular frequency change rate as input, and then using the gradient descent method to adjust the weights of the hidden layers in the neural network in real time based on the error result. Based on the RBF neural network with updated weights, the module outputs the current virtual adjustment parameters.

[0134] The control module is used to adjust the frequency and voltage of the photovoltaic-storage hybrid grid-connected system based on the virtual adjustment parameters output by the RBF neural network and in combination with PWM modulation, thereby completing the VSG control of the system.

[0135] Example 3

[0136] This embodiment provides an electronic device, including: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the method provided in this embodiment.

[0137] Example 4

[0138] This embodiment also provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, will cause the processor to execute the method described above in this embodiment.

[0139] Example 5

[0140] This embodiment provides a computer program product including executable instructions, which are computer instructions; the executable instructions are stored in a computer-readable storage medium. When the processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the electronic device performs the method described in this embodiment.

[0141] The steps and methods involved in Embodiments 2 to 5 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0142] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.

[0143] The above description is only a preferred embodiment of the present invention. Although the specific implementation of the present invention has been described in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that, based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative effort are still within the scope of protection of the present invention.

Claims

1. A VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks, characterized in that, include: Construct a model of a photovoltaic-storage hybrid grid-connected system and obtain the active and reactive power of the grid-connected coupling points in the model in real time; Based on the real-time acquired data, calculate the reference voltage amplitude, phase angle, real-time angular frequency, and rate of change of angular frequency; Based on the RBF neural network, the real-time angular frequency deviation and angular frequency change rate are used as inputs. The error results are calculated by the performance evaluation function. Then, the gradient descent method is used to adjust the weights of the hidden layers in the neural network in real time based on the error results. Based on the RBF neural network with updated weights, the current virtual adjustment parameters are output. Based on the virtual adjustment parameters output by the RBF neural network, combined with PWM modulation, the frequency and voltage of the photovoltaic-storage hybrid grid-connected system are adjusted to complete the VSG control of the system.

2. The VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks as described in claim 1, characterized in that, The photovoltaic-storage hybrid grid-connected system model includes a photovoltaic array, an energy storage device containing supercapacitors and batteries, a Boost converter connected to a DC bus, a bidirectional DC / DC converter, and a DC / AC inverter. The photovoltaic array is connected to the Boost converter, and then integrated with the energy storage device through a two-stage bidirectional DC / DC converter. It is then connected to the grid via a grid-side DC / AC inverter, with the photovoltaic array and the energy storage device sharing a DC bus.

3. The VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks as described in claim 1, characterized in that, A neural network algorithm is used to adjust the virtual control parameters of the virtual synchronizer VSG in real time, including: Construct an RBF neural network based on an input layer, hidden layer, and output layer; Based on the RBF neural network, the two state variables, the angular frequency deviation and the rate of change of angular frequency, which are obtained in real time in the grid-connected system, are used as the input of the neural network, and the output is virtual adjustment parameters, namely, the output of virtual moment of inertia J and damping coefficient D. The input to the hidden layer is processed by a Gaussian function and then output. The output of the hidden layer is then weighted and input to the output layer, which outputs the virtual moment of inertia J and the damping coefficient D.

4. The VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks as described in claim 1, characterized in that, The mean square error function of the angular frequency in the system is used as the performance evaluation function of the neural network. The error result, i.e. the performance evaluation index, is calculated based on the real-time acquired angular frequency. The gradient descent method combined with a performance evaluation function is used to adjust the weights of the hidden layer in real time. An inertial element is also introduced to accelerate the algorithm's convergence rate. The weight adjustment formula is expressed as: in, η and α represent the learning rate and inertia coefficient, respectively; ω0 represents the synchronous angular frequency, i.e., the reference angular frequency; ω represents the angular frequency of the generator rotor. The weights are the weights of the RBF neural network, and the parameter l is the label used to distinguish the output layer nodes, that is, to distinguish the output of virtual inertia J and damping coefficient D.

5. The VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks as described in claim 4, characterized in that, Simplified weight adjustment formula, including: Based on the weight adjustment formula, the current update amount is adjusted by adjusting the direction of the historical gradient; The adjustment of the historical gradient direction is transformed into measuring the relative change of angular frequency and virtual moment of inertia, and a sign function is used to approximate the gradient direction of this relative change, resulting in a simplified weight adjustment method: Where η and α represent the learning rate and the inertia coefficient, respectively. This represents the relative change in angular frequency ω(k) and virtual moment of inertia J(k), where sign() is the sign function. Let f represent the weights of the RBF neural network, and let f() represent the output function of the RBF neural network. This is the output function of the hidden layer.

6. The VSG control method for a photovoltaic-storage grid-connected system based on artificial neural networks as described in claim 5, characterized in that, Based on the simplified weight adjustment method, the step size is adjusted by adjusting the learning speed η to balance accuracy and real-time performance.

7. A VSG control system for a photovoltaic-storage grid-connected system based on artificial neural networks, characterized in that, include: The model building and data acquisition module is used to build a model of a photovoltaic-storage hybrid grid-connected system and acquire the active and reactive power of the grid-connected coupling points in the model in real time. The data processing module is used to calculate the reference voltage amplitude, phase angle, real-time angular frequency, and rate of change of angular frequency based on the real-time acquired data. The virtual adjustment parameter acquisition module is used to calculate the error result based on the RBF neural network, taking the real-time angular frequency deviation and angular frequency change rate as input, and then using the gradient descent method to adjust the weights of the hidden layers in the neural network in real time based on the error result. Based on the RBF neural network with updated weights, the module outputs the current virtual adjustment parameters. The control module is used to adjust the frequency and voltage of the photovoltaic-storage hybrid grid-connected system based on the virtual adjustment parameters output by the RBF neural network and in combination with PWM modulation, thereby completing the VSG control of the system.

8. An electronic device, characterized in that, include: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the VSG control method for a photovoltaic-storage grid-connected system based on an artificial neural network as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The system stores executable instructions that, when executed by a processor, implement the VSG control method for a photovoltaic-storage grid-connected system based on an artificial neural network as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes executable instructions stored in a computer-readable storage medium; When the processor of the electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, it implements the VSG control method for a photovoltaic-storage grid-connected system based on an artificial neural network as described in any one of claims 1-6.