CN114186709A - Energy prediction method for optimizing key parameters of gray model based on emperor butterfly algorithm - Google Patents

Energy prediction method for optimizing key parameters of gray model based on emperor butterfly algorithm Download PDF

Info

Publication number
CN114186709A
CN114186709A CN202111219352.2A CN202111219352A CN114186709A CN 114186709 A CN114186709 A CN 114186709A CN 202111219352 A CN202111219352 A CN 202111219352A CN 114186709 A CN114186709 A CN 114186709A
Authority
CN
China
Prior art keywords
butterfly
gray
imperial
model
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111219352.2A
Other languages
Chinese (zh)
Inventor
苏琪
王海波
施晓辰
迟福建
李桂鑫
王哲
孙阔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
State Grid Tianjin Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Tianjin Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Tianjin Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202111219352.2A priority Critical patent/CN114186709A/en
Publication of CN114186709A publication Critical patent/CN114186709A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Marketing (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Medical Informatics (AREA)
  • Game Theory and Decision Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biophysics (AREA)
  • Geometry (AREA)
  • Biomedical Technology (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to an energy prediction method for optimizing key parameters of a gray model based on an imperial butterfly algorithm, which is technically characterized by comprising the following steps of: establishing a grey GM (1, 1) prediction model aiming at the initial energy demand data; aiming at a development coefficient a and a gray action quantity u of a gray GM (1, 1) model, establishing an objective function related to an average relative error between an initial energy demand value and a simulation value output by a gray prediction model; solving an optimal solution for the target function through a monarch butterfly algorithm, and determining a development coefficient a and a gray action amount u of a gray GM (1, 1) model; and (4) the development coefficient a and the ash action amount u are substituted back to a grey GM (1, 1) model to predict the energy demand. The method is reasonable in design, the emperor butterfly algorithm is applied to the grey GM (1, 1) prediction model, the applicability of the single grey GM (1, 1) prediction model to irregular fluctuation data caused by uncontrollable accidental factors is improved, the prediction accuracy of the grey algorithm is also improved, the method is relatively simple, and the prediction effect is better.

Description

Energy prediction method for optimizing key parameters of gray model based on emperor butterfly algorithm
Technical Field
The invention belongs to the technical field of energy prediction, and particularly relates to an energy prediction method for optimizing key parameters of a gray model based on an imperial butterfly algorithm.
Background
In order to accelerate the implementation of the carbon emission peak-reaching action, a scheme for implementing the carbon emission peak-reaching action should be established as early as possible, the important industries such as steel and the like are promoted to firstly reach the peak and coal consumption is promoted to reach the peak as early as possible, an energy consumption double-control system is perfected, pollution reduction and carbon reduction are promoted in a coordinated manner, the double control of industrial pollution emission is implemented, and the green transformation of the industry is promoted.
The grey theory was first proposed by Duncolylon in 1989 and has been established for over 20 years to date. This theory does not rely on statistical methods to account for the amount of gray color, but it indirectly uses the raw data to identify its inherent regularity. Cumulative generation operations (AGO) are the main idea of grey theory, originating from the cumulative distribution in the primary statistics. The purpose of AGO is to reduce the randomness of the raw data to a monotonically increasing sequence. Since the prediction accuracy of the gray theory is higher than that of other prediction techniques, the gray theory has been widely used for prediction research. For time series that can be approximated by exponential function curves, the use of GM (1, 1) can improve the prediction accuracy to some extent, since the conventional gray model is constructed by exponential functions. However, the time sequence of the actual system has a wave-like change, and the conventional gray model has low prediction accuracy when processing such data. Therefore, many models have been proposed to improve this accuracy, such as taguchigrey, gray-fuzzy, triangle-gray, and others, and these hybrid models, although capable of improving the prediction accuracy of the gray GM (1, 1) model to some extent, are difficult to engineer due to the inclusion of complex mathematical calculations.
Influenced by the migration behavior of Monarch butterflies in the United states, Wang et al propose Monarch Butterfly Optimization (MBO) which has 2 operators: the migration operator with local search capability and the adjustment operator with global search capability, in the MBO, the migration operator and the adjustment operator can simultaneously determine the search direction of the Queen butterfly, so the MBO is suitable for parallel processing and can balance between reinforcement and diversification. And the MBO calculation process is simple, the required calculation parameters are less, and the program implementation is easy. Therefore, how to apply the imperial butterfly optimization algorithm to energy consumption prediction and realize the energy consumption double-control function is a problem which needs to be solved urgently at present.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides the gray energy prediction method based on the imperial butterfly algorithm, which is reasonable in design, accurate, reliable and easy for engineering realization.
The invention solves the technical problems in the prior art by adopting the following technical scheme:
an energy prediction method for optimizing key parameters of a gray model based on an imperial butterfly algorithm comprises the following steps:
step 1, establishing a GM (1, 1) prediction model aiming at initial energy demand data;
step 2, aiming at the development coefficient a and the gray action amount u of the GM (1, 1) model, establishing a target function related to the average relative error between the initial energy demand value and the analog value output by the gray prediction model;
step 3, solving the objective function through an imperial butterfly algorithm, and determining a development coefficient a and a gray action amount u of a GM (1, 1) model;
and 4, replacing the development coefficient a and the ash action amount u back to the GM (1, 1) model to predict the energy demand.
Moreover, the specific implementation method of the step 1 comprises the following steps:
step 1.1, array X of original energy demand(0)=[x(0)(1),x(0)(2),...,x(0)(n)](X(0)(k) More than or equal to 0, k is 1, 2, the(1)=[x(1)(1),x(1)(2),...,x(1)(n)](k ═ 1, 2,. n), where
Figure BDA0003311990020000021
X(0)(k) The energy demand value for the k year;
step 1.2, according to the generation sequence X(1)The following GM (1, 1) prediction model was established:
Figure BDA0003311990020000022
Figure BDA0003311990020000023
in the formula, X(0)(k-1) is the energy demand value of the k-1 year, X(0)(k) For the energy demand value of the k year, Z(1)(k) Is composed of
Figure BDA0003311990020000024
The whitened background value at time k is the generation sequence X(1)Is determined.
Moreover, the objective function established in step 2 is:
Figure BDA0003311990020000025
in the formula (I), the compound is shown in the specification,
Figure BDA0003311990020000026
analog value, x, output for GM (1, 1) model(0)(k) Is the original energy demand value of the k year.
Moreover, the specific implementation method of step 3 includes the following steps:
step 3.1, initializing the position state of the butterfly to be vector X ═ X1,x2) Vector x1,x2Respectively corresponding to a development coefficient a and a gray action amount u of a GM (1, 1) model, combining information of two parameters of the development coefficient a and the gray action amount u in the position of each butterfly, setting an initial parameter of an algorithm, namely an imperial butterfly population number N, a maximum iteration number MaxGen, an imperial butterfly population group number of the algorithm into Land1 and Land2, setting population numbers of a population into a position 1, a position 2, a butterfly mobility p, a migration period per, an adjustment rate BAR, a weight factor alpha, a butterfly step length dx and a maximum step length Maxstep, randomly generating N imperial butterfly individuals, wherein each individual is a potential solution meeting an objective function;
3.2, calculating and sequencing fitness values of the population at an initial stage of iteration according to the target function, wherein the smaller the average relative error is, the higher the individual fitness is, selecting the butterfly individuals with high fitness values, and marking the butterfly individuals as elite retention individuals;
step 3.3, dividing the population into Land1 and Land2, executing a migration operator to update butterflies of Land1, executing an adjustment operator to update butterflies of Land2, combining the updated population, recalculating the fitness value, and taking out the keep butterflies with poor fitness to be marked;
3.4, directly replacing butterflies with poor fitness by using the elite butterflies, wherein the replaced population is used as the initial population of the next iteration;
and 3.5, marking the individuals with the optimal fitness value of the iteration, performing loop iteration, stopping the loop when the maximum iteration times MaxGen is reached, and selecting the individuals with the highest fitness from the optimal individuals of each generation as the final optimization result.
In step 3.3, the method for updating the butterfly of Land1 and the method for updating the butterfly of Land2 are as follows:
for the imperial butterfly individual in Landl, the migration operator is expressed as
Figure BDA0003311990020000031
At current time tIterating one butterfly in the next round 1, and according to the generated random number r ═ rand × peri, the new butterfly
Figure BDA0003311990020000032
Each dimension of (A) is selected from the group consisting of Land1 and Land2, and when the random number r is less than or equal to the mobility p, the new butterfly
Figure BDA0003311990020000033
Is replaced by the kth dimension of randomly selecting a butterfly in the Land1, and when the random number r is more than the mobility p, the new butterfly
Figure BDA0003311990020000034
The k dimension of (1) is replaced by the k dimension of randomly selecting a butterfly from the Land 2;
and (4) executing an adjusting operator for the imperial butterfly individuals in the Land 2. When the random number rand is less than or equal to the mobility p, the expression is
Figure BDA0003311990020000035
Represents the k-dimension of the best individual of Land1 and Land 2; when the random number rand is larger than the mobility p, the butterfly individual is as follows
Figure BDA0003311990020000036
Updating the current position, butterfly
Figure BDA0003311990020000037
Randomly selected from the Land2,
Figure BDA0003311990020000038
indicating the adjusted butterfly position, under the condition, if the random number satisfies rand > adjustment rate BAR, the position of the individual is further updated to
Figure BDA0003311990020000039
The value of the adjustment rate BAR is set in the imperial butterfly algorithm to be equal to the mobility p, and the weight factor
Figure BDA00033119900200000310
Is the ratio of the maximum step length Maxstep of the butterfly to the square of the current iteration times t, the step length
Figure BDA00033119900200000311
Calculated by the levy flight.
Moreover, the specific implementation method of the step 4 includes the following steps:
step 4.1, obtaining a corresponding time response function of the gray prediction model according to the development coefficient a and the gray action amount u value of the gray model optimized by the emperor butterfly algorithm, wherein the time response function is as follows:
Figure BDA00033119900200000312
in the formula (I), the compound is shown in the specification,
Figure BDA00033119900200000313
is a differential equation
Figure BDA00033119900200000314
A time response sequence of (a);
step 4.2, the
Figure BDA00033119900200000315
And (3) the sequence is reduced by the following formula to obtain a simulation sequence output by the gray prediction model:
Figure BDA00033119900200000316
in the formula (I), the compound is shown in the specification,
Figure BDA00033119900200000317
the simulation sequence is a simulation sequence obtained by optimizing the key parameters of the grey prediction model through the imperial butterfly algorithm.
The invention has the advantages and positive effects that:
the invention introduces a novel group intelligent algorithm monarch butterfly Optimization algorithm (MBO) which is excellent in practical Optimization problem into the Optimization process of a key parameter development coefficient a and a gray effect quantity u of a gray prediction model, adopts a brand-new gray-monarch butterfly Optimization prediction model, takes an average relative error function as a target function of the MBO algorithm, and solves the optimal solution of the target function through the monarch butterfly algorithm to ensure the accuracy of the energy source prediction result. The method applies the imperial butterfly algorithm to the grey GM (1, 1) prediction model, improves the applicability of the single grey GM (1, 1) prediction model to irregular fluctuation data caused by uncontrollable accidental factors, and also improves the prediction precision of the grey algorithm.
Drawings
FIG. 1 is a block diagram of a gray energy prediction method according to the present invention;
FIG. 2 is a graph of prediction of consumption of an industrial energy terminal predicted by different prediction methods;
FIG. 3 is a graph of the convergence of the average relative error for the optimization of GM (1, 1) model parameters using the imperial butterfly algorithm.
Detailed Description
The embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The design idea of the invention is as follows: the method has the advantages that the DEWANG butterfly algorithm MBO and the GM (1, 1) model are adopted to fuse and optimize two parameters of the development coefficient a and the gray acting quantity u of the model, the average relative error function is adopted as the target function of the DEWANG butterfly algorithm MBO, the DEWANG butterfly algorithm is applied to the gray GM (1, 1) prediction model, the applicability of the single gray GM (1, 1) prediction model to irregular fluctuation data caused by uncontrollable accidental factors is improved, the prediction precision of the gray algorithm is also improved, the iteration method is simple, the convergence speed is high, and engineering implementation is easy. In the imperial butterfly algorithm, each imperial butterfly is a feasible solution in a solution space, and the search directions of butterflies in a population are balanced through a parallel migration operator and an adjustment operator. The fitness of the individual is associated with an objective function, and the butterfly elite individual with the fitness of a high value in each generation directly enters the next generation so as to avoid the quality of the butterfly population from being reduced along with the increase of the iteration times. And through the iterative loop, the butterfly individual with the optimal fitness is finally selected, so that the optimization aim is fulfilled.
Based on the design idea, the invention provides an energy prediction method for optimizing key parameters of a gray model based on an emperor butterfly algorithm, which comprises the following steps as shown in figure 1:
step 1, establishing a GM (1, 1) prediction model aiming at initial energy demand data. The specific implementation method of the step comprises the following steps:
step 1.1, array X of original energy demand(0)=[x(0)(1),x(0)(2),...,x(0)(n)](X(0)(k) More than or equal to 0, k is 1, 2, the(1)=[x(1)(1),x(1)(2),...,x(1)(n)](k ═ 1, 2,. n), where
Figure BDA0003311990020000041
In the formula, X(0)(k) The energy demand value of the k year.
Step 1.2 Generation of sequence X(1)Generally, approximately obeys the exponential law, so as to establish a first order differential whitening equation, namely a GM (1, 1) prediction model:
Figure BDA0003311990020000042
Figure BDA0003311990020000043
in the formula, X(0)(k-1) is the energy demand value of the k-1 year, X(0)(k) For the energy demand value of the k year, Z(1)(k) Is composed of
Figure BDA0003311990020000044
The whitened background value at time k is the generation sequence X(1)A is a development coefficient and u is a gray contribution amount.
And2, establishing an objective function according to two parameters of the development coefficient a and the gray action amount u of the GM (1, 1) model.
In this step, for two parameters a and u, an average relative error function is constructed according to the original sequence and the simulated sequence, and the following objective function is established:
Figure BDA0003311990020000051
in the formula (I), the compound is shown in the specification,
Figure BDA0003311990020000052
analog value, x, output for GM (1, 1) model(0)(k) Is the original energy demand value of the k year.
And 3, solving the objective function through an imperial butterfly algorithm, and determining two parameters a and u of the GM (1, 1) model. The specific implementation method of the step comprises the following steps:
step 3.1, initializing the position state of the butterfly to be vector X ═ X1,x2) Vector x1,x2Respectively corresponding to a development coefficient a and a gray action amount u of a GM (1, 1) model, combining information of two parameters of the development coefficient a and the gray action amount u in the position of each butterfly, setting an initial parameter of an algorithm, namely an imperial butterfly population number N, a maximum iteration number MaxGen, an imperial butterfly population group number of the algorithm into Land1 and Land2, setting population numbers of a population into a position 1, a position 2, a butterfly mobility p, a migration period per, an adjustment rate BAR, a weight factor alpha, a butterfly step length dx and a maximum step length Maxstep, randomly generating N imperial butterfly individuals, wherein each individual is a potential solution meeting an objective function;
3.2, calculating and sequencing fitness values of the population at an initial stage of iteration according to the target function, wherein the smaller the average relative error is, the higher the individual fitness is, selecting the butterfly individuals with high fitness values, and marking the butterfly individuals as elite retention individuals;
step 3.3, dividing the population into Land1 and Land2, executing a migration operator to update butterflies of Land1, executing an adjustment operator to update butterflies of Land2, combining the updated population, recalculating the fitness value, and taking out the keep butterflies with poor fitness to be marked;
the specific implementation of the two major operators is as follows:
for the imperial butterfly individual in Land1, the migration operator is expressed as
Figure BDA0003311990020000053
Represents one butterfly in the Land1 at the current t-th iteration, and the next generation butterfly is based on the generated random number r ═ rand × peri
Figure BDA0003311990020000054
Each dimension of (a) is selected from the group consisting of Land1 and Land2, and when the random number r is less than or equal to the mobility p,
Figure BDA0003311990020000055
the k-th dimension of (a) is replaced by the k-th dimension of randomly selecting a butterfly in the Land1, when the random number r is more than the mobility p,
Figure BDA0003311990020000056
the k dimension of (1) is replaced by the k dimension of randomly selecting a butterfly from the Land 2;
and (4) executing an adjusting operator for the imperial butterfly individuals in the Land 2. When the random number rand is less than or equal to the mobility p, the expression is
Figure BDA0003311990020000057
Represents the k-dimension of the best individual of Land1 and Land 2; when the random number rand is larger than the mobility p, the butterfly individual is as follows
Figure BDA0003311990020000058
Updating the current position, butterfly
Figure BDA0003311990020000059
Randomly selected from the Land2,
Figure BDA00033119900200000510
indicating the adjusted butterfly position, under the condition that the random number satisfies rand > modulationThe whole rate BAR, then the position of the individual is further updated to
Figure BDA00033119900200000511
The value of the adjustment rate BAR is set in the imperial butterfly algorithm to be equal to the mobility p, and the weight factor
Figure BDA00033119900200000512
Is the ratio of the maximum step length Maxstep of the butterfly to the square of the current iteration times t, the step length
Figure BDA0003311990020000061
Calculated by the levy flight.
3.4, directly replacing butterflies with poor fitness by using the elite butterflies, wherein the replaced population is used as the initial population of the next iteration;
and 3.5, marking the individuals with the optimal fitness value of the iteration, performing loop iteration, stopping the loop when the maximum iteration times MaxGen is reached, and selecting the individuals with the highest fitness value from the optimal individuals of each generation as the final optimization result.
And 4, replacing two parameters of the development coefficient a and the ash action amount u back to a GM (1, 1) model to predict the energy demand. The specific implementation method of the step comprises the following steps:
step 4.1, obtaining a time response function of a corresponding prediction model according to the development coefficient a and the gray action amount u value of the gray model optimized by the imperial butterfly algorithm, wherein the time response function is as follows:
Figure BDA0003311990020000062
in the formula (I), the compound is shown in the specification,
Figure BDA0003311990020000063
is a differential equation
Figure BDA0003311990020000064
Time response sequence of (2).
And 4.2, carrying out subtraction reduction on the calculated value according to the following formula to obtain a simulation sequence output by the gray prediction model:
Figure BDA0003311990020000065
in the formula (I), the compound is shown in the specification,
Figure BDA0003311990020000066
the simulation sequence is a simulation sequence obtained by optimizing the key parameters of the grey prediction model through the imperial butterfly algorithm.
The prediction results of the present invention are verified as a specific example.
In the example, the consumption of the industrial energy terminal in Tianjin City from 2000 to 2010 is selected as the original sequence of the model, and the overall trend of the original sequence is very close to the prediction result of the GM (1, 1) model due to the good smoothness of the original sequence, so that the prediction effect is good. On the basis, the gray-monarda butterfly optimization algorithm provided by the invention is used for predicting the data sequence, and the result is shown in table 1:
table 1 prediction of industrial energy terminal consumption between 2000 and 2010 in Tianjin city under different prediction models
Figure BDA0003311990020000067
Table 1 describes comparison between a predicted value and an actual value of consumption of the industrial energy terminal in 2000-2010 of Tianjin city between a prediction model and the algorithm provided by the present invention, and both algorithms can accurately predict consumption of the industrial energy terminal, which illustrates correctness of the algorithm provided by the present invention.
Fig. 2 is a graph of data in table 1, and the fitting degree of the two algorithms to the true value can be clearly seen from the graph, which illustrates that the algorithms and algorithms provided by the invention can better predict the consumption of industrial energy terminals in Tianjin.
FIG. 3 shows the average relative error convergence diagram of the emperor butterfly algorithm for GM (1, 1) model parameter optimization, and it can be seen from FIG. 3 that the average relative error can be converged below 0.101 after 3 iterations and reduced to 0.1 after 6 iterations, which shows that the gray-emperor butterfly algorithm provided by the invention has the advantages of simple iteration method, high convergence speed and easy engineering realization.
The comparison results of the average absolute error MAE, the average relative error MAPE and the root mean square relative error MSRE of the GM (1, 1) model and the GM (1, 1) optimization model based on the imperial butterfly algorithm provided by the present invention are shown in table 2:
TABLE 2 comparison of the errors of two models MAE, MAPE and MSRE
Figure BDA0003311990020000071
The data result shows that the GM (1, 1) prediction model optimized by the King butterfly algorithm has higher precision and better prediction effect than the GM (1, 1) model, and the correctness and the effectiveness of the method provided by the invention can be verified.
It should be emphasized that the embodiments described herein are illustrative rather than restrictive, and thus the present invention is not limited to the embodiments described in the detailed description, but also includes other embodiments that can be derived from the technical solutions of the present invention by those skilled in the art.

Claims (6)

1. An energy prediction method for optimizing key parameters of a gray model based on an imperial butterfly algorithm is characterized by comprising the following steps: the method comprises the following steps:
step 1, establishing a GM (1, 1) prediction model aiming at initial energy demand data;
step 2, aiming at a development coefficient a and a gray action amount u of a GM (1, 1) model, establishing an average relative error objective function;
step 3, solving the objective function through an imperial butterfly algorithm, and determining a development coefficient a and a gray action amount u of a GM (1, 1) model;
and 4, replacing the development coefficient a and the ash action amount u back to the GM (1, 1) model to predict the energy demand.
2. The energy prediction method for optimizing the key parameters of the gray model based on the imperial butterfly algorithm according to claim 1, wherein: the specific implementation method of the step 1 comprises the following steps:
step 1.1, array X of original energy demand(0)=[x(0)(1),x(0)(2),...,x(0)(n)](X(0)(k) More than or equal to 0, k is 1, 2, the(1)=[x(1)(1),x(1)(2),...,x(1)(n)](k ═ 1, 2,. n), where
Figure FDA0003311990010000011
X(0)(k) The energy demand value for the k year;
step 1.2, according to the generation sequence X(1)The following GM (1, 1) prediction model was established:
Figure FDA0003311990010000012
Figure FDA0003311990010000013
in the formula, X(0)(k-1) is the energy demand value of the k-1 year, X(0)(k) For the energy demand value of the k year, Z(1)(k) Is composed of
Figure FDA0003311990010000014
The whitened background value at time k is the generation sequence X(1)Is determined.
3. The energy prediction method for optimizing the key parameters of the gray model based on the imperial butterfly algorithm according to claim 1, wherein: the objective function established in the step 2 is as follows:
Figure FDA0003311990010000015
in the formula (I), the compound is shown in the specification,
Figure FDA0003311990010000016
analog value, x, output for GM (1, 1) model(0)(k) Is the original energy demand value of the k year.
4. The energy prediction method for optimizing the key parameters of the gray model based on the imperial butterfly algorithm according to claim 1, wherein: the specific implementation method of the step 3 comprises the following steps:
step 3.1, initializing the position state of the butterfly to be vector X ═ X1,x2) Vector x1,x2Respectively corresponding to a development coefficient a and a gray acting amount u of a GM (1, 1) model, combining the information of parameters of the development coefficient a and the gray acting amount u in the position of each butterfly, setting an initial parameter of an algorithm, namely an imperial butterfly population number N, a maximum iteration number MaxGen, the imperial butterfly population number of the algorithm to be Land1 and Land2, setting the population number to be a population1 and a population2, butterfly mobility p, a migration period per, an adjustment rate BAR, a weight factor alpha, a butterfly step length dx and a maximum step length Maxstep, randomly generating N imperial butterfly individuals, wherein each imperial butterfly individual is a potential solution meeting the objective function;
3.2, calculating and sequencing fitness values of the population at an initial stage of iteration according to the target function, wherein the smaller the average relative error is, the higher the individual fitness is, selecting a butterfly individual with high fitness value, and marking the butterfly individual as an elite reservation individual;
step 3.3, dividing the population into Land1 and Land2, executing a migration operator to update butterflies of Land1, executing an adjustment operator to update butterflies of Land2, combining the updated population, recalculating the fitness value, and taking out the keep butterflies with poor fitness to be marked;
3.4, directly replacing butterflies with poor fitness by using the elite butterflies, wherein the replaced population is used as the initial population of the next iteration;
and 3.5, marking the individuals with the optimal fitness value of the iteration, performing loop iteration, stopping the loop when the maximum iteration times MaxGen is reached, and selecting the individuals with the highest fitness from the optimal individuals of each generation as the final optimization result.
5. The energy prediction method for optimizing the key parameters of the gray model based on the imperial butterfly algorithm according to claim 4, wherein: the method for updating the butterfly of Land1 and the method for updating the butterfly of Land2 in the step 3.3 are as follows:
for the imperial butterfly individual in Land1, the migration operator is expressed as
Figure FDA0003311990010000021
Figure FDA0003311990010000022
Represents one butterfly in Land1 at the current t-th iteration, and the new butterfly is generated according to the generated random number r ═ rand × peri
Figure FDA0003311990010000023
Each dimension of (A) is selected from the group consisting of Land1 and Land2, and when the random number r is less than or equal to the mobility p, the new butterfly
Figure FDA00033119900100000215
Is replaced by the kth dimension of randomly selecting a butterfly in the Land1, and when the random number r is more than the mobility p, the new butterfly
Figure FDA00033119900100000216
The k dimension of (1) is replaced by the k dimension of randomly selecting a butterfly from the Land 2;
and (4) executing an adjusting operator for the imperial butterfly individuals in the Land 2. When the random number rand is less than or equal to the mobility p, the expression is
Figure FDA0003311990010000024
Figure FDA0003311990010000025
Represents the k-dimension of the best individual of Land1 and Land 2; when the random number rand is larger than the mobility p, the butterfly individual is as follows
Figure FDA0003311990010000026
Updating the current position, butterfly
Figure FDA0003311990010000027
Randomly selected from the Land2,
Figure FDA0003311990010000028
indicating the adjusted butterfly position, under the condition, if the random number rand > the adjustment rate BAR is satisfied, the position of the individual is further updated to
Figure FDA0003311990010000029
The value of the adjustment rate BAR is set in the imperial butterfly algorithm to be equal to the mobility p, and the weight factor
Figure FDA00033119900100000210
Is the ratio of the maximum step length Maxstep of the butterfly to the square of the current iteration times t, the step length
Figure FDA00033119900100000211
Calculated by the levy flight.
6. The energy prediction method for optimizing the key parameters of the gray model based on the imperial butterfly algorithm according to claim 1, wherein: the specific implementation method of the step 4 comprises the following steps:
step 4.1, obtaining a corresponding time response function of the gray prediction model according to the development coefficient a and the gray action amount u value of the gray model optimized by the emperor butterfly algorithm, wherein the time response function is as follows:
Figure FDA00033119900100000212
in the formula (I), the compound is shown in the specification,
Figure FDA00033119900100000213
is a differential equation
Figure FDA00033119900100000214
A time response sequence of (a);
step 4.2, the
Figure FDA0003311990010000031
And (3) the sequence is reduced by the following formula to obtain a simulation sequence output by the gray prediction model:
Figure FDA0003311990010000032
Figure FDA0003311990010000033
in the formula (I), the compound is shown in the specification,
Figure FDA0003311990010000034
the simulation sequence is a simulation sequence obtained by optimizing the key parameters of the grey prediction model through the imperial butterfly algorithm.
CN202111219352.2A 2021-10-19 2021-10-19 Energy prediction method for optimizing key parameters of gray model based on emperor butterfly algorithm Pending CN114186709A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111219352.2A CN114186709A (en) 2021-10-19 2021-10-19 Energy prediction method for optimizing key parameters of gray model based on emperor butterfly algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111219352.2A CN114186709A (en) 2021-10-19 2021-10-19 Energy prediction method for optimizing key parameters of gray model based on emperor butterfly algorithm

Publications (1)

Publication Number Publication Date
CN114186709A true CN114186709A (en) 2022-03-15

Family

ID=80539506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111219352.2A Pending CN114186709A (en) 2021-10-19 2021-10-19 Energy prediction method for optimizing key parameters of gray model based on emperor butterfly algorithm

Country Status (1)

Country Link
CN (1) CN114186709A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115689070A (en) * 2023-01-03 2023-02-03 南昌工程学院 Energy prediction method for optimizing BP neural network model based on imperial butterfly algorithm
CN116070795A (en) * 2023-03-29 2023-05-05 山东历控能源有限公司 Intelligent energy management and control method and system based on Internet of things

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115689070A (en) * 2023-01-03 2023-02-03 南昌工程学院 Energy prediction method for optimizing BP neural network model based on imperial butterfly algorithm
CN115689070B (en) * 2023-01-03 2023-12-22 南昌工程学院 Energy prediction method for optimizing BP neural network model based on monarch butterfly algorithm
CN116070795A (en) * 2023-03-29 2023-05-05 山东历控能源有限公司 Intelligent energy management and control method and system based on Internet of things
CN116070795B (en) * 2023-03-29 2023-07-11 山东历控能源有限公司 Intelligent energy management and control method and system based on Internet of things

Similar Documents

Publication Publication Date Title
CN108846517B (en) Integration method for predicating quantile probabilistic short-term power load
CN111182564B (en) Wireless link quality prediction method based on LSTM neural network
CN104834215B (en) A kind of BP neural network pid control algorithm of mutation particle swarm optimization
CN114186709A (en) Energy prediction method for optimizing key parameters of gray model based on emperor butterfly algorithm
CN112700060B (en) Station terminal load prediction method and prediction device
CN112818595B (en) Correction method and system for digital twin model data of evaporation area of thermal power plant
CN111861013B (en) Power load prediction method and device
CN107169557A (en) A kind of method being improved to cuckoo optimized algorithm
CN107506865A (en) A kind of load forecasting method and system based on LSSVM optimizations
CN112507613B (en) Second-level ultra-short-term photovoltaic power prediction method
CN115308558B (en) Method and device for predicting service life of CMOS (complementary metal oxide semiconductor) device, electronic equipment and medium
CN115689070B (en) Energy prediction method for optimizing BP neural network model based on monarch butterfly algorithm
CN109325613B (en) Method for online predicting static voltage stability margin by using parallel sequential extreme learning machine
CN103324821A (en) GM (1, 1) model prediction method based on combined interpolation
CN115345297A (en) Platform area sample generation method and system based on generation countermeasure network
CN111008790A (en) Hydropower station group power generation electric scheduling rule extraction method
CN111832817A (en) Small world echo state network time sequence prediction method based on MCP penalty function
CN108898257A (en) A kind of gray prediction method based on particle group optimizing
CN103684352A (en) Particle filtering method based on differential evolution
CN104537224B (en) Multi-state System Reliability analysis method and system based on adaptive learning algorithm
CN114567288B (en) Distribution collaborative nonlinear system state estimation method based on variable decibels
CN113722853B (en) Group intelligent evolutionary engineering design constraint optimization method for intelligent computation
CN114186771B (en) Mixed regularized random configuration network industrial process operation index estimation method
CN113703311B (en) Self-organizing collaborative prediction control method for coal-fired unit
CN109902870A (en) Electric grid investment prediction technique based on AdaBoost regression tree model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination