A mechanism model embedded deep learning photovoltaic short-term prediction method

By replacing the tanh and sigmoid functions with the Softsign function in the LSTM model and combining it with a single diode model, a Diode-LSTM model is constructed, which solves the problem of poor reliability of photovoltaic power generation prediction results and achieves higher accuracy and faster convergence of short-term photovoltaic prediction.

CN117277271BActive Publication Date: 2026-11-20STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311009525.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2026-11-20
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

Existing data-driven photovoltaic power generation forecasting methods are highly dependent on data quality and quantity, and do not consider the internal mechanisms of photovoltaic power generation, resulting in poor reliability of forecast results.

Method used

The tanh and sigmoid functions of the LSTM model are replaced with the Softsign function, and combined with the single diode model, a Diode-LSTM model is constructed for short-term photovoltaic forecasting.

Benefits of technology

It improves the accuracy and stability of predictions, has faster convergence speed, better gradient propagation and robustness, and enhances the model's generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117277271B_ABST
    Figure CN117277271B_ABST
Patent Text Reader

Abstract

The application relates to a mechanism model embedded deep learning photovoltaic short-term prediction method, which comprises the following steps: replacing the tanh function of an LSTM model with a Softsign function, replacing the sigmoid function of the LSTM model with a CSS function, and obtaining an improved LSTM model; combining a single diode model and the improved LSTM model to obtain a Diode-LSTM model, training the Diode-LSTM model by using historical data, obtaining a trained Diode-LSTM model, and using the trained Diode-LSTM model to predict the output power of a photovoltaic power generation system in a future period of time; comparing the predicted output power with the actual output power, evaluating the accuracy of the prediction, and adjusting and optimizing as required. The application has better gradient transmission, the gradient of the Softsign function is more gentle when the input is close to 0, so that the gradient can be better transmitted, the problems of gradient disappearance or explosion can be avoided, the convergence speed is faster, the robustness and the generalization ability are better, and the application can better adapt to different data sets and tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of machine learning and deep learning technology, and in particular to a deep learning method for short-term photovoltaic prediction that embeds a mechanistic model. Background Technology

[0002] As the proportion of installed photovoltaic (PV) capacity continues to increase, curtailment of solar power is also becoming more frequent, making the integration of PV power generation particularly important. Accurate PV power forecasting plays a crucial role in power system dispatching, and improving the accuracy of power forecasting is a major challenge in PV power generation prediction.

[0003] Data-driven photovoltaic power generation prediction methods are simple to model, have mature algorithms, and are fast to calculate. However, they are entirely based on numerical calculations, highly dependent on the quality and quantity of data, and do not consider the internal mechanisms of photovoltaic power generation, resulting in poor reliability of prediction results. Summary of the Invention

[0004] To address the problem of poor reliability in prediction results, the present invention aims to provide a deep learning method for short-term photovoltaic prediction that embeds a mechanism model with high accuracy, low complexity, and good transferability.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a deep learning method for short-term photovoltaic prediction based on mechanistic model embedding, the method comprising the following sequential steps:

[0006] (1) The tanh function of the LSTM model is replaced by the Softsign function, and the sigmoid function of the LSTM model is replaced by the CSS function to obtain an improved LSTM model, and the feasibility is proven.

[0007] (2) Combine the single diode model and the improved LSTM model to obtain the Diode-LSTM model. Use historical data to train the Diode-LSTM model to obtain the trained Diode-LSTM model. Use the trained Diode-LSTM model to predict the output power of the photovoltaic power generation system in the future.

[0008] (3) Compare the predicted output power with the actual output power to evaluate the accuracy of the prediction, and make adjustments and optimizations as needed.

[0009] In step (1), the Softsign function maps the input value to the range [-1, 1], and its mathematical expression is:

[0010]

[0011] Where, x P It is the input value, |x P | represents xP The absolute value of the input is 1. When the input value is positive or negative infinity, the output value of the Softsign function approaches 1 or -1, and when the input value is 0, the output value is 0.

[0012] The output range of the tanh function is [-1, 1], and its function expression is:

[0013]

