Photovoltaic output prediction method based on ELM and LSTM
Through the photovoltaic output prediction method based on ELM and LSTM, the problem of low accuracy of photovoltaic output prediction is solved. Through the adjustment of data processing and model training methods, the accuracy and efficiency of photovoltaic output prediction are improved.
Patent Information
- Application Number
- CN202510651894.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the accuracy of photovoltaic output prediction is low, and there are problems such as slow training and insufficient accuracy.
The photovoltaic output prediction method based on ELM and LSTM is adopted to pre-process the data set, divide the training set, verification set and test set, train the model using the training set and verification set, and adjust the model's training method according to the difference between the predicted value and the actual value, the prediction duration and the number of features, to improve the prediction accuracy.
Accurate identification of continuous anomaly data is achieved, closed cycle iterations in model prediction are reduced, and the accuracy of photovoltaic output prediction is improved.
Smart Images

Figure CN120509542A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of energy power prediction, and in particular to a photovoltaic output prediction method based on ELM and LSTM. Background Art
[0002] With the widespread application of photovoltaic energy, accurate prediction of photovoltaic power is crucial for grid dispatching and energy management. In the prior art, traditional photovoltaic power prediction methods mainly rely on physical models or simple statistical methods, which have limitations when dealing with complex meteorological conditions and nonlinear relationships. In recent years, deep learning technology has made significant progress in the field of time series prediction. In order to improve the accuracy and efficiency of photovoltaic output prediction and meet the demand for real-time prediction, an improved deep learning algorithm that can take into account nonlinear time series feature learning and fast convergence is still needed. Based on this, the present invention proposes a photovoltaic output prediction method based on ELM and LSTM, which effectively solves the problems of slow training, insufficient precision, and low accuracy of predicted values of photovoltaic output prediction in the prior art.
[0003] Chinese Patent Publication No.: CN111008728B discloses a method for predicting the short-term output of a distributed photovoltaic power generation system, which includes the following steps: Step S1: Collecting historical output data, atmospheric temperature data, and solar irradiation data of the distributed photovoltaic power generation system, and performing data normalization preprocessing; Step S2: Using a multi-model single-variable prediction method, establishing a first prediction model based on an extreme learning machine (ELM) to perform a preliminary prediction of the day to be measured; Step S3: Using a single-model multi-variable prediction method, establishing a second prediction model based on a long short-term memory (LSTM) deep learning network, correcting the results of the first prediction model in combination with historical data, and obtaining the final photovoltaic output prediction result. It can be seen that the method for predicting the short-term output of a distributed photovoltaic power generation system has the problem of low accuracy of the predicted value. Summary of the Invention
[0004] To this end, the present invention provides a photovoltaic output prediction method based on ELM and LSTM to overcome the problem of low accuracy of prediction values in the prior art.
[0005] To achieve the above objectives, the present invention provides a photovoltaic output prediction method based on ELM and LSTM, comprising:
[0006] Acquire raw data required for photovoltaic output prediction, and align the raw data according to time series to form an aligned data set;
[0007] Preprocessing the aligned data set to obtain basic data;
[0008] Dividing the basic data into a training set, a validation set, and a test set in chronological order;
[0009] Using the training set and the validation set to train and optimize the photovoltaic output prediction model based on ELM and LSTM in sequence to form a photovoltaic output to be tested model, and using the test set to test the photovoltaic output to be tested model to form a photovoltaic output target prediction model;
[0010] Obtaining a predicted value and an actual value of the photovoltaic output target prediction model;
[0011] Determining a photovoltaic output prediction accuracy processing method based on the difference between the predicted value and the actual value, including further determining whether a continuous segment is abnormal based on the number of consecutive abnormal predicted values and the linear fit of the change in the model comprehensiveness parameter;
[0012] Or, adjusting the training method of the photovoltaic output prediction model based on ELM and LSTM according to the prediction duration of the model;
[0013] Obtaining respectively a predicted value at a next prediction moment predicted according to the photovoltaic output prediction accuracy processing method and an actual value at the next prediction moment, so as to re-evaluate the accuracy of the prediction;
[0014] If the accuracy still does not meet the requirements, the number of features for scene comparison / the time interval selected for outlier detection are adjusted until the accuracy meets the requirements, so as to output the predicted values for several predicted moments.
[0015] Furthermore, the training set is used to train a photovoltaic output prediction model based on ELM and LSTM, including:
[0016] Sampling at equal time intervals from the training set to obtain a corresponding amount of training data;
[0017] The corresponding amount of training data is input into the forget gate, input gate and E-gate of the LSTM respectively to output the cell state and hidden layer output at the current moment respectively.
[0018] Furthermore, a photovoltaic output prediction accuracy processing method is determined based on the difference between the predicted value and the actual value, including:
[0019] Calculating the difference according to the predicted value and the actual value;
[0020] comparing the difference with a preset second difference;
[0021] If the difference is greater than or equal to the preset second difference, it is determined that the accuracy of the photovoltaic output prediction does not meet the requirement, and the photovoltaic output prediction accuracy processing method is adopted.
[0022] Furthermore, whether the continuous segment is abnormal is further determined based on the number of predicted values of continuous anomalies and the linear fit of the variation of the comprehensiveness parameter of the model, including:
[0023] Obtain the number of consecutive anomaly predictions and the change in model comprehensiveness parameters;
[0024] Calculate the number of predicted values of consecutive anomalies and the linear fit of the changes in the model's overall parameters;
[0025] Comparing the linear fit with a preset linear fit;
[0026] If the linear fit is greater than or equal to a preset linear fit, it is determined that the continuous segment is abnormal.
[0027] Furthermore, the training method of the photovoltaic output prediction model based on ELM and LSTM is adjusted according to the prediction duration of the model, including:
[0028] Comparing the difference with the preset second difference and the preset first difference respectively;
[0029] If the difference is greater than the preset first difference and less than the preset second difference, it is preliminarily determined that the accuracy of the propagation path of the input data set input into the photovoltaic output target prediction model does not meet the requirements, and the prediction time of the model is obtained;
[0030] Comparing and analyzing the prediction time of the model with the preset standard prediction time and the time taken for the input data to propagate through a single lap in the model;
[0031] If the prediction duration of the model is greater than the preset standard prediction duration, and the remainder of the prediction duration of the model and the duration used for the single-loop propagation is less than the preset remainder value, it is further determined that the accuracy of the propagation path of the input data set in the photovoltaic output target prediction model does not meet the requirements, and the training method of the photovoltaic output prediction model based on ELM and LSTM is adjusted from the training method of training the model with a training set to the training method of adding several propagation nodes to the training set to train the model.
[0032] Furthermore, if the accuracy still does not meet the requirement, adjusting the number of features for scene comparison / adjusting the time interval selected for outlier detection includes:
[0033] comparing the difference with the preset first difference;
[0034] If the difference is greater than the preset first difference, it is determined that the accuracy still does not meet the requirement, and the number of features is increased or the time interval selected for outlier detection is increased.
[0035] Furthermore, the number of features in the scene comparison is positively correlated with the difference amount.
[0036] Furthermore, the aligned data set is preprocessed to obtain basic data, including
[0037] Get the missing values in the aligned dataset:
[0038] Interpolate / delete the missing values to complete the missing value filling or elimination and form a complete data set;
[0039] Performing outlier detection on the complete data set to correct / mark the detected abnormal data to form a data set to be divided;
[0040] Dividing the data set to be divided into an input data set and an output data set;
[0041] Perform numerical scaling / Z-score normalization on all input datasets to output the underlying data;
[0042] The time intervals of the divided input data set and the divided output data set are the same.
[0043] Furthermore, the raw data includes photovoltaic output data, meteorological data and time data.
[0044] Furthermore, the predicted values and actual values are stored in a database for later analysis or retraining.
[0045] Compared with the prior art, the beneficial effect of the present invention is that, by further determining whether a continuous segment is abnormal based on the number of predicted values of continuous anomalies and the linear fit of the change in the comprehensiveness parameter of the model, the problem of decreased prediction accuracy of the model due to inaccurate judgment of the occurrence of continuous abnormal data is solved, and accurate identification of continuous abnormal data is achieved; by adjusting the training method of the photovoltaic output prediction model based on ELM and LSTM according to the prediction time of the model, the technical problem of large errors in the prediction value of the model caused by closed loop iterations during the propagation of input data in the model due to excessive similarity between propagation nodes or insufficient recognition of the types of propagation nodes is solved, and accurate identification of the errors in the propagation of input data in the model is achieved, thereby improving the prediction accuracy of the model; by adjusting the number of features for scene comparison / adjusting the time interval selected for outlier detection, the problem of decreased prediction accuracy of the model caused by too few features for scene comparison and the problem that the time interval selected for outlier monitoring is too short to reflect the overall characteristics of the outlier are solved, and the prediction accuracy of the model is improved.
[0046] Furthermore, by obtaining the number of predicted values of continuous anomalies and the change in the comprehensiveness parameters of the model and calculating the fit between the two, the fit between the two is compared to determine the abnormality of the continuous segment, which solves the problem that continuous anomalies are difficult to judge and realizes the identification of continuous anomalies.
[0047] Furthermore, by comparing and analyzing the model's prediction duration with the preset standard prediction duration and the duration of a single-loop propagation of the input data in the model, if the model's prediction duration is greater than the preset standard prediction duration, and the remainder of the model's prediction duration and the duration of the single-loop propagation is less than a preset remainder value, it is further determined that the accuracy of the propagation path of the input data set when input into the photovoltaic output target prediction model does not meet the requirements, and the training method of the photovoltaic output prediction model based on ELM and LSTM is adjusted from a training method of training the model with a training set to a training method of adding several propagation nodes to the training set to train the model. This solves the technical problem of large errors in the model's prediction value due to inaccurate propagation paths of the input data set when input into the photovoltaic output target prediction model, ensures that the input data set is correctly propagated when input into the photovoltaic output target prediction model, and improves the accuracy of the model's prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is an overall flow chart of the photovoltaic output prediction method based on ELM and LSTM in an embodiment of the present invention;
[0049] Figure 2 This is a flowchart of a method for determining the accuracy of photovoltaic output prediction based on the difference between the predicted value and the actual value in a photovoltaic output prediction method based on ELM and LSTM according to an embodiment of the present invention;
[0050] Figure 3 This is a flow chart of a photovoltaic output prediction method based on ELM and LSTM in an embodiment of the present invention, which further determines whether a continuous segment is abnormal based on the number of continuously abnormal prediction values and the linear fit of the change in the model comprehensiveness parameter;
[0051] Figure 4 This is a flowchart of setting the gradient of the photovoltaic output prediction method based on ELM and LSTM in an embodiment of the present invention, and adjusting the number of features for scene comparison / adjusting the time interval selected for outlier detection if the accuracy still does not meet the requirements. DETAILED DESCRIPTION
[0052] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention.
[0053] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0054] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside", and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0055] Furthermore, it should be noted that, in the description of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0056] See also Figure 1 、 Figure 2 、 Figure 3 as well as Figure 4As shown, they are respectively an overall flow chart of the photovoltaic output prediction method based on ELM and LSTM in an embodiment of the present invention, a flow chart of a processing method for determining the accuracy of photovoltaic output prediction based on the difference between the predicted value and the actual value, a flow chart for further determining whether a continuous segment is abnormal based on the number of consecutive abnormal predicted values and the linear fit of the change in the model comprehensiveness parameter, and a flow chart for adjusting the number of features for scene comparison / adjusting the time interval selected for outlier detection if the accuracy still does not meet the requirements;
[0057] The photovoltaic output prediction method based on ELM and LSTM in the embodiment of the present invention includes:
[0058] Step S1, obtaining raw data required for photovoltaic output prediction, and aligning the raw data according to time series to form an aligned data set;
[0059] Specifically, the raw data is obtained from a historical operation database of the photovoltaic power station and meteorological monitoring or a public meteorological interface. The raw data stored in the database is stored in CSV or HDF5 format.
[0060] Step S2, preprocessing the aligned data set to obtain basic data;
[0061] Step S3, dividing the basic data into a training set, a validation set, and a test set in chronological order;
[0062] In implementation, when the sampling time interval is 15 minutes, the basic data of the past month can be taken as a training set, the basic data of the past week can be taken as a validation set, and the basic data of the last 3 days can be taken as a test set.
[0063] Specifically, before training the prediction model based on ELM and LSTM, the prediction model needs to be initialized, including:
[0064] Defining a network structure to divide the prediction model into submodules including a forget gate, an input gate, an output gate, an E-gate, and a cell state update submodule;
[0065] Setting the desired parameters of the prediction model,
[0066] The required parameters include:
[0067] Hidden layer dimension, wherein the hidden layer dimension of the prediction model is adjusted according to the data scale and prediction accuracy requirements;
[0068] Learning rate, where if an optimizer such as gradient descent or Adam is used, the learning rate is initialized (e.g., 0.001 to 0.01);
[0069] Batch size, that is, the number of samples selected for each training iteration, such as 32 or 64;
[0070] Random seed, which is used to reproduce the experiment, uses a fixed initialization random number seed to ensure the traceability of ELM random weights;
[0071] Setting the E-gate, which includes: setting the number of input weights and biases randomly initialized at the ELM level, corresponding to the LSTM input dimensions;
[0072] Prepare generalized inverse matrix calculation tools (such as through numerical libraries or custom functions) to quickly solve for output weights at the beginning of training.
[0073] Step S4, using the training set and the validation set to sequentially train and optimize the photovoltaic output prediction model based on ELM and LSTM to form a photovoltaic output to be tested model, and using the test set to test the photovoltaic output to be tested model to form a photovoltaic output target prediction model;
[0074] Specifically, the process of sequentially training the photovoltaic output prediction model based on ELM and LSTM using the training set and the validation set includes forward propagation, backpropagation, and fast learning;
[0075] Specifically, fast learning: for the ELM part of the prediction model, a portion of the weights is quickly determined using generalized inverse, reducing the number of parameters that need to be iteratively updated;
[0076] Back propagation: The LSTM part of the prediction model is still updated using conventional back propagation or optimizers such as Adam.
[0077] Repeat several rounds of iterations until the training error converges or reaches a preset number of times.
[0078] Specifically, the validation set verifies the prediction error of the model, including: after each epoch or set interval, the prediction error of the model on the validation set (such as mean square error MSE, mean absolute percentage error MAPE, etc.) is recorded to evaluate the generalization performance of the model.
[0079] If the error does not meet the requirements, adjust the learning rate, hidden layer size, increase the number of training rounds, or further optimize the preprocessing method.
[0080] Step S5, obtaining the predicted value and actual value of the photovoltaic output target prediction model;
[0081] Step S6, determining a photovoltaic output prediction accuracy processing method based on the difference between the predicted value and the actual value, including further determining whether a continuous segment is abnormal based on the number of consecutive abnormal predicted values and the linear fit of the change in the model comprehensiveness parameter;
[0082] Or, adjusting the training method of the photovoltaic output prediction model based on ELM and LSTM according to the prediction duration of the model;
[0083] Step S7, respectively obtaining a predicted value at the next prediction moment predicted according to the photovoltaic output prediction accuracy processing method and an actual value at the next prediction moment, to re-evaluate the accuracy of the prediction;
[0084] Step S8: If the accuracy still does not meet the requirements, adjust the number of features for scene comparison / adjust the time interval selected for outlier detection until the accuracy meets the requirements, so as to output the predicted values for several predicted moments.
[0085] In implementation, by further determining whether a continuous segment is abnormal based on the number of predicted values of continuous anomalies and the linear fit of the change in the comprehensiveness parameter of the model, the problem of decreased prediction accuracy of the model due to inaccurate judgment of the occurrence of continuous abnormal data is solved, and accurate identification of continuous abnormal data is achieved; by adjusting the training method of the photovoltaic output prediction model based on ELM and LSTM according to the prediction time of the model, the technical problem of large errors in the prediction value of the model caused by closed loop iterations during the propagation of input data in the model due to excessive similarity between propagation nodes or insufficient recognition of the types of propagation nodes is solved, and accurate identification of the errors in the propagation of input data in the model is achieved, and the prediction accuracy of the model is improved; by adjusting the number of features for scene comparison / adjusting the time interval selected for outlier detection, the problem of decreased prediction accuracy of the model due to too few features for scene comparison and the problem that the time interval selected for outlier monitoring is too short to reflect the overall characteristics of the outliers are solved, and the prediction accuracy of the model is improved.
[0086] Specifically, the training set is used to train the photovoltaic output prediction model based on ELM and LSTM, including:
[0087] Sampling at equal time intervals from the training set to obtain a corresponding amount of training data;
[0088] The corresponding amount of training data is input into the forget gate, input gate and E-gate of the LSTM respectively to output the cell state and hidden layer output at the current moment respectively.
[0089] Specifically, the photovoltaic output prediction accuracy processing method is determined based on the difference between the predicted value and the actual value, including:
[0090] Calculating the difference according to the predicted value and the actual value;
[0091] comparing the difference with a preset second difference;
[0092] If the difference is greater than or equal to the preset second difference, it is determined that the accuracy of the photovoltaic output prediction does not meet the requirement, and the photovoltaic output prediction accuracy processing method is adopted.
[0093] Specifically, the difference amount is the absolute value of the difference between the predicted value and the actual value.
[0094] Specifically, whether a continuous segment is abnormal is further determined based on the number of predicted values of continuous anomalies and the linear fit of the variation of the comprehensiveness parameter of the model, including:
[0095] Obtain the number of consecutive anomaly predictions and the change in model comprehensiveness parameters;
[0096] Calculate the number of predicted values of consecutive anomalies and the linear fit of the changes in the model's overall parameters;
[0097] Comparing the linear fit with a preset linear fit;
[0098] If the linear fit is greater than or equal to a preset linear fit, it is determined that the continuous segment is abnormal.
[0099] In implementation, by obtaining the number of predicted values of continuous anomalies and the change in the comprehensiveness parameters of the model and calculating the fit between the two, the fit between the two is compared to determine the continuous segment anomaly, which solves the problem of difficult judgment of continuous anomalies and realizes the identification of continuous anomalies.
[0100] Specifically, the method of adjusting the training of the photovoltaic output prediction model based on ELM and LSTM according to the prediction duration of the model includes:
[0101] Comparing the difference with the preset second difference and the preset first difference respectively;
[0102] If the difference is greater than the preset first difference and less than the preset second difference, it is preliminarily determined that the accuracy of the propagation path of the input data set input into the photovoltaic output target prediction model does not meet the requirements, and the prediction time of the model is obtained;
[0103] Comparing and analyzing the prediction time of the model with the preset standard prediction time and the time taken for the input data to propagate through a single lap in the model;
[0104] If the prediction duration of the model is greater than the preset standard prediction duration, and the remainder of the prediction duration of the model and the duration used for the single-loop propagation is less than the preset remainder value, it is further determined that the accuracy of the propagation path of the input data set in the photovoltaic output target prediction model does not meet the requirements, and the training method of the photovoltaic output prediction model based on ELM and LSTM is adjusted from the training method of training the model with a training set to the training method of adding several propagation nodes to the training set to train the model, wherein the preset first difference amount is less than the preset second difference amount.
[0105] In implementation, the prediction time of the model is compared and analyzed with the preset standard prediction time and the time taken for the input data to propagate in a single loop in the model; if the prediction time of the model is greater than the preset standard prediction time, and the remainder of the prediction time of the model and the time taken for the single loop propagation is less than the preset remainder value, it is further determined that the accuracy of the propagation path of the input data set when input into the photovoltaic output target prediction model does not meet the requirements, and the training method of the photovoltaic output prediction model based on ELM and LSTM is adjusted from the training method of training the model with a training set to the training method of adding several propagation nodes to the training set to train the model. This solves the technical problem of large errors in the prediction value of the model due to the inaccuracy of the propagation path of the input data set when input into the photovoltaic output target prediction model, realizes the correct propagation of the input data set when input into the photovoltaic output target prediction model, and improves the accuracy of the model's prediction.
[0106] Specifically, the propagation nodes act as randomly initialized neurons in the extreme learning machine, responsible for nonlinear feature mapping. By enhancing the model's learning of propagation nodes, the accuracy of the propagation path is improved.
[0107] Optionally, when the capacity of the photovoltaic power station is between 100kW and 1MW, the optional range of the preset first difference amount is [5kW, 15kW], the optional range of the preset second difference amount is [15kW, 30kW], the optional range of the preset linear fit degree is [0.7, 0.9], the optional range of the preset standard prediction time is [10s, 60s], the optional range of the preset remainder value is [0.1s, 0.3s], and the optional range of the time taken for the input data to propagate in a single circle in the model is [0.5s, 2s].
[0108] Preferably, when the capacity of the photovoltaic power station is between 100kW and 1MW, the preferred embodiment of the preset first difference amount is 10kW, the preferred embodiment of the preset second difference amount is 25kW, the preferred embodiment of the preset linear fit degree is 0.8, the preferred embodiment of the preset standard prediction time is 30s, the preferred embodiment of the preset remainder value is 0.2s, and the preferred embodiment of the time taken for the input data to propagate in a single circle in the model is 1s.
[0109] Those skilled in the art will appreciate that the optional ranges and preferred embodiments of the preset first difference, the preset second difference, the preset linear fit, the preset standard prediction time, the preset remainder value, and the time taken for the input data to propagate in a single loop in the model provided in this embodiment are the values selected to best achieve the technical problem solved by the technical solution of the present invention when the capacity of the photovoltaic power station is between 100kW and 1MW in this embodiment. In actual applications or implementations, those skilled in the art can adaptively adjust the preset first difference, the preset second difference, the preset linear fit, the preset standard prediction time, the preset remainder value, and the time taken for the input data to propagate in a single loop in the model according to the actual application environment and application scenarios.
[0110] Specifically, if the accuracy still does not meet the requirements, the number of features for scene comparison / time interval for outlier detection is adjusted, including:
[0111] comparing the difference with the preset first difference;
[0112] If the difference is greater than the preset first difference, it is determined that the accuracy still does not meet the requirement, and the number of features is increased / the time interval selected for outlier detection is adjusted.
[0113] Among them, the number of features for scene comparison is first adjusted, and the accuracy is re-evaluated to see whether it meets the requirements. If it still does not meet the requirements, the time interval selected for outlier detection is adjusted.
[0114] Specifically, the number of features of the scene comparison is positively correlated with the difference amount.
[0115] Specifically, the alignment data set is preprocessed to obtain basic data, including
[0116] Get the missing values in the aligned dataset:
[0117] Interpolate / delete the missing values to complete the missing value filling or elimination and form a complete data set;
[0118] Performing outlier detection on the complete data set to correct / mark the detected abnormal data to form a data set to be divided;
[0119] Dividing the data set to be divided into an input data set and an output data set;
[0120] All input datasets are numerically scaled / normalized using Z-scores to output the underlying data.
[0121] Specifically, numerical scaling / Z-score normalization of all input datasets can accelerate model convergence and avoid numerical instabilities.
[0122] The time intervals of the divided input data set and the divided output data set are the same.
[0123] Specifically, the specific process of outlier detection for the complete data set is:
[0124] The data and corresponding scenes in the complete data set are compared with the data and corresponding scenes of the same time period previously stored in the database. If it is found that the data in the complete data set has a mutation compared with the data of the same time period stored in the database, and the scene corresponding to the data in the complete data set is the same as the scene corresponding to the data of the same time period stored in the database, it means that the data in the complete data set of the time period is an outlier.
[0125] Specifically, the correction process is:
[0126] Get the data in the five time periods adjacent to the abnormal data;
[0127] Calculate the mean of the data in the 5 time periods,
[0128] The abnormal data is replaced by the average value of the data in the five time periods to correct the abnormal data.
[0129] Those skilled in the art will appreciate that Z-score normalization is a conventional technical means well known to those skilled in the art, and therefore the Z-score normalization process will not be described in detail herein.
[0130] Specifically, the input data set is a set of input data in the training set, the test set, and the validation set, and the output data set is a set of output data in the training set, the test set, and the validation set.
[0131] Specifically, the raw data includes photovoltaic output data, meteorological data and time data.
[0132] Specifically, the original data includes:
[0133] Photovoltaic output data, which includes the actual output power of the photovoltaic power station at multiple time points.
[0134] Meteorological data, including solar irradiance, ambient temperature, humidity, wind speed, etc.
[0135] Time data, encoding the date, hour, weekend / weekday, etc., or using periodic functions to represent daily time periods.
[0136] Specifically, the predicted value and the actual value are stored in a database for later analysis or retraining.
[0137] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
Claims
1. A photovoltaic output prediction method based on ELM and LSTM, characterized in that: include: Acquire raw data required for photovoltaic output prediction, and align the raw data according to time series to form an aligned data set; Preprocessing the aligned data set to obtain basic data; Dividing the basic data into a training set, a validation set, and a test set in chronological order; Using the training set and the validation set to train and optimize the photovoltaic output prediction model based on ELM and LSTM in sequence to form a photovoltaic output to be tested model, and using the test set to test the photovoltaic output to be tested model to form a photovoltaic output target prediction model; Obtaining a predicted value and an actual value of the photovoltaic output target prediction model; Determining a photovoltaic output prediction accuracy processing method based on the difference between the predicted value and the actual value, including further determining whether a continuous segment is abnormal based on the number of consecutive abnormal predicted values and the linear fit of the change in the model comprehensiveness parameter; Or, adjusting the training method of the photovoltaic output prediction model based on ELM and LSTM according to the prediction duration of the model; Obtaining respectively a predicted value at a next prediction moment predicted according to the photovoltaic output prediction accuracy processing method and an actual value at the next prediction moment, so as to re-evaluate the accuracy of the prediction; If the accuracy still does not meet the requirements, the number of features for scene comparison / the time interval selected for outlier detection are adjusted until the accuracy meets the requirements, so as to output the predicted values for several predicted moments.
2. The photovoltaic output prediction method based on ELM and LSTM according to claim 1 is characterized in that: The training set is used to train the photovoltaic output prediction model based on ELM and LSTM, including: Sampling at equal time intervals from the training set to obtain a corresponding amount of training data; The corresponding amount of training data is input into the forget gate, input gate and E-gate of the LSTM respectively to output the cell state and hidden layer output at the current moment respectively.
3. The photovoltaic output prediction method based on ELM and LSTM according to claim 2 is characterized in that: The photovoltaic output prediction accuracy processing method is determined based on the difference between the predicted value and the actual value, including: Calculating the difference according to the predicted value and the actual value; comparing the difference with a preset second difference; If the difference is greater than or equal to the preset second difference, it is determined that the accuracy of the photovoltaic output prediction does not meet the requirement, and the photovoltaic output prediction accuracy processing method is adopted.
4. The photovoltaic output prediction method based on ELM and LSTM according to claim 3 is characterized in that: The number of predicted values of continuous anomalies and the linear fit of the variation of the comprehensiveness parameters of the model are used to further determine whether the continuous segment is abnormal, including: Obtain the number of consecutive anomaly predictions and the change in model comprehensiveness parameters; Calculate the linear fit of the number of predicted values of consecutive anomalies and the change of the model's overall parameters; Comparing the linear fit with a preset linear fit; If the linear fit is greater than or equal to a preset linear fit, it is determined that the continuous segment is abnormal.
5. The photovoltaic output prediction method based on ELM and LSTM according to claim 4 is characterized in that: The method of adjusting the training of the photovoltaic output prediction model based on ELM and LSTM according to the prediction duration of the model includes: Comparing the difference with the preset second difference and the preset first difference respectively; If the difference is greater than the preset first difference and less than the preset second difference, it is preliminarily determined that the accuracy of the propagation path of the input data set input into the photovoltaic output target prediction model does not meet the requirements, and the prediction time of the model is obtained; Comparing and analyzing the prediction time of the model with the preset standard prediction time and the time taken for the input data to propagate through a single lap in the model; If the prediction duration of the model is greater than the preset standard prediction duration, and the remainder of the prediction duration of the model and the duration used for the single-loop propagation is less than the preset remainder value, it is further determined that the accuracy of the propagation path of the input data set in the photovoltaic output target prediction model does not meet the requirements, and the training method of the photovoltaic output prediction model based on ELM and LSTM is adjusted from the training method of training the model with a training set to the training method of adding several propagation nodes to the training set to train the model.
6. The photovoltaic output prediction method based on ELM and LSTM according to claim 5, characterized in that: If the accuracy still does not meet the requirements, adjust the number of features for scene comparison or the time interval for outlier detection, including: comparing the difference with the preset first difference; If the difference is greater than the preset first difference, it is determined that the accuracy still does not meet the requirement, and the number of features is increased or the time interval selected for outlier detection is increased.
7. The photovoltaic output prediction method based on ELM and LSTM according to claim 6, characterized in that: The number of features in the scene comparison is positively correlated with the difference amount.
8. The photovoltaic output prediction method based on ELM and LSTM according to claim 7 is characterized in that: The aligned data set is preprocessed to obtain basic data, including Get the missing values in the aligned dataset: Interpolate / delete the missing values to complete the missing value filling or elimination and form a complete data set; Performing outlier detection on the complete data set to correct / mark the detected abnormal data to form a data set to be divided; Dividing the data set to be divided into an input data set and an output data set; Perform numerical scaling / Z-score normalization on all input datasets to output the underlying data; The time intervals of the divided input data set and the divided output data set are the same.
9. The photovoltaic output prediction method based on ELM and LSTM according to claim 8, characterized in that: The raw data includes photovoltaic output data, meteorological data and time data.
10. The photovoltaic output prediction method based on ELM and LSTM according to claim 9, characterized in that: The predicted values and actual values are stored in a database for later analysis or retraining.
Citation Information
Patent Citations
A method for predicting short-term output of distributed photovoltaic power generation systems
CN111008728B