CN115809725A - Multi-factor short-term electric quantity prediction method and device - Google Patents

Multi-factor short-term electric quantity prediction method and device Download PDF

Info

Publication number
CN115809725A
CN115809725A CN202211448402.9A CN202211448402A CN115809725A CN 115809725 A CN115809725 A CN 115809725A CN 202211448402 A CN202211448402 A CN 202211448402A CN 115809725 A CN115809725 A CN 115809725A
Authority
CN
China
Prior art keywords
factor
electric quantity
sequence
matrix
historical
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
CN202211448402.9A
Other languages
Chinese (zh)
Inventor
郑欢
荀超
刘林
肖芬
黄世诚
曾伟薇
涂夏哲
黄夏楠
杨丝雨
张敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Fujian Electric Power Co Ltd
Economic and Technological Research Institute of State Grid Fujian Electric Power Co Ltd
Original Assignee
State Grid Fujian Electric Power Co Ltd
Economic and Technological Research Institute of State Grid Fujian Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Fujian Electric Power Co Ltd, Economic and Technological Research Institute of State Grid Fujian Electric Power Co Ltd filed Critical State Grid Fujian Electric Power Co Ltd
Priority to CN202211448402.9A priority Critical patent/CN115809725A/en
Publication of CN115809725A publication Critical patent/CN115809725A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a multi-factor short-term electric quantity prediction method and a multi-factor short-term electric quantity prediction device, which can fully extract effective information in other factors by aligning sequence of other factor sequences and a historical electric quantity sequence, thereby improving the electric quantity prediction precision and reducing the model training difficulty.

Description

