Control method and system for grid-connected operation of an inverter

CN122801468APending Publication Date: 2026-09-22NINGBO GINLONG TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611310646.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0003]然而,现有方案多需在停机、脱网或限制正常运行状态下完成扫频,难以兼顾持续并网与频响测量精度;同时,依赖模型拟合的整定路径易受电网阻抗变化和工况切换影响,造成逆变器参数整定的适配性不足

Benefits of technology

[0063]本申请提供的逆变器并网运行的控制方法及系统,通过在逆变器电流环控制中获取扫频参考信号、内源扰动信号和输出采样信号,并对内源扰动信号进行频谱分析以识别重叠干扰频段,结合扰动系数和母线扰动系数确定输出电流干扰分量并对输出采样信号进行扰动对消处理,能够在逆变器持续运行过程中抑制内外部扰动对频响测量结果的影响,提高频率响应数据的准确性,进而依据更真实的运行频响特性确定并更新目标PI/PR控制器参数,进而提升逆变器在不同电网阻抗和工况变化下的参数整定的适配性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122801468A_ABST
    Figure CN122801468A_ABST
Patent Text Reader

Abstract

The application provides a control method and system for grid-connected operation of an inverter. It relates to the field of new energy grid-connected control. The method comprises: superimposing a sinusoidal test signal in the current loop control of the inverter, synchronously sampling to obtain a sweep reference signal, an internal source disturbance signal and an output sampling signal, identifying an overlapping interference frequency band, determining an output current interference component corresponding to the overlapping interference frequency band; obtaining an output signal and frequency response data for disturbance cancellation; determining target PI / PR controller parameters according to the frequency response data; obtaining the PI / PR controller corresponding to the inverter, updating the parameters of the PI / PR controller to the target PI / PR controller parameters, and controlling the inverter to operate in grid-connected mode after the parameter update of the PI / PR controller is completed. The control method for grid-connected operation of the inverter provided in the application can improve the adaptability of inverter parameter setting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of grid-connected control of new energy sources, and in particular to a control method and system for grid-connected operation of an inverter. Background Technology

[0002] In distributed photovoltaic, energy storage, and photovoltaic-storage grid-connected systems, existing inverter parameter tuning typically employs techniques such as frequency sweep testing, model analysis, and protection shutdown.

[0003] However, existing solutions often require frequency sweeping to be completed under shutdown, grid disconnection, or restricted normal operation conditions, making it difficult to balance continuous grid connection and frequency response measurement accuracy. At the same time, the tuning path that relies on model fitting is easily affected by changes in grid impedance and operating condition switching, resulting in insufficient adaptability of inverter parameter tuning.

[0004] Therefore, improving the adaptability of inverter parameter tuning has become an urgent problem to be solved in this field. Summary of the Invention

[0005] This application provides a control method and system for grid-connected operation of an inverter, which can improve the adaptability of inverter parameter tuning.

[0006] Firstly, this application provides a control method for grid-connected operation of an inverter, including:

[0007] A sinusoidal test signal is superimposed on the current loop control of the inverter, and the sweep frequency reference signal, the internal disturbance signal and the output sampling signal are obtained synchronously. The sweep frequency reference signal is a sinusoidal signal.

[0008] Internal disturbance signals are analyzed and processed using rapid spectrum analysis to identify overlapping interference frequency bands;

[0009] Based on the preset disturbance coefficient and bus disturbance coefficient, determine the output current interference component corresponding to the overlapping interference frequency band;

[0010] The output sampling signal is processed according to the output current interference component to obtain the disturbance-cancelled output signal;

[0011] Cross-correlation detection is performed on the sweep frequency reference signal and the output signal of disturbance cancellation to obtain frequency response data;

[0012] Determine the target PI / PR controller parameters for the inverter based on the frequency response data;

[0013] Obtain the PI / PR controller corresponding to the inverter, update the parameters of the PI / PR controller to the parameters of the target PI / PR controller, and control the inverter to operate in grid-connected mode after the PI / PR controller parameters are updated.

[0014] In one possible implementation, the output sampled signal is processed according to the output current interference component to obtain a disturbance-cancelled output signal, including:

[0015] For overlapping interference frequency bands, the corresponding output current interference component is removed from the output sampled signal to obtain a clean signal free of internal disturbances.

[0016] Determine the portion of the output sampled signal corresponding to the frequency bands other than the overlapping interference frequency bands from the output sampled signal;

[0017] By splicing the clean signal with a portion of the output sampled signal, a disturbance-cancelled output signal is obtained.

[0018] In one possible implementation, cross-correlation detection is performed on the frequency sweep reference signal and the perturbation cancellation output signal to obtain frequency response data, including:

[0019] By utilizing the orthogonality of the frequency sweep reference signal, the actual amplitude and actual phase of each preset frequency point are extracted sequentially;

[0020] Frequency response data are obtained based on the actual amplitude and actual phase at each frequency point.

[0021] In one possible implementation, the target PI / PR controller parameters corresponding to the inverter are determined based on the frequency response data, including:

[0022] Create a Bode plot based on the frequency response data;

[0023] Determine the phase margin and gain margin based on the Bode plot;

[0024] Based on the phase margin and gain margin, determine the constraints on the PI / PR controller parameters;

[0025] Based on the constraints, the PI / PR controller parameters are optimized to obtain the target PI / PR controller parameters, wherein the PI / PR controller parameters include at least one of the following: proportional parameters, integral parameters, resonant parameters, and active disturbance rejection control parameters.

[0026] In one possible implementation, the PI / PR controller parameters are optimized based on constraints, including:

[0027] Perform a grid traversal on the PI / PR controller parameter space to obtain the initial parameter range;

[0028] Determine the initial parameters for iteration based on the range of initial parameters;

[0029] Based on the constraints, gradient descent is performed on the initial parameters of the iteration to obtain the target PI / PR controller parameters.

[0030] In one possible implementation, the process further includes: [Further details to be added] before superimposing the sinusoidal test signal into the inverter's current loop control.

[0031] Real-time acquisition of grid-connected current and grid-connected voltage data;

