Transient stability prevention and control method integrating predictive scheduling and acceleration

By combining the transient stability prevention and control methods of the Kolmogorov-Arnold network, Transformer and Golden Eagle optimization methods, the problem of transient stability constraint processing of the power system is solved, online prevention and control is realized, and the stability and performance of the power system are improved.

CN119891194APending Publication Date: 2025-04-25GUANGXI UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510134297.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the transient stability constraints of power systems, especially in large-scale and complex power grids. Computational efficiency and accuracy cannot meet actual needs, and traditional methods cannot achieve online control, limiting their application in complex power systems.

Method used

A transient stability prevention and control method with comprehensive prediction scheduling and acceleration is proposed, combined with the Kolmogorov-Arnold network, Transformer and Golden Eagle optimization methods, for transient stability prevention and control. This method generates a fault set through time-domain transient simulation, trains the Kolmogolov-Arnold network model, establishes a transient stability prediction model, and accelerates decision-making through the Golden Eagle optimization method to achieve online prevention and control.

Benefits of technology

This method can quickly identify potential instability factors in the power system, take quick measures to prevent system instability, ensure the safe operation of the power system, realize global optimal control strategies, and improve the overall performance and stability of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119891194A_ABST
    Figure CN119891194A_ABST
Patent Text Reader

Abstract

The invention provides a transient stability prevention and control method integrating predictive scheduling and acceleration, and the method mainly comprises the steps: constructing a transient scene of a power system, and obtaining a fault data set; training a transient prediction model by using the fault data set, and outputting a transient stability index; the power system executes an optimal prevention and control strategy according to the output transient stability index until the system is stable; according to the method, the system stability can be rapidly detected, and formulating and executing of a control strategy are accelerated; response time is shortened by optimizing control measures, so that stability, reliability, economical efficiency and emergency processing capacity of the power system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of transient control, deep learning, transient prediction, artificial intelligence, and power system optimization and dispatching, relates to a method for transient prediction and preventive control of a power system, and is suitable for transient preventive control of a power system. The main category is G06Q10. Background Art

[0002] The difficulty in studying transient preventive control lies in the handling of transient stability constraints and the efficient solution of the optimal power flow under transient stability constraints.

[0003] There are three ways to deal with transient stability constraints. The first is the time domain simulation calculation method, but the amount of calculation is large and the solution speed is slow, so its application in complex power grids is limited. The second is to linearize the complex nonlinear stability constraint formula to solve the stability situation, but the stability judgment result is conservative or aggressive, which will have a great impact on the solution result. The third is the machine learning method, which can establish a mapping relationship between input and output and is widely used in transient stability assessment to replace the solution of complex time domain equations in preventive control, but simple machine learning cannot handle high-dimensional complex data and has poor applicability. In terms of efficient solution of optimal power flow under transient stability constraints, the traditional method often cannot meet the actual needs in terms of computational efficiency and accuracy when dealing with large-scale and complex power systems. The traditional transient stability preventive control method cannot achieve online control and has low computational efficiency, which limits its application in complex power systems and makes it difficult to achieve the global optimal control strategy.

[0004] Therefore, a transient stability preventive control method with integrated predictive scheduling and acceleration is proposed, which can perform online preventive control and is applicable to more complex power grids. It has fast calculation speed, realizes the global optimal control strategy, and improves the overall performance and stability of the power system. Summary of the invention

[0005] The present invention proposes a transient stability preventive control method with integrated prediction scheduling and acceleration, which combines the Kolmogorov-Arnold network, Transformer and Golden Eagle optimization method for transient stability preventive control, and can identify potential unstable factors in the power system in advance, and quickly take measures to prevent system instability, thereby ensuring the safe operation of the power system; the steps in the use process are:

[0006] Step (1): Generate a fault set through time-domain transient simulation, train the Kolmogorov-Arnold network on the fault set, learn the mapping relationship between power system characteristics and transient stability index, and establish a transient stability prediction model based on the Kolmogorov-Arnold network;

[0007] Step (1.1): Based on the topological structure of the power grid, multiple load levels are set and the generator output is adjusted accordingly to form an operation scenario set; samples are selected from the operation scenario set using the inverse transform sampling method, and a three-phase short circuit fault is set for each sample; then, a fault set covering transient faults is constructed through time domain simulation;