Multi-factor short-term electric quantity prediction method and device
Technical Field
The invention relates to the technical field of electric power big data, in particular to a multi-factor short-term electric quantity prediction method and device.
Background
The load/electric quantity prediction of the power system has important significance for guiding power supply construction planning, reasonably arranging a scheduling plan and improving the economical efficiency of system operation. In recent years, scholars at home and abroad put forward various theories and methods for electric quantity prediction, and the models can be classified according to different standards.
These models can be classified into single models and combined models according to model structures. Common single models include autoregressive moving average models, back propagation neural networks, support vector regression, and the like. Each single model has its advantages, as well as limitations. The combined model integrates various models and algorithms, the limitation and the defect of a single model are overcome, and the prediction accuracy and the stability of the combined model are obviously superior to those of the single model. The combined models can be further classified, the first type of combined model adopts a plurality of models to respectively predict the electric quantity, and then the prediction results of the models are weighted to obtain the final prediction result. The original charge quantity sequence is usually a broadband signal with unstable future trend, and the narrowband signal usually has smooth future trend and is easier to predict. Therefore, the second type of combined model firstly decomposes the electric quantity into a plurality of narrow-band modal components through a signal decomposition algorithm, carries out prediction respectively, and finally superposes the prediction results of the components to obtain the final prediction result. Common modal Decomposition methods include Wavelet Transform (WT), empirical Mode Decomposition (EMD), variational Mode Decomposition (VMD), or variants. For example, the data sequence is decomposed by a VMD algorithm, and then a differential autoregressive moving average model and a depth belief network are adopted to respectively predict the low-frequency subsequence and the high-frequency subsequence.
The traditional electric quantity prediction model predicts the future electric quantity only based on historical electric quantity data, namely, the single-factor electric quantity prediction model ignores the coupling relation between other factors such as temperature, humidity, air pressure and wind speed and the electric quantity. Therefore, other factors are introduced into the electric quantity prediction process by partial scholars, a multi-factor electric quantity prediction model is established, the multi-factor electric quantity prediction model relates to more complex variable relations, the modeling and learning difficulty is high, and higher requirements are provided for the prediction model.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a multi-factor short-term electric quantity prediction method and device reduce difficulty of model establishment and improve electric quantity prediction accuracy.
In order to solve the technical problems, the invention adopts the technical scheme that:
a multi-factor short-term electric quantity prediction method comprises the following steps:
acquiring a historical electric quantity sequence and other influence factor sequences related to the historical electric quantity sequence;
decomposing multiple groups of narrow-band modes of the historical electric quantity sequence through a variation mode decomposition algorithm to form a mode component matrix;
aligning the other factor sequences with the historical electric quantity sequence to form other factor matrixes;
splicing the modal component matrix and the other factor matrixes to obtain a factor matrix;
constructing a mapping relation among the factor matrix, the modal component matrix and the future electric quantity sequence through a preset model;
and outputting the predicted electric quantity according to the historical electric quantity sequence and the mapping relation.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a multi-factor short-term power prediction apparatus comprises a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the multi-factor short-term power prediction method.
The invention has the beneficial effects that: the method has the advantages that effective information in other factors can be fully extracted by aligning the sequence of other factor sequences with the sequence of historical electric quantity, further electric quantity prediction precision is improved, model training difficulty is reduced, meanwhile, the historical electric quantity sequence is decomposed by adopting a variational modal decomposition algorithm, the method is more beneficial to extracting the relation between modal components and electric quantity to be predicted by a model, the modal component matrix is spliced with other factor matrices to obtain a factor matrix, and the mapping relation between the factor matrix and the modal component matrix and the future electric quantity sequence is constructed, so that the correlation relation between the historical electric quantity sequence and other factor sequences and the modal component of the historical electric quantity can be effectively captured, the electric quantity prediction precision is improved while the difficulty in model construction is reduced.
Drawings
Fig. 1 is a flowchart illustrating steps of a multi-factor short-term power prediction method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a historical electric quantity sequence decomposition of a multi-factor short-term electric quantity prediction method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a decomposition result of a historical electric quantity sequence of a multi-factor short-term electric quantity prediction method according to an embodiment of the present invention;
FIG. 4 is a sequence alignment diagram illustrating a multi-factor short-term power prediction method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a MIC-VMD-MTF model of a multi-factor short-term electric quantity prediction method according to an embodiment of the present invention;
FIG. 6 is a diagram of an M-Transformer model architecture of a multi-factor short-term power prediction method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating a comparison between a multi-head variable-dependent attentive power mechanism and a multi-head attentive power mechanism of a multi-factor short-term power prediction method according to an embodiment of the present invention;
fig. 8 is a schematic diagram illustrating MIC values of wind speed factors and historical electric quantity sequences at different relative delays in a multi-factor short-term electric quantity prediction method according to an embodiment of the present invention;
fig. 9 is a schematic diagram of MIC values of the dew point temperature factor and the historical electric quantity sequence under different relative delays of the multi-factor short-term electric quantity prediction method in the embodiment of the present invention;
fig. 10 is a schematic diagram illustrating MIC values of air pressure factors and historical electric quantity sequences at different relative delays in a multi-factor short-term electric quantity prediction method according to an embodiment of the present invention;
fig. 11 is a schematic diagram illustrating MIC values of humidity factors and historical electric quantity sequences at different relative delays in a multi-factor short-term electric quantity prediction method according to an embodiment of the present invention;
fig. 12 is a schematic diagram illustrating MIC values of temperature factors and historical electric quantity sequences at different relative delays in a multi-factor short-term electric quantity prediction method according to an embodiment of the present invention;
FIG. 13 is a comparison graph of the MIC-VMD-MTF model of the multi-factor short-term electric quantity prediction method in the embodiment of the present invention and the prediction curves and the real electric quantity curves of the models in the prior art;
fig. 14 is a comparison graph of a predicted curve and a real electric quantity curve in different sequence alignment manners of the multi-factor short-term electric quantity prediction method in the embodiment of the present invention;
fig. 15 is a schematic diagram illustrating a performance improvement index of a multi-factor short-term power prediction method according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of a multi-factor short-term power prediction apparatus according to an embodiment of the present invention.
Detailed Description
In order to explain the technical contents, the objects and the effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, a multi-factor short-term power prediction method includes the steps of:
acquiring a historical electric quantity sequence and other influence factor sequences related to the historical electric quantity sequence;
decomposing multiple groups of narrow-band modes of the historical electric quantity sequence by a variational mode decomposition algorithm to form a mode component matrix;
aligning the other factor sequences with the historical electric quantity sequence to form other factor matrixes;
splicing the modal component matrix and the other factor matrixes to obtain a factor matrix;
constructing a mapping relation among the factor matrix, the modal component matrix and the future electric quantity sequence through a preset model;
and outputting the predicted electric quantity according to the historical electric quantity sequence and the mapping relation.
As can be seen from the above description, the beneficial effects of the present invention are: the method has the advantages that effective information in other factors can be fully extracted by aligning the sequence of other factors with the sequence of historical electric quantity, so that the electric quantity prediction precision is improved, the model training difficulty is reduced, meanwhile, the historical electric quantity sequence is decomposed by adopting a variational modal decomposition algorithm, the method is more beneficial to extracting the relation between modal components and electric quantity to be predicted by the model, the modal component matrix is spliced with other factor matrixes to obtain the factor matrix, and the mapping relation between the factor matrix and the modal component matrix and the future electric quantity sequence is constructed, so that the correlation relation between the historical electric quantity sequence and other factor sequences and the modal component of the historical electric quantity can be effectively captured, the electric quantity prediction precision is improved while the difficulty in establishing the low model is realized.
Further, the aligning the sequence of other factors with the sequence of historical electric quantities includes:
determining a starting point of the historical electric quantity sequence;
translating the other factor sequences at the starting point of the historical electric quantity sequence, and calculating the maximum information coefficient between the other factor sequences and the historical electric quantity sequence;
determining the starting point of the other factor sequences according to the maximum information coefficient;
obtaining the relative delay between the other factor sequences and the historical electric quantity sequence according to the maximum information coefficient;
and performing sequence alignment on the other factor sequences and the historical electric quantity sequence according to the relative delay.
According to the description, the starting points of the historical electric quantity sequences are fixed, the maximum information coefficients between the other factor sequences and the historical electric quantity sequences are calculated while the other factor sequences are translated, so that the starting points of the other factor sequences are determined, the other factor sequences can be aligned with the historical electric quantity sequences, splicing in the subsequent process is facilitated, and splicing accuracy is improved.
Further, before the sequence alignment of the other factor sequence and the historical electric quantity sequence according to the relative delay, the method further includes:
and screening the other factor sequences according to the maximum information coefficient, and eliminating the factor sequences with the maximum information coefficient smaller than a preset value.
According to the description, the other factor sequences are screened through the maximum information coefficient, and the factor sequences with small correlation with the historical electric quantity sequences are removed, so that the correlation between the other factor sequences and the historical electric quantity sequences is ensured, and the accuracy of the electric quantity prediction result is improved.
Further, the preset model comprises an encoding stack and a decoding stack;
the method for constructing the mapping relation among the factor matrix, the modal component matrix and the future electric quantity sequence through the preset model comprises the following steps:
inputting the factor matrix and the modal component matrix into the coding stack respectively;
the coding stack processes the factor matrix and the modal component based on a variable correlation attention mechanism to obtain the mapping relation;
the outputting the predicted electric quantity according to the historical electric quantity sequence and the mapping relation comprises:
and respectively inputting the mapping relation and the historical electric quantity sequence into the decoding stack to obtain the predicted electric quantity.
According to the description, the coding stack processes the factor matrix and the modal component based on a variable correlation attention mechanism, and can effectively improve the correlation between other factors and the modal component in the factor matrix, so that the model prediction accuracy is improved.
Further, the inputting the factor matrix and the modal component matrix into the encoding stack respectively comprises:
reconstructing the modal component matrix to obtain electric quantity data;
and inputting the factor matrix and the electric quantity data into the coding stack.
According to the above description, the electric quantity data is obtained by reconstructing the modal component matrix, so that the input electric quantity data and the modal component in the factor matrix form different data, and data collision is avoided.
Further, the constructing of the mapping relationship among the factor matrix, the modal component matrix, and the future electric quantity sequence through the preset model includes:
Figure BDA0003950360580000061
in the formula, x f =[x i ,...,x i+L-1 ]Representing a future electrical quantity sequence, whereinL =1 indicates that single-step prediction is performed, otherwise, multi-step prediction is performed;
Figure BDA0003950360580000062
is other factor matrix, n represents the nth other factor segment;
Figure BDA0003950360580000063
k represents the k-th modal component, which is a modal component matrix;
Figure BDA0003950360580000064
as a function of the modal components and other factors and the future electrical quantities.
According to the description, the mapping relation among the factor matrix, the modal component matrix and the future electric quantity sequence is constructed, so that the future electric quantity sequence can be accurately predicted through the mapping relation and the historical electric quantity sequence.
Further, the splicing the modal component matrix and the other factor matrices to obtain the factor matrix includes:
Figure BDA0003950360580000071
wherein, the first k rows of the factor matrix correspond to k narrow-band modal components decomposed by a variational modal decomposition algorithm; the last n rows correspond to the n other factor components, τ, after sequence alignment n A delay related parameter representing the nth other factor.
According to the description, the integration of the historical electric quantity sequence and other influence factor sequences is realized by splicing the narrow-band modal components and other factor components to form the factor matrix.
Further, the forming a modal component matrix by decomposing the plurality of groups of narrow-band modes of the historical electric quantity sequence through a variation modal decomposition algorithm includes:
generating a variation modal decomposition model according to a preset constraint condition;
decomposing the historical electric quantity sequence according to the variation modal decomposition model to obtain a plurality of groups of narrow-band modes and a group of residual components;
forming the modal component matrix from the plurality of sets of narrow-band modes and the residual components.
According to the description, the historical electric quantity sequence is decomposed through the variation modal decomposition model, and the historical electric quantity sequence is divided into multiple groups of modal components, so that the precision of the short-term electric quantity prediction result can be effectively improved.
Further, the forming the modal component matrix from the sets of narrow-band modes and the residual components comprises:
performing noise reduction processing on the residual component by calculating permutation entropy;
and forming the modal component matrix by the residual components after noise reduction processing and the narrow-band modes.
According to the above description, the residual component is subjected to noise reduction processing by calculating the permutation entropy, and a modal component matrix is formed according to the residual component and the narrow-band mode, so that each data in the historical electric quantity sequence is effectively utilized.
Referring to fig. 16, another embodiment of the present invention provides a multi-factor short-term power prediction apparatus, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the multi-factor short-term power prediction method.
The multi-factor short-term power forecasting method and device can forecast the short-term power of the power grid by combining other factors such as temperature, humidity, air pressure and wind speed, and the following description is given by a specific embodiment:
example one
Referring to fig. 1, a method for predicting multi-factor short-term power includes the steps of:
s1, acquiring a historical electric quantity sequence and other influence factor sequences related to the historical electric quantity sequence; if the historical electric quantity sequence is recorded as: x is the number of h =[x i-P ,...,x i-1 ](ii) a The other influence factor sequences are recorded as:
Figure BDA0003950360580000081
wherein n represents the historical sequence of the nth factor, such as n =1 for wind speed, n =2 for dew point temperature, and n =3 for barometric pressure;
s2, decomposing multiple groups of narrow-band modes of the historical electric quantity sequence through a variational mode decomposition algorithm to form a mode component matrix, wherein the modal component matrix comprises the following steps:
referring to fig. 2, S21, generating a variational modal decomposition model according to a preset constraint condition, specifically:
the variational modal decomposition algorithm (VMD) seeks k modal functions u on the premise that the input signal g (t) is equal to the sum of the components k So that the sum of the estimated bandwidths of each mode is minimized, the construction variation problem is as follows:
Figure BDA0003950360580000082
in the formula u k (t) is a mode function, ω k Calculating the central frequency of the modes, the number of k modes, delta, and a convolution operator; g (t) is an input signal, namely the historical electric quantity sequence x h =[x i-P ,...,x i-1 ]As the input signal input;
by introducing a secondary penalty factor alpha and a Lagrangian multiplier lambda (t), the constraint variation problem in the above formula is changed into an unconstrained variation problem, namely:
Figure BDA0003950360580000091
VMD adopts the method of alternative direction of multiplication operator, namely, by alternatively updating
Figure BDA0003950360580000092
And
Figure BDA0003950360580000093
finding a saddle point of an extended Lagrange expression, wherein the saddle point is the optimal solution u of the variational problem k (t); wherein u is k (t)、ω k The iterative formula for the Fourier transform of λ (t) is:
Figure BDA0003950360580000094
Figure BDA0003950360580000095
Figure BDA0003950360580000096
in the formula, eta is the noise tolerance;
VMD-decomposed sets of said narrow-band modes (IMFs) and a set of residual components (RF) denoised by computing a permutation entropy; forming the modal component matrix by the residual components after the noise reduction and the narrow-band modes, namely finally obtaining k modal components
Figure BDA0003950360580000097
Obtaining a modal component matrix:
Figure BDA0003950360580000098
in the above formula, each row of the matrix corresponds to a modal component sequence, and
Figure BDA0003950360580000099
represents, i.e.:
Figure BDA00039503605800000910
referring to fig. 3, a VMD-based electrical quantity decomposition result diagram is obtained, the VMD algorithm is used to decompose the historical electrical quantity sequence, and multiple experiments determine that the number K of modes is 6, so that the electrical quantity sequence is decomposed into 6 intrinsic narrow-band modal components (IMF) and a residual component (RF);
s3, aligning the other factor sequences with the historical electric quantity sequence to form other factor matrixes, specifically:
referring to fig. 4, S31, determining a starting point of the historical electric quantity sequence; fixing the starting point of the historical electric quantity sequence, and setting a translation search window and a Maximum Information Coefficient (MIC) threshold;
s32, translating the other factor sequences at the starting point of the historical electric quantity sequence, and calculating the maximum information coefficient between the other factor sequences and the historical electric quantity sequence; recording the maximum MIC value in the search window;
s33, determining the starting point of the other factor sequences according to the maximum information coefficient; meanwhile, screening the other factor sequences according to the maximum information coefficient, and eliminating the factor sequences of which the maximum information coefficient is smaller than a preset value; taking the time corresponding to the maximum MIC value as a new starting point of other factor sequences, and if the maximum MIC value between the factor sequence and the historical electric quantity sequence is smaller than a given threshold value, rejecting the factor;
s34, obtaining the relative delay between the other factor sequences and the historical electric quantity sequence according to the maximum information coefficient, and performing sequence alignment on the other factor sequences and the historical electric quantity sequence according to the relative delay to form other factor matrixes:
Figure BDA0003950360580000101
wherein, tau n A delay related parameter representing an nth factor;
the calculation of the maximum information coefficient is realized based on mutual information theory and grid division, the mutual information is an index for measuring the correlation degree between variables, and the given variable A = { a = (a) =) 1 ,…,a n } and B = { B = 1 ,…,b n N is a sample number, in this example, the variable a may be the historical electric quantity sequence, and the variable B may be the other influencing factor sequence including elements such as wind speed factor, temperature factor, etc., and the mutual information thereof may be calculated by the following formula:
Figure BDA0003950360580000102
in the above formula, p (a, B) is the joint probability density of A and B, and p (a) and p (B) are the edge probability densities of A and B, respectively;
let D = { (a) i ,b i ) I =1,.. N } is a finite binary data set, a grid G with the size of m × n is defined, a value range of a variable A is divided into p sections, a value range of B is divided into q sections, mutual information in each grid is calculated, the grid division mode with the same p × q is not unique, and the maximum value of I (A, B) in different division modes is taken as the mutual information value of the divided G; defining the maximum mutual information formula of D under the division G as follows:
I * (D,p,q)=maxI(D|G)
in the above formula, D | G represents that data D is divided by G, and the maximum I values of all division modes are normalized to obtain a feature matrix M (D) p,q
Figure BDA0003950360580000111
The Maximum Information Coefficient (MIC) is defined as:
Figure BDA0003950360580000112
in the above formula, B (n) is an upper limit value of the trellis division p × q;
s4, splicing the modal component matrix with the other factor matrixes to obtain a factor matrix:
Figure BDA0003950360580000113
wherein, k rows in front of the factor matrix correspond to k narrow-band modal components decomposed by a variational modal decomposition algorithm; the last n rows correspond to n other factor components after sequence alignment;
s5, constructing a mapping relation among the factor matrix, the modal component matrix and the future electric quantity sequence through a preset model, wherein the mapping relation can be expressed as:
Figure BDA0003950360580000114
in the formula, x f =[x i ,...,x i+L-1 ]Representing a future electric quantity sequence, wherein L =1 represents that single-step prediction is carried out, otherwise, multi-step prediction is carried out;
Figure BDA0003950360580000115
the other factor matrix is n, and n represents the nth other factor segment;
Figure BDA0003950360580000116
is a modal component matrix, k represents the k-th modal component;
Figure BDA0003950360580000121
as a function of the modal components and other factors as a function of the future electrical quantity
S6, outputting predicted electric quantity according to the historical electric quantity sequence and the mapping relation; namely, the historical electric quantity sequence is input into the mapping relation to obtain the final predicted electric quantity.
Example two
The embodiment specifically defines the structure of the electric quantity preset model;
referring to fig. 5, a pre-set electric quantity model (MIC-VMD-MTF) includes MIC-based sequence alignment and factor selection, VMD-based historical electric quantity decomposition, and M-Transformer model-based electric quantity prediction model; the M-Transformer model electric quantity prediction model is a multi-factor electric quantity prediction model obtained by modifying the structure of the Transformer model; performing MIC-based sequence alignment and factor selection, namely performing a step of performing sequence alignment between other factor sequences and the historical electric quantity sequence in embodiment one; the historical electric quantity decomposition based on the VMD executes a plurality of groups of narrow-band modes of the historical electric quantity sequence decomposition in the first embodiment; the step of constructing a mapping relation is executed based on the M-Transformer model, and predicted electric quantity is output; the MIC-VMD-MTF performs the following steps:
processing other factor data by adopting a sequence alignment and factor selection module to generate other factor matrixes; meanwhile, decomposing the electric quantity sequence into a plurality of narrow-band modes by adopting a VMD algorithm and further generating a mode component matrix; then, splicing the other factor matrixes and the modal component matrix to obtain a factor matrix; meanwhile, reconstructing the modal component matrix to obtain electric quantity data; finally, simultaneously inputting the factor matrix and the electric quantity data subjected to noise reduction into an M-Transformer model, wherein a variable related attention mechanism in the M-Transformer model is responsible for searching and learning a related relation between the factor matrix and the electric quantity data, and further completing electric quantity prediction;
the transform model consists of an input layer, an encoding stack, a decoding stack and an output layer, wherein the input layer comprises a word embedding encoding module and a position encoding module, the word embedding encoding module converts an input word into a vector which can be calculated, and the position encoding module embeds position information into an input sequence; the coding stack is formed by stacking a plurality of coders and is responsible for coding input information and generating an intermediate vector as the input of the decoding stack, each coder is formed by a multi-head attention mechanism module and a feedforward neural network module, the decoding stack is formed by stacking a plurality of decoders and is responsible for decoding the input information, each decoder is formed by a mask multi-head attention mechanism module, a multi-head attention mechanism module and a feedforward neural network module, in addition, residual connection and normalization operations are added between the modules of the coder and the decoder, a linear connection layer module maps the output of the decoding stack into a vector with a fixed dimension at an output layer, and an activation function converts the vector into probability;
the M-Transformer model is a multi-factor electric quantity prediction model obtained by modifying the structure of the Transformer model, and specifically comprises the following steps:
referring to fig. 6, the input layer replaces the original word embedding coding module with a full-connection neural network so that time series data can be directly input; the input layer of the coding stack comprises two parallel input modules which are respectively used for inputting the factor matrix and the modal component matrix;
in a first encoder of an encoding stack, a multi-head attention mechanism module is improved into a multi-head variable correlation attention mechanism, and the multi-head variable correlation attention mechanism is used for estimating other factor sequences and variable correlation between electric quantity components and electric quantity sequences;
the decoder adopts a multi-head attention mechanism to replace a mask multi-head attention mechanism; the reason is that the decoding stack inputs single electric quantity data and does not relate to information of a later sequence;
an output layer, which adopts a full-connection neural network to replace the structure of the original output layer, directly maps the output of the coding stack into an electric quantity prediction result and finally forms an MTF model;
referring to fig. 7, in which a query matrix Q, a key matrix K and a value matrix V of the multi-head attention mechanism in the transform model are all from the same input, such a structure can deeply mine the internal correlation of input data, but cannot obtain the correlation relationship between variables; the key matrix and the value matrix in the multi-head variable correlation attention mechanism are from the same input, and the query matrix is the other input; the output of the ith Head of the multi-Head variable correlation attention mechanism is as follows:
Figure BDA0003950360580000131
Figure BDA0003950360580000132
weight matrixes corresponding to the query matrix Q, the key matrix K and the value matrix V in the ith Head respectively, wherein the weight matrixes can be used for converting the query matrix Q, the key matrix K and the value matrix V into the weight matrixes
Figure BDA0003950360580000133
As a weight matrix, then
Figure BDA0003950360580000141
Rewritable as follows:
Figure BDA0003950360580000142
EXAMPLE III
The embodiment verifies the model provided by the prior art and the MIC-VMD-MTF model provided by the embodiment through specific examples;
collecting power consumption data from 1 month and 1 day to 24 months and 8 months in 2022, wherein the data acquisition time interval is 24h, and the total amount of the data is 5350;
please refer to fig. 8-12, which are schematic diagrams of MIC values of various factors and electric quantities under different relative delays; as can be seen from the figure, the electric quantity has strong time-varying property, and the correlation with other factors also has strong time-varying property; irrelevant or redundant factors can be effectively filtered when the maximum MIC value is 0.5; as can be seen from the graph, the change of the electric quantity has a large correlation with the change of the temperature, the air pressure and the dew point temperature, and has a small correlation with the wind speed and the humidity, so that the wind speed and the humidity are eliminated;
taking the last 200 data of the 5350 data as a test set, and taking the rest data as a training set for training;
selecting a back propagation neural network (BP), a Least Squares Support Vector Machine (LSSVM) and a long-short term memory network (LSTM) as a comparison model of the MIC-VMD-MTF model in the embodiment; selecting the average absolute error (MAE), the Root Mean Square Error (RMSE) and the average absolute percentage error (MAPE) as evaluation indexes, wherein the expressions are as follows:
Figure BDA0003950360580000143
Figure BDA0003950360580000144
Figure BDA0003950360580000145
in the above formula, N is the predicted electric quantity segment length,
Figure BDA0003950360580000151
as the actual amount of electricity is,
Figure BDA0003950360580000152
to predict the amount of electricity;
referring to fig. 13, a comparison graph of the predicted curve and the actual electric quantity curve of each model is shown, and the predicted performance result is shown in table 1;
TABLE 1
Figure BDA0003950360580000153
As can be seen from fig. 13 and table 1, the average absolute error, the root mean square error, and the average absolute percentage error of the MIC-VMD-MTF model in this embodiment are all lower than those of the existing model, and have a better electric quantity prediction effect;
comparative example No. two
In order to explain the function of the MIC-based sequence alignment and variable selection module in the model of the embodiment, the group of the embodiment has 3 models, namely an S-VMD-MTF without considering other factors, an M-VMD-MTF without performing sequence alignment and variable selection operation on other input factors and the model of the embodiment; referring to fig. 14, a comparison graph of a prediction curve and a real electric quantity curve in different sequence alignment modes is shown, and prediction errors are shown in table 2;
TABLE 2
Figure BDA0003950360580000154
As can be seen from Table 2, the average absolute error, the root mean square error and the average absolute percentage error of the MIC-VMD-MTF model in the embodiment are all lower than those of the existing model, and the electric quantity prediction effect is better;
in order to better evaluate the improvement effect of the MIC-VMD-MTF model compared with other prediction models, the following formula is adopted as an evaluation index:
Figure BDA0003950360580000155
in the formula I index The performance improvement index is a performance improvement index, the effect improvement of the model is more obvious when the value is larger, and the maximum value is 1; e p An error value for the text model; e o Error values for the reference model;
please refer to fig. 15, which is a schematic diagram of performance improvement indexes of the prediction model MIC-VMD-MTF provided in this embodiment relative to other models; as can be seen from fig. 15, the prediction model MIC-VMD-MTF proposed in this embodiment is closer to the actual value, and has a better electric quantity prediction effect.
Example four
A multi-factor short-term power prediction apparatus includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a multi-factor short-term power prediction method as described in the first embodiment or the second embodiment.
In summary, according to the multi-factor short-term electric quantity prediction method and apparatus provided by the present invention, correlation analysis based on MIC aligns other factor sequences with the electric quantity sequence, and on this basis, other factors are screened, and by performing variable selection and sequence alignment on the electric quantity sequence and other factor sequences, effective information can be fully extracted, thereby improving electric quantity prediction accuracy; meanwhile, an original Transformer model is improved, a variable related attention mechanism is provided, the structure of the variable related attention mechanism is suitable for a multi-factor prediction task, a VMD algorithm, an MIC theory and the improved Transformer model are combined, the electric quantity sequence is decomposed through the VMD algorithm, the model is more beneficial to extracting the relation between the modal component and the electric quantity to be predicted, and the variable related attention mechanism can effectively capture the relevant relation between the electric quantity sequence and other factor sequences and historical electric quantity components, so that the key of electric quantity prediction precision is improved, and the short-term electric quantity prediction has excellent performance.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. A multi-factor short-term electric quantity prediction method is characterized by comprising the following steps:
acquiring a historical electric quantity sequence and other influence factor sequences related to the historical electric quantity sequence;
decomposing multiple groups of narrow-band modes of the historical electric quantity sequence through a variation mode decomposition algorithm to form a mode component matrix;
aligning the other factor sequences with the historical electric quantity sequences to form other factor matrixes;
splicing the modal component matrix and the other factor matrixes to obtain a factor matrix;
constructing a mapping relation among the factor matrix, the modal component matrix and the future electric quantity sequence through a preset model;
and outputting the predicted electric quantity according to the historical electric quantity sequence and the mapping relation.
2. The multi-factor short-term power prediction method as claimed in claim 1, wherein the sequence aligning the sequence of other factors with the sequence of historical powers comprises:
determining a starting point of the historical electric quantity sequence;
translating the other factor sequences at the starting point of the historical electric quantity sequence, and calculating the maximum information coefficient between the other factor sequences and the historical electric quantity sequence;
determining the starting point of the other factor sequences according to the maximum information coefficient;
obtaining the relative delay between the other factor sequences and the historical electric quantity sequence according to the maximum information coefficient;
and performing sequence alignment on the other factor sequences and the historical electric quantity sequence according to the relative delay.
3. The method of claim 2, wherein the sequence alignment of the sequence of other factors with the sequence of historical electric quantities according to the relative delays further comprises:
and screening the other factor sequences according to the maximum information coefficient, and eliminating the factor sequences with the maximum information coefficient smaller than a preset value.
4. The multi-factor short-term power prediction method according to claim 1, wherein the predetermined model comprises an encoding stack and a decoding stack;
the method for constructing the mapping relation among the factor matrix, the modal component matrix and the future electric quantity sequence through the preset model comprises the following steps:
inputting the factor matrix and the modal component matrix into the coding stack respectively;
the coding stack processes the factor matrix and the modal component based on a variable correlation attention mechanism to obtain the mapping relation;
the outputting the predicted electric quantity according to the historical electric quantity sequence and the mapping relation comprises:
and respectively inputting the mapping relation and the historical electric quantity sequence into the decoding stack to obtain the predicted electric quantity.
5. The multi-factor short-term power prediction method according to claim 4, wherein the inputting the factor matrix and the modal component matrix into the coding stack respectively comprises:
reconstructing the modal component matrix to obtain electric quantity data;
and inputting the factor matrix and the electric quantity data into the coding stack.
6. The method of claim 1, wherein the constructing the mapping relationship among the factor matrix, the modal component matrix and the future power sequence through the preset model comprises:
Figure FDA0003950360570000021
in the formula, x f =[x i ,...,x i+L-1 ]Representing a future electric quantity sequence, wherein L =1 represents that single-step prediction is carried out, otherwise, multi-step prediction is carried out;
Figure FDA0003950360570000022
the other factor matrix is n, and n represents the nth other factor segment;
Figure FDA0003950360570000023
is a modal component matrix, k represents the k-th modal component;
Figure FDA0003950360570000024
as a function of the modal components and other factors and the future electrical quantity.
7. The method of claim 6, wherein the stitching the modal component matrix with the other factor matrices to obtain a factor matrix comprises:
Figure FDA0003950360570000025
wherein, k rows in front of the factor matrix correspond to k narrow-band modal components decomposed by a variational modal decomposition algorithm; the last n rows correspond to n other factor components, τ, after sequence alignment n A delay related parameter representing the nth other factor.
8. The multi-factor short-term power prediction method according to claim 1, wherein the forming a modal component matrix by decomposing the plurality of sets of narrow-band modes of the historical power sequence through a variational mode decomposition algorithm comprises:
generating a variation modal decomposition model according to a preset constraint condition;
decomposing the historical electric quantity sequence according to the variation modal decomposition model to obtain a plurality of groups of narrow-band modes and a group of residual components;
forming the modal component matrix from the plurality of sets of narrow-band modes and the residual components.
9. The method of claim 8, wherein the forming the modal component matrix from the plurality of sets of narrowband modalities and the residual component comprises:
performing noise reduction processing on the residual component by calculating permutation entropy;
and forming the modal component matrix by the residual components subjected to noise reduction processing and the narrow-band modes.
10. A multi-factor short term power prediction apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of the multi-factor short term power prediction method as claimed in any one of claims 1 to 9.
CN202211448402.9A 2022-11-18 2022-11-18 Multi-factor short-term electric quantity prediction method and device Pending CN115809725A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211448402.9A CN115809725A (en) 2022-11-18 2022-11-18 Multi-factor short-term electric quantity prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211448402.9A CN115809725A (en) 2022-11-18 2022-11-18 Multi-factor short-term electric quantity prediction method and device