[0032] The peak value of the grid-connected current, the total harmonic distortion rate of the grid-connected current, and the harmonic distortion rate of the grid voltage are determined based on the grid-connected current and grid-connected voltage data.

[0033] When the peak grid-connected current, total harmonic distortion rate of the grid-connected current, or harmonic distortion rate of the grid voltage of the inverter meets the preset resonant overcurrent triggering condition, the operation of superimposing a sinusoidal test signal in the current loop control of the inverter is initiated; or, in response to the initial grid-connected operation of the inverter, the operation of superimposing a sinusoidal test signal in the current loop control of the inverter is initiated.

[0034] In one possible implementation, the resonant overcurrent triggering condition includes any one of the following:

[0035] The peak grid-connected current is greater than or equal to a preset multiple of the inverter's rated current, and the duration exceeds the first preset duration;

[0036] The total harmonic distortion rate of the grid-connected current is greater than the preset current harmonic distortion rate threshold, and the duration exceeds the first preset duration.

[0037] The grid voltage harmonic distortion rate is greater than the preset voltage harmonic distortion rate threshold, and the duration exceeds the first preset duration.

[0038] In one possible implementation, after controlling the inverter to operate in grid-connected mode, the following is also included:

[0039] After the inverter has been running on the grid for a second preset period of time, the steps of superimposing a sinusoidal test signal into the current loop control of the inverter and synchronously sampling to obtain the sweep frequency reference signal, internal disturbance signal and output sampling signal are executed again to determine the phase margin and gain margin.

[0040] If the phase margin and gain margin that are re-determined meet the preset safety threshold, then the update of the PI / PR controller parameters is deemed to be compliant.

[0041] If the phase margin and gain margin determined again do not meet the preset safety threshold, it is determined that the update of the PI / PR controller parameters has not met the standard.

[0042] When the update of the PI / PR controller parameters fails to meet the requirements, determine the sensitivity coefficient of the PI / PR controller parameters;

[0043] Update the iteration step size and iteration direction based on the sensitivity coefficient;

[0044] Based on the iteration step size and iteration direction, the PI / PR controller parameters are iteratively updated until it is determined that the update of the PI / PR controller parameters has met the standard, or the number of iterations has reached the upper limit.

[0045] In one possible implementation, it also includes:

[0046] After determining that the update of the PI / PR controller parameters meets the requirements, the updated PI / PR controller parameters and the grid-connected operation data of the inverter under the PI / PR controller parameters are stored.

[0047] If the number of iterations reaches the upper limit and the update of the PI / PR controller parameters still fails to meet the standard, alarm data will be generated and reported.

[0048] Secondly, this application provides a control system for grid-connected operation of an inverter, comprising:

[0049] An apparatus for implementing a control method for grid-connected operation of an inverter as described in the first aspect and / or any of the possible methods described in the first aspect.

[0050] Thirdly, this application provides a control device for grid-connected operation of an inverter, comprising:

[0051] The sampling module is used to superimpose a sinusoidal test signal in the current loop control of the inverter and simultaneously sample the sweep frequency reference signal, the internal disturbance signal and the output sampling signal. The sweep frequency reference signal is a sinusoidal signal.

[0052] The processing module is used to analyze and process internal disturbance signals through rapid spectrum analysis and identify overlapping interference frequency bands;

[0053] The determination module is used to determine the output current interference component corresponding to the overlapping interference frequency band based on the preset disturbance coefficient and bus disturbance coefficient.

[0054] The processing module is also used to process the output sampling signal according to the output current interference component to obtain the disturbance cancellation output signal;

[0055] The processing module is also used to perform cross-correlation detection on the sweep frequency reference signal and the output signal of disturbance cancellation to obtain frequency response data;

[0056] The determination module is also used to determine the target PI / PR controller parameters corresponding to the inverter based on the frequency response data;

[0057] The control module is used to obtain the PI / PR controller corresponding to the inverter, update the parameters of the PI / PR controller to the parameters of the target PI / PR controller, and control the inverter to operate in grid connection after the PI / PR controller parameters are updated.

[0058] Fourthly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0059] The memory stores the instructions that the computer executes;

[0060] The processor executes computer execution instructions stored in memory to implement a control method for grid-connected operation of an inverter as described in the first aspect and / or any possible implementation of the first aspect.

[0061] Fifthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement a control method for grid-connected operation of an inverter as described in the first aspect and / or any possible implementation of the first aspect.

[0062] Sixthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements a control method for grid-connected operation of an inverter as described in the first aspect and / or any possible implementation of the first aspect.

[0063] The control method and system for grid-connected operation of inverters provided in this application acquire sweep frequency reference signals, internal disturbance signals, and output sampling signals in the inverter current loop control. It performs spectral analysis on the internal disturbance signals to identify overlapping interference frequency bands, combines the disturbance coefficient and bus disturbance coefficient to determine the output current interference component, and performs disturbance cancellation processing on the output sampling signals. This enables the suppression of the influence of internal and external disturbances on frequency response measurement results during continuous inverter operation, improving the accuracy of frequency response data. Furthermore, it determines and updates the target PI / PR controller parameters based on more realistic operating frequency response characteristics, thereby enhancing the adaptability of inverter parameter tuning under different grid impedances and operating conditions. Attached Figure Description

[0064] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0065] Figure 1 This is a schematic diagram of a scenario provided for an embodiment of this application;

[0066] Figure 2 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 1 ;

[0067] Figure 3 An example of the overall architecture diagram for inverter grid-connected operation control;

[0068] Figure 4Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 2 ;

[0069] Figure 5 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 3 ;

[0070] Figure 6 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 4 ;

[0071] Figure 7 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 5 ;

[0072] Figure 8 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 6 ;

[0073] Figure 9 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 7 ;

[0074] Figure 10 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 8 ;

[0075] Figure 11 A schematic diagram of the control device for grid-connected operation of an inverter provided in an embodiment of this application;

[0076] Figure 12 A schematic diagram of the structure of the electronic device provided in this application.

