A virtual impedance dynamic adjustment method based on power grid short-circuit ratio
By combining Kalman filtering and fuzzy control with reinforcement learning to dynamically adjust virtual impedance, the problems of short-circuit ratio fluctuation and impedance parameter mutation in the power grid are solved, thereby improving the stability and adaptability of the power grid and suppressing resonance phenomena.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANENG DALI WIND POWER GENERATION CO LTD XIANGYUN BRANCH
- Filing Date
- 2026-04-03
- Publication Date
- 2026-07-21
AI Technical Summary
Existing virtual impedance regulation technology cannot adapt to fluctuations in the short-circuit ratio of the power grid and sudden changes in impedance parameters, resulting in regulation lag or over-regulation, inability to identify resonance risks, weakened control effect in complex environments, and poor adaptability.
The Kalman filter algorithm is used to estimate the short-circuit ratio state. The virtual impedance parameters are optimized by combining fuzzy control and reinforcement learning. The resonant frequency and impedance amplitude are identified by online scanning, and the virtual impedance is dynamically adjusted to suppress resonance and maintain system stability.
It improves the real-time response speed and adaptability of virtual impedance regulation, suppresses resonance phenomena, enhances the stability and adaptability of the power grid under complex operating conditions, and avoids weakening of control effect.
Smart Images