[0014] Where x is the input, the function value approaches 1 when the input value is positive infinity, approaches -1 when the input value is negative infinity, and is 0 when the input value is 0;

[0015] The mathematical expression for the CSS function is:

[0016]

[0017] In the formula, x P It is the input value;

[0018] The Sigmoid function maps input values ​​to the range [0, 1] or [-1, 1]. Its function form is:

[0019]

[0020] Where x is the input, the function value approaches 1 when the input value is positive infinity, approaches 0 when the input value is negative infinity, and is 0.5 when the input value is 0.

[0021] The improved LSTM model consists of three layers of neurons: each layer includes a forget gate, an input gate, an output gate, and a memory cell. The forget gate f t The information to be forgotten in the memory cells of the previous time step has been determined, and the calculation formula is as follows:

[0022] f t =CSS(W f [h t-1 ,x t ]+b f (5)

[0023] Input gate i t The amount of memory cells that need to be renewed is controlled by the following formula:

[0024] i t =CSS(W i [h t-1 ,xt ]+b i (6)

[0025] Candidate memory cells are used to calculate candidate values ​​for updating memory cells. Its calculation process is as follows:

[0026]

[0027] Then, the old state C of the cell is retrieved through the input gate, the forget gate, and candidate memory cells. t-1 Update memory cell C at the current time step. t :

[0028]

[0029] The output O of the improved LSTM model t for:

[0030] O t =CSS(W0[h t-1 ,x t ]+b0) (9)

[0031] The final hidden state h t Determined by the output gate and the memory cell together:

[0032] h t =O t Softsign(C t (10)

[0033] Among them, W f b f These are the weights and biases of the forget gate, respectively; W i b i These are the weights and biases of the input gate, respectively; W C b C These are the weights and biases of the updated values, respectively; W O b O These are the weights and biases of the output gate, respectively; CSS(·) and Softsign(·) are the activation functions; x t This is the input for the current time step; [h t-1 ,x t [] indicates column merging of matrices or vectors with the same number of rows.

[0034] Step (2) specifically refers to the following: In the single-diode model, there is a certain relationship between the output current of the photovoltaic cell and the input light intensity, which can be expressed by the following formula:

[0035]

[0036] Among them, Iph It is the photocurrent generated by the photovoltaic cell, I L It is the light intensity of the photovoltaic cell, V oc It is the open-circuit voltage of the photovoltaic cell, R. s It is the series resistance of the photovoltaic cell, R. sh q is the parallel resistance of the photovoltaic cell, k is the amount of electron charge, T is the temperature of the photovoltaic cell, n is the ideality factor of the photovoltaic cell, V is the voltage of the photovoltaic cell, and I is the output current of the photovoltaic cell.

[0037] The output current is proportional to the input light intensity, and the output power is the current multiplied by the voltage. The output power x of a single-diode model... q Represented as:

[0038]

[0039] By combining the single-diode model with the improved LSTM model, the output power x q The Diode-LSTM model is obtained by using the input of the current time step.

[0040] As can be seen from the above technical solution, the beneficial effects of the present invention are as follows: First, the present invention has a faster convergence speed. When the input is close to 0, the gradient change of the Softsign function is more gradual, so it can converge faster. Second, the present invention has better gradient propagation. When the gradient of the Softsign function is close to 0, it is more gradual, so it can better propagate the gradient and avoid the problems of gradient vanishing or exploding. Third, the present invention has better robustness. When the input exceeds a certain range, the output value of the Softsign function will also exceed a certain range, so it can better handle outliers. Fourth, the present invention has better generalization ability. The output value of the Softsign function is between [-1, 1], so it can better adapt to different datasets and tasks and has better generalization ability. Attached Figure Description

[0041] Figure 1 This is a flowchart of the method of the present invention;

[0042] Figure 2 This is a structural diagram of the improved LSTM model in this invention;

[0043] Figure 3 This is a graph of the Sigmoid function in this invention;

[0044] Figure 4 This is a graph of the tanh function in this invention;

[0045] Figure 5 This is a graph of the Softsign function in this invention;

[0046] Figure 6 This is a graph of the CSS function of the present invention. Detailed Implementation

[0047] like Figure 1 As shown, a deep learning-based method for short-term photovoltaic prediction embedding a mechanistic model is presented. This method includes the following sequential steps:

[0048] (1) The tanh function of the LSTM model is replaced by the Softsign function, and the sigmoid function of the LSTM model is replaced by the CSS function to obtain an improved LSTM model, and the feasibility is proven.

[0049] (2) Combine the single diode model and the improved LSTM model to obtain the Diode-LSTM model. Use historical data to train the Diode-LSTM model to obtain the trained Diode-LSTM model. Use the trained Diode-LSTM model to predict the output power of the photovoltaic power generation system in the future.

[0050] (3) Compare the predicted output power with the actual output power to evaluate the accuracy of the prediction, and make adjustments and optimizations as needed.

[0051] The LSTM model is a Long Short-Term Memory network model.

[0052] like Figure 5 As shown, in step (1), the Softsign function maps the input value to the range [-1, 1], and its mathematical expression is:

[0053]

[0054] Where, x P It is the input value, |x P | represents x P The absolute value of the input is 1. When the input value is positive or negative infinity, the output value of the Softsign function approaches 1 or -1, and when the input value is 0, the output value is 0.

[0055] The Softsign function can be used as an activation function in neural networks to enhance their nonlinear transformation capabilities, thereby improving the accuracy and stability of short-term photovoltaic (PV) forecasting. In short-term PV forecasting, neural networks are typically used to model the relationship between PV power generation and weather factors. Since this relationship is nonlinear, a nonlinear activation function is needed to enhance the nonlinear transformation capabilities of the neural network. The Softsign function is a commonly used nonlinear activation function with a large gradient, which can accelerate the training of the neural network and enhance its nonlinear transformation capabilities. Therefore, applying the Softsign function to short-term PV forecasting can improve the accuracy and stability of the neural network, leading to better predictions of PV power generation.

[0056] The advantage of the Softsign function is that it has a large gradient when the input value is close to 0, which helps to accelerate the training of neural networks. It is also easier to compute than some other activation functions (such as sigmoid and tanh). Furthermore, the output value of the Softsign function does not saturate when the input value is positive or negative infinity, which helps to avoid the gradient vanishing problem.

[0057] like Figure 4 As shown, the output range of the tanh function is [-1, 1], and its function expression is:

[0058]

[0059] Where x is the input, the function value approaches 1 when the input value is positive infinity, approaches -1 when the input value is negative infinity, and is 0 when the input value is 0;

[0060] like Figure 6 As shown, the mathematical expression of the CSS function is:

[0061]

[0062] In the formula, x P It is the input value;

[0063] Because the Softsign function has a larger gradient, it can accelerate the training of neural networks and enhance their nonlinear transformation capabilities. Therefore, the tanh function in the LSTM model can be replaced with the Softsign function. The range of the sigmoid function is different, as the range of the Softsign function is [-1, 1]. To compress it to the range [0, 1], a simple transformation can be performed. Specifically, the output value of the Softsign function can be added by 1 and then divided by 2. This compresses its range to [0, 1]. This function can be called the Compressed Softsign Function (CSS function).

[0064] like Figure 3 As shown, the Sigmoid function maps input values ​​to the range [0,1] or [-1,1]. Its function form is:

[0065]

[0066] Where x is the input, the function value approaches 1 when the input value is positive infinity, approaches 0 when the input value is negative infinity, and is 0.5 when the input value is 0.

[0067] The Softsign function is a continuously differentiable function with a range of [-1, 1] in the real number domain. Similar to the tanh function, the Softsign function also exhibits non-linear properties, mapping input data to a non-linear space. The CSS and sigmoid functions have similar graphs. When the tanh and sigmoid functions in an LSTM are replaced with the Softsign and CSS functions:

[0068] Vanishing gradient problem: The choice of activation function in an LSTM model affects the effectiveness of gradient propagation. The tanh function saturates when the input is large or small, leading to the vanishing gradient problem. In contrast, the Softsign function has a larger gradient when the input is close to zero, thus mitigating the vanishing gradient problem.

[0069] Computational efficiency: The Softsign function is relatively simple to compute, requiring only one division and absolute value operation, making it relatively efficient. The tanh function, on the other hand, requires exponentiation, resulting in higher computational complexity. If computational efficiency is a critical factor in certain applications, then using the Softsign function can offer a significant advantage.

[0070] Performance Validation: In practice, replacing the tanh function in LSTM with the Softsign function may impact model performance. Therefore, a series of experiments and evaluations are needed to verify the effect. By training LSTM models on the same dataset and comparing performance metrics such as prediction accuracy and convergence speed using the tanh and Softsign functions, the effectiveness of the Softsign function on specific tasks can be evaluated.

[0071] In summary, replacing the tanh function in LSTM with the Softsign function is feasible, as it can alleviate the gradient vanishing problem and has higher computational efficiency.

[0072] like Figure 2 As shown, the improved LSTM model consists of three layers of neurons: each layer includes a forget gate, an input gate, an output gate, and a memory cell. The forget gate f t The information to be forgotten in the memory cells of the previous time step has been determined, and the calculation formula is as follows:

[0073] f t =CSS(W f [h t-1 ,x t ]+b f (5)

[0074] Input gate i t The amount of memory cells that need to be renewed is controlled by the following formula:

[0075] i t =CSS(W i [h t-1 ,x t ]+b i (6)

[0076] Candidate memory cells are used to calculate candidate values ​​for updating memory cells. Its calculation process is as follows:

[0077]

[0078] Then, the old state C of the cell is retrieved through the input gate, the forget gate, and candidate memory cells. t-1 Update memory cell C at the current time step. t :

[0079]

[0080] The output O of the improved LSTM model t for:

[0081] O t =CSS(W0[ht-1 ,x t ]+b0) (9)

[0082] The final hidden state h t Determined by the output gate and the memory cell together:

[0083] h t =O t Softsign(C t (10)

[0084] Among them, W f b f These represent the weights and biases of the forget gate, respectively; W i b i These are the weights and biases of the input gate, respectively; W C b C These are the weights and biases of the updated values, respectively; W O b O These are the weights and biases of the output gate, respectively; CSS(·) and Softsign(·) are the activation functions; x t This is the input for the current time step; [h t-1 ,x t [] indicates column merging of matrices or vectors with the same number of rows.

[0085] The single-diode model is a simplified photovoltaic mechanism model that treats the photovoltaic cell as a single diode, describing the relationship between its current and voltage using a simple circuit model. This model assumes that the current in the photovoltaic cell is primarily generated by photogenerated carriers, and that the resistance and capacitance of the photovoltaic cell are negligible.

[0086] Step (2) specifically refers to the following: In the single-diode model, there is a certain relationship between the output current of the photovoltaic cell and the input light intensity, which can be expressed by the following formula:

[0087]

[0088] Among them, I ph It is the photocurrent generated by the photovoltaic cell, I L It is the light intensity of the photovoltaic cell, V oc It is the open-circuit voltage of the photovoltaic cell, R. s It is the series resistance of the photovoltaic cell, R. sh q is the parallel resistance of the photovoltaic cell, k is the amount of electron charge, T is the temperature of the photovoltaic cell, n is the ideality factor of the photovoltaic cell, V is the voltage of the photovoltaic cell, and I is the output current of the photovoltaic cell.

[0089] The output current is proportional to the input light intensity, and the output power is the current multiplied by the voltage. The output power x of a single-diode model... q Represented as:

[0090]

[0091] By combining the single-diode model with the improved LSTM model, the output power x q The Diode-LSTM model is obtained by using the input of the current time step. The Diode-LSTM model has the same structure as the improved LSTM model, except that the input of the Diode-LSTM model is the output x of the single-diode model. q It was named the Diode-LSTM model.

[0092] In summary, this invention offers several advantages: First, faster convergence speed. The Softsign function exhibits a smoother gradient change when the input is close to 0, leading to faster convergence. Second, better gradient propagation. The Softsign function's gradient is smoother when the input is close to 0, thus better propagating the gradient and avoiding vanishing or exploding gradients. Third, improved robustness. The Softsign function's output value also exceeds a certain range when the input exceeds a certain range, thus better handling outliers. Fourth, better generalization ability. The Softsign function's output value is between -1 and 1, allowing it to better adapt to different datasets and tasks, resulting in superior generalization.

Claims

1. A deep learning-based short-term photovoltaic prediction method embedding a mechanistic model, characterized in that: The method includes the following steps in sequence: (1) The tanh function of the LSTM model is replaced by the Softsign function, and the sigmoid function of the LSTM model is replaced by the CSS function to obtain an improved LSTM model, and the feasibility is proven. The Softsign function maps input values ​​to the range [-1, 1], and its mathematical expression is: (1) in, It is the input value. express The absolute value of the input is 1. When the input value is positive or negative infinity, the output value of the Softsign function approaches 1 or -1, and when the input value is 0, the output value is 0. The mathematical expression for the CSS function is: (3) In the formula, It is the input value; The improved LSTM model consists of three layers of neurons: each layer includes a forget gate, an input gate, an output gate, and a memory cell. The information to be forgotten in the memory cells of the previous time step has been determined, and the calculation formula is as follows: (5) Input gate The amount of memory cells that need to be renewed is controlled by the following formula: (6) Candidate memory cells are used to calculate candidate values ​​for updating memory cells. Its calculation process is as follows: (7) Then, the old state of the cell is retrieved through the input gate, the forget gate, and candidate memory cells. Update memory cell C at the current time step. t : (8) Output of the improved LSTM model for: (9) Final hidden state Determined by the output gate and the memory cell together: (10) in, , These are the weights and biases of the forget gate, respectively; , These are the weights and biases of the input gate, respectively; , These are the weights and biases of the updated values, respectively; , These are the weights and biases of the output gate, respectively; CSS(·) and Softsign(·) are the activation functions; This is the input for the current time step; , [] indicates column merging of matrices or vectors with the same number of rows; (2) Combine the single diode model and the improved LSTM model to obtain the Diode-LSTM model. Use historical data to train the Diode-LSTM model to obtain the trained Diode-LSTM model. Use the trained Diode-LSTM model to predict the output power of the photovoltaic power generation system in the future. Step (2) specifically refers to the following: In the single-diode model, there is a certain relationship between the output current of the photovoltaic cell and the input light intensity, which can be expressed by the following formula: (11) in, It is the photocurrent generated by the photovoltaic cell. It refers to the light intensity of the photovoltaic cells. It is the open-circuit voltage of the photovoltaic cell. It is the series resistance of the photovoltaic cell. It is the parallel resistance of the photovoltaic cell. It is the amount of electron charge. It is Boltzmann's constant. It's the temperature of the photovoltaic cells. It is an ideal factor for photovoltaic cells. It is the voltage of the photovoltaic cell. It is the output current of the photovoltaic cell; The output current is proportional to the input light intensity, and the output power is the current multiplied by the voltage. The output power of a single-diode model... Represented as: (12) By combining the single-diode model with the improved LSTM model, the output power is... The Diode-LSTM model is obtained by using the input of the current time step; (3) Compare the predicted output power with the actual output power, evaluate the accuracy of the prediction, and make adjustments and optimizations as needed.

2. The deep learning photovoltaic short-term prediction method with embedded mechanism model according to claim 1, characterized in that: In step (1), the output range of the tanh function is [-1, 1], and its function expression is: (2) in, As input, when the input value is positive infinity, the function value approaches 1; when the input value is negative infinity, the function value approaches -1; and when the input value is 0, the function value is 0. The Sigmoid function maps input values ​​to the range [0, 1] or [-1, 1]. Its function form is: (4) in, x As input, the function value approaches 1 when the input value is positive infinity, approaches 0 when the input value is negative infinity, and is 0.5 when the input value is 0.

Citation Information

Patent Citations

  • Short-term photovoltaic power generation forecasting method based on long-term and short-term memory neural network

    CN109284870A

  • Ultra-short-term photovoltaic power prediction method based on Informer encoder and LSTM

    CN116341613A