[0077] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0078] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0079] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0080] Figure 1 This is a schematic diagram of a scenario provided for an embodiment of this application, such as... Figure 1 As shown, in the field of new energy grid-connected control, distributed photovoltaic inverters, energy storage inverters, and integrated photovoltaic-energy storage equipment need to complete control parameter tuning and stability evaluation during grid-connected operation. Related systems typically include a local inverter, a cloud server, and the communication link between the two. The inverter mainly includes a control module and a frequency sweep module. The control module includes a sampling unit and a control unit. The sampling unit is used to collect the inverter's grid-connected current, voltage, power, and harmonic information.

[0081] Existing inverter parameter tuning often employs methods such as shutdown frequency sweeping, grid disconnection testing, or power-limited operation. Frequency response data is acquired after applying test signals to the control loop, and then the control unit parameters are analyzed and adjusted. Some solutions use a frequency sweeping module for both sweeping and manual parameter tuning, while others upload the frequency response data to the cloud, where a transfer function is fitted and the control parameters are then sent to the control unit. When resonant overcurrent or current distortion is detected, the common approach is direct protection shutdown. These solutions are poorly suited for scenarios involving continuous distributed photovoltaic power generation, frequent switching between energy storage charging and discharging, and significant grid impedance fluctuations. Shutdowns or blocking operations result in power generation losses and energy interruptions. Power fluctuations, bus disturbances, and background harmonics during normal operation can overwhelm the frequency sweep signal, causing frequency response measurement distortion. Tuning paths relying on model fitting are also affected by grid impedance changes, leading to parameter deviations from actual operating conditions. Resonant faults are often only addressed reactively after an anomaly occurs, making timely control parameter correction difficult.

[0082] The control method and system for grid-connected operation of inverters provided in this application acquire sweep frequency reference signals, internal disturbance signals, and output sampling signals in the inverter current loop control. It performs spectral analysis on the internal disturbance signals to identify overlapping interference frequency bands, combines the disturbance coefficient and bus disturbance coefficient to determine the output current interference component, and performs disturbance cancellation processing on the output sampling signals. This enables the suppression of the influence of internal and external disturbances on frequency response measurement results during continuous inverter operation, improving the accuracy of frequency response data. Furthermore, it determines and updates the target PI / PR controller parameters based on more realistic operating frequency response characteristics, thereby enhancing the adaptability of inverter parameter tuning under different grid impedances and operating conditions.

[0083] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0084] Figure 2 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 1 ,like Figure 2 As shown, it includes:

[0085] S201. A sinusoidal test signal is superimposed on the current loop control of the inverter, and the sweep frequency reference signal, the internal disturbance signal and the output sampling signal are obtained synchronously. The sweep frequency reference signal is a sinusoidal signal.

[0086] For example, the inverters to which this disclosure applies include: unidirectional grid-connected photovoltaic inverters and bidirectional energy storage inverters, adaptable to all operating conditions of energy storage charging, discharging, and grid-connected switching. After the inverter completes initialization, the photovoltaic inverter normally performs maximum power point tracking (MPPT) grid-connected power generation, while the energy storage inverter performs bidirectional charging and discharging grid-connected operation. The frequency sweep module embedded in the inverter is in a silent standby state, does not interfere with the original control logic, and does not affect the normal operation of the equipment or power quality. The frequency sweep module can be a software frequency response analyzer (SFRA). Figure 3 The overall architecture diagram of the inverter grid-connected operation control is shown in the example. Figure 3 As shown, the inverter's frequency sweep module includes a trigger determination unit. This unit monitors the inverter's grid-connected operation status in real time and, upon determining that the conditions for frequency sweep tuning are met, initiates the frequency sweep tuning process. The frequency sweep tuning disclosed herein is an online SFRA frequency sweep, meaning it is performed online without shutting down or disconnecting from the grid. Frequency sweep tuning refers to detecting the inverter's true frequency response data through frequency sweeping and then adjusting the proportional-integral (PI) or proportional-resonant (PR) controller parameters to ensure the inverter's control loop meets stability indicators.

[0087] Figure 3As shown, the inverter's frequency sweep module also includes a signal generation unit. The frequency sweep module executes the frequency sweep tuning process, first generating the sinusoidal test signal to be injected, and then superimposing the sinusoidal test signal onto the current reference value of the inverter's original current loop control. As a controlled grid-connected device, the inverter's local control unit performs current closed-loop control and injects the sinusoidal test signal into the current loop control link without exiting grid-connected status. The sinusoidal test signal must meet the following conditions: the signal amplitude is 1%-3% of the inverter's rated current; this range can be flexibly adjusted according to actual conditions. The frequency sweep range covers 10Hz-4kHz, with a logarithmic distribution of no less than 300 frequency points; the increase in total harmonic distortion (THD) of the grid-connected current caused by signal injection is <1%; this 1% can also be flexibly adjusted according to actual conditions. Here, a frequency point refers to a specific fixed frequency point.

[0088] Three signals are simultaneously acquired using the same sampling period to obtain a sweep frequency reference signal, an internal disturbance signal, and an output sample signal. The sweep frequency reference signal is the sinusoidal test signal injected by the sweep frequency module. The internal disturbance signal reflects the real-time fluctuations of the original power (power before the sinusoidal test signal injection) / current change (the change in the current reference value before and after the sinusoidal test signal injection) and the DC bus voltage. The output sample signal is the grid-connected current sample value, containing data such as the sweep frequency response, power disturbance response, bus fluctuation response, and background noise.

[0089] S202. Analyze and process the internal disturbance signal through rapid spectrum analysis to identify overlapping interference frequency bands.

[0090] Example, Figure 3 As shown, the inverter's frequency sweep module also includes an internal disturbance cancellation unit. This unit analyzes and processes the internal disturbance signal using fast spectrum analysis, identifies the frequency band where the energy of the internal disturbance is concentrated, and marks this band as an overlapping interference band. The overlapping interference band is typically below 500Hz. The overlapping interference band refers to the frequency band in the spectrum of the internal disturbance signal where, at a preset frequency resolution, the amplitude exceeds a threshold and its center frequency is near the frequency of the sweep reference signal. Fast spectrum analysis can be performed using a fast discrete Fourier transform to transform the sampled sequence of the internal disturbance signal within an observation window, obtaining the amplitude and phase spectra of each discrete frequency point.