[0008] Step (1.2): According to the fault set data in step (1.1), calculate the transient stability index of each sample and mark it; the transient stability index TSI is:

[0009] (1)

[0010] In the formula, is the transient interval after the fault; and They are The rotor angles of the i-th generator and the j-th generator; To find the absolute value; max is the maximum value; when TSI>0, the system is transiently stable; when TSI<0, the system is transiently unstable; the larger the value of TSI, the higher the transient stability of the system;

[0011] Step (1.3): Select a matrix composed of generator active power, generator reactive power, generator voltage amplitude, line active power and line reactive power from the steady-state data in the fault set described in step (1.1) as the input matrix of the Kolmogorov-Arnold network; the specific form of the input matrix is ​​as follows:

[0012] = (2)

[0013] In the formula, is the active power of the generator; is the reactive power of the generator; Generator voltage amplitude; is the line active power; is the reactive power of the line; n is the number of generators; m is the number of lines; is the active power of the first generator; is the reactive power of the first generator; is the voltage amplitude of the first generator; is the active power of line 1; is the reactive power of the first line; is the active power of the second generator; is the reactive power of the second generator; is the voltage amplitude of the second generator; is the active power of the second line; is the reactive power of the second line; is the active power of the nth generator; is the reactive power of the nth generator; is the voltage amplitude of the nth generator; is the active power of the nth line; is the reactive power of the nth line; is the active power of the n+1th line; is the reactive power of the n+1th line; is the active power of the mth line; is the reactive power of the mth line;

[0014] Then, the model based on the Kolmogorov-Arnold network is trained to obtain the transient stability prediction model based on the Kolmogorov-Arnold network; the Kolmogorov-Arnold network theorem shows that any continuous multivariate function can be represented by a finite superposition of n single variable functions:

[0015] (3)

[0016] In the formula, X is a multivariate variable; is a multivariate function; p is the index of the input variable; q is the index of the output dimension; are q external one-dimensional functions; So is an internal one-dimensional function of a variable; is the input dimension of variable x; is the sum function; is the first variable; is the second variable; For the variables;

[0017] Step (2): Construct a mathematical model for transient stability preventive control, taking generator output adjustment energy consumption as the objective function, and complying with power flow constraints, system stable operation constraints, and transient stability constraints;

[0018] The energy consumption objective function of generator output adjustment is:

[0019] minW=min (4)

[0020] (5)

[0021] In the formula, W is the total energy consumption of the system operation; min is the minimum value; For the Generators control energy consumption; For the The original output of the power generation unit; For the The output after the power generation is controlled; and Respectively The upward and downward energy consumption of the generator; The number of generators controlled for the required regulation;

[0022] Equality constraint: The power flow equation is:

[0023] (6)

[0024] In the formula, and Node Injection of total active and reactive power; and Node Voltage amplitude and node The voltage amplitude; For Node and The voltage phase angle difference between and Node and The conductance and susceptance between is a node set; To find the sine value; To find the cosine value;

[0025] The inequality constraints for stable operation of the system are:

[0026] (7)

[0027] In the formula, and Generator The upper and lower limits of active output; and Generator Upper and lower limits of reactive power output; and For Node Voltage limitation;

[0028] The transient stability constraint is:

[0029] (8)

[0030] (9)

[0031] In the formula, x is the state variable; y is the algebraic variable; is the differential representation of x; is the differential representation of time t; is the differential of x with respect to t; is the control variable; The differential equations that need to be satisfied for transient stability; The algebraic equations that need to be satisfied for transient stability;

[0032] Since (8) and (9) are computationally complex and time-consuming, the computational complexity of the equations is extremely high when facing multiple faults in a large power grid. Therefore, a transient stability constraint judgment method that is easy to solve and computationally efficient is designed. The transient stability prediction model based on the Kolmogorov-Arnold network in step (1) replaces the solution of the two sets of nonlinear differential algebraic equations (8) and (9). At this time, the transient stability constraint is:

[0033] (10)

[0034] In the formula, It is a transient stability prediction model based on Kolmogorov-Arnold network;

[0035] Step (3): The Golden Eagle Optimization Method makes decisions by simulating the Golden Eagle hunting process. Embedding the Transformer into the Golden Eagle Optimization Method can help the Golden Eagle Optimization Method quickly understand and process the input state, reducing the time required for iteration.

