A converter black-box impedance modeling method based on resonance perception and active learning

CN122778890BActive Publication Date: 2026-10-23TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611248312.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-23
Estimated Expiration
2046-08-18

AI Technical Summary

Technical Problem

[0008]为此,本发明提供一种基于谐振感知和主动学习的换流器黑箱阻抗建模方法,以解决现有技术中新能源换流器黑箱阻抗建模过程中存在的阻抗扫频样本获取成本高、均匀采样数据冗余大、谐振区域样本覆盖不足、候选工况代表性不足以及神经网络阻抗模型训练效率较低等问题

Benefits of technology

第一,提高候选工作点样本的代表性,本发明基于SHAP重要性分析结果,对换流器工作点变量P、Q、V进行加权LHS采样,使对阻抗特性影响较大的变量获得更高采样分辨率。与传统均匀采样方法相比,本发明能够减少低价值工况样本,提高候选工作点样本池的有效性和覆盖质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122778890B_ABST
    Figure CN122778890B_ABST
Patent Text Reader

Abstract

The application discloses a converter black box impedance modeling method based on resonance perception and active learning, belongs to the technical field of new energy grid connection, and comprises the following steps: collecting initial impedance samples of a converter under different working point variables and different frequency variables, and training a neural network black box impedance model; based on SHAP importance analysis, generating a plurality of candidate working points, and merging and arranging the candidate working points into a candidate working point sample pool; based on the neural network black box impedance model, determining a suspected resonance frequency point in a basic candidate frequency point, and supplementing and encrypting candidate frequency points near the suspected resonance frequency point, and merging and arranging the candidate frequency points into a candidate sample data pool; based on an iGS active learning criterion, screening high-value samples in the candidate samples, and performing impedance sweep frequency measurement or simulation labeling on the high-value samples to obtain new impedance samples; adding the new impedance samples to a training sample set, updating the neural network black box impedance model, and continuing until a prediction error meets a preset accuracy requirement or an active learning iteration number reaches a preset upper limit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new energy grid connection technology, specifically to a converter black-box impedance modeling method based on resonant sensing and active learning. Background Technology

[0002] With the large-scale integration of new energy power generation equipment into the power system, the dynamic interaction between converters and the AC grid is increasingly enhanced, potentially leading to problems such as wideband oscillations and small-disturbance instability. Impedance analysis is an important method for analyzing the grid-connected stability of new energy equipment, the key being obtaining the accurate impedance characteristics of the converter under different operating conditions and frequencies. However, in practical engineering, new energy units and their grid-connected converters are often subject to commercial confidentiality constraints, making it difficult to fully obtain their internal control structures, parameters, and protection logic. The equipment exhibits "black box" or "gray box" characteristics, making it difficult to directly apply small-signal impedance modeling methods based on analytical mechanisms.

[0003] To address the impedance modeling problem of black-box devices, existing methods typically combine impedance sweep frequency measurement with data-driven modeling: a small signal disturbance is injected at the converter port, and voltage and current responses are collected to calculate impedance; then, active power, reactive power, voltage amplitude, and frequency are used as inputs, and impedance matrix elements are used as outputs to train data-driven models such as neural networks, establishing a nonlinear mapping relationship between operating conditions, frequency, and impedance. Decomposing the complex impedance into real and imaginary parts as output labels can avoid phase angle jumps and multi-value problems in amplitude-phase angle forms.

[0004] However, the accuracy of data-driven impedance modeling is highly dependent on the quantity and quality of impedance samples. To ensure the model covers different operating states, impedance scanning is typically required at multiple operating points and frequencies. If uniform dense sampling is used, point-by-point measurements must be taken over a large operating space and wide frequency range, resulting in a massive dataset. However, actual impedance measurement is time-consuming, and the number of samples obtainable is limited. Furthermore, the impedance characteristics of new energy converters do not exhibit the same degree of variation across all operating conditions and frequencies: in frequency bands where impedance changes are gradual, a small number of frequency points can reflect the basic trend; while in resonant peaks, valleys, or rapidly changing regions, the measurement points contain richer dynamic characteristics. Therefore, the core contradiction facing existing technologies lies in two aspects: on the one hand, data-driven models require a sufficient number of comprehensive impedance samples as a training basis; on the other hand, actual frequency scanning and annotation are costly and time-consuming, making it difficult to comprehensively measure all candidate operating conditions and frequency points. Insufficient samples make it difficult for the model to accurately reflect impedance variation characteristics under multiple operating conditions, while simple uniform dense sampling generates a large number of low-value samples in regions with gradual impedance changes, reducing data acquisition efficiency.

[0005] Active learning offers an effective approach to solving the aforementioned problems. This method does not indiscriminately label all unlabeled samples, but rather prioritizes labeling high-value samples from a candidate pool based on their representativeness, variability, or uncertainty in the input and output spaces. Introducing this method into black-box impedance modeling of renewable energy converters allows for the selection of more informative operating points and frequencies with a limited number of frequency sweeps, reducing labeling costs and improving model training efficiency.

[0006] However, existing impedance data optimization methods mostly focus on optimizing operating conditions or frequency points based on existing measurement data, and have not fully considered using the current neural network black-box impedance model to predict unlabeled candidate samples within an active learning framework, and further constructing a candidate sample pool based on the changing characteristics of the impedance response curve. Especially for potential resonance regions, if the candidate frequency points are still uniformly distributed, the active learning algorithm can only select samples from the existing uniform frequency points, making it difficult to achieve priority coverage of high-information frequency bands near the resonance. When the initial samples are few or the operating condition space is large, the candidate sample pool is prone to both insufficient coverage and local redundancy, making it difficult to balance the model's global generalization ability and resonance frequency band identification accuracy with a limited number of frequency sweeps.

