Photovoltaic power prediction method and system of improved RFNN-QLSTM based on VECM
By adopting an improved RFNN-QLSTM method based on VECM in photovoltaic power prediction, the problem of insufficient relationship capture between photovoltaic data and meteorological factors in the prior art is solved, and higher prediction accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202411750373.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-02
AI Technical Summary
The existing photovoltaic power prediction methods have shortcomings in capturing the equilibrium regression relationship between photovoltaic data and meteorological factors and identifying the cointegration relationship, resulting in room for improvement in prediction accuracy and adaptability.
The improved cyclic fuzzy neural network-Quantum long short-term memory network (RFNN-QLSTM) method based on vector error correction model (VECM) is adopted to introduce error correction terms through vector autoregression model to identify cointegration relationships and short-term deviations in photovoltaic data, and to use quantum long short-term memory network to improve the cyclic fuzzy neural network to improve prediction performance.
It improves the adaptability and accuracy of photovoltaic output prediction, and can more effectively capture the equilibrium relationship and cointegration relationship between photovoltaic data and meteorological factors, thereby providing more accurate short-term power prediction.
Smart Images

Figure CN119674940A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photovoltaic power prediction, and more specifically to a photovoltaic power prediction method and system based on an improved RFNN-QLSTM of VECM. Background Art
[0002] Photovoltaic power prediction is a key technology to reduce the adverse effects of randomness in photovoltaic output. It is generally based on dynamic data such as weather forecast data, photovoltaic power data and meteorological observation data, combined with information such as photovoltaic site location and equipment parameters to build a model to predict the trend of photovoltaic output changes in the future. It can effectively support the development of multiple businesses such as power grid dispatching, maintenance planning, stability analysis, and new energy consumption analysis.
[0003] Photovoltaic power prediction methods are generally divided into two categories: physical models and data-driven models. The prior art proposes an improved deep learning algorithm that applies long short-term memory networks and artificial neural networks to the prediction model. This study focuses on parameter optimization and model optimization, and shows better performance than a single deep learning algorithm.
[0004] The fluctuation characteristics of the original data caused by changes in weather conditions may affect the accuracy of the prediction. Analyzing and reducing the fluctuation characteristics of the original data can further improve the accuracy of the short-term photovoltaic power prediction method. The existing technology also uses wavelet packet decomposition technology to analyze the photovoltaic power time series. Compared with the traditional method, this method integrates the decomposed time series into the prediction model to reduce the prediction error. However, this method focuses on capturing the fluctuation characteristics on a microscale and ignores that the fluctuation of photovoltaic power generation is actually caused by changes in meteorological conditions. The existing technology also significantly reduces the photovoltaic output prediction error by clustering meteorological factors and selecting similar days in the initial data. However, this method ignores the degree of influence of meteorological factors on the fluctuation of photovoltaic power generation, and only clusters with one meteorological factor or simply with multiple meteorological factors, which is not conducive to the extraction of fluctuation characteristics.
[0005] Quantum computing can use the laws of quantum mechanics to process information types that are difficult to implement with traditional methods. Considering the characteristics of photovoltaic power prediction around continuous value regression, the advantage of quantum support vector machines is mainly to solve discrete classification problems, and the prediction adaptability and prediction ability of photovoltaic power time series are not strong. The prior art proposes to improve the existing artificial intelligence prediction methods using the field of quantum computing, but the existing quantum improvement methods still have room for improvement in the adaptability and prediction ability of photovoltaic power prediction. Therefore, a photovoltaic power short-term prediction model based on an improved recurrent fuzzy neural network-quantum long short-term memory network (RFNN-QLSTM) of a vector error correction model (VECM) is provided to predict photovoltaic output, improve the adaptability and accurate prediction ability of photovoltaic output prediction, and has certain engineering significance. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a photovoltaic power prediction method and system based on an improved RFNN-QLSTM of VECM, so as to improve the adaptability and accurate prediction ability of photovoltaic output prediction.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A photovoltaic power prediction method based on an improved RFNN-QLSTM of VECM, comprising:
[0009] Preprocess the original photovoltaic data for outliers and missing values;
[0010] A vector error correction model is constructed to capture the equilibrium regression relationship between photovoltaic data and meteorological factors. Error correction terms are introduced on the basis of the vector autoregression model to identify the cointegration relationship and short-term deviation between variables in photovoltaic data. The vector error correction model is used to screen out relevant features in photovoltaic data and construct a new photovoltaic data set.
[0011] An improved recurrent fuzzy neural network-quantum long short-term memory network RFNN-QLSTM photovoltaic power short-term prediction model based on the vector error correction model VECM is constructed.
[0012] The new photovoltaic data set is used to train a photovoltaic power short-term prediction model to predict and output photovoltaic output prediction results.
[0013] Preferably, an error correction term is introduced on the basis of the vector autoregression model to obtain a vector error correction model, and the formula is as follows:
[0014]
[0015] Where ΔY t is the difference of the time series variable at time t, representing the short-term dynamic relationship, Γ iis the coefficient matrix for lag i, ΔY t represents the time series under investigation, p is the lag length, Π is the influence matrix, which contains information about long-term relationships, and ε t is an n×1 error vector used to estimate the likelihood ratio (LR) to determine ΔY in the system t The cointegrating vector of .
[0016] Preferably, the constructed vector error correction model is subjected to a Johnson cointegration relationship test and a model stability test in sequence, and a cointegration result analysis is performed to identify the variable relationship in the photovoltaic data.
[0017] Preferably, the method for constructing a quantum long short-term memory network model includes:
[0018] The quantum long short-term memory network model uses variational quantum circuits to replace long short-term memory network units to form quantum long short-term memory network units;
[0019] The quantum long short-term memory network model architecture is defined as:
[0020] f t =σ(VQC1(v t )),
[0021] i t =σ(VQC2(v t )),
[0022]
[0023] o t =σ(VQC4(v t )),
[0024] h t =o t ×tanh(c t ),
[0025] Preferably, the quantum long short-term memory network also includes:
[0026] Input layer: responsible for receiving and processing raw time series data;
[0027] Output layer: Converts the processing results of the quantum long short-term memory network model into the final output for the next step of time series prediction.
[0028] Preferably, the improved recurrent fuzzy neural network model includes: replacing and improving the recurrent layer in the recurrent fuzzy neural network by a quantum long short-term memory network to obtain an improved recurrent fuzzy neural network model.
[0029] The present invention also provides a system for photovoltaic power prediction method based on VECM and improved RFNN-QLSTM, comprising the following modules:
[0030] Data preprocessing module: used to preprocess the outliers and missing values of the original photovoltaic data;
[0031] Vector error correction module: used to capture the equilibrium regression relationship between photovoltaic data and meteorological factors and between meteorological factors, and introduce error correction terms based on the vector autoregression model to identify the cointegration relationship and short-term deviation between variables in photovoltaic data;
[0032] Photovoltaic power short-term prediction module: used to construct an improved recurrent fuzzy neural network model by replacing the recurrent layer in the recurrent fuzzy neural network with a quantum long short-term memory network, and train the photovoltaic power short-term prediction model with a new photovoltaic data set constructed after screening relevant features through a vector error correction model, and predict and output the photovoltaic output prediction results.
[0033] Through the above technical solutions, it can be known that compared with the prior art, the present invention discloses a photovoltaic power prediction method based on VECM and improved RFNN-QLSTM. First, while performing correlation analysis on photovoltaic data, a vector error correction model is used to capture the equilibrium regression relationship between photovoltaic data and meteorological factors and meteorological factors, and the short-term volatility and cointegration relationship between photovoltaic output data and meteorological factor-related variables are fully considered. Secondly, inspired by the variational quantum circuit, the variational quantum circuit is used to improve the long short-term memory network, and the neural nodes in the long short-term memory network are replaced with quantum nodes. In the quantum long short-term memory network, the variational quantum circuit converts the data from classical state to quantum state and quantum state to classical state output respectively, so as to better learn and memorize photovoltaic historical information. On this basis, combining the advantages of recurrent neural network and fuzzy neural network, the improved long short-term memory network is added to improve the recurrent fuzzy neural network, and the recurrent layer in the recurrent fuzzy neural network is replaced with the improved long short-term memory network, which is connected to the fuzzification layer in the recurrent fuzzy neural network, which helps the recurrent fuzzy neural network to remember past observations and capture the dynamic characteristics of sequence data. The research results show that the method proposed in this invention takes into account the equilibrium relationship and cointegration relationship between photovoltaic data and meteorological factors, and is superior to existing methods in terms of prediction accuracy, providing a new research idea for photovoltaic power prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A schematic flow chart of a photovoltaic power prediction method based on an improved RFNN-QLSTM of VECM provided by the present invention.
[0036] Figure 2 A flow chart of modeling of a vector error correction model provided by the present invention;
[0037] Figure 3 The variational quantum circuit principle diagram provided by the present invention;
[0038] Figure 4 A diagram of the quantum long short-term memory network structure provided by the present invention;
[0039] Figure 5 The improved recurrent fuzzy neural network structure diagram provided by the present invention;
[0040] Figure 6 The AR root graph provided by the present invention;
[0041] Figure 7 A photovoltaic power prediction result diagram from 00:00 on August 22, 2020 to 23:55 on August 28, 2020 provided in an embodiment of the present invention;
[0042] Figure 8 A graph of photovoltaic power prediction results for August 25, 26 and 27, 2020 provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Example 1
[0045] like Figure 1 As shown, the embodiment of the present invention discloses a photovoltaic power prediction method based on VECM and improved RFNN-QLSTM, comprising the following steps:
[0046] Preprocess the original photovoltaic data for outliers and missing values;
[0047] A vector error correction model (VECM) is constructed to capture the equilibrium regression relationship between photovoltaic data and meteorological factors. Error correction terms are introduced on the basis of the vector autoregression model to identify the cointegration relationship and short-term deviation between variables in photovoltaic data. The vector error correction model is used to screen out relevant features and construct a new photovoltaic data set.
[0048] In an embodiment of the present invention, the relevant features refer to other meteorological feature statistics in the original photovoltaic data set except the power statistics. For details, please refer to Table 1 (the features on the left side of Table 1). Six features with high power correlation are screened out through the error correction model. The new photovoltaic data set is a data set containing these six features and power statistics.
[0049] Construct an improved recurrent fuzzy neural network-quantum long short-term memory network RFNN-QLSTM photovoltaic power short-term prediction model based on the vector error correction model VECM;
[0050] Furthermore, the photovoltaic power short-term prediction model is an improved recurrent fuzzy neural network model that replaces the recurrent layer in the recurrent fuzzy neural network with a quantum long short-term memory network;
[0051] A new photovoltaic data set constructed by screening relevant features through a vector error correction model is used to train a photovoltaic power short-term prediction model to predict and output photovoltaic output prediction results.
[0052] Furthermore, an error correction term is introduced on the basis of the vector autoregression model to obtain a vector error correction model, the formula is as follows:
[0053]
[0054] Where ΔY t is the difference of the time series variable at time t, representing the short-term dynamic relationship, Γ i is the coefficient matrix for lag i, ΔY t represents the time series under investigation, p is the lag length, Π is the influence matrix, which contains information about long-term relationships, and ε t is an n×1 error vector; in the Johansen cointegration test, the error term is needed to estimate the likelihood ratio (LR) to determine the ΔY t The cointegrating vector of .
[0055] Specifically, Figure 2This is the flow chart of the vector error correction model modeling. The vector error correction model requires that all variables should be stationary time series, so the Augment Ducky Fuller (ADF) unit root test is first performed to test the stationarity of the variables, that is, whether there is a unit root. Then the lag length is determined based on the comprehensive evaluation of the Akaike information criterion, the Schwarz information criterion and the likelihood ratio.
[0056] Furthermore, the constructed vector error correction model was subjected to the Johnson cointegration relationship test and model stability test, and the cointegration results were analyzed to identify the variable relationship in the photovoltaic data.
[0057] The variable relationship includes long-term equilibrium relationship and short-term deviation. The long-term equilibrium relationship refers to a relationship in which the variables in the photovoltaic data (such as photovoltaic power generation, meteorological factors, etc.) tend to be stable in the long term. This relationship can be determined by statistical methods such as cointegration analysis. Cointegration shows that although these variables may be non-stationary in the short term, there is a long-term stable equilibrium relationship between them.
[0058] Short-term deviations refer to the fact that in the short term, due to various random factors (such as weather changes, equipment failures, etc.), the actual values of these variables may deviate from their long-term equilibrium values. This deviation is short-term and usually returns to equilibrium in the long term through adjustments by other mechanisms.
[0059] The vector error correction model (VECM) captures this short-term deviation by introducing a correction term (Error Correction Term, ECT). The correction term is a function of the difference between the long-term equilibrium relationship and the actual value, which measures the degree to which the system deviates from the long-term equilibrium state; in the VECM equation, this correction term usually appears as a negative coefficient, indicating that the system will adjust towards the long-term equilibrium relationship, that is, if there is a positive deviation at present, the system will tend to reduce this deviation in the future, and vice versa.
[0060] In PV power forecasting, identifying and correcting these short-term deviations is crucial to improving the accuracy of the forecast; through the VECM model, the short-term dynamic relationship between PV power generation and meteorological factors can be analyzed, and the long-term equilibrium relationship between them can be taken into account, thereby providing a more accurate short-term power forecast.
[0061] Furthermore, the present invention adopts a vector error correction model, which assumes that all variables have the same integration order; the analysis of the vector error correction model is performed under the framework of a vector autoregression model.
[0062] The vector autoregression model is a measurement model that uses all current variables in the model to perform regression analysis on several lagged variables. It is usually used to analyze the dynamic relationship between joint endogenous variables and does not require any prior constraints. The principle of the vector autoregression model is to construct the model by taking each endogenous variable as a function of the lagged value, and to expand the univariate autoregression model into a vector autoregression model composed of multiple time series variables. According to the statistical characteristics of photovoltaic data, a vector autoregression model is established.
[0063] The vector autoregression model is expressed as:
[0064] y t =c+A1y t-1 +A2y t-2 +…+A p y t-p +ξ t ;
[0065] where y t is the vector of endogenous variables, p is the lag length, c is an n×1 constant vector, and A is an n×n matrix, ξ t is an n×1 error vector. In practical applications, the vector autoregression model is usually converted into a matrix form. For example, the above vector autoregression model can be expressed as follows (the lag length is 2):
[0066]
[0067] The vector autoregression model needs to determine two indicators during the modeling process: one is the number of variables, because the vector autoregression model needs to identify which characteristic variables in the given data are interrelated, and these variables should be included in the vector autoregression model; the second is the maximum lag length of the autoregression model. Choosing a reasonable lag length can better reflect the relationship between variables. In the vector autoregression model, variables with correlation should be selected as explanatory variables, and the Granger causality test should be used to determine whether there is a correlation between these variables. The mechanism of the Granger causality test is to use the historical data of X and Y to predict Y for two given time series (such as X and Y) that obey a stationary random process. If the prediction result is better than using the historical data of Y alone, it is believed that X helps to improve the prediction accuracy of Y, and there is a causal relationship between X and Y.
[0068] Since this embodiment uses long-term historical photovoltaic data, it is necessary to test the unit root properties of the variables in the data through a unit root test, and the unit root test is used to determine whether the characteristic variable has a unit root and whether it is stable. In a time series, if the variance and mean of a variable remain unchanged over time, the series is called a stationary series, that is, the series has no unit root. In the vector autoregression model, the Augment Ducky Fuller (ADF) unit root test and the Ducky Fuller (DF) test method are usually used to test the unit root properties and test the stationary state of the characteristic variable, where the ADF unit root test is an improved form of the DF test.
[0069] The formula for the ADF unit root test is as follows:
[0070] ΔY t =(ρ-1)Y t-1 +y1ΔY t-1 +y2ΔY t-2 +...+y p ΔY t-p +ε t ;
[0071] Among them, Δ represents the difference, Yt represents the time series under investigation, and ε t represents the error term, ρ is the parameter to be tested, and the ρ value is determined by the ADF unit root statistic. If ρ = 1, the time series has a unit root and the series is non-stationary. If ρ < 1, the series is stationary. p is the parameter of the lagged difference term, reflecting the impact of the previous difference data on the current value, and p is the lag order; if the absolute value of the ADF unit root test statistic is greater than the critical value, or the p value (the second element in the return value) is less than the significance level (for example, 0.05), then the null hypothesis of the existence of a unit root is rejected, that is, the variable is accepted to be stationary (no unit root exists). The output result of the ADF unit root test needs to be compared with the critical value of a specific order to determine whether to accept or reject the null hypothesis.
[0072] The 1%, 5%, and 10% critical values in the ADF unit root test correspond to the significance level (or confidence level) selected in the study. These values are common choices in statistical decision-making. They represent the probability of the first type of error (i.e., incorrectly rejecting the null hypothesis) that the model is willing to bear. For example, a 1% critical value corresponds to a 99% confidence level, with a 99% certainty that the decision is correct, and only a 1% chance of making a first type of error, that is, rejecting the null hypothesis. There are three common empirical models used in ADF tests: a model containing a constant term, a model containing both a constant term and a trend term, and a model that does not contain a constant term or a trend term. When performing an ADF test, all three models should meet statistical requirements.
[0073] The vector autoregression model is an effective model for analyzing and predicting multiple related indicators. However, when analyzing photovoltaic output data and meteorological factors, the vector autoregression model only considers the short-term volatility between photovoltaic data and meteorological factors, and does not consider the long-term equilibrium relationship and cointegration relationship between photovoltaic data and meteorological factors, as well as between meteorological factors.
[0074] Therefore, an error correction term is introduced on the basis of the vector autoregression model to continue to test the long-term equilibrium relationship and cointegration relationship in photovoltaic data. There are several methods of cointegration, including the Engle and Granger cointegration test and the Johansen cointegration test. However, the Engle and Granger cointegration test does not specify the number of vectors, and the Johansen test can provide information about the number of cointegration vectors. Compared with the Engle and Granger test, the Johansen cointegration test is suitable for multiple variables and can detect whether there are one or more cointegration relationships between multiple variables. In comparison, the Johansen cointegration test method has more advantages. In the Johansen cointegration test, an error term is required to estimate the likelihood ratio to determine the cointegration vector in the cointegration system. The calculation formula of the Johansen cointegration test is as follows:
[0075]
[0076] Where ΔY t is the difference of the time series variable at time t, representing the short-term dynamic relationship, Γ i is the coefficient matrix for lag i, Y t represents the time series under investigation, p is the lag length, Π is the influence matrix, which contains information about long-term relationships, and ε t is an n×1 error vector. In the Johansen cointegration test, the error term is needed to estimate the likelihood ratio (LR) to determine the probability that Y t The cointegrating vector of .
[0077] Because the cointegration test is conducted under the vector autoregression model setting, the study uses the Akike information criterion and the Shward information criterion to estimate the appropriate lag length. After detecting the cointegration relationship, we can continue to identify the short-term deviations between variables in the photovoltaic data from the long-term equation of the vector error correction model. The present invention establishes a vector error correction model to analyze multiple related photovoltaic data variables and observe whether the selected response variable is affected by other variables.
[0078] Furthermore, the construction method of the quantum long short-term memory network model (QLSTM) includes:
[0079] The quantum long short-term memory network model uses variational quantum circuits to replace long short-term memory network units to form quantum long short-term memory network units;
[0080] The quantum long short-term memory network model architecture is defined as:
[0081] f t =σ(VQC1(v t )),
[0082] i t =σ(VQC2(v t )),
[0083]
[0084] o t =σ(VQC4(v t )),
[0085] h t =o t ×tanh(c t ).
[0086] Furthermore, the quantum long short-term memory network also includes:
[0087] Input layer: responsible for receiving and processing raw data;
[0088] Variational quantum circuit unit: Each LSTM network unit contains four variational quantum circuits, corresponding to the four gates of the LSTM network, for performing quantum feature extraction and data compression;
[0089] Output layer: Converts the processing results of the quantum long short-term memory network into the final prediction output for the next step of time series prediction.
[0090] like Figure 3 The variational quantum circuit schematic shown in the figure is a quantum circuit with adjustable parameters that are iteratively optimized. The main functions of the variational quantum circuit are feature extraction and data compression. The variational quantum circuit consists of three parts: data encoding layer, variational layer, and quantum measurement layer. The data encoding layer first encodes the data information into the quantum state of the quantum bit, and then the variational layer containing the trainable weights performs the entanglement operation. The evolved quantum state is measured to obtain the quantum measurement value for subsequent operations. The corresponding specific implementation process is as follows:
[0091] 1) Data coding layer: The coding layer contains H, R x , R y , R z Revolving door. Quantum embedding represents classical data as quantum states in Hilbert space through quantum feature mapping. First, take a classical data point x and convert it into a set of parameters in a variational quantum circuit to produce a quantum state |ψ x>, through the amplitude embedding method, the data is encoded into the amplitude of the quantum state. A standardized classical n-dimensional data point x is represented by the quantum state |ψ x The amplitude formula of > is expressed as:
[0092]
[0093] Where N = 2 n , x i is the i-th element of the n-dimensional data point, and |i> is the i-th computational basis state.
[0094] 2) Variation layer: After encoding the classical state data into quantum state, it is passed to the variation layer. After the data enters the variation layer, several entanglement operations are performed. These entanglement operations consist of several controlled anti-gates and single-qubit rotation gates. For each pair of qubits with fixed adjacency (in a cyclic manner), a controlled anti-gate is used to generate multi-qubit entanglement. The single-qubit rotation gate with three parameters (R x , R y , R z )like Figure 3 As shown:
[0095] R(α i ,β i ,γ i )=R x (α i )R y (β i )R z (γ i );
[0096] where α i , β i and γ i Iterative optimization parameters for variational quantum circuits VQC.
[0097] 3) Quantum measurement layer: The quantum measurement layer follows the variational layer. Based on the calculation, the expected value of each qubit is obtained through the Pauli matrix. Using the quantum simulation software PennyLane, the expected value of each qubit can be calculated on a classical computer. After a series of quantum entanglement operations, the measured variational quantum circuit output is a fixed-length classical vector. In the quantum long short-term memory network, the measurement value from each variational quantum circuit will be processed in a quantum long short-term memory network unit.
[0098] The present invention uses the PennyLane quantum machine learning framework to implement the use of variational quantum circuits in long short-term memory networks. The core of PennyLane is to combine quantum and traditional computing to help build and improve models. A prominent feature of PennyLane is that it can smoothly combine quantum elements based on variational circuits with conventional artificial neural network parts to create complex structures such as quantum long short-term memory networks. The quantum long short-term memory network model is a mixture of traditional long short-term memory network models and quantum nodes, which are designed with time series data in mind and use specific rotational superposition and entanglement operations.
[0099] The quantum long short-term memory network replaces the long short-term memory network unit with a variational quantum circuit to form a quantum long short-term memory network unit. The variational quantum circuit uses a small number of quantum bits and gates to represent complex functions. In a quantum long short-term memory network unit, there are four variational quantum circuits, namely VQC1, VQC2, VQC3 and VQC4, whose output is a vector obtained from the quantum measurement layer. The measurement value is the Pauli expectation value designed for each quantum bit, and then passes through a nonlinear activation function. These four variational quantum circuits are identical and contain a coding layer, which compresses the dimension of the information to a circuit size suitable for the variational quantum circuit, and then passes through the variational layer to obtain the quantum measurement value, which is then sent to the measurement layer, which converts the quantum measurement value into an output result that conforms to the original data structure.
[0100] like Figure 4 The quantum long short-term memory network structure diagram shown in the figure, σ and tanh represent the sigmoid function and the hyperbolic tangent activation function respectively. t is the input at time t, C t Represents the unit state; the four variational quantum circuits embedded in each quantum long short-term memory network unit process different logical operations respectively.
[0101] Furthermore, the improved recurrent fuzzy neural network model includes: an improved recurrent fuzzy neural network model after replacing the recurrent layer in the recurrent fuzzy neural network with a quantum long short-term memory network, wherein the improved recurrent fuzzy neural network model includes an input layer, a fuzzy rule layer, a normalization layer, a recurrent layer (QLSTM) and an output layer.
[0102] Recurrent Neural Networks (RNNs) are a type of neural network specifically designed to process sequence data. RNNs are able to learn and remember information observed in the past by forming a structure of information loops. Compared to feedforward neural networks with the same approximate accuracy, RNNs perform better in terms of computational power and compactness. Although RNNs have good predictive capabilities, training RNNs becomes complicated due to the vanishing or exploding gradient problem, which may lead to problems such as slow convergence and high computational requirements.
[0103] Fuzzy neural network (FNN) is a hybrid method that combines the learning ability of artificial neural network with the interpretability and semantic transparency of fuzzy system. It has significant advantages in local representation and simulation of human reasoning, and has significant effect in dealing with uncertainty, and can effectively capture the potential relationship in time series data. In order to combine the potential of recurrent neural network to learn time dependency with the ability of fuzzy neural network to process fuzzy information, recurrent fuzzy neural network (RFNN) is introduced, and the recurrent layer in recurrent fuzzy neural network is replaced and improved by quantum long short-term memory network.
[0104] Each hierarchical structure in the improved recurrent fuzzy neural network plays a different role in processing fuzzy information and time series data; the functions of each level are described in detail below:
[0105] like Figure 5 The structure diagram of the recurrent fuzzy neural network shown includes:
[0106] (1) Input layer
[0107] The input layer is the starting point of the neural network, which receives the raw input data (usually time series data).
[0108] The role of membership function is to fuzzify input data. The fuzzification process is to convert specific input values into membership of fuzzy sets. Each input feature is processed by one or more membership functions to generate membership values associated with fuzzy sets. These membership functions are usually some predefined functions, such as:
[0109] Gaussian function: often used to smoothly represent fuzzy sets;
[0110] Triangular function: simple and computationally inefficient, suitable for linear fuzzification.
[0111] The output of the membership function is the fuzzy membership of the input data. Each function has K fuzzy rules, and these values are used for further fuzzy reasoning and recursive processing. In the improved recurrent fuzzy neural network, the input layer calculates the membership function value through the membership function and passes it to the next layer.
[0112] This layer accepts input variables and its neurons correspond to membership functions. It is used to calculate the membership values of the input variables. Let x = [x1, x2, …, x d ] T A represents input, and y represents predicted output. i,j is x j The membership function in the i-th rule of the output network, the j-th input variable x j In A i The membership value on Therefore, each neuron A in this layer i,j The output is x j In A i,j The membership value on The output network of this layer has K×d neurons.
[0113] (2) Fuzzy rule layer
[0114] The rule layer applies fuzzy rules to process the fuzzified input data. Fuzzy rules are usually described in the form of "if-then". In this layer, each fuzzy rule generates a fuzzy output by calculating the membership degree matching the input data. These rules can be defined based on expert knowledge or automatically generated through data-driven methods.
[0115] The neurons in this layer represent fuzzy rules, and their outputs represent the triggering strength of the rules. i represents the output of the i-th neuron in this layer, which is used to output the network. They can be calculated by applying the T-norm operator to the output of the previous layer.
[0116] Using the algebraic product as the T-norm operator, the trigger strength of each rule can be calculated as follows:
[0117]
[0118] (3) Normalization layer
[0119] The output of the neurons in this layer represents the normalized trigger strength of each rule (r i ), can be calculated by the formula:
[0120]
[0121] (4) Improved long short-term memory network layer (recurrent layer)
[0122] QLSTM is used as the recurrent layer of RFNN. The layer consists of an input gate I d (t), forget gate F d (t), candidate quantity Output Gate O d (t) and the cell state Cd (t) to form an internal feedback loop. At time step t, the loop rule node H d (t) By O d (t) and C d (t) is determined by the combination and can be calculated by the following formula:
[0123]
[0124] H d (t) = O d (t)*tanh(C d (t));
[0125] The definitions of the activation functions are:
[0126] (5) Output layer
[0127] The output layer receives the numerical results generated by the improved long short-term memory network layer and calculates the final output y through the following formula.
[0128]
[0129] Among them, w d is the output weight connecting the dth fuzzy rule.
[0130] Example 2
[0131] (1) Experimental results of vector error correction model
[0132] 1) Unit root test:
[0133] According to the central limit theorem, when the sample size is large enough, the mean distribution of independent and identically distributed random variables will tend to normal distribution. Therefore, the central limit theorem is used to derive the distribution of the test statistic in the unit root test. The ADF unit root test uses the central limit theorem to derive two statistical values and obtain a new critical value for significance test. Then the statistical value is compared with the critical value. When the T statistic is greater than the critical value, the hypothesis is accepted that the data series is a non-stationary process, otherwise the data series is a stationary process. There are three common empirical models for the ADF unit root test: Model 1, a model containing a constant term (including a lagged explained variable, a lagged error term and a constant term); Model 2, a model containing both a constant term and a trend term (a linear trend term about time is added on the basis of Model 1); Model 3, a model that does not contain a constant term and a trend term (the constant term is deleted on the basis of Model 1). When performing the ADF unit root test, all three models should meet the statistical requirements.
[0134] Taking the photovoltaic data of the 69-Site_17-Sanyo power station in Australia as an example, the ADF unit root test is performed on the photovoltaic data of the power station. The estimated value of the parameter to be tested in the ADF unit root test model is divided by the standard error (SE) of the estimated value to obtain the ADF statistic, that is, the T statistic, and then the P value is obtained according to the specific critical value table. The P value is an indicator used to measure the consistency between the observed data and the null hypothesis in the hypothesis test. It indicates the probability of the observed data or more extreme results appearing under the premise that the null hypothesis is established. The test results are shown in Table 1; from the ADF unit root test results, it can be seen that, except for the horizontal diffuse radiation statistics, the inclined diffuse radiation statistics, the wind direction statistics and the rainfall statistics, the T statistics of other characteristic variables corresponding to the three models are all greater than the critical values under the 1%, 5% and 10% confidence intervals. Therefore, the original data of other characteristic variables except the horizontal diffuse radiation statistics are non-stationary sequences.
[0135] Table 1 ADF unit root test results of original data (5% confidence interval)
[0136]
[0137] P-value * <0.01
[0138] From Table 1, we can see that horizontal diffuse radiation, oblique diffuse radiation, wind direction, and rainfall are stationary sequences. After removing them, we get new data that only contain non-stationary sequences in the original data. In order to meet the requirements of the error correction model, the first-order difference is used to process the processed new data for stationarity. After processing, a new ADF unit root test is performed to verify the stationarity. After the ADF unit root test, the test statistics of the three models show that variables such as power, current average phase, photovoltaic system efficiency, and temperature are all less than the critical value at the 1%, 5%, and 10% levels, indicating that the new data series is a stationary time series, as shown in Table 2.
[0139] Table 2 ADF test results under the first-order difference of new data (5% confidence interval)
[0140]
[0141] P-value * <0.01
[0142] 2) Determination of hysteresis length:
[0143] When determining the lag length, it is necessary to comprehensively consider the Akaike information criterion (AIC information criterion), the Schwarz criterion (SC information criterion) and the LR statistic. Eviews software is used to determine the optimal delay length. The Eviews test results show that when the lag length is 4, the AIC information criterion, the SC information criterion and the LR statistic are all significant, so the optimal lag length in this study is 4.
[0144] 3) Cointegration test results:
[0145] Through the analysis of the results in Table 2, seven features, namely power, current average phase, horizontal global radiation, photovoltaic system efficiency, tilted global radiation, relative humidity and temperature, were selected as new data sets. The Johansen cointegration test and the maximum eigenvalue test were performed on the new data sets. The obtained Tables 4 and 5 are shown below
[0146] Table 4 Unrestricted cointegration rank test (trace test)
[0147]
[0148] When it is assumed that there are 0 cointegration relationships, the trace statistic is 833.7068, which is greater than the 5% critical value of 95.7536, and the P value is 0.0001, which is less than 0.05. Therefore, the hypothesis is rejected, that is, there is at least 1 cointegration relationship, which continues until it is assumed that there are 5 cointegration relationships. At this time, the trace statistic is 25.7091, which is greater than the 5% critical value of 3.8414, and the P value is less than 0.05, rejecting the original hypothesis, that is, there are at least 6 cointegration relationships.
[0149] Table 5 Unrestricted cointegration rank test (maximum eigenvalue test)
[0150]
[0151] When it is assumed that there are 0 cointegrating relationships, the maximum eigenvalue statistic is 860.6586, which is greater than the 5% critical value of 117.7082, and the P value is less than 0.05, so the hypothesis is rejected, that is, there is at least 1 cointegrating relationship. This continues until it is assumed that there are 5 cointegrating relationships. At this time, the maximum eigenvalue statistic is 27.8952, which is greater than the 5% critical value of 12.5179, and the P value is 0.0001, which is less than 0.05, so the original hypothesis is rejected, that is, there are at least 6 cointegrating relationships.
[0152] 4) Model stability test:
[0153] like Figure 6The AR root diagram shown in the figure uses the AR root diagram to demonstrate the stability of the vector error correction model. The blue points represent the characteristic roots. When the points are on the horizontal line, the characteristic roots are real values, and the characteristic roots that are not on the horizontal line are imaginary values. When all the characteristic roots are within the unit circle, the model is stable. As can be seen from the figure, all the characteristic roots are within the unit circle, so the established model is stable.
[0154] From the above analysis, we know that six features that are strongly correlated with power, namely, current average phase, horizontal global radiation, photovoltaic system efficiency, inclined global radiation, relative humidity and temperature, can be selected from the 10 features of the photovoltaic data set for the next prediction experiment.
[0155] (2) Analysis of photovoltaic power prediction results
[0156] The data set used in the present invention is provided by the Australian Photovoltaic Power Station (DKASC). The data used is the photovoltaic power data of the 69-Site_17-Sanyo power station in Australia, with a time resolution of 5 minutes, and a total of 11 characteristic variables including power. The data set is divided into a training set, a validation set, and a test set. The historical photovoltaic data set from 00:00 on January 1, 2016 to 23:55 on December 31, 2019 is used as the training set, the historical data of the power station from 00:00 on January 1, 2020 to 23:55 on June 30 is used as the validation set, and the photovoltaic power station data from 00:00 on July 1, 2020 to 23:55 on December 31, 2020 is used as the test set to evaluate the effectiveness and generalization ability of this method.
[0157] The prediction performance evaluation indicators are as follows.
[0158] 1) Mean absolute error
[0159]
[0160] MAE represents the average absolute error between the predicted value and the actual value. It is used to measure the size of the model's prediction error.
[0161] 2) Root mean square error
[0162]
[0163] It represents the average of the squares of the errors between the predicted values and the actual values, and then takes the square root. RMSE is more sensitive to larger errors and can therefore reflect the impact of large errors.
[0164] 3) Coefficient of determination
[0165]
[0166] R 2It indicates the degree to which the regression model explains the variation in the data. It reflects the goodness of fit of the model. 2 The values are between 0 and 1, with 1 indicating a perfect fit and 0 indicating that the model has no predictive power.
[0167] In the above formula: n is the number of samples; y i is the actual photovoltaic power value at time i; is the predicted value of photovoltaic power at time i; is the average value of the actual photovoltaic power value.
[0168] like Figure 7 This is the photovoltaic power prediction result diagram from 00:00 on August 22, 2020 to 23:55 on August 28, 2020;
[0169] The evaluation indicators of the prediction results of the two models from 00:00 on August 22, 2020 to 23:55 on August 28, 2020 were calculated using MAE, RMSE and R 2 The evaluation was carried out and the results are shown in the following table.
[0170] Table 6 Comparison of photovoltaic output forecast results from August 22, 2020 to August 28, 2020
[0171]
[0172] like Figure 7 As shown in Table 6, the power prediction curve obtained by using the improved RFNN-QLSTM combined model for power prediction can basically fit the actual power curve without obvious error. However, on August 22, 23, 25 and 28, 2020, the power prediction curve obtained by using the RFNN model for prediction showed obvious errors from the actual power curve.
[0173] like Figure 8 Shown is the photovoltaic power prediction results on August 25, 26 and 27, 2020.
[0174] It can be seen that when the improved RFNN-QLSTM combined model is used for power prediction, the obtained power prediction curve can basically fit the real power curve without obvious fluctuations, and the prediction result is significantly better than the prediction result of photovoltaic power prediction using the RFNN model.
[0175] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0176] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A photovoltaic power prediction method based on VECM and improved RFNN-QLSTM, characterized in that: include: Preprocess the original photovoltaic data for outliers and missing values; A vector error correction model (VECM) is constructed to capture the equilibrium regression relationship between photovoltaic data and meteorological factors. Error correction terms are introduced into the vector autoregression model to identify the cointegration relationship and short-term deviation between variables in photovoltaic data. Meteorological factors are screened through the vector error correction model, and a new photovoltaic data set is constructed based on the screening results. Construct an improved recurrent fuzzy neural network-quantum long short-term memory network RFNN-QLSTM photovoltaic power short-term prediction model based on the vector error correction model VECM; The new photovoltaic data set is used to train a photovoltaic power short-term prediction model to predict and output photovoltaic output prediction results.
2. The photovoltaic power prediction method based on improved RFNN-QLSTM of VECM according to claim 1 is characterized in that: The error correction term is introduced on the basis of the vector autoregression model to obtain the vector error correction model, the formula is as follows: Where ΔY t is the difference of the time series variable at time t, representing the short-term dynamic relationship, Γ i is the coefficient matrix for lag i, ΔY t represents the time series under investigation, p is the lag length, Π is the influence matrix, which contains information about long-term relationships, and ε t is an n×1 error vector used to estimate the likelihood ratio LR to determine the ΔY in the system t The cointegrating vector of .
3. The photovoltaic power prediction method based on improved RFNN-QLSTM of VECM according to claim 2 is characterized in that: The constructed vector error correction model is subjected to Johnson cointegration relationship test and model stability test in turn, and the cointegration results are analyzed to identify the variable relationship in the photovoltaic data.
4. The photovoltaic power prediction method based on improved RFNN-QLSTM of VECM according to claim 1 is characterized in that: The construction method of quantum long short-term memory network model includes: The quantum long short-term memory network model uses variational quantum circuits to replace long short-term memory network units to form quantum long short-term memory network units. The corresponding model architecture is defined as: f t =σ(VQC1(v t )), i t =σ(VQC2(v t )), the t =σ(VQC4(v t )), h t =o t ×tanh(c t ); Among them, f t For the forget gate, i t For the input gate, is the candidate quantity, o t is the output gate, c t is the unit state gate, h t is the hidden state at the current moment, the current input and the hidden state of the previous time step are used as input v t , σ and tanh represent the sigmoid and hyperbolic tangent activation functions, respectively.
5. The photovoltaic power prediction method based on VECM and improved RFNN-QLSTM according to claim 4 is characterized in that: The quantum long short-term memory network model also includes: Input layer: responsible for receiving and processing raw time series data; Output layer: Converts the processing results of the quantum long short-term memory network model into the final output for the next step of time series prediction.
6. The photovoltaic power prediction method based on improved RFNN-QLSTM of VECM according to claim 1, characterized in that: The improved recurrent fuzzy neural network model includes: an improved recurrent fuzzy neural network obtained by replacing and improving the recurrent layer in the recurrent fuzzy neural network by a quantum long short-term memory network.
7. A system using the photovoltaic power prediction method based on VECM and improved RFNN-QLSTM according to any one of claims 1 to 6, characterized in that: Contains the following modules: Data preprocessing module: used to preprocess the outliers and missing values of the original photovoltaic data; Vector error correction module: used to capture the equilibrium regression relationship between photovoltaic data and meteorological factors and between meteorological factors. Error correction terms are introduced on the basis of the vector autoregression model to identify the cointegration relationship and short-term deviation between variables in photovoltaic data. Relevant features are screened out from photovoltaic data through the vector error correction model and a new photovoltaic data set is constructed. Photovoltaic power short-term prediction module: An improved recurrent fuzzy neural network model is constructed by replacing the recurrent layer in the recurrent fuzzy neural network with a quantum long short-term memory network. A new photovoltaic data set constructed after screening relevant features through a vector error correction model is used as input into the photovoltaic power short-term prediction model to output photovoltaic output prediction results.
8. A computer-readable storage medium, characterized in that: The readable storage medium stores computer instructions. When the computer reads the computer instructions in the storage medium, the computer executes the photovoltaic power prediction method based on VECM and improved RFNN-QLSTM as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Weather-based earning prediction method and apparatus
CN106127513A
Two-stage photovoltaic power prediction method considering error correction
CN111626473A
Photovoltaic generation power prediction method and system based on error correction and fuzzy logic
CN112215428A
Ultra-short-term photovoltaic power prediction method based on improved whale optimization algorithm
CN117318036A
QLSTM-based short-term photovoltaic power generation power prediction method and device
CN118568572A