CN115345661A - Power price prediction method and system - Google Patents
Power price prediction method and system Download PDFInfo
- Publication number
- CN115345661A CN115345661A CN202210976717.4A CN202210976717A CN115345661A CN 115345661 A CN115345661 A CN 115345661A CN 202210976717 A CN202210976717 A CN 202210976717A CN 115345661 A CN115345661 A CN 115345661A
- Authority
- CN
- China
- Prior art keywords
- power price
- price prediction
- matrix
- bat
- learning machine
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 17
- 238000010183 spectrum analysis Methods 0.000 claims abstract description 11
- 239000011159 matrix material Substances 0.000 claims description 52
- 239000002245 particle Substances 0.000 claims description 46
- 238000012549 training Methods 0.000 claims description 38
- 238000012360 testing method Methods 0.000 claims description 23
- 230000005611 electricity Effects 0.000 claims description 22
- 230000000694 effects Effects 0.000 claims description 20
- 238000000354 decomposition reaction Methods 0.000 claims description 11
- 238000005295 random walk Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 claims description 9
- 230000035772 mutation Effects 0.000 claims description 9
- 238000009826 distribution Methods 0.000 claims description 6
- 238000005457 optimization Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 claims description 4
- 238000012935 Averaging Methods 0.000 claims description 3
- 241000288673 Chiroptera Species 0.000 claims description 3
- 230000004913 activation Effects 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 230000000737 periodic effect Effects 0.000 claims description 3
- 238000001228 spectrum Methods 0.000 claims description 3
- 230000002194 synthesizing effect Effects 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 3
- 238000009827 uniform distribution Methods 0.000 claims description 3
- 238000010276 construction Methods 0.000 claims description 2
- 230000002860 competitive effect Effects 0.000 claims 1
- 230000007547 defect Effects 0.000 abstract description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010248 power generation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
- G06Q30/0206—Price or cost determination based on market factors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial 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]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Strategic Management (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Economics (AREA)
- Marketing (AREA)
- Biomedical Technology (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Entrepreneurship & Innovation (AREA)
- Molecular Biology (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Business, Economics & Management (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Game Theory and Decision Science (AREA)
- Public Health (AREA)
- Water Supply & Treatment (AREA)
- Human Resources & Organizations (AREA)
- Primary Health Care (AREA)
- Tourism & Hospitality (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to the technical field of power data prediction, and discloses a power price prediction method and a system, wherein the method decomposes a power price time sequence by adopting singular spectrum analysis to obtain a plurality of groups of characteristic components so as to reduce the fluctuation of the original power price time sequence, and effectively solves the defect of non-optimal parameters of a limit learning machine by respectively establishing a power price prediction model of the limit learning machine optimized by an active competition bat algorithm for each group of characteristic components, so that the trained power price prediction submodel is more accurate, and the final power price prediction result is obtained by adding the prediction output values of each power price submodel, thereby avoiding the condition of the non-optimal parameters of the limit learning machine and improving the precision of power price prediction.
Description
Technical Field
The invention relates to the technical field of electric power data prediction, in particular to an electric power price prediction method and system.
Background
In recent years, with the rapid development and utilization of clean energy such as wind energy, solar energy and the like, the installed capacity of wind power and photovoltaic power rises rapidly, the global new energy industry develops vigorously, and large-scale new energy is gradually merged into a power grid. However, as the power generation cost of new energy sources such as wind power, photovoltaic energy and the like is low, the daily clearing price of the power market tends to be reduced; moreover, the electric energy can not be stored in large quantity, the balance of supply and demand is required to be met all the time, the randomness and instability of new energy sources such as wind and light enable the day-ahead clearing price to fluctuate strongly, the nonlinear characteristic is presented, and the establishment of a day-ahead electricity price prediction model with high accuracy is urgent. The size of the electricity price fluctuation is closely related to the risk of the electric power market, and therefore, accurate electricity price prediction has important significance for the electric power system and the electric power market.
The current electricity price prediction method can be divided into a statistical prediction method and a machine learning prediction method, wherein statistics comprises different variances under generalized autoregressive conditions, time sequences and the like, and electricity price prediction is realized by learning the electricity price recursion relation at different moments. With the wide application of machine learning, many researchers apply it to electricity price prediction. For example, compared with the traditional gradient descent method neural network, the extreme learning machine avoids many defects, such as local minimum and high calculation load, can greatly improve learning speed and has good generalization capability, so that the extreme learning machine can be used for power price prediction.
Disclosure of Invention
The invention provides a method and a system for predicting electric power price, which solve the technical problem of low electric power price prediction precision in the prior art.
In view of this, a first aspect of the present invention provides a method for predicting electricity price, including the following steps:
acquiring historical power price data and constructing a power price time sequence;
decomposing the power price time sequence by adopting singular spectrum analysis to obtain a plurality of groups of characteristic components;
constructing a corresponding training data set and a corresponding testing data set for each group of characteristic components;
respectively establishing an electric power price prediction model of an extreme learning machine optimized by an activity competition bat algorithm for each group of characteristic components;
inputting the training samples in the training data set into the power price prediction model one by one for training to obtain corresponding power price prediction submodels;
inputting the test samples in the test data set into corresponding power price prediction submodels one by one for prediction to obtain a power price prediction value of each power price prediction submodel;
and adding all the power price predicted values to obtain a final power price predicted result.
Preferably, the step of decomposing the power price time series by using singular spectrum analysis to obtain a plurality of groups of feature components specifically includes:
defining the electricity price time sequence as Y = [ Y 1 ,y 2 ,…,y N ] T And N represents the total number of samples, a vector X with L-order lag is established according to the power price time sequence Y i Comprises the following steps:
X i =[y i ,y i+1 ,…,y i+L-1 ] T ,i=1,2,…,K
wherein L represents a window length, K = N-L +1;
vector X according to lag order L i Generating trajectoriesThe matrix X is:
in the formula, K represents the number of columns of the trajectory matrix X;
assume covariance matrix S = XX T Singular value decomposition of S yields a set of L eigenvalues λ in total 1 ,λ 2 ,…,λ L And according to the descending order of the eigenvalue, it is marked as lambda 1 >λ 2 >…>λ L More than or equal to 0, and solving the orthogonal feature vector U corresponding to each feature value 1 ,U 2 ,...,U i ,...,U L And performing singular value decomposition on the track matrix X as follows:
X=x 1 +x 2 +x i +…+x d
in the formula,d represents the number of singular values of the trajectory matrix X,for singular spectra, U i Is an orthogonal eigenvector, V, of the trajectory matrix X i Is the principal component of the trajectory matrix X;
singular values obtained by decompositionDivided into m disjoint groups I 1 ,I 2 ,...,I m Is shown by m =(i i ,i 2 ,...,i p ) Expressed as a set of indices, p represents the total number of indices, corresponding to group I m Is synthesized by the matrix X I Is defined asThe trajectory matrix X is then decomposed into:
thereby synthesizing the matrix X I Converting the time series data into corresponding time series data characteristic components, wherein each group of data characteristic components comprise one of trend components, periodic components and noise components of the original signals;
by ratio of corresponding characteristic valuesCalculation of I m Characteristic component ofTaking the sequence with the contribution rate less than 0.01% as a noise component, and eliminating the noise component;
each trajectory matrix X is transferred into the time series by diagonal averaging by the following procedure:
suppose the trajectory matrix X is an LxK matrix with X elements ij I is more than or equal to 1 and less than or equal to L, j is more than or equal to 1 and less than or equal to K, and L is arranged * =min(L,K),K * = max (L, K), wherein L * Minimum value, K, representing the rows and columns of the trajectory matrix X * Represents the maximum of the rows and columns of the trajectory matrix X, N = K + L-1, if L<K, orderWherein,representing the value of the time series element after reconstruction, if L is more than or equal to K, thenThe reconstructed time series Z = { Z = 1 ,z 2 ,…,z N Denotes as follows:
in the formula,representing the reconstructed time series element values, k representing the k-th component after reconstruction, thereby obtaining a plurality of groups of characteristic components z k 。
Preferably, the step of constructing a corresponding training data set and test data set for each group of feature components specifically includes:
and acquiring a mapping relation between each characteristic component in each group of characteristic components and the power price so as to construct a corresponding training data set and a corresponding testing data set.
Preferably, the step of respectively establishing an electric power price prediction model of the extreme learning machine optimized by the activity competition bat algorithm for each group of feature components specifically comprises:
constructing a power price prediction model of an initial extreme learning machine;
setting activity variation probability Pa, dimension crossing probability Pv and pulse emission frequency r of the activity competition bat algorithm i Maximum frequency f max Minimum frequency f min The method comprises the following steps of scaling factor sigma, population scale M, maximum iteration time Tmax xgen and particle dimension D, wherein the particle dimension D is an input weight to be optimized and the number of bias hidden layers;
bat coding the input weight and hidden layer bias to be optimized, and randomly generating an initial population Q = [) 1 ,Q 2 ,...,Q g ,...,Q G ] T Wherein, the g-th bat is:
Q g =[w 11 ,w 12 ,...,w 1l ,w 21 ,w 22 ,...,w 2l ,...,w n1 ,w n2 ,...,w nl ,b 1 ,b 2 ,...,b l ].
in the formula, n and l are the number of input layers and hidden layers of the extreme learning machine respectively, and w nl Is the input weight from the nth node of the input layer to each node of the hidden layer, b l A bias for the l-th node of the hidden layer;
converting each particle into an input weight and a hidden layer bias corresponding to the extreme learning machine, and calculating the output weight of the extreme learning machine according to a pseudo-inverse algorithm as follows:
β=H + E
in the formula, β is an output weight of the extreme learning machine, E is an output target matrix of the training sample, and H is an output matrix of the hidden layer, which can be expressed as follows:
in the formula, y 1 ...y n Representing an input amount of the extreme learning machine;
g () is a hidden layer activation function, and a Sigmoid function is selected as follows:
exploring the target space by the virtual bats, and recording the frequency f of each virtual bat in t iterations of the target space i Velocity V i t And positionIn t +1 iterations, the speed and location update modes of the virtual bat are as follows:
in the formula (f) min Is the minimum frequency, f, of the virtual bat max Is the maximum frequency of the virtual bat,is a random variable, X, subject to uniform distribution best A global optimal position for the population;
the fitness value for each sample is calculated by a fitness function of the following formula:
in the formula, X t 、The actual value of the power price and the predicted output value of the power price at the moment t are respectively;
after the speed and the position of each virtual bat are updated, a random number from 0 to 1 is randomly generated, and if the random number is more than the pulse emission frequency r i A new solution is generated using random walks:
X new =X old +σε t ×A t
in the formula, X old Is the old solution, i.e. the new solution X new One of the previous solutions, σ, is the scaling factor used to control the step size, ε t Obey Gaussian normal distribution N0, 1],A t Is the average loudness of all bats in the current time step, and A 0 =1,A min =0;
After a new solution is generated by random walk, a random number from 0 to 1 is randomly generated, and if the random number is smaller than the average loudness of all bat i in the current time stepAnd the adaptability value of the new solution is smaller than that of the old solution, the new solution is accepted and is updated according to the following formulaAnd r i :
r i Represents the pulse emission frequency of the ith bat,represents the pulse emission frequency of the ith bat in the t generation, and ρ and γ are [0.9,0.98 ]]The spacing constant, for any 0 < ρ < 1, γ > 0, has:t → ∞; after the particle updating is finished, calculating the particle fitness value after the position updating to obtain the optimal individual X best ;
If the random number is larger than the activity mutation probability Pa, entering an activity mutation operator, and carrying out optimization on the optimal individual X best Performing Gaussian mutation operation to update X best The position of (2):
in the formula,the particles are the optimal particles after Gaussian variation, N (0, 1) is a Gaussian distribution random quantity with the mean value of 0 and the variance of 1;
judging whether the current iteration number reaches a preset maximum iteration number, if not, switching to a solution, randomly generating a random number from 0 to 1, and if the random number is greater than the pulse emission frequency r i A step of generating a new solution by using random walk, if judging yes, judging the individual X with the optimal population best Whether the fitness value of the population is continuously kept unchanged for 10 generations or not, if the population is optimal, the individual X is selected best If the fitness value of the particle X (i) is continuously kept unchanged for 10 generations, entering a dimension competition operator, updating the positions of the particles of the population according to the dimension crossing probability Pv, so that pairwise random pairing is carried out on all the dimensions in the population, each pair is sequentially taken out, if the d1 th dimension and the d2 th dimension of the particle X are selected, if the random number is greater than the dimension crossing probability Pv, a pair of dimensions are selected again, if the random number is less than the dimension crossing probability Pv, executing the probability dimension competition operator on the d1 th dimension and the d2 th dimension of all the particles X (i) in the population, and generating new particles to be stored in an MS according to the following formula vc In (1),
MS vc (i,d 1 )=r·X(i,d 1 )+(1-r)·X(i,d 2 )i∈N(1,G);d 1 ,d 2 ∈N(1,D);r∈[0,1]
MS (Mobile station) vc Comparing the fitness value of the medium particle with that of the parent particle in X, preferentially retaining in X, repeating the above steps D/2 times, ending, and recording the optimal particle X best ;
Judging whether the current iteration times reach the preset maximum iteration times, if so, ending the optimization, and enabling X best Converting the input weight and the bias of the extreme learning machine to predict; if not, the method transfers to the step of determining a solution and then randomly generates a random number from 0 to 1, and if the random number is more than the pulse emission frequency r i A step of generating a new solution using random walk.
In a second aspect, the present invention further provides an electricity price prediction system, including:
the data acquisition module is used for acquiring historical electric power price data and constructing an electric power price time sequence;
the decomposition module is used for decomposing the power price time sequence by adopting singular spectrum analysis to obtain a plurality of groups of characteristic components;
the construction module is used for constructing a corresponding training data set and a corresponding testing data set for each group of characteristic components;
the model building module is used for respectively building an electric power price prediction model of the extreme learning machine optimized by the activity competition bat algorithm for each group of characteristic components;
the training module is used for inputting the training samples in the training data set into the power price prediction model one by one for training to obtain corresponding power price prediction submodels;
the prediction module is used for inputting the test samples in the test data set into the corresponding power price prediction submodels one by one for prediction to obtain the power price prediction value of each power price prediction submodel;
and the processing module is used for summing all the power price predicted values to obtain a final power price predicted result.
According to the technical scheme, the invention has the following advantages:
according to the method, the singular spectrum analysis is adopted to decompose the power price time sequence to obtain a plurality of groups of characteristic components, so that the fluctuation of the original power price time sequence is reduced, the power price prediction model of the extreme learning machine optimized by the active competition bat algorithm is respectively established for each group of characteristic components, the defect of non-optimal parameters of the extreme learning machine is effectively overcome, the power price prediction submodel obtained through training is more accurate, the final power price prediction result is obtained by adding the prediction output values of each power price submodel, the condition of the non-optimal parameters of the extreme learning machine is avoided, and the accuracy of power price prediction is improved.
Drawings
Fig. 1 is a flowchart of an electric power price prediction method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electric power price prediction system according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
For easy understanding, referring to fig. 1, the method for predicting the price of electricity according to the present invention includes the following steps:
s1, obtaining historical electric power price data and constructing an electric power price time sequence.
It is understood that the electricity price time series is constructed by collecting electricity price data in time series.
And S2, decomposing the power price time sequence by adopting singular spectrum analysis to obtain a plurality of groups of characteristic components.
And S3, constructing a corresponding training data set and a corresponding testing data set for each group of feature components.
And S4, respectively establishing an electric power price prediction model of the extreme learning machine optimized by the activity competition bat algorithm for each group of characteristic components.
And S5, inputting the training samples in the training data set into the power price prediction model one by one for training to obtain the corresponding power price prediction submodels.
And S6, inputting the test samples in the test data set into the corresponding power price prediction submodels one by one for prediction to obtain the power price prediction value of each power price prediction submodel.
And S7, summing all the power price predicted values to obtain a final power price predicted result.
The embodiment provides an electric power price prediction method, a plurality of groups of characteristic components are obtained by decomposing an electric power price time sequence through singular spectrum analysis, so that the fluctuation of an original electric power price time sequence is reduced, the defect of non-optimal parameters of an extreme learning machine is effectively overcome by respectively establishing an electric power price prediction model of the extreme learning machine optimized by an activity competition bat algorithm for each group of characteristic components, so that the electric power price prediction submodel obtained through training is more accurate, and the final electric power price prediction result is obtained by adding the prediction output values of each electric power price submodel, so that the condition of the non-optimal parameters of the extreme learning machine is avoided, and the accuracy of electric power price prediction is improved.
In a specific embodiment, step S2 specifically includes:
s201, defining the time sequence of the power price as Y = [ Y ] 1 ,y 2 ,…,y N ] T And N represents the total number of samples, a vector X with L-order lag is established according to the power price time sequence Y i Comprises the following steps:
X i =[y i ,y i+1 ,…,y i+L-1 ] T ,i=1,2,…,K
wherein L represents a window length, K = N-L +1;
vector X according to lag L order i Generating a trajectory matrix X as:
wherein K represents the number of columns of the track matrix X;
s202, assuming covariance matrix S = XX T Singular value decomposition of S yields a set of L eigenvalues λ in total 1 ,λ 2 ,…,λ L And according to the descending order of the eigenvalue, it is marked as lambda 1 >λ 2 >…>λ L More than or equal to 0, and solving orthogonal feature vector U corresponding to each feature value 1 ,U 2 ,...,U i ,...,U L And performing singular value decomposition on the track matrix X as follows:
X=x 1 +x 2 +x i +…+x d
in the formula,d is the number of singular values of the matrix X, d represents the number of singular values of the trajectory matrix X,for singular spectra, U i Orthogonal eigenvectors, V, of the trajectory matrix X i Is the principal component of the trajectory matrix X;
s203, decomposing the singular valuesInto m disjoint groups I 1 ,I 2 ,...,I m Is shown by m =(i i ,i 2 ,...,i p ) Expressed as a set of exponents, p representing the total number of exponents, corresponding to the set I m Is synthesized matrix X I Is defined asThe trajectory matrix X is then decomposed into:
thereby synthesizing the matrix X I Converting the data into corresponding time series data characteristic components, wherein each group of data characteristic components comprises one of trend components, periodic components and noise components of the original signal;
and dividing singular values corresponding to the similar characteristic values into the same group.
S203, ratio of corresponding characteristic valuesCalculating I m Characteristic component X of Ii The sequence with the contribution rate less than 0.01 percent is taken as a noise component, and the noise component is removed;
s204, transferring each track matrix X into a time sequence through the following process by diagonal averaging:
let the trajectory matrix X be an LxK matrix with X elements ij I is more than or equal to 1 and less than or equal to L, j is more than or equal to 1 and less than or equal to K, and L is arranged * =min(L,K),K * = max (L, K), wherein L * Minimum value, K, representing the rows and columns of the trajectory matrix X * Represents the maximum of the rows and columns of the trajectory matrix X, N = K + L-1, if L<K, orderWherein,representing the value of the time series element after reconstruction, if L is more than or equal to K, thenThe reconstructed time series Z = { Z = 1 ,z 2 ,…,z N Denotes as follows:
in the formula,representing the reconstructed time series element values, k representing the k-th component after reconstruction, thereby obtaining a plurality of groups of characteristic components z k 。
In a specific embodiment, step S3 specifically includes:
and acquiring a mapping relation between each characteristic component in each group of characteristic components and the power price so as to construct a corresponding training data set and a corresponding testing data set.
In a specific embodiment, step S4 specifically includes:
s401, constructing a power price prediction model of the initial extreme learning machine;
s402, setting activity variation probability Pa, dimension cross probability Pv and pulse emission frequency r of an activity competition bat algorithm i Maximum frequency f max Minimum frequency f min Scaling factor σ, population size M, maximum number of iterations T maxgen And a particle dimension D, wherein the particle dimension D is an input weight to be optimized and the bias number of the hidden layer;
s403, carrying out bat coding on the input weight value to be optimized and the hidden layer bias, and randomly generating an initial population Q = [ Q ] 1 ,Q 2 ,...,Q g ,...,Q G ] T Wherein, the g-th bat is:
Q g =[w 11 ,w 12 ,...,w 1l ,w 21 ,w 22 ,...,w 2l ,...,w n1 ,w n2 ,...,w nl ,b 1 ,b 2 ,...,b l ].
in the formula, n and l are the number of input layers and hidden layers of the extreme learning machine respectively, and w nl For the input of the input weights from the nth node of the input layer to the lth nodes of the hidden layer, b l A bias for the l-th node of the hidden layer;
s404, converting each particle into an input weight and hidden layer bias corresponding to the extreme learning machine, and calculating the output weight of the extreme learning machine according to a pseudo-inverse algorithm as follows:
β=H + E
in the formula, β is the output weight of the extreme learning machine, E is the output target matrix of the training sample, and H is the output matrix of the hidden layer, which can be expressed as follows:
in the formula, y 1 ...y n Representing an input amount of the extreme learning machine;
g () is a hidden layer activation function, and a Sigmoid function is selected as follows:
s405, exploring a target space through the virtual bats, and recording the frequency f of each virtual bat in t iterations of the target space i Velocity V i t And positionIn t +1 iterations, the speed and position of the virtual bat are updated as follows:
in the formula (f) min Is the minimum frequency, f, of the virtual bat max Is the maximum frequency of the virtual bat,is a random variable, X, subject to uniform distribution best A global optimal position for the population;
s406, calculating a fitness value of each sample through a fitness function of the following formula:
in the formula, X t 、The actual value of the power price and the predicted output value of the power price at the time t are respectively;
s407, after the speed and the position of each virtual bat are updated, a random number from 0 to 1 is randomly generated, and if the random number is greater than the pulse emission frequency r i A new solution is generated using random walks:
X new =X old +σε t ×A t
in the formula, X old Is the old solution, i.e. the new solution X new One of the previous solutions, σ, is the scaling factor used to control the step size, ε t Obeying a Gaussian normal distribution N [0,1 ]],A t Is the average loudness of all bats in the current time step, and A 0 =1,A min =0;
S408, randomly generating a random number from 0 to 1 after a new solution is generated by random walkIf the random number is less than the average loudness of all bat i in the current time stepAnd the fitness value of the new solution is smaller than that of the old solution, the new solution is accepted and updated according to the following formulaAnd r i :
r i Represents the pulse emission frequency of the ith bat,representing the pulse emission frequency of the ith bat of the t generation, p and gamma are [0.9,0.98 ]]The intermediate constant, for any 0 < ρ < 1, γ > 0, has:t → ∞; after the particle updating is finished, calculating the particle fitness value after the position updating to obtain the optimal individual X best ;
S409, if the random number is larger than the activity mutation probability Pa, entering an activity mutation operator, and carrying out optimization on the optimal individual X bes t performing Gaussian mutation operation to update X best The position of (2):
in the formula,the particles are the optimal particles after Gaussian variation, N (0, 1) is a Gaussian distribution random quantity with the mean value of 0 and the variance of 1;
s410, judging whether the current iteration frequency reaches the preset maximum iteration frequency, if not, switching to the step of determining a solution, then randomly generating a random number from 0 to 1, and if the random number is more than the pulse emission frequency r i A step of generating a new solution by using random walk, if the judgment is yes, judging the individual X with the optimal population best Whether the fitness value of the population is continuously kept unchanged for 10 generations or not, if the population is optimal, the individual X is selected best If the fitness value of the particle X (i) is continuously kept unchanged for 10 generations, entering a dimension competition operator, updating the position of the particle in the population according to the dimension crossing probability Pv, so as to randomly pair all the dimensions in the population pairwise, taking out each pair in sequence, if the d1 th dimension and the d2 nd dimension of the particle X are selected, if the random number is greater than the dimension crossing probability Pv, re-selecting one pair of dimensions, if the random number is less than the dimension crossing probability Pv, executing the probability dimension competition operator on the d1 th dimension and the d2 nd dimension of all the particles X (i) in the population, and generating new particles according to the following formula to store in an MS vc In (1),
MS vc (i,d 1 )=r·X(i,d 1 )+(1-r)·X(i,d 2 )i∈N(1,G);d 1 ,d 2 ∈N(1,D);r∈[0,1]
s411, mixing MS vc Comparing the fitness value of the medium particle with that of the parent particle in X, preferentially retaining in X, repeating the above steps D/2 times, ending, and recording the optimal particle X best ;
S412, judging whether the current iteration times reach the preset maximum iteration times, if so, ending the optimization, and enabling X best Converting the input weight and the bias of the extreme learning machine to predict; if not, the method transfers to the step of determining a solution and then randomly generates a random number from 0 to 1, and if the random number is more than the pulse emission frequency r i A step of generating a new solution using random walk.
The above is a detailed description of an embodiment of an electric power price prediction method provided by the present invention, and the following is a detailed description of an embodiment of an electric power price prediction system provided by the present invention.
For easy understanding, referring to fig. 2, the present invention provides an electricity price prediction system, comprising:
the data acquisition module 100 is configured to acquire historical electric power price data and construct an electric power price time sequence;
the decomposition module 200 is configured to decompose the power price time series by using singular spectrum analysis to obtain a plurality of groups of characteristic components;
a constructing module 300, configured to construct a corresponding training data set and a corresponding testing data set for each group of feature components;
the model building module 400 is used for respectively building an electric power price prediction model of the extreme learning machine optimized by the activity competition bat algorithm for each group of characteristic components;
the training module 500 is used for inputting training samples in the training data set into the power price prediction model one by one for training to obtain respective corresponding power price prediction submodels;
the prediction module 600 is configured to input the test samples in the test data set into the corresponding power price prediction submodels one by one for prediction, so as to obtain a power price prediction value of each power price prediction submodel;
and the processing module 700 is configured to sum all the power price prediction values to obtain a final power price prediction result.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (5)
1. An electricity price prediction method characterized by comprising the steps of:
acquiring historical power price data and constructing a power price time sequence;
decomposing the power price time sequence by adopting singular spectrum analysis to obtain a plurality of groups of characteristic components;
constructing a corresponding training data set and a corresponding testing data set for each group of characteristic components;
respectively establishing an electric power price prediction model of an extreme learning machine optimized by an activity competition bat algorithm for each group of characteristic components;
inputting the training samples in the training data set into the power price prediction model one by one for training to obtain corresponding power price prediction submodels;
inputting the test samples in the test data set into corresponding power price prediction submodels one by one for prediction to obtain a power price prediction value of each power price prediction submodel;
and adding all the power price predicted values to obtain a final power price predicted result.
2. The electricity price prediction method according to claim 1, wherein the step of decomposing the electricity price time series by using singular spectrum analysis to obtain a plurality of groups of feature components specifically comprises:
defining the electricity price time sequence as Y = [ Y 1 ,y 2 ,…,y N ] T And N represents the total number of samples, a vector X with L-order lag is established according to the power price time sequence Y i Comprises the following steps:
X i =[y i ,y i+1 ,…,y i+L-1 ] T ,i=1,2,…,K
wherein L represents a window length, K = N-L +1;
vector X according to lag L order i Generating a trajectory matrix X as:
wherein K represents the number of columns of the track matrix X;
assume covariance matrix S = XX T Singular value decomposition of S yields a set of L eigenvalues λ in total 1 ,λ 2 ,…,λ L And according to the descending order of the eigenvalue, it is marked as lambda 1 >λ 2 >…>λ L Not less than 0, claimObtaining orthogonal eigenvector U corresponding to each eigenvalue 1 ,U 2 ,...,U i ,...,U L The singular value decomposition is performed on the trajectory matrix X as:
X=x 1 +x 2 +x i +…+x d
in the formula,d represents the number of singular values of the trajectory matrix X,for singular spectra, U i Orthogonal eigenvectors, V, of the trajectory matrix X i Is the principal component of the trajectory matrix X;
singular values obtained by decompositionDivided into m disjoint groups I 1 ,I 2 ,...,I m Is shown by m =(i i ,i 2 ,...,i p ) Expressed as a set of exponents, p representing the total number of exponents, corresponding to the set I m Is synthesized by the matrix X I Is defined asThe trajectory matrix X is then decomposed into:
thereby synthesizing the matrix X I Converting the time series data into corresponding time series data characteristic components, wherein each group of data characteristic components comprise one of trend components, periodic components and noise components of the original signals;
by ratio of corresponding characteristic valuesComputingI m Characteristic component ofThe sequence with the contribution rate less than 0.01 percent is taken as a noise component, and the noise component is removed;
each trajectory matrix X is transferred into the time series by diagonal averaging by the following procedure:
let the trajectory matrix X be an LxK matrix with X elements ij I is more than or equal to 1 and less than or equal to L, j is more than or equal to 1 and less than or equal to K, and L is arranged * =min(L,K),K * = max (L, K), wherein L * Represents the minimum value of the rows and columns of the track matrix X, K * Denotes the maximum of the rows and columns of the trajectory matrix X, N = K + L-1, if L<K, orderWherein,representing the value of the time series element after reconstruction, if L is more than or equal to K, thenThe reconstructed time series Z = { Z = { (Z) } 1 ,z 2 ,…,z N Denotes as follows:
3. The electricity price prediction method according to claim 2, wherein the step of constructing a corresponding training data set and test data set for each group of feature components specifically comprises:
and acquiring a mapping relation between each characteristic component in each group of characteristic components and the power price so as to construct a corresponding training data set and a corresponding testing data set.
4. The electricity price prediction method according to claim 3, wherein the step of establishing an electricity price prediction model of an extreme learning machine optimized by an active competitive bat algorithm for each group of feature components respectively specifically comprises:
constructing a power price prediction model of an initial extreme learning machine;
setting activity variation probability Pa, dimension cross probability Pv and pulse emission frequency r of the activity competition bat algorithm i Maximum frequency f max Minimum frequency f min The method comprises the following steps of (1) scaling factor sigma, population scale M, maximum iteration time Tmax gen and particle dimension D, wherein the particle dimension D is an input weight to be optimized and the number of bias layers;
bat coding the input weight and hidden layer bias to be optimized, and randomly generating an initial population Q = [) 1 ,Q 2 ,...,Q g ,...,Q G ] T Wherein, the g-th bat is:
Q g =[w 11 ,w 12 ,...,w 1l ,w 21 ,w 22 ,…,w 2l ,...,w n1 ,w n2 ,...,w nl ,b 1 ,b 2 ,…,b l ].
in the formula, n and l are the number of input layers and hidden layers of the extreme learning machine respectively, and w nl Is the input weight from the nth node of the input layer to each node of the hidden layer, b l Bias for the l-th node of the hidden layer;
converting each particle into an input weight and hidden layer bias corresponding to the extreme learning machine, and calculating the output weight of the extreme learning machine according to a pseudo-inverse algorithm as follows:
β=H + E
in the formula, β is an output weight of the extreme learning machine, E is an output target matrix of the training sample, and H is an output matrix of the hidden layer, which can be expressed as follows:
in the formula, y 1 ...y n Representing an input amount of the extreme learning machine;
g () is a hidden layer activation function, and a Sigmoid function is selected as follows:
exploring the target space by the virtual bats, and recording the frequency f of each virtual bat in t iterations of the target space i Velocity V i t And positionIn t +1 iterations, the speed and location update modes of the virtual bat are as follows:
in the formula (f) min Is the minimum frequency, f, of the virtual bat max Is the maximum frequency of the virtual bat,is a random variable subject to uniform distribution, X best The global optimal position of the population is obtained;
the fitness value for each sample is calculated by a fitness function of the following formula:
in the formula, X t 、The actual value of the power price and the predicted output value of the power price at the time t are respectively;
after the speed and the position of each virtual bat are updated, a random number from 0 to 1 is randomly generated, and if the random number is more than the pulse emission frequency r i A new solution is generated using random walks:
X new =X old +σε t ×A t
in the formula, X old Is the old solution, i.e. the new solution X new One of the previous solutions, σ, is the scaling factor used to control the step size, ε t Obeying a Gaussian normal distribution N [0,1 ]],A t Is the average loudness of all bats in the current time step, and A 0 =1,A min =0;
After a new solution is generated by random walk, a random number from 0 to 1 is randomly generated, and if the random number is smaller than the average loudness of all bat i in the current time stepAnd the adaptability value of the new solution is smaller than that of the old solution, the new solution is accepted and is updated according to the following formulaAnd r i :
r i t+1 =r i 0 [1-exp(-γt)]
r i Representing the pulse emission frequency, r, of the ith bat i t Represents the pulse emission frequency of the ith bat in the t generation, and ρ and γ are [0.9,0.98 ]]The spacing constant, for any 0 < ρ < 1, γ > 0, has: a. The i t →0,r i t →r i 0 T → ∞; after the particles are updated, calculating the particle fitness value after the update position to obtain the optimal individual X best ;
If the random number is greater than the activity mutation probability Pa, entering an activity mutation operator, and carrying out optimal individual X best Performing Gaussian mutation operation to update X best The position of (2):
in the formula,the particles are the optimal particles after Gaussian variation, N (0, 1) is a Gaussian distribution random quantity with the mean value of 0 and the variance of 1;
judging whether the current iteration number reaches the preset maximum iteration number, if not, switching to the step of determining a solution, then randomly generating a random number from 0 to 1, and if the random number is more than the pulse emission frequency r i A step of generating a new solution by using random walk, if the judgment is yes, judging the individual X with the optimal population best Whether the fitness value of the population is continuously kept unchanged for 10 generations or not, if the population is optimal, the individual X is selected best If the fitness value of the particle X is kept unchanged for 10 continuous generations, entering a dimension competition operator, updating the positions of the population particles according to the dimension cross probability Pv, carrying out pairwise non-repeated random pairing on all dimensions in the population, sequentially taking out each pair, and if the d 1-th dimension and the d 2-th dimension of the particle X are kept unchanged, sequentially taking out the pairsSelecting, if the random number is greater than the dimension cross probability Pv, reselecting a pair of dimensions, if the random number is less than the dimension cross probability Pv, executing probability dimension competition operators for the d 1-th dimension and the d 2-th dimension of all the particles X (i) in the population, generating new particles according to the following formula and storing the new particles in the MS vc In the step (1), the first step,
MS vc (i,d 1 )=r·X(i,d 1 )+(1-r)·X(i,d 2 )i∈N(1,G);d 1 ,d 2 ∈N(1,D);r∈[0,1]
MS (Mobile station) vc Comparing the fitness value of the medium particle with that of the parent particle in X, preferentially retaining in X, repeating the above steps D/2 times, ending, and recording the optimal particle X best ;
Judging whether the current iteration times reach the preset maximum iteration times, if so, ending the optimization, and enabling X best Converting the input weight and the bias of the extreme learning machine to predict; if not, the method transfers to the step of determining a solution and then randomly generates a random number from 0 to 1, and if the random number is more than the pulse emission frequency r i A step of generating a new solution using random walk.
5. An electricity price prediction system, comprising:
the data acquisition module is used for acquiring historical power price data and constructing a power price time sequence;
the decomposition module is used for decomposing the power price time sequence by adopting singular spectrum analysis to obtain a plurality of groups of characteristic components;
the construction module is used for constructing a corresponding training data set and a corresponding testing data set for each group of characteristic components;
the model building module is used for respectively building an electric power price prediction model of the extreme learning machine optimized by the activity competition bat algorithm for each group of characteristic components;
the training module is used for inputting the training samples in the training data set into the power price prediction model one by one for training to obtain power price prediction submodels corresponding to the training samples;
the prediction module is used for inputting the test samples in the test data set into the corresponding power price prediction submodels one by one for prediction to obtain the power price prediction value of each power price prediction submodel;
and the processing module is used for summing all the power price predicted values to obtain a final power price predicted result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210976717.4A CN115345661A (en) | 2022-08-15 | 2022-08-15 | Power price prediction method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210976717.4A CN115345661A (en) | 2022-08-15 | 2022-08-15 | Power price prediction method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115345661A true CN115345661A (en) | 2022-11-15 |
Family
ID=83951571
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210976717.4A Pending CN115345661A (en) | 2022-08-15 | 2022-08-15 | Power price prediction method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115345661A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117349602A (en) * | 2023-12-06 | 2024-01-05 | 江西省水投江河信息技术有限公司 | Water conservancy facility operation state prediction method, system and computer |
CN117367751A (en) * | 2023-10-19 | 2024-01-09 | 中聚科技股份有限公司 | Performance detection method and device for ultra-pulse thulium-doped laser |
-
2022
- 2022-08-15 CN CN202210976717.4A patent/CN115345661A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117367751A (en) * | 2023-10-19 | 2024-01-09 | 中聚科技股份有限公司 | Performance detection method and device for ultra-pulse thulium-doped laser |
CN117367751B (en) * | 2023-10-19 | 2024-05-10 | 中聚科技股份有限公司 | Performance detection method and device for ultra-pulse thulium-doped laser |
CN117349602A (en) * | 2023-12-06 | 2024-01-05 | 江西省水投江河信息技术有限公司 | Water conservancy facility operation state prediction method, system and computer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110738344B (en) | Distributed reactive power optimization method and device for load prediction of power system | |
CN115345661A (en) | Power price prediction method and system | |
CN109978283B (en) | Photovoltaic power generation power prediction method based on branch evolution neural network | |
CN112564098B (en) | High-proportion photovoltaic power distribution network voltage prediction method based on time convolution neural network | |
CN113722877B (en) | Method for online prediction of temperature field distribution change during lithium battery discharge | |
CN107037373B (en) | Battery remaining capacity prediction technique neural network based | |
Niu et al. | Uncertainty modeling for chaotic time series based on optimal multi-input multi-output architecture: Application to offshore wind speed | |
CN110807554B (en) | Generation method and system based on wind power/photovoltaic classical scene set | |
CN108280545A (en) | A kind of photovoltaic power prediction technique based on K mean cluster neural network | |
CN108665112A (en) | Photovoltaic fault detection method based on Modified particle swarm optimization Elman networks | |
CN108960491A (en) | Method for forecasting photovoltaic power generation quantity based on RBF neural | |
CN113837499A (en) | Ultra-short-term wind power prediction method and system | |
CN111178616A (en) | Wind speed prediction method based on negative correlation learning and regularization extreme learning machine integration | |
CN114169251A (en) | Ultra-short-term wind power prediction method | |
CN106951995A (en) | A kind of EHV transmission electric field extreme learning machine predicts multiple-objection optimization screen method | |
CN115689008A (en) | CNN-BilSTM short-term photovoltaic power prediction method and system based on ensemble empirical mode decomposition | |
CN114970952A (en) | Photovoltaic output short-term prediction method and system considering environmental factors | |
CN113627674A (en) | Distributed photovoltaic power station output prediction method and device and storage medium | |
CN111105005B (en) | Wind power prediction method | |
CN114781723A (en) | Short-term photovoltaic output prediction method based on multi-model fusion | |
CN112307672A (en) | BP neural network short-term wind power prediction method based on cuckoo algorithm optimization | |
CN111523728A (en) | Four-stage hybrid short-term wind direction prediction method | |
CN117318036A (en) | Ultra-short-term photovoltaic power prediction method based on improved whale optimization algorithm | |
Douiri | A predictive model for solar photovoltaic power based on computational intelligence technique | |
CN113344283B (en) | Energy internet new energy consumption capability assessment method based on edge intelligence |
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 |