[0091] S203. Determine the output current interference component corresponding to the overlapping interference frequency band based on the preset disturbance coefficient and bus disturbance coefficient.

[0092] For example, the disturbance factor describes the proportional relationship of the internal disturbance signal transmitted to the output current channel, and the bus disturbance factor describes the coupling strength of the DC bus fluctuation to the output current response. The disturbance factor and bus disturbance factor preset in this example are factory-calibrated preset values. Figure 3 As shown, the internal disturbance cancellation unit is also used to calculate the output current interference components corresponding to the current power fluctuation and bus fluctuation in the overlapping interference frequency band, based on the pre-stored power disturbance coefficient and bus disturbance coefficient.

[0093] S204. Process the output sampling signal according to the output current interference component to obtain the disturbance-cancelled output signal.

[0094] For example, the output sampling signal is the raw response sequence acquired at the inverter output, which simultaneously contains the target response component generated by the sinusoidal test signal excitation and the non-target interference component generated by the coupling of the internal disturbance signal. The disturbance cancellation output signal is the net response signal obtained after removing the output current interference component determined by S203 from the output sampling signal. It retains the dynamic characteristics related to the swept frequency reference signal for subsequent cross-correlation detection to extract frequency response data.

[0095] Optional, Figure 4 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 2 ,like Figure 4 As shown, S204 includes:

[0096] S401. For overlapping interference frequency bands, remove the corresponding output current interference component from the output sampled signal to obtain a clean signal free of internal disturbances.

[0097] For example, the output sampling signal is acquired by the sampling unit at a preset sampling period and decomposed into multiple frequency band components by digital filtering or frequency domain analysis; for overlapping interference frequency bands, the corresponding output current interference component can be calculated by the disturbance coefficient and the bus disturbance coefficient, and eliminated from the output sampling signal by amplitude subtraction, complex compensation or frequency domain cancellation, thereby forming a pure signal with internal disturbance signals removed.

[0098] S402. Determine the portion of the output sampled signal corresponding to the frequency bands other than the overlapping interference frequency bands from the output sampled signal.

[0099] For example, for non-overlapping frequency bands, the internal disturbance cancellation unit directly extracts the corresponding sampled data segment and maintains the original order to obtain a partial output sampled signal.

[0100] S403. The clean signal is spliced ​​with a portion of the output sampled signal to obtain the disturbance-cancelled output signal.

[0101] For example, the internal disturbance cancellation unit connects the clean signal with part of the output sampled signal according to the frequency band boundary, and can perform amplitude continuity correction at the connection point to keep the spliced ​​disturbance cancellation output signal continuous in the frequency domain.

[0102] Based on the method provided in this example, disturbance components in overlapping interference frequency bands are selectively removed, while data from non-overlapping frequency bands are fully preserved. The output signal formed by splicing these two bands can more realistically characterize the current response during the frequency sweep process. When this output signal is used for subsequent cross-correlation detection with the frequency sweep reference signal, it can reduce the influence of internal disturbance signals on the frequency response data, making the parameter tuning results closer to the actual grid-connected operating conditions.

[0103] S205. Perform cross-correlation detection on the sweep frequency reference signal and the output signal of disturbance cancellation to obtain frequency response data.

[0104] Example, combination Figure 2 The frequency sweep module also includes a cross-correlation identification unit. This unit performs cross-correlation detection on the frequency sweep reference signal and the disturbance cancellation output signal. The cross-correlation detection measures the degree of correlation between the frequency sweep reference signal and the disturbance cancellation output signal at each test frequency point, and extracts the actual amplitude and phase of the inverter at the corresponding frequency from this correlation. The frequency sweep reference signal is a sinusoidal signal with known frequency and phase references. The disturbance cancellation output signal is a current response sequence after disturbance removal. By performing cross-correlation or equivalent correlation operations on these two sets of signals, the response component corresponding to the frequency of the frequency sweep reference signal can be separated from the background to obtain frequency response data.

[0105] Optional, Figure 5 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 3 ,like Figure 5 As shown, S205 includes:

[0106] S501. Utilize the orthogonality of the frequency sweep reference signal to sequentially extract the actual amplitude and actual phase of each preset frequency point.

[0107] For example, as mentioned above, the sweep frequency reference signal is a sinusoidal signal. Therefore, the sweep frequency reference signal maintains frequency stability within the sampling time window corresponding to each preset frequency point, ensuring that the orthogonal components are separable in the time domain. After sampling the disturbance cancellation output signal, cross-correlation operations are performed on this signal with the reference sinusoidal component and its orthogonal component corresponding to the same frequency point to obtain the correlation results of the in-phase and quadrature components. The actual amplitude and actual phase at that frequency point are then calculated from the correlation results.

[0108] S502. Obtain frequency response data based on the actual amplitude and actual phase at each frequency point.

[0109] For example, since each preset frequency point is processed sequentially, high signal-to-noise ratio frequency response data corresponding to each frequency point is obtained based on the actual amplitude and actual phase. After processing of one frequency point, the system automatically switches to the next frequency point. The full-band frequency sweep time for a single frequency point is ≤2s, and the impact of operating condition fluctuations on the measurement results is negligible, achieving the same accuracy as offline frequency sweeping. The correlation results of the previous frequency point are not mixed into the calculation window of the next frequency point, thus forming frequency response data extracted point by point. Optionally, cross-correlation detection can be performed by a digital signal processor, controller, or cloud computing unit. Its input is a discrete sampling sequence of the sweeping reference signal and an output sampling signal with disturbance cancellation. The output is an amplitude sequence and a phase sequence arranged by frequency point. The actual amplitude and actual phase of each frequency point can directly form the frequency response data.

[0110] The method in this example utilizes the orthogonality of the swept frequency reference signal to perform frequency-by-frequency correlation extraction. The target frequency component in the output signal can be separated and quantized into actual amplitude and actual phase. The construction process of the frequency response data is consistent with that of the swept frequency reference signal, which is suitable for online identification in the grid-connected operation of the inverter.