[0007] Therefore, it is necessary to propose a method for establishing a black-box impedance model for new energy converters based on resonance sensing and active learning. This method should be able to train an initial neural network black-box impedance model using existing impedance samples, generate candidate operating points based on the importance analysis of input variables, predict the impedance frequency response at the candidate operating points using the current model, identify potential resonance or rapidly changing frequency bands through the second-order difference between the real and imaginary parts of the impedance, generate candidate frequency points in these bands, and finally use an improved greedy sampling (iGS) criterion to select high-value samples for actual impedance labeling. This approach can reduce invalid impedance frequency sweep samples, improve the efficiency of obtaining resonance-related samples, and enhance the modeling accuracy of the multi-condition black-box impedance model for new energy converters at a lower labeling cost. Summary of the Invention

[0008] To address these issues, this invention provides a black-box impedance modeling method for converters based on resonance sensing and active learning. This method solves the problems in existing technologies for black-box impedance modeling of new energy converters, such as high cost of acquiring impedance sweep frequency samples, large redundancy of uniform sampling data, insufficient sample coverage in the resonant region, insufficient representativeness of candidate operating conditions, and low training efficiency of neural network impedance models.

[0009] To achieve the above objectives, the present invention provides the following technical solution: A converter black-box impedance modeling method based on resonant sensing and active learning includes the following steps: Step S1: Collect initial impedance samples of the converter under different operating point variables and different frequency variables, construct a training sample set with the operating point variables and frequency variables as inputs and the real and imaginary parts of each impedance data in the dq impedance matrix as outputs, and train a neural network black box impedance model based on the training sample set. Step S2: Based on SHAP importance analysis, determine the global contribution weight of the operating point variables to the impedance output, and adjust the weighted sampling density of each operating point variable according to the global contribution weight. Within the operating point range, perform weighted LHS sampling on each operating point variable according to the weighted sampling density of each operating point variable to generate multiple candidate operating points, and merge and organize them into a candidate operating point sample pool. Step S3: Generate basic candidate frequency points using LHS sampling within the preset frequency range of the candidate operating points. Based on the neural network black box impedance model, predict the impedance response of the candidate operating points within the preset frequency range. Calculate the second-order difference along the frequency axis for the real and imaginary parts of each impedance channel to construct a resonance sensitivity score. Determine the suspected resonant frequency points among the basic candidate frequency points based on the resonance sensitivity score. Supplement and encrypt candidate frequency points near the suspected resonant frequency points. Merge the basic candidate frequency points and encrypted candidate frequency points to form candidate frequency points. Combine the candidate operating points with the corresponding candidate frequency points to form candidate samples. Merge and organize multiple candidate samples into a candidate sample data pool. Step S4: Calculate the input spatial distance and output spatial distance of the candidate samples relative to the labeled samples based on the iGS active learning criterion, and conduct a comprehensive evaluation based on the input spatial distance and output spatial distance to obtain a comprehensive evaluation index. Based on the comprehensive evaluation index, select high-value samples from the candidate samples, and perform impedance sweep frequency measurement or simulation labeling on the high-value samples to obtain new impedance samples. Step S5: Add the new impedance samples to the training sample set, update the neural network black box impedance model, and repeat steps S3 and S4 until the prediction error of the neural network black box impedance model meets the preset accuracy requirements or the number of active learning iterations reaches the preset upper limit.

[0010] Furthermore, step S1 specifically includes: Step S101: Select active power P, reactive power Q and AC voltage amplitude V at local PCC point of converter as operating point variables, determine the initial operating point sampling range of converter, select multiple operating point sampling values ​​within the initial operating point sampling range, and combine multiple operating point sampling values ​​to form multiple initial operating points. Step S102: Select the sweep frequency f as the frequency variable, and uniformly select multiple sweep frequencies at each initial operating point to perform impedance sweep frequency measurement; Step S103: Based on the frequency sweep results of the impedance sweep measurement, obtain the impedance data in the converter dq impedance matrix, and represent each impedance data in real and imaginary form; Step S104: Construct initial impedance samples, where the input of each initial impedance sample is (P, Q, V, f), and the output is the real and imaginary parts of each impedance data. Step S105: Train the neural network black box impedance model using the initial impedance samples as the training sample set to obtain the neural network black box impedance model used to characterize the mapping relationship between the converter operating point variables, frequency variables and impedance data.

[0011] Furthermore, step S2 specifically includes: Step S201: Based on the neural network black box impedance model in step S1, combined with SHAP importance analysis, obtain the SHAP contribution value of different operating point variables to each impedance output channel, and average the absolute values ​​of the SHAP contribution values ​​obtained from different impedance output channels to obtain the comprehensive SHAP contribution value of different operating point variables. Step S202: Normalize the combined SHAP contribution values ​​of variables at different operating points to obtain the global contribution weights of variables at different operating points; Step S203: Adjust the weighted sampling density of each operating point variable based on the global contribution weight of the variables at different operating points; Step S204: Within the operating range of the operating point, perform weighted LHS sampling on each operating point variable according to the weighted sampling density of each operating point variable to generate multiple candidate operating points; Step S205: Multiple candidate working points are merged and organized into a candidate working point sample pool, wherein the candidate working points are (P k Q k V k ), where k is the candidate work point number, k=1,2,...,K wp ;K wp This represents the total number of candidate work sites.

[0012] Furthermore, step S3 specifically includes: Step S301: Generate basic candidate frequency points within the preset frequency range of the candidate operating points using uniform sampling, LHS sampling, or logarithmic interval sampling; Step S302: Based on the neural network black box impedance model, predict the impedance response of the candidate operating point within the preset frequency range to obtain the real and imaginary parts of the impedance data in the dq impedance matrix at each basic candidate frequency point. Step S303: Calculate the second-order difference along the frequency axis for the real and imaginary parts of each impedance channel in the impedance data of step S302. Step S304: Normalize the second-order difference results of each impedance channel, and average the normalized second-order difference results to obtain the resonance sensitivity score of each basic candidate frequency point; select several basic candidate frequency points with the largest resonance sensitivity scores as suspected resonance frequency points. Step S305: Add densified candidate frequency points near the suspected resonant frequency point at preset intervals, and merge the basic candidate frequency point and the densified candidate frequency point to form a candidate frequency point; Step S306: Candidate operating points are combined with their corresponding candidate frequency points to form candidate samples; multiple candidate samples are merged and organized into a candidate sample data pool; wherein, the candidate samples are (P k Q k V k f i ), where i is the candidate frequency point number.

