Grid-connected inverter control parameter real-time adjustment method, system and device and medium
By monitoring grid impedance and grid-connected current in real time and using the Antlion optimization algorithm to optimize the control parameters of the grid-connected inverter, the system instability caused by grid impedance changes is solved, and the optimized control performance and stability of the system under different operating conditions are achieved.
Patent Information
- Application Number
- CN202510766478.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-11-14
AI Technical Summary
Existing grid-connected inverter systems experience a decline in control performance when faced with a wide range of grid impedance variations, making them unable to adapt to such variations and resulting in poor system stability and current quality.
By real-time monitoring of grid impedance and grid-connected current, a grid-connected inverter model is established, an optimization objective function is constructed, and the current controller parameters and capacitor current feedback coefficient are optimized using the Antlion optimization algorithm to achieve online adaptive adjustment, ensuring that the system maintains optimized control performance and stability under different operating conditions.
It achieves stability and current quality maintenance of the grid-connected inverter system when the grid impedance changes, improves the system's response speed and robustness, and adapts to a wide range of grid impedance changes.
Smart Images

Figure CN120955778A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power electronics technology, and in particular to a method, system, device and medium for real-time adjustment of control parameters of a grid-connected inverter. Background Technology
[0002] With the continuous development and widespread application of renewable energy, the performance of inverters used to achieve power conversion has attracted the attention and importance of scholars. Among them, grid-connected inverters, as the bridge connecting renewable energy power generation equipment and the power grid, determine the quality of output power to a certain extent by their control performance.
[0003] In distributed energy generation systems, the impedance of long-distance transmission lines can cause the power grid to exhibit weak grid characteristics, meaning that the wide range of impedance variations on the grid side cannot be ignored. Existing research often uses methods such as modifying design parameters or adding additional control loops to cope with wide impedance variations. However, these two methods can only adapt to variations in grid impedance within a specific range. Once the impedance variation exceeds the limit, these methods are no longer applicable. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method, system, device, and medium for real-time adjustment of control parameters of grid-connected inverters to solve the problem that existing grid-connected inverter systems are greatly affected by wide-range variations in grid impedance.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for real-time adjustment of control parameters of a grid-connected inverter, comprising:
[0008] Obtain the grid impedance and grid-connected current values, and establish a grid-connected inverter model;
[0009] Based on the grid-connected inverter model, the grid impedance value and grid-connected current value are monitored online to obtain the current deviation, phase margin deviation and amplitude margin deviation;
[0010] We construct an optimization objective function by weighting the current deviation, phase margin deviation, and gain margin deviation respectively.
[0011] Based on the objective function, the current controller parameters and capacitor current feedback coefficients are optimized using the first optimization algorithm to obtain the optimal combination of control parameters;
[0012] By inputting the optimal combination of control parameters into the actual system, online adaptive adjustment of the grid-connected inverter can be achieved.
[0013] As a preferred embodiment of the real-time adjustment method for grid-connected inverter control parameters described in this invention, wherein:
[0014] The establishment of the grid-connected inverter model includes:
[0015] Define the components and parameters of the filter;
[0016] The current controller is configured to use the first control strategy.
[0017] Introduce the grid impedance value;
[0018] Based on the filter composition and control strategy, the open-loop transfer function is obtained;
[0019] Calculate the system cutoff frequency and the system resonant frequency;
[0020] The phase margin and gain margin of the system are determined using the open-loop transfer function, the system cutoff frequency, and the system resonant frequency.
[0021] The beneficial effect of this preferred technical solution is that, through systematic modeling and analysis, it ensures that the grid-connected inverter can achieve optimized control performance and stability under different operating conditions.
[0022] As a preferred embodiment of the real-time adjustment method for grid-connected inverter control parameters described in this invention, wherein:
[0023] The online monitoring of grid impedance and grid-connected current includes:
[0024] Measure the current grid impedance and grid-connected current.
[0025] Input the measured current grid impedance and grid-connected current values into the grid-connected inverter model;
[0026] The difference between the actual grid-connected current and the preset reference current is calculated to obtain the current deviation;
[0027] Based on the updated grid impedance and system open-loop transfer function, the phase margin and gain margin are recalculated at the new cutoff and resonant frequencies.
[0028] As a preferred embodiment of the real-time adjustment method for grid-connected inverter control parameters described in this invention, wherein:
[0029] The current deviation, phase margin deviation, and magnitude margin deviation are weighted separately to construct an optimization objective function, including:
[0030] Define the target phase margin deviation and magnitude margin deviation;
[0031] Define the target gain margin;
[0032] Calculate the difference between the current system gain margin and the target gain margin to obtain the gain margin deviation;
[0033] Calculate the difference between the current system phase margin and the target phase margin to obtain the phase margin deviation;
[0034] Define the weighting coefficients;
[0035] The obtained current deviation, phase margin deviation, and gain margin deviation are weighted and summed to obtain the optimization objective function.
[0036] As a preferred embodiment of the real-time adjustment method for grid-connected inverter control parameters described in this invention, wherein:
[0037] The optimization of the current controller parameters and capacitor current feedback coefficient using the first optimization algorithm includes:
[0038] Randomly initialize the positions of the first generation of ants and antlions;
[0039] Substitute the objective function into the optimization function and calculate the adaptive function value for each ant and antlion.
[0040] Identify the antlion with the best fitness in the current population as the elite antlion;
[0041] Each ant moves randomly within the feasible region, and the random movement of the ants is normalized according to the limited feasible range.
[0042] Antlions capture ants by creating traps and update the ants' random walking range based on the impact of the traps on the ants' random walking.
[0043] When an ant falls into a trap, the adaptiveness of the ant and the antlion is compared. If the adaptiveness of an ant is less than that of the corresponding antlion, the position of the antlion will be updated to the position of the ant.
[0044] After each iteration, the antlion with the highest fitness in the current population is selected as the elite antlion.
[0045] If the preset stopping condition is not met, the next iteration will continue.
[0046] If the preset stopping conditions are met, the operation ends and the location of the elite antlion is output as the optimal solution.
[0047] The beneficial effects of this preferred technical solution are that by using the first optimization algorithm to adaptively optimize the current controller parameters and capacitor current feedback coefficient, it can efficiently search for the global optimal solution and dynamically adjust the control strategy, thereby improving the stability, response speed and robustness of the grid-connected inverter system.
[0048] As a preferred embodiment of the real-time adjustment method for grid-connected inverter control parameters described in this invention, the phase margin PM and amplitude margin GM of the system are expressed as follows:
[0049] PM=180°+∠T(J2πf c )
[0050] GM = -20lg|T(j2πf) r )|
[0051]
[0052] Wherein, T(J2πf c ), T(J2πf r f is the time-domain expression of the system's open-loop transfer function. c f is the system cutoff frequency. r This is the system's resonant frequency.
[0053] As a preferred embodiment of the real-time adjustment method for grid-connected inverter control parameters described in this invention, the objective function is expressed as:
[0054] f=λΔI+μ1ΔPM+μ2ΔGM=λ|I g -I ref |+μ1|PM-PM ref |+μ2|GM-GM ref |
[0055] Where λ, μ1, and μ2 are weighting coefficients, I g I represents the actual grid-connected current. ref Indicates the preset reference current, PM ref For the target phase margin, GM ref This represents the target gain margin.
[0056] Secondly, the present invention provides a real-time adjustment system for control parameters of a grid-connected inverter, comprising:
[0057] The grid parameter acquisition and model building module is used to acquire grid impedance values and grid-connected current values, and to build a grid-connected inverter model.
[0058] The online monitoring module is used to monitor the grid impedance value and grid current value online based on the grid-connected inverter model, and obtain the current deviation, phase margin deviation and amplitude margin deviation.
[0059] The objective function construction module is used to weight the current deviation, phase margin deviation, and gain margin deviation respectively to construct the objective function.
[0060] The control parameter optimization module is used to optimize the current controller parameters and capacitor current feedback coefficients based on the optimization objective function and through the first optimization algorithm to obtain the optimal combination of control parameters.
[0061] The online adaptive adjustment module is used to input the optimal combination of control parameters into the actual system to achieve online adaptive adjustment of the grid-connected inverter.
[0062] Thirdly, the present invention provides an electronic device, comprising:
[0063] Memory, used to store programs;
[0064] A processor is configured to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the real-time adjustment method for grid-connected inverter control parameters.
[0065] Fourthly, the present invention provides a computer-readable storage medium, comprising the steps of implementing the real-time adjustment method for grid-connected inverter control parameters when the program is executed by a processor.
[0066] The beneficial effects of this invention are as follows: This invention considers the influence of grid impedance on the output current quality and system stability margin of the grid-connected inverter system. It adjusts the control parameters in real time according to changes in grid impedance and operating conditions, so that the grid-connected inverter system is not affected by wide-range changes in grid impedance. By introducing an optimization algorithm for adaptive parameter optimization, the Antlion optimization algorithm has the advantages of fast convergence, fewer adjustment parameters, and strong global optimization capability. It makes up for the shortcomings of traditional grid-connected inverter systems that use empirical methods to adjust control parameters. It can quickly and accurately obtain the control parameters under the corresponding operating conditions, so that the grid-connected inverter system can always maintain a good and stable operating state. Attached Figure Description
[0067] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0068] Figure 1 This is a basic flowchart illustrating a method for real-time adjustment of control parameters of a grid-connected inverter according to an embodiment of the present invention.
[0069] Figure 2 A grid-connected inverter model diagram considering grid impedance is provided as an embodiment of the present invention for a real-time adjustment method of grid-connected inverter control parameters.
[0070] Figure 3A parameter optimization process diagram of the Antlion optimization algorithm for a real-time adjustment method of grid-connected inverter control parameters provided in an embodiment of the present invention. Detailed Implementation
[0071] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0072] Example 1, referring to Figure 1 As an embodiment of the present invention, a method for real-time adjustment of control parameters of a grid-connected inverter is provided, comprising:
[0073] S100: Obtain grid impedance and grid-connected current values, and establish a grid-connected inverter model;
[0074] S200: Based on the grid-connected inverter model, the grid impedance value and grid-connected current value are monitored online to obtain the current deviation, phase margin deviation and amplitude margin deviation;
[0075] S300: Weight the current deviation, phase margin deviation, and gain margin deviation separately to construct an optimization objective function;
[0076] S400: Based on the optimization objective function, the current controller parameters and capacitor current feedback coefficient are optimized through the first optimization algorithm to obtain the optimal combination of control parameters;
[0077] S500: Inputs the optimal combination of control parameters into the actual system to achieve online adaptive adjustment of the grid-connected inverter.
[0078] It should be noted that grid-connected inverters face a series of challenges during operation, including grid impedance variations, load fluctuations, frequency deviations, and harmonic interference. These factors can lead to decreased system stability, output current distortion, and deterioration of dynamic response performance. Therefore, real-time adjustment of the control parameters of the grid-connected inverter (such as PI controller parameters and capacitor current feedback coefficient) is particularly important.
[0079] Therefore, to address the problem that existing grid-connected inverter systems are significantly affected by wide-range variations in grid impedance, steps S100-S500 utilize the advantages of the optimization algorithm, such as strong global optimization capability, few adjustment parameters, and high convergence accuracy. Simultaneously, by combining real-time sampled grid impedance and voltage values, the system parameters can be adjusted according to real-time changes in grid conditions. This ensures that the grid-connected current output by the system maintains good current quality and has a good stability margin, adapting to wide-range variations in grid impedance.
[0080] Example 2, refer to Figures 2-3 As one embodiment of the present invention, based on the previous embodiment, a method for real-time adjustment of control parameters of a grid-connected inverter is provided, comprising:
[0081] In this embodiment of the application, the step S100 of establishing the grid-connected inverter model includes obtaining a control block diagram of the system considering grid impedance, such as... Figure 2 As shown, by comparing the reference current with the actual output current, a control signal is generated using a PI controller and PWM modulation to drive the inverter. After filtering, the signal is connected to the grid, achieving accurate current tracking and system stability. The control block diagram here can be understood as a representation of a grid-connected inverter model.
[0082] In this embodiment of the application, a grid-connected inverter model is established, including:
[0083] Define the components and parameters of the filter;
[0084] The current controller is configured to use the first control strategy.
[0085] Introduce the grid impedance value;
[0086] Based on the filter composition and control strategy, the open-loop transfer function is obtained;
[0087] Calculate the system cutoff frequency and the system resonant frequency;
[0088] The phase margin and gain margin of the system are determined using the open-loop transfer function, the system cutoff frequency, and the system resonant frequency.
[0089] In this embodiment, the filter is an LCL filter, and the LCL filter consists of a converter-side inductor Z. L1 (s)=sL1、Filter capacitor and grid-side inductor Z L2 (s) = sL2 composition.
[0090] In one optional implementation, the first control strategy in step S100 can be a PI controller; it can also be a pure proportional controller (P controller); or it can be a switching Bang-Bang controller.
[0091] In one alternative implementation, the PI controller adjusts the control output through proportional and integral actions, which can both respond quickly and eliminate steady-state errors, ensuring the accuracy and stability of the system.
[0092] In one alternative implementation, a pure proportional controller adjusts the control output through proportional action, which can quickly respond to system changes but cannot eliminate steady-state errors, resulting in continuous deviations during long-term operation.
[0093] In one alternative implementation, the switch-type Bang-Bang controller controls the system through a binary output (maximum or minimum). While simple and direct, this can lead to frequent switching and large output oscillations, affecting system stability and device lifespan.
[0094] It should be noted that compared to pure proportional controllers and Bang-Bang controllers, PI controllers offer higher control accuracy, better steady-state and dynamic performance, and stronger adaptability and engineering feasibility. Therefore, in the grid-connected inverter control scheme proposed in our invention, using a PI controller is a preferred solution that is technologically mature, has superior performance, and is easy to implement in engineering, reflecting the technological advancement and practicality of the invention.
[0095] In this embodiment of the application, the current controller in the grid-connected inverter system model is a PI controller Gi(s), and the expression for the PI controller Gi(s) is K. P +K I / s, where s is a complex frequency domain variable, K P K is the proportional parameter of the current regulator. I These are the integral parameters of the current regulator.
[0096] In this embodiment of the application, the grid impedance ZLg(s) = sLg is considered in the system model to ensure that the model can reflect the dynamic behavior under actual grid conditions.
[0097] In this embodiment, based on the filter composition and control strategy, the open-loop transfer function T(s) of the LCL-type grid-connected converter control system is derived:
[0098]
[0099] Where s represents the complex frequency domain variable, L1 represents the inductance value of the converter-side inductor, C represents the capacitance value of the filter capacitor, L2 represents the inductance value of the grid-side inductor, Lg represents the grid inductance value, and H... ig H represents the grid-connected current feedback coefficient. ic K represents the capacitor current feedback coefficient. PWM Gi(s) represents the equivalent gain coefficient of the inverter bridge, and Gi(s) represents the transfer function of the PI controller. 3Representing the third-order dynamic characteristic, s 2 This represents the second-order dynamic characteristics.
[0100] Based on the transfer function of the LCL grid-connected converter at this time, the expressions for the phase margin (PM) and the gain margin (GM) of the system are derived as follows:
[0101] PM=180°+∠T(J2πf c )
[0102] GM = -20lg|T(J2πf) r )|
[0103] In the formula, T(J2πf) c ), T(J2πf r Let f be the expression of the system's open-loop transfer function in the time domain, where f c f is the system cutoff frequency. r For the system resonant frequency to satisfy:
[0104]
[0105] In this embodiment of the application, step S200 involves online monitoring of the grid impedance value and the grid-connected current value, including:
[0106] Measure the current grid impedance and grid-connected current.
[0107] Input the measured current grid impedance and grid-connected current values into the grid-connected inverter model;
[0108] The difference between the actual grid-connected current and the preset reference current is calculated to obtain the current deviation;
[0109] Based on the updated grid impedance and system open-loop transfer function, the phase margin and gain margin are recalculated at the new cutoff and resonant frequencies.
[0110] In this embodiment, the difference between the actual grid-connected current and the preset reference current is calculated, and the current deviation is expressed as follows:
[0111] ΔI=I g -I ref
[0112] In this embodiment of the application, step S300 weights the current deviation, phase margin deviation, and gain margin deviation respectively to construct an optimization objective function, including:
[0113] Define the target phase margin;
[0114] Define the target gain margin;
[0115] Calculate the difference between the current system gain margin and the target gain margin to obtain the gain margin deviation;
[0116] Calculate the difference between the current system phase margin and the target phase margin to obtain the phase margin deviation;
[0117] Define the weighting coefficients;
[0118] The obtained current deviation, phase margin deviation, and gain margin deviation are weighted and summed to obtain the optimization objective function.
[0119] In this embodiment of the application, the target phase margin PM is defined. ref The angle is usually set to 45° to ensure that the system has sufficient stability margin.
[0120] In this embodiment of the application, the target gain margin GM is defined. ref It is usually set to 3dB to ensure that the system gain is not too high near the resonant frequency and to avoid instability.
[0121] In this embodiment of the application, the phase margin PM of the current system and the target phase margin PM are calculated. ref The difference between them, i.e., the phase margin deviation, is expressed as:
[0122] ΔPM = PM - PM ref
[0123] In this embodiment of the application, the difference between the current system's gain margin and the target gain margin, i.e., the gain margin deviation, is calculated as follows:
[0124] ΔGM=GM-GM ref
[0125] In this embodiment, weighting coefficients λ, μ1, and μ2 are determined for the weighted summation. These coefficients reflect the relative importance of each performance index in the overall optimization objective. They need to satisfy the following conditions:
[0126] λ+μ1+μ2=1
[0127] For example, if more attention is paid to the accuracy of current tracking, the value of λ can be increased; if more attention is paid to the stability of the system, the value of μ1 or μ2 can be increased.
[0128] In this embodiment of the application, to ensure good system control performance, the current deviation ΔI, phase margin deviation ΔPM, and amplitude margin deviation ΔGM are weighted respectively to obtain the objective function formula to be optimized as follows:
[0129] f=λΔI+μ1ΔPM+μ2ΔGM=λ|I g -I ref|+μ1|PM-PM ref |+μ2|GM-GM ref |
[0130] Where λ, μ1, and μ2 are weighting coefficients, and λ + μ1 + μ2 = 1, I g I represents the actual grid-connected current. ref Indicates the preset reference current, PM ref The target phase margin is typically taken as 45°, GM ref The target gain margin is typically set at 3 dB.
[0131] In one optional implementation, the first optimization algorithm in step S400 can be the antlion optimization algorithm; it can also be the gradient descent method; or it can also be the random search method.
[0132] In one alternative implementation, the antlion optimization algorithm simulates the behavior of antlions hunting ants in nature, efficiently searching for the global optimum in a complex solution space, and is particularly suitable for solving high-dimensional, nonlinear optimization problems.
[0133] In one alternative implementation, gradient descent attempts to find a local minimum by progressively updating the parameters along the negative gradient direction of the objective function, but it is prone to getting trapped in local optima and is sensitive to the initial point.
[0134] In one alternative implementation, the random search method evaluates candidate solutions by randomly selecting them within the solution space. While simple to implement, it is inefficient for complex high-dimensional problems and cannot guarantee finding a satisfactory solution.
[0135] It should be noted that the antlion optimization algorithm used in our invention exhibits significant advantages compared to gradient descent and stochastic search methods. Gradient descent is prone to getting trapped in local optima and is sensitive to initial values, while stochastic search is inefficient and yields highly uncertain results in high-dimensional and complex problems. In contrast, the antlion optimization algorithm, by simulating the hunting behavior of antlions in nature, efficiently performs a global search within a complex solution space, effectively avoiding local optima and quickly converging to or near the global optimum. Furthermore, the antlion optimization algorithm possesses good adaptability and robustness, consistently providing high-quality solutions even for complex optimization problems such as nonlinear and multi-peaked problems, thereby significantly improving the control accuracy, dynamic response speed, and overall stability of the grid-connected inverter system. This efficient optimization strategy ensures that the system achieves optimal performance under various operating conditions.
[0136] In this embodiment of the application, step S400 optimizes the current controller parameters and capacitor current feedback coefficient using a first optimization algorithm, such as... Figure 3 As shown, it includes:
[0137] Randomly initialize the positions of the first generation of ants and antlions;
[0138] Substitute the objective function into the optimization function and calculate the adaptive function value for each ant and antlion.
[0139] Identify the antlion with the best fitness in the current population as the elite antlion;
[0140] Each ant moves randomly within the feasible region, and the random movement of the ants is normalized according to the limited feasible range.
[0141] Antlions capture ants by creating traps and update the ants' random walking range based on the impact of the traps on the ants' random walking.
[0142] When an ant falls into a trap, the adaptiveness of the ant and the antlion is compared. If the adaptiveness of an ant is less than that of the corresponding antlion, the position of the antlion will be updated to the position of the ant.
[0143] After each iteration, the antlion with the highest fitness in the current population is selected as the elite antlion.
[0144] If the preset stopping condition is not met, the next iteration will continue.
[0145] If the preset stopping conditions are met, the operation ends and the location of the elite antlion is output as the optimal solution.
[0146] In this embodiment, the "position" in the random initialization of the positions of the first-generation ants and antlions actually represents the controller parameter K to be optimized. P K I and capacitor current feedback coefficient H ic The possible values are given, where the position of each ant or antlion represents a set of candidate controller parameters. The adaptiveness f corresponding to each position is calculated, using the previously defined optimization objective function J.
[0147] In this embodiment, each ant performs random walks within the feasible region, a process that can be expressed mathematically as follows:
[0148] X(t)=[0,cussum(2r(t1)-1),...,cussum(2r(t) n )-1)]
[0149] Where r(t) is a random function used to simulate the random movement of the ant at each step:
[0150]
[0151] It should be noted that these random walks help explore the solution space and find better combinations of controller parameters. After each update, the adaptive degree f at the current position is recalculated.
[0152] In this embodiment, the random movement of ants is normalized to ensure that it falls within the feasible region:
[0153]
[0154] Among them, a i b is the minimum value of the random walk of the i-th variable; i It is the maximum value of the random walk in the i-th variable; It is the minimum value of the i-th variable in the t-th iteration; This represents the maximum value of the i-th variable in the t-th iteration.
[0155] In this embodiment of the application, the effect of the trap on the random walking of ants is represented as follows:
[0156]
[0157] Among them, c t It is the minimum value of all variables at the t-th iteration; d t This represents the maximum value of all variables at the t-th iteration; This represents the position of the j-th antlion in the t-th iteration.
[0158] In this embodiment of the application, when an ant falls into the trap, the range in which the ant randomly walks will be drastically reduced. This effect can be expressed by an equation as follows:
[0159]
[0160] In the formula, I satisfies t is the current iteration number; T is the maximum iteration number. v satisfies:
[0161]
[0162] In this embodiment, the position of the antlion will be updated to the position of the ant, as shown below:
[0163]
[0164] In the formula, Let f be the position of the i-th ant in the t-th iteration, and f be the adaptive function.
[0165] In this embodiment, after each iteration, the antlion with the highest fitness is selected as the elite, and its position and fitness are recorded. The position of the elite antlion corresponds to the currently found optimal combination of controller parameters.
[0166] Example 3 is an embodiment of the present invention. This embodiment differs from the first embodiment in that it provides a real-time adjustment system for grid-connected inverter control parameters.
[0167] It should be noted that the technical solution of the grid-connected inverter control parameter real-time adjustment system is based on the same concept as the technical solution of the grid-connected inverter control parameter real-time adjustment method described above. For details not described in detail in the technical solution of the grid-connected inverter control parameter real-time adjustment system in this embodiment, please refer to the description of the technical solution of the grid-connected inverter control parameter real-time adjustment method described above.
[0168] This embodiment provides a real-time adjustment system for grid-connected inverter control parameters, comprising:
[0169] The grid parameter acquisition and model building module is used to acquire grid impedance values and grid-connected current values, and to build a grid-connected inverter model.
[0170] The online monitoring module is used to monitor the grid impedance value and grid current value online based on the grid-connected inverter model, and obtain the current deviation, phase margin deviation and amplitude margin deviation.
[0171] The objective function construction module is used to weight the current deviation, phase margin deviation, and gain margin deviation respectively to construct the objective function.
[0172] The control parameter optimization module is used to optimize the current controller parameters and capacitor current feedback coefficients based on the optimization objective function and through the first optimization algorithm to obtain the optimal combination of control parameters.
[0173] The online adaptive adjustment module is used to input the optimal combination of control parameters into the actual system to achieve online adaptive adjustment of the grid-connected inverter.
[0174] This embodiment also provides an electronic device applicable to a method for real-time adjustment of control parameters of a grid-connected inverter, including:
[0175] The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement a method for real-time adjustment of control parameters of a grid-connected inverter as described in the above embodiments.
[0176] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a method for real-time adjustment of grid-connected inverter control parameters as proposed in the above embodiments.
[0177] The storage medium proposed in this embodiment and the method for real-time adjustment of grid-connected inverter control parameters proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0178] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0179] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for real-time adjustment of control parameters of a grid-connected inverter, characterized in that, include: Obtain the grid impedance and grid-connected current values, and establish a grid-connected inverter model; Based on the grid-connected inverter model, the grid impedance value and grid-connected current value are monitored online to obtain the current deviation, phase margin deviation and amplitude margin deviation; We construct an optimization objective function by weighting the current deviation, phase margin deviation, and gain margin deviation respectively. Based on the objective function, the current controller parameters and capacitor current feedback coefficients are optimized using the first optimization algorithm to obtain the optimal combination of control parameters; By inputting the optimal combination of control parameters into the actual system, online adaptive adjustment of the grid-connected inverter can be achieved.
2. The method for real-time adjustment of control parameters of a grid-connected inverter as described in claim 1, characterized in that: The establishment of the grid-connected inverter model includes: Define the components and parameters of the filter; The current controller is configured to use the first control strategy. Introduce the grid impedance value; Based on the filter composition and control strategy, the open-loop transfer function is obtained; Calculate the system cutoff frequency and the system resonant frequency; The phase margin and gain margin of the system are determined using the open-loop transfer function, the system cutoff frequency, and the system resonant frequency.
3. The method for real-time adjustment of control parameters of a grid-connected inverter as described in claim 1 or 2, characterized in that: The online monitoring of grid impedance and grid-connected current includes: Measure the current grid impedance and grid-connected current. Input the measured current grid impedance and grid-connected current values into the grid-connected inverter model; The difference between the actual grid-connected current and the preset reference current is calculated to obtain the current deviation; Based on the updated grid impedance and system open-loop transfer function, the phase margin and gain margin are recalculated at the new cutoff and resonant frequencies.
4. The method for real-time adjustment of control parameters of a grid-connected inverter as described in claim 3, characterized in that: The current deviation, phase margin deviation, and magnitude margin deviation are weighted separately to construct an optimization objective function, including: Define the target phase margin; Define the target gain margin; Calculate the difference between the current system gain margin and the target gain margin to obtain the gain margin deviation; Calculate the difference between the current system phase margin and the target phase margin to obtain the phase margin deviation; Define the weighting coefficients; The obtained current deviation, phase margin deviation, and gain margin deviation are weighted and summed to obtain the optimization objective function.
5. The method for real-time adjustment of control parameters of a grid-connected inverter as described in claim 4, characterized in that: The optimization of the current controller parameters and capacitor current feedback coefficient using the first optimization algorithm includes: Randomly initialize the positions of the first generation of ants and antlions; Substitute the objective function into the optimization function and calculate the adaptive function value for each ant and antlion. Identify the antlion with the best fitness in the current population as the elite antlion; Each ant moves randomly within the feasible region, and the random movement of the ants is normalized according to the limited feasible range. Antlions capture ants by creating traps and update the ants' random walking range based on the impact of the traps on the ants' random walking. When an ant falls into a trap, the adaptiveness of the ant and the antlion is compared. If the adaptiveness of an ant is less than that of the corresponding antlion, the position of the antlion will be updated to the position of the ant. After each iteration, the antlion with the highest fitness in the current population is selected as the elite antlion. If the preset stopping condition is not met, the next iteration will continue. If the preset stopping conditions are met, the operation ends and the location of the elite antlion is output as the optimal solution.
6. The method for real-time adjustment of control parameters of a grid-connected inverter as described in claim 5, characterized in that: The phase margin PM and magnitude margin GM of the system are expressed as follows: PM=180°+∠T(J2πf c ) GM=-20lg|T(J2πf r )| Wherein, T(J2πf c ), T(J2πf r f is the time-domain expression of the system's open-loop transfer function. c f is the system cutoff frequency. r This is the system's resonant frequency.
7. The method for real-time adjustment of control parameters of a grid-connected inverter as described in claim 6, characterized in that: The optimization objective function is expressed as: f=λΔI+μ1ΔPM+μ2ΔGM=λ|I g -I ref |+μ1|PM-PM ref |+μ2|GM-GM ref | Where λ, μ1, and μ2 are weighting coefficients, I g I represents the actual grid-connected current. ref Indicates the preset reference current, PM ref For the target phase margin, GM ref This represents the target gain margin.
8. A real-time adjustment system for control parameters of a grid-connected inverter, using the method described in any one of claims 1-7, characterized in that, include: The grid parameter acquisition and model building module is used to acquire grid impedance values and grid-connected current values, and to build a grid-connected inverter model. The online monitoring module is used to monitor the grid impedance value and grid current value online based on the grid-connected inverter model, and obtain the current deviation, phase margin deviation and amplitude margin deviation. The objective function construction module is used to weight the current deviation, phase margin deviation, and gain margin deviation respectively to construct the objective function. The control parameter optimization module is used to optimize the current controller parameters and capacitor current feedback coefficients based on the optimization objective function and through the first optimization algorithm to obtain the optimal combination of control parameters. The online adaptive adjustment module is used to input the optimal combination of control parameters into the actual system to achieve online adaptive adjustment of the grid-connected inverter.
9. An electronic device, characterized in that, include: Memory, used to store programs; A processor for loading the program to perform the steps of the method as claimed in any one of claims 1-7.
10. A computer-readable storage medium storing a program, characterized in that, When the program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.