[0036] Step (3.1): Randomly generate a set of populations, that is, candidate solutions for the decision variables, each population represents the location of a golden eagle; define the population size N, the maximum number of iterations T3, and the upper bound of the search space The Nether ; Let the current number of iterations be k;

[0037] Step (3.2): Determine whether the current number of iterations k satisfies k≤T1 or T2<k≤T3, where T1 is the number of iterations before the acceleration phase; T2 is the number of iterations after the acceleration phase; if k satisfies k≤T1 or T2<k≤T3, the Golden Eagle optimization method is used for iteration, otherwise the Transformer is used for the acceleration process;

[0038] Step (3.3): If k satisfies k≤T1 or T2<k≤T3, then evaluate the fitness of each individual in the population; according to formula (4), the output of each generator is used as the objective function value, and the objective function value is directly used as the fitness value of the individual;

[0039] Step (3.4): Initialize the attack coefficient and cruise coefficient to determine the optimal solution in the current population ; The golden eagle begins to gradually approach the prey, which is the global optimal solution in the method; update the attack coefficient and cruise coefficient and find the current position of the golden eagle;

[0040] The attack vector of the i-th golden eagle during the iteration process is:

[0041] (11)

[0042] In the formula, represents a vector; is the attack vector of the i-th golden eagle; It is the best location currently reached by the Golden Eagle; The current position of the i-th golden eagle;

[0043] The cruising vector of the i-th Golden Eagle during the iteration process is:

[0044] (12)

[0045] In the formula, is the cruising vector of the i-th golden eagle; is the first element of the target point C; is the second element of the target point C; is the kth element of the target point C; is the nth element of the target point C; For attack vector The jth element of ; For attack vector The kth element of ; d is the scalar of the hyperplane normal equation in three-dimensional space; k is the number of the fixed variable; random is a random value;

[0046] The update formula of attack coefficient and cruise coefficient in the iteration process is:

[0047] (13)

[0048] In the formula, is the current number of iterations; T is the maximum number of iterations; is the attack coefficient; is the cruise coefficient; and They are The initial and final values ​​of ; and They are The initial and final values ​​of ;

[0049] The step size of the i-th golden eagle's movement during the iteration is:

[0050] (14)

[0051] (15)

[0052] In the formula, and They are attack following vector and cruise following vector within [0.1] respectively; To find the modulus of a vector; is the moving step size of the i-th golden eagle; To find the square root value; For attack vector The jth element of ; is the jth element of the target point C; The modulus of the attack vector of the i-th golden eagle; The modulus of the cruise vector of the i-th golden eagle;

[0053] During the iteration process, the updated position of the i-th golden eagle is:

[0054] (16)

[0055] In the formula, represents the position of the i-th golden eagle in the t+1-th iteration; represents the position of the i-th golden eagle in the t-th iteration; Indicates the moving step size of the i-th golden eagle in the t-th iteration;

[0056] Step (3.5): When the number of iterations reaches T1, end and output the objective function value after iteration; save the decision variables and objective function values ​​of k≤T1 iterations; otherwise return to step (3.4) and iterate again;

[0057] Step (3.6): If k does not satisfy k≤T1 or T2<k≤T3, then the Transformer acceleration process is entered; T2 and T3 are the lower and upper limits of the number of iterations set after Transformer acceleration respectively;

[0058] Step (3.7): Input the decision variables and objective function values ​​saved in step (3.5) into Transformer for training;

[0059] Step (3.8): Transformer first embeds the objective function value and performs position encoding. The word embedding maps each objective function value to a high-dimensional vector representation, and the position encoding uses a sine function to encode the position information of each objective function value into a vector. The Transformer model then adds the word embedding vector and the position encoding vector to obtain the input vector.

[0060] The position encoding vector is:

[0061] (17)

[0062] (18)

[0063] Where pos is the position of the input symbol; is the dimension index of the position encoding vector; Represents positional encoding of even dimensions; Represents positional encoding of odd dimensions; is the dimension of the word embedding vector;

[0064] Step (3.9): Transformer inputs the input vector obtained in step (3.8) into the encoder, and the input vector is calculated in parallel by multiple self-attention heads; self-attention performs three different linear transformations on the input vector to obtain the query vector , key vector Sum value vector :