[0013] Furthermore, step S4 specifically includes: Step S401: Take the initial impedance sample with existing actual impedance labeling as the labeled sample, and the candidate sample is the sample without actual impedance labeling. Step S402: Based on the neural network black box impedance model, perform impedance prediction on the candidate samples to obtain the predicted results of the real and imaginary parts of the impedance for each candidate sample. Step S403: Calculate the input spatial distance between the candidate sample and the labeled sample; where, the input spatial distance d x (x i ) is represented as: ; Where, x i For candidate samples, D L For the labeled sample set, x j For labeled samples, normalize(x) i )-normalize(x j ) is the difference vector between the candidate sample and the labeled sample in the normalized input space, used to calculate the Euclidean distance between them in the input space; Step S404: Calculate the output spatial distance between the candidate sample and the labeled sample; where, the output spatial distance d y (x i ) is represented as: ; in, For the current neural network black-box impedance model, the candidate sample x i The predicted output, y j This is the true impedance output of the labeled sample; Step S405: Based on the iGS active learning criterion, multiply the input spatial distance and the output spatial distance to obtain the comprehensive evaluation index of the candidate samples; Step S406: Based on the comprehensive evaluation index, select high-value samples from the candidate samples, and perform impedance sweep frequency measurement or simulation annotation on the high-value samples to obtain new impedance samples.

[0014] Furthermore, the comprehensive SHAP contribution value for: ; in, Input variable u in the nth sample m The overall SHAP contribution value to the impedance prediction results, where C is the number of impedance output channels. Represents the input variable u in the nth sample m The SHAP contribution value of the c-th impedance output channel, input variable u m Represents any operating point variable among P, Q, and V; The global contribution weight α of the variables at different operating points m for: ; Where N represents the number of samples used for importance statistics. This indicates the index of the input variable representing the working point involved in the normalization calculation. Let u represent the r-th input variable in the n-th sample. m The overall SHAP contribution value to the impedance prediction results; The weighted sampling density N m for: ; Where N0 is the basic sampling density, β is the sampling weighting coefficient, and N m For variable u m The corresponding weighted sampling density.

[0015] Furthermore, when the intervals between adjacent fundamental candidate frequency points are equal or approximately equal, the second-order difference formula is: ; Where i is the base candidate frequency point number, and f i This represents the i-th basic candidate frequency point. The impedance path prediction value is represented at the i-th fundamental candidate frequency point f. i The second-order difference magnitude of the nearby y(f) i ), y(f i-1 ), y(f i+1 f represents the i-th, i-1-th, and i+1-th basic candidate frequency points, respectively. iPredicted value for any impedance channel; When the intervals between adjacent fundamental candidate frequency points are not exactly equal, a second-order difference form with frequency interval correction is used. The second-order difference formula is: ; in, The impedance channel prediction value at the i-th fundamental candidate frequency point f i The nearby second-order difference amplitude with frequency spacing correction, f i f i-1 f i+1 Let i, i-1, and i+1 represent the i-th, i-1, and i+1-th basic candidate frequency points, respectively. The i-th fundamental candidate frequency point f i Resonance sensitivity score for: ; in, This indicates that the c-th impedance output channel is at the i-th fundamental candidate frequency point f. i The second-order difference magnitude at that point, and These represent the minimum and maximum values ​​of the second-order differential amplitude of the channel within the candidate frequency range, respectively, where C is the number of impedance output channels. To prevent extremely small positive numbers with a denominator of zero.

[0016] Furthermore, the candidate sample x i The comprehensive evaluation indicators are: ; Where, d x (x i ) represents the input spatial distance, d y (x i ) represents the output spatial distance.

[0017] Furthermore, the prediction error of the neural network black-box impedance model The normalized root mean square error is expressed as: ; Where m represents the sample number used for error evaluation, and M represents the total number of error evaluation samples; x m y represents the input vector of the m-th error evaluation sample; m This represents the actual impedance output vector corresponding to the m-th error evaluation sample; This indicates that the black-box impedance model of the neural network after the t-th iteration has a certain impact on the input vector x. m The predicted output, To prevent extremely small positive numbers with a denominator of zero.

[0018] The present invention has the following advantages: First, this invention improves the representativeness of candidate operating point samples. Based on SHAP importance analysis results, it performs weighted LHS sampling on the converter operating point variables P, Q, and V, enabling variables that significantly affect impedance characteristics to achieve higher sampling resolution. Compared with traditional uniform sampling methods, this invention reduces low-value operating condition samples, improving the effectiveness and coverage quality of the candidate operating point sample pool.

[0019] Secondly, this invention improves sample coverage in resonant and rapidly changing impedance frequency bands. It utilizes current neural network black-box impedance models to predict the impedance frequency response at candidate operating points and constructs a resonance sensitivity score based on the second-order difference between the real and imaginary parts of the impedance along the frequency axis. This prioritizes generating encrypted candidate frequency points near potential resonant peaks, valleys, and rapidly changing impedance frequency bands. Compared to the full-band uniform frequency extraction method, this invention increases the probability of high-information-content frequency samples entering the candidate sample pool.

[0020] Third, this invention reduces the cost of acquiring impedance samples and improves modeling accuracy. It employs the iGS active learning criterion to comprehensively evaluate candidate samples, selecting those with high information content in both the input and output spaces for actual impedance labeling. New impedance samples are continuously added to the training set to update the black-box impedance model. This reduces the number of invalid frequency sweeps, lowers sample labeling costs, and simultaneously improves the training efficiency and prediction accuracy of the multi-condition black-box impedance model for new energy converters. Attached Figure Description

[0021] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0022] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0023] Figure 1 A flowchart outlining the overall process for establishing a black-box impedance model for converters based on resonant sensing and active learning. Figure 2 This is a schematic diagram of the structure of a neural network black box impedance model; Figure 3 This is a schematic diagram of weighted LHS operating point sampling based on SHAP importance analysis; Figure 4 This is a schematic diagram illustrating the generation of candidate frequency points based on second-order difference. Figure 5 This is a schematic diagram illustrating the iGS active learning sample selection principle. Figure 6 This is a schematic diagram of the cyclic update of the neural network black-box impedance model. Detailed Implementation

