CN115345661A - Power price prediction method and system - Google Patents

Power price prediction method and system Download PDF

Info

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
Application number
CN202210976717.4A
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.)
Guangdong Power Grid Co Ltd
Zhaoqing Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Zhaoqing Power Supply Bureau of Guangdong Power Grid 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 Guangdong Power Grid Co Ltd, Zhaoqing Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202210976717.4A priority Critical patent/CN115345661A/en
Publication of CN115345661A publication Critical patent/CN115345661A/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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0206Price or cost determination based on market factors
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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)
  • 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

Power price prediction method and system
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:
Figure BDA0003798745450000021
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 12 ,…,λ 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,
Figure BDA0003798745450000022
d represents the number of singular values of the trajectory matrix X,
Figure BDA0003798745450000023
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 decomposition
Figure BDA0003798745450000024
Divided 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 as
Figure BDA0003798745450000031
The trajectory matrix X is then decomposed into:
Figure BDA0003798745450000032
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 values
Figure BDA0003798745450000033
Calculation of I m Characteristic component of
Figure BDA0003798745450000034
Taking 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, order
Figure BDA0003798745450000035
Wherein,
Figure BDA0003798745450000036
representing the value of the time series element after reconstruction, if L is more than or equal to K, then
Figure BDA0003798745450000037
The reconstructed time series Z = { Z = 1 ,z 2 ,…,z N Denotes as follows:
Figure BDA0003798745450000038
in the formula,
Figure BDA0003798745450000039
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:
Figure BDA0003798745450000041
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:
Figure BDA0003798745450000042
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 position
Figure BDA0003798745450000043
In t +1 iterations, the speed and location update modes of the virtual bat are as follows:
Figure BDA0003798745450000044
Figure BDA0003798745450000045
Figure BDA0003798745450000046
in the formula (f) min Is the minimum frequency, f, of the virtual bat max Is the maximum frequency of the virtual bat,
Figure BDA0003798745450000047
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:
Figure BDA0003798745450000051
in the formula, X t
Figure BDA0003798745450000052
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 step
Figure BDA0003798745450000053
And 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 formula
Figure BDA0003798745450000054
And r i
Figure BDA0003798745450000055
Figure BDA0003798745450000056
r i Represents the pulse emission frequency of the ith bat,
Figure BDA0003798745450000057
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:
Figure BDA0003798745450000058
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):
Figure BDA0003798745450000059
Figure BDA00037987454500000510
in the formula,
Figure BDA00037987454500000511
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:
Figure BDA0003798745450000081
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 12 ,…,λ 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,
Figure BDA0003798745450000082
d is the number of singular values of the matrix X, d represents the number of singular values of the trajectory matrix X,
Figure BDA0003798745450000083
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 values
Figure BDA0003798745450000084
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 matrix X I Is defined as
Figure BDA0003798745450000085
The trajectory matrix X is then decomposed into:
Figure BDA0003798745450000086
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 values
Figure BDA0003798745450000091
Calculating 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, order
Figure BDA0003798745450000092
Wherein,
Figure BDA0003798745450000093
representing the value of the time series element after reconstruction, if L is more than or equal to K, then
Figure BDA0003798745450000094
The reconstructed time series Z = { Z = 1 ,z 2 ,…,z N Denotes as follows:
Figure BDA0003798745450000095
in the formula,
Figure BDA0003798745450000096
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:
Figure BDA0003798745450000101
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:
Figure BDA0003798745450000102
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 position
Figure BDA0003798745450000103
In t +1 iterations, the speed and position of the virtual bat are updated as follows:
Figure BDA0003798745450000104
Figure BDA0003798745450000105
Figure BDA0003798745450000106
in the formula (f) min Is the minimum frequency, f, of the virtual bat max Is the maximum frequency of the virtual bat,
Figure BDA0003798745450000107
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:
Figure BDA0003798745450000108
in the formula, X t
Figure BDA0003798745450000109
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 step
Figure BDA0003798745450000111
And 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 formula
Figure BDA0003798745450000112
And r i
Figure BDA0003798745450000113
Figure BDA0003798745450000114
r i Represents the pulse emission frequency of the ith bat,
Figure BDA0003798745450000115
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:
Figure BDA0003798745450000116
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):
Figure BDA0003798745450000117
Figure BDA0003798745450000118
in the formula,
Figure BDA0003798745450000119
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:
Figure FDA0003798745440000011
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 12 ,…,λ 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,
Figure FDA0003798745440000012
d represents the number of singular values of the trajectory matrix X,
Figure FDA0003798745440000013
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 decomposition
Figure FDA0003798745440000014
Divided 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 as
Figure FDA0003798745440000021
The trajectory matrix X is then decomposed into:
Figure FDA0003798745440000022
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 values
Figure FDA0003798745440000023
ComputingI m Characteristic component of
Figure FDA0003798745440000029
The 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, order
Figure FDA0003798745440000024
Wherein,
Figure FDA0003798745440000025
representing the value of the time series element after reconstruction, if L is more than or equal to K, then
Figure FDA0003798745440000026
The reconstructed time series Z = { Z = { (Z) } 1 ,z 2 ,…,z N Denotes as follows:
Figure FDA0003798745440000027
in the formula,
Figure FDA0003798745440000028
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
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:
Figure FDA0003798745440000031
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:
Figure FDA0003798745440000032
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 position
Figure FDA0003798745440000033
In t +1 iterations, the speed and location update modes of the virtual bat are as follows:
Figure FDA0003798745440000034
Figure FDA0003798745440000035
Figure FDA0003798745440000036
in the formula (f) min Is the minimum frequency, f, of the virtual bat max Is the maximum frequency of the virtual bat,
Figure FDA0003798745440000037
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:
Figure FDA0003798745440000041
in the formula, X t
Figure FDA0003798745440000042
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 step
Figure FDA0003798745440000043
And 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 formula
Figure FDA0003798745440000044
And r i
Figure FDA0003798745440000045
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):
Figure FDA0003798745440000046
Figure FDA0003798745440000047
in the formula,
Figure FDA0003798745440000048
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.
CN202210976717.4A 2022-08-15 2022-08-15 Power price prediction method and system Pending CN115345661A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (3)

* Cited by examiner, † Cited by third party
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