[0065] (19)

[0066] In the formula, is the input vector; , and are the query vector, key vector and value vector weight matrices for training respectively;

[0067] Then calculate the dot product and The similarity between them is then stabilized by scaling the gradient;

[0068] Step (3.10): Add residual connections and layer normalization before and after each attention sub-layer and full connection to reduce the gradient vanishing problem during training and improve the model convergence speed and training effect;

[0069] Step (3.11): Then, the fully connected neural network transformation and nonlinear transformation are performed through the representation of each position of the feedforward neural network;

[0070] Step (3.12): The decoder first adds the word embedding vector and the position encoding vector, and then the input passes through a multi-head self-attention mechanism to focus on the current position and the previous position; then the encoder output and the decoder self-attention output are multi-headed through the multi-head attention mechanism to capture the relationship between the source sequence and the target sequence; then the vector of each position is transformed through a feedforward neural network; after each multi-head attention mechanism and feedforward neural network, layer normalization is performed and residual connections are added; finally, the output of the decoder is transformed through a linear transformation to output the decision variable;

[0071] Step (3.13): Transformer completes training, inputs the objective function value into the trained network, and obtains the predicted decision variable;

[0072] Step (3.14): To correct the objective function value, continue to optimize using the Golden Eagle optimization method when k satisfies T2<k≤T3; therefore, the Golden Eagle optimization method only performs T1+T3-T2 iterations, which can greatly reduce the running time of the method and achieve the purpose of accelerating the Golden Eagle optimization method using Transformer;

[0073] Step (3.15): When the number of iterations k>T3, stop the iteration and output the optimal objective function value;

[0074] Step (4): Increase or decrease the active output of the generator according to the optimal objective function value outputted in step (3.15); the power system ensures the adequacy and security of the power grid under the active output of the generator after adjustment.

[0075] Compared with the prior art, the present invention has the following advantages and effects:

[0076] (1) The traditional transient stability constraint solving method is computationally difficult and time-consuming, while the transient stability prediction model based on the Kolmogorov-Arnold network of the present invention has a fast convergence speed and a high accuracy of the evaluation results. Compared with the traditional machine learning model, the transient stability prediction model based on the Kolmogorov-Arnold network has higher accuracy.

[0077] (2) The present invention combines Transformer and Golden Eagle optimization methods, and has diversified optimization paths. Compared with common intelligent optimization methods, the solution has better convergence and a relatively fast optimization speed, which meets the requirements of online preventive control.

[0078] (3) The transient stability preventive control method with integrated prediction, dispatching and acceleration proposed in the present invention can effectively ensure the sufficient power supply capacity and operation safety of the power grid by preventing and controlling the generator output when the power system is operating normally.

[0079] (4) Compared with the power system transient stability prediction method based on Inception-v4-resnet-v2 in publication number: CN117455258A, the present invention can take measures to prevent system instability before a fault occurs, and can directly improve the safety and stability of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 It is a flow chart of the transient stability prevention control method of comprehensive prediction scheduling and acceleration of the present invention.

[0081] Figure 2 It is a Transformer flow chart of the method of the present invention.

[0082] Figure 3 It is a flow chart of the Golden Eagle optimization acceleration method of the method of the present invention. DETAILED DESCRIPTION

[0083] The present invention proposes a transient stability prevention control method with integrated prediction scheduling and acceleration, which is described in detail with reference to the accompanying drawings as follows:

[0084] Figure 1 This is a flow chart of the transient stability preventive control method of comprehensive prediction scheduling and acceleration of the present invention. Preventive control is divided into an offline stage and an online stage. Offline stage: a transient fault set is constructed through time domain simulation. Then, the transient fault set is divided into a training set and a test set, and is put into a model based on a Kolmogorov-Arnold network. Finally, a transient stability prediction model based on a Kolmogorov-Arnold network is obtained by adjusting hyperparameters and verifying the test set. Online stage: the transient instability scenario is put into the Golden Eagle optimization acceleration method, and through the flow constraint, stable operation constraint and transient stability constraint, the transient stability constraint is a transient stability prediction model based on a Kolmogorov-Arnold network. Then calculate the preventive control energy consumption, and update the attack coefficient and the cruise coefficient. Finally, determine whether the current number of iterations reaches T3. If it reaches, output the optimal objective function value, adjust the active output of the generator and calculate the minimum power generation energy consumption; if it does not meet the requirements, continue to iterate.