[0024] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.

[0025] A converter black-box impedance modeling method based on resonant sensing and active learning, such as... Figure 1 The process, as shown, includes the following steps: Step S1: Collect initial impedance samples of the converter under different operating point variables and different frequency variables, construct a training sample set with the operating point variables and frequency variables as inputs and the real and imaginary parts of each impedance data in the dq impedance matrix as outputs, and train a neural network black box impedance model based on the training sample set. Step S2: Based on the Shapley Additive exPlanations (SHAP) method, perform importance analysis to determine the global contribution weight of the operating point variables to the impedance output, and adjust the weighted sampling density of each operating point variable according to the global contribution weight. Within the operating point range, perform weighted Latin hypercube sampling (LHS) on each operating point variable according to the weighted sampling density of each operating point variable to generate multiple candidate operating points, and merge and organize them into a candidate operating point sample pool. Step S3: Generate basic candidate frequency points using LHS sampling within the preset frequency range of the candidate operating points. Based on the neural network black box impedance model, predict the impedance response of the candidate operating points within the preset frequency range. Calculate the second-order difference along the frequency axis for the real and imaginary parts of each impedance channel to construct a resonance sensitivity score. Determine the suspected resonant frequency points among the basic candidate frequency points based on the resonance sensitivity score. Supplement and densify candidate frequency points near the suspected resonant frequency points. Merge the basic candidate frequency points and densified candidate frequency points to form candidate frequency points. Combine the candidate operating points with the corresponding candidate frequency points to form candidate samples. Merge and organize multiple candidate samples into a candidate sample data pool. Step S4: Based on the improved Greedy Sampling (iGS) active learning criterion, calculate the input spatial distance and output spatial distance of the candidate samples relative to the labeled samples respectively, and perform a comprehensive evaluation based on the input spatial distance and output spatial distance to obtain a comprehensive evaluation index. Based on the comprehensive evaluation index, select high-value samples from the candidate samples, and perform impedance sweep frequency measurement or simulation labeling on the high-value samples to obtain new impedance samples. Step S5: Add the new impedance samples to the training sample set, update the neural network black box impedance model, and repeat steps S3 and S4 until the prediction error of the neural network black box impedance model meets the preset accuracy requirements or the number of active learning iterations reaches the preset upper limit.

[0026] Step S1 specifically includes: Step S101: Select active power P, reactive power Q, and AC voltage amplitude V at the local PCC point of the converter as operating point variables to determine the initial operating point sampling range of the converter. Select multiple operating point sampling values ​​within the initial operating point sampling range, and combine the multiple operating point sampling values ​​to form multiple initial operating points. In one embodiment, P selects 4 uniform sampling values ​​in the range of 0 to 1 pu, Q selects 4 uniform sampling values ​​in the range of -0.33 to 0.33 pu, and V selects 4 uniform sampling values ​​in the range of 0.95 to 1.05 pu.

[0027] Step S102: Select the sweep frequency f as the frequency variable. At each initial operating point, uniformly select multiple sweep frequencies for impedance sweep frequency measurement. Combine the sampled values ​​of P, Q, and V to obtain 64 initial operating points. For each initial operating point, uniformly select 10 frequency points within the frequency range of 1–100 Hz. Inject disturbance voltage or disturbance current with amplitudes satisfying the small-signal condition into the AC port of the converter. Collect the port voltage and current responses at the corresponding frequencies, and calculate the initial impedance data of the converter at different operating points and frequencies based on the disturbance responses.

[0028] Step S103: Based on the frequency sweep results of the impedance sweep measurement, obtain the Z-axis in the converter dq impedance matrix. dd Z dq Z qd and Z qq The impedance data, since each impedance element is a complex number, is represented in real and imaginary form to facilitate neural network regression fitting. During the construction of impedance data, perturbations can be applied to the d-axis and q-axis respectively and the responses can be recorded, or the elements of the dq impedance matrix can be solved based on two sets of linearly independent perturbation responses. To reduce the influence of measurement noise, multiple frequency sweep results at the same operating point and the same frequency can be averaged or outliers can be removed.

[0029] Step S104: Construct initial impedance samples, where the input of each initial impedance sample is (P, Q, V, f), and the output is the real and imaginary parts of each impedance data, i.e., Re(Z). dd ), Im(Z dd ), Re(Z dq ), Im(Z dq ), Re(Z qd ), Im(Z qd ), Re(Z qq ) and Im(Z qq ); Wherein, the input vector x of a single impedance sample n and output vector y n It can be represented as: ; ; Where n is the initial impedance sample number, n=1,2,...,N; N is the total number of samples in the initial impedance sample set.

[0030] The small-signal impedance matrix of the converter port in the dq coordinate system can be expressed as: ; Z dd Z dq Z qd Z qq All are complex impedance elements that vary with the operating point and frequency.

[0031] Step S105: Train the neural network black-box impedance model using the initial impedance samples as the training sample set. Before training, normalize the input variables and output impedance labels respectively. During training, use the error between the predicted impedance vector and the actual impedance vector as the loss, and suppress overfitting through regularization. After training, as shown... Figure 2As shown, a neural network black-box impedance model is obtained to characterize the mapping relationship between the converter's operating point, frequency, and the real and imaginary parts of the dq impedance. The neural network black-box impedance model can be expressed as: ; Where, x n This is the input vector for the nth impedance sample, which is consistent with the input vector defined in step S104. This represents the predicted output impedance vector of the nth sample by the neural network black-box impedance model. This represents a nonlinear mapping function composed of a neural network. This represents all trainable parameters of the neural network, including the weights and biases of each layer; θ is obtained by minimizing the training objective function, i.e.: ; in, This represents the optimal parameters of the neural network obtained after training. For training the objective function; The model training objective function can be expressed as: ; in, The regularization coefficient is used to suppress model overfitting. This objective function measures the error between the predicted impedance vector and the actual impedance label, and serves as the basis for backpropagation to update θ in step S105.

