Data and model fusion driven power grid impedance online evaluation method, system, equipment and medium

By injecting disturbance current into the power grid and combining it with a mechanism model and a data-driven model, real-time assessment of power grid impedance is achieved. This solves the problems of accuracy and real-time performance in power grid impedance identification in existing technologies, and improves power grid stability and the normal operation of the inverter.

CN120955598APending Publication Date: 2025-11-14GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510787578.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing grid impedance identification methods have limitations in terms of accuracy and real-time performance, making it difficult to effectively predict the stability of grid-connected inverters and the grid in weak grid environments.

Method used

By combining mechanistic models and data-driven models, and by injecting disturbance current into grid-connected inverters, measuring voltage and current waveforms and performing spectrum analysis, a data-driven model based on artificial neural networks is established. The parameters of the mechanistic model are dynamically corrected to achieve real-time assessment of grid impedance.

Benefits of technology

It improves the accuracy and real-time performance of grid impedance analysis, enabling rapid and reliable identification of grid impedance, reducing the impact on the normal operation of the inverter, and enhancing the stability and accuracy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120955598A_ABST
    Figure CN120955598A_ABST
Patent Text Reader

Abstract

The invention discloses a data and model fusion driven power grid impedance online evaluation method, system, equipment and medium, and belongs to the technical field of power electronics, and the method comprises the steps: constructing a power grid impedance equivalent model under a weak power grid condition, introducing a disturbance instruction in a grid-connected inverter control link, and injecting a disturbance current into a power grid; collecting voltage and current waveforms before and after disturbance injection, and performing fast Fourier transform to obtain frequency spectrum data; calculating an impedance spectrum according to the spectrum result; constructing a mechanism model based on the Thevenin theory, establishing an artificial neural network data model, and performing fitting prediction on impedance; a data model and a mechanism model are fused, model parameters are corrected in real time, accurate sensing of the broadband impedance of the power grid is achieved based on part of frequency spectrum information, and the problems of accuracy of mechanism modeling and generalization of data-driven modeling are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power electronics technology, specifically to a data and model-driven online assessment method, system, device, and medium for power grid impedance. Background Technology

[0002] With the construction of new power systems, the scale of distributed independent power generation systems such as wind power and photovoltaic power generation connected to the grid is constantly expanding. Simultaneously, the increasing proportion of power electronic conversion interface loads in the total grid load makes the grid load characteristics more complex than before, and the grid is gradually exhibiting characteristics of a weak grid. A significant grid impedance exists between the grid-connected inverter and the grid at the common coupling point. According to the Nyquist stability criterion, grid impedance affects the stability of the grid-connected inverter; a mismatch between the inverter's output impedance and the grid impedance will induce broadband oscillations. Therefore, accurate and online identification of the complex grid's broadband impedance is crucial for the stability of the interaction between the grid-connected inverter and the grid.

[0003] Existing methods for identifying power grid impedance primarily rely on model building for prediction. Power grid impedance modeling methods can be categorized into two types: mechanistic modeling and data modeling. Mechanistic modeling is a mathematical modeling method based on the internal mechanisms of an object. Its advantages include parameters with clear physical meanings, ease of adjustment, and a wide range of applicability. However, it is often difficult to obtain accurate mathematical expressions, as some coefficients in the expressions are hard to determine. If these problems are not adequately addressed, the effectiveness of the overall structural modeling cannot be guaranteed. Furthermore, the accuracy of parameters in mechanistic models highly depends on the engineer's experience; to ensure the model's solution, a series of approximate assumptions must be made, making it difficult to obtain a satisfactory model. Considering all parameters of power grid impedance requires significant effort and also necessitates taking into account complex physical couplings, which often leads to complex equations that are difficult to solve.

[0004] Compared to mechanistic modeling, data-driven modeling (also known as black-box modeling) can bypass complex mechanisms and establish corresponding mapping models through the relationships between data. Artificial neural networks, simulating the adaptive connections of neurons in the brain, can learn and interpret external data by adjusting their internal parameters, making them an ideal tool for data-driven modeling. According to the Universal Approximation Theorem (UAT), any continuous function can be approximated with sufficient accuracy by a feedforward network with a linear output layer and at least one hidden layer with suitable nonlinear elements. The advantages of data-driven modeling are its speed and high accuracy. However, the internal working mechanisms of data-driven models are difficult to understand or even interpret, and the models have poor generalization ability—these are fatal flaws of data-driven modeling. In most cases, the operating conditions of the power grid are often different, and a data-driven model built for one type of grid impedance cannot be well applied to other converters, which limits the development of data-driven modeling. How to overcome these shortcomings of data-driven modeling and improve its performance is a current research hotspot.

