Self-learning robust dynamic equivalent modeling method suitable for complex external alternating current power grid
By introducing a self-learning robust dynamic equivalent modeling method in external AC grid equivalent modeling, combined with the improved Kalman filtering algorithm and whale optimization algorithm, the contradiction between the accuracy, complexity and computational efficiency of the existing methods is solved, and more accurate and efficient dynamic modeling of the grid is achieved.
Patent Information
- Application Number
- CN202510061534.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-06-06
Smart Images

Figure CN120105863A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of power system modeling, and in particular relates to a self-learning robust dynamic equivalent modeling method suitable for complex external AC power grids. Background Art
[0002] As large-scale wind power-based renewable energy sites are connected to weak AC power grids, power systems with large-scale wind farms face different stability issues. In order to study the impact of the complex dynamic characteristics of large-scale wind farms on system stability, it is necessary to reasonably and accurately model the system equivalently. If the system is modeled in a refined manner, it will inevitably lead to a huge computational burden, which is not conducive to subsequent stability analysis. The usual practice is to retain the object being studied and perform equivalent analysis on the remaining parts.
[0003] At present, the solutions to the problem of equivalent modeling of external AC power grids include neural network methods, Thevenin equivalent, dynamic state estimation, and frequency-dependent network equivalent models. The existing equivalent modeling methods for external AC power grids have achieved preliminary results at both the offline modeling level and the online modeling level. For example, Chinese patent application CN118117579A discloses a hybrid dynamic equivalent modeling method suitable for power systems, which is mainly based on a strong tracking volumetric Kalman filter based on an optimized fading factor, and supplemented by a time series prediction model of a convolutional neural network-gated recurrent unit with improved whale optimization that integrates a self-attention mechanism. While performing order reduction equivalence on the system, it can effectively take into account the influence of nonlinear dynamics of the power system and can be used to accurately describe the complex dynamic behavior of the system. However, the existing methods still have contradictions between the accuracy of the equivalent model, the complexity of the equivalent model, and the computational efficiency of the equivalent modeling. In addition, although the existing modeling methods based on state estimation can achieve accurate modeling, the estimated state quantity obtained does not have practical significance due to the lack of over-limit check on the estimated state quantity. In order to solve the above problems, it is necessary to design an improved equivalent modeling method to quickly provide a more accurate and reliable model basis for the subsequent system dynamic stability analysis. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a self-learning robust dynamic equivalent modeling method suitable for complex external AC power grids, which can quickly provide a more accurate and reliable model basis for subsequent system dynamic stability analysis.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] The present invention provides a self-learning robust dynamic equivalent modeling method applicable to a complex external AC power grid, comprising the following steps:
[0007] Establishing a robust dynamic equivalent model of an external AC power grid, including a mechanism state model and a two-layer observation model, wherein the two-layer observation model includes a mechanism observation model and a neural network observation model;
[0008] Obtain the state vector and input vector of the previous moment, input them into the mechanism state model, calculate the estimated state vector of the next moment by improving the self-learning square root volume Kalman filter algorithm, substitute the estimated state vector of the next moment into the mechanism observation model to calculate the corresponding output value, and calculate the prediction error according to the actual observation value, if the prediction error does not exceed the set threshold, then use the output of the mechanism observation model as the output of the robust dynamic equivalent model of the external AC power grid; otherwise, substitute the estimated state vector of the next moment into the neural network observation model, and use its output as the output of the robust dynamic equivalent model of the external AC power grid;
[0009] Among them, the neural network observation model is updated offline through the improved whale optimization algorithm. In the improved self-learning square root cubature Kalman filter algorithm, the initially calculated prediction state vector is corrected by the improved whale optimization algorithm, and the square root of the measurement noise covariance matrix is corrected by the self-adjustment strategy. The improved whale optimization algorithm performs an out-of-limit check on each element in the individual, and designs different fitness functions for updating the neural network observation model and correcting the initially calculated prediction state vector.
[0010] Furthermore, the mechanism state model is established based on the third-order model of the synchronous generator, and the expression is as follows:
[0011] x k =f(x k-1 ,u k-1 )
[0012] Among them, x is the state vector, k is the time series, u is the input vector, u=[i bd ,i bq ] T ,i bd and i bq They are the three-phase currents i of the boundary busbars abc After Park transformation, the dq components of the current at the boundary bus are obtained.
[0013] Furthermore, the specific calculation process of the improved whale optimization algorithm is as follows:
[0014] S11. Initialize the population:
[0015]
[0016] Among them, the subscript wh represents the population number, wh = 1, ..., N, N is the number of populations, the subscript 0 represents initialization, p wh,0represents the initial wh-th individual, ub and lb are the upper and lower bounds of the solution respectively, f u (0, 1) is used to generate uniformly distributed random numbers, μ F is a random value between 0 and 1;
[0017] Perform an out-of-limit check on each element in the initial individual:
[0018]
[0019] The superscript d of each variable represents the dth element of the solution, d = 1, ..., D, where D is the dimension of the solution;
[0020] Then, the initial fitness function value is calculated according to the fitness function and sorted;
[0021] S12, introduce the difference creative search strategy to update the population:
[0022] When the population number wh is equal to N, and f u (0, 1) is less than μ pc When , the updated individual is:
[0023]
[0024] Among them, μ pc is a number from 0 to 1;
[0025] When the population number wh is less than or equal to η ngs When, randomly select an individual, whose serial number is r 1 , r 1 Not equal to wh, and not equal to the number r of the optimal solution obtained in the current iteration opt , if a random number is less than or equal to η wh,i Or d is equal to a random number, then the dth element in the individual is updated as follows:
[0026]
[0027] Among them, f lkd is the Linnick distribution, μ pg and μ pσ is the parameter of the distribution function, μ pg is the golden ratio;
[0028] η ngs and η wh,i The definitions are:
[0029]
[0030] Among them, f round The rounding function rounds the value to the nearest integer or a specified number of decimal places. is the individual of the i-th iteration coefficient value;
[0031] In addition to the above two cases, two individuals are randomly selected, whose serial numbers are r and 1 and r 2 , if r 1 Not equal to wh, and not equal to r 2 and the serial number r of the optimal solution obtained in the current iteration opt , r 2 Not equal to wh and r opt , if a random number is less than or equal to η wh,i Or d is equal to a random number, then the dth element of the individual is updated as:
[0032]
[0033] Among them, η IF,i is a dynamic social impact factor;
[0034] Perform out-of-bounds checks on individuals updated based on the difference creative search strategy:
[0035]
[0036] Then, the fitness value is calculated according to the fitness function, and the optimal individual obtained in the current iteration is found. This serves as the basis for the subsequent optimization process;
[0037] S13. Further update individuals by simulating the humpback whale hunting process:
[0038] Update the dth element in the individual by:
[0039]
[0040] Among them, whr is the random individual number, C wh,i Equal to 2f u (0, 1), a 3 , l wh,i 、w w,i and A wh,i The specific expression is as follows:
[0041]
[0042] Individuals are further updated through random mutation strategies;
[0043] Perform out-of-bounds checks on individuals updated based on random mutation strategies:
[0044]
[0045] Then, the fitness value is calculated according to the fitness function, and the optimal individual P is selected. opt,i .
[0046] Furthermore, p wh,0 The calculation formula is as follows:
[0047] p wh,0 =lb+(ub-lb)·μ wh,0
[0048] Among them, μ wh,0 Generated by piecewise linear chaotic mapping.
[0049] Furthermore, when the improved whale optimization algorithm is used to update the neural network observation model, the fitness function is:
[0050] f fit,z (I I , χ) = f rmse,z (Θ z (I I , χ), Z O,z )
[0051] When the improved whale optimization algorithm is used to correct the initially calculated predicted state vector, the fitness function is:
[0052]
[0053] Where χ represents the problem to be solved, and the subscript z represents the sequence number, z = 1, ..., n o , n o is the number of output variables, Θ is the neural network model, f rmse To find the root mean square error function, I I and Z O are input data and output data respectively, z o is the actual observed variable, h phy It is a mechanism observation model.
[0054] Furthermore, the dynamic social impact factor η IF,i The specific expression is as follows:
[0055]
[0056] Among them, i is the current iteration number, and its maximum value is i max .
[0057] Furthermore, the specific process of further updating individuals through random mutation strategy is as follows:
[0058]
[0059] Among them, f od To generate normally distributed random numbers, μ CauIa and μ CauIb is a constant, μ CauIc is a standard normal distribution random number, a 7 is a constant, κ wh,i The expression for the dth element in is as follows:
[0060]
[0061]
[0062] Among them, a 9 is a constant.
[0063] Furthermore, the specific calculation process of the improved self-learning square root volumetric Kalman filter algorithm is as follows:
[0064] S21. Set the initial state vector x 0 , the initial state error covariance matrix S 0|0 , the initial process noise covariance matrix S q,0 And the initial measurement noise covariance matrix S r,0 , the number of state quantities and the number of observation quantities are n and l respectively;
[0065] S22. Prediction:
[0066] S221. Calculate the volume point based on the state vector estimated at the previous moment:
[0067] ζ j,k-1|k-1 =x k-1 +ξ j [S k-1|k-1 S k-1|k-1 ] j
[0068] Among them, S k-1|k-1 is the square root of the state covariance matrix at time k-1, ξ j is the jth column of ξ, j∈{1,...,2n}, ξ is defined as:
[0069]
[0070] S222. Propagate each volume point and calculate the predicted state vector of the robust dynamic equivalent model:
[0071]
[0072] S223. Correct the initially calculated predicted state vector by improving the whale optimization algorithm:
[0073] Calculate the prediction error. If the prediction error exceeds the set threshold, the optimal prediction state is calculated by improving the whale optimization algorithm and the corresponding fitness function.
[0074] The square root of the measurement noise covariance matrix is corrected by the self-tuning strategy:
[0075]
[0076] in, is the square root of the optimal measurement noise covariance;
[0077] S224. Calculate the square root of the predicted state error covariance matrix:
[0078]
[0079] Among them, UT cov and χ k|k-1 The specific expression is as follows:
[0080] UT cov = Tria([χ k|k-1 S q,k-1 ] T )
[0081]
[0082] Among them, Tria represents the upper triangular matrix obtained by QR decomposition, S q,k =S q,k-1 ;
[0083] S23, measurement update
[0084] S231, further calculate the volume point:
[0085]
[0086] S232, estimate the predicted observation vector, and calculate the square root of its corresponding covariance matrix:
[0087]
[0088] Among them, UT cov,z and θ k|k The specific expression of -1 is as follows:
[0089] UT cov,z = Tria([θ k|k-1 S r,k ] T )
[0090]
[0091] S233. Calculate the cross covariance matrix:
[0092]
[0093] in, The expressions of and are as follows:
[0094]
[0095] S234, calculate Kalman gain:
[0096]
[0097] S235, calculate the state vector estimated at the next moment and S at the next moment k|k :
[0098]
[0099] Among them, UT cov* The calculation formula is as follows:
[0100]
[0101] S236, check for over-limit and update the estimated state vector:
[0102]
[0103] Among them, x lb and x up are the expected lower and upper bounds of the estimated state, respectively.
[0104] Furthermore, the specific process of offline updating the neural network observation model by improving the whale optimization algorithm is as follows:
[0105] Obtain the state vector and the input vector to form the input data in the training set; obtain the actually measured output vector to form the output data in the training set;
[0106] Obtain the optimal number of hidden layer neurons according to the improved whale optimization algorithm and the corresponding fitness function;
[0107] The neural network model in the neural network observation model is trained based on the constructed training set data and the optimal number of hidden layer neurons, and then the neural network observation model is updated offline.
[0108] Furthermore, if there is noise in the measured data in the input vector and the output vector, the improved fully adaptive noise ensemble empirical mode decomposition algorithm is first used to denoise the data before subsequent calculations.
[0109] Compared with the prior art, the present invention has the following beneficial effects:
[0110] 1. The present invention proposes a self-learning robust dynamic equivalent modeling method suitable for complex external AC power grids. First, a robust dynamic equivalent model of the external AC power grid is established, including a mechanism state model and a two-layer observation model, and the two-layer observation model includes a mechanism observation model and a neural network observation model; then, the state vector and input vector of the previous moment are obtained and input into the mechanism state model, and the state vector estimated at the next moment is calculated by improving the self-learning square root volume Kalman filter algorithm, and the state vector estimated at the next moment is substituted into the mechanism observation model to calculate the corresponding output value, and the prediction error is calculated according to the actual observation value. If the prediction error does not exceed the set threshold, the output of the mechanism observation model is used as the output of the robust dynamic equivalent model of the external AC power grid to ensure the calculation efficiency of the model; otherwise, it means that the mechanism observation model fails and can no longer accurately describe the complex dynamics of the external AC power grid. At this time, the state vector estimated at the next moment is substituted into the neural network observation model, and its output is used as the output of the robust dynamic equivalent model of the external AC power grid. ; In the present invention, the neural network observation model is updated offline by improving the whale optimization algorithm, so that the above method has self-learning ability, and can accurately capture the complex dynamic behavior of the external AC power grid in different scenarios while ensuring the calculation efficiency of the model; in the improved self-learning square root cubature Kalman filter algorithm, the predicted state vector preliminarily calculated is corrected by improving the whale optimization algorithm, and the square root of the measurement noise covariance matrix is corrected by the self-adjustment strategy, and the improved whale optimization algorithm performs an out-of-limit check on each element in the individual, so that the obtained estimated state quantity has practical significance and improves the accuracy of modeling. The improved whale optimization algorithm also designs different fitness functions for updating the neural network observation model and correcting the predicted state vector preliminarily calculated; the above method does not require detailed topological structure and parameters, and can achieve equivalent reduced-order modeling of complex external AC power grids while retaining the nonlinear dynamic characteristics of the power system, reducing the computational burden in the subsequent stability analysis process, and laying a reliable model foundation for the stability assessment of the power system.
[0111] 2. The present invention proposes an improved whale optimization algorithm, which initializes the population in a way that can increase the randomness and diversity of the initial population; in the algorithm, a difference creative search strategy is introduced to update the population, which can enhance the population diversity of the algorithm iteration process; in addition, the algorithm proposes a random mutation strategy to further update the population, which can enhance the algorithm's ability to escape from local optimality and improve the algorithm's global optimization ability; the present invention proposes an improved self-learning square root cubature Kalman filter algorithm, which, on the one hand, corrects the initially calculated prediction state vector based on the improved whale optimization algorithm to ensure the accuracy of the modeling results; on the other hand, by correcting the square root of the measurement noise covariance matrix through a self-adjustment strategy, the influence of the square root of the randomly set initial measurement noise covariance matrix on the accuracy can be eliminated. BRIEF DESCRIPTION OF THE DRAWINGS
[0112] Figure 1 A flowchart for improving the self-learning square root cubature Kalman filter algorithm;
[0113] Figure 2 The schematic diagram of the power system structure is as follows:
[0114] Among them, v babc 、i babc , P b and Q b They are the three-phase voltage, three-phase current, active power and reactive power of the boundary bus respectively;
[0115] Figure 3 This is a comparison chart of the optimization capabilities of the improved whale optimization algorithm proposed in the present invention and the existing optimization algorithm, where the horizontal axis is the number of iterations and the vertical axis is the current best fitness value;
[0116] Figure 4 To improve the IEEE39 node system structure diagram;
[0117] Figure 5 The figure is a comparison diagram between the equivalent model and the detailed model obtained based on the method proposed by the present invention.
[0118] Among them, (5a) corresponds to v bd , (5b) corresponds to v bq , v bd and v bq They are v babc After Park transformation, the dq components of the voltage at the boundary bus are obtained, and (5c) corresponds to P b , (5d) corresponds to Q b . DETAILED DESCRIPTION
[0119] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0120] Example:
[0121] The existing modeling methods still have the contradiction between the complexity of the equivalent modeling process, the computational efficiency of the equivalent modeling and the accuracy of the equivalent model. In addition, although the existing modeling methods based on state estimation can achieve accurate modeling, the estimated state quantities obtained do not have practical significance due to the lack of over-limit checks on the estimated state quantities. In order to solve the above problems, this embodiment provides a self-learning robust dynamic equivalent modeling method suitable for a complex external AC power grid, which equates the complex external AC power grid to a reduced-order equivalent model, which is further used as a model basis for subsequent system dynamic stability analysis, and mainly includes the following steps: first, a robust dynamic equivalent model of the external AC power grid is established, including a mechanism state model and a two-layer observation model, and the two-layer observation model includes a mechanism observation model and a neural network observation model; then, the state vector and input vector at the previous moment are obtained, and the input vector is input into the mechanism state model, and the dynamic behavior of the complex external AC power grid is captured by an improved self-learning square root cubature Kalman filter algorithm, and the state vector estimated at the next moment is calculated, and the state vector estimated at the next moment is substituted into the mechanism observation model to calculate the corresponding output value, and the prediction error is calculated according to the actual observation value. If the prediction error does not exceed the set threshold, the output of the mechanism observation model is used as the output of the robust dynamic equivalent model of the external AC power grid; otherwise, the state vector estimated at the next moment is substituted into the neural network observation model, and its output is used as the output of the robust dynamic equivalent model of the external AC power grid.
[0122] The innovations of the above method are as follows: (1) By improving the whale optimization algorithm to update the neural network observation model offline, the proposed state estimation algorithm has self-learning ability, and can be used to accurately capture the complex dynamic behavior of the external AC power grid in different scenarios; (2) In the improved self-learning square root cubature Kalman filter algorithm, the initial calculated prediction state vector is corrected by improving the whale optimization algorithm to ensure the accuracy of the modeling results; and the square root of the measurement noise covariance matrix is corrected by the self-adjustment strategy to eliminate the influence of the square root of the randomly set initial measurement noise covariance matrix on the accuracy. The improved whale optimization algorithm performs an over-limit check on each element in the individual, and different fitness functions are designed to update the neural network observation model and correct the initial calculated prediction state vector. The above method does not require the detailed topology and parameters of the power system. While retaining the nonlinear dynamic characteristics of the power system, it can achieve equivalent reduced-order modeling of the external AC power grid, reduce the computational burden in the subsequent stability analysis process, and lay a model foundation for the stability assessment of the power system.
[0123] This embodiment uses Figure 2 Taking the power system shown in the figure as an example, the above method is described in detail. Figure 2 As shown, the entire external AC power grid (external system) is modeled as a robust dynamic equivalent model, which includes a mechanism state model and a two-layer observation model. Among them, the mechanism state model is constructed based on the third-order model of the synchronous generator. Since the actual external AC power grid is regarded as a black box, the relevant parameters in the mechanism state model are unknown. Therefore, all unknown parameters in the mechanism model will be added to the mechanism state model as state quantities to be estimated. In summary, the external AC power grid can be replaced by the mechanism state model shown in the following formula:
[0124] x k =f(x k-1 ,u k-1 ) (1)
[0125] Where x is the state vector, x mac and x p are the state quantities of the third-order model of the synchronous generator and the state quantities of the unknown parameters respectively. k is the time series, u is the input vector, u=[i bd ,i bq ] T ,i bd and i bq They are the three-phase currents i of the boundary bus respectively. abc After Park transformation, the dq components of the current at the boundary bus are obtained.
[0126] The two-layer observation model is used to calculate the output of the robust dynamic equivalent model, including the mechanism observation model layer and the neural network observation model layer. The two-layer observation model is to constitute the port electrical quantity of the robust dynamic equivalent model. The two-layer observation model can be modeled as follows:
[0127]
[0128] Among them, h phy is the mechanism observation model, h NN is the neural network observation model, e thresh is the threshold used to switch between the two observation models.
[0129] E k is the prediction error, and the calculation formula is as follows:
[0130] E k =||z o,k -h phy (x k ,u k )|| ∞ (3)
[0131] Among them, ||·|| ∞ is the infinite norm, z o is the actual observed variable.
[0132] like Figure 1 As shown in Figure 1, considering the model calculation efficiency, the mechanism observation model is generally used directly under the premise of meeting the model accuracy. When the mechanism observation model fails and cannot accurately describe the complex dynamics of the external AC power grid, it is necessary to use an offline trained neural network observation model.
[0133] This embodiment proposes an improved whale optimization algorithm to provide an algorithmic foundation for optimization problems involved in subsequent modeling methods. The specific calculation process of the algorithm is as follows:
[0134] S11. Initialize the population and calculate the initial fitness function value.
[0135] In order to increase the randomness and diversity of the initial population, the following formula is used to initialize the population:
[0136]
[0137] The subscript wh indicates the population number, wh = 1, ..., N, where N is the number of populations. The subscript 0 indicates initialization, p wh,0 represents the initial wh-th individual, According to p wh,0 Calculate and obtain. ub and lb are the upper and lower bounds of the solution (vector), respectively. u (0, 1) is used to generate uniformly distributed random numbers, μF is a random value between 0 and 1. wh,0 The calculation formula is as follows:
[0138] p wh,0 =lb+(ub-lb)·μ wh,0 (5)
[0139] Among them, μ wh,0 Generated by piecewise linear chaotic mapping.
[0140] Perform an out-of-limit check on each element in the initial individual:
[0141]
[0142] The superscript d of each variable represents the dth element of the solution, d=1, ..., D, and D is the dimension of the solution (vector). The initial fitness function value is calculated according to the fitness function and sorted.
[0143] In particular, in this embodiment, when the improved whale optimization algorithm is used to update the neural network observation model, the fitness function is:
[0144] f fit,z (I I , χ) = f rmse,z (Θ z (I I , χ), Z O,z ) (7)
[0145] When the improved whale optimization algorithm is used to correct the initially calculated predicted state vector, the fitness function is:
[0146]
[0147] Where χ represents the vector to be solved, and the subscript z represents the sequence number, z = 1, ..., n o , n o is the number of output variables, Θ is the neural network model, f rmse To find the root mean square error function, I I and Z O are input data and output data respectively, z o is the actual observed variable, h phy It is a mechanism observation model.
[0148] S12. Introduce differential creative search strategy to update the population.
[0149] When the population number wh is equal to N, and f u (0, 1) is less than μ pc When , the updated individual is:
[0150]
[0151] Among them, μ pc A number from 0 to 1.
[0152] When the population number wh is less than or equal to η ngs When, randomly select an individual, whose serial number is r 1 , r 1 Not equal to wh, and not equal to the number r of the optimal solution obtained in the current iteration opt If a random number is less than or equal to η wh,i Or d is equal to a random number, then the dth element in the individual is updated as follows:
[0153]
[0154] Among them, f lkd is the Linnick distribution, μ pg and μ pσ is the parameter of the distribution function, μ pg The golden ratio.
[0155] η ngs and η wh,i The definitions are:
[0156]
[0157] Among them, f round The rounding function rounds the value to the nearest integer or a specified number of decimal places. is the individual of the i-th iteration Coefficient value.
[0158] In addition to the above two cases, two individuals are randomly selected, whose serial numbers are r and 1 and r 2 , if r 1 Not equal to wh, and not equal to r 2 and the serial number r of the optimal solution obtained in the current iteration opt , r 2 Not equal to wh and r opt If a random number is less than or equal to η wh,i Or d is equal to a random number, then the dth element of the individual is updated as:
[0159]
[0160] Among them, η IF,i is the dynamic social impact factor, and its expression is as follows:
[0161]
[0162] Among them, the subscript i is the current iteration number, and its maximum value is i max .
[0163] Perform out-of-bounds checks on individuals updated based on the difference creative search strategy:
[0164]
[0165] Then, the fitness value is calculated according to the fitness function, and the optimal individual obtained in the current iteration is found. This serves as the basis for the subsequent optimization process.
[0166] S13. Further update individuals by simulating the hunting process of humpback whales.
[0167] Update the dth element in the individual by:
[0168]
[0169] Among them, whr is the random individual number, C wh,i Equal to 2f u (0, 1).
[0170] a 3 , l wh,i , w w,i and A wh,i The specific expression is as follows:
[0171]
[0172] In order to further enhance the ability of the algorithm to escape from the local optimum, this embodiment proposes a random mutation strategy to further update individuals, which can be implemented by the following formula:
[0173]
[0174] Among them, f od To generate normally distributed random numbers, μ CauIa and μ CauIb is a constant, μ CauIc is a standard normal distribution random number, a 7 is a constant. wh,i The expression for the dth element in is as follows:
[0175]
[0176] Among them, a g is a constant.
[0177] Perform out-of-bounds checks on individuals updated based on random mutation strategies:
[0178]
[0179] Then, the fitness value is calculated according to the fitness function, and the optimal individual P is selected. opt,i .
[0180] Based on the above improved whale optimization algorithm, the improved self-learning square root cubature Kalman filter algorithm is as follows: Figure 1 As shown, the specific calculation process is as follows:
[0181] S21. Set the initial state vector x 0 , the initial state error covariance matrix S 0|0 , the initial process noise covariance matrix S q,0 And the initial measurement noise covariance matrix S r,0 , the number of state quantities and the number of observation quantities are n and l respectively.
[0182] S22. Prediction.
[0183] S221. Calculate the volume point based on the state vector estimated at the previous moment:
[0184] ζ j,k-1|k-1 =x k-1 +ξ j [S k-1|k-1 S k-1|k-1 ] j (20)
[0185] Among them, S k-1|k-1 is the square root of the state covariance matrix at time k-1, ξ j is the jth column of ξ, j∈{1,...,2n}, ξ is defined as:
[0186]
[0187] S222. Propagate each volume point and calculate the predicted state vector of the robust dynamic equivalent model:
[0188]
[0189] S223. Correct the initially calculated predicted state vector by improving the whale optimization algorithm:
[0190] The prediction error is calculated according to formula (3). If the prediction error exceeds the set threshold, the optimal prediction state is calculated by improving the whale optimization algorithm and the corresponding fitness function.
[0191] In order to eliminate the influence of the square root of the randomly set initial measurement noise covariance matrix on the accuracy of the proposed improved self-learning square root cubature Kalman filter, this embodiment corrects the square root of the measurement noise covariance matrix through a self-adjustment strategy:
[0192]
[0193] in, is the square root of the optimal measurement noise covariance.
[0194] S224. Calculate the square root of the predicted state error covariance matrix:
[0195]
[0196] Among them, UT cov and χ k|k-1 The specific expression is as follows:
[0197]
[0198] Among them, Tria represents the upper triangular matrix obtained by QR decomposition, S q,k =S q,k-1 .
[0199] S23, measurement update.
[0200] S231, further calculate the volume point:
[0201]
[0202] S232, estimate the predicted observation vector, and calculate the square root of its corresponding covariance matrix:
[0203]
[0204] Among them, UT cov,z and θ k|k-1 The specific expression is as follows:
[0205]
[0206] S233. Calculate the cross covariance matrix:
[0207]
[0208] in, The expressions of and are as follows:
[0209]
[0210] S234, calculate Kalman gain:
[0211]
[0212] S235, calculate the state vector estimated at the next moment and S at the next moment k|k :
[0213]
[0214] Among them, UT cov* The calculation formula is as follows:
[0215]
[0216] S236, check for over-limit and update the estimated state vector:
[0217]
[0218] Among them, x lb and x up are the expected lower limit and upper limit of the estimated state respectively. If the state quantity calculated according to formula (34) exceeds the limit, the optimization solution is performed according to formula (7) and the proposed improved whale optimization algorithm, and the result is
[0219] The specific process of offline updating the neural network observation model by improving the whale optimization algorithm is as follows: obtain the state vector and the input vector to constitute the input data in the training set; obtain the actually measured output vector to constitute the output data in the training set. In a preferred embodiment, if there is noise in the measured data in the input vector and the output vector, it is necessary to first use the improved fully adaptive noise set empirical mode decomposition algorithm (an existing algorithm) to denoise to avoid the influence of noise on the accuracy of the neural network model. The specific process is... Then, the optimal number of hidden layer neurons is obtained according to the improved whale optimization algorithm and the corresponding fitness function. Finally, the neural network model in the neural network observation model is trained based on the constructed training set data and the optimal number of hidden layer neurons, and then the neural network observation model is updated offline.
[0220] If the mechanism observation model and the neural network observation model based on the robust dynamic equivalent model can be used to accurately describe the complex dynamic behavior of the external AC power grid, the model used to output the estimated observation vector depends on the computational efficiency of the observation model used. When the mechanism observation model fails, the neural network observation model based on the robust dynamic equivalent model is activated. The self-learning property of the proposed improved self-learning square root cubature Kalman filter depends on the offline trained neural network observation model.
[0221] In order to verify the effectiveness of the proposed improved whale optimization algorithm (IWOA), this embodiment takes the F12 function in CEC2005 as an example to compare the above method with the existing optimization algorithms (GSWOA, GWO, PSO, WOA, ABC and MPA). The results are as follows: Figure 3As shown in the figure, it is verified that the improved whale optimization algorithm (IWOA) has outstanding global optimization ability.
[0222] In order to verify the effectiveness of the above-mentioned equivalent modeling method, this embodiment uses Figure 4 Taking the improved IEEE39 bus system as an example, verification is performed by changing the line parameters between bus 13 and bus 14. Figure 5 As shown, the calculation results of the above equivalent modeling method are close to the simulation results of the detailed model.
[0223] The above description of the embodiments is to facilitate the understanding and use of the invention by those skilled in the art. It is obvious that those skilled in the art can easily make various modifications to these embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments, and improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the present invention should be within the scope of protection of the present invention.
Claims
1. A self-learning robust dynamic equivalent modeling method suitable for complex external AC power grids, characterized in that: The following steps are involved: Establishing a robust dynamic equivalent model of an external AC power grid, including a mechanism state model and a two-layer observation model, wherein the two-layer observation model includes a mechanism observation model and a neural network observation model; Obtain the state vector and input vector of the previous moment, input them into the mechanism state model, calculate the estimated state vector of the next moment by improving the self-learning square root volume Kalman filter algorithm, substitute the estimated state vector of the next moment into the mechanism observation model to calculate the corresponding output value, and calculate the prediction error according to the actual observation value, if the prediction error does not exceed the set threshold, then use the output of the mechanism observation model as the output of the robust dynamic equivalent model of the external AC power grid; otherwise, substitute the estimated state vector of the next moment into the neural network observation model, and use its output as the output of the robust dynamic equivalent model of the external AC power grid; Among them, the neural network observation model is updated offline through the improved whale optimization algorithm. In the improved self-learning square root cubature Kalman filter algorithm, the initially calculated prediction state vector is corrected by the improved whale optimization algorithm, and the square root of the measurement noise covariance matrix is corrected by the self-adjustment strategy. The improved whale optimization algorithm performs an out-of-limit check on each element in the individual, and designs different fitness functions for updating the neural network observation model and correcting the initially calculated prediction state vector.
2. A self-learning robust dynamic equivalent modeling method suitable for complex external AC power grid according to claim 1, characterized in that: The mechanism state model is established based on the third-order model of the synchronous generator, and the expression is as follows: x k =f(x k-1 ,u k-1 ) Among them, x is the state vector, k is the time series, u is the input vector, u=[i bd ,i bq ] T ,i bd and i bq They are the three-phase currents i of the boundary busbars abc After Park transformation, the dq components of the current at the boundary bus are obtained.
3. The self-learning robust dynamic equivalent modeling method applicable to a complex external AC power grid according to claim 1, characterized in that: The specific calculation process of the improved whale optimization algorithm is as follows: S11. Initialize the population: Among them, the subscript wh represents the population number, wh=1,…,N, N is the number of populations, the subscript 0 represents initialization, p wh,0 represents the initial wh-th individual, ub and lb are the upper and lower bounds of the solution respectively, f u (0,1) is used to generate uniformly distributed random numbers, μ F is a random value between 0 and 1; Perform an out-of-limit check on each element in the initial individual: The superscript d of each variable represents the dth element of the solution, d = 1,…,D, and D is the dimension of the solution; Then, the initial fitness function value is calculated according to the fitness function and sorted; S12, introduce the difference creative search strategy to update the population: When the population number wh is equal to N, and f u (0,1) is less than μ pc When , the updated individual is: Among them, μ pc is a number from 0 to 1; When the population number wh is less than or equal to η ngs When , randomly select an individual with the serial number r1, r1 is not equal to wh, and is not equal to the serial number r of the optimal solution obtained in the current iteration opt , if a random number is less than or equal to η wh,i Or d is equal to a random number, then the dth element in the individual is updated as follows: Among them, f lkd is the Linnick distribution, μ pg and μ pσ is the parameter of the distribution function, μ pg is the golden ratio; η ngs and η wh,i The definitions are: Among them, f round The rounding function rounds the value to the nearest integer or a specified number of decimal places. is the individual of the i-th iteration coefficient value; In addition to the above two cases, two individuals are randomly selected, whose serial numbers are r1 and r2 respectively. If r1 is not equal to wh, and is not equal to r2 and the serial number r of the optimal solution obtained in the current iteration opt , r2 is not equal to wh and r opt , if a random number is less than or equal to η wh,i Or d is equal to a random number, then the dth element of the individual is updated as: Among them, η IF,i is a dynamic social impact factor; Perform out-of-bounds checks on individuals updated based on the difference creative search strategy: Then, the fitness value is calculated according to the fitness function, and the optimal individual obtained in the current iteration is found. This serves as the basis for the subsequent optimization process; S13. Further update individuals by simulating the humpback whale hunting process: Update the dth element in the individual by: Among them, whr is the random individual number, C wh,i Equal to 2f u (0,1), a3, l wh,i 、w w,i and A wh,i The specific expression is as follows: Individuals are further updated through random mutation strategies; Perform out-of-bounds checks on individuals updated based on random mutation strategies: Then, the fitness value is calculated according to the fitness function, and the optimal individual P is selected. opt ,i.
4. The self-learning robust dynamic equivalent modeling method applicable to a complex external AC power grid according to claim 3, characterized in that: p wh,0 The calculation formula is as follows: p wh,0 =lb+(ub-lb)·μ wh,0 Among them, μ wh,0 Generated by piecewise linear chaotic mapping.
5. The self-learning robust dynamic equivalent modeling method applicable to a complex external AC power grid according to claim 3, characterized in that: When the improved whale optimization algorithm is used to update the neural network observation model, the fitness function is: f fit,z (I I ,x)=f rmse,z (I z (I I ,x),Z O,z ) When the improved whale optimization algorithm is used to correct the initially calculated predicted state vector, the fitness function is: Among them, χ represents the problem to be solved, and the subscript z represents the sequence number, z=1,…,n o , n o is the number of output variables, Θ is the neural network model, f rmse To find the root mean square error function, I I and Z O are input data and output data respectively, z o is the actual observed variable, h phy It is a mechanism observation model.
6. A self-learning robust dynamic equivalent modeling method suitable for complex external AC power grid according to claim 3, characterized in that: Dynamic social impact factor η IF,i The specific expression is as follows: Among them, i is the current iteration number, and its maximum value is i max .
7. A self-learning robust dynamic equivalent modeling method suitable for complex external AC power grid according to claim 3, characterized in that: The specific process of further updating individuals through random mutation strategy is as follows: Among them, f od To generate normally distributed random numbers, μ CauIa and μ CauIb is a constant, μ CauIc is a standard normal distribution random number, a7 is a constant, κ whi The expression for the dth element in is as follows: Wherein, a9 is a constant.
8. The self-learning robust dynamic equivalent modeling method applicable to a complex external AC power grid according to claim 1, characterized in that: The specific calculation process of the improved self-learning square root volumetric Kalman filter algorithm is as follows: S21, set the initial state vector x0, the initial state error covariance matrix S 0|0 , the initial process noise covariance matrix S q,0 And the initial measurement noise covariance matrix S r,0 , the number of state quantities and the number of observation quantities are n and l respectively; S22. Prediction: S221. Calculate the volume point based on the state vector estimated at the previous moment: g j,k-1|k-1 =x k-1 +ξ j [S k-1|k-1 S k-1|k-1 ] j Among them, S k-1|k-1 is the square root of the state covariance matrix at time k-1, ξ j is the jth column of ξ, j∈{1,…,2n}, and ξ is defined as: S222. Propagate each volume point and calculate the predicted state vector of the robust dynamic equivalent model: S223. Correct the initially calculated predicted state vector by improving the whale optimization algorithm: Calculate the prediction error. If the prediction error exceeds the set threshold, the optimal prediction state is calculated by improving the whale optimization algorithm and the corresponding fitness function. The square root of the measurement noise covariance matrix is corrected by the self-tuning strategy: in, is the square root of the optimal measurement noise covariance; S224. Calculate the square root of the predicted state error covariance matrix: Among them, UT cov and χ k|k-1 The specific expression is as follows: Among them, Tria represents the upper triangular matrix obtained by QR decomposition, S q,k =S q,k-1 ; S23, measurement update S231, further calculate the volume point: S232, estimate the predicted observation vector, and calculate the square root of its corresponding covariance matrix: Among them, UT cov,z and The specific expression is as follows: S233. Calculate the cross covariance matrix: in, The expressions of and are as follows: S234, calculate Kalman gain: S235, calculate the state vector estimated at the next moment and S at the next moment k|k : in, The calculation formula is as follows: S236, check for over-limit and update the estimated state vector: Among them, x lb and x up are the expected lower and upper bounds of the estimated state, respectively.
9. The self-learning robust dynamic equivalent modeling method applicable to a complex external AC power grid according to claim 1, characterized in that: The specific process of offline updating the neural network observation model by improving the whale optimization algorithm is as follows: Obtain the state vector and the input vector to form the input data in the training set; obtain the actually measured output vector to form the output data in the training set; Obtain the optimal number of hidden layer neurons according to the improved whale optimization algorithm and the corresponding fitness function; The neural network model in the neural network observation model is trained based on the constructed training set data and the optimal number of hidden layer neurons, and then the neural network observation model is updated offline.
10. A self-learning robust dynamic equivalent modeling method suitable for complex external AC power grid according to claim 9, characterized in that: If there is noise in the measured data in the input vector and the output vector, the improved fully adaptive noise ensemble empirical mode decomposition algorithm is used to denoise it before subsequent calculations.
Citation Information
Patent Citations
Hybrid dynamic equivalent modeling method suitable for power system
CN118117579A