Priori knowledge guided universal inverter power supply model non-mechanism analysis method
By employing a non-mechanistic analytical method for inverter power supply models guided by prior knowledge, the instability problem of inverter power supply models under high-penetration grid connection conditions is solved. This method achieves accurate impedance prediction with limited data and operating points, is applicable to various control scenarios, reduces data and computation costs, and improves the robustness and generalization ability of the model.
Patent Information
- Application Number
- CN202511516245.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-01-23
AI Technical Summary
Existing inverter power supply models suffer from power system instability under high-penetration grid connection conditions. Furthermore, existing impedance modeling methods lack accuracy and generalization ability when data quality is insufficient or coverage is limited, failing to meet online analysis requirements. In particular, they cannot accurately assess system stability when operating conditions change.
A non-mechanistic analytical method for general inverter power supply models guided by prior knowledge is adopted. By combining numerical analysis, model optimization and experimental prior knowledge, frequency band division and data augmentation are performed. Bayesian optimization neural network structure and L2 regularization are introduced to construct an impedance identification framework, which can achieve accurate prediction under limited data and operating conditions.
It achieves accurate prediction of a wide frequency range under limited data conditions, is applicable to both grid-based and network-based control, reduces data acquisition and computation costs, improves the robustness and generalization ability of the model, and meets the requirements of online analysis.
Smart Images