[0005] In summary, current methods for identifying power grid impedance through model building have certain limitations. Considering the complexity of power grid impedance identification, there is an urgent need for a fast, reliable, and real-time online method for assessing power grid impedance. Summary of the Invention

[0006] In view of the above-mentioned problems, the present invention is proposed.

[0007] Therefore, the technical problem solved by this invention is: how to achieve effective prediction of grid impedance by integrating the interpretability of the mechanistic model of grid impedance with the high accuracy of the data-driven model, and improve the accuracy of impedance analysis and real-time measurement under weak grid conditions.

[0008] To address the aforementioned technical problems, this invention provides the following technical solution: a data and model fusion-driven online power grid impedance assessment method, comprising,

[0009] Based on the analysis of the impedance characteristics of distributed power grids, an impedance model of grid-connected inverters and power grids under weak power grid conditions is established.

[0010] In the model, a disturbance command is added to the control loop of the grid-connected inverter to control the output disturbance current of the inverter and inject disturbance current into the grid.

[0011] In the model, the voltage and current waveforms of the grid coupling point are measured within one cycle before and after the disturbance injection. Based on the comparison of the voltage and current waveforms before and after the disturbance, the voltage and current signals generated by the disturbance are obtained, and the spectrum data is obtained through fast Fourier transform.

[0012] Based on the collected voltage and current spectrum data, data processing and analysis are performed to extract the voltage and current spectrum data and calculate the impedance spectrum.

[0013] A mechanistic model of equivalent grid impedance is constructed using Thevenin's equivalent method;

[0014] A power grid impedance data-driven model based on artificial neural networks is established. The extracted data is normalized and a loss function is designed. The dataset is put into the artificial neural network for preliminary training of the nonlinear mapping from input features to output features of the power grid impedance data-driven model.

[0015] By combining mechanistic and data-driven models, a data-mechanistic hybrid model of grid impedance is obtained. By designing a loss function, the parameters of the mechanistic model are finally corrected and optimized in real time so that its output approximates the true value.

[0016] As a preferred embodiment of the online grid impedance assessment method driven by data and model fusion described in this invention, the disturbance command includes adding a single-pulse triangular disturbance current to the current loop control of the grid-connected inverter in the equivalent model.

[0017] As a preferred embodiment of the online power grid impedance assessment method driven by data and model fusion described in this invention, the method of injecting disturbance current into the power grid includes injecting a single pulse current at the zero-crossing point or peak value of the current at the grid coupling point.

[0018] The disturbance current includes selecting a single-pulse current to shorten the current injection time, so that the effect of the disturbance current is completed within one cycle, thereby reducing the impact of the injected current on the normal operation of the grid-connected inverter.

[0019] As a preferred embodiment of the online power grid impedance assessment method driven by data and model fusion described in this invention, the measurement of the voltage and current waveforms of the grid coupling point within one cycle before and after the disturbance injection includes measuring the voltage and current waveforms of the grid coupling point within one cycle before the disturbance is generated, and the voltage and current waveforms of the grid coupling point within one cycle after the disturbance is generated.

[0020] The step of obtaining the voltage and current signals generated by the disturbance based on the comparison of voltage and current waveforms before and after the disturbance includes subtracting the measured current value after the disturbance from the measured current value before the disturbance point by point to obtain the actual disturbance current; and subtracting the measured voltage value after the disturbance from the measured voltage value before the disturbance point by point to obtain the actual disturbance voltage.

[0021] As a preferred embodiment of the online power grid impedance assessment method driven by data and model fusion described in this invention, the step of obtaining spectral data through fast Fourier transform includes performing fast Fourier analysis on the actual disturbance current and disturbance voltage to obtain the spectral data of the disturbance current and voltage.

[0022] The data processing and analysis based on the collected voltage and current spectrum data includes, using 1% of the fundamental frequency component amplitude as a benchmark, removing data with small current amplitude in the high-frequency band of the spectrum data and the voltage at the corresponding frequency, retaining data below 700Hz and 1200Hz, to obtain current and voltage spectrum data, and obtaining the impedance spectrum based on the current / voltage spectrum data.

[0023] As a preferred embodiment of the online power grid impedance assessment method driven by data and model fusion described in this invention, the mechanism model for constructing the equivalent power grid impedance through Thevenin equivalence includes, specifically, the equivalent resistance representing power loss, the equivalent inductance representing electromagnetic effects, and the power grid voltage.

[0024] As a preferred embodiment of the online power grid impedance assessment method driven by data and model fusion described in this invention, the power grid impedance data-driven model based on artificial neural network includes a three-layer neural network trained using the backpropagation algorithm. The ANN consists of an input layer, a hidden layer, and an output layer, and the activation functions of the hidden layer and the output layer are the ReLU function and a linear function, respectively.