[0111] S206. Determine the target PI / PR controller parameters corresponding to the inverter based on the frequency response data.

[0112] For example, the frequency response data reflects the amplitude-frequency and phase-frequency characteristics of the inverter under the current grid-connected operating conditions, while the target PI / PR controller parameters are a set of controller parameters that ensure the current loop meets the expected dynamic performance and stable operation requirements. This step directly uses the measured frequency response data to determine the parameters, rather than relying on a fixed model that deviates significantly from the actual operating conditions, thus ensuring that the target PI / PR controller parameters are consistent with the current grid impedance, bus fluctuations, and operating power status.

[0113] Optional, Figure 6 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 4 ,like Figure 6 As shown, S207 includes:

[0114] S601. Establish a Bode plot based on the frequency response data.

[0115] Example, combination Figure 2 Frequency response data can be sent to a cloud server, and the cloud server can automatically draw Bode plots of complete amplitude-frequency and phase-frequency characteristics based on the frequency response data. Bode plots are used to convert frequency response data into amplitude-frequency and phase-frequency characteristic expressions.

[0116] S602. Determine the phase margin and gain margin based on the Bode plot.

[0117] For example, Bode plots can be analyzed using a cloud server to obtain the inverter's open-loop cutoff frequency, phase margin, and gain margin. Phase margin and gain margin can be used to predict whether the inverter's closed-loop system will oscillate. When the phase margin is too large, the step response overshoot is large, oscillation is likely, and the operating condition is unstable. When the phase margin is too small, the system response is slow. The smaller the gain margin, the closer it is to oscillation. Phase margin and gain margin are used to characterize the stability boundaries of the control loop and serve as constraints for subsequent parameter optimization.

[0118] S603. Determine the constraints on the PI / PR controller parameters based on the phase margin and gain margin.

[0119] For example, the constraints for the PI / PR controller parameters can be: phase margin ≥ 45°, gain margin ≥ 6dB. The values ​​of 45° and 6dB can be replaced with other values ​​depending on the specific circumstances.

[0120] S604. Based on the constraints, the PI / PR controller parameters are optimized to obtain the target PI / PR controller parameters, wherein the PI / PR controller parameters include at least one of the following: proportional parameters, integral parameters, resonant parameters, and active disturbance rejection control parameters.

[0121] For example, the constraints "phase margin ≥ 45°, gain margin ≥ 6dB" are set as boundary conditions for parameter search. The proportional, integral, resonant, and active disturbance rejection (ADNR) parameters are limited to ranges that satisfy the stability threshold. The cloud server then optimizes the parameters using grid search, gradient optimization, or combined filtering to output target PI / PR controller parameters that satisfy the preset performance indicators of the objective function and meet the phase and gain margin constraints. After obtaining the target PI / PR controller parameters, the cloud server sends them to the inverter. This process allows frequency response data to directly participate in controller tuning and completes parameter updates under stability constraints, enabling the inverter to obtain control parameters that match actual operating conditions during grid-connected operation.

[0122] Optional, Figure 7 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 5 ,like Figure 7 As shown, S604 includes:

[0123] S701. Perform a grid traversal on the parameter space of the PI / PR controller to obtain the initial parameter range.

[0124] For example, the mesh traversal can perform discrete sampling of the proportional parameters, integral parameters, resonant parameters, and active disturbance rejection control parameters according to a preset step, and record the sampling points that meet the phase margin and gain margin constraints as the initial parameter range.

[0125] S702. Determine the initial parameters for iteration based on the range of initial parameters.

[0126] For example, a combination of parameters that satisfies the phase margin and gain margin constraints is selected from the range of initial parameters and determined as the initial parameters for iteration.

[0127] S703. Based on the constraints, perform gradient descent processing on the initial parameters of the iteration to obtain the target PI / PR controller parameters.

[0128] For example, a loss function is constructed based on frequency response data, and the gradient of the objective function with respect to each parameter is calculated at each parameter update. The update direction and magnitude are then adjusted according to constraints to ensure the parameters approach the optimal solution along a direction that satisfies stability requirements. The target PI / PR controller parameters are obtained when the iteration converges or the parameter change is less than a preset threshold. Alternatively, the final parameter iteration result is determined as the target PI / PR controller parameters when the preset number of iterations is reached. The preset number of iterations can be determined based on actual conditions. For example, it could be 5 iterations, so the number of iterations in a single tuning session is ≤ 5.

[0129] This example first limits the parameter search boundary by traversing the grid, and then refines the optimization under the constraints using gradient descent. This enables the controller parameters to converge while meeting stability requirements, and ensures that the final parameters are consistent with the operating conditions corresponding to the current frequency response data, thereby improving the feasibility and matching degree of parameter tuning.

[0130] S207. Obtain the PI / PR controller corresponding to the inverter, update the parameters of the PI / PR controller to the parameters of the target PI / PR controller, and control the inverter to operate in grid-connected mode after the parameters of the PI / PR controller are updated.

[0131] For example, the PI / PR controller is the parameter carrier of the inverter's current loop. The PI controller is suitable for current closed-loop operation in a synchronous rotating coordinate system, while the PR controller is suitable for scenarios requiring zero steady-state error tracking of AC reference quantities in a stationary coordinate system. After obtaining the target PI / PR controller parameters, these parameters are written into the inverter's currently used controller parameter register, and the new parameter set participates in current loop regulation according to a preset switching mechanism. Controlling the inverter's grid-connected operation refers to maintaining or restoring the closed-loop control of the inverter's current output to the grid after the parameter update, allowing it to continue performing grid-connected power conversion under the new PI / PR controller parameters.

[0132] This example acquires the sweep frequency reference signal, internal disturbance signal, and output sampling signal in the inverter current loop control. It performs spectral analysis on the internal disturbance signal to identify overlapping interference frequency bands, combines the disturbance coefficient and bus disturbance coefficient to determine the output current interference component, and performs disturbance cancellation processing on the output sampling signal. This can suppress the influence of internal and external disturbances on the frequency response measurement results during continuous inverter operation, improve the accuracy of frequency response data, and then determine and update the target PI / PR controller parameters based on more realistic operating frequency response characteristics, thereby improving the adaptability of inverter parameter tuning under different grid impedance and operating conditions.