Publications (1)

Publication Number Publication Date
CN115809725A true CN115809725A (en) 2023-03-17

Family

ID=85483531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211448402.9A Pending CN115809725A (en) 2022-11-18 2022-11-18 Multi-factor short-term electric quantity prediction method and device

Country Status (1)

Country Link
CN (1) CN115809725A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116776228A (en) * 2023-08-17 2023-09-19 合肥工业大学 Power grid time sequence data decoupling self-supervision pre-training method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116776228A (en) * 2023-08-17 2023-09-19 合肥工业大学 Power grid time sequence data decoupling self-supervision pre-training method and system
CN116776228B (en) * 2023-08-17 2023-10-20 合肥工业大学 Power grid time sequence data decoupling self-supervision pre-training method and system

Similar Documents

Publication Publication Date Title
CN111860982A (en) Wind power plant short-term wind power prediction method based on VMD-FCM-GRU
CN111027772B (en) Multi-factor short-term load prediction method based on PCA-DBILSTM
CN112418482B (en) Cloud computing energy consumption prediction method based on time series clustering
CN111861013B (en) Power load prediction method and device
CN107292446B (en) Hybrid wind speed prediction method based on component relevance wavelet decomposition
CN112434848B (en) Nonlinear weighted combination wind power prediction method based on deep belief network
CN114239718B (en) High-precision long-term time sequence prediction method based on multi-element time sequence data analysis
CN113988477A (en) Photovoltaic power short-term prediction method and device based on machine learning and storage medium
CN114611792A (en) Atmospheric ozone concentration prediction method based on mixed CNN-Transformer model
CN112434891A (en) Method for predicting solar irradiance time sequence based on WCNN-ALSTM
CN116307291B (en) Distributed photovoltaic power generation prediction method and prediction terminal based on wavelet decomposition
CN115809725A (en) Multi-factor short-term electric quantity prediction method and device
CN113361803A (en) Ultra-short-term photovoltaic power prediction method based on generation countermeasure network
CN117148197A (en) Lithium ion battery life prediction method based on integrated transducer model
CN113449919B (en) Power consumption prediction method and system based on feature and trend perception
CN117543544A (en) Load prediction method, device, equipment and storage medium
CN116316600A (en) Wind power day-ahead prediction self-adaptive filtering method based on seasonal typing
CN116596129A (en) Electric vehicle charging station short-term load prediction model construction method
CN116070768A (en) Short-term wind power prediction method based on data reconstruction and TCN-BiLSTM
CN117114160A (en) Short-term photovoltaic power prediction method
CN116911419A (en) Long time sequence prediction method based on trend correlation feature learning
CN116316573A (en) Short-term power load prediction method based on nonstandard Bayesian algorithm optimization
CN115545164A (en) Photovoltaic power generation power prediction method, system, equipment and medium
CN114744618A (en) Deep learning short-term wind power prediction method and system considering meteorological features
CN114638421A (en) Method for predicting requirement of generator set spare parts

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