[0025] The input variables are the normalized fundamental voltage, fundamental current, and impedance spectrum, and the output variable is the grid impedance.

[0026] Another objective of this invention is to provide a data and model-driven online power grid impedance assessment system.

[0027] To solve the above technical problems, the present invention provides the following technical solution: a data and model fusion-driven online grid impedance assessment system, comprising: a model modeling module, used to establish a grid-connected inverter and grid impedance model under weak grid conditions based on the analysis of the impedance characteristics of distributed grids;

[0028] The disturbance control module is used in the model to control the output disturbance current of the inverter and inject disturbance current into the grid by adding disturbance commands to the control loop of the grid-connected inverter.

[0029] The waveform acquisition module is used to measure the voltage and current waveforms of the grid-connected coupling point within one cycle before and after the disturbance injection in the model. Based on the comparison of the voltage and current waveforms before and after the disturbance, the voltage and current signals generated by the disturbance are obtained, and the spectrum data is obtained through fast Fourier transform.

[0030] The spectrum calculation module is used to process and analyze the collected voltage and current spectrum data, extract the voltage and current spectrum data, and calculate the impedance spectrum.

[0031] The mechanism modeling module is used to construct a mechanism model of the equivalent power grid impedance through the Thevenin equivalent.

[0032] The data modeling module is used to establish a power grid impedance data-driven model based on artificial neural networks. It normalizes the extracted data and designs a loss function. The dataset is put into the artificial neural network for preliminary training of the nonlinear mapping from input features to output features of the power grid impedance data-driven model.

[0033] The fusion optimization module is used to combine the mechanistic model and the data-driven model to obtain a data-mechanistic hybrid model of grid impedance. By designing a loss function, the parameters of the mechanistic model are finally corrected and optimized in real time so that its output approximates the true value.

[0034] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the data and model fusion driven online power grid impedance assessment method.

[0035] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the data and model fusion-driven online power grid impedance assessment method.

[0036] The beneficial effects of this invention are: by combining a power grid impedance mechanism model with a data-driven model, it offers advantages such as high accuracy and strong generalization ability. The entire process is based on partial spectral information, thereby achieving the perception of broadband power grid impedance.

[0037] An active measurement method is adopted, which uses the inverter controller to generate a disturbance, and extracts and calculates the impedance by collecting the corresponding response. The measurement time is not restricted.

[0038] The disturbance current uses pulsed current, with short injection time and dynamic amplitude matching the peak current of the coupling point, which significantly reduces the impact on the normal operation of the inverter, while ensuring the effective extraction of low-frequency harmonic information.

[0039] Spectral data below 700Hz and around 1200Hz are filtered based on the fundamental component amplitude threshold to eliminate high-frequency noise interference and improve the noise resistance and reliability of impedance spectrum calculation.

[0040] By dynamically correcting parameters using a hybrid model, online sensing of wideband impedance can be achieved with only limited data, supporting real-time tracking and stability assessment of grid impedance. Attached Figure Description

[0041] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 A flowchart illustrating a data and model fusion-driven online power grid impedance assessment method according to an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of the current waveform of the disturbance current injected at the simulation coupling point in a data and model fusion-driven online evaluation method for power grid impedance according to an embodiment of the present invention.

[0044] Figure 3 A schematic diagram of the simulated actual disturbance current waveform of a data and model fusion-driven online power grid impedance assessment method provided in an embodiment of the present invention;

[0045] Figure 4 The spectrum of the simulated actual disturbance current waveform of a data and model fusion-driven online power grid impedance assessment method provided in one embodiment of the present invention;

[0046] Figure 5 A circuit diagram of the Thevenin equivalent mechanism model of a data and model fusion-driven online power grid impedance assessment method provided in one embodiment of the present invention;

[0047] Figure 6 The diagram shows an artificial neural network structure for a data and model fusion-driven online power grid impedance assessment method according to an embodiment of the present invention.

[0048] Figure 7 This is a data-driven modeling flowchart of a data and model fusion-driven online power grid impedance assessment method provided in one embodiment of the present invention;

[0049] Figure 8 A data-mechanism hybrid model for power grid impedance is provided in one embodiment of the present invention for a data and model fusion-driven online assessment method for power grid impedance;

[0050] Figure 9 This invention provides a simulation model of grid-connected inverter and grid impedance for a data and model fusion-driven online grid impedance assessment method, as an embodiment of the present invention. Detailed Implementation

[0051] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0052] Example 1, referring to Figures 1-4 This is one embodiment of the present invention, which provides a data and model fusion-driven online assessment method for power grid impedance, including:

[0053] Step 1: Based on the analysis of the impedance characteristics of the distributed power grid, establish the impedance model of the grid-connected inverter and the power grid under the weak power grid.

