A power grid equivalent impedance detection method, medium and device

CN122410126BActive Publication Date: 2026-10-27NINGBO GINLONG TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610885234.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-27
Estimated Expiration
2046-06-18

AI Technical Summary

Technical Problem

在实际系统中,开关纹波、采样噪声、谐波、滤波器动态以及锁相误差均可能进入辨识模型,这将导致阻抗估计结果波动或偏差增大,在弱电网和强动态工况下尤为明显

Benefits of technology

本申请能够在不额外扰动电网的前提下,利用逆变器正常功率能量潮流变化中的频率和有功响应信息,实现电网等效阻抗的高精度辨识。相比依赖主动扰动注入或电压电流dq瞬时模型的现有方法,具有对采样精度要求低、电网影响小、适用性强、实现方便、辨识精度高和在线应用能力好的优点。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122410126B_ABST
    Figure CN122410126B_ABST
Patent Text Reader

Abstract

The application discloses a power grid equivalent impedance detection method, medium and equipment; the method steps are as follows: collecting active power and voltage angular frequency of an inverter controlled by a VSG during active power change at multiple sampling time points, and calculating relative power angle change amount; a parameterized model about active power and relative power angle change amount is constructed, the parameterized model is fitted according to active power at multiple sampling time points and corresponding relative power angle change amount, and model coefficients containing power grid impedance information are obtained; the model coefficients are combined with known output voltage and power grid voltage of the inverter to calculate the power grid equivalent impedance. The medium and equipment are used to implement the above method. The application has the beneficial effects that the application can realize high-precision identification of the power grid equivalent impedance by using frequency and active response information in normal power energy flow change of the inverter without additional disturbance of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of new energy power generation technology, and in particular to a method, medium and equipment for detecting the equivalent impedance of a power grid. Background Technology

[0002] With the large-scale integration of new energy power generation and energy storage systems, more and more power generation units are connected to the AC power grid through grid-connected converters. There are typically transformers, lines, reactors, filters, and the grid's equivalent impedance between the grid-connected converter and the grid. This impedance affects the power transmission capacity, power angle stability, active power oscillations, voltage fluctuations, and the stability margin of the control system. Especially under weak grid conditions, changes in grid impedance can significantly alter the dynamic characteristics of grid-connected converters using VSG (Virtual Synchronous Machine) control strategies, potentially causing power oscillations, frequency oscillations, or even grid instability. Currently, there are two main methods for detecting the grid's equivalent impedance: one is a passive impedance identification method based on instantaneous voltage and current at the grid connection point; the other is an active disturbance injection-type impedance identification method.

[0003] For passive impedance identification methods, it is usually necessary to collect three-phase voltage and current data and transform them into the dq coordinate system to establish identification equations. This method has high requirements for sampling accuracy, synchronization angle accuracy, and equivalent model accuracy. In actual systems, switching ripple, sampling noise, harmonics, filter dynamics, and phase-locked loop errors may all enter the identification model, which will lead to increased fluctuations or deviations in impedance estimation results, especially under weak power grids and highly dynamic operating conditions.

[0004] Active impedance identification methods typically require superimposed excitation signals such as PRBS (pseudo-random binary sequence), frequency sweep, or harmonics. Large disturbances can affect voltage, current, and active power, reducing power quality and even impacting stability. Conversely, smaller disturbances are easily overwhelmed by noise and load fluctuations, leading to insufficient identification accuracy. Therefore, this type of method presents a trade-off between identification accuracy and operational disturbances. Summary of the Invention

[0005] One objective of this application is to provide a method for detecting the equivalent impedance of a power grid that can solve at least one of the defects in the aforementioned background art.

[0006] Another object of this application is to provide a computer-readable storage medium capable of implementing a power grid equivalent impedance detection method that addresses at least one of the defects in the aforementioned background art.

[0007] Another object of this application is to provide an electronic device capable of implementing a power grid equivalent impedance detection method that addresses at least one of the deficiencies in the aforementioned background art.

[0008] To achieve at least one of the above objectives, one aspect of this application provides a method for detecting the equivalent impedance of a power grid, applied to an inverter using VSG control, comprising the following steps: when the active power output of the VSG-controlled inverter changes, collecting the active power and voltage angular frequency of the inverter at multiple sampling moments during the active power change period; integrating the deviation between the voltage angular frequency and the rated angular frequency to calculate the relative power angle change; constructing a parameterized model of the active power and the relative power angle change, fitting the parameterized model based on the active power and the corresponding relative power angle change at multiple sampling moments to obtain model coefficients containing grid impedance information; and using the obtained model coefficients in conjunction with the known output voltage of the inverter and the grid voltage to calculate the equivalent impedance of the power grid.