[0032] Step S2 specifically includes: Step S201: Based on the neural network black box impedance model in step S1, combined with SHAP importance analysis, obtain the SHAP contribution value of different operating point variables to each impedance output channel, and average the absolute values ​​of the SHAP contribution values ​​obtained from different impedance output channels to obtain the comprehensive SHAP contribution value of different operating point variables. Overall SHAP contribution value for: ; in, Input variable u in the nth sample m The overall SHAP contribution value to the impedance prediction results, where C is the number of impedance output channels. Represents the input variable u in the nth sample m The SHAP contribution value of the c-th impedance output channel, input variable u m Represents any operating point variable among P, Q, and V; Step S202: Normalize the combined SHAP contribution values ​​of variables at different operating points to obtain the global contribution weights of variables at different operating points; Global contribution weights α of variables at different operating points m for: ; Where N represents the number of samples used for importance statistics. This indicates the index of the input variable representing the working point involved in the normalization calculation. Let u represent the r-th input variable in the n-th sample. m The overall SHAP contribution value to the impedance prediction results; In one embodiment, the global importance percentages are P 60%, Q 30%, and V 10%.

[0033] In this embodiment, the importance weights of P, Q, and V are respectively denoted as , , Then it satisfies And can be based on Set the appropriate candidate sampling density ratio.

[0034] Step S203: Adjust the weighted sampling density of each operating point variable based on the global contribution weight of the variables at different operating points; Weighted sampling density N m for: ; Where N0 is the basic sampling density, β is the sampling weighting coefficient, and N m For variable u m The corresponding weighted sampling density; Step S204: Within the operating range of each working point, perform weighted LHS sampling on each working point variable according to the weighted sampling density to generate multiple candidate working points. For variables with higher importance, set a denser number of strata or a higher sampling probability within their operating range; for variables with lower importance, maintain the basic number of strata to balance the global coverage of candidate working points and the resolution of key variables. The weighted LHS sampling process can be as follows: Figure 3 As shown, the higher the importance, the higher the sampling resolution, and more representative candidate operating point samples are generated based on the importance of the input variables.

[0035] Step S205: Multiple candidate working points are merged and organized into a candidate working point sample pool, wherein the candidate working points are (P k Q k V k ), where k is the candidate work point number, k=1,2,...,K wp ;K wp This represents the total number of candidate working points. In one embodiment, the total number of candidate working points is set to 500.

[0036] After the candidate operating point sample pool is formed, candidate operating points that exceed the converter's safe operating boundary, power constraints, or voltage constraints can be eliminated, and candidate operating points that are too close can be merged to ensure that the subsequent generation of candidate frequency points is based on the executable set of operating points.

[0037] Step S3 specifically includes: Step S301: Generate basic candidate frequency points within a preset frequency range of candidate operating points using uniform sampling, LHS sampling, or logarithmic interval sampling; in one embodiment, 100 basic candidate frequency points are generated in the range of 1 to 100 Hz to avoid the candidate frequency points being completely fixed each time, thereby improving the coverage of candidate frequency points; Step S302: Based on the neural network black box impedance model, predict the impedance response of the candidate operating point within the preset frequency range to obtain the real and imaginary parts of the impedance data in the dq impedance matrix at each basic candidate frequency point. Step S303: Calculate the second-order difference along the frequency axis for the real and imaginary parts of each impedance channel in the impedance data of step S302; for each candidate operating point, calculate the second-order difference along the frequency axis for the real and imaginary parts of each element of the impedance matrix at the basic candidate frequency point, which is used to characterize the degree of bending of the impedance response curve near the corresponding frequency. When the intervals between adjacent fundamental candidate frequency points are equal or approximately equal, the second-order difference formula is: ; Where i is the base candidate frequency point number, and f i This represents the i-th basic candidate frequency point. The impedance path prediction value is represented at the i-th fundamental candidate frequency point f. i The second-order difference magnitude in the vicinity, y(f) i ), y(f i-1 ), y(f i+1 f represents the i-th, i-1-th, and i+1-th basic candidate frequency points, respectively. i The predicted value for any impedance channel; y(f i ) can be Re(Z) dd ), Im(Z dd ), Re(Z dq ), Im(Z dq ), Re(Z qd ), Im(Z qd ), Re(Z qq ) and Im(Z qq Predicted value of any channel in ) When the intervals between adjacent candidate frequency points are not exactly equal, a second-order difference form with frequency interval correction can be used to reduce the impact of non-uniform frequency sampling on resonance sensitivity scoring. The second-order difference formula is as follows: ; in, The impedance channel prediction value at the i-th fundamental candidate frequency point f i The nearby second-order difference amplitude with frequency spacing correction, f i f i-1 f i+1 Let i, i-1, and i+1 represent the i-th, i-1, and i+1-th basic candidate frequency points, respectively. Step S304: Normalize the second-order difference results of each impedance channel, and average the normalized second-order difference results to obtain the resonance sensitivity score of each basic candidate frequency point; select several basic candidate frequency points with the largest resonance sensitivity scores as suspected resonance frequency points. The i-th fundamental candidate frequency point f i Resonance sensitivity score for: ; in, This indicates that the c-th impedance output channel is at the i-th fundamental candidate frequency point f. i The second-order difference magnitude at that point, and These represent the minimum and maximum values ​​of the second-order differential amplitude of the channel within the candidate frequency range, respectively, where C is the number of impedance output channels. To prevent extremely small positive numbers with a denominator of zero; In this embodiment, C can be 8, corresponding to Z. dd Z dq Z qd Z qq The real and imaginary parts of four complex impedance elements; A positive number much smaller than 1 can be used to ensure the numerical stability of the normalization calculation.