[0054] Step 2: In this model, a disturbance command is added to the control loop of the grid-connected inverter to control the output disturbance current of the inverter and inject disturbance current into the grid.

[0055] Step 3: Measure the voltage and current waveforms at the grid coupling point within one cycle before and after the disturbance injection in the model. Based on the comparison of the voltage and current waveforms before and after the disturbance, obtain the voltage and current signals generated by the disturbance, and obtain the spectrum data through Fast Fourier Transform.

[0056] Step 4: Based on the collected voltage and current spectrum data, perform data processing and analysis, extract voltage and current spectrum data below 700Hz and around 1200Hz, and calculate the impedance spectrum.

[0057] Step 5: Construct a mechanistic model of the equivalent grid impedance using the Thevenin equivalent, including the equivalent resistance R. g and equivalent inductance L g .

[0058] Step 6: Establish a power grid impedance data-driven model based on an artificial neural network (ANN). Normalize the extracted data and design a loss function. Put the dataset into the artificial neural network to initially train the nonlinear mapping from input features to output features of the power grid impedance data-driven model.

[0059] Step 7: Combine the mechanistic model and the data-driven model to obtain a data-mechanistic hybrid model of grid impedance. By designing a loss function, the parameters of the mechanistic model are finally corrected and optimized so that its output approximates the true value. This enables effective prediction of grid impedance and improves the accuracy of impedance analysis and real-time measurement under weak grid conditions.

[0060] Example 1: Data Extraction and Spectrum Analysis

[0061] In step 2, a disturbance command is added to the control circuit of the grid-connected inverter, specifically as follows:

[0062] Grid impedance identification can be divided into passive and active methods. Passive methods primarily analyze grid impedance by identifying the transient processes of the grid-connected inverter. Their drawback is that impedance can only be measured when the inverter is in a transient state. This invention employs an active method, injecting a pulsed current into the grid to identify the grid impedance of the simulation model. This is achieved by adding a single-pulse triangular disturbance current ΔI to the current loop control of the grid-connected inverter. ref Choosing a single-pulse current shortens the current injection time, allowing the impact of the disturbance current to be completed within one cycle, thereby reducing the impact of the injected current on the normal operation of the grid-connected inverter and ensuring power supply quality. This disturbance current ΔI ref The amplitude is 0.4 to 0.8 times the peak current at the grid coupling point, with a positive rise time and a negative decay time of 1.25 ms. The injection time is selected at the zero-crossing point or peak point of the grid coupling point current to facilitate subsequent signal extraction and calculation.

[0063] In the simulation, a single-pulse reverse disturbance current with a peak value 0.6 times that of the reference current is superimposed on the original sinusoidal reference current. The disturbance occurs when the output current crosses zero. Figure 2 As shown, the dashed line represents the coupling point current waveform under normal operation of the grid-connected inverter, while the solid line represents the coupling point current waveform with added disturbance current. It can be clearly seen that the current fluctuates to a certain extent in a short period of time.

[0064] In step 3, the voltage and current waveforms at the grid coupling point are measured within one cycle before and after the disturbance injection. Based on the waveform comparison, the voltage and current signals generated by the disturbance are obtained, and the spectral data is obtained through a Fast Fourier Transform. Specifically, the implementation is as follows:

[0065] The voltage and current waveforms at the grid-connected coupling point are measured within one cycle before and after the disturbance injection. Due to the real-time changes in grid impedance and grid frequency shift, the voltage and current waveforms before the disturbance should be selected from the cycle closest to the disturbance time to minimize the impact of these factors on measurement accuracy. The measured waveform is the grid-connected coupling point voltage waveform U within one cycle before the disturbance. pcc1 (t) and current waveform I pcc1 (t), the voltage waveform U at the grid coupling point within one cycle after the disturbance is generated. pcc2 (t) and current waveform I pcc2 (t).

[0066] Based on the comparison of voltage and current waveforms before and after the disturbance, the voltage and current signals generated by the disturbance are obtained, and calculated according to the following formula:

[0067]

[0068] Where, ΔI pcc (t) Subtract the measured current value after the disturbance from the measured current value before the disturbance point by point to obtain the actual disturbance current; ΔU pcc (t) is the actual disturbance voltage generated by the disturbance current, obtained by subtracting the measured voltage value before the disturbance from the measured voltage value after the disturbance point by point.