[0085] Figure 2 It is a flow chart of the Transformer of the method of the present invention. First, the input is word-embedded and position-encoded, and then the Transformer model adds the word-embedded vector and the position-encoded vector to obtain the input vector. The input vector passes through the encoder and decoder parts of the Transformer model. Encoder part: The input vector is input into the encoder, and the input vector is calculated in parallel by multiple self-attention heads. Then, residual connections and layer normalization are added before and after each attention sublayer and full connection, and then the transformation and nonlinear transformation of the fully connected neural network are performed through the representation of each position of the feedforward neural network. The decoder part first adds the word-embedded vector and the position-encoded vector, and then the input passes through the multi-head self-attention mechanism to pay attention to the current position and the previous position; then the output of the encoder and the self-attention output of the decoder are multi-headed through the multi-head attention mechanism. Calculate the relationship between the source sequence and the target sequence; then transform the vector of each position through the feedforward neural network; perform layer normalization after each multi-head attention mechanism and feedforward neural network, and add residual connections; finally, the output of the decoder is transformed through a linear transformation to output the decision variable. Transformer completes training, inputs the objective function value to the trained network, and obtains the predicted decision variable.

[0086] Figure 3 It is a flow chart of the Golden Eagle optimization acceleration method of the method of the present invention. First, initialize the population, then evaluate the initial Golden Eagle individual and record the fitness value and position. Then, determine whether the number of iterations k satisfies k≤T1. If so, calculate the attack vector and cruise vector according to formulas (11) and (12), and then update the Golden Eagle position according to formula (16); if k≤T1 is not satisfied, enter the Transformer acceleration process: input the decision variables and objective function values ​​after T1 iterations to the Transformer, and then train the Transformer model according to the decision variables and objective function values, and output the decision variables as the initial values ​​of the decision variables in the next iteration process. Then determine T1<k≤T2. If it is satisfied, continue the Transformer acceleration process; if not, enter the Golden Eagle optimization method iteration. Finally, when the number of iterations k>T3, stop the iteration and output the optimal objective function value.