[0038] A higher resonance sensitivity score indicates a more pronounced bend in the impedance response curve near that frequency point, and that the frequency point is more likely to correspond to a resonance peak, valley, or region of rapid impedance change. In other embodiments, the maximum value of the normalized second-order difference results for each channel can also be used as the resonance sensitivity score for that frequency point. Step S305: Supplement encrypted candidate frequency points near the suspected resonant frequency points at preset intervals, and merge the basic candidate frequency points and encrypted candidate frequency points to form candidate frequency points; in one embodiment, select the 5 suspected resonant frequency points with the highest resonance sensitivity scores, and within ±1Hz of each suspected resonant frequency point, select 8 encrypted candidate frequency points at intervals of 0.25Hz, while setting at least 1Hz interval between adjacent selected frequency points; when the encrypted intervals of two suspected resonant frequency points overlap, merge the duplicate frequency points to avoid too many adjacent redundant samples in the candidate sample data pool; Step S306: Candidate operating points are combined with their corresponding candidate frequency points to form candidate samples; multiple candidate samples are merged and organized into a candidate sample data pool; wherein, the candidate samples are (P k Q k V k f i ), where i is the candidate frequency point number. The process of generating the candidate frequency point set can be as follows: Figure 4 As shown, candidate frequency points are generated by encryption near the frequency band where impedance changes rapidly.

[0039] When forming the candidate sample data pool, the source of the operating point, the identifier of the fundamental frequency point, the identifier of the encrypted candidate frequency point, and the resonance sensitivity score corresponding to each candidate sample can be recorded as auxiliary information for subsequent active learning screening and sample deduplication.