Figure CN122437116A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid regulation technology, and mainly to a method for dynamic adjustment of virtual impedance based on the power grid short-circuit ratio. Background Technology
[0002] With the rapid development of new energy power generation technologies, the operating conditions of power grids are becoming increasingly complex. Issues such as power grid intensity fluctuations, new energy output fluctuations, and sudden load changes pose severe challenges to power grid stability and power quality. Virtual impedance regulation technology, as one of the core methods in the field of power system control, has become a key technical support for solving power grid stability problems due to its advantages of requiring no additional hardware investment, being flexible and controllable, and being able to effectively reshape the system impedance characteristics. Its importance is becoming increasingly prominent in modern power grid operation.
[0003] Chinese invention patent application CN119518926A discloses a virtual synchronous machine grid-connected system and its virtual impedance control method, device, and medium. The technical solution includes the following steps: injecting a sine wave into the grid-connected system; determining the line impedance of the grid-connected system based on the sine wave response information; determining the actual short-circuit ratio of the grid-connected system based on the line impedance; when the actual short-circuit ratio is less than the critical short-circuit ratio, determining a first virtual impedance and a second virtual impedance based on the rated information of the grid-connected system, the short-circuit ratio threshold, and the line inductance; determining the operating state of the grid-connected system based on the active power of the grid-connected system; in the first operating state, connecting the first virtual impedance to the grid-connected system; in the second operating state, connecting the second virtual impedance to the grid-connected system; however, the above technical solution only presets two fixed virtual impedances and adopts... The "switching" regulation logic cannot adapt to dynamic operating conditions such as fluctuations in the grid short-circuit ratio and sudden changes in impedance parameters. It is difficult to provide optimal damping in real time and is prone to regulation lag or over-regulation under complex operating conditions. At the same time, the above technical solution does not have a detection link for resonant frequency and impedance amplitude, and cannot identify the resonance risk caused by the interaction between the grid and virtual impedance. This may lead to problems such as voltage distortion and power oscillation, affecting the stability of the system. In addition, the virtual impedance parameters of the above technical solution are set based on fixed conditions such as grid-connected system rated information and short-circuit ratio threshold, without dynamic optimization strategy. In complex environments such as weak grids, the control effect is easily weakened and the adaptability is poor.
[0004] Therefore, there is an urgent need for a virtual impedance regulation method that can combine key power grid indicators, dynamically optimize parameters, and adaptively suppress risks. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention proposes a method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio.
[0006] The technical solution of the present invention is as follows: On the one hand, this invention proposes a method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio, the method comprising: Collect the short-circuit capacity at the grid connection point and the rated active power of the grid-connected converter; The short-circuit capacity and rated active power are input into the short-circuit ratio calculation model constructed based on the equivalent topology and line parameters of the power grid system to obtain the initial power grid short-circuit ratio; the Kalman filter algorithm is used to perform state estimation on the initial power grid short-circuit ratio to obtain the final power grid short-circuit ratio. Determine whether the current grid short-circuit ratio is within the preset short-circuit ratio threshold range; if it is, continue to detect the grid connection point status for the next sampling; otherwise, perform online scanning of the virtual impedance to identify the resonant frequency and impedance amplitude; if the impedance amplitude exceeds the preset amplitude limit and the resonant frequency exists, calculate the composite error signal based on the resonant frequency deviation and impedance amplitude deviation. The composite error signal is input into an adjustable nonlinear function constructed based on a fuzzy control algorithm to calculate the adjustment amount of the virtual impedance, and the virtual impedance is updated based on the adjustment amount of the virtual impedance.
[0007] Preferably, the Kalman filter algorithm is used to estimate the state of the initial power grid short-circuit ratio. The specific steps are as follows: A state-space model is established based on the initial grid short-circuit ratio, including state equations and observation equations; Initial state prediction, error covariance prediction, process noise covariance, and measurement noise covariance; Update the current state prediction value based on the state-space model; Based on the process noise covariance and the predicted error covariance of the previous time step, the predicted error covariance of the current time step is obtained. The Kalman gain coefficient is obtained based on the predicted error covariance and measurement noise covariance at the current moment. If the Kalman gain coefficient is greater than the error covariance prediction value at the current time, then the current state prediction value and the error covariance prediction value at the current time are updated using the current state prediction value; otherwise, the current observation value is used to update the current state prediction value and the error covariance prediction value at the current time. The above process is iterated until the preset maximum number of iterations is reached, then the iteration is stopped, the final state prediction value is obtained, and it is used as the grid short-circuit ratio at the current moment.
[0008] Preferably, a residual detection mechanism is introduced to update the process noise covariance and measurement noise covariance.
[0009] Preferably, the composite error signal is calculated based on the resonant frequency deviation and the impedance amplitude deviation, and the specific steps are as follows: The resonant frequency deviation is obtained based on the difference between the resonant frequency and the preset safety frequency. The impedance amplitude deviation is obtained based on the difference between the impedance amplitude and the preset safety impedance. The composite error signal is obtained by weighting the resonant frequency deviation and impedance amplitude deviation with their corresponding weights. Specifically, the resonant frequency deviation and impedance amplitude deviation at the current moment are input into the corresponding monotonically increasing function to adaptively adjust the weights.
[0010] Preferably, an adjustable nonlinear function is constructed based on a fuzzy control algorithm, and the specific steps are as follows: The grid short-circuit ratio deviation, resonant frequency deviation, and impedance amplitude deviation are fuzzified to obtain linguistic variables; among them, the grid short-circuit ratio deviation is obtained based on the difference between the current grid short-circuit ratio and the preset grid short-circuit ratio reference value. The linguistic variables are mapped to a preset fuzzy control rule base to obtain fuzzy output quantities.
[0011] Preferably, reinforcement learning is used to fine-tune the fuzzy output, and the specific steps are as follows: Construct the state vector and parameter action space; A reward function is constructed based on resonant frequency deviation, grid short-circuit ratio deviation, and impedance amplitude deviation. A Q-value table is constructed based on the reward function, learning rate, and discount factor; Input the state vector and parameter action space into the Q-value table to obtain the parameter action list; Use a greedy strategy to select the action that maximizes the Q value from the list of parameter actions, and output the parameter fine-tuning amount corresponding to the action with the maximum value. Add the fuzzy output and the parameter fine-tuning amount to obtain the final parameter adjustment amount; The parameters of the adjustable nonlinear function are updated based on the final parameter adjustment.
[0012] Preferably, the learning rate is dynamically adjusted based on a reward function; The discount factor is dynamically adjusted based on the resonant frequency deviation; The Q-value table was updated based on the adjusted learning rate and discount factor. Preferably, the adjustment amount of the virtual impedance is calculated using the following method: ; In the formula, Indicates the first The adjustment amount of the virtual impedance at each sampling time; Indicates the first Virtual impedance at each sampling time; This indicates the preset maximum virtual impedance change. Indicates the first The composite error signal at each sampling time; This represents the slope of an adjustable nonlinear function; This represents the offset of an adjustable nonlinear function; This represents the amplitude of the adjustable nonlinear function.
[0013] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the present invention.
[0014] In another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the present invention.
[0015] The present invention has the following beneficial effects: 1. This invention uses the Kalman filter algorithm to estimate the short-circuit ratio and combines it with a residual detection mechanism to dynamically adjust the noise covariance, thereby improving the accuracy and tracking speed of short-circuit ratio calculation under sudden changes in power grid parameters or measurement noise interference. By using an adjustable nonlinear function to calculate the virtual impedance adjustment amount and combining fuzzy control and reinforcement learning to optimize the function parameters in real time, the virtual impedance adjustment process is smooth and responsive, and can adaptively adjust according to changes in power grid operating conditions, avoiding system oscillations caused by sudden impedance changes. 2. This invention achieves multi-objective coordinated control by integrating multi-source information such as short-circuit ratio deviation, resonant frequency deviation, and impedance amplitude deviation, and combining error signals with an adaptive weighting mechanism. This suppresses resonance while maintaining the short-circuit ratio within a safe range. By co-optimizing control parameters through a fuzzy control rule base and reinforcement learning, it improves the adaptability to weak grid environments with low short-circuit ratios and high grid impedance, enhances the coordination between virtual impedance and grid impedance, avoids weakening of control effect, and ensures stable operation under various working conditions. 3. This invention accurately identifies the resonant frequency and impedance amplitude by scanning the frequency response characteristics of the virtual impedance online, and constructs a composite error signal with adaptive weights to drive the virtual impedance to provide damping at the resonant point, thereby reshaping the system impedance characteristics and suppressing the resonance phenomenon. Attached Figure Description
[0016] Figure 1 This is a detailed flowchart of an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.
[0019] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0020] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0021] The term “and / or” refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes these combinations.
[0022] Example 1: See Figure 1 This invention provides a method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio, the method comprising: S1. Collect the short-circuit capacity of the grid connection point and the rated active power of the grid-connected converter; S2. Input the short-circuit capacity and rated active power into the short-circuit ratio calculation model constructed based on the equivalent topology and line parameters of the power grid system to obtain the initial power grid short-circuit ratio. The calculation method is as follows: ; In the formula, Indicates the first The power grid short-circuit ratio at each sampling time; Indicates the first Short-circuit capacity at each sampling time; Indicates the first Rated active power at each sampling time; S3. The Kalman filter algorithm is used to estimate the state of the initial grid short-circuit ratio to obtain the grid short-circuit ratio; S31. Establish a state-space model based on the initial grid short-circuit ratio, including state equations and observation equations; The state equation is expressed as: ,in, Indicates the first The power grid short-circuit ratio at each sampling time. Indicates the first The process noise at each sampling time is used to reflect the random changes in power grid parameters; The observation equation is expressed as: ,in, Indicates the first The observations at each sampling time point, Indicates the first The measurement noise at each sampling time is used to reflect sampling and calculation errors; Initial state prediction value , indicating in When = 0, the best guess for the grid short-circuit ratio; Initialize error covariance prediction values , indicating in When =0, for The quantification of uncertainty, in which, The larger the value, the more it indicates The less trustworthy; Initialization process noise covariance , indicating process noise The strength, The larger the value, the more drastic and difficult it is to predict the changes in the power grid state; Initialize measurement noise covariance , indicating measurement noise The strength, The larger the value, the less reliable the power grid short-circuit ratio; Update the current state prediction value based on the state-space model, specifically: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] The posterior value of the state prediction value at the sampling time is used as the th sampling time. Prior values at each sampling time ; Based on the process noise covariance and the predicted error covariance from the previous time step, the predicted error covariance for the current time step is obtained. The calculation method is as follows: ; In the formula, Indicates the first The posterior value of the predicted error covariance at each sampling time; Indicates the first The prior value of the error covariance prediction value at each sampling time; Based on the predicted error covariance and measurement noise covariance at the current moment, the Kalman gain coefficient is obtained, calculated as follows: ; In the formula, Indicates the first Kalman gain coefficients at each sampling time; If the Kalman gain coefficient is greater than the error covariance prediction value at the current time, then the state prediction value at the current time and the error covariance prediction value at the current time are updated using the state prediction value at the current time. ; ; In the formula, Indicates the first The impedance amplitude at each sampling time; Otherwise, the current state prediction and error covariance prediction are updated using the current observation values; ; ; Iterate through the above process until the preset maximum number of iterations is reached, then stop iterating, obtain the final state prediction value, and use it as the grid short-circuit ratio at the current moment; S32. A residual detection mechanism is introduced to update the process noise covariance and measurement noise covariance. The calculation method is as follows: ; ; ; In the formula, Indicates the first Process noise covariance at each sampling time; The adaptive coefficient representing the preset process noise; Residual The variance; Indicates the first Measurement noise covariance at each sampling time; This represents the adaptive coefficient for the preset measurement noise; Indicates based on Always Predicted value of the grid short-circuit ratio at any given time; By introducing a residual detection mechanism, the accuracy of the state-space model in predicting the short-circuit ratio during power grid abrupt changes can be improved. S4. Determine whether the current power grid short-circuit ratio is within the preset short-circuit ratio threshold range; If it is, continue to detect the grid connection point status for the next sampling; S5. Otherwise, perform an online scan of the virtual impedance to identify the resonant frequency and impedance amplitude. The resonant frequency range covers 50Hz-500Hz, the impedance amplitude is 0.5%-2% of the rated voltage, and the harmonic disturbance signal is a frequency sweep signal to ensure that it can effectively excite the system impedance characteristics without excessively affecting the power quality. Online scanning means finding the frequency point on the frequency response curve where the impedance amplitude has a significant peak value, which is the resonant frequency. S6. If the impedance amplitude exceeds the preset amplitude limit and a resonant frequency exists, then calculate the composite error signal based on the resonant frequency deviation and the impedance amplitude deviation. The specific steps are as follows: The resonant frequency deviation is obtained based on the difference between the resonant frequency and the preset safety frequency. The calculation method is as follows: ; In the formula, Indicates the resonant frequency deviation; Indicates the resonant frequency; Indicates the preset safety frequency; The impedance amplitude deviation is obtained based on the difference between the impedance amplitude and the preset safety impedance. The calculation method is as follows: ; In the formula, Indicates impedance amplitude deviation; Indicates the impedance magnitude; Indicates the preset safety impedance; The composite error signal is obtained by weighting the resonant frequency deviation and impedance amplitude deviation with their corresponding weights. The calculation method is as follows: ; In the formula, Indicates the first The composite error signal at each sampling time; Indicates the first The weight of the resonant frequency deviation at each sampling time; Indicates the first The weight of the impedance amplitude deviation at each sampling time; Indicates the first The resonant frequency deviation at each sampling moment; Indicates the first Impedance amplitude deviation at each sampling time; Specifically, the resonant frequency deviation and impedance amplitude deviation at the current moment are input into the corresponding monotonically increasing function to adaptively adjust the weights. The calculation method is as follows: ; ; In the formula, Indicates the first The weight of the resonant frequency deviation at each sampling time; Indicates the first The weight of the impedance amplitude deviation at each sampling time; A monotonically increasing function representing the weight of the resonant frequency deviation; The weighting of the impedance magnitude deviation is a monotonically increasing function; where, and The larger the absolute value of the deviation, the greater the adjustment of its corresponding weighting coefficient, so that the updated virtual impedance can respond to both frequency shift and oscillation intensity, thereby enhancing the robustness of the power system in complex operating environments. S7. Construct an adjustable nonlinear function based on the fuzzy control algorithm. The specific steps are as follows: The grid short-circuit ratio deviation, resonant frequency deviation, and impedance amplitude deviation are fuzzified to obtain linguistic variables; among them, the grid short-circuit ratio deviation is obtained based on the difference between the current grid short-circuit ratio and the preset grid short-circuit ratio reference value, and the calculation method is as follows: ; In the formula, Indicates the deviation of the power grid short-circuit ratio; This indicates the preset reference value for the power grid short-circuit ratio; The language variables are represented as follows: : {Negative Large (NB), Negative Medium (NM), Zero (ZE), Positive Medium (PM), Positive Large (PB)}; : {Negative Large (NB), Negative Medium (NM), Zero (ZE), Positive Medium (PM), Positive Large (PB)}; : {Negative Large (NB), Negative Medium (NM), Zero (ZE), Positive Medium (PM), Positive Large (PB)}; By mapping the linguistic variables to a preset fuzzy control rule base, the fuzzy output quantity is represented as follows: ; In the formula, This represents the slope of an adjustable nonlinear function; This represents the offset of an adjustable nonlinear function; This represents the amplitude of the adjustable nonlinear function; express The optimal value; express The upper limit of safety; This indicates the preset first adjustment amount; This indicates the preset second adjustment amount; The specific rules of the fuzzy control rule base are as follows: when When the voltage is positive (PB), the power grid is too strong and needs to be reduced. To reduce virtual impedance sensitivity; when When the value is negative (NB), the power grid is too weak and needs to be increased. To improve virtual impedance sensitivity; regardless For PB or NB, directly... Set as the preset optimal value Quickly locate the resonance suppression point; when When the value is positive (PB), the actual impedance is too high and needs to be limited. Not exceeding the safety limit To avoid overdamping; when When the value is negative (NB), the actual impedance is too low and needs to be increased. To improve damping capacity; In this embodiment, , , ; S8. Fine-tune the fuzzy output using reinforcement learning. The fuzzy output includes the grid short-circuit ratio deviation, resonant frequency deviation, and impedance amplitude deviation. The specific steps are as follows: Construct the state vector and parameter action space, where: The state vector is represented as ,in, Indicates the first The state vector at each sampling time. Indicates the first The impedance amplitude at each sampling time; The action space is represented as ,in, Indicates the first The action space at each sampling moment This indicates the fine-tuning step size of the slope. This indicates the fine-tuning step size of the offset. This indicates the fine-tuning step size of the amplitude; A reward function is constructed based on the resonant frequency deviation, grid short-circuit ratio deviation, and impedance amplitude deviation. The calculation method is as follows: ; In the formula, Indicates the first The reward function for each sampling time step; This represents the preset reward weight for resonance suppression; This indicates the reward weight for the preset grid short-circuit ratio; This represents the reward weight for the preset impedance amplitude deviation; A Q-value table is constructed based on the reward function, learning rate, and discount factor, and the calculation method is as follows: ; In the formula, Indicates the learning rate; Indicates the discount factor; Represents the maximum value function; Input the state vector and parameter action space into the Q-value table to obtain the parameter action list; Using a greedy strategy, select the action that maximizes the Q value from the list of parameter actions, and output the parameter fine-tuning amount corresponding to the action with the maximum value. ; The final parameter adjustment is obtained by adding the fuzzy output and the parameter fine-tuning amount. The calculation method is as follows: ; In the formula, Indicates the adjustment amount for the slope; Indicates the amount of offset adjustment; This indicates the adjustment amount of the amplitude; The fuzzy output representing the slope; The amount of fuzzy output representing the offset; The fuzzy output value represents the amplitude; The parameters of the adjustable nonlinear function are updated based on the final parameter adjustment amount, and the calculation method is as follows: ; In the formula, Indicates the first The slope at each sampling time; Indicates the first The offset at each sampling time; Indicates the first The amplitude at each sampling time; Indicates the first The slope at each sampling time; Indicates the first The offset at each sampling time; Indicates the first The amplitude at each sampling time; S9. The learning rate is dynamically adjusted based on the reward function, expressed as follows: ,in, Indicates the first The learning rate at each sampling time. This represents the preset base learning rate. Indicates the adaptive coefficient; When the variance of the reward function A larger value indicates grid instability, and increasing it accelerates learning; when the reward variance is large... When the value is small, reduce it to ensure stable updates; The discount factor is dynamically adjusted based on the resonant frequency deviation and is expressed as follows: ,in, Indicates the first The discount factor at each sampling time. This represents the preset base discount factor; When the resonant frequency deviation When the resonant frequency deviation is large, increase to emphasize long-term suppression; when the resonant frequency deviation is large... When the size is small, reduce it to allow for immediate adjustments; The Q-value table is updated based on the adjusted learning rate and discount factor; In this embodiment, let Limiting the learning rate to a small range allows reinforcement learning algorithms to focus more on long-term reward trends and avoid being misled by single noise interferences. This ensures the stability and safety of control behavior in real-time, noisy power grid environments and prevents the learning process itself from becoming a new source of instability. make By limiting the learning rate to a large range, the reinforcement learning algorithm is ensured that it will not push the system parameters to the edge of instability in order to optimize the indicators in an instant. This ensures the long-term nature and purpose of the learning strategy, so that it always serves the core goal of long-term stable operation of the power grid. S10. Input the composite error signal into the adjustable nonlinear function constructed based on the fuzzy control algorithm, and calculate the adjustment amount of the virtual impedance. The calculation method is as follows: ; In the formula, Indicates the first The adjustment amount of the virtual impedance at each sampling time; Indicates the first Virtual impedance at each sampling time; This indicates the preset maximum virtual impedance change. S11, and update the virtual impedance based on the adjustment amount of the virtual impedance.
[0023] Example 2: This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio as described in any one of Embodiment 1.
[0024] Example 3: This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio as described in any one of Embodiment 1.
[0025] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0026] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0027] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0028] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, 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 described in the various embodiments of this application. 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.
[0029] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for dynamic adjustment of virtual impedance based on the short-circuit ratio of the power grid, characterized in that, The method includes: Collect the short-circuit capacity at the grid connection point and the rated active power of the grid-connected converter; The short-circuit capacity and rated active power are input into the short-circuit ratio calculation model constructed based on the equivalent topology and line parameters of the power grid system to obtain the initial power grid short-circuit ratio; the Kalman filter algorithm is used to perform state estimation on the initial power grid short-circuit ratio to obtain the final power grid short-circuit ratio. Determine whether the current grid short-circuit ratio is within the preset short-circuit ratio threshold range; if it is, continue to detect the grid connection point status for the next sampling; otherwise, perform online scanning of the virtual impedance to identify the resonant frequency and impedance amplitude; if the impedance amplitude exceeds the preset amplitude limit and the resonant frequency exists, calculate the composite error signal based on the resonant frequency deviation and impedance amplitude deviation. The composite error signal is input into an adjustable nonlinear function constructed based on a fuzzy control algorithm to calculate the adjustment amount of the virtual impedance, and the virtual impedance is updated based on the adjustment amount of the virtual impedance.
2. The method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio according to claim 1, characterized in that, The Kalman filter algorithm is used to estimate the state of the initial power grid short-circuit ratio. The specific steps are as follows: A state-space model is established based on the initial grid short-circuit ratio, including state equations and observation equations; Initial state prediction, error covariance prediction, process noise covariance, and measurement noise covariance; The initial state predictions and observations are updated based on the state-space model; Based on the process noise covariance and the predicted error covariance at the current time, the predicted error covariance at the current time is obtained. The Kalman gain coefficient is obtained based on the predicted error covariance and measurement noise covariance at the current moment. If the Kalman gain coefficient is greater than the error covariance prediction value at the current time, then the state prediction value at the current time and the error covariance prediction value at the current time are updated using the state prediction value at the current time. Otherwise, the current state prediction and error covariance prediction are updated using the current observation values; The above process is iterated until the preset maximum number of iterations is reached, then the iteration is stopped, the final state prediction value is obtained, and it is used as the grid short-circuit ratio at the current moment.
3. The method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio according to claim 2, characterized in that, A residual detection mechanism is introduced to update the process noise covariance and measurement noise covariance.
4. The method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio according to claim 1, characterized in that, The specific steps for calculating the composite error signal based on the resonant frequency deviation and impedance amplitude deviation are as follows: The resonant frequency deviation is obtained based on the difference between the resonant frequency and the preset safety frequency. The impedance amplitude deviation is obtained based on the difference between the impedance amplitude and the preset safety impedance. The composite error signal is obtained by weighting the resonant frequency deviation and impedance amplitude deviation with their corresponding weights. Specifically, the resonant frequency deviation and impedance amplitude deviation at the current moment are input into the corresponding monotonically increasing function to adaptively adjust the weights.
5. The method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio according to claim 4, characterized in that, The specific steps for constructing an adjustable nonlinear function based on the fuzzy control algorithm are as follows: The grid short-circuit ratio deviation, resonant frequency deviation, and impedance amplitude deviation are fuzzified to obtain linguistic variables; among them, the grid short-circuit ratio deviation is obtained based on the difference between the current grid short-circuit ratio and the preset grid short-circuit ratio reference value. The linguistic variables are mapped to a preset fuzzy control rule base to obtain fuzzy output quantities.
6. The method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio according to claim 5, characterized in that, The specific steps for fine-tuning the fuzzy output using reinforcement learning are as follows: Construct the state vector and parameter action space; A reward function is constructed based on resonant frequency deviation, grid short-circuit ratio deviation, and impedance amplitude deviation. A Q-value table is constructed based on the reward function, learning rate, and discount factor; Input the state vector and parameter action space into the Q-value table to obtain the parameter action list; Use a greedy strategy to select the action that maximizes the Q value from the list of parameter actions, and output the parameter fine-tuning amount corresponding to the action with the maximum value. Add the fuzzy output and the parameter fine-tuning amount to obtain the final parameter adjustment amount; The parameters of the adjustable nonlinear function are updated based on the final parameter adjustment.
7. The method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio according to claim 6, characterized in that, The learning rate is dynamically adjusted based on the reward function; The discount factor is dynamically adjusted based on the resonant frequency deviation; The Q-value table is updated based on the adjusted learning rate and discount factor.
8. The method for dynamic adjustment of virtual impedance based on the grid short-circuit ratio according to claim 7, characterized in that, The adjustment amount of the virtual impedance is calculated as follows: ; In the formula, Indicates the first The adjustment amount of the virtual impedance at each sampling time; Indicates the first Virtual impedance at each sampling time; This indicates the preset maximum virtual impedance change. Indicates the first The composite error signal at each sampling time; This represents the slope of an adjustable nonlinear function; This represents the offset of an adjustable nonlinear function; This represents the amplitude of the adjustable nonlinear function.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.