[0133] Optionally, a multi-step incremental update method can be used to update the parameters of the PI / PR controller to the parameters of the target PI / PR controller.

[0134] Optionally, the number of incremental update steps can be determined according to the actual situation, for example, it can be 5 steps. Therefore, the parameter update of the PI / PR controller is completed in 5 steps. The parameter change in a single step is set to not exceed 20% of the original value, and the interval between each step is ≥10ms, ensuring that the transient current overshoot during parameter switching is ≤5%, to avoid system instability caused by shock oscillations and parameter mutations. After the parameter tuning update is completed, the inverter is controlled to resume normal grid-connected operation. The 20%, 10ms, and 5% can also be replaced with other values ​​according to the actual situation.

[0135] Based on the method provided in this example, parameter updates are no longer completed in a one-time switch, but rather in multiple steps to achieve a smooth update. This allows the controller output to change continuously, maintaining the control continuity of the inverter during grid-connected operation. Consequently, the parameter tuning results can be implemented without significantly disturbing the existing current loop operation. Furthermore, the control parameter transition process is smoother when grid impedance fluctuates or loads switch, and the grid-connected operation state after the controller update is more easily maintained and stable.

[0136] Optional, Figure 8 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 6 ,like Figure 8 As shown, before S201, it also includes:

[0137] S801: Real-time acquisition of grid-connected current and grid-connected voltage data.

[0138] For example, the inverter collects grid-connected current and grid-connected voltage data in real time with a fixed sampling period.

[0139] S802. Determine the peak value of the grid-connected current, the total harmonic distortion rate of the grid-connected current, and the harmonic distortion rate of the grid voltage based on the grid-connected current and grid-connected voltage data.

[0140] For example, the collected grid-connected current and grid-connected voltage are synchronized, filtered, and subjected to sliding window statistics to obtain the peak value of the grid-connected current, the total harmonic distortion rate of the grid-connected current, and the harmonic distortion rate of the grid voltage.

[0141] S803. When the peak value of the inverter's grid-connected current, the total harmonic distortion rate of the grid-connected current, or the harmonic distortion rate of the grid voltage meets the preset resonant overcurrent triggering condition, the operation of superimposing a sinusoidal test signal in the current loop control of the inverter is initiated; or, in response to the inverter's initial grid-connected operation, the operation of superimposing a sinusoidal test signal in the current loop control of the inverter is initiated.

[0142] For example, when any one of the following indicators—the peak grid-connected current, the total harmonic distortion rate of the grid-connected current, and the harmonic distortion rate of the grid voltage—meets a preset resonant overcurrent triggering condition, an online frequency sweep analysis operation is initiated, i.e., the operation of superimposing a sinusoidal test signal into the inverter's current loop control is started. Optionally, the resonant overcurrent triggering condition includes any one of the following: the peak grid-connected current is greater than or equal to a preset multiple of the inverter's rated current, and the duration exceeds a first preset duration; the total harmonic distortion rate of the grid-connected current is greater than a preset current harmonic distortion rate threshold, and the duration exceeds a first preset duration; or the harmonic distortion rate of the grid voltage is greater than a preset voltage harmonic distortion rate threshold, and the duration exceeds a first preset duration.

[0143] For example, both the preset multiple and the first preset duration can be determined according to actual conditions. For instance, the preset multiple could be 1.15 times, and the first preset duration could be 1 second. Therefore, the preset multiple for the grid-connected current peak value being greater than or equal to the inverter's rated current means: the grid-connected current peak value ≥ 1.15 times the rated current. The current harmonic distortion rate threshold can also be determined according to actual conditions, for example, it could be 10%. Therefore, the total harmonic distortion rate of the grid-connected current being greater than the preset current harmonic distortion rate threshold means: the total harmonic distortion rate of the grid-connected current > 10%. The voltage harmonic distortion rate threshold can also be determined according to actual conditions, for example, it could also be 10%, or it could be other values. Therefore, the grid voltage harmonic distortion rate being greater than the preset voltage harmonic distortion rate threshold means: the grid voltage harmonic distortion rate > 10%. This example uses three criteria—peak overcurrent, harmonic distortion, and voltage distortion—to define the judgment boundary for resonant overcurrent, and introduces a duration constraint. This enables timely identification of resonant overcurrent faults when the grid-connected current abnormally increases or the harmonic level continues to deteriorate. At the same time, it reduces misjudgments caused by single-pulse disturbances, ensuring that online frequency sweeping and control parameter correction are only initiated under operating conditions with clear fault characteristics, thereby improving the accuracy of judgment and the consistency of control actions during grid-connected operation.

[0144] Alternatively, when the inverter is in the initial grid-connected operation scenario, a sinusoidal test signal can be directly triggered based on the initialization flag without waiting for abnormal indicators to appear.

[0145] Based on the method provided in this example, the frequency sweep process can be automatically initiated under abnormal operating conditions or initial tuning scenarios. Frequency response acquisition and parameter tuning can be carried out in conjunction with grid-connected operation, thereby improving the consistency of triggering timing and the adaptability of online identification.

[0146] Optional, Figure 9 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 7 ,like Figure 9 As shown, following S208, it also includes:

[0147] S901. After the inverter has been running in grid-connected operation for a second preset period of time, the steps of superimposing a sinusoidal test signal into the current loop control of the inverter and synchronously sampling to obtain the sweep frequency reference signal, internal disturbance signal and output sampling signal to determine the phase margin and gain margin are executed again.

[0148] For example, the second preset duration can be determined according to the actual situation, such as 30 seconds. Therefore, after the inverter is controlled to operate in grid-connected mode for 30 seconds, the second online frequency sweep is automatically triggered, and the steps from S201 to S602 above are executed again to obtain the determined phase margin and gain margin again.

[0149] S902. If the phase margin and gain margin determined again meet the preset safety threshold, then the update of the PI / PR controller parameters is deemed to be compliant.