[0009] Preferably, the relative change in power angle is calculated recursively based on the deviation between the voltage angular frequency and the rated angular frequency. The specific calculation expression is as follows: ; In the formula, This represents the change in relative work angle at the current k-th sampling time. This represents the relative power change at the (k-1)th sampling time. This represents the voltage angular frequency at the current k-th sampling moment. Indicates the rated angular frequency. The sampling period represents the interval between adjacent sampling times.

[0010] Preferably, the relative change in power angle is calculated by gradient integration based on the deviation between the voltage angular frequency and the rated angular frequency. The specific calculation expression is as follows: ; In the formula, This represents the change in relative work angle at the current k-th sampling time. This represents the relative power change at the (k-1)th sampling time. This represents the voltage angular frequency at the current k-th sampling moment. This represents the voltage angular frequency at the (k-1)th sampling time. Indicates the rated angular frequency. The sampling period represents the interval between adjacent sampling times.

[0011] Preferably, the constructed parameterized model is a set of expressions relating active power to the change in relative power angle at multiple sampling times; for active power With relative change in work angle The relation is: ; In the formula, A, C1, and C2 all represent model coefficients that include grid impedance information.

[0012] Preferably, based on the active power and corresponding relative power angle changes at multiple sampling times, the least squares method is used to fit and identify the parameterized model, obtaining the values ​​of model coefficients A, C1, and C2; based on the obtained model coefficients, the expression for calculating the equivalent impedance of the power grid is as follows: ; ; In the formula, The impedance modulus represents the equivalent impedance of the power grid, E represents the output voltage amplitude of the inverter, U represents the voltage amplitude of the power grid, and α represents the impedance angle.

[0013] Preferably, when completing the fitting identification of the parameterized model, if the determination coefficient of the fitting identification result is higher than the preset consistency threshold, the result of this fitting identification is determined to be valid; otherwise, the result of this fitting identification is abandoned, and sampling is performed again or the sampling time is increased to perform fitting identification again.

[0014] Preferably, after the calculation of the grid equivalent impedance is completed, the inverter voltage frequency is continuously monitored; if the inverter voltage frequency does not return to the grid voltage frequency within a preset judgment time, it is determined that the inverter is connected to a very weak grid or is in an off-grid state, and a secondary frequency regulation algorithm needs to be executed to restore the inverter voltage frequency.

[0015] Another aspect of this application provides a method for detecting the equivalent impedance of a power grid, applied to an inverter using VSG control, comprising the following steps: when the active power output of the inverter using VSG control changes, acquiring the active power sequence, voltage angular frequency sequence, and voltage amplitude sequence at multiple sampling times during the active power change period; calculating the relative power angle change sequence based on the deviation between the voltage angular frequency sequence and the rated angular frequency; using the active power sequence, voltage angular frequency sequence, relative power angle change sequence, and voltage amplitude sequence as input to a reinforcement learning model, enabling the reinforcement learning model to directly output an estimated or corrected value of the equivalent impedance of the power grid; substituting the estimated value of the equivalent impedance of the power grid into the relationship between active power and relative power angle change to calculate a predicted value of active power; when the error between the predicted value and the actual value of active power exceeds a preset error threshold, triggering the reinforcement learning model to correct the estimated value of the equivalent impedance of the power grid.

[0016] Another aspect of this application provides a computer-readable storage medium storing a computer program; when the computer program is executed by a processor, it implements the above-described method for detecting the equivalent impedance of a power grid.

[0017] Another aspect of this application provides an electronic device including a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program to implement the above-described method for detecting the equivalent impedance of a power grid.

[0018] Compared with the prior art, the beneficial effects of this application are as follows: This application enables high-precision identification of the grid's equivalent impedance by utilizing frequency and active power response information during normal power flow changes in the inverter, without additional disturbance to the grid. Compared to existing methods that rely on active disturbance injection or instantaneous voltage and current dq models, it has advantages such as lower requirements for sampling accuracy, less impact on the grid, strong applicability, convenient implementation, high identification accuracy, and good online application capabilities. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the working steps of this application.

[0020] Figure 2 This is a schematic diagram illustrating the specific workflow of this application.

[0021] Figure 3 This is a simplified equivalent diagram of a traditional inverter connected to the power grid.

[0022] Figure 4 This is a schematic diagram of the power angle characteristic curves under different equivalent impedances of the power grid.

[0023] Figure 5 This is a schematic diagram showing the calculated impedance magnitude as a function of the impedance angle in a scenario where the actual impedance magnitude is fixed.

[0024] Figure 6 This is a schematic diagram comparing the calculated impedance angle with the actual impedance angle under the scenario where the actual impedance modulus is fixed.

[0025] Figure 7 This is a schematic diagram showing the curve of the calculated impedance angle changing with the impedance magnitude in a scenario where the actual impedance angle value is fixed.

[0026] Figure 8 This is a schematic diagram comparing the calculated impedance magnitude with the actual impedance magnitude in a scenario where the actual impedance angle is fixed.

[0027] Figure 9 This is a schematic diagram showing the changes in inverter voltage frequency, power angle, and output power when the inverter output power target value actively decreases under a strong power grid scenario.

[0028] Figure 10 This is a schematic diagram showing the changes in inverter voltage frequency, power angle, and output power when the inverter output power target value actively decreases in a weak grid scenario.

[0029] Figure 11 This is a schematic diagram showing the changes in inverter voltage frequency, power angle, and output power when the inverter output power target value actively decreases in an extremely weak power grid scenario.

[0030] Figure 12 This is a schematic diagram showing the changes in inverter voltage frequency, power angle, and output power when the inverter output power target value actively decreases in an off-grid scenario. Detailed Implementation

[0031] The present application will now be further described in conjunction with specific embodiments. It should be noted that, in the description of this specification, the use of terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicates that the specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms should not be construed as necessarily referring to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.

[0032] In the description of this application, it should be noted that the terms "center", "lateral", "longitudinal", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc., which indicate the orientation and positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and should not be construed as limiting the specific protection scope of this application.

[0033] It should be noted that the terms "first," "second," etc., in the specification and claims of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0034] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0035] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature being directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature being directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0036] The terms “comprising” and “having”, and any variations thereof, in the specification and claims of this application are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0037] One aspect of this application provides a method for detecting the equivalent impedance of a power grid, applied to an inverter using VSG control, such as... Figure 1 and Figure 2 As shown, one preferred embodiment includes the following steps: S100: When the active power output of the inverter using VSG control changes, the active power and voltage angular frequency of the inverter are collected at multiple sampling moments during the active power change.

[0038] S200: Integrate the deviation between the voltage angular frequency and the rated angular frequency to calculate the relative change in power angle.

[0039] S300: Construct a parameterized model of active power and relative power angle change, and fit the parameterized model with the active power and corresponding relative power angle change at multiple sampling times to obtain model coefficients that include grid impedance information.

[0040] S400: Calculate the grid equivalent impedance using model coefficients combined with known inverter output voltage and grid voltage.

[0041] To facilitate understanding of the technical solution of this application, the relationship between the VSG frequency response and the power angle change in the inverter using VSG control will be described in detail below.

[0042] like Figure 3 The diagram shown is a simplified equivalent schematic of a traditional inverter connected to the power grid using VSG control. The grid voltage can be set as follows: The output voltage of the inverter controlled by VSG Where U represents the grid voltage amplitude, E represents the inverter output voltage amplitude, and δ represents the power angle, i.e., the phase difference between the inverter output voltage and the grid voltage. The grid equivalent impedance between the inverter and the grid is the line impedance between them. Where R represents the equivalent resistance, X represents the equivalent reactance, and j represents the imaginary unit. The impedance magnitude represents the equivalent impedance of the power grid. α represents the impedance angle.

[0043] Based on the grid equivalent impedance Z and inverter output voltage and grid voltage The line current can be calculated. The value of is calculated using the following expression: .

[0044] Based on the obtained line current, the three-phase apparent power S of the inverter can be calculated. The specific calculation expression is as follows: .

[0045] In the formula, Indicates line current The conjugate of complex numbers, Indicates the inverter output voltage. Z represents the grid voltage, and Z represents the grid equivalent impedance. The impedance modulus represents the equivalent impedance of the power grid, U represents the voltage amplitude of the power grid, E represents the output voltage amplitude of the inverter, j represents the imaginary unit, α represents the impedance angle, and δ represents the power angle.

[0046] The expression for the three-phase apparent power S includes a real part and an imaginary part. Taking the real part, we can obtain the expression for the power angle characteristic curve of the active power P as follows: .

[0047] In the formula, U represents the grid voltage amplitude, and E represents the inverter output voltage amplitude. The impedance modulus represents the equivalent impedance of the power grid, and α represents the impedance angle.

[0048] Based on the above expression, it can be seen that the relationship between the active power P output by the inverter and the power angle δ includes grid impedance information (i.e., impedance angle α and impedance magnitude). Since the inverter output voltage amplitude E is known and the grid voltage amplitude U is a fixed value, it is only necessary to obtain the active power P and the power angle δ at different points to solve for the impedance angle α and the impedance magnitude. .

[0049] The core equation for VSG control of the inverter is: .

[0050] In the formula, J is the moment of inertia. This represents the rate of change of the actual voltage angular frequency ω of the inverter with time t. This represents the mechanical power generated by the virtual rotor. Indicates electromagnetic power. This represents the reference angular frequency, i.e., the rated angular frequency of the power grid; D is the damping coefficient.

[0051] Based on the above expression, the phase θ of the inverter output can be obtained by integrating the actual voltage angular frequency ω, as shown in the following expression: .

[0052] It should be understood that inverters cannot obtain grid-side voltage phase information, and since the power angle δ is the difference between the inverter output voltage phase and the grid voltage phase, power angle data cannot be obtained either. However, under steady-state power balance, the grid-side voltage frequency must equal the inverter output voltage frequency. Therefore, the power angles of the two power balances before and after a certain change in inverter output power are defined as follows: and The relative change in work angle The power change begins at time t0 and rebalances at time t1. Therefore, although the initial power angle... Unavailable, but relative to the change in work angle It can be calculated using the following formula: .

[0053] In the formula, ω(t) represents the voltage angular frequency of the inverter at time t.

[0054] The angle of attack at any given time Substituting into the above expression for the power angle characteristic curve of active power P, we can obtain: .

[0055] To facilitate a further understanding of the power angle characteristic curve of active power P, the power angle characteristic curve will be plotted below using four different sets of impedance data based on the above expression.

[0056] In a specific example, the four sets of impedance data can be labeled as impedance group 1, impedance group 2, impedance group 3, and impedance group 4. Impedance group 1 corresponds to an equivalent resistance R = 0.20Ω and an inductive reactance L = 3.18mH. At a mains frequency f = 50Hz, the equivalent reactance X = 2πfL = 1.0Ω. Therefore, the impedance magnitude... =1.02Ω, with an impedance angle α = 78.69°; the equivalent resistance R of impedance group 2 is 0.30Ω, the inductive reactance L = 4.77mH, and the impedance modulus is... =1.53Ω, with an impedance angle α = 78.69°; the equivalent resistance R of impedance group 3 is 0.40Ω, the inductive reactance L = 6.37mH, and the impedance magnitude is... =2.04Ω, impedance angle α=78.69°; equivalent resistance R=0.50Ω, inductive reactance L=7.96mH, impedance magnitude =2.04Ω. =2.55Ω, and the impedance angle α = 78.69°. Substituting the four sets of impedance data into the above expression, based on the relative change in the power angle... The gradual changes can be drawn as follows Figure 4 The figure shows the power angle characteristic curve of the active power P; it can be seen from the figure that the power angle characteristic curve of the active power P is a sine wave.

[0057] It should be noted that, based on the above expression, in addition to the active power P output by the inverter and the relative power angle change... Apart from that, the remaining parameters can be considered constants; among them, the inverter output voltage amplitude E and the grid voltage amplitude U are known quantities, and the relative power angle change is... The active power P output by the inverter can be obtained by integrating the angular frequency of the inverter output voltage or the difference between the angular frequency and a reference value. Therefore, we can assume: ; ; ; .

[0058] The above active power can then be... The expression simplifies to: .

[0059] In this application, A, C1, and C2 are all constant unknowns, and are also the model coefficients containing grid impedance information that need to be solved in the technical solution. Based on the model coefficients A, C1, and C2, the impedance modulus corresponding to the equivalent grid impedance Z can be derived. The expression for calculating the impedance angle α is as follows: ; .

[0060] As shown in the above equation, by solving for the unknown model coefficients A, C1, and C2, the relevant parameters of the grid equivalent impedance can be obtained using the known inverter output voltage and grid voltage. Furthermore, based on the solution, the power angle δ0 at the initial moment of change can also be calculated. The specific calculation formula is as follows: .

[0061] As can be understood from the above analysis, the technical solution of this application utilizes the existing frequency response and active power response of the VSG-controlled inverter during grid-connected operation to identify the equivalent impedance of the power grid, without needing to inject additional PRBS, frequency sweep, harmonic, or other specialized test disturbances into the grid. The power change utilized originates from the normal power flow changes of the inverter in the power grid, rather than artificially added impedance detection disturbances. Therefore, the technical solution of this application naturally does not add any disturbance to the power grid during the identification process, and will not cause an increase in voltage and current harmonics, a decrease in power quality, or a deterioration in the stability of a weak power grid due to the injection of additional test signals.

[0062] Meanwhile, the technical solution of this application does not simply estimate the impedance directly based on frequency changes. Instead, it first obtains the relative power angle trajectory by integrating the frequency deviation of the inverter, and then establishes an active power-relative power angle fitting model in combination with the actual output active power. The model parameters are then identified holistically using multi-point data. This processing method can reduce the impact of single-point sampling errors, noise, and instantaneous fluctuations on the results, making the identification results more accurate and stable.

[0063] In this embodiment, as shown in step S100, the grid equivalent impedance detection method of this application only starts when a change in the active power output of the inverter is detected. The change in the active power output of the inverter can be a natural power change caused by load changes, grid disturbances, or VSG power regulation processes, or a power change that occurs after the inverter actively changes its target value of output active power.

[0064] In this embodiment, when executing step S100, the inverter controller can collect and record the inverter output voltage, current, and voltage angular frequency according to a preset sampling frequency. The sampling frequency can be a dynamic frequency or a fixed frequency; for a fixed frequency, it can be set according to the actual needs of those skilled in the art, such as 100Hz or 150Hz; for a dynamic frequency, it can be set according to the controller's operation cycle, power change rate, and data processing accuracy. Based on the sampled voltage and current, the actual output active power of the inverter can be calculated, which is the instantaneous active power. At each sampling moment, to reduce the influence of switching ripple and sampling noise, the calculated instantaneous active power can be low-pass filtered or averaged to obtain the actual output active power P used for fitting.

[0065] In this embodiment, when executing step S200, as can be seen from the aforementioned analysis, the relative power angle change can be obtained by continuously integrating the deviation between the voltage angular frequency and the rated angular frequency. However, in this embodiment, the voltage angular frequency collected at each sampling moment can be regarded as a discrete point. Therefore, in this embodiment, the relative power angle change corresponding to each sampling moment can be solved by discrete integration. There are various discrete integration methods, such as recursive methods, trapezoidal integrals, Simpson's rule, etc. For ease of understanding, two specific examples will be used to describe them in detail below.

[0066] In a specific example, the relative power angle change is calculated recursively based on the deviation between the voltage angular frequency and the rated angular frequency; the specific calculation expression for the relative power angle change at the current k-th sampling time is as follows: .

[0067] In the formula, This represents the change in relative work angle at the current k-th sampling time. This represents the relative power change at the (k-1)th sampling time. This represents the voltage angular frequency at the current k-th sampling moment. Indicates the rated angular frequency. The sampling period represents the interval between adjacent sampling times.

[0068] In another specific example, the relative power angle change is calculated by gradient integration based on the deviation between the voltage angular frequency and the rated angular frequency. The specific expression for the relative power angle change at the current k-th sampling time is as follows: .

[0069] In the formula, This represents the change in relative work angle at the current k-th sampling time. This represents the relative power change at the (k-1)th sampling time. This represents the voltage angular frequency at the current k-th sampling moment. This represents the voltage angular frequency at the (k-1)th sampling time. Indicates the rated angular frequency. The sampling period represents the interval between adjacent sampling times.

[0070] It should be known that the rated angular frequency of the power grid The relationship with the power grid frequency f is as follows: For the initial value of the relative change in work angle. It can be directly set to 0; that is, the initial value of the relative power change does not need to be equal to the actual initial power angle between the inverter and the grid.

[0071] It is understandable that the technical solution of this application uses a relative power angle rather than an absolute power angle for modeling. When the initial power angle is unknown, its impact is mainly manifested as a phase shift of the model coefficients, without affecting the impedance magnitude derived from the model coefficients. Therefore, the technical solution of this application does not require accurate measurement of the initial power angle between the inverter and the grid, reducing the difficulty of engineering implementation and also reducing the impact of synchronization phase error on the impedance identification results.

[0072] In this embodiment, as Figure 2 As shown, after the grid equivalent impedance detection method of this application is started, the inverter controller can continuously record the inverter's output voltage, current, and voltage angular frequency according to the sampling time, so as to calculate multiple sets of active power and relative power angle change data. Since sufficient recorded data is required to ensure the accuracy of the fitting and identification results when fitting and identifying the model coefficients, as many samples as possible should be taken when recording the inverter's output voltage, current, and voltage angular frequency. Specifically, there are two conditions for ending data recording: one is that the rate of change of active power output by the inverter is less than a preset threshold and lasts for a certain period of time; the other is that the data recording time reaches a preset upper limit. When either condition is met, the current data recording can be stopped.

[0073] Understandably, in the first scenario, the inverter's output active power has reached a stable state again, and the relative power angle change will no longer change, making further data recording meaningless. In the second scenario, the upper limit of the recording time is manually set to avoid excessive data recording leading to a large data volume and reduced response speed. This upper limit can be determined by those skilled in the art based on their actual needs, such as 1 second, 1.5 seconds, or 2 seconds. Taking a recording time limit of 2 seconds as an example, with a sampling frequency of 100Hz, data recording stops after recording 200 sets of inverter output voltage, current, and voltage angular frequency. The corresponding active power and relative power angle change are then calculated based on the recorded inverter output voltage, current, and voltage angular frequency for subsequent parametric model fitting and identification.

[0074] In this embodiment, when executing step S300, as can be seen from the aforementioned analysis, for each sampling time, the active power... and relative work angle change The same relation exists between them: Therefore, by summarizing the relationships between active power and relative power angle changes at multiple sampling times, the required parameterized model can be obtained. For ease of understanding, the specific expression of the parameterized model will be represented in matrix form below using data from n sampling times as an example: .

[0075] In the formula, P1 to P n This represents the active power corresponding to the first to the nth sampling time. to The relative power angle changes corresponding to the first sampling time to the nth sampling time, A, C1, and C2 are all model coefficients that include grid impedance information.

[0076] It's important to understand that after obtaining the expression for the parameterized model, you only need to substitute the previously recorded n sets of active power and relative power angle change data into the expression for the parameterized model, and then use the least squares method to fit and identify the model coefficients, obtaining estimated values ​​for model coefficients A, C1, and C2. After obtaining the values ​​of A, C1, and C2, they can be substituted into the impedance modulus values ​​obtained in the previous analysis. The equivalent impedance of the power grid is calculated using the expression for the impedance angle α. The process of fitting and identifying the data using the least squares method is well known to those skilled in the art, and therefore will not be described in detail here. As for the specific choice of least squares method, ordinary least squares, recursive least squares, weighted least squares, or robust least squares can be used for parameter fitting to meet the needs of online identification, noise suppression, or outlier data removal.

[0077] In this embodiment, as Figure 2 As shown, after completing the fitting identification of the parameterized model, in order to ensure that the model coefficients obtained by the fitting identification can meet the error requirements, the determination coefficient of the fitting identification result can be used as the goodness of fit and compared with the preset consistency threshold. If the goodness of fit is higher than the preset consistency threshold, the result of this fitting identification is determined to be valid; otherwise, the result of this fitting identification is discarded, and sampling is performed again or the sampling time is increased to perform fitting identification again.

[0078] It should be understood that the specific method for determining the coefficient of determination of the fitting identification results is well known to those skilled in the art, and therefore will not be described in detail here. The specific value of the consistency threshold can be set according to the actual needs of those skilled in the art; for example, it can be 0.95. That is, when the coefficient of determination of the fitting identification results exceeds 0.95, the fitting identification results can be determined to be valid, and only then can the obtained model coefficients be used to calculate the equivalent impedance of the power grid. Of course, the error of the fitting identification results can also be judged by the sum of squared residuals and the root mean square error of the fitting identification results.

[0079] To facilitate further understanding, the power grid equivalent impedance detection method of this application will be simulated below with the actual values ​​of the impedance magnitude and impedance angle remaining unchanged, respectively.

[0080] like Figure 5 The figure shows a curve illustrating the change in the calculated impedance modulus value obtained by the power grid equivalent impedance detection method of this application with the impedance angle α when the actual impedance modulus value is fixed at 1.80Ω. As can be seen from the figure, when the impedance angle changes, the calculated impedance modulus value obtained by the power grid equivalent impedance detection method of this application fluctuates around the actual impedance modulus value, but the maximum value does not exceed 1.801Ω and the minimum value is not lower than 1.799Ω; this can be considered as the calculated impedance modulus value being basically consistent with the actual impedance modulus value.

[0081] like Figure 6 The figure shows a comparison between the calculated and actual impedance angle values ​​obtained using the power grid equivalent impedance detection method of this application when the actual impedance magnitude is fixed at 1.80Ω. As can be seen from the figure, the calculated impedance angle value changes synchronously with the actual impedance angle value, and the two remain essentially consistent.

[0082] like Figure 7 As shown, when the actual impedance angle is fixed at 75.0°, the calculated impedance angle value obtained by the power grid equivalent impedance detection method of this application varies with the impedance magnitude. The graph shows the change. As can be seen from the graph, the calculated impedance angle obtained by the power grid equivalent impedance detection method of this application fluctuates around the actual impedance angle value, but the maximum value does not exceed 75.08° and the minimum value is not lower than 74.98°; it can be regarded as the calculated impedance angle value being basically consistent with the actual impedance angle value.

[0083] like Figure 8 The figure shows a comparison between the calculated and actual impedance modulus values ​​obtained using the power grid equivalent impedance detection method of this application when the actual impedance angle is fixed at 75.0°. As can be seen from the figure, the calculated impedance modulus changes synchronously with the actual impedance modulus, and the two remain essentially consistent.

