A method for predicting transient frequency characteristics of power grid based on swarm intelligence fusion model
By using the GBDT-LSTM fusion model and sparrow search algorithm to optimize the hyperparameters in the transient frequency feature prediction of the power grid, the problems of insufficient prediction accuracy and poor timeliness in the existing technology are solved, and more efficient grid frequency feature prediction is achieved.
Patent Information
- Application Number
- CN202210479501.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-05-05
AI Technical Summary
The existing methods of using machine learning to predict transient frequency characteristics of power grids have problems of insufficient prediction accuracy and poor timeliness. A single model performs poorly when taking into account both timeliness and accuracy.
The GBDT-LSTM fusion model based on Stacking fusion mechanism is adopted, and the model hyperparameters are optimized through the sparrow search algorithm to achieve a prediction method that takes into account both accuracy and timeliness.
Through the fusion model and hyperparameter optimization, the accuracy and inference speed of the grid's transient frequency feature prediction are improved, and the shortcomings of a single model in terms of timeliness and accuracy are solved.
Smart Images

Figure CN115036938B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system trend prediction, and relates to a power grid security and stability analysis method based on deep learning, and specifically to a power grid transient frequency characteristic prediction method based on a swarm intelligence fusion model. Background Art
[0002] The frequency of the power system is a key indicator of power quality and system operation status. Frequency stability is determined by the balance between the system's active power generation and load. When the power system suffers from severe disturbances and generates a large power shortage, the frequency will drop sharply in a short period of time. If it deviates beyond the normal operating range, it may cause faults such as generator set decoupling and partial line load shedding. In severe cases, it may even cause the power system to experience a frequency collapse. Therefore, high-precision prediction of the transient frequency state of the power grid after the system is disturbed is of great significance to ensure the frequency stability of the receiving power grid.
[0003] Traditional methods for predicting transient characteristics of power systems mainly include the following two methods: time domain simulation method based on causal theory, average system frequency model (ASF), system frequency response model (SFR) and machine learning method based on statistical theory. Using machine learning for frequency characteristic prediction can completely deviate from the physical model level to explore the correlation between historical data input and output. In theory, if the number of samples is sufficient and the sampling is reasonable, the machine learning method can accurately fit the response characteristics of various nonlinear links, providing a new idea for power system frequency analysis. At present, most of the existing machine learning methods for transient characteristic prediction are based on a single model. However, under the premise of unified timeliness requirements, the prediction accuracy of a single model is usually insufficient. In addition, due to the wide range of adjustable structures of the machine learning model itself, its internal structure cannot be directly determined. A too large structure will lead to slow training and overfitting; a too small structure cannot achieve the required accuracy. Therefore, in view of the above problems, it is of great significance to design a prediction method that can combine multiple models for transient characteristic prediction and adjust the structure of the combined model to the optimal one. Summary of the invention
[0004] In view of the problems existing in the existing methods for predicting transient frequency characteristics using machine learning, the present invention provides a method for predicting transient frequency characteristics of power grids based on a swarm intelligence fusion model. The present invention first uses the Stacking fusion mechanism to hierarchically integrate the gradient boosting decision tree model (GBDT) and the long short-term memory model (LSTM); secondly, the model hyperparameters are optimized through the sparrow search algorithm to achieve a prediction method that takes into account both accuracy and timeliness.
[0005] The technical solution of the present invention:
[0006] A method for predicting transient frequency characteristics of a power grid based on a swarm intelligence fusion model comprises the following steps:
[0007] Step 1: Construct a training sample set for the GBDT-LSTM fusion model
[0008] Step 1.1: Collect the system frequency dynamics of all prime movers and speed regulators in the power system after being disturbed, including the minimum frequency of the controlled variable Δω m , the lowest frequency moment t z ; Control variables include capacity reference value S b 、Total system capacity S N , Mechanical power gain coefficient K m , disturbance power P d , the total inertia time constant H of the generator, the frequency adjustment coefficient R of the speed regulator, the equivalent damping coefficient D of the generator, the reheating time constant T of the prime mover R , the high pressure bar power factor F of the steam turbine H ;
[0009] Step 1.2: Process the power system operating parameters collected in step 1.1, and delete abnormal values, i.e., outliers and duplicate values;
[0010] Step 1.3: The disturbance power P in the power system operation parameters after data processing d , the total inertia time constant H of the generator, the frequency adjustment coefficient R of the speed regulator, the equivalent damping coefficient D of the generator, the reheating time constant T of the prime mover R , the high pressure bar power factor F of the steam turbine H As the input parameter of the GBDT-LSTM fusion model; the system frequency dynamic index after disturbance, the lowest frequency Δω m , the lowest frequency moment t z As the target output of GBDT-LSTM fusion model and swarm intelligence fusion model;
[0011] Construct a GBDT-LSTM fusion model training sample set:
[0012] x=[P d ,H,R,D,T R ,F H ]
[0013] y=[Δω m ,t z ]
[0014] h=[x,y]
[0015] Among them, x is the input parameter of the GBDT-LSTM fusion model, y is the target output of the GBDT-LSTM fusion model and the swarm intelligence fusion model, and h is the training sample set of the GBDT-LSTM fusion model;
[0016] Step 1.4: Normalize the training sample set of the GBDT-LSTM fusion model:
[0017]
[0018] Among them, h norm ,h min and h max They are the normalized value, minimum value and maximum value of the training sample set h data of the GBDT-LSTM fusion model.
[0019] Step 2: Train the GBDT-LSTM fusion model
[0020] Step 2.1: Take the training sample set h obtained in step 1, 67% as training sample h train , 33% as test samples h test .
[0021] Step 2.2: Initialize the GBDT model parameters to instantiate the estimator object: number of iterations, maximum depth of the base regression estimator, minimum number of samples or proportion of base regression trees when splitting, learning rate, loss function. The loss function uses the smoothed mean absolute error (Huber), and the formula is as follows:
[0022]
[0023] Among them, I represents the loss function Huber, r represents the true value, is the predicted value, and σ is the parameter corresponding to the Huber loss function.
[0024] Step 2.3: Set the training data h train Input it into the GBDT model for modeling and learning, and get a preliminarily trained GBDT model. test The test was carried out to obtain the prediction results, and the mean absolute error (MAE), mean absolute percentage error (MAPE) and mean square error (MSE) were selected to evaluate the test results.
[0025] Step 2.4: According to the idea of the Stacking algorithm, the output of the GBDT model and the input parameter x of the original training sample set are used as the input fusion feature x of the LSTM model. LSTM .
[0026] Step 2.5: Initialize LSTM parameters: learning rate, number of iterations, number of neurons in the first hidden layer, and number of neurons in the second hidden layer.
[0027] Step 2.6: Build an LSTM model, select the mean square error (MSE) as the loss function, and use the Adam optimizer to update the network parameters to speed up the model convergence.
[0028] The Adam update formula is as follows:
[0029]
[0030] Among them, w represents the network parameters, c represents the number of times, α represents the learning rate, is m c Correction, v c correction, ε is a constant added to maintain numerical stability.
[0031]
[0032]
[0033] β1 and β2 are constants used to control exponential decay; m c is the exponential moving average of the gradient; v c is the squared gradient. m c and v c The updates are as follows:
[0034] m c =β1*m c-1 +(1-β1)*g c
[0035]
[0036] where g c is the first-order derivative.
[0037] Step 2.7: The fusion feature x obtained in step 2.4 LSTM Input into the LSTM model for modeling learning and calculate the model error. When the error meets the given accuracy requirement, the training ends and the weight matrix and bias parameter matrix of the LSTM model are saved; if the error does not meet the given accuracy requirement, iterative training continues until the accuracy requirement is met or the specified number of iterations is reached.
[0038] Step 2.8: Based on the test sample, test the currently trained GBDT-LSTM fusion model and calculate the test error.
[0039] Step 3: Use the sparrow search algorithm to optimize the hyperparameters of the GBDT-LSTM fusion model
[0040] Step 3.1: Initialize the parameters of the sparrow search algorithm. Suppose the number of sparrows in the population is n, the population consisting of n sparrows is S, and the fitness value of the i-th sparrow is F Si , the average fitness of all sparrows is The fitness value of all sparrows is F S , let the mean absolute error MAE be the fitness value.
[0041] S=[s1 s2···s n-1 s n ]
[0042]
[0043] During each iteration, the position update rule of the discoverer sparrow in the population is as follows:
[0044]
[0045] Among them, S i represents the i-th sparrow; t represents the current iteration number; iter max is a constant, indicating the maximum number of iterations; η∈(0,1] is a random number; R2(R2∈[0,1]) and ST(ST∈[0.5,1]) represent the warning value and safety value respectively; Q is a random number that obeys the normal distribution; L represents a matrix in which all elements are 1.
[0046] In each iteration, the position update rule of the sparrow joining the population is as follows:
[0047]
[0048] Among them, S p is the optimal position currently occupied by the discoverer; S worst It represents the current global worst position; A represents a matrix in which each element is randomly assigned a value of 1 or -1, and A + =A T (AA T ) -1 .when This indicates that the i-th joiner with a lower fitness value does not obtain food and needs to forage elsewhere to obtain a higher fitness value.
[0049] In the iterative optimization process, if the number of sparrows aware of danger accounts for 10%-20% of the total number, the impact on all sparrows is as follows:
[0050]
[0051] Among them, Sbest is the current global optimal position; ξ is the step size control parameter, which is a random number that follows a normal distribution with a mean of 0 and a variance of 1; K∈[-1,1] is a random number; F Si is the fitness value of the current sparrow individual; F g and F w are the current best and worst fitness values respectively; π is the smallest constant to avoid zero in the denominator.
[0052] By updating the above position rules, the optimal fitness value is found in each iteration to obtain the optimal hyperparameters of the swarm intelligence fusion model.
[0053] Step 3.2: According to the optimal hyperparameters obtained by the sparrow search algorithm, the GBDT-LSTM fusion model structure is optimized to obtain the swarm intelligence fusion model. The optimized swarm intelligence fusion model is used to predict the transient characteristics of the power grid.
[0054] Beneficial effects of the present invention: The present invention constructs a power grid transient characteristic prediction method based on a swarm intelligence fusion model by designing a fusion model and using a swarm intelligence optimization algorithm - a sparrow search algorithm to optimize the model structure, effectively improving the shortcoming that a single machine learning model cannot take into account both timeliness and accuracy; at the same time, the sparrow search algorithm is used to adjust the fusion model structure, making the network structure more streamlined, and improving the operating speed and control accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flow chart of the method for predicting transient frequency characteristics of power grid based on swarm intelligence fusion model.
[0056] Figure 2 Schematic diagram of the structure of the swarm intelligence fusion model adopted.
[0057] Figures 3(a), 3(b), 3(c), and 3(d) are respectively the curves of the change of learning rate, number of iterations, number of neurons in the first hidden layer, and number of neurons in the second hidden layer during the process of using the sparrow search algorithm to optimize the hyperparameters of the fusion model within the parameter range set in the specific implementation steps 3.1 and 3.2.
[0058] Figure 4 This is the error change curve during the hyper-parameter optimization process of the fusion model using the sparrow search algorithm within the parameter range set in the specific implementation steps 3.1 and 3.2.
[0059] Figure 5(a) shows the prediction results of the sample set using a single machine learning model LSTM, with a learning rate of 0.001, 100 iterations, 64 neurons in the first hidden layer, 64 neurons in the second hidden layer, and 10 data batches.
[0060] Figure 5(b) shows the prediction effect of the sample set using the fusion model GBDT-LSTM, with a learning rate of 0.01, 100 iterations, 64 neurons in the first hidden layer, 64 neurons in the second hidden layer, and 10 data batches.
[0061] Figure 5(c) shows the prediction effect of the sample set when the fusion model SSA-GBDT-LSTM is optimized with hyperparameters using the sparrow search algorithm, with a learning rate of 0.0041, 149 iterations, 68 neurons in the first hidden layer, 11 neurons in the second hidden layer, and 10 data batches.
[0062] Figure 6 The sample sets of three models are predicted and evaluated: single model LSTM, fusion model GBDT, and swarm intelligence fusion model SSA-GBDT-LSTM. DETAILED DESCRIPTION
[0063] The examples of the present invention are further described in detail below in conjunction with the accompanying drawings and technical solutions.
[0064] like Figure 1 As shown, a method for predicting transient frequency characteristics of power grid based on group intelligent fusion model, the specific steps are as follows:
[0065] Step 1: Construct a training sample set for the GBDT-LSTM fusion model.
[0066] Step 1.1: Collect the system frequency dynamics of all prime movers and speed regulators in the power system after being disturbed, including the minimum frequency of the controlled variable Δω m , the lowest frequency moment t z , the control variables include the capacity reference value S b 、Total system capacity S N , Mechanical power gain coefficient K m , disturbance power P d , the total inertia time constant H of the generator, the frequency adjustment coefficient R of the speed regulator, the equivalent damping coefficient D of the generator, the reheating time constant T of the prime mover R , the high pressure bar power factor F of the steam turbine H To simulate different disturbance conditions, the disturbance power P d The value follows the uniform distribution of [0.5,1.5]. To describe the different operating conditions of the power system, other important parameters of the system take the classical range of parameters. The total inertia time constant H of the generator follows the uniform distribution of [3,9]. The frequency adjustment coefficient R of the speed regulator follows the uniform distribution of [0.04,0.1]. The equivalent damping coefficient D of the generator follows the uniform distribution of [0,2]. The reheating time constant T of the prime mover RThe value follows the uniform distribution [6,14], and the high-pressure bar power coefficient F of the steam turbine H The value follows a uniform distribution of [0.15,0.4].
[0067] Step 1.2: Process the power system operating parameters collected in step 1.1, and delete abnormal values, i.e., outliers and duplicate values.
[0068] Step 1.3: The disturbance power P in the power system operation parameters after data processing d , the total inertia time constant H of the generator, the frequency adjustment coefficient R of the speed regulator, the equivalent damping coefficient D of the generator, the reheating time constant T of the prime mover R , the high pressure bar power factor F of the steam turbine H As the input parameter of the GBDT-LSTM fusion model; the system frequency dynamics after disturbance, the lowest frequency Δω m , the lowest frequency moment t z As the target output of GBDT-LSTM fusion model and swarm intelligence fusion model. Construct GBDT-LSTM fusion model training sample set:
[0069] x=[P d ,H,R,D,T R ,F H ]
[0070] y=[Δω m ,t z ]
[0071] h=[x,y]
[0072] Among them, x is the input parameter of the GBDT-LSTM fusion model, y is the target output of the GBDT-LSTM fusion model and the swarm intelligence fusion model, and h is the training sample set of the GBDT-LSTM fusion model.
[0073] Step 1.4: Normalize the training sample set of the GBDT-LSTM fusion model:
[0074]
[0075] Among them, h norm ,h min and h max They are the normalized value, minimum value and maximum value of the training sample set h data of the GBDT-LSTM fusion model.
[0076] Step 2: Train the GBDT-LSTM fusion model.
[0077] Step 2.1: Take the training sample set h obtained in step 1, 67% as training sample h train , 33% as test samples h test .
[0078] Step 2.2: Initialize GBDT model parameters.
[0079] The number of iterations is 285, the maximum depth of the base regression estimator is 4, the minimum number of samples or proportion of the base regression tree at splitting is 2, the learning rate is 0.71, and the loss function and the corresponding σ when the loss function is selected as 'huber' are 0.9.
[0080] Step 2.3: Set the training data h train Input it into the GBDT model for modeling and learning, and get a preliminarily trained GBDT model. test The test was carried out to obtain the prediction results. The mean absolute error (MAE), mean absolute percentage error (MAPE) and mean square error (MSE) were selected to evaluate the test results. The test results showed that MSE was 0.00029, MAE was 0.0127, and MAPE was 0.05652.
[0081] Step 2.4: According to the idea of the Stacking algorithm, the output of the GBDT model and the input parameter x of the original training sample set are used as the input fusion feature x of the LSTM model. LSTM .
[0082] Step 2.5: Initialize LSTM parameters.
[0083] The learning rate is 0.01, the number of iterations is 150, the number of neurons in the first hidden layer is 64, the number of neurons in the second hidden layer is 64, and the data size in each batch is 10.
[0084] Step 2.6: Build an LSTM model, select the mean square error (MSE) as the loss function, and use the Adam optimizer to update the network parameters to speed up the model convergence.
[0085] Step 2.7: Fusion feature x LSTM Input into the LSTM model for modeling learning and calculate the model error. When the error meets the given accuracy requirement, the training ends and the weight matrix and bias parameter matrix of the LSTM model are saved; if the error does not meet the given accuracy requirement, iterative training continues until the accuracy requirement is met or the specified number of iterations is reached.
[0086] Step 2.8: Based on the test sample, test the currently trained GBDT-LSTM fusion model and calculate the test error. The mean absolute error MAE and mean absolute error percentage MAPE are selected to evaluate the test results. The test error MSE is 1.443306e-05, MAE is 0.0023, and MAPE is 0.00088.
[0087] Step 3: Use the sparrow search algorithm to optimize the hyperparameters of the GBDT-LSTM fusion model.
[0088] Step 3.1: Initialize the parameters of the sparrow search algorithm, set the population size to n = 100, the maximum number of iterations to 8, the safety threshold ST = 0.8, the discoverers account for 20% of the population size, and the number of sparrows aware of the danger SD = 5.
[0089] Step 3.2: Set the optimization parameter range of the sparrow search algorithm, the learning rate of the GBDT-LSTM fusion model is [0.001, 0.02], the number of iterations is [100, 200], the number of neurons in the first hidden layer is [1, 100], and the number of neurons in the second hidden layer is [1, 100].
[0090] Figures 3(a), 3(b), 3(c), and 3(d) are the curves showing the changes in the learning rate, number of iterations, number of neurons in the first hidden layer, and number of neurons in the second hidden layer during the process of optimizing the hyperparameters of the fusion model using the sparrow search algorithm within the parameter range set above. The optimal parameters of the swarm intelligence fusion model are obtained, with a learning rate of 0.0041, a number of iterations of 149, a number of neurons in the first hidden layer of 68, and a number of neurons in the second hidden layer of 11.
[0091] Compared with the original fusion model, the swarm intelligence fusion model after using the sparrow search algorithm for hyper-parameter optimization has fewer iterations and the number of hidden layer neurons, a more streamlined structure, faster model prediction and reasoning speed, and less time required for prediction.
[0092] Figure 4 This is the error change curve in the process of optimizing the hyperparameters of the fusion model using the sparrow search algorithm within the parameter range set above.
[0093] Figure 5(a) shows the prediction results of the sample set using a single machine learning model LSTM, with a learning rate of 0.001, 100 iterations, 64 neurons in the first hidden layer, 64 neurons in the second hidden layer, and 10 data batches.
[0094] Figure 5(b) shows the prediction effect of the sample set using the fusion model GBDT-LSTM, with a learning rate of 0.01, 100 iterations, 64 neurons in the first hidden layer, 64 neurons in the second hidden layer, and 10 data batches.
[0095] Figure 5(c) shows the prediction effect of the sample set when the swarm intelligent fusion model SSA-GBDT-LSTM is optimized with the sparrow search algorithm for hyperparameters, with a learning rate of 0.0041, 149 iterations, 68 neurons in the first hidden layer, 11 neurons in the second hidden layer, and 10 data batches.
[0096] Figure 6 The prediction evaluation results of the sample sets of three models are single model LSTM, fusion model GBDT, and swarm intelligence fusion model SSA-GBDT-LSTM. The test error MSE of the swarm intelligence fusion model is 5.296956e-06, MAE is 0.0016, and MAPE is 0.00066.
[0097] The results show that the prediction accuracy of the fusion model GBDT-LSTM is 0.04% higher than that of the single model LSTM, and the prediction accuracy of the swarm intelligence fusion model SSA-GBDT-LSTM is 0.07% higher than that of the fusion model GBDT-LSTM.
[0098] In summary, in the prediction of transient characteristics of power grid frequency, the present invention uses the fusion model GBDT-LSTM based on GBDT and LSTM, and uses the sparrow search algorithm to perform a feature prediction method for hyper-parameter optimization of the fusion model, thereby realizing a prediction method that takes into account both accuracy and timeliness, making the model structure more streamlined, and improving the prediction accuracy and prediction reasoning speed.
Claims
1. A method for predicting transient frequency characteristics of power grid based on group intelligence fusion model, characterized in that: The method comprises the following steps: Step 1: Construct a training sample set for the GBDT-LSTM fusion model Step 1.1: Collect the system frequency dynamics of all prime movers and speed regulators in the power system after being disturbed, including the minimum frequency of the controlled variable Δω m , the lowest frequency moment t z ; Control variables include capacity reference value S b 、Total system capacity S N , Mechanical power gain coefficient K m , disturbance power P d , the total inertia time constant H of the generator, the frequency adjustment coefficient R of the speed regulator, the equivalent damping coefficient D of the generator, the reheating time constant T of the prime mover R , the high pressure bar power factor F of the steam turbine H ; Step 1.2: Process the power system operating parameters collected in step 1.1, and delete abnormal values, i.e., outliers and duplicate values; Step 1.3: The disturbance power P in the power system operation parameters after data processing d , the total inertia time constant H of the generator, the frequency adjustment coefficient R of the speed regulator, the equivalent damping coefficient D of the generator, the reheating time constant T of the prime mover R , the high pressure bar power factor F of the steam turbine H As the input parameter of the GBDT-LSTM fusion model; the system frequency dynamic index after disturbance, the lowest frequency Δω m , the lowest frequency moment t z As the target output of GBDT-LSTM fusion model and swarm intelligence fusion model; Construct a GBDT-LSTM fusion model training sample set: x=[P d ,H,R,D,T R ,F H ] y=[Give m ,t z ] h=[x,y] Among them, x is the input parameter of the GBDT-LSTM fusion model, y is the target output of the GBDT-LSTM fusion model and the swarm intelligence fusion model, and h is the training sample set of the GBDT-LSTM fusion model; Step 1.4: Normalize the training sample set of the GBDT-LSTM fusion model: Among them, h norm ,h min and h max They are the normalized value, minimum value, and maximum value of the training sample set h data of the GBDT-LSTM fusion model; Step 2: Train the GBDT-LSTM fusion model Step 2.1: Take the training sample set h obtained in step 1, 67% as training sample h train , 33% as test samples h test ; Step 2.2: Initialize the GBDT model parameters to instantiate the estimator object: number of iterations, maximum depth of the base regression estimator, minimum number of samples or proportion of base regression trees when splitting, learning rate, loss function; Step 2.3: Set the training data h train Input it into the GBDT model for modeling and learning, and obtain a preliminarily trained GBDT model; use the test data h test Carry out the test and get the prediction results. Select the mean absolute error MAE, mean absolute error percentage MAPE and mean square error MSE to evaluate the test results. Step 2.4: According to the idea of the Stacking algorithm, the output of the GBDT model and the input parameter x of the original training sample set are used as the input fusion feature x of the LSTM model. LSTM ; Step 2.5: Initialize LSTM parameters: learning rate, number of iterations, number of neurons in the first hidden layer, and number of neurons in the second hidden layer; Step 2.6: Build the LSTM model, select the mean square error MSE as the loss function, and use the Adam optimizer to update the network parameters to speed up the model convergence; Step 2.7: The fusion feature x obtained in step 2.4 LSTM Input into the LSTM model for modeling learning and calculate the model error; when the error meets the given accuracy requirement, end the training and save the weight matrix and bias parameter matrix of the LSTM model; if the error does not meet the given accuracy requirement, continue iterative training until the accuracy requirement is met or the specified number of iterations is reached; Step 2.8: Based on the test sample, test the currently trained GBDT-LSTM fusion model and calculate the test error; Step 3: Use the sparrow search algorithm to optimize the hyperparameters of the GBDT-LSTM fusion model Step 3.1: Find the optimal fitness value in each iteration through the update position rule of the sparrow search algorithm to obtain the optimal hyperparameters of the swarm intelligence fusion model; Step 3.2: According to the optimal hyperparameters obtained by the sparrow search algorithm, optimize the GBDT-LSTM fusion model structure to obtain the swarm intelligence fusion model; use the optimized swarm intelligence fusion model to predict the transient characteristics of the power grid.
2. The prediction method according to claim 1, characterized in that: The step 3.1 is as follows: Initialize the parameters of the sparrow search algorithm. Suppose the number of sparrows in the population is n, the population consisting of n sparrows is S, and the fitness value of the i-th sparrow is F Si , the average fitness of all sparrows is The fitness value of all sparrows is F S , let the mean absolute error MAE be the fitness value; S=[s1 s2···s n-1 s n ] During each iteration, the position update rule of the discoverer sparrow in the population is as follows: Among them, S i represents the i-th sparrow; t represents the current iteration number; iter max is a constant, indicating the maximum number of iterations; η∈(0,1] is a random number; R2 and ST represent the warning value and safety value respectively; Q is a random number that obeys the normal distribution; L represents a matrix, in which all elements in the matrix are 1; In each iteration, the position update rule of the sparrow joining the population is as follows: Among them, S p is the optimal position currently occupied by the discoverer; S worst It represents the current global worst position; A represents a matrix in which each element is randomly assigned a value of 1 or -1, and A + =A T (AA T ) -1 ;when When , this indicates that the i-th joiner with a lower fitness value does not obtain food and needs to forage for food elsewhere to obtain a higher fitness value; In the iterative optimization process, if the number of sparrows aware of danger accounts for 10%-20% of the total number, the impact on all sparrows is as follows: Among them, S best is the current global optimal position; ξ is the step size control parameter, which is a random number that follows a normal distribution with a mean of 0 and a variance of 1; K∈[-1,1] is a random number; F Si is the fitness value of the current sparrow individual; F g and F w are the current best and worst fitness values respectively; π is the smallest constant to avoid zero in the denominator; By updating the position rules above, the optimal fitness value is found in each iteration to obtain the optimal hyperparameters of the swarm intelligence fusion model.
3. The prediction method according to claim 1 or 2, characterized in that: In step 2.2, the loss function uses the smoothed mean absolute error Huber, and the formula is as follows: Among them, I represents the loss function Huber, r represents the true value, is the predicted value, and σ is the parameter corresponding to the Huber loss function.
4. The prediction method according to claim 1 or 2, characterized in that: In step 2.6, the Adam update formula is as follows: Among them, w represents the network parameters, c represents the number of times, α represents the learning rate, is m c Correction, v c correction, ε is a constant added to maintain numerical stability; β1 and β2 are constants used to control exponential decay; m c is the exponential moving average of the gradient; v c is the squared gradient; m c and v c The updates are as follows: m c =β1*m c-1 +(1-β1)*g c where g c is the first-order derivative.
Citation Information
Patent Citations
Regional comprehensive energy system multi-energy load prediction method considering time sequence dynamic characteristics and coupling characteristics
CN111191856A
Short-term photovoltaic power prediction method based on VMD-IPSO-GRU
CN112348271A