[0087] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A transient stability prevention control method with integrated prediction scheduling and acceleration, characterized in that: Combining the Kolmogorov-Arnold network, Transformer and Golden Eagle optimization method for transient stability preventive control can identify potential unstable factors in the power system in advance and take quick measures to prevent system instability and ensure the safe operation of the power system. The steps in the use process are: Step (1): Generate a fault set through time-domain transient simulation, train the Kolmogorov-Arnold network on the fault set, learn the mapping relationship between power system characteristics and transient stability index, and establish a transient stability prediction model based on the Kolmogorov-Arnold network; Step (1.1): Based on the topological structure of the power grid, multiple load levels are set and the generator output is adjusted accordingly to form an operation scenario set; samples are selected from the operation scenario set using the inverse transform sampling method, and a three-phase short circuit fault is set for each sample; then, a fault set covering transient faults is constructed through time domain simulation; Step (1.2): Based on the fault set data in step (1.1), calculate the transient stability index of each sample and mark it; The transient stability index TSI is: (1) In the formula, is the transient interval after the fault; and They are The rotor angles of the i-th generator and the j-th generator; To find the absolute value; max is the maximum value; when TSI>0, the system is transiently stable; when TSI<0, the system is transiently unstable; the larger the value of TSI, the higher the transient stability of the system; Step (1.3): Select a matrix composed of generator active power, generator reactive power, generator voltage amplitude, line active power and line reactive power from the steady-state data in the fault set described in step (1.1) as the input matrix of the Kolmogorov-Arnold network; the specific form of the input matrix is ​​as follows: = (2) In the formula, is the active power of the generator; is the reactive power of the generator; Generator voltage amplitude; is the line active power; is the reactive power of the line; n is the number of generators; m is the number of lines; is the active power of the first generator; is the reactive power of the first generator; is the voltage amplitude of the first generator; is the active power of line 1; is the reactive power of the first line; is the active power of the second generator; is the reactive power of the second generator; is the voltage amplitude of the second generator; is the active power of the second line; is the reactive power of the second line; is the active power of the nth generator; is the reactive power of the nth generator; is the voltage amplitude of the nth generator; is the active power of the nth line; is the reactive power of the nth line; is the active power of the n+1th line; is the reactive power of the n+1th line; is the active power of the mth line; is the reactive power of the mth line; Then, the model based on the Kolmogorov-Arnold network is trained to obtain the transient stability prediction model based on the Kolmogorov-Arnold network; the Kolmogorov-Arnold network theorem shows that any continuous multivariate function can be represented by a finite superposition of n single variable functions: (3) In the formula, X is a multivariate variable; is a multivariate function; p is the index of the input variable; q is the index of the output dimension; are q external one-dimensional functions; So is an internal one-dimensional function of a variable; is the input dimension of variable x; is the sum function; is the first variable; is the second variable; For the variables; Step (2): Construct a mathematical model for transient stability preventive control, taking generator output adjustment energy consumption as the objective function, and complying with power flow constraints, system stable operation constraints, and transient stability constraints; The energy consumption objective function of generator output adjustment is: minW=min (4) (5) In the formula, W is the total energy consumption of the system operation; min is the minimum value; For the Generators control energy consumption; For the The original output of the power generation unit; For the The output after the power generation is controlled; and Respectively The upward and downward energy consumption of the generator; The number of generators controlled for the required regulation; Equality constraint: The power flow equation is: (6) In the formula, and Node Injection of total active and reactive power; and Node Voltage amplitude and node The voltage amplitude; For Node and The voltage phase angle difference between and Node and The conductance and susceptance between is a node set; sin() is used to find the sine value; cos() is used to find the cosine value; The inequality constraints for stable operation of the system are: (7) In the formula, and Generator The upper and lower limits of active output; and Generator The upper and lower limits of reactive power output; and For Node Voltage limitation; The transient stability constraint is: (8) (9) In the formula, x is the state variable; y is the algebraic variable; is the differential representation of x; is the differential representation of time t; is the differential of x with respect to t; is the control variable; The differential equations that need to be satisfied for transient stability; The algebraic equations that need to be satisfied for transient stability; Since (8) and (9) are computationally complex and time-consuming, the computational complexity of the equations is extremely high when facing multiple faults in a large power grid. Therefore, a transient stability constraint judgment method that is easy to solve and computationally efficient is designed. The transient stability prediction model based on the Kolmogorov-Arnold network in step (1) replaces the solution of the two sets of nonlinear differential algebraic equations (8) and (9). At this time, the transient stability constraint is: (10) In the formula, It is a transient stability prediction model based on Kolmogorov-Arnold network; Step (3): The Golden Eagle Optimization Method makes decisions by simulating the Golden Eagle hunting process. Embedding the Transformer into the Golden Eagle Optimization Method can help the Golden Eagle Optimization Method quickly understand and process the input state, reducing the time required for iteration. Step (3.1): Randomly generate a set of populations, that is, candidate solutions for the decision variables, each population represents the location of a golden eagle; define the population size N, the maximum number of iterations T3, and the upper bound of the search space The Nether ; Let the current number of iterations be k; Step (3.2): Determine whether the current number of iterations k satisfies k≤T1 or T2<k≤T3, where T1 is the number of iterations before the acceleration phase; T2 is the number of iterations after the acceleration phase; if k satisfies k≤T1 or T2<k≤T3, the Golden Eagle optimization method is used for iteration, otherwise the Transformer is used for the acceleration process; Step (3.3): If k satisfies k≤T1 or T2<k≤T3, then evaluate the fitness of each individual in the population; according to formula (4), the output of each generator is used as the objective function value, and the objective function value is directly used as the fitness value of the individual; Step (3.4): Initialize the attack coefficient and cruise coefficient to determine the optimal solution in the current population ; The golden eagle begins to gradually approach the prey, which is the global optimal solution in the method; update the attack coefficient and cruise coefficient and find the current position of the golden eagle; The attack vector of the i-th golden eagle during the iteration process is: (11) In the formula, represents a vector; is the attack vector of the i-th golden eagle; It is the best location currently reached by the Golden Eagle; The current position of the i-th golden eagle; The cruising vector of the i-th Golden Eagle during the iteration process is: (12) In the formula, is the cruising vector of the i-th golden eagle; is the first element of the target point C; is the second element of the target point C; is the kth element of the target point C; is the nth element of the target point C; Attack vector The jth element of ; Attack vector The kth element of ; d is the scalar of the hyperplane normal equation in three-dimensional space; k is the number of the fixed variable; random is a random value; The update formula of attack coefficient and cruise coefficient in the iteration process is: (13) In the formula, is the current iteration number; T is the maximum number of iterations; is the attack coefficient; is the cruise coefficient; and They are The initial and final values ​​of ; and They are The initial and final values ​​of ; The step size of the i-th golden eagle's movement during the iteration is: (14) (15) In the formula, and They are attack following vector and cruise following vector within [0.1] respectively; To find the modulus of a vector; is the moving step size of the i-th golden eagle; To find the square root value; Attack vector The jth element of ; is the jth element of the target point C; The modulus of the attack vector of the i-th golden eagle; The modulus of the cruise vector of the i-th golden eagle; During the iteration process, the updated position of the i-th golden eagle is: (16) In the formula, represents the position of the i-th golden eagle in the t+1-th iteration; represents the position of the i-th golden eagle in the t-th iteration; Indicates the moving step size of the i-th golden eagle in the t-th iteration; Step (3.5): When the number of iterations reaches T1, end and output the objective function value after iteration; save the decision variables and objective function values ​​of k≤T1 iterations; otherwise return to step (3.4) and iterate again; Step (3.6): If k does not satisfy k≤T1 or T2<k≤T3, then the Transformer acceleration process is entered; T2 and T3 are the lower and upper limits of the number of iterations set after Transformer acceleration respectively; Step (3.7): Input the decision variables and objective function values ​​saved in step (3.5) into Transformer for training; Step (3.8): Transformer first embeds the objective function value and performs position encoding. The word embedding maps each objective function value to a high-dimensional vector representation, and the position encoding uses a sine function to encode the position information of each objective function value into a vector. The Transformer model then adds the word embedding vector and the position encoding vector to obtain the input vector. The position encoding vector is: (17) (18) Where pos is the position of the input symbol; is the dimension index of the position encoding vector; Represents positional encoding of even dimensions; Represents positional encoding of odd dimensions; is the dimension of the word embedding vector; Step (3.9): Transformer inputs the input vector obtained in step (3.8) into the encoder, and the input vector is calculated in parallel by multiple self-attention heads; self-attention performs three different linear transformations on the input vector to obtain the query vector , key vector Sum value vector : (19) In the formula, is the input vector; , and are the query vector, key vector and value vector weight matrices for training respectively; Then, by calculating the dot product and The similarity between them is then stabilized by scaling the gradient; Step (3.10): Add residual connections and layer normalization before and after each attention sub-layer and full connection to reduce the gradient vanishing problem during training and improve the model convergence speed and training effect; Step (3.11): Then, the fully connected neural network transformation and nonlinear transformation are performed through the representation of each position of the feedforward neural network; Step (3.12): The decoder first adds the word embedding vector and the position encoding vector, and then the input passes through the multi-head self-attention mechanism to focus on the current position and the previous position; Then, the encoder output and the decoder self-attention output are multi-headed to perform attention calculations through a multi-head attention mechanism to capture the relationship between the source sequence and the target sequence; Then the vector at each position is transformed through a feedforward neural network; After each multi-head attention mechanism and feedforward neural network, layer normalization is performed and residual connections are added; finally, the output of the decoder is transformed linearly to output the decision variable; Step (3.13): Transformer completes training, inputs the objective function value into the trained network, and obtains the predicted decision variable; Step (3.14): To correct the objective function value, continue to optimize using the Golden Eagle optimization method when k satisfies T2<k≤T3; therefore, the Golden Eagle optimization method only performs T1+T3-T2 iterations, which can greatly reduce the running time of the method and achieve the purpose of accelerating the Golden Eagle optimization method using Transformer; Step (3.15): When the number of iterations k>T3, stop the iteration and output the optimal objective function value; Step (4): Increase or decrease the active output of the generator according to the optimal objective function value outputted in step (3.15); the power system ensures the adequacy and security of the power grid under the active output of the generator after adjustment.

Citation Information

Patent Citations

  • Power system transient stability prediction method based on Inception-v4-resnet-v2

    CN117455258A