Figure CN121389754A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of new power system impedance modeling analysis, in particular to a priori knowledge guided general inverter power source model non-mechanism analysis method. BACKGROUND
[0002] In the new power system, inverter power sources are increasingly widely used as important interfaces for renewable energy grid connection and play an unprecedented key role. However, the power system instability problem caused by large-scale inverter power source access is also increasingly prominent, especially under high penetration grid connection conditions, power grids around the world have successively produced oscillation phenomena in the range of 2Hz-2kHz, which is rooted in the interaction between the control link of power electronic devices and the power system. Therefore, accurately constructing the IBPS output impedance model and evaluating its influence on the stability of the power grid under multiple operating points has become a hot spot of current research.
[0003] The power system impedance modeling method is mainly divided into mechanism analysis modeling and non-mechanism identification modeling. The former method usually needs to establish an accurate state space or admittance model, and relies on the detailed parameter information of the actual product to analyze the internal operation mechanism of the system through theoretical mathematical formulas. However, in actual application, due to the confidentiality strategy of manufacturers, the key internal control architecture and parameter information of the inverter power source are often difficult to obtain, thereby limiting the application of analytical modeling in practical engineering. The latter is that researchers propose a non-mechanism identification modeling based on data-driven, which is often used to construct an equivalent impedance model through external disturbance injection and system frequency response measurement. This method has the advantage of not needing to understand the physical details of the internal device, that is, it can complete modeling under external conditions. However, in the implementation process, the selection of sampling frequency points, the amplitude of the disturbance signal, and the quality and coverage range of the training data will directly affect the model dimension and the final identification accuracy. If the data quality is insufficient or the coverage range is limited, the accuracy and generalization ability of the model will be greatly weakened. Therefore, under the black box condition, the impedance measurement method based on small signal injection has strong practicability, but still has limitations: the impedance characteristics depend on active power, reactive power, frequency and operating point, and existing researches are mostly aimed at fixed operating points. When the operating conditions change, the original model fails, and the system stability cannot be accurately evaluated. This highlights the necessity of developing more universal and multi-condition adaptive impedance modeling methods.
[0004] At the same time, there are significant limitations in online analysis scenarios: on the one hand, the coverage range and data volume of the measured data are limited, and increasing the data volume will lead to high data acquisition cost, time-consuming and laborious, and will also cause the problem of rising computing cost, increasing storage overhead and too long model training time, which cannot meet the core requirement of online analysis of "short time and fast"; on the other hand, it is found through research that most current non-mechanism analysis modeling methods have common shortcomings, including: large amount of required training data, high requirement for training data quality, narrow prediction frequency range, only applicable to network following type control (GFLI), many training working conditions to be covered, weak model generalization ability, time-consuming and laborious manual hyperparameter optimization, and only capable of predicting system steady state working point. Therefore, there is an urgent need for a universal model with the advantages of "wide prediction frequency range, few training working conditions, small amount of required training data, and strong generalization ability", which can meet the demand of online analysis and also adapt to network following type and network construction type (GFMI) control. SUMMARY
[0005] In view of the above technical problems, the present application discloses a prior knowledge guided universal inverter power supply model non-mechanism analysis method, which can realize accurate impedance prediction in a large frequency range with only a small amount of data and working condition points, meet the universality of network following and network construction, and have strong generalization ability. By combining numerical analysis, model optimization and experimental prior knowledge, the IBPS is coarsely swept from 1 Hz to 1000 Hz, the frequency range is divided according to the impedance change slope, the real measurement points are retained in the rapidly changing frequency range, and the data is enhanced by using piecewise cubic Hermite interpolation in the smooth frequency range, so that the number of test points is greatly reduced while ensuring the modeling accuracy of the key frequency range. Further, the Bayesian optimization neural network structure, L 2regularization, expected improvement EI sampling function and Z-score data standardization means are introduced to improve the robustness and generalization ability of the model. The method is suitable for limited working conditions and small sample conditions, and is well applicable to network following type and network construction type control and has strong generalization ability.
[0006] To achieve the above object, the first aspect of the present application provides a prior knowledge guided universal inverter power supply model non-mechanism analysis method, comprising: S10: based on the inverter power supply measurement data set and the verification set, an impedance model matched according to the characteristics of the data set is constructed, wherein the identification framework of the impedance model is composed of a basic layer, a core layer and a target layer; S20: the basic layer of the impedance identification framework adopts coarse sweep impedance to obtain a prior impedance change slope, the prior impedance change slope knowledge is used to guide differential frequency sampling, and data enhancement is completed by combining piecewise cubic Hermite interpolation, and finally Z-score standardization normalization processing is performed; S30: the core layer of the impedance identification framework introduces L2 Regularized neural network is trained; S40: The impedance recognition framework target layer adopts Bayesian theorem prior knowledge transfer optimization model to search efficiently in the space of network depth and width, learning rate, regularization strength, etc. The historical evaluation of the source task is taken as priori in the proxy model in each iteration, and the next evaluation point is selected by combining the EI function maximization after dynamic correction. The optimal hyperparameter combination is returned for training and the target function value of this round is obtained. After the iteration is completed, the optimal hyperparameter combination is used as the model's optimal weight and structure configuration.
[0007] Preferably, the data set and the validation set are obtained by a nested parameter scanning method. Specifically, an inverter power circuit is built on a hardware-in-the-loop semi-physical simulation platform, and working point data under different active power P e and reactive power Q e are measured, and the real values of the sequence impedance amplitude and phase under different f at each working point are used to form the data set and the validation set. The impedance model adopts a four-channel joint prediction structure, which can simultaneously output the amplitude and phase of the positive and negative sequence impedances, forming a four-channel joint output impedance model structure. The output impedance is:
[0008] where |Z + | is the positive sequence impedance amplitude, ∠Z + is the positive sequence impedance phase, |Z - | is the negative sequence impedance amplitude, and ∠Z - is the negative sequence impedance amplitude. The error function of the impedance model is defined as the mean square sum of the four-channel errors, which is also used as the objective function of Bayesian optimization. The mathematical expression is:
[0009] where, represents the predicted value of the neural network; y i_real is the true value of the training sample; the number 4 in the denominator represents the average of four channels, i = 4 indicates that the square sum of the four channels is taken; M SE as a loss function, its size directly reflects the accuracy of the built model.
[0010] Preferably, the impedance recognition framework coarsely scans the impedance of the base layer, i.e. in a single working condition, 1-1000 Hz is coarsely scanned, and the first-order change rate of the impedance amplitude / phase is used to divide the frequency band into key frequency bands and flat frequency bands, and prior impedance slope knowledge is used to guide the arrangement of high-density real sampling points in the key frequency bands and the retention of a small number of sampling points in the flat frequency bands; The flat frequency band is combined with segmented cubic Hermite interpolation data enhancement, and the interpolation formula is as follows:
[0011] In the formula, f is the interpolation function value, and a i ( x ) and b i ( x ) are:
[0012] wherein, y i , y i+1 is the corresponding node function value, m i , m i+1 is the corresponding node first-order derivative, a i ( x ), a i+1 ( x ) is the weight function of the node function value; b i ( x ), b i+1 ( x ) is the weight function of the node derivative, which guarantees H i ( x i ) = y i , H i+1 ( x i+1 ) = y i+1 , H ' i ( x i ) = m i , H ' i+1 ( x i+1 ) = mi+1 ; The Z-score standardization normalization processing of the impedance recognition framework base layer is normalized as follows:
[0013] Wherein x normal is the standardized result, x i is the first sample of the original data, i x mean is the mean of the original data, x std is the standard deviation of the original data.
[0014] Preferably, the L 2 regularization processing is applicable to the model with small correlation between four-channel features, and the mathematical expression is:
[0015] Wherein is the two-norm of the network weight w , M SE is the original loss function, and λ is the regularization parameter.
[0016] Preferably, the Bayesian optimization algorithm is used as prior knowledge to guide the model training to obtain the optimal hyperparameters. As a global optimization algorithm, it follows the Bayesian theorem to fit the probability distribution of the objective function when searching for the optimal hyperparameters of the model, and the formula is as follows:
[0017] Wherein f is the black-box objective function, D kn is the set of hyperparameter combinations x 1, y 1),( x 2, y 2),…,( x n , y n ) that have been collected and the corresponding function values x n , y n , y n = f ( x n )+ , is the collection error, , 、 、 are marginal likelihood probability distribution, prior probability, posterior probability distribution, likelihood probability distribution, respectively f ; The main steps of the Bayesian optimization algorithm are as follows: (1) Model the relationship between model prediction effect and hyperparameter combination using Gaussian process GP surrogate model, and construct black box function; (2) randomly initialize the black box function, and select the hyperparameter combination with the maximum probability of the function as the next set of evaluation points to make the model prediction effect optimal by using the expected improvement function EI; (3) bring the evaluation point into the evaluation value of the objective function; (4) train the above steps until the end, and select the evaluation point with the best evaluation value from the evaluation set as the model hyperparameter combination; optimal hyperparameters x best is expressed as:
[0018] wherein f ( x ) is the objective function, x best is the set of hyperparameters with the minimum loss in the test data set; The Gaussian process parameter combination formula for constructing the black box unknown function between the neural network model and the hyperparameters is as follows:
[0019] wherein x is the hyperparameter vector, f ( x ) is the objective function, which is MSE here, m ( x ) is the mean function, K ( x , x' ) is the covariance function, which describes the correlation between two input points in the hyperparameter space; The EI function expression is as follows:
[0020]
[0021] wherein f ( x + ) is the current optimal objective function value, is the cumulative distribution function of the standard normal distribution, is the probability density function of the standard normal distribution.
[0022] The priori knowledge guided general inverter power supply model non-mechanism analysis method provided by the application has at least the following beneficial effects: The impedance model non-mechanism analysis method provided by the application can realize accurate modeling through training only by inputting online measurement data of a few working conditions. This characteristic effectively solves the problems of high data acquisition cost, time-consuming and laborious in actual engineering, avoids the pain points of rising calculation cost, storage cost and long model training time, greatly reduces the data and cost pressure, and can be directly used in online real-time scenes.
[0023] The impedance model non-mechanism analysis method provided by the application can realize prediction of a wide frequency band coverage range under a few sample conditions, is suitable for a frequency band in which oscillation may occur in an actual scene, and fully meets the demand of the actual engineering for oscillation frequency band analysis.
[0024] The impedance model non-mechanism analysis method provided by the application can realize accurate modeling in a wider application range through the frequency band sampling strategy, supports accurate prediction in a grid-connected control scene, can also be adapted to a grid-constructing control scene, the universality is significantly enhanced, and is superior to the prior art which is only applicable to a grid-constructing condition.
[0025] The impedance model non-mechanism analysis method provided by the application does not need manual time-consuming and laborious hyperparameter optimization, has stronger generalization ability under untrained working conditions, introduces regularization to effectively reduce the model complexity and avoid overfitting problems, and further improves the overall performance and stability of the model. BRIEF DESCRIPTION OF DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the application, some of the drawings of the application are used to provide further understanding of the application, and do not limit the application. In the drawings: Figure 1 It is a flow chart of the priori knowledge guided general inverter power supply model non-mechanism analysis method of the application; Figure 2 It is a structure block diagram of the inverter power supply and the grid connection; Figure 3 It is an identification framework of the impedance model; Figure 4 It is a schematic diagram of the differentiated frequency band sampling strategy; Figure 5 It is an impedance curve change graph under multiple working conditions; Figure 6 It is a comparison graph of different interpolation strategies; Figure 7 It is a model structure schematic diagram of the application; Figure 8 It is a grid-connected ANN prediction result graph under a few samples; Figure 9A prediction result graph of the model proposed by the application under a small sample for a grid-following type; Figure 10 A prediction result graph of a grid-forming ANN under a small sample; Figure 11 A prediction result graph of the model proposed by the application under a small sample for a grid-forming type. DETAILED DESCRIPTION
[0027] To make the objectives, technical solutions and advantages of the embodiments of the application clearer, the technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are some but not all of the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the application.
[0028] Specifically, as shown in Figure 1 A priori knowledge guided general inverter impedance model non-mechanism analysis method flow chart provided by the embodiment of the application, the method comprises the following steps S10-S40.
[0029] S10: based on the inverter power measurement data set and the verification set, according to the characteristics of the data set, the matched impedance model is constructed, wherein the identification framework of the impedance model is composed of the basic layer, the core layer and the target layer; S20: the basic layer of the impedance identification framework adopts the coarse scanning impedance to obtain the priori impedance change slope, the priori impedance change slope knowledge is used to guide the differential frequency band sampling, and the data enhancement is completed combined with the segmented cubic Hermite interpolation, and finally the Z-score standardization normalization processing is carried out; S30: the core layer of the impedance identification framework introduces L 2 regularized neural network for training; S40: the target layer of the impedance identification framework adopts the priori knowledge transfer optimization model hyperparameter of Bayes theorem, carries out small sample efficient search in the space of network depth and width, learning rate, regularization strength and the like, integrates the historical evaluation of the source task as priori in the agent model every iteration, dynamically corrects and combines the EI function maximization to select the next evaluation point, returns the optimal hyperparameter combination for training and obtains the target function value of this round, and after the iteration is completed, the optimal hyperparameter combination is used as the model final weight and structure configuration.
[0030] In a specific embodiment, the connection structure of the inverter type power supply and the grid is shown in Figure 2. In the traditional grid, the inverter type power supply mostly adopts grid-following type control; with the development of new energy industry, grid-forming type control is gradually applied, so there are mainly two control methods for the current inverter type power supply, namely the grid-following type control (GFLI) and the grid-forming type control (GFMI) shown in Figure 2.
[0031] The above steps provided by the preferred embodiment are further described in detail as follows.
[0032] The above S10 can further include the following steps: S11, mining the key factors affecting the impedance by measuring the data, and constructing an impedance matching impedance model according to the data characteristics of the influencing factors; S12, using the impedance model established by S11 to measure the working point data of different active power P e , reactive power Q e and the accurate impedance value obtained by frequency sweeping to build an impedance identification framework, which is composed of three layers.
[0033] In a specific embodiment, in step S12, as shown in Figure 3 , the impedance model identification framework of the present application is extended from the concept layer to the application layer. The impedance identification framework is expanded from the concept layer to the application layer to form a three-layer framework composed of the basic layer, the core layer and the target layer, and the priori knowledge is introduced into the three-layer structure.
[0034] Basic layer: This layer is responsible for data collection and preprocessing, including impedance differentiation frequency band sampling, segmented cubic Hermite interpolation data enhancement, and Z-score standardization normalization processing to avoid the problem of uneven contribution of features with different dimensions to gradient update. Moreover, while improving the model convergence speed and stability, the robustness of the model is further enhanced. This step ensures that the input data can cover the dynamic characteristics of the key frequency band and guarantee the consistency of the data distribution. This part provides high-quality driving data for subsequent training.
[0035] Core layer: This layer is the main training process of the neural network. The data set is divided into training set and validation set in proportion, and the parameters are updated by establishing the nonlinear mapping relationship between the input and output. In the training process, 2 regularization is introduced to suppress the overfitting phenomenon, and the early stopping mechanism is adopted to prevent the model from falling into overtraining. L
[0036] Target layer: This layer aims to obtain the final optimal result model. In order to improve the generalization ability and prediction accuracy of the model, this paper introduces the prior knowledge transfer of Bayes theorem to optimize the model hyperparameters. Small sample efficient search is carried out in the space of network depth and width, learning rate, and regularization strength. In each round of iterative training, the historical evaluation of the source task is taken as part of the prior knowledge, which is combined with the dynamic correction of the expected improvement EI function value to maximize the selection of the next evaluation point. The optimal hyperparameter combination of the next round is returned to the model training and the model target function value of this round is obtained. After the iteration is completed, the optimal hyperparameter combination in the iteration training round is taken as the final weight and structure configuration of the model. Thus, while ensuring the prediction accuracy, the problems such as high model complexity and falling into local optimum are avoided, and good generalization ability is maintained.
[0037] S13, using S11 data to constitute a training set and a validation set and the identification framework of S12 to establish an impedance identification model.
[0038] In a specific embodiment, the differentiated frequency band sampling strategy of the present application is shown in Figure 4. The implementation process of this strategy is as follows: first, obtain the prior impedance change slope through the preliminary impedance rough scanning, then divide the key frequency band and the non-key frequency band in combination with the key frequency band points, and finally introduce the above prior knowledge into the subsequent sampling link to form the differentiated frequency band sampling strategy.
[0039] The multi-working-condition impedance curve change of the present application is shown in Figure 5. The figure shows that the amplitude and phase of the impedance of the inverter-type power supply will change significantly under different active power P e and reactive power Q e Combinations. The upper half of Figure 5 is the impedance curve change graph under the condition of constant reactive power Q e and variable active power P e , and the lower half is the impedance curve change graph under the condition of constant active power P e and variable reactive power Q e . This phenomenon shows that the model needs to accurately predict the true value of the impedance under multiple working conditions and effectively cover the difference of the impedance value between different working conditions in order to meet the actual application requirements.
[0040] The comparison results of different interpolation strategies of the present application are shown in Figure 6. The figure shows that when the knowledge in the field of numerical analysis is transferred to this field, the characteristics of the inverter-type power supply impedance modeling should be fully considered, and it cannot be blindly applied. If the field characteristics are ignored and randomly transferred, the results under different interpolation position strategies in Figure 6 show that the wrong interpolation may even lead to a significant deterioration of the model prediction effect.
[0041] In a specific embodiment, in step S13, as shown in the schematic diagram of the model structure of the present application. Figure 7 The framework model adopts a four-channel joint prediction structure, which can simultaneously output the amplitude and phase of the positive and negative sequence impedances, forming a four-channel joint output impedance model structure, and the output impedance is:
[0042] Where |Z + | is the amplitude of the positive sequence impedance, ∠Z + is the phase of the positive sequence impedance, |Z - | is the amplitude of the negative sequence impedance, ∠Z - is the phase of the negative sequence impedance; The error function of the impedance model is defined as the average of the sum of squares of the four-channel errors, which is also used as the objective function of Bayesian optimization, and its mathematical expression is:
[0043] Where, represents the predicted value of the neural network; y i_real is the true value of the training sample; the number 4 in the denominator represents the average of the four channels, i = 4 indicates that the sum of squares of the four channels is taken; M SE As a loss function, its size directly reflects the accuracy of the built model.
[0044] In a preferred embodiment, the above S20 can further include the following steps: S21, differential frequency band sampling, coarse scanning of the 1-1000 Hz frequency band under a single working condition, dividing the frequency band into key frequency bands and flat frequency bands according to the first order change rate of the impedance amplitude / phase with respect to the frequency; then arranging high-density real sampling points in the key frequency bands and only retaining a small number of sampling points in the flat frequency bands. The formation of this strategy is guided by the prior knowledge provided by the experimental results shown in FIG. 4.
[0045] S22, piecewise cubic Hermite interpolation data enhancement, in the experimental link, the data is collected through the public connection point (PCC) injection point, and the active power, reactive power and frequency information of the port are recorded. The frequency band corresponding to the collected data is selected as 1-1000 Hz.
[0046] In a specific embodiment, in step S22, based on the prior knowledge guidance shown in FIG. 6, a logarithmic non-uniform distribution sampling method is used - in the key frequency band and the 50Hz negative impedance characteristic frequency band, sufficient real sampling values are preferentially collected; in the non-key frequency band, the above-mentioned segmented cubic Hermite interpolation is used for data enhancement, and the enhanced data is included in the training set. This method not only ensures the smoothness and physical consistency of the impedance curve, but also greatly reduces the redundant measurement. Subsequently, all samples are randomly shuffled, and the training data set and the verification data set are divided according to the ratio of 7:3, so as to ensure that the model has good generalization ability under different data distribution.
[0047] The interpolation formula is as follows:
[0048] In the formula, f(x) is the function value of the node corresponding to x, and f'(x) is the first derivative of the node corresponding to x. a i x ) and b i x ) are as follows:
[0049] wherein, y i , y i+1 is the function value of the corresponding node, m i , m i+1 is the first derivative of the corresponding node, a i x ), a i+1 x is the weight function of the node function value; b i x ), b i+1 x is the weight function of the node derivative, which ensures that H i x i ) = y i , H i+1 x i+1 ) = y i+1 , H ' i x i ) =m i , H ' i+1 ( x i+1 ) = m i+1 ; S23, Z-score normalization, takes into account the differences in scale and measurement errors among different data. Performing this normalization step before actual model training not only avoids the uneven contribution of various features to gradient updates due to different scales, but also improves the model's convergence speed and training stability, further enhancing the model's robustness and effectively improving its generalization ability.
[0050] In one specific embodiment, in step S23, this application employs Z-score normalization to unify the dimensions of the input features, effectively reducing gradient imbalance caused by differences in the dimensions of different physical quantities, improving the numerical stability and convergence speed of training, and suppressing overfitting to a certain extent. It also enhances generalization ability and avoids the drawbacks of maximum and minimum value normalization methods, which are susceptible to outliers and measurement errors. After training, the prediction results are restored to the physical quantity scale through inverse normalization. The normalization formula is shown below:
[0051] in x normal For the standardized results, x i For the first part of the original data i One sample, x mean The mean of the original data. x std This represents the standard deviation of the original data.
[0052] In a preferred embodiment, the above-described S30 may further include the following steps: S31 introduces a regularization mechanism to alleviate overfitting and improve the model's generalization ability. This involves adding a regularization term to the loss function so that the regularization term does not become too large when the loss function is reduced, thus preventing the model from becoming more complex and reducing overfitting.
[0053] In one specific embodiment, in step S31, this application selects L 2. Regularization, its mathematical expression is:
[0054] in Network weights w The 2-norm, MSE is the original loss function, and λ is a regularization parameter.
[0055] S32, the L 2. Regularization is combined with artificial neural networks to fit and train data.
[0056] In a preferred embodiment, the above S40 can further include the following steps: S41, select optimization algorithm, in order to make the model more autonomous training, and has better generalization ability, adopt the Bayesian optimization model hyper parameter, through the prior knowledge guide to complete the target task training, using the prior information of historical effect to guide the next search direction, greatly improve the training, search speed and efficiency.
[0057] In a specific embodiment, in step S41, the Bayesian optimization algorithm is used as a global optimization algorithm, and when searching for the optimal hyperparameters of the model, the probability distribution of the objective function is fitted according to the Bayes theorem, and the formula is as follows:
[0058] Among them f is a black box objective function, D kn = {( x 1, y 1),( x 2, y 2),…,( x n , y n )} is the set of hyperparameter combinations x n and the corresponding function values y n , y n = f ( x n )+ , is the sampling error, 、 、 、 are the marginal likelihood probability distribution, prior probability, posterior probability distribution, and likelihood probability distribution of f , respectively.
[0059] S42, use Gaussian process GP proxy model to model the relationship between model prediction effect and hyperparameter combination, and construct a black box function.
[0060] S43, randomly initialize the black-box function, and use the expected improvement function (EI) to select the hyperparameter combination with the maximum probability as the next set of evaluation points.
[0061] S44, bring the evaluation points into the target function to obtain the evaluation values.
[0062] S45, repeat the above steps until the end, and then select the evaluation point with the best evaluation value from the evaluation set as the model hyperparameter combination.
[0063] In a specific embodiment, in step S45, the best hyperparameters x best is expressed as:
[0064] wherein f ( x ) is the target function, x best is the set of hyperparameters with the minimum loss in the test data set; The Gaussian process parameter combination formula for constructing the black-box unknown function between the neural network model and the hyperparameters is as follows:
[0065] wherein x is the hyperparameter vector, f ( x ) is the target function, which is MSE here, m ( x ) is the mean function, K ( x , x' ) is the covariance function, which describes the correlation between two input points in the hyperparameter space; The EI function expression is as follows:
[0066]
[0067] wherein f ( x + ) is the current optimal target function value, is the cumulative distribution function of the standard normal distribution, is the probability density function of the standard normal distribution.
[0068] S46, verify the model obtained by training the artificial neural network.
[0069] In a specific embodiment, in step S46, the present application establishes an efficient impedance prediction framework suitable for limited operating points and small sample conditions through the complete process of "rough frequency sweep → frequency band division → differential sampling and interpolation enhancement → BO neural network optimization". Compared with traditional methods that rely on dense measurement of the full frequency band, this model not only greatly reduces the test cost, but also exhibits good prediction accuracy and adaptability across control structures under GFLI and GFMI.
[0070] As shown in Table 1, the parameters of the VSC experiment of the present application are shown. To verify the accuracy of the proposed method under the grid-following type, the model is verified using the data set that does not participate in the training, and the operating points of the training set are selected under the condition of 311 V voltage P e ∈[7KW,13KW], Q e ∈[-5KVar, 5KVar], interval is 2500W, 2500Var, and the number of frequency sampling points in single operating condition 1-1000Hz is 23.
[0071] Table 1 VSC parameters
[0072] The verification points are set to P e =15KW, Q e =1KVar, Figure 8 The ANN prediction results under the grid-following type are Figure 8 (a) ANN prediction value and actual value comparison chart of two-dimensional positive and negative sequence impedance amplitude and phase under the above operating conditions; Figure 8 (b) ANN model prediction of positive and negative sequence impedance amplitude and phase three-dimensional chart; Figure 8 (c) ANN training data set and prediction data set positive and negative sequence impedance amplitude and phase error chart; Figure 8 (d) ANN training data set positive and negative sequence impedance amplitude and phase scatter chart. Figure 9 The proposed model prediction results under the grid-following type are Figure 9 (a) The proposed model prediction value and actual value comparison chart of two-dimensional positive and negative sequence impedance amplitude and phase under the above operating conditions; Figure 9 (b) The proposed model prediction of positive and negative sequence impedance amplitude and phase three-dimensional chart; Figure 9 (c) The proposed model training data set and prediction data set positive and negative sequence impedance amplitude and phase error chart; Figure 9Fig. 6 is a diagram of the positive and negative sequence impedance amplitude and phase scatter plots of the training data set of the proposed model. As can be seen from the diagram, under the condition of small samples, the ANN model has poor fitting effect, and the predicted phase characteristics even seriously deviate from the true value; while the proposed model can still output prediction results similar to the true value. The maximum error of the amplitude of the proposed model is 0.012 dB, and the maximum error of the phase is 0.1 deg.
[0073] To verify the applicability of the method under the network type (GFMI), the training / verification steps in this section are completely consistent with the last section under the GFLI condition, except that the measurement model is changed to the model under the network control, and the model structure parameters are unknown. Figure 10 and Figure 11 Fig. 7 is a diagram of the experimental results of the above verification working conditions under the network. As can be seen from the diagram, under the condition of small samples, the ANN model has poor fitting effect, and the predicted phase characteristics even seriously deviate from the true value; while the proposed model can still output prediction results similar to the true value. The maximum error of the amplitude of the proposed model is 0.14 dB, and the maximum error of the phase is 0.07 deg. Finally, all the comparisons are shown in Table 2.
[0074] Table 2 Comparison of model experimental results
Claims
1. A method for nonmechanistic resolution of a general-purpose inverter model guided by prior knowledge, characterized in that, Comprise: S10: based on the inverter power measurement data set and the verification set, according to the data set characteristics, the matching impedance model is constructed, wherein the identification framework of the impedance model is composed of the base layer-core layer-target layer; S20: the base layer of the impedance identification framework adopts the rough scanning impedance to obtain the prior impedance change slope, the prior impedance change slope knowledge is used to guide the differential frequency band sampling, and the data enhancement is completed combined with the segmented cubic Hermite interpolation, and finally the Z-score standardization normalization processing is carried out; S30: impedance recognition framework core layer introduction L 2 regularized neural network is trained; S40: the target layer of the impedance identification framework adopts the prior knowledge transfer optimization model of Bayes theorem, and carries out small sample efficient search in the network depth and width, learning rate, regular strength and other spaces, each iteration integrates the historical evaluation of the source task as prior into the proxy model, dynamically corrects and combines with the EI function maximization to select the next evaluation point, returns the optimal hyperparameter combination for training and obtains the target function value of this round, and after iteration, the optimal hyperparameter combination is used as the model optimal weight and structure configuration.
2. The method of claim 1, wherein the method is characterized by: The data set and the verification set are obtained by a nested parameter scanning method, specifically, an inverter power circuit is built on a hardware-in-the-loop semi-physical simulation platform, and working point data under different active powers P e , reactive powers Q e , and real values of sequence impedance amplitude and phase under different f at each working point are measured to form the data set and the verification set. The impedance model adopts a four-channel joint prediction structure, which can simultaneously output the amplitude and phase of positive and negative sequence impedance, forming a four-channel joint output impedance model structure, and the output impedance is: where |Z + is the positive sequence impedance magnitude, ∠Z + is the positive sequence impedance phase, |Z - is the negative sequence impedance magnitude, ∠Z - is the negative sequence impedance magnitude; The error function of the impedance model is defined as the mean square sum of four-channel error, which is also used as the objective function of Bayes optimization, and its mathematical expression is: wherein, represents the predicted value of the neural network; y i_real is the true value of the training sample; the number 4 on the denominator represents the average value of four channels, i = 4 represents the sum of squares of four channels; M SE As a loss function, its size directly reflects the pros and cons of the accuracy of the built model.
3. The method of claim 1, wherein the method is characterized by: The rough scanning impedance of the base layer of the impedance identification framework is to carry out rough scanning on 1-1000 Hz under a single working condition, and the frequency band is divided into key frequency bands and flat frequency bands according to the first-order change rate of impedance amplitude / phase, and the prior impedance slope knowledge is obtained, and high-density real sampling points are arranged in the key frequency bands, and only a small number of sampling points are reserved in the flat frequency bands; The flat frequency band is combined with the segmented cubic Hermite interpolation data enhancement, and its interpolation formula is as follows: wherein a i ( x ) and b i ( x ) are: wherein y i , y i+1 is the corresponding node function value, m i , m i+1 is the corresponding node first derivative, a i x ), a i+1 x is a weight function for the node function value; b i x ), b i+1 x is a weight function for the node derivative, which guarantees H i x i y i , H i+1 x i+1 y i+1 , H i x i m i , H i +1 x i+1 m i+1 ; The Z-score standardization normalization processing of the base layer of the impedance identification framework is as follows: in x normal For the standardized results, x i For the first part of the original data i One sample, x mean The mean of the original data. x std This represents the standard deviation of the original data.
4. The method of claim 1, wherein the method is characterized by: The L 2 Regularization is applied to the model with small inter-channel feature correlation, and its mathematical expression is: wherein i.e. network weights w of the two-norm, M SE is the original loss function, and λ is a regularization parameter.
5. The non-mechanistic analytical method for a general inverter power supply model guided by prior knowledge according to claim 1, characterized in that, The Bayes optimization algorithm is used as prior knowledge to guide model training to obtain optimal hyperparameters, which is used as a global optimization algorithm to find the optimal hyperparameters of the model, and follows Bayes theorem to fit the probability distribution of the target function, and its formula is as follows: in f For black-box objective function, D kn ={( x 1, y 1),( x 2, y 2),…,( x n , y n )} represents the hyperparameter combinations that have already been collected. x n and the corresponding function values y n The set, y n = f ( x n )+ , To account for data acquisition error, , , , They are f The marginal likelihood probability distribution, prior probability, posterior probability distribution, and likelihood probability distribution are respectively; The main steps of the Bayes optimization algorithm are as follows: (1) model the relationship between the model prediction effect and the hyperparameter combination with the Gaussian process GP proxy model to construct a black box function; (2) randomly initialize the black box function, and select the hyperparameter combination with the maximum probability to make the model prediction effect optimal as the next set of evaluation points based on the expected improvement function EI function; (3) bring the evaluation point into the evaluation value of the target function; (4) train the above steps until the end, and select the evaluation point with the best evaluation value from the evaluation set as the model hyperparameter combination; Best hyperparameters x best is represented as: wherein f ( x ) is the objective function, x best is the set of hyperparameters that minimizes the loss in the test dataset; The Gaussian process parameter combination formula for constructing the black box unknown function between the neural network model and the hyperparameters is as follows: where x is the vector of hyperparameters, f ( x ) is the objective function, here the MSE, m ( x ) is the mean function, K ( x , x' ) is the covariance function, describing the correlation between two input points in the hyperparameter space; The EI function expression is as follows: wherein f ( x + ) is the current best objective function value, is the cumulative distribution function of the standard normal distribution, is the probability density function of the standard normal distribution.