[0084] It should be noted that the equivalent impedance of the grid identified by the grid equivalent impedance detection method of this application is also affected by the grid connection scenario between the inverter and the grid. For ease of understanding, the following analysis will be conducted on the frequency change, output power change, and power angle change of the inverter under different grid connection scenarios when the inverter output power target value actively jumps from 20kW to 15kW.

[0085] like Figure 9 The figure shows the curves illustrating the changes in inverter voltage frequency, power angle, and output power when the inverter output power target value actively decreases under a strong grid scenario. The inverter output power target value actively decreases at 1 second. As can be seen from the figure, the inverter voltage frequency drops instantaneously and quickly recovers to the grid voltage frequency (50Hz) within 0.2 seconds. The inverter power angle decreases synchronously with the inverter output power target value, and the inverter output power also decreases synchronously with the inverter output power target value.

[0086] like Figure 10 The figure shows the curves illustrating the changes in inverter voltage frequency, output power, and power angle when the inverter output power target value actively decreases in a weak grid scenario. The inverter output power target value actively decreases at 1 second. As can be seen from the figure: the inverter voltage frequency drops instantaneously, but recovers to the grid voltage frequency after a period of time (approximately 1 second); the inverter power angle decreases slowly, remaining constant after a period of time (approximately 1 second); and the inverter output power also decreases slowly, reaching the target value after a period of time (approximately 1 second).

[0087] like Figure 11The figure shows the curves of inverter voltage frequency, output power, and power angle as the inverter output power target value actively decreases in an extremely weak grid scenario. The inverter output power target value actively decreases at time 1 second. As can be seen from the figure: the inverter voltage frequency drops instantaneously, and although it changes afterward, it takes either no time or a very long time to recover to the grid voltage frequency; the inverter power angle shows a linear decreasing trend, and the inverter output power decreases slowly, failing to reach the target value or requiring a considerable amount of time.

[0088] like Figure 12 The figure shows the curves of inverter voltage frequency, output power, and power angle when the inverter output power target value actively decreases in an off-grid scenario. The inverter output power target value actively decreases at 1 second. As can be seen from the figure: the inverter voltage frequency drops instantaneously and remains constant, the inverter power angle shows a linear decreasing trend, and the inverter output power remains unchanged, that is, it does not respond to the change of the target value.

[0089] As can be seen from the above analysis, in extremely weak grid scenarios and off-grid scenarios, the actual operating state of the inverter cannot respond to changes in the target value, so the grid equivalent impedance result calculated by this application may be distorted. Therefore, in the technical solution of this application, after completing the calculation of the grid equivalent impedance, the inverter voltage frequency is continuously monitored; if the inverter voltage frequency does not return to the grid voltage frequency within a preset judgment time, it is determined that the inverter is connected to an extremely weak grid or is in an off-grid state, and a secondary frequency regulation algorithm needs to be executed to restore the inverter voltage frequency. The preset judgment time can be set according to the actual needs of those skilled in the art, such as 2s, 3s, 4s, or 5s. The specific implementation process of the secondary frequency regulation algorithm is well known to those skilled in the art, so it will not be described in detail here. The secondary frequency regulation algorithm eliminates continuous frequency deviation and prevents the inverter from disconnecting from the grid or becoming unstable due to frequency exceeding the limit.

[0090] One aspect of this application provides another method for detecting the equivalent impedance of a power grid, applied to an inverter using VSG control. Another preferred embodiment includes the following steps: When the active power output of the VSG-controlled inverter changes, the active power sequence, voltage angular frequency sequence, and voltage amplitude sequence are collected at multiple sampling times during the active power change period. Based on the deviation of the voltage angular frequency sequence from the rated angular frequency, a relative power angle change sequence is calculated. The active power sequence, voltage angular frequency sequence, relative power angle change sequence, and voltage amplitude sequence are used as inputs to a reinforcement learning model, enabling the model to directly output an estimated or corrected value of the equivalent impedance of the power grid. The estimated equivalent impedance is substituted into the relationship between active power and relative power angle change to calculate a predicted active power value. When the error between the predicted and actual active power values ​​exceeds a preset error threshold, the reinforcement learning model is triggered to correct the estimated equivalent impedance of the power grid.

[0091] It should be understood that reinforcement learning models have various architectures, employing value function algorithms or policy gradient algorithms. During the training phase of a reinforcement learning model, different grid equivalent impedances, inverter control parameters, and disturbance conditions can be set in simulation platforms, semi-physical platforms, or historical operating data to obtain corresponding power response and frequency change data. The reinforcement learning model learns the mapping relationship between power response and frequency changes and grid equivalent impedance parameters by interacting with the simulation environment or historical data environment.