[0150] For example, the safety thresholds for phase margin and gain margin can be determined according to the actual situation. For instance, the safety threshold for phase margin can be: phase margin within the range of 45° to 60°, and the safety threshold for gain margin can be: gain margin > 6dB. When the phase margin and gain margin meet the corresponding safety thresholds, the frequency sweep tuning of the PI / PR controller parameters can be considered qualified, that is, the update of the PI / PR controller parameters meets the standards.

[0151] S903. If the phase margin and gain margin determined again do not meet the preset safety threshold, it is determined that the update of the PI / PR controller parameters has not met the standard.

[0152] Conversely, if the phase margin or gain margin meets the corresponding safety threshold, the frequency sweep tuning of the PI / PR controller parameters is deemed unqualified, meaning the update of the PI / PR controller parameters is not up to standard.

[0153] S904. When the update of the PI / PR controller parameters fails to meet the standard, determine the sensitivity coefficient of the PI / PR controller parameters.

[0154] For example, the sensitivity coefficient of a PI / PR controller parameter can characterize the change in phase margin and gain margin caused by a 1% change in that parameter.

[0155] S905. Update the iteration step size and iteration direction based on the sensitivity coefficient.

[0156] For example, if the sensitivity coefficient of the PI / PR controller parameter exceeds the preset sensitivity coefficient threshold, it can be determined that the sensitivity coefficient of the PI / PR controller parameter is large, and the iteration step size can be reduced accordingly to avoid overshoot. Conversely, if the sensitivity coefficient of the PI / PR controller parameter does not exceed the preset sensitivity coefficient threshold, it can be determined that the sensitivity coefficient of the PI / PR controller parameter is small, and the iteration step size can be increased accordingly to accelerate convergence. The iteration direction refers to the positive or negative direction of the iteration.

[0157] S906. Based on the iteration step size and iteration direction, iteratively update the PI / PR controller parameters until it is determined that the update of the PI / PR controller parameters meets the standard, or the number of iterations reaches the upper limit.

[0158] For example, the number of iterations can be determined based on the actual situation, such as 3 times. Iterative update refers to repeatedly executing steps S603 and afterwards to update the PI / PR controller parameters again. Iteration continues until the update of the PI / PR controller parameters is deemed satisfactory, or the number of iterations reaches 3. In this example, frequency sweep verification is performed again during grid-connected operation to conduct online verification of the updated control parameters, and iterative correction is guided by the sensitivity coefficient, so that the parameter adjustment can converge around the stability margin, avoiding deviation of parameters from actual operating conditions after a single tuning.

[0159] Optional, Figure 10 Flowchart of the control method for grid-connected operation of the inverter provided in this application Figure 8 ,like Figure 10 As shown, it also includes:

[0160] S1001. After determining that the update of the PI / PR controller parameters meets the requirements, store the updated PI / PR controller parameters and the grid-connected operation data of the inverter under the PI / PR controller parameters.

[0161] For example, after determining that the PI / PR controller parameters have been updated to meet the requirements, the control unit establishes a correlation between the currently updated parameters and the corresponding operating data, and writes them to the local storage unit or remote data storage module. The correlation can be indexed using timestamps, device identifiers, and parameter version numbers to facilitate subsequent tracking of grid-connected performance under the same set of parameters. Grid-connected operating data can be continuously collected within a preset observation window after the update is completed, and encapsulated into historical operating records when stability margin conditions are met and no abnormal alarms are detected.

[0162] S1002. If the number of iterations reaches the upper limit and the update of the PI / PR controller parameters still fails to meet the standard, an alarm data is generated and reported.

[0163] For example, if the iteration count reaches the upper limit and the update of the PI / PR controller parameters still fails to meet the requirements, the control unit generates alarm data. The alarm data includes at least the device identifier, the current iteration count, the failure status, the current PI / PR controller parameters, and the corresponding deviations in phase and gain margins. Alarm data can be reported to a cloud platform or distributed to relevant personnel's clients for manual intervention, log storage, or subsequent readjustment. Based on the method provided in this example, updated and compliant PI / PR controller parameters and their grid-connected operation data can be completely saved for reuse and traceability. Meanwhile, PI / PR controller parameters that fail to meet the requirements can be reported promptly, facilitating management to identify and address parameter tuning failures.

[0164] This disclosure also provides a control system for grid-connected operation of an inverter, including: means for performing the control method for grid-connected operation of the inverter as described above.

[0165] The control system for grid-connected operation of the inverter provided in this embodiment can execute the control method for grid-connected operation of the inverter provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0166] Figure 11 This is a schematic diagram of the control device for grid-connected operation of an inverter provided in an embodiment of this application, as shown below. Figure 11 As shown, it includes:

[0167] The sampling module 111 is used to superimpose a sinusoidal test signal in the current loop control of the inverter and synchronously sample to obtain a sweep frequency reference signal, an internal disturbance signal and an output sampling signal, wherein the sweep frequency reference signal is a sinusoidal signal;

[0168] Processing module 112 is used to analyze and process the internal disturbance signal through fast spectrum analysis and identify overlapping interference frequency bands;

[0169] The determination module 113 is used to determine the output current interference component corresponding to the overlapping interference frequency band based on the preset disturbance coefficient and bus disturbance coefficient.

[0170] The processing module 112 is also used to process the output sampling signal according to the output current interference component to obtain the disturbance cancellation output signal;

[0171] Processing module 112 is also used to perform cross-correlation detection on the sweep frequency reference signal and the output signal of disturbance cancellation to obtain frequency response data;

[0172] The determination module 113 is also used to determine the target PI / PR controller parameters corresponding to the inverter based on the frequency response data;

[0173] The control module 114 is used to obtain the PI / PR controller corresponding to the inverter, update the parameters of the PI / PR controller to the parameters of the target PI / PR controller, and control the inverter to operate in grid connection after the parameters of the PI / PR controller are updated.

[0174] The control device for inverter grid-connected operation provided in this embodiment can execute the control method for inverter grid-connected operation provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0175] Figure 12 A schematic diagram of the structure of the electronic device provided in this application. Figure 12 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus.

[0176] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0177] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0178] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0179] The memory may include random access memory (RAM) and non-volatile memory (NVM), such as at least one disk storage device.