[0040] Step S4 specifically includes: Step S401: Take the initial impedance sample with existing actual impedance labeling as the labeled sample, and the candidate sample is the sample without actual impedance labeling. Step S402: Based on the neural network black box impedance model, perform impedance prediction on the candidate samples to obtain the predicted results of the real and imaginary parts of the impedance for each candidate sample. Step S403: Calculate the input spatial distance between the candidate sample and the labeled sample; where, the input spatial distance d x (x i ) is represented as: ; Where, x i For candidate samples, D L For the labeled sample set, x j For labeled samples, normalize(x) i )-normalize(x j ) is the difference vector between the candidate sample and the labeled sample in the normalized input space, used to calculate the Euclidean distance between them in the input space; Step S404: Calculate the output spatial distance between the candidate sample and the labeled sample; where, the output spatial distance d y (x i ) is represented as: ; in, For the current neural network black-box impedance model, the candidate sample x i The predicted output, y j This is the true impedance output of the labeled sample; Step S405: Based on the iGS active learning criterion, multiply the input spatial distance and the output spatial distance to obtain the comprehensive evaluation index of the candidate samples; Candidate sample x i The comprehensive evaluation indicators are: ; Where, d x (x i ) represents the input spatial distance, d y (x i () represents the output spatial distance; A higher comprehensive evaluation index indicates that the candidate sample possesses a higher amount of information in both the input and output spaces. In one embodiment, candidate sample x n The comprehensive evaluation index can be expressed as the product of the input spatial distance and the output spatial distance. Using the product form can simultaneously reflect the diversity of both the input and output spaces, avoiding the dominant influence of a single spatial distance on the screening results.

[0041] In another embodiment, a weighted approach can also be used to construct the comprehensive evaluation index: ; in represents the weighting coefficients; when it is necessary to emphasize both input coverage and impedance response differences simultaneously, the product form is preferred. The first K samples are selected as the labeled samples for this round of active learning.

[0042] Wherein, K represents the number of newly labeled samples selected in each round of active learning. The value of K can be determined based on the cost of a single impedance sweep, the expected number of iterations, and the model accuracy requirements. When the labeling cost is high, K can be reduced and the number of iterations can be increased. When the engineering test window is short, K ​​can be increased to reduce the number of iterations.

[0043] Step S406: Based on comprehensive evaluation indicators, high-value samples are selected from the candidate samples. Candidate samples are ranked according to the comprehensive evaluation indicators, and samples with higher comprehensive evaluation indicators are selected from the candidate sample data pool as high-value samples. For candidate samples that are excessively concentrated at the same operating point or adjacent frequency points, deduplication intervals or batch screening constraints can be set to ensure that the newly added impedance samples in each round are dispersed in both the operating point and frequency dimensions. Impedance frequency sweep measurements or simulation annotations are then performed on the high-value samples to obtain the newly added impedance samples. The iGS active learning screening process can be as follows: Figure 5 As shown, it simultaneously considers the coverage of the input space and the differences in the output space. The input space is a two-dimensional feature space, with feature 1 and feature 2 being two sets of input feature parameters. The output space is a two-dimensional response space, with response 1 and response 2 being two sets of performance response quantities output under the corresponding input feature parameters.

[0044] Step S5 is used to introduce new impedance samples into the training process and continuously improve the accuracy of the black box impedance model through iterative iteration. Specifically, it includes the following steps.

[0045] Step S501: Update the training sample set. The training sample set after the t-th iteration can be represented as: ; in For the t-th round of active learning, a new impedance sample set is selected and impedance labeling is completed. This represents the set of labeled training samples that existed before the start of the t-th iteration. This represents the updated training sample set obtained after incorporating the newly added impedance samples.

[0046] The newly added impedance samples obtained from the actual impedance labeling in step S4 are added to the existing training sample set to form an updated impedance training sample set.

[0047] Step S502: Retrain the neural network black-box impedance model. Retrain the neural network black-box impedance model based on the updated impedance training sample set, update the model parameters, and improve the model's prediction accuracy for impedance response at multiple operating points and frequencies.

[0048] Step S503: Regenerate the candidate sample data pool. Step S3 is re-executed using the updated neural network black-box impedance model to predict the impedance frequency response at the candidate operating points. New candidate frequency points are generated based on the second-order difference between the real and imaginary parts of the impedance, forming the updated candidate sample data pool.

[0049] Step S504: Re-screen high-value samples. Based on the updated candidate sample data pool, repeat step S4, using the iGS active learning criterion to screen new high-value samples, and perform impedance sweep frequency measurement or simulation annotation to obtain new impedance samples.

[0050] Step S505: Determine whether the termination condition is met, and the model prediction error. The normalized root mean square error can be expressed as: ; Where m represents the sample number used for error evaluation, and M represents the total number of error evaluation samples; x m y represents the input vector of the m-th error evaluation sample; m This represents the actual impedance output vector corresponding to the m-th error evaluation sample; This indicates that the black-box impedance model of the neural network after the t-th iteration has a certain impact on the input vector x. m The predicted output, To prevent extremely small positive numbers with a denominator of zero.

[0051] when or When that happens, stop actively learning and iterating.

[0052] in, T represents the preset error threshold. max This indicates the maximum number of iterations for active learning; and T max The accuracy requirement can be determined based on impedance modeling accuracy requirements, acceptable frequency sweep counts, and on-site testing time constraints. Steps S501 to S504 are repeated until the prediction error of the neural network black-box impedance model on the validation sample set meets the preset accuracy requirement, or the number of active learning iterations reaches the preset upper limit. When judging the prediction error, the error of each channel of the dq impedance matrix can be statistically analyzed separately, and the average, maximum, or weighted value of all channel errors can be used as the termination criterion. The cyclic update process of the black-box impedance model can be as follows: Figure 6 As shown, based on the current training sample set, new impedance samples are continuously added to the training set, and the impedance model is adaptively iteratively optimized through sample expansion and model update.

[0053] Through the above-described iterative update process, the model uses the prediction results of the previous round to guide the generation of candidate frequency points in each iteration, and uses newly labeled samples to correct the prediction error of the model in the high impedance variation region, thereby achieving adaptive coordination between impedance sample collection and black box model training.

[0054] Through the above steps, the present invention can prioritize the acquisition of high-value samples that contribute significantly to model training under a limited number of impedance scans, reduce low-value samples and redundant frequency sweep samples, improve the coverage of resonant frequency band samples, and gradually improve the modeling accuracy of the multi-condition black box impedance model of new energy converters.

[0055] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A converter black-box impedance modeling method based on resonant sensing and active learning, characterized in that, Includes the following steps: Step S1: Collect initial impedance samples of the converter under different operating point variables and different frequency variables, construct a training sample set with the operating point variables and frequency variables as inputs and the real and imaginary parts of each impedance data in the dq impedance matrix as outputs, and train a neural network black box impedance model based on the training sample set. Step S2: Based on SHAP importance analysis, determine the global contribution weight of the operating point variables to the impedance output, and adjust the weighted sampling density of each operating point variable according to the global contribution weight. Within the operating point range, perform weighted LHS sampling on each operating point variable according to the weighted sampling density of each operating point variable to generate multiple candidate operating points, and merge and organize them into a candidate operating point sample pool. Step S3: Generate basic candidate frequency points using LHS sampling within the preset frequency range of the candidate operating points. Based on the neural network black box impedance model, predict the impedance response of the candidate operating points within the preset frequency range. Calculate the second-order difference along the frequency axis for the real and imaginary parts of each impedance channel to construct a resonance sensitivity score. Determine the suspected resonant frequency points among the basic candidate frequency points based on the resonance sensitivity score. Supplement and encrypt candidate frequency points near the suspected resonant frequency points. Merge the basic candidate frequency points and encrypted candidate frequency points to form candidate frequency points. Combine the candidate operating points with the corresponding candidate frequency points to form candidate samples. Merge and organize multiple candidate samples into a candidate sample data pool. Step S4: Calculate the input spatial distance and output spatial distance of the candidate samples relative to the labeled samples based on the iGS active learning criterion, and conduct a comprehensive evaluation based on the input spatial distance and output spatial distance to obtain a comprehensive evaluation index. Based on the comprehensive evaluation index, select high-value samples from the candidate samples, and perform impedance sweep frequency measurement or simulation labeling on the high-value samples to obtain new impedance samples. Step S5: Add the new impedance samples to the training sample set, update the neural network black box impedance model, and repeat steps S3 and S4 until the prediction error of the neural network black box impedance model meets the preset accuracy requirements or the number of active learning iterations reaches the preset upper limit.

2. The converter black-box impedance modeling method based on resonant sensing and active learning as described in claim 1, characterized in that, Step S1 specifically includes: Step S101: Select active power P, reactive power Q and AC voltage amplitude V at local PCC point of converter as operating point variables, determine the initial operating point sampling range of converter, select multiple operating point sampling values ​​within the initial operating point sampling range, and combine multiple operating point sampling values ​​to form multiple initial operating points. Step S102: Select the sweep frequency f as the frequency variable, and uniformly select multiple sweep frequencies at each initial operating point to perform impedance sweep frequency measurement; Step S103: Based on the frequency sweep results of the impedance sweep measurement, obtain the impedance data in the converter dq impedance matrix, and represent each impedance data in real and imaginary form; Step S104: Construct initial impedance samples, where the input of each initial impedance sample is (P, Q, V, f), and the output is the real and imaginary parts of each impedance data. Step S105: Train the neural network black box impedance model using the initial impedance samples as the training sample set to obtain the neural network black box impedance model used to characterize the mapping relationship between the converter operating point variables, frequency variables and impedance data.

3. The converter black-box impedance modeling method based on resonant sensing and active learning as described in claim 2, characterized in that, Step S2 specifically includes: Step S201: Based on the neural network black box impedance model in step S1, combined with SHAP importance analysis, obtain the SHAP contribution value of different operating point variables to each impedance output channel, and average the absolute values ​​of the SHAP contribution values ​​obtained from different impedance output channels to obtain the comprehensive SHAP contribution value of different operating point variables. Step S202: Normalize the combined SHAP contribution values ​​of variables at different operating points to obtain the global contribution weights of variables at different operating points; Step S203: Adjust the weighted sampling density of each operating point variable based on the global contribution weight of the variables at different operating points; Step S204: Within the operating range of the operating point, perform weighted LHS sampling on each operating point variable according to the weighted sampling density of each operating point variable to generate multiple candidate operating points; Step S205: Multiple candidate working points are merged and organized into a candidate working point sample pool, wherein the candidate working points are (P k Q k V k ), where k is the candidate work point number, k=1,2,...,K wp ;K wp This represents the total number of candidate work sites.

4. The converter black-box impedance modeling method based on resonant sensing and active learning as described in claim 2, characterized in that, Step S3 specifically includes: Step S301: Generate basic candidate frequency points within the preset frequency range of the candidate operating points using uniform sampling, LHS sampling, or logarithmic interval sampling; Step S302: Based on the neural network black box impedance model, predict the impedance response of the candidate operating point within the preset frequency range to obtain the real and imaginary parts of the impedance data in the dq impedance matrix at each basic candidate frequency point. Step S303: Calculate the second-order difference along the frequency axis for the real and imaginary parts of each impedance channel in the impedance data of step S302. Step S304: Normalize the second-order difference results of each impedance channel, and average the normalized second-order difference results to obtain the resonance sensitivity score of each basic candidate frequency point; select several basic candidate frequency points with the largest resonance sensitivity scores as suspected resonance frequency points. Step S305: Add densified candidate frequency points near the suspected resonant frequency point at preset intervals, and merge the basic candidate frequency point and the densified candidate frequency point to form a candidate frequency point; Step S306: Candidate operating points are combined with their corresponding candidate frequency points to form candidate samples; multiple candidate samples are merged and organized into a candidate sample data pool; wherein, the candidate samples are (P k Q k V k f i ), where i is the candidate frequency point number.

5. The converter black-box impedance modeling method based on resonant sensing and active learning as described in claim 1, characterized in that, Step S4 specifically includes: Step S401: Take the initial impedance sample with existing actual impedance labeling as the labeled sample, and the candidate sample is the sample without actual impedance labeling. Step S402: Based on the neural network black box impedance model, perform impedance prediction on the candidate samples to obtain the predicted results of the real and imaginary parts of the impedance for each candidate sample. Step S403: Calculate the input spatial distance between the candidate sample and the labeled sample; where, the input spatial distance d x (x i ) is represented as: ; Where, x i For candidate samples, D L For the labeled sample set, x j For labeled samples, normalize(x) i )-normalize(x j ) is the difference vector between the candidate sample and the labeled sample in the normalized input space, used to calculate the Euclidean distance between them in the input space; Step S404: Calculate the output spatial distance between the candidate sample and the labeled sample; where, the output spatial distance d y (x i ) is represented as: ; in, For the current neural network black-box impedance model, the candidate sample x i The predicted output, y j This is the true impedance output of the labeled sample; Step S405: Based on the iGS active learning criterion, multiply the input spatial distance and the output spatial distance to obtain the comprehensive evaluation index of the candidate samples; Step S406: Based on the comprehensive evaluation index, select high-value samples from the candidate samples, and perform impedance sweep frequency measurement or simulation annotation on the high-value samples to obtain new impedance samples.