[0092] It is important to note that in order to ensure that the output of the reinforcement learning model has physical meaning, physical constraints need to be imposed on the output of the reinforcement learning model; such as the impedance magnitude being greater than zero, the reactance range satisfying the line characteristics, the resistance-to-reactance ratio being within a preset range (e.g., 0.1~10), and the rate of change of the impedance estimation result not exceeding a preset threshold (e.g., 5%~10%).

[0093] Another aspect of this application provides a computer-readable storage medium, in a preferred embodiment of which a computer program is stored on the storage medium; when the computer program is executed by a processor, it implements the above-described method for detecting the equivalent impedance of a power grid.

[0094] Another aspect of this application provides an electronic device, in a preferred embodiment of which includes a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program to implement the above-described method for detecting the equivalent impedance of a power grid.

[0095] The basic principles, main features, and advantages of this application have been described above. Those skilled in the art should understand that this application is not limited to the above embodiments. The embodiments and descriptions in the specification are merely the principles of this application. Various changes and modifications can be made to this application without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claims. The scope of protection claimed by this application is defined by the appended claims and their equivalents.

Claims

1. A method for detecting the equivalent impedance of a power grid, applied to an inverter using VSG control, characterized in that, Includes the following steps: When the active power output of the inverter using VSG control changes, the active power and voltage angular frequency of the inverter are collected at multiple sampling moments during the active power change period. The relative change in power angle is calculated by integrating the deviation between the voltage angular frequency and the rated angular frequency. A parameterized model is constructed for the relationship between active power and relative power angle change. The parameterized model is then fitted with active power and corresponding relative power angle changes at multiple sampling times to obtain model coefficients incorporating grid impedance information. The parameterized model is a set of expressions relating active power and relative power angle change at multiple sampling times. For active power... With relative change in work angle The relation is: ; In the formula, A, C1, and C2 all represent model coefficients that include grid impedance information; The equivalent impedance of the power grid is calculated by using the obtained model coefficients in combination with the known output voltage of the inverter and the grid voltage.

2. The method for detecting the equivalent impedance of a power grid as described in claim 1, characterized in that, Based on the deviation between the voltage angular frequency and the rated angular frequency, the relative change in power angle is calculated recursively. The specific calculation expression is as follows: ; In the formula, This represents the change in relative work angle at the current k-th sampling time. This represents the relative power change at the (k-1)th sampling time. This represents the voltage angular frequency at the current k-th sampling moment. Indicates the rated angular frequency. The sampling period represents the interval between adjacent sampling times.

3. The method for detecting the equivalent impedance of a power grid as described in claim 1, characterized in that, Based on the deviation between the voltage angular frequency and the rated angular frequency, the relative change in power angle is calculated using gradient integration. The specific calculation expression is as follows: ; In the formula, This represents the change in relative work angle at the current k-th sampling time. This represents the relative power change at the (k-1)th sampling time. This represents the voltage angular frequency at the current k-th sampling moment. This represents the voltage angular frequency at the (k-1)th sampling time. Indicates the rated angular frequency. The sampling period represents the interval between adjacent sampling times.

4. The method for detecting the equivalent impedance of a power grid as described in claim 1, characterized in that, Based on the active power and corresponding relative power angle changes at multiple sampling times, the parameterized model is fitted and identified using the least squares method to obtain the values ​​of model coefficients A, C1, and C2. Based on the obtained model coefficients, the expression for calculating the equivalent impedance of the power grid is as follows: ; ; In the formula, The impedance modulus represents the equivalent impedance of the power grid, E represents the output voltage amplitude of the inverter, U represents the voltage amplitude of the power grid, and α represents the impedance angle.

5. The power grid equivalent impedance detection method as described in claim 4, characterized in that, When completing the fitting identification of the parameterized model, if the determination coefficient of the fitting identification result is higher than the preset consistency threshold, the result of this fitting identification is determined to be valid; otherwise, the result of this fitting identification is discarded, and sampling is performed again or the sampling time is increased to perform fitting identification again.

6. The method for detecting the equivalent impedance of a power grid as described in claim 1, characterized in that, After completing the calculation of the grid equivalent impedance, the inverter voltage frequency is continuously monitored. If the inverter voltage frequency does not return to the grid voltage frequency within the preset judgment time, it is determined that the inverter is connected to a very weak grid or is in an off-grid state, and a secondary frequency regulation algorithm needs to be executed to restore the inverter voltage frequency.

7. An electronic device, characterized in that, It includes a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program to implement the power grid equivalent impedance detection method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program; when the computer program is executed by a processor, it implements the power grid equivalent impedance detection method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Virtual synchronous optimization control method of grid-connected inverter suitable for transient support

    CN115800381A

  • Method and device for controlling active power of virtual synchronous generator of network construction type converter based on angular frequency correction

    CN119253772A