[0180] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0181] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0182] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0183] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0184] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0185] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0186] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0187] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0188] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to related technologies, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0189] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0190] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A control method for grid-connected operation of an inverter, characterized in that, include: A sinusoidal test signal is superimposed on the current loop control of the inverter, and a sweep frequency reference signal, an internal disturbance signal, and an output sampling signal are obtained by synchronous sampling. The sweep frequency reference signal is a sinusoidal signal. The intrinsic disturbance signal is analyzed and processed by rapid spectrum analysis to identify overlapping interference frequency bands; Based on the preset disturbance coefficient and bus disturbance coefficient, the output current interference component corresponding to the overlapping interference frequency band is determined; The output sampling signal is processed according to the output current interference component to obtain the disturbance-cancelled output signal; Cross-correlation detection is performed on the frequency sweep reference signal and the disturbance cancellation output signal to obtain frequency response data; Determine the target PI / PR controller parameters corresponding to the inverter based on the frequency response data; Obtain the PI / PR controller corresponding to the inverter, update the parameters of the PI / PR controller to the parameters of the target PI / PR controller, and control the inverter to operate in grid-connected mode after the parameters of the PI / PR controller are updated.

2. The method according to claim 1, characterized in that, The step of processing the output sampled signal based on the output current interference component to obtain a disturbance-cancelled output signal includes: For the overlapping interference frequency band, the output current interference component corresponding to the frequency band is removed from the output sampling signal to obtain a clean signal free of internal disturbances; From the output sampled signals, determine the portion of the output sampled signals corresponding to the frequency bands other than the overlapping interference frequency bands; The pure signal is concatenated with the partial output sampled signal to obtain the disturbance-cancelled output signal.

3. The method according to claim 1, characterized in that, The step of performing cross-correlation detection on the frequency sweep reference signal and the perturbation cancellation output signal to obtain frequency response data includes: By utilizing the orthogonality of the frequency sweep reference signal, the actual amplitude and actual phase of each preset frequency point are extracted sequentially; The frequency response data is obtained based on the actual amplitude and actual phase of each frequency point.

4. The control method for grid-connected operation of an inverter according to claim 1, characterized in that, The step of determining the target PI / PR controller parameters corresponding to the inverter based on the frequency response data includes: A Bode plot is constructed based on the frequency response data; The phase margin and gain margin are determined based on the Bode plot. Based on the phase margin and the gain margin, determine the constraints on the PI / PR controller parameters; Based on the constraints, the PI / PR controller parameters are optimized to obtain the target PI / PR controller parameters, wherein the PI / PR controller parameters include at least one of the following: proportional parameters, integral parameters, resonant parameters, and active disturbance rejection control parameters.

5. The control method for grid-connected operation of an inverter according to claim 4, characterized in that, The optimization process for the PI / PR controller parameters based on the constraints includes: Perform a grid traversal on the PI / PR controller parameter space to obtain the initial parameter range; Determine the initial parameters for iteration based on the aforementioned initial parameter range; Based on the constraints, gradient descent processing is performed on the initial parameters of the iteration to obtain the target PI / PR controller parameters.

6. The control method for grid-connected operation of an inverter according to claim 1, characterized in that, Before superimposing the sinusoidal test signal into the inverter's current loop control, the method further includes: Real-time acquisition of grid-connected current and grid-connected voltage data; The peak value of the grid-connected current, the total harmonic distortion rate of the grid-connected current, and the harmonic distortion rate of the grid voltage are determined based on the grid-connected current and grid-connected voltage data. When the peak grid-connected current, total harmonic distortion rate of the grid-connected current, or harmonic distortion rate of the grid voltage of the inverter meets the preset resonant overcurrent triggering condition, the operation of superimposing a sinusoidal test signal in the current loop control of the inverter is initiated; or, in response to the initial grid-connected operation of the inverter, the operation of superimposing a sinusoidal test signal in the current loop control of the inverter is initiated.

7. The control method for grid-connected operation of an inverter according to claim 6, characterized in that, The resonant overcurrent triggering condition includes any one of the following: The peak value of the grid-connected current is greater than or equal to a preset multiple of the rated current of the inverter, and the duration exceeds a first preset duration; The total harmonic distortion rate of the grid-connected current is greater than a preset current harmonic distortion rate threshold, and the duration exceeds a first preset duration. The voltage harmonic distortion rate of the power grid is greater than a preset voltage harmonic distortion rate threshold, and the duration exceeds a first preset duration.

8. The control method for grid-connected operation of an inverter according to claim 1, characterized in that, After controlling the inverter to operate in grid-connected mode, the following is also included: After the inverter has been running in grid for a second preset period of time, the steps of superimposing a sinusoidal test signal into the current loop control of the inverter and synchronously sampling to obtain the sweep frequency reference signal, internal disturbance signal and output sampling signal are executed again to determine the phase margin and gain margin. If the phase margin and gain margin that are determined again meet the preset safety threshold, then the update of the PI / PR controller parameters is deemed to have met the requirements. If the phase margin and gain margin determined again do not meet the preset safety threshold, it is determined that the update of the PI / PR controller parameters has not met the standard. When the update of the PI / PR controller parameters fails to meet the standard, the sensitivity coefficient of the PI / PR controller parameters is determined; Update the iteration step size and iteration direction based on the sensitivity coefficient; The PI / PR controller parameters are iteratively updated according to the iteration step size and iteration direction until it is determined that the update of the PI / PR controller parameters has met the standard, or the number of iterations has reached the upper limit.

9. The control method for grid-connected operation of an inverter according to claim 8, characterized in that, Also includes: After determining that the update of the PI / PR controller parameters meets the requirements, the updated PI / PR controller parameters and the grid-connected operation data of the inverter under the PI / PR controller parameters are stored. If the number of iterations reaches the upper limit and the update of the PI / PR controller parameters still fails to meet the standard, alarm data will be generated and reported.

10. A control system for grid-connected operation of an inverter, characterized in that, include: An apparatus for performing the control method for grid-connected operation of an inverter as described in any one of claims 1-9.