6. The converter black-box impedance modeling method based on resonant sensing and active learning as described in claim 3, characterized in that, The overall SHAP contribution value for: ; in, Input variable u in the nth sample m The overall SHAP contribution value to the impedance prediction results, where C is the number of impedance output channels. Represents the input variable u in the nth sample m The SHAP contribution value of the c-th impedance output channel, input variable u m Represents any operating point variable among P, Q, and V; The global contribution weight α of the variables at different operating points m for: ; Where N represents the number of samples used for importance statistics. This indicates the index of the input variable representing the working point involved in the normalization calculation. Let u represent the r-th input variable in the n-th sample. m The overall SHAP contribution value to the impedance prediction results; The weighted sampling density N m for: ; Where N0 is the basic sampling density, β is the sampling weighting coefficient, and N m For variable u m The corresponding weighted sampling density.

7. The converter black-box impedance modeling method based on resonant sensing and active learning as described in claim 4, characterized in that, When the intervals between adjacent fundamental candidate frequency points are equal or approximately equal, the second-order difference formula is: ; Where i is the base candidate frequency point number, and f i This represents the i-th basic candidate frequency point. The impedance path prediction value is represented at the i-th fundamental candidate frequency point f. i The second-order difference magnitude in the vicinity, y(f) i ), y(f i-1 ), y(f i+1 f represents the i-th, i-1-th, and i+1-th basic candidate frequency points, respectively. i Predicted value for any impedance channel; When the intervals between adjacent fundamental candidate frequency points are not exactly equal, a second-order difference form with frequency interval correction is used. The second-order difference formula is: ; in, The impedance channel prediction value at the i-th fundamental candidate frequency point f i The nearby second-order difference amplitude with frequency spacing correction, f i f i-1 f i+1 Let i, i-1, and i+1 represent the i-th, i-1, and i+1-th basic candidate frequency points, respectively. The i-th fundamental candidate frequency point f i Resonance sensitivity score for: ; in, This indicates that the c-th impedance output channel is at the i-th fundamental candidate frequency point f. i The second-order difference magnitude at that point, and These represent the minimum and maximum values ​​of the second-order differential amplitude of the channel within the candidate frequency range, respectively, where C is the number of impedance output channels. To prevent extremely small positive numbers with a denominator of zero.

8. The converter black-box impedance modeling method based on resonant sensing and active learning as described in claim 5, characterized in that, The candidate sample x i The comprehensive evaluation indicators are: ; Where, d x (x i ) represents the input spatial distance, d y (x i ) represents the output spatial distance.

9. The converter black-box impedance modeling method based on resonant sensing and active learning as described in claim 1, characterized in that, The prediction error of the neural network black-box impedance model The normalized root mean square error is expressed as: ; Where m represents the sample number used for error evaluation, and M represents the total number of error evaluation samples; x m y represents the input vector of the m-th error evaluation sample; m This represents the actual impedance output vector corresponding to the m-th error evaluation sample; This indicates that the black-box impedance model of the neural network after the t-th iteration has a certain impact on the input vector x. m The predicted output, To prevent extremely small positive numbers with a denominator of zero.

Citation Information

Patent Citations

  • Broadband impedance analysis method based on network structure in DC power distribution network

    CN120508891A

  • Electric power system equivalent harmonic impedance identification strategy based on physical consistency constraint

    CN122132751A