[0069] By analyzing ΔI pcc (t) and ΔU pcc (t) Perform a Fast Fourier Transform to obtain the spectral data ΔI pcc (j2πf k ), ΔU pcc (j2πf k ), where ΔU pcc (j2πf k () represents the frequency f k Voltage vector at point ΔI pcc (j2πf k Frequency f k The current vector at that point.

[0070] In the simulation, Figure 3 The actual generated disturbance current waveform is obtained by subtracting the current waveform of the previous cycle from the current waveform of the cycle following the disturbance point by point. To make the simulation results close to the actual circuit, the accuracy of the current waveform will be set to 0.4%.

[0071] In step 4, the collected voltage and current spectrum data are processed and analyzed to extract the voltage and current spectrum data below 700Hz and around 1200Hz and calculate the impedance spectrum. Specifically, the implementation is as follows:

[0072] Because single-pulse triangular waves have abundant harmonic content in the low-frequency band, the spectral information in the low-frequency band is mainly selected. According to the results of Fast Fourier Analysis, the harmonic amplitudes are relatively small near specific frequency bands such as 800Hz and 1600Hz; using data from these bands would increase the error in subsequent calculations, therefore, harmonic data from these frequencies are not used. Using 1% of the fundamental frequency component amplitude as a benchmark, data with small current amplitudes in the high-frequency band and their corresponding voltage values ​​are removed from the spectral data, while data below 700Hz and near 1200Hz are mainly retained, resulting in the current and voltage spectral data ΔI. pcc (j2πf i ), ΔU pcc (j2πf i The impedance spectrum ΔZ is obtained from the current / voltage spectrum data. pcc (j2πf i (i = 0, 1, 2, 3...):

[0073]

[0074] In the simulation, a sampling frequency of 10kHz and a fundamental frequency of 50Hz were selected. A Fast Fourier Transform was performed on the actual disturbance current waveform to obtain the following results: Figure 4 The spectrum diagram of the disturbance current waveform shown shows that the disturbance current has abundant harmonics in the low-frequency range, while the harmonic amplitude is smaller in the high-frequency range as the amplitude decays.

[0075] In a preferred embodiment of the present invention: the power grid impedance data-driven model adopts a three-layer backpropagation artificial neural network structure, wherein the input layer receives the normalized fundamental voltage, fundamental current, and impedance spectrum (a total of 50 frequency points), the hidden layer uses the ReLU activation function, and the output layer uses a linear activation function. The loss function of the data-driven model adopts the mean absolute error (MAE) function. Since the power grid may experience abnormal phenomena such as voltage fluctuations during operation, MAE is used to be robust to outliers. The backpropagation algorithm is combined to optimize the network weights, realizing a nonlinear mapping relationship between the input features and the target power grid impedance. The training dataset is divided into a training set, a validation set, and a test set in a 7:1.5:1.5 ratio, and the data normalization adopts a linear scaling method.

[0076] This preferred embodiment significantly improves the computational efficiency and accuracy of grid impedance prediction by employing a well-structured and convergent three-layer BP neural network, combined with feature normalization and the ReLU activation function, achieving rapid convergence even with limited training data. Compared to traditional modeling methods, this scheme exhibits excellent nonlinear fitting capabilities and scalability, and can accurately and stably identify grid impedance characteristics under various weak grid conditions. Furthermore, the use of MAE as the loss function enhances robustness to abnormal operating conditions, thereby improving the model's practicality and reliability in real-world power system environments.

[0077] In a preferred embodiment of the present invention, the voltage and current signals generated by the disturbance in step 3 are subjected to spectrum extraction using Fast Fourier Transform (FFT). Specifically, the voltage and current waveforms are acquired for one grid cycle before and after the disturbance injection, and the point-by-point difference between the two is calculated to obtain the actual disturbance signal. Then, an FFT is performed on the disturbance voltage and current signals to extract the spectrum vectors, where the fundamental frequency is 50Hz and the sampling frequency is 10kHz. Finally, the voltage and current spectrum vectors at the corresponding frequencies are obtained and used as input for subsequent impedance calculations and data modeling.

[0078] This preferred embodiment employs the classic Fast Fourier Transform (FFT) method, which is computationally efficient and simple to implement, enabling rapid extraction of the spectral characteristics of disturbance signals under standard sampling conditions. It features high frequency resolution and low computational load, making it particularly suitable for online processing in embedded controllers or real-time simulation systems. This method accurately reconstructs the amplitude characteristics of the disturbance signal at multiple frequency points, facilitating subsequent impedance calculations and feature engineering, thus comprehensively improving the real-time performance, accuracy, and engineering adaptability of the system's spectrum extraction.

[0079] Example 2, refer to Figures 5-8 As one embodiment of the present invention, based on the previous embodiment, a data and model fusion-driven online assessment method for power grid impedance is provided, comprising:

[0080] The mechanism model for constructing the equivalent grid impedance in step 5 is specifically implemented as follows:

[0081] A mechanistic model is a mathematical model built upon fundamental principles of physics, chemistry, or engineering, describing the intrinsic operating mechanism of a system through theoretical derivation. Its characteristics include: physical interpretability, theoretical impetus, and generalizability. Currently, distributed power grids typically consist of distributed generation equipment, transmission lines, transformers, and loads. Due to the uncertainty of load and generation equipment grid connection, grid impedance exhibits time-varying and resistive-inductive characteristics. Thevenin's theorem states that any linear active two-terminal network can be equivalently represented as a series connection of a voltage source (Thevenin voltage) and an impedance (Thevenin impedance). This invention utilizes Thevenin equivalence to construct an equivalent grid impedance model at the grid connection coupling point, such as... Figure 5 As shown, the impedance model parameters include the equivalent resistance R representing power loss (such as conductor heating and equipment loss), the equivalent inductance L representing electromagnetic effects (such as magnetic field energy storage and inductive load effects), and the grid voltage u. g In the mechanistic model, the Thevenin voltage corresponds to the grid voltage u. g Thevenin impedance is the same as the grid impedance Z. mech Grid impedance Z mech The following formula can be used for calculation:

[0082] Z mech (f;R,L)=R+j2πfL

[0083] In this model, resistance R and inductance L are parameters that need to be corrected. The impedance characteristics of a real power grid may change due to factors such as load fluctuations, equipment aging, and the integration of distributed power sources, causing R and L in the mechanistic model to deviate from their true values. The mechanistic model designed in this invention only requires correction of a small number of parameters (R and L), eliminating the need to train a complex black-box model from scratch and reducing reliance on large-scale labeled data.

[0084] Step 6, which involves constructing a power grid impedance data-driven model, is specifically implemented as follows:

[0085] Data modeling of grid impedance is performed based on artificial neural networks (ANNs). The input variable, fundamental voltage U, is selected to reflect the current state of the grid (e.g., voltage fluctuations, load level) based on the physical process of disturbance injection and its impact mechanism on grid impedance. f1 Fundamental current I f1 and the impedance spectrum ΔZ, which directly reflects the characteristics of the power grid. pcc (j2πf i (50 frequency points), the output variable is the mains impedance Z. data (f).

[0086] This invention employs a three-layer neural network trained using the backpropagation (BP) algorithm, such as... Figure 6 The ANN shown consists of an input layer, hidden layers, and an output layer. The activation functions for the hidden and output layers are ReLU and linear functions, respectively. This invention is a regression prediction of grid impedance. The non-saturation of ReLU (no gradient decay in the positive interval) can more efficiently propagate gradients, helping the network converge quickly. Furthermore, ReLU is particularly suitable for handling large-scale data (such as 50 frequency point input features). By using a data-driven model, complex coupling relationships can be bypassed, and the relationships between variables can be directly analyzed. This model can accurately and quickly estimate the grid impedance Z-resistance. data (f) and can achieve parallel prediction of multiple sets of data.

[0087] Because of the different dimensions and units of the data, directly feeding the raw data into a neural network can lead to problems such as poor convergence, long training time, and unreliable training results. Therefore, it is usually necessary to normalize the raw data before inputting it into the neural network, and then inversely normalize the output to obtain the final result. This invention uses a linear normalization method to preprocess the raw data:

[0088]

[0089] This method achieves proportional scaling of the original data, where x* represents the normalized data, x is the original data, and x... max and x min These are the maximum and minimum values ​​of the original dataset.

[0090] Finally, as Figure 7 The data-driven modeling process shown in this invention classifies the preprocessed dataset into a training set, a validation set, and a test set, accounting for 70%, 15%, and 15% respectively, and then puts the dataset into a neural network for training.

[0091] The loss function for designing the power grid impedance data-driven model in step 6 is specifically implemented as follows:

[0092] The loss function of the data-driven model adopts the Mean Absolute Error (MAE) function. Since the power grid may experience anomalies such as voltage fluctuations during operation, MAE is more robust to outliers than Mean Square Error (MSE). This loss function measures the absolute difference between the impedance of the simulation model and the output impedance of the data-driven model, thereby training the neural network to learn the nonlinear mapping from input features to output impedance. Specifically, it is expressed as follows:

[0093]

[0094] Among them: Z model (f; θ) represents the impedance of the simulation model; θ represents the neural network parameters. The neural network weights θ are adjusted through backpropagation to optimize the performance of the data-driven model.

[0095] The specific implementation of designing the data-mechanism hybrid model of grid impedance in step 7 is as follows:

[0096] To address the issues of accuracy in mechanistic modeling and generalization in data-driven modeling, this invention proposes the following... Figure 8 This paper presents a hybrid modeling method based on data and mechanistic modeling. The established data-driven model is used to correct uncertain parameters in the mechanistic model. By integrating the interpretability of the mechanistic model of grid impedance with the high accuracy of the data-driven model, effective prediction of grid impedance is achieved, improving the accuracy of impedance analysis and real-time measurement under weak grid conditions.

[0097] Using the output of the data-driven model as a benchmark, the parameters (R, L) of the mechanistic model are corrected through the data-driven model. If the loss function of the data-mechanistic hybrid model is defined as the MAE of the voltage / current spectrum values, it will lead to circular dependency. This is because the voltage / current spectrum calculation depends on the parameters (R, L), while the data-driven model needs to provide independent benchmark values. Therefore, the loss function of the data-mechanistic hybrid model is defined as the MAE of both the mechanistic model and the data-driven model. The impedance parameter values ​​are iteratively updated until convergence. The corrected R and L are then substituted into the mechanistic model to calculate the grid impedance Z in real time. onlinel (f):

[0098] Z online (f)=R online +j2πfL online

[0099] or

[0100] Example 3, referring to Figure 9This invention provides an online power grid impedance assessment method driven by data and model fusion, as one embodiment of the present invention. To verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.

[0101] The following simulation verification of the above-mentioned data and model fusion-driven online power grid impedance assessment method is performed. In Simulink, according to... Figure 9 The above method was verified in the simulation model that was built. The simulation parameters are shown in Table 1.

[0102] Table 1 Simulation Parameters

[0103]

[0104]

[0105] The impedance parameters of the mechanistic model were evaluated using the impedance data predicted by the data-driven model. The parameter values ​​corresponding to the minimum loss function were R = 0.1993Ω and L = 1.197mH, with relative errors of 0.85% and 1.5%, respectively. The comparison between the simulation results and the theoretical values ​​proved the feasibility of the proposed method from an experimental perspective.

[0106] Example 4 is an embodiment of the present invention, which provides a data and model fusion-driven online power grid impedance assessment system, comprising:

[0107] The modeling module is used to establish an impedance model of the grid-connected inverter and the grid under weak grid conditions based on the analysis of the impedance characteristics of the distributed power grid.

[0108] The disturbance control module is used in the model to control the output disturbance current of the inverter and inject disturbance current into the grid by adding disturbance commands to the control loop of the grid-connected inverter.

[0109] The waveform acquisition module is used to measure the voltage and current waveforms of the grid-connected coupling point within one cycle before and after the disturbance injection in the model. Based on the comparison of the voltage and current waveforms before and after the disturbance, the voltage and current signals generated by the disturbance are obtained, and the spectrum data is obtained through fast Fourier transform.

[0110] The spectrum calculation module is used to process and analyze the collected voltage and current spectrum data, extract the voltage and current spectrum data, and calculate the impedance spectrum.

[0111] The mechanism modeling module is used to construct a mechanism model of the equivalent power grid impedance through the Thevenin equivalent.

[0112] The data modeling module is used to establish a power grid impedance data-driven model based on artificial neural networks. It normalizes the extracted data and designs a loss function. The dataset is put into the artificial neural network for preliminary training of the nonlinear mapping from input features to output features of the power grid impedance data-driven model.

[0113] The fusion optimization module is used to combine the mechanistic model and the data-driven model to obtain a data-mechanistic hybrid model of grid impedance. By designing a loss function, the parameters of the mechanistic model are finally corrected and optimized so that its output approximates the true value.

[0114] This embodiment also provides an electronic device applicable to a data and model fusion-driven online power grid impedance assessment method, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the data and model fusion-driven online power grid impedance assessment method proposed in the above embodiment.

[0115] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a data and model fusion-driven online power grid impedance assessment method as proposed in the above embodiments.

[0116] The storage medium proposed in this embodiment belongs to the same inventive concept as the online power grid impedance assessment method driven by data and model fusion proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0117] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0118] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A data and model fusion-driven online power grid impedance assessment method, characterized in that: include, Based on the analysis of the impedance characteristics of distributed power grids, an impedance model of grid-connected inverters and power grids under weak power grid conditions is established. In the model, a disturbance command is added to the control loop of the grid-connected inverter to control the output disturbance current of the inverter and inject disturbance current into the grid. In the model, the voltage and current waveforms of the grid coupling point are measured within one cycle before and after the disturbance injection. Based on the comparison of the voltage and current waveforms before and after the disturbance, the voltage and current signals generated by the disturbance are obtained, and the spectrum data is obtained through fast Fourier transform. Based on the collected voltage and current spectrum data, data processing and analysis are performed to extract the voltage and current spectrum data and calculate the impedance spectrum. A mechanistic model of equivalent grid impedance is constructed using Thevenin's equivalent method; A power grid impedance data-driven model based on artificial neural networks is established. The extracted data is normalized and a loss function is designed. The dataset is put into the artificial neural network for preliminary training of the nonlinear mapping from input features to output features of the power grid impedance data-driven model. By combining mechanistic and data-driven models, a data-mechanistic hybrid model of grid impedance is obtained. By designing a loss function, the parameters of the mechanistic model are finally corrected and optimized so that its output approximates the true value.

2. The online power grid impedance assessment method driven by data and model fusion as described in claim 1, characterized in that: The disturbance command includes adding a single-pulse triangular disturbance current to the current loop control of the grid-connected inverter in the equivalent model.

3. The online power grid impedance assessment method driven by data and model fusion as described in claim 2, characterized in that: The injection of disturbance current into the power grid includes injecting a single pulse current at the zero-crossing point or peak value of the current at the grid coupling point. The disturbance current includes selecting a single-pulse current to shorten the current injection time, so that the effect of the disturbance current is completed within one cycle, thereby reducing the impact of the injected current on the normal operation of the grid-connected inverter.

4. The online power grid impedance assessment method driven by data and model fusion as described in claim 3, characterized in that: The measurement of the voltage and current waveforms of the grid-connected coupling point within one cycle before and after the disturbance injection includes measuring the voltage and current waveforms of the grid-connected coupling point within one cycle before the disturbance is generated, and the voltage and current waveforms of the grid-connected coupling point within one cycle after the disturbance is generated. The step of obtaining the voltage and current signals generated by the disturbance based on the comparison of voltage and current waveforms before and after the disturbance includes subtracting the measured current value after the disturbance from the measured current value before the disturbance point by point to obtain the actual disturbance current generated. The actual disturbance voltage is obtained by subtracting the voltage measurement value before the disturbance from the voltage measurement value after the disturbance point by point.

5. The online power grid impedance assessment method driven by data and model fusion as described in claim 4, characterized in that: The method of obtaining spectral data through fast Fourier transform includes performing fast Fourier analysis on the actual disturbance current and the actual disturbance voltage to obtain the spectral data of the actual disturbance signal. The data processing and analysis based on the collected voltage and current spectrum data includes, using 1% of the fundamental frequency component amplitude as a benchmark, removing data with small current amplitude in the high-frequency band of the spectrum data and the voltage at the corresponding frequency, retaining data below 700Hz and 1200Hz, to obtain current and voltage spectrum data, and obtaining the impedance spectrum based on the current / voltage spectrum data.

6. The online power grid impedance assessment method driven by data and model fusion as described in claim 5, characterized in that: The mechanistic model for constructing the equivalent grid impedance through Thevenin's equivalent method includes, specifically, the equivalent resistance representing power loss, the equivalent inductance representing electromagnetic effects, and the grid voltage.

7. The online power grid impedance assessment method driven by data and model fusion as described in claim 6, characterized in that: The aforementioned power grid impedance data-driven model based on artificial neural networks includes a three-layer neural network trained using a backpropagation algorithm. The ANN consists of an input layer, a hidden layer, and an output layer, with the activation functions of the hidden layer and the output layer being the ReLU function and a linear function, respectively. The input variables are the normalized fundamental voltage, fundamental current, and impedance spectrum, and the output variable is the grid impedance.

8. A data and model fusion-driven online power grid impedance assessment system, employing the data and model fusion-driven online power grid impedance assessment method as described in any one of claims 1 to 7, characterized in that, include: The modeling module is used to establish an impedance model of the grid-connected inverter and the grid under weak grid conditions based on the analysis of the impedance characteristics of the distributed power grid. The disturbance control module is used in the model to control the output disturbance current of the inverter and inject disturbance current into the grid by adding disturbance commands to the control loop of the grid-connected inverter. The waveform acquisition module is used to measure the voltage and current waveforms of the grid-connected coupling point within one cycle before and after the disturbance injection in the model. Based on the comparison of the voltage and current waveforms before and after the disturbance, the voltage and current signals generated by the disturbance are obtained, and the spectrum data is obtained through fast Fourier transform. The spectrum calculation module is used to process and analyze the collected voltage and current spectrum data, extract the voltage and current spectrum data, and calculate the impedance spectrum. The mechanism modeling module is used to construct a mechanism model of the equivalent power grid impedance through the Thevenin equivalent. The data modeling module is used to establish a power grid impedance data-driven model based on artificial neural networks. It normalizes the extracted data and designs a loss function. The dataset is put into the artificial neural network for preliminary training of the nonlinear mapping from input features to output features of the power grid impedance data-driven model. The fusion optimization module is used to combine the mechanistic model and the data-driven model to obtain a data-mechanistic hybrid model of grid impedance. By designing a loss function, the parameters of the mechanistic model are finally corrected and optimized in real time so that its output approximates the true value.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the online power grid impedance assessment method driven by data and model fusion as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the online power grid impedance evaluation method driven by data and model fusion as described in any one of claims 1 to 7.