A multi-factor short-term electricity forecasting method and device
Through variational modal decomposition and sequence alignment technology, combined with the improved Transformer model, the problem of neglecting the coupling relationship of factor in power prediction is solved, and a higher precision power prediction is achieved.
Patent Information
- Application Number
- CN202211448402.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-11-18
AI Technical Summary
The existing power prediction model is based only on historical power data, ignoring the coupling relationship between other factors such as temperature, humidity, air pressure and power, which makes it difficult to establish the model and low prediction accuracy.
The historical power sequence is decomposed into multiple sets of narrowband modes through the variational modal decomposition algorithm, and sequence alignment and splicing are combined with other influencing factor sequences to construct the mapping relationship between the factor matrix and the modal component matrix, and the improved Transformer model is used for power prediction.
It improves the accuracy of battery prediction and the stability of the model, reduces the difficulty of model training, and can effectively capture the correlation between historical battery and other factors.
Smart Images

Figure CN115809725B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power big data, and in particular to a multi-factor short-term electricity quantity prediction method and device. Background Art
[0002] Power system load and power forecasting is crucial for guiding power generation planning, rationalizing dispatching schedules, and improving the economic efficiency of system operations. In recent years, scholars at home and abroad have proposed various power forecasting theories and methods, and these models can be categorized based on different criteria.
[0003] Based on their structure, these models can be divided into single models and combined models. Common single models include the autoregressive moving average model, backpropagation neural network, and support vector regression. Each single model has its advantages and limitations. Combined models, on the other hand, integrate multiple models and algorithms, overcoming the limitations and shortcomings of single models and achieving significantly better prediction accuracy and stability than single models. Combined models can be further categorized. The first type of combined model uses several models to predict electricity consumption separately, then weights the prediction results of each model to produce a final prediction. The original electricity consumption series is typically a broadband signal with unstable future trends, while narrowband signals typically have stable future trends and are easier to predict. Therefore, the second type of combined model first uses a signal decomposition algorithm to decompose the electricity consumption into several narrowband modal components, performs predictions separately, and finally superimposes the predictions of each component to produce the final prediction. Common modal decomposition methods include wavelet transform (WT), empirical mode decomposition (EMD), variational mode decomposition (VMD), or variants. For example, the data sequence is first decomposed using the VMD algorithm, and then the differential autoregressive moving average model and deep belief network are used to predict the low-frequency subsequence and high-frequency subsequence respectively.
[0004] Traditional power forecasting models predict future power consumption based solely on historical power data. These single-factor models ignore the coupling between other factors, such as temperature, humidity, air pressure, and wind speed, and power consumption. Therefore, some researchers have introduced additional factors into the power forecasting process, establishing multi-factor forecasting models. These models involve more complex variable relationships, are more challenging to model and learn, and place higher demands on the forecasting model. Summary of the Invention
[0005] The technical problem to be solved by the present invention is: a multi-factor short-term electricity forecasting method and device, which reduces the difficulty of model establishment and improves the accuracy of electricity forecasting.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] A multi-factor short-term electricity forecasting method includes the following steps:
[0008] Obtaining a historical electricity quantity sequence and a sequence of other influencing factors related to the historical electricity quantity sequence;
[0009] Decomposing the historical power sequence into multiple groups of narrowband modes using a variational mode decomposition algorithm to form a modal component matrix;
[0010] Aligning the other factor sequence with the historical power sequence to form an other factor matrix;
[0011] Concatenating the modal component matrix with the other factor matrices to obtain a factor matrix;
[0012] Constructing a mapping relationship between the factor matrix, the modal component matrix and the future power sequence through a preset model;
[0013] The predicted power is output according to the historical power sequence and the mapping relationship.
[0014] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0015] A multi-factor short-term electricity forecasting device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step of the multi-factor short-term electricity forecasting method described above is implemented.
[0016] The beneficial effects of the present invention are: by aligning other factor sequences with historical electricity sequences, effective information in other factors can be fully extracted, thereby improving the accuracy of electricity prediction and reducing the difficulty of model training. At the same time, the variational modal decomposition algorithm is used to decompose the historical electricity sequence, which is more conducive to the model extracting the relationship between the modal components and the electricity to be predicted, and by splicing the modal component matrix with other factor matrices to obtain the factor matrix, and constructing the mapping relationship between the factor matrix, the modal component matrix and the future electricity sequence, it is possible to effectively capture the correlation between the historical electricity sequence and other factor sequences and the historical electricity modal components, thereby reducing the difficulty of model establishment while improving the accuracy of electricity prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flowchart of the steps of a multi-factor short-term power forecasting method according to an embodiment of the present invention;
[0018] Figure 2A schematic diagram of historical electricity series decomposition of a multi-factor short-term electricity forecasting method according to an embodiment of the present invention;
[0019] Figure 3 This is a schematic diagram of the decomposition results of the historical electricity series of a multi-factor short-term electricity forecasting method according to an embodiment of the present invention;
[0020] Figure 4 Schematic diagram of sequence alignment of a multi-factor short-term electricity forecasting method according to an embodiment of the present invention;
[0021] Figure 5 Schematic diagram of the MIC-VMD-MTF model structure of a multi-factor short-term power forecasting method in an embodiment of the present invention;
[0022] Figure 6 This is a structural diagram of an M-Transformer model of a multi-factor short-term electricity forecasting method according to an embodiment of the present invention;
[0023] Figure 7 Schematic diagram comparing a multi-head variable correlation attention mechanism and a multi-head attention mechanism in a multi-factor short-term power forecasting method according to an embodiment of the present invention;
[0024] Figure 8 Schematic diagram of MIC values of wind speed factors and historical power series under different relative delays in a multi-factor short-term power forecasting method according to an embodiment of the present invention;
[0025] Figure 9 Schematic diagram of the MIC value of the dew point temperature factor and the historical power series under different relative delays in a multi-factor short-term power forecasting method according to an embodiment of the present invention;
[0026] Figure 10 Schematic diagram of MIC values of air pressure factors and historical power series under different relative delays in a multi-factor short-term power forecasting method according to an embodiment of the present invention;
[0027] Figure 11 Schematic diagram of MIC values of humidity factors and historical power series under different relative delays in a multi-factor short-term power forecasting method according to an embodiment of the present invention;
[0028] Figure 12 Schematic diagram of MIC values of temperature factors and historical power series under different relative delays in a multi-factor short-term power forecasting method according to an embodiment of the present invention;
[0029] Figure 13 A comparison chart of the prediction curves and actual power curves of the MIC-VMD-MTF model of a multi-factor short-term power forecasting method in an embodiment of the present invention and various models in the prior art;
[0030] Figure 14 A comparison diagram of the predicted curve and the actual power curve under different sequence alignment modes of a multi-factor short-term power forecasting method in an embodiment of the present invention;
[0031] Figure 15 Schematic diagram of performance improvement index of a multi-factor short-term power forecasting method according to an embodiment of the present invention;
[0032] Figure 16 Schematic diagram of the structure of a multi-factor short-term electricity forecasting device in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.
[0034] Please refer to Figure 1 , a multi-factor short-term electricity forecasting method, comprising the steps of:
[0035] Obtaining a historical electricity quantity sequence and a sequence of other influencing factors related to the historical electricity quantity sequence;
[0036] Decomposing the historical power sequence into multiple groups of narrowband modes using a variational mode decomposition algorithm to form a modal component matrix;
[0037] Aligning the other factor sequence with the historical power sequence to form an other factor matrix;
[0038] Concatenating the modal component matrix with the other factor matrices to obtain a factor matrix;
[0039] Constructing a mapping relationship between the factor matrix, the modal component matrix and the future power sequence through a preset model;
[0040] The predicted power is output according to the historical power sequence and the mapping relationship.
[0041] From the above description, it can be seen that the beneficial effect of the present invention is that: by aligning other factor sequences with historical electricity sequences, effective information in other factors can be fully extracted, thereby improving the accuracy of electricity prediction and reducing the difficulty of model training. At the same time, the variational modal decomposition algorithm is used to decompose the historical electricity sequence, which is more conducive to the model extracting the relationship between the modal components and the electricity to be predicted, and by splicing the modal component matrix with other factor matrices to obtain the factor matrix, and constructing the mapping relationship between the factor matrix, the modal component matrix and the future electricity sequence, it is possible to effectively capture the correlation between the historical electricity sequence and other factor sequences and the historical electricity modal components, thereby reducing the difficulty of model establishment and improving the accuracy of electricity prediction.
[0042] Furthermore, aligning the other factor sequence with the historical power sequence includes:
[0043] Determining a starting point of the historical electricity quantity sequence;
[0044] Shifting the other factor sequence from the starting point of the historical power sequence, and calculating the maximum information coefficient between the other factor sequence and the historical power sequence;
[0045] Determining the starting point of the other factor sequence according to the maximum information coefficient;
[0046] Obtaining a relative delay between the other factor sequence and the historical power sequence according to the maximum information coefficient;
[0047] Sequence alignment is performed on the other factor sequence and the historical power sequence according to the relative delay.
[0048] From the above description, it can be seen that by fixing the starting point of the historical power sequence and calculating the maximum information coefficient between the other factor sequence and the historical power sequence while translating the other factor sequence, the starting point of the other factor sequence can be determined, so that the other factor sequence can be aligned with the historical power sequence, which makes it easier to splice in subsequent processes and improves the splicing accuracy.
[0049] Furthermore, before aligning the other factor sequence with the historical power sequence according to the relative delay, the method further includes:
[0050] The other factor sequences are screened according to the maximum information coefficient, and the factor sequences whose maximum information coefficient is less than a preset value are eliminated.
[0051] From the above description, it can be seen that other factor sequences are screened by the maximum information coefficient, and factor sequences with less correlation with historical power sequences are eliminated, thereby ensuring the correlation between other factor sequences and historical power sequences and improving the accuracy of power forecast results.
[0052] Furthermore, the preset model includes an encoding stack and a decoding stack;
[0053] The mapping relationship between the factor matrix, the modal component matrix and the future power sequence is constructed by using a preset model, including:
[0054] inputting the factor matrix and the modal component matrix into the coding stack respectively;
[0055] The encoding stack processes the factor matrix and the modal component based on a variable-dependent attention mechanism to obtain the mapping relationship;
[0056] Outputting the predicted power according to the historical power sequence and the mapping relationship includes:
[0057] The mapping relationship and the historical power sequence are respectively input into the decoding stack to obtain the predicted power.
[0058] From the above description, it can be seen that the encoding stack processes the factor matrix and modal components based on the variable-related attention mechanism, which can effectively analyze the correlation between other factors in the factor matrix and the modal components, thereby improving the model prediction accuracy.
[0059] Furthermore, the inputting the factor matrix and the modal component matrix into the coding stack respectively includes:
[0060] Reconstructing the modal component matrix to obtain electrical quantity data;
[0061] The factor matrix and the power data are input into the encoding stack.
[0062] From the above description, it can be seen that the power data is obtained by reconstructing the modal component matrix, so that the input power data and the modal components in the factor matrix form different data, thereby avoiding data conflicts.
[0063] Furthermore, the mapping relationship between the factor matrix, the modal component matrix and the future power series is constructed by using a preset model, including:
[0064]
[0065] Where x f =[x i ,...,x i+L-1 ] represents the future electricity sequence, where L = 1 means single-step prediction, otherwise it is multi-step prediction; is the other factor matrix, n represents the nth other factor segment; is the modal component matrix, k represents the kth modal component; It is the mapping function between modal components and other factors and future power.
[0066] From the above description, it can be seen that by constructing the mapping relationship between the factor matrix, the modal component matrix and the future power series, it is possible to accurately predict the future power series through the mapping relationship and the historical power series.
[0067] Furthermore, the modal component matrix is concatenated with the other factor matrices to obtain a factor matrix including:
[0068]
[0069] Among them, the first k rows of the factor matrix correspond to the k narrowband modal components decomposed by the variational mode decomposition algorithm; the last n rows correspond to the n other factor components after sequence alignment, τ n A parameter representing the delay-relatedness of the nth other factor.
[0070] From the above description, it can be seen that by splicing the narrowband modal components and other factor components to form a factor matrix, the historical electricity series and other influencing factor sequences can be integrated.
[0071] Furthermore, the decomposing the historical power series into multiple groups of narrowband modes using a variational mode decomposition algorithm to form a modal component matrix includes:
[0072] Generate a variational mode decomposition model based on preset constraints;
[0073] Decomposing the historical electrical quantity series according to the variational modal decomposition model to obtain a plurality of groups of narrowband modes and a group of residual components;
[0074] The modal component matrix is formed according to a plurality of groups of the narrowband modes and the residual components.
[0075] From the above description, it can be seen that by decomposing the historical electricity series through the variational mode decomposition model and dividing the historical electricity series into multiple groups of modal components, the accuracy of the short-term electricity forecast results can be effectively improved.
[0076] Furthermore, forming the modal component matrix according to the multiple groups of narrowband modes and the residual components includes:
[0077] Performing noise reduction processing on the residual component by calculating permutation entropy;
[0078] The residual component after noise reduction processing and the narrowband mode are combined to form the modal component matrix.
[0079] From the above description, it can be seen that the residual component is denoised by calculating the permutation entropy, and a modal component matrix is formed according to the residual component and the narrowband mode, thereby effectively utilizing each data in the historical power series.
[0080] Please refer to Figure 16 Another embodiment of the present invention provides a multi-factor short-term electricity forecasting device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step in the multi-factor short-term electricity forecasting method described above is implemented.
[0081] The multi-factor short-term power forecasting method and device of the present invention can combine temperature, humidity, air pressure, wind speed and other factors to predict the short-term power of the power grid. The following is an explanation of the specific implementation method:
[0082] Example 1
[0083] Please refer to Figure 1 , a multi-factor short-term electricity forecasting method, comprising the steps of:
[0084] S1. Obtain a historical power sequence and a sequence of other influencing factors related to the historical power sequence; for example, the historical power sequence is recorded as: x h =[x i-P ,...,x i-1 ]; the other influencing factors are recorded as follows: Where 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 air pressure;
[0085] S2. Decomposing the historical power sequence into multiple groups of narrowband modes using a variational modal decomposition algorithm to form a modal component matrix, including:
[0086] Please refer to Figure 2 , S21, generate a variational mode decomposition model according to the preset constraints, specifically:
[0087] The variational mode decomposition (VMD) algorithm is based on the premise that the input signal g(t) is equal to the sum of its components and seeks k modal functions u k , so that the sum of the estimated bandwidth of each mode is minimized, so the variational problem is constructed as follows:
[0088]
[0089] Where u k (t) is the mode function, ω k is the modal center frequency, k is the number of modes, δ is the Dirac function, * is the convolution operator; g(t) is the input signal, that is, the historical power sequence x h =[x i-P ,...,x i-1 ] as the input signal input;
[0090] By introducing the quadratic penalty factor α and the Lagrange multiplication operator λ(t), the constrained variational problem in the above formula is transformed into an unconstrained variational problem, that is:
[0091]
[0092] VMD uses the multiplication operator alternating direction method, that is, by alternating updates and Find the "saddle point" of the extended Lagrangian expression, which is the optimal solution u of the variational problem k (t); where u k (t),ω k The iterative formula for the Fourier transform of and λ(t) is:
[0093]
[0094]
[0095]
[0096] In the above formula, η is the noise tolerance;
[0097] After VMD decomposition, multiple groups of narrowband modes (IMF) and a group of residual components (RF) are obtained. The residual components are denoised by calculating the permutation entropy. The residual components after denoising and the narrowband modes are combined to form the modal component matrix, that is, k modal components are finally obtained. Get the modal component matrix:
[0098]
[0099] In the above formula, each row of the matrix corresponds to a modal component sequence, Indicates that:
[0100]
[0101] Please refer to Figure 3 , is the result diagram of electricity decomposition based on VMD. The historical electricity series is decomposed by the VMD algorithm. After multiple experiments, the number of modes K is determined to be 6. Therefore, the electricity series is decomposed into 6 intrinsic narrowband modal components (IMFs) and one residual component (RF);
[0102] S3. Align the other factor sequence with the historical power sequence to form an other factor matrix. Specifically:
[0103] Please refer to Figure 4 , S31, determining the starting point of the historical power sequence; that is, fixing the starting point of the historical power sequence, and setting a translation search window and a maximum information coefficient (MIC) threshold;
[0104] S32. Shifting the other factor sequence from the starting point of the historical power sequence, and calculating the maximum information coefficient between the other factor sequence and the historical power sequence; and recording the maximum MIC value within the search window;
[0105] S33. Determine the starting point of the other factor sequence based on the maximum information coefficient; at the same time, screen the other factor sequence based on the maximum information coefficient, and eliminate the factor sequence whose maximum information coefficient is less than a preset value; that is, use the moment corresponding to the maximum MIC value as the "new starting point" of the other factor sequence, and if the maximum MIC value between the factor sequence and the historical power sequence is less than a given threshold, eliminate the factor;
[0106] S34. Obtain a relative delay between the other factor sequence and the historical power sequence based on the maximum information coefficient, and align the other factor sequence with the historical power sequence based on the relative delay to form the other factor matrix:
[0107]
[0108] Among them, τ n represents the delay-related parameter of the nth factor;
[0109] The calculation of the maximum information coefficient is based on mutual information theory and grid division. Mutual information is an indicator that measures the degree of correlation between variables. For a given variable A = {a1,…,a n} and B={b1,…,b n}, n is the number of samples. For example, in this example, variable A can be the historical power sequence, and variable B can be the sequence of other influencing factors including wind speed factors, temperature factors, and other elements. Their mutual information can be calculated by the following formula:
[0110]
[0111] In the above formula, p(a,b) is the joint probability density of A and B, p(a) and p(b) are the marginal probability densities of A and B respectively;
[0112] Let D = {(a i ,b i ), i = 1, ..., n} is a finite binary data set. Define a grid G of size m × n. Divide the value range of variable A into p segments and the value range of B into q segments. Calculate the mutual information within each grid. The same p × q grid division method is not unique. The maximum value of I(A, B) in different division methods is taken as the mutual information value of the division G. Define the maximum mutual information formula of D under the division G as:
[0113] I * (D,p,q)=maxI(D|G)
[0114] In the above formula, D|G means that the data D is divided using G, and the maximum I value of all division methods is normalized to obtain the feature matrix M(D)p,q :
[0115]
[0116] Then the maximum information coefficient (MIC) is defined as:
[0117]
[0118] In the above formula, B(n) is the upper limit of the grid division p×q;
[0119] S4. Concatenate the modal component matrix with the other factor matrices to obtain a factor matrix:
[0120]
[0121] Among them, the first k rows of the factor matrix correspond to the k narrowband modal components decomposed by the variational mode decomposition algorithm; the last n rows correspond to the n other factor components after sequence alignment;
[0122] S5. Construct a mapping relationship between the factor matrix, the modal component matrix, and the future power sequence through a preset model. The mapping relationship can be expressed as:
[0123]
[0124] Where x f =[x i ,...,x i+L-1 ] represents the future electricity sequence, where L = 1 means single-step prediction, otherwise it is multi-step prediction; is the other factor matrix, n represents the nth other factor segment; is the modal component matrix, k represents the kth modal component; The mapping function between modal components and other factors and future power
[0125] S6. Outputting predicted power according to the historical power sequence and the mapping relationship; that is, inputting the historical power sequence into the mapping relationship to obtain a final predicted power.
[0126] Example 2
[0127] This embodiment specifically defines the structure of the power preset model;
[0128] Please refer to Figure 5The power preset model (MIC-VMD-MTF) includes MIC-based sequence alignment and factor selection, VMD-based historical power decomposition, and M-Transformer model-based power prediction model; the M-Transformer model power prediction model is a multi-factor power prediction model obtained by modifying the Transformer model structure; wherein, the MIC-based sequence alignment and factor selection, that is, executing the step of aligning the other factor sequences with the historical power sequence in embodiment one; the VMD-based historical power decomposition, executing the step of decomposing the historical power sequence into multiple groups of narrowband modes in embodiment one; the M-Transformer model, executing the step of mapping relationship construction, and outputting the predicted power; the MIC-VMD-MTF performs the following steps:
[0129] The sequence alignment and factor selection modules are used to process other factor data to generate other factor matrices. Meanwhile, the VMD algorithm is used to decompose the power sequence into several narrowband modes and further generate a modal component matrix. The other factor matrix and the modal component matrix are then concatenated to obtain the factor matrix. The modal component matrix is then reconstructed to obtain power data. Finally, the factor matrix and the denoised power data are simultaneously input into the M-Transformer model. The variable-dependent attention mechanism in the M-Transformer model is responsible for finding and learning the correlation between the two, thereby completing power prediction.
[0130] Among them, the Transformer model consists of four parts: input layer, encoding stack, decoding stack and output layer. The input layer contains two parts: word embedding encoding module and position encoding module. The word embedding encoding module converts the input word into a computable vector, and the position encoding module embeds the position information into the input sequence; the encoding stack is composed of several encoder stacks, which is responsible for encoding the input information and generating an intermediate vector as the input of the decoding stack. Each encoder is composed of a multi-head attention mechanism module and a feedforward neural network module. The decoding stack is composed of several decoder stacks, which is responsible for decoding the input information. Each decoder is composed of a masked multi-head attention mechanism module, a multi-head attention mechanism module and a feedforward neural network module. In addition, residual connections and normalization operations are added between each module of the encoder and decoder. In the output layer, the linear connection layer module maps the output of the decoding stack to a vector of fixed dimension, and the activation function converts the vector into a probability.
[0131] The M-Transformer model is a multi-factor electricity forecasting model obtained by modifying the Transformer model structure. Specifically, it includes:
[0132] Please refer to Figure 6, the input layer replaces the original word embedding encoding module with a fully connected neural network so that time series data can be directly input; wherein, the input layer of the encoding stack includes two parallel input modules, which are used to input the factor matrix and the modal component matrix respectively;
[0133] In the first encoder of the encoding stack, the multi-head attention mechanism module is improved to a multi-head variable correlation attention mechanism to estimate the variable correlation between other factor sequences and the power component and the power sequence;
[0134] The decoder uses a multi-head attention mechanism instead of a masked multi-head attention mechanism. This is because the decoding stack inputs a single power value and does not involve information from subsequent sequences.
[0135] The output layer uses a fully connected neural network to replace the original output layer structure, directly mapping the output of the encoding stack into the power prediction result, and finally forming the MTF model;
[0136] Please refer to Figure 7 , where the query matrix Q, key matrix K, and value matrix V of the multi-head attention mechanism in the Transformer model all come from the same input. This structure can deeply mine the internal correlation of the input data, but cannot obtain the correlation between variables; the key matrix and value matrix in the multi-head variable-related attention mechanism come from the same input, while the query matrix is another input; the output of the i-th Head of the multi-head variable-related attention mechanism is:
[0137]
[0138] are the weight matrices corresponding to the query matrix Q, key matrix K and value matrix V in the i-th Head, respectively.
[0139]
[0140] Considered as a weight matrix, the formula
[0141]
[0142] Can be rewritten as:
[0143]
[0144] Example 3
[0145] This embodiment verifies the model proposed in the prior art and the MIC-VMD-MTF model proposed in this embodiment through specific examples;
[0146] Collect electricity consumption data from January 1, 2008 to August 24, 2022 in a certain province. The data collection interval is 24 hours, and a total of 5350 data points;
[0147] Please refer to Figures 8-12 , which is a schematic diagram of the MIC values of various factors and power under different relative delays. As can be seen from the figure, power has a strong time-varying property, and its correlation with other factors also has a strong time-varying property. Selecting a maximum MIC value of 0.5 can effectively filter out irrelevant or redundant factors. It can be seen from the figure that the change in power is highly correlated with changes in temperature, air pressure, and dew point temperature, but less correlated with wind speed and humidity. Therefore, wind speed and humidity factors are discarded.
[0148] The last 200 data points out of 5350 are used as test sets, and the rest are used as training sets for training;
[0149] Back propagation neural network (BP), least squares support vector machine (LSSVM) and long short-term memory network (LSTM) are selected as control models of the MIC-VMD-MTF model of this embodiment; mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error (MAPE) are selected as evaluation indicators, and their expressions are as follows:
[0150]
[0151]
[0152]
[0153] In the above formula, N is the predicted power segment length, is the actual power, To predict power consumption;
[0154] Please refer to Figure 13 , which is a comparison chart of the prediction curves of each model and the actual power curve. The prediction performance results are shown in Table 1;
[0155] Table 1
[0156]
[0157] from Figure 13 As can be seen from Table 1, the mean absolute error, root mean square error, and mean absolute percentage error of the MIC-VMD-MTF model in this embodiment are all lower than those of the existing models, and have better power prediction effect;
[0158] Comparative Example 2
[0159] To illustrate the role of the MIC-based sequence alignment and variable selection module in the model of this embodiment, this group of comparisons has three models, namely S-VMD-MTF without considering other factors, M-VMD-MTF without sequence alignment and variable selection operations on other input factors, and the model proposed in the embodiment; please refer to the comparison chart of the predicted curve and the actual power curve under different sequence alignment methods Figure 14 ,The prediction errors are shown in Table 2;
[0160] Table 2
[0161]
[0162] As can be seen from Table 2, the mean absolute error, root mean square error, and mean absolute percentage error of the MIC-VMD-MTF model in this embodiment are all lower than those of the existing models, and have better power prediction effects.
[0163] To better evaluate the improvement effect of the MIC-VMD-MTF model compared with other prediction models, the following formula is used as the evaluation indicator:
[0164]
[0165] Where, I index E is the performance improvement index. The larger the value, the more obvious the improvement of the model effect. The maximum value is 1. p is the error value of the model in this paper; E o is the error value of the control model;
[0166] Please refer to Figure 15 This is a schematic diagram of the performance improvement index of the prediction model MIC-VMD-MTF proposed in this embodiment compared with other models; Figure 15 It can be seen that the prediction model MIC-VMD-MTF proposed in this embodiment is closer to the actual value and has a better power prediction effect.
[0167] Example 4
[0168] A multi-factor short-term electricity forecasting device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor implements the steps of a multi-factor short-term electricity forecasting method as described in Example 1 or Example 2.
[0169] In summary, the present invention provides a multi-factor short-term electricity forecasting method and device, which aligns other factor sequences with the electricity sequence based on MIC correlation analysis, and screens other factors on this basis. By performing variable selection and sequence alignment on the electricity sequence and other factor sequences, effective information can be fully extracted, thereby improving the electricity forecasting accuracy; at the same time, the original Transformer model is improved, and a variable-related attention mechanism is proposed to make its structure suitable for multi-factor forecasting tasks, and the VMD algorithm, MIC theory and improved Transformer model are combined. The decomposition of the electricity sequence through the VMD algorithm is more conducive to the model extracting the relationship between the modal component and the electricity to be predicted, and the variable-related attention mechanism can effectively capture the correlation between the electricity sequence and other factor sequences and the historical electricity components, thereby improving the accuracy of electricity forecasting and achieving excellent performance in short-term electricity forecasting.
[0170] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A multi-factor short-term electricity forecasting method, characterized in that: Including steps: Obtaining a historical power sequence and other factor sequences related to the historical power sequence; Decomposing the historical power sequence into multiple groups of narrowband modes using a variational mode decomposition algorithm to form a modal component matrix; Aligning the other factor sequence with the historical power sequence to form an other factor matrix; Concatenating the modal component matrix with the other factor matrices to obtain a factor matrix; Constructing a mapping relationship between the factor matrix, the modal component matrix and the future power sequence through a preset model; Outputting predicted power according to the historical power sequence and the mapping relationship; The aligning the other factor sequence with the historical power sequence includes: Determining a starting point of the historical electricity quantity sequence; Shifting the other factor sequence from the starting point of the historical power sequence, and calculating the maximum information coefficient between the other factor sequence and the historical power sequence; Determining the starting point of the other factor sequence according to the maximum information coefficient; Obtaining a relative delay between the other factor sequence and the historical power sequence according to the maximum information coefficient; Performing sequence alignment on the other factor sequence and the historical power sequence according to the relative delay; The preset model includes an encoding stack and a decoding stack; The mapping relationship between the factor matrix, the modal component matrix and the future power sequence is constructed by using a preset model, including: inputting the factor matrix and the modal component matrix into the coding stack respectively; The encoding stack processes the factor matrix and the modal component based on a variable-dependent attention mechanism to obtain the mapping relationship; Outputting the predicted power according to the historical power sequence and the mapping relationship includes: Inputting the mapping relationship and the historical power sequence into the decoding stack respectively to obtain the predicted power; The calculation formula for constructing the mapping relationship between the factor matrix, the modal component matrix and the future power series through the preset model is as follows: ; Where, represents the future power sequence, where L =1 means single-step prediction, otherwise it is multi-step prediction; is the matrix of other factors, n Indicates the n Other factor fragments; is the modal component matrix, k Indicates the k modal components; It is the mapping function between modal components and other factors and future power.
2. A multi-factor short-term electricity forecasting method according to claim 1, characterized in that: Before aligning the other factor sequence with the historical power sequence according to the relative delay, the method further includes: The other factor sequences are screened according to the maximum information coefficient, and the factor sequences whose maximum information coefficient is less than a preset value are eliminated.
3. The multi-factor short-term electricity forecasting method according to claim 1, characterized in that: The inputting the factor matrix and the modal component matrix into the coding stack respectively comprises: Reconstructing the modal component matrix to obtain electrical quantity data; The factor matrix and the power data are input into the encoding stack.
4. The multi-factor short-term electricity forecasting method according to claim 1, characterized in that: The step of concatenating the modal component matrix with the other factor matrices to obtain a factor matrix includes: ; Among them, the factor matrix k The rows correspond to the decompositions of k narrowband modal components; n The rows correspond to the aligned sequences. n Other factors, Indicates the n other factors related to the delay of the parameters.
5. The multi-factor short-term electricity forecasting method according to claim 1, characterized in that: Decomposing the historical power sequence into multiple groups of narrowband modes using a variational mode decomposition algorithm to form a modal component matrix includes: Generate a variational mode decomposition model based on preset constraints; Decomposing the historical electrical quantity series according to the variational modal decomposition model to obtain a plurality of groups of narrowband modes and a group of residual components; The modal component matrix is formed according to a plurality of groups of the narrowband modes and the residual components.
6. A multi-factor short-term electricity forecasting method according to claim 5, characterized in that: The forming of the modal component matrix according to the multiple groups of narrowband modes and the residual components includes: Performing noise reduction processing on the residual component by calculating permutation entropy; The residual component after noise reduction processing and the narrowband mode are combined to form the modal component matrix.
7. A multi-factor short-term electricity forecasting device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor executes the computer program, each step of the multi-factor short-term electricity forecasting method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Space-temporal data variational coding and decoding cross-modal enhancement method
CN113780003A
TGCN-GRU ultra-short-term load prediction method and device based on VMD and electronic equipment
CN114548532A