Method, device and system for constructing output prediction model of photovoltaic power station
Through K-Means clustering and parallel training and optimization of Prophet and LSTM models, a photovoltaic power station output prediction model is constructed, which solves the problem of low photovoltaic output prediction accuracy in the existing technology, and realizes efficient utilization of weather and historical data. Improved prediction accuracy.
Patent Information
- Application Number
- CN202411425257.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-10
AI Technical Summary
The existing photovoltaic output prediction model is not optimized for weather models and photovoltaic historical output data, resulting in low prediction accuracy.
The original data set composed of the surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy is divided into fuzzy weather clustering, combining the Prophet algorithm and the LSTM model. Perform parallel training, and optimize the Prophet algorithm model through the regularization term of the LSTM model, calculate the weights of the two to build the output prediction model of the photovoltaic power station.
The accuracy of the output prediction of photovoltaic power stations is improved, ensuring that the prediction results are not affected by the weather type, and the overall accuracy of the prediction value is improved.
Smart Images

Figure CN119294603A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of photovoltaic power stations, and in particular to a method, device and system for constructing an output prediction model of a photovoltaic power station. Background Art
[0002] The existing technology simply divides the weather into several categories such as sunny and cloudy. Each type of weather needs to build a corresponding model for matching, and the prediction accuracy is high only under sunny conditions. There is no good matching model and algorithm for non-sunny conditions, which objectively weakens the randomness, volatility and intermittent characteristics of photovoltaic power generation; second, there is a large amount of "dirty data" in the historical data of photovoltaic output, and the existing technology directly uses open source data sets (commonly used data is photovoltaic power station output data provided by Kaggle website and domestic database), which has deficiencies in data cleaning and data preprocessing methods; third, because the weather itself is affected by periodic factors and non-periodic factors, the current prediction model (including prediction sub-model) cannot have a good performance for any climate factor. Time series prediction algorithms are usually used to fit periodic influencing factors (seasonal climate), while machine learning algorithms are better at processing non-periodic factors (human factors, etc.). Due to the different principles of the two methods, conventional methods cannot be processed in parallel, which makes the effects of the two methods in the photovoltaic output prediction subject not reach the best.
[0003] The indirect method aims to simulate the various physical links from solar energy to electrical energy and conduct mathematical modeling to achieve the prediction of photovoltaic output. However, this process involves many links, complex physical processes, and is affected by factors such as climate, resulting in the model itself being not accurate enough for quantitative analysis, and the final effect is poor.
[0004] The direct method is a data-driven statistical pattern recognition method. This method constructs a statistical model or an adaptive model based on the historical output data and historical weather data of the photovoltaic power station, and outputs the predicted output value by inputting the weather conditions of the prediction day. The output data of the photovoltaic power station is analyzed and modeled using the Markov chain, and a higher prediction accuracy is obtained under clear weather conditions; the clearness coefficient is introduced, and the climate factors under this model are not limited to sunny days, but expanded to sunny and non-sunny climate factors. At the same time, the multi-layer similarity matching method is used to construct an autoregressive difference moving average (ARIMA) prediction model for photovoltaic output prediction, and the climate factors are further divided into three categories: sunny, cloudy, and rainy. The BP neural network and support vector machine are used to construct a prediction sub-model, thereby further improving the prediction accuracy.
[0005] The direct method used in existing technologies is generally better than the indirect method, but they all have the following problems: the climate factor model is single, the prediction accuracy under non-sunny conditions is far lower than that under sunny conditions, and there is no explanation of data cleaning and preprocessing methods. At the same time, the algorithm itself is not optimized for weather models and historical photovoltaic output data, which to a certain extent limits the accuracy and robustness of the prediction model.
[0006] That is, the existing technology for predicting photovoltaic output models is not optimized for weather models and photovoltaic historical output data, resulting in low accuracy of the prediction model. Summary of the invention
[0007] The main purpose of the present application is to provide a method, device and system for constructing a photovoltaic power station output prediction model, so as to at least solve the problem that the photovoltaic output prediction model in the prior art is not optimized for weather models and photovoltaic historical output data, resulting in low accuracy of the prediction model.
[0008] In order to achieve the above object, according to one aspect of the present application, a method for constructing an output prediction model of a photovoltaic power station is provided, the method comprising:
[0009] Acquire an original data set consisting of a plurality of surface extraterrestrial irradiance correlation coefficients, a plurality of surface extraterrestrial irradiance fluctuation coefficients, and a plurality of irradiance difference waveform entropies, and use a K-Means clustering algorithm to perform clustering processing on the original data set to obtain a clustering result, so as to divide the original data set into a plurality of fuzzy weather clustering sub-data sets;
[0010] The Prophet algorithm model and the LSTM model are respectively trained in parallel based on the clustering results to obtain confidence values and confidence intervals of the Prophet algorithm model and the LSTM model;
[0011] The Prophet algorithm model is optimized using the regularization term of the LSTM model, and the weights of the Prophet algorithm model and the LSTM model are calculated to obtain a final Prophet algorithm model, a final LSTM model, LSTM model weights, and a Prophet algorithm model weight;
[0012] Based on the final Prophet algorithm model, the final LSTM model, the LSTM model weights and the Prophet algorithm model weights, an output prediction model of the photovoltaic power station is constructed, wherein the output prediction model of the photovoltaic power station is used to predict the output of the photovoltaic power station according to the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy.
[0013] Optionally, after constructing the output prediction model of the photovoltaic power station, the method further includes:
[0014] The output prediction model of the photovoltaic power station is used to process the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy to obtain the prediction value of the final Prophet algorithm model and the prediction value of the final LSTM model;
[0015] Based on the LSTM model weight and the Prophet algorithm model weight, the predicted value of the final Prophet algorithm model and the predicted value of the final LSTM model are weighted and summed to obtain a final output prediction value.
[0016] Optionally, the Prophet algorithm model is optimized by using the regularization term of the LSTM model, and the weights of the Prophet algorithm model and the LSTM model are calculated to obtain the LSTM model weight and the Prophet algorithm model weight, including:
[0017] The total error function is constructed as:
[0018]
[0019] Adjusting the weight of the LSTM model and the weight of the Prophet algorithm model multiple times to gradually reduce the value of the total error function until the value of the total error function is a minimum value;
[0020] in, is the value of the total error function, is the prediction error value of the LSTM model or the prediction error value of the Prophet algorithm model, P 1 is the first penalty term, P 2 is the second penalty term, the first penalty term limits the predicted values of the two models to the confidence interval of the other model, and the second penalty term is used to optimize the Prophet algorithm model and perform weighted average of the predicted values of the LSTM model and the Prophet algorithm model.
[0021] Optionally, before constructing the total error function, the method further includes:
[0022] according to determining the first penalty item;
[0023] Among them, λ is the penalty coefficient, is the maximum value of the confidence interval of the LSTM model, is the minimum value of the confidence interval of the LSTM model, is the maximum value of the confidence interval of the Prophet algorithm model, is the maximum value of the confidence interval of the Prophet algorithm model.
[0024] Optionally, before constructing the total error function, the method further includes:
[0025] according to determining the second penalty item;
[0026] Among them, λ is the penalty coefficient, T is the number of weight vector parameters, and w j is the LSTM model weight or the Prophet algorithm model weight.
[0027] Optionally, multiple surface extraterrestrial irradiance correlation coefficients are obtained, including:
[0028] according to Determining a plurality of correlation coefficients of extraterrestrial irradiance on the surface;
[0029] Where R is the correlation coefficient of the surface extraterrestrial irradiance, E O,i is the measured value of surface irradiance at the i-th moment, is the mean of the measured values of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, is the mean of the measured values of the surface irradiance at the i-th moment, and N is the maximum moment.
[0030] Optionally, obtaining multiple irradiance difference waveform entropies includes:
[0031] according to and Determining a plurality of said surface extraterrestrial irradiance fluctuation coefficients;
[0032] Where S is the irradiance difference waveform entropy, p i is the intermediate parameter, E O,i is the measured value of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, and N is the maximum moment.
[0033] Optionally, multiple extraterrestrial irradiance fluctuation coefficients are obtained, including:
[0034] according to determining a plurality of said extraterrestrial irradiance fluctuation coefficients;
[0035] Wherein, B is the extraterrestrial irradiance fluctuation coefficient, E O,i is the measured value of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, and N is the maximum moment.
[0036] According to another aspect of the present application, a device for constructing an output prediction model of a photovoltaic power station is provided, the device comprising:
[0037] An acquisition unit is used to acquire an original data set consisting of a plurality of surface extraterrestrial irradiance correlation coefficients, a plurality of surface extraterrestrial irradiance fluctuation coefficients and a plurality of irradiance difference waveform entropies, and cluster the original data set using a K-Means clustering algorithm to obtain a clustering result, so as to divide the original data set into a plurality of fuzzy weather clustering sub-data sets;
[0038] A first processing unit is used to use a Prophet algorithm model and an LSTM model to perform parallel training based on the clustering results, respectively, to obtain confidence values and confidence intervals of the Prophet algorithm model and the LSTM model;
[0039] The second processing unit is used to optimize the Prophet algorithm model by using the regularization term of the LSTM model, and calculate the weights of the Prophet algorithm model and the LSTM model to obtain a final Prophet algorithm model, a final LSTM model, an LSTM model weight, and a Prophet algorithm model weight;
[0040] The third processing unit is used to construct an output prediction model of the photovoltaic power station based on the final Prophet algorithm model, the final LSTM model, the LSTM model weights and the Prophet algorithm model weights, wherein the output prediction model of the photovoltaic power station is used to predict the output of the photovoltaic power station according to the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy.
[0041] According to another aspect of the present application, a system for constructing an output prediction model of a photovoltaic power station is provided, the system comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing any one of the methods for constructing an output prediction model of a photovoltaic power station.
[0042] By applying the technical solution of the present application, the three-dimensional features of correlation coefficient, fluctuation coefficient and waveform entropy are utilized, and the fuzzy clustering model is constructed in combination with the improved K-Means, which is adaptive to various types of weather, and the prediction accuracy is not affected by the weather type; and the regularization term of the LSTM model is used to optimize the Prophet algorithm model, and the weights of the Prophet algorithm model and the LSTM model are calculated. Based on the final Prophet algorithm model, the final LSTM model, the LSTM model weight and the Prophet algorithm model weight, a photovoltaic power station output prediction model is constructed, so that the two models can ensure the training effect of their respective models under the characteristic factors they are good at, so that the prediction value has higher accuracy as a whole, thereby solving the problem that the prediction model of photovoltaic output in the prior art is not optimized for the weather model and the photovoltaic historical output data, resulting in low accuracy of the prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0044] Figure 1 A schematic diagram of a process for constructing a photovoltaic power station output prediction model provided in accordance with an embodiment of the present application is shown;
[0045] Figure 2 A schematic diagram showing the principle of the Prophet algorithm provided according to an embodiment of the present application is shown;
[0046] Figure 3 A structural block diagram of a device for constructing an output prediction model of a photovoltaic power station provided according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0047] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0048] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0049] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0050] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0051] The Prophet algorithm model is a time series forecasting algorithm model developed by Facebook. It is mainly used to forecast time series data with seasonality, trend and holiday effects. The Prophet algorithm model combines seasonal components, trend components and holiday effects, and can accurately predict the trend of future time series data. The model is easy to use and has good results. It has been widely used in sales forecasting, demand forecasting and other aspects in the commercial field.
[0052] The sklearn library is a Python library for machine learning, the full name is scikit-learn. It contains many tools and algorithms for data mining and data analysis, such as classification, regression, clustering, dimensionality reduction, model selection, preprocessing, etc. The sklearn library provides simple and efficient tools to help users quickly build machine learning models and perform data analysis. It also supports many commonly used machine learning algorithms, such as support vector machines, random forests, k-means clustering, etc. The sklearn library is designed to be simple and easy to use, making the practice of machine learning simpler and more efficient.
[0053] Pandas is a data analysis library based on the Python programming language. It provides data structures and data analysis tools, allowing users to process, clean, analyze, and visualize data more easily. The most important data structures in Pandas are Series (one-dimensional array) and DataFrame (two-dimensional table). These data structures can help users process structured data. Pandas also provides various data manipulation and processing functions, such as data filtering, sorting, grouping, merging, etc., allowing users to analyze and process data more conveniently. Therefore, Pandas is one of the very popular tools in the field of data science.
[0054] fbprophet is an open source time series analysis tool developed by Facebook. It is based on statistical models to predict time series and can handle data with seasonality, trends, and holiday effects. fbprophet has a simple and easy-to-use API and flexible parameter settings, allowing users to easily perform time series analysis and prediction. It is suitable for time series data analysis in various fields, such as sales forecasting, stock price forecasting, traffic flow forecasting, etc.
[0055] RNN is the abbreviation of Recurrent Neural Network, which is a neural network structure with recurrent connections. RNN has a memory function and can process sequence data, such as text, time series, etc. Its main feature is that it can transmit information through the cycle of time steps, so that context information can be considered when processing sequence data, and it has a certain memory ability. RNN is widely used in natural language processing, speech recognition, time series prediction and other fields.
[0056] As introduced in the background technology, the direct method used in the prior art is generally better than the indirect method, but all of them have the following problems: a single climate factor model, the prediction accuracy under non-sunny conditions is far lower than that under sunny conditions, and there is no explanation of data cleaning and preprocessing methods. At the same time, the algorithm itself is not optimized for weather models and historical photovoltaic output data, which to a certain extent limits the accuracy and robustness of the prediction model. In order to solve the problem that the photovoltaic output prediction model of the prior art is not optimized for weather models and historical photovoltaic output data, resulting in low accuracy of the prediction model, the embodiments of the present application provide a method, device and system for constructing an output prediction model of a photovoltaic power station.
[0057] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0058] In this embodiment, a method for constructing an output prediction model of a photovoltaic power station running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0059] Figure 1 FIG. 1 is a flow chart of a method for constructing a photovoltaic power station output prediction model according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0060] Step S101, obtaining an original data set consisting of a plurality of surface extraterrestrial irradiance correlation coefficients, a plurality of surface extraterrestrial irradiance fluctuation coefficients and a plurality of irradiance difference waveform entropies, and performing clustering processing on the above original data set using a K-Means clustering algorithm to obtain a clustering result, so as to divide the above original data set into a plurality of fuzzy weather clustering sub-data sets;
[0061] In one embodiment of the present application, a plurality of surface extraterrestrial irradiance correlation coefficients are obtained, including:
[0062] according to Determining correlation coefficients of a plurality of the above-mentioned extraterrestrial irradiances on the surface;
[0063] Among them, R is the above-mentioned surface extraterrestrial irradiance correlation coefficient, E O,i is the measured value of surface irradiance at the i-th moment, is the mean of the measured values of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, is the mean of the measured values of the surface irradiance at the i-th moment, and N is the maximum moment.
[0064] Specifically, the calculation formula for extraterrestrial irradiance is:
[0065]
[0066] E o is the calculated value of extraterrestrial irradiance, δ, and τ are latitude, declination and solar hour angle respectively, is the correction factor for the distance between the Earth and the Sun, where r 0 is the average distance between the sun and the earth, r is the distance between the sun and the earth on the observation day, 1367 is the solar constant, and the unit is W / m 3 .
[0067] By calculating the correlation coefficient of the surface extraterrestrial irradiance, we can get the degree of fit of the extraterrestrial irradiance and surface irradiance curves. The larger the correlation coefficient, the higher the degree of fit, that is, the closer the weather is to a sunny day, and vice versa, the closer it is to rain, snow or fog.
[0068] In one embodiment of the present application, obtaining multiple irradiance difference waveform entropies includes:
[0069] according to and Determining a plurality of above-mentioned surface extraterrestrial irradiance fluctuation coefficients;
[0070] Where S is the above irradiance difference waveform entropy, p i is the intermediate parameter, E O,i is the measured value of surface irradiance at the i-th moment, E S,iis the measured value of surface irradiance at the i-th moment, and N is the maximum moment.
[0071] Specifically, the irradiance difference waveform entropy is calculated to describe the energy distribution characteristics of the irradiance difference waveform. The smaller the waveform entropy, the more dispersed the energy distribution of the surface and extraterrestrial irradiance, and the more stable the weather conditions are. Otherwise, it means that the weather fluctuates violently.
[0072] In one embodiment of the present application, obtaining a plurality of extraterrestrial irradiance fluctuation coefficients includes:
[0073] according to Determining a plurality of said extraterrestrial irradiance fluctuation coefficients;
[0074] Where B is the above-mentioned extraterrestrial irradiance fluctuation coefficient, E O,i is the measured value of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, and N is the maximum moment.
[0075] Specifically, the surface extraterrestrial irradiance fluctuation coefficient is calculated to describe the degree of fluctuation of the difference between the measured surface irradiance and the extraterrestrial calculated irradiance. The fluctuation coefficient is also positively correlated with the weather type similar to the correlation coefficient.
[0076] Construct daily weather type feature vector x of historical data j =[R j ,B j ,S j ] T ,j=1,2,...,M, M represents the total number of days of historical data. According to the feature vector x j Based on the distribution characteristics in the three-dimensional feature space, an improved K-Means algorithm is proposed. Aiming at the problem of adaptive determination of the number of clusters K in the traditional K-Means algorithm, the minimum intra-class-class distance is calculated, and 33 weather features are adaptively divided into K fuzzy weather clusters.
[0077] Step (1) Initialize the number of clusters K = 1;
[0078] Step (2) From the feature vector set Randomly select K samples u from 1 ,u 2 ,…,u K As the initial cluster center;
[0079] Step (3) calculates the Euclidean distance between each sample and each cluster center, and divides the sample into the cluster with the closest distance, obtaining K cluster sets. Euclidean distance calculation formula:
[0080]
[0081] Step (4) calculates the new cluster centers of the K cluster sets, as shown in Formula 6, where n k is the number of samples of the kth cluster:
[0082]
[0083] Step (5) Re-divide the samples according to the K new cluster centers. If the result converges, jump to step (6). If not, repeat steps (3) to (5).
[0084] Step (6) calculates the converged intra-class distance according to the intra-class distance formula:
[0085]
[0086] Step (7) The number of clusters K = K + 1, jump to step (2);
[0087] Step (8) Traverse K = 1, 2, ..., 33 and get the minimum r K That is, the fuzzy clustering with the smallest intra-class distance. According to the calculation results, when K = 4, r K The minimum value is reached, which is the final number of fuzzy weather categories.
[0088] The fuzzy weather categories are defined as Type I to IV.
[0089] Data preprocessing and data cleaning: importing data sets; correcting changes in data structure caused by modification of characteristic factors; performing preprocessing steps such as dividing data sets, sample standardization, and label vectorization; and processing outliers, missing values, and zero-value data through data cleaning.
[0090] After analyzing the influencing factors and quantitative features as above, a data set is constructed. The fuzzy weather clustering with the same prediction day is selected as the data set. The input features are the photovoltaic output at different times in the historical data of the same fuzzy clustering, the three-dimensional feature vector corresponding to the weather, and the three-dimensional feature vector of the weather on the prediction day, a total of 7 feature quantities. The output value is the timestamp and output power at different times on the prediction day. The data sets {x I}、{x II}、{x III}、{x IV According to the classification results of the data set, the actual weather conditions corresponding to the four fuzzy clustering are shown in Table 1.
[0091] Table 1
[0092]
[0093] Furthermore, the data is preprocessed.
[0094] In order to avoid using For loops and optimize computational efficiency, the first step of data preprocessing is to vectorize the load data of a province and obtain {X n ' ×M}, n represents the number of samples, M represents the number of influencing factors, and in this invention, it is 7. At the same time, to ensure the temporal continuity of the data, the label value requires two columns of data 'ds' and 'y', where 'ds' represents the timestamp corresponding to the sample, and 'y' represents the output value (kw) at the corresponding time. Since the samples are vectorized, the corresponding labels should also be vectorized to form {Y n ' ×m}, m represents the number of tags, and the value in the present invention is 2.
[0095] The StandardScaler() function is used to standardize data. Standardization means scaling the data to a mean of 0 and a variance of 1, so that the mean of the data set is 0 and the standard deviation is 1. This can eliminate the dimensional differences between different features, making model training more stable and accurate. The StandardScaler() function is usually used in the data preprocessing step.
[0096] Further sample standardization is performed. In the prediction problem, due to the different dimensions of each feature quantity of the experimental data and the large difference in the absolute value of the data, the mean and variance of the distribution of each feature quantity are greatly different. At this time, the feature with large variance will dominate the model training process, and the model performance will deteriorate. The sample is usually standardized to eliminate the above influence. The present invention uses the StandardScaler() function in the sklearn library to scale the continuous feature factors to a mean of 0 and a variance of 1; the discrete feature factors (i.e., the factors that need to be quantified) are scaled to the interval [0,1].
[0097] The present invention adopts the python third-party library pandas for data cleaning. First, outliers in the data are removed and assigned to none; zero values are searched for the above 7 feature quantities and assigned to none; the above-mentioned data assigned with "none" value and the original missing value data are combined and interpolated using a combined model to achieve the cleaning of outlier, zero value and missing value data.
[0098] The cleaned data sets of the four fuzzy weather clustering models I to IV are divided into 60% training set: 20% test set: 20% validation set.
[0099] Step S102, using the Prophet algorithm model and the LSTM model to perform parallel training based on the clustering results, respectively, to obtain confidence values and confidence intervals of the Prophet algorithm model and the LSTM model;
[0100] The Prophet algorithm and the LSTM model are trained in parallel, and the confidence values and confidence intervals of the respective models are outputted, and the confidence values are used as the prediction values of the respective models. The respective model evaluations of the parallel training models are carried out by evaluating the loss function values and prediction accuracy on each data set, and adjusting the parameters in a targeted manner to achieve the best performance of each model.
[0101] Prophet model training:
[0102] The Prophet algorithm is an additive model, and the basic principle formula is as follows:
[0103] p(t)=g(t)+s(t)+h(t)+ε t ;
[0104] Among them, g(t) is the trend term, which indicates the non-periodic changing trend of the time series; s(t) is the periodic term, which indicates the periodic changing trend; h(t) is the holiday term, which indicates that the day is a holiday; εt is called the residual term or error term, that is, the fluctuation not predicted by the model, which generally obeys Gaussian distribution.
[0105] The Prophet algorithm process is as follows Figure 2 As shown in the figure, the internal system consists of two parts: analysts and automation in the loop. Prophet's prediction process is to build a time series model based on the prediction problem, simulate historical data, evaluate the effect of the model, further adjust and model according to the problems that arise, and finally feedback the entire prediction result in a visual way.
[0106] The trend term g(t) of the present invention adopts a piecewise logistic regression growth model, and the model formula is as follows:
[0107]
[0108] in:
[0109] a(t)=(a 1 (t),a 2 (t),...,a S (t)) T ;
[0110] δ=(δ 1 ,δ 2 ,...,δ S ) T ;
[0111] γ=(γ 1 ,γ 2 ,...,γ S ) T ;
[0112] C(t) represents the expected capacity of the model and needs to be preset. s represents the timestamp, a(t) is the indicator function, k represents the growth rate, m represents the offset, γ is the piecewise linear parameter, and δ represents the change in the growth rate. In this case, the model corresponds to the hyperparameter growth = 'linear', and t is the time independent variable.
[0113] The periodic term s(t) simulates the periodicity of the time series according to the Fourier series that only retains the periodic term. The formula is as follows:
[0114]
[0115] In the present invention, the periodic factors are considered by default, and the hyperparameters are set to default values. Form a parameter vector:
[0116] β=(a 1 ,b 1 ,...,a n ,b n );
[0117] Thus we get s(t)=x(t)β, where
[0118] β is initialized, and the result is β~Normal(0,σ 2 ), σ is the hyperparameter 'seasonality_prior_scale', which is used to adjust the degree to which the seasonal model fits the data.
[0119] In the time series, each of the above events can be modeled separately, and a separate time window is set for each model, and the impact of the same time window is the same value. The holiday model h(t) can be estimated as follows:
[0120]
[0121] Z(t)=[1(t∈D i ),...,1(t∈D L )],k=(k 1 ,...,k l );
[0122] Where L is the holiday event set, which contains l holiday events in total; i is the i-th holiday event, D i represents the date corresponding to each holiday i, D L For the Lth D i , t is the corresponding holiday, Z(t) is the impact factor of the corresponding holiday on the predicted value; k i Indicates the impact range of the corresponding holidays. k represents the impact effect of holidays, k~Normal(0,v 2), v is the hyperparameter 'holidays_prior_scale', and the larger its value is, the more the model is affected by holidays.
[0123] The fbprophet software library is called, and the key hyperparameters are set as follows: the growth trend model growth selects 'linear'; the parameter turning point n_changepoints is set to 1 according to the load data law; the inflection point control parameter changepoint_prior_scale is 0.05; the mutation point range changepoint_range is set to 0.9; the confidence interval width interval_width is 0.8; the error function is set to the MSE root mean square error loss function; the rest of the hyperparameters are default values.
[0124] After setting the above parameters, import the training set to train the model, import the test set data to test, and fine-tune the parameters according to the fitting results of the test set. Finally, use the validation set data for verification to ensure that the validation data is not leaked into the training model, verify the generalization ability of the model, and avoid "overfitting". The model output results are the confidence value y1_hat and confidence interval [y1_hat_lower, y1_hat_upper] of the load data to be predicted at each time node.
[0125] LSTM model training:
[0126] The Long Short-Term Memory (LSTM) algorithm is an improved algorithm of the Recurrent Neural Network (RNN). By increasing the threshold, it greatly improves the gradient vanishing and gradient exploding problems in the long sequence training process of the RNN.
[0127] Compared to traditional RNN, which only passes one variable h(t), LSTM passes variables h(t) and c(t). First, according to the current input x t and h passed from the previous state (t-1) The four intermediate parameters are obtained by splicing:
[0128]
[0129] Among them, z i 、z f 、z o After the weight matrix is multiplied by the concatenated vector, it is mapped to the [0,1] interval using the sigmoid activation function as a gating state, while z is used as input data and mapped to the [-1,1] interval through the tanh activation function.
[0130] The mathematical expression formula inside the LSTM algorithm is:
[0131]
[0132] Among them, ⊙ represents the multiplication of corresponding elements of the matrices, that is, the two matrices must be of the same type, and ⊙ represents matrix addition.
[0133] The LSTM algorithm can be divided into three stages as a whole:
[0134] Forgetting stage: for the previous node input, by calculating z f As a forget gate, control the previous node c (t-1) Features to forget and retain;
[0135] Select the memory stage: by adjusting the gating signal z i For input x t Perform selective memory;
[0136] Output stage: By controlling z o And the previous node c o The output value of the current stage is determined by scaling with the tanh function.
[0137] In addition, to prevent overfitting, the present invention sets the overfitting parameter Dropout, which is used to randomly inactivate neurons, thereby reducing the degree of overfitting. The present invention takes 0.2. The settings of other hyperparameters are as follows: the number of hidden layers n_hidden is 50, the batch size batch_size is 300, and the number of training cycles epochs is 500; other default values are maintained. After training and parameter adjustment, the confidence value y2_hat and confidence interval [y2_hat_lower, y2_hat_upper] predicted by the LSTM algorithm for each time node load data are output.
[0138] Step S103, using the regularization term of the LSTM model to optimize the Prophet algorithm model, and calculating the weights of the Prophet algorithm model and the LSTM model to obtain the final Prophet algorithm model, the final LSTM model, the LSTM model weights, and the Prophet algorithm model weights;
[0139] Add a prediction value optimization module, which integrates the model by adding two loss function penalty terms. The first penalty term is an additional term, which is used to ensure that the prediction values of the two models are within the confidence interval of the other model; the second penalty term is a regularization term, which is used to optimize the Prophet algorithm and perform a weighted average of the prediction values of the two models to obtain the final photovoltaic output prediction result.
[0140] The Prophet algorithm has inherent advantages in processing time series problems, especially in processing periodic factors, which is significantly better than other algorithms such as machine learning, while machine learning algorithms are good at mining historical information, especially the historical data within each fuzzy cluster in the present invention contains a large number of non-periodic factors. In addition, since the Prophet algorithm processes the periodic term as an item of the objective function alone, it is inevitable that overfitting will occur in this processing, thereby reducing the generalization ability.
[0141] The prediction value optimization module of the present invention uses the regularization term of LSTM to optimize the overfitting problem of Prophet, calculates the weight ratio of the confidence values of the two models, and performs weighted processing on the results of the two models, so that the two models can be effectively combined.
[0142] In one embodiment of the present application, the Prophet algorithm model is optimized by using the regularization term of the LSTM model, and the weights of the Prophet algorithm model and the LSTM model are calculated to obtain the LSTM model weight and the Prophet algorithm model weight, including:
[0143] The total error function is constructed as:
[0144]
[0145] The weights of the LSTM model and the Prophet algorithm model are adjusted multiple times to gradually reduce the value of the total error function until the value of the total error function reaches a minimum value;
[0146] in, is the value of the above total error function, is the prediction error value of the above LSTM model or the prediction error value of the above Prophet algorithm model, P 1 is the first penalty term, P 2 is the second penalty term. The first penalty term limits the predicted values of the two models to the confidence interval of the other model. The second penalty term is used to optimize the Prophet algorithm model and perform weighted average of the predicted values of the LSTM model and the Prophet algorithm model.
[0147] In one embodiment of the present application, before constructing the total error function, the method further includes:
[0148] according to Determine the first penalty item above;
[0149] Among them, λ is the penalty coefficient, is the maximum value of the confidence interval of the above LSTM model, is the minimum value of the confidence interval of the above LSTM model, is the maximum value of the confidence interval of the above Prophet algorithm model, is the maximum value of the confidence interval of the above Prophet algorithm model.
[0150] In one embodiment of the present application, before constructing the total error function, the method further includes:
[0151] according to Determine the second penalty item above;
[0152] Among them, λ is the penalty coefficient, T is the number of weight vector parameters, and w j is the above LSTM model weight or the above Prophet algorithm model weight.
[0153] Specifically, two penalty terms are first added to fit the confidence interval and find the weight ratio of the two models, and the predicted values of the two models are weighted averaged. That is, y1_hat_upper, That is, y2_hat_upper; That is, y1_hat_lower, That is, y2_hat_lower.
[0154]
[0155] is the final prediction value of the output prediction model of the photovoltaic power station, w 1 is the weight of the predicted value of the above LSTM model, is the predicted value of the above LSTM model, w 2 is the weight of the predicted value of the above Prophet algorithm model, is the predicted value of the above Prophet algorithm model.
[0156] w 1 +w 2 =1;
[0157] The weights of the two models are optimally solved using the least squares method:
[0158]
[0159] y is the true value. To minimize the error value, let the two weight directions f(w 1 ,w 2 ) has a partial derivative of 0;
[0160] Further verification is not f(w 1 ,w 2) can be obtained by 1 , w 2 , then f(w 1 ,w 2 ) is the optimal solution, so that Reach the optimal solution.
[0161] Step S104, based on the above-mentioned final Prophet algorithm model, the above-mentioned final LSTM model, the LSTM model weights and the Prophet algorithm model weights, construct an output prediction model of the photovoltaic power station, wherein the above-mentioned output prediction model of the above-mentioned photovoltaic power station is used to predict the output of the above-mentioned photovoltaic power station according to the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy.
[0162] In the above steps, the three-dimensional features of correlation coefficient, fluctuation coefficient and waveform entropy are used in combination with improved K-Means to build a fuzzy clustering model, which is adaptive to various types of weather, and the prediction accuracy is not affected by the weather type; and the regularization term of the above LSTM model is used to optimize the above Prophet algorithm model, and the weights of the above Prophet algorithm model and the above LSTM model are calculated. Based on the above final Prophet algorithm model, the above final LSTM model, the LSTM model weight and the Prophet algorithm model weight, a photovoltaic power station output prediction model is constructed, so that the two models can ensure the training effect of their respective models under the characteristic factors they are good at, so that the prediction value has higher accuracy as a whole, thereby solving the problem that the existing technology for photovoltaic output prediction model is not optimized for weather model and photovoltaic historical output data, resulting in low accuracy of the prediction model.
[0163] The least squares method is used to calculate the optimal weight ratio of the two algorithms, and the weighted average of the predicted values is taken as the final prediction result. The two algorithms are finally effectively integrated, so that the two algorithms can ensure the training effect of their respective models under the characteristic factors they are good at, thereby making the predicted values more accurate as a whole.
[0164] In one embodiment of the present application, after constructing the output prediction model of the photovoltaic power station, the method further includes:
[0165] The output prediction model of the photovoltaic power station is used to process the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy to obtain the prediction value of the final Prophet algorithm model and the prediction value of the final LSTM model;
[0166] Based on the LSTM model weight and the Prophet algorithm model weight, the predicted value of the final Prophet algorithm model and the predicted value of the final LSTM model are weighted and summed to obtain the final output prediction value.
[0167] Specifically, we find w 1 , w 2 , then f(w 1 ,w 2 ) is the optimal solution, so that To achieve the optimal solution, w 1 , w 2 Substitute into The final output prediction value can be obtained.
[0168] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0169] The embodiment of the present application also provides a device for constructing an output prediction model of a photovoltaic power station. It should be noted that the device for constructing an output prediction model of a photovoltaic power station in the embodiment of the present application can be used to execute the method for constructing an output prediction model for a photovoltaic power station provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0170] The following introduces a device for constructing an output prediction model of a photovoltaic power station provided in an embodiment of the present application.
[0171] Figure 3 1 is a structural block diagram of a device for constructing an output prediction model of a photovoltaic power station provided according to an embodiment of the present application. Figure 3 As shown, the device comprises:
[0172] The acquisition unit 31 is used to acquire an original data set consisting of a plurality of surface extraterrestrial irradiance correlation coefficients, a plurality of surface extraterrestrial irradiance fluctuation coefficients and a plurality of irradiance difference waveform entropies, and perform clustering processing on the original data set using a K-Means clustering algorithm to obtain a clustering result, so as to divide the original data set into a plurality of fuzzy weather clustering sub-data sets;
[0173] The first processing unit 32 is used to use the Prophet algorithm model and the LSTM model to perform parallel training based on the clustering results to obtain confidence values and confidence intervals of the Prophet algorithm model and the LSTM model;
[0174] The second processing unit 33 is used to optimize the Prophet algorithm model by using the regularization term of the LSTM model, and calculate the weights of the Prophet algorithm model and the LSTM model to obtain the final Prophet algorithm model, the final LSTM model, the LSTM model weight and the Prophet algorithm model weight;
[0175] The third processing unit 34 is used to construct an output prediction model of the photovoltaic power station based on the above-mentioned final Prophet algorithm model, the above-mentioned final LSTM model, the LSTM model weights and the Prophet algorithm model weights, wherein the above-mentioned output prediction model of the above-mentioned photovoltaic power station is used to predict the output of the above-mentioned photovoltaic power station according to the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy.
[0176] In the above-mentioned device, the three-dimensional features of correlation coefficient, fluctuation coefficient and waveform entropy are used, combined with improved K-Means to construct a fuzzy clustering model, which is adaptive to various types of weather, and the prediction accuracy is not affected by the weather type; and the regularization term of the above-mentioned LSTM model is used to optimize the above-mentioned Prophet algorithm model, and the weights of the above-mentioned Prophet algorithm model and the above-mentioned LSTM model are calculated. Based on the above-mentioned final Prophet algorithm model, the above-mentioned final LSTM model, the LSTM model weight and the Prophet algorithm model weight, a photovoltaic power station output prediction model is constructed, so that the two models can ensure the training effect of their respective models under the characteristic factors they are good at, so that the prediction value has higher accuracy as a whole, thereby solving the problem that the existing technology for the prediction model of photovoltaic output is not optimized for the weather model and the photovoltaic historical output data, resulting in low accuracy of the prediction model.
[0177] In one embodiment of the present application, the above-mentioned device further includes a fourth processing unit and a fifth processing unit, which, after constructing the output prediction model of the photovoltaic power station,
[0178] The fourth processing unit is used to process the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy using the output prediction model of the photovoltaic power station to obtain the prediction value of the final Prophet algorithm model and the prediction value of the final LSTM model;
[0179] The fifth processing unit is used to perform weighted sum processing on the prediction value of the above-mentioned final Prophet algorithm model and the prediction value of the above-mentioned final LSTM model based on the above-mentioned LSTM model weight and the above-mentioned Prophet algorithm model weight to obtain the final output prediction value.
[0180] In one embodiment of the present application, the second processing unit includes a building module and a first processing module.
[0181] The building block used to construct the total error function is:
[0182]
[0183] The first processing module is used for adjusting the weight of the LSTM model and the weight of the Prophet algorithm model for multiple times to gradually reduce the value of the total error function until the value of the total error function is a minimum value;
[0184] in, is the value of the above total error function, is the prediction error value of the above LSTM model or the prediction error value of the above Prophet algorithm model, P 1 is the first penalty term, P 2 is the second penalty term. The first penalty term limits the predicted values of the two models to the confidence interval of the other model. The second penalty term is used to optimize the Prophet algorithm model and perform weighted average of the predicted values of the LSTM model and the Prophet algorithm model.
[0185] In one embodiment of the present application, the apparatus further includes a sixth processing unit, which, before constructing the total error function,
[0186] The sixth processing unit is used for Determine the first penalty item above;
[0187] Among them, λ is the penalty coefficient, is the maximum value of the confidence interval of the above LSTM model, is the minimum value of the confidence interval of the above LSTM model, is the maximum value of the confidence interval of the above Prophet algorithm model, is the maximum value of the confidence interval of the above Prophet algorithm model.
[0188] In one embodiment of the present application, the apparatus further includes a seventh processing unit, which, before constructing the total error function,
[0189] The seventh processing unit is used for Determine the second penalty item above;
[0190] Among them, λ is the penalty coefficient, T is the number of weight vector parameters, and w j is the above LSTM model weight or the above Prophet algorithm model weight.
[0191] In one embodiment of the present application, the acquisition unit includes a second processing module,
[0192] The second processing module is used to Determining correlation coefficients of a plurality of the above-mentioned extraterrestrial irradiances on the surface;
[0193] Among them, R is the above-mentioned surface extraterrestrial irradiance correlation coefficient, E O,i is the measured value of surface irradiance at the i-th moment, is the mean of the measured values of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, is the mean of the measured values of the surface irradiance at the i-th moment, and N is the maximum moment.
[0194] In one embodiment of the present application, the acquisition unit includes a third processing module,
[0195] The third processing module is used to and Determining a plurality of above-mentioned surface extraterrestrial irradiance fluctuation coefficients;
[0196] Where S is the above irradiance difference waveform entropy, p i is the intermediate parameter, E O,i is the measured value of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, and N is the maximum moment.
[0197] In one embodiment of the present application, the acquisition unit includes a fourth processing module,
[0198] The fourth processing module is used to Determining a plurality of said extraterrestrial irradiance fluctuation coefficients;
[0199] Where B is the above-mentioned extraterrestrial irradiance fluctuation coefficient, E O,i is the measured value of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, and N is the maximum moment.
[0200] The device for constructing the output prediction model of the photovoltaic power station includes a processor and a memory. The acquisition unit, the first processing unit, the second processing unit and the third processing unit are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0201] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters are adjusted to solve the problem that the prediction model of photovoltaic output in the prior art is not optimized for the weather model and photovoltaic historical output data, resulting in low accuracy of the prediction model.
[0202] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0203] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the method for constructing the output prediction model of the photovoltaic power station.
[0204] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the program executes the method for constructing the output prediction model of the photovoltaic power station when running.
[0205] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented: an original data set consisting of a plurality of surface extraterrestrial irradiance correlation coefficients, a plurality of surface extraterrestrial irradiance fluctuation coefficients, and a plurality of irradiance difference waveform entropies is obtained, and a K-Means clustering algorithm is used to perform clustering processing on the original data set to obtain a clustering result, so as to divide the original data set into a plurality of fuzzy weather clustering sub-data sets; a Prophet algorithm model and an LSTM model are respectively trained in parallel based on the clustering results to obtain confidence values and confidence intervals of the Prophet algorithm model and the LSTM model; and a K-Means clustering algorithm is used to perform clustering processing on the original data set to obtain a clustering result, so as to divide the original data set into a plurality of fuzzy weather clustering sub-data sets. The regularization term of the LSTM model optimizes the Prophet algorithm model, and calculates the weights of the Prophet algorithm model and the LSTM model to obtain the final Prophet algorithm model, the final LSTM model, the LSTM model weights and the Prophet algorithm model weights; based on the final Prophet algorithm model, the final LSTM model, the LSTM model weights and the Prophet algorithm model weights, a photovoltaic power station output prediction model is constructed, wherein the photovoltaic power station output prediction model is used to predict the output of the photovoltaic power station according to the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy. The device in this article can be a server, PC, PAD, mobile phone, etc.
[0206] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes at least the following method steps: obtaining an original data set consisting of multiple surface extraterrestrial irradiance correlation coefficients, multiple surface extraterrestrial irradiance fluctuation coefficients, and multiple irradiance difference waveform entropies, and using a K-Means clustering algorithm to perform clustering processing on the above original data set to obtain a clustering result, so as to divide the above original data set into multiple fuzzy weather clustering sub-data sets; using a Prophet algorithm model and an LSTM model to perform parallel training based on the above clustering results, respectively, to obtain the confidence value and confidence interval of the Prophet algorithm model and the LSTM model; using the above LSTM The regularization term of the model optimizes the Prophet algorithm model, and calculates the weights of the Prophet algorithm model and the LSTM model to obtain the final Prophet algorithm model, the final LSTM model, the LSTM model weights and the Prophet algorithm model weights; based on the final Prophet algorithm model, the final LSTM model, the LSTM model weights and the Prophet algorithm model weights, a photovoltaic power station output prediction model is constructed, wherein the photovoltaic power station output prediction model is used to predict the output of the photovoltaic power station according to the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy.
[0207] The present application also provides a system for constructing an output prediction model of a photovoltaic power station, the system comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a method for constructing an output prediction model of any of the photovoltaic power stations. The fuzzy clustering model is constructed by using the three-dimensional features of correlation coefficient, fluctuation coefficient and waveform entropy, combined with the improved K-Means, to adapt to various types of weather, and the prediction accuracy is not affected by the weather type; and the regularization term of the LSTM model is used to optimize the Prophet algorithm model, and the weights of the Prophet algorithm model and the LSTM model are calculated. Based on the final Prophet algorithm model, the final LSTM model, the LSTM model weight and the Prophet algorithm model weight, the output prediction model of the photovoltaic power station is constructed, so that the two models can ensure the training effect of their respective models under the characteristic factors they are good at, so that the prediction value has higher accuracy as a whole, thereby solving the problem that the prediction model of photovoltaic output in the prior art is not optimized for the weather model and the photovoltaic historical output data, resulting in low accuracy of the prediction model.
[0208] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0209] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0210] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0211] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0212] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0213] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0214] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0215] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0216] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0217] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0218] 1) The method for constructing the output prediction model of the photovoltaic power station of the present application utilizes the three-dimensional features of correlation coefficient, fluctuation coefficient and waveform entropy, and combines the improved K-Means to construct a fuzzy clustering model, which is adaptive to various types of weather, and the prediction accuracy is not affected by the weather type; and the regularization term of the above-mentioned LSTM model is used to optimize the above-mentioned Prophet algorithm model, and the weights of the above-mentioned Prophet algorithm model and the above-mentioned LSTM model are calculated. Based on the above-mentioned final Prophet algorithm model, the above-mentioned final LSTM model, the LSTM model weight and the Prophet algorithm model weight, the output prediction model of the photovoltaic power station is constructed, so that the two models can ensure the training effect of their respective models under the characteristic factors they are good at, so that the prediction value has higher accuracy as a whole, thereby solving the problem that the prediction model of photovoltaic output in the prior art is not optimized for weather models and photovoltaic historical output data, resulting in low accuracy of the prediction model.
[0219] 2) The device for constructing the output prediction model of the photovoltaic power station of the present application utilizes the three-dimensional features of correlation coefficient, fluctuation coefficient and waveform entropy, and combines the improved K-Means to construct a fuzzy clustering model, which is adaptive to various types of weather, and the prediction accuracy is not affected by the weather type; and the regularization term of the above-mentioned LSTM model is used to optimize the above-mentioned Prophet algorithm model, and the weights of the above-mentioned Prophet algorithm model and the above-mentioned LSTM model are calculated. Based on the above-mentioned final Prophet algorithm model, the above-mentioned final LSTM model, the LSTM model weight and the Prophet algorithm model weight, the output prediction model of the photovoltaic power station is constructed, so that the two models can ensure the training effect of their respective models under the characteristic factors they are good at, so that the prediction value has higher accuracy as a whole, thereby solving the problem that the prediction model of photovoltaic output in the prior art is not optimized for weather models and photovoltaic historical output data, resulting in low accuracy of the prediction model.
[0220] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for constructing an output prediction model for a photovoltaic power station, characterized in that: include: Acquire an original data set consisting of a plurality of surface extraterrestrial irradiance correlation coefficients, a plurality of surface extraterrestrial irradiance fluctuation coefficients, and a plurality of irradiance difference waveform entropies, and use a K-Means clustering algorithm to perform clustering processing on the original data set to obtain a clustering result, so as to divide the original data set into a plurality of fuzzy weather clustering sub-data sets; The Prophet algorithm model and the LSTM model are respectively trained in parallel based on the clustering results to obtain confidence values and confidence intervals of the Prophet algorithm model and the LSTM model; The Prophet algorithm model is optimized using the regularization term of the LSTM model, and the weights of the Prophet algorithm model and the LSTM model are calculated to obtain a final Prophet algorithm model, a final LSTM model, LSTM model weights, and a Prophet algorithm model weight; Based on the final Prophet algorithm model, the final LSTM model, the LSTM model weights and the Prophet algorithm model weights, an output prediction model of the photovoltaic power station is constructed, wherein the output prediction model of the photovoltaic power station is used to predict the output of the photovoltaic power station according to the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy.
2. The method according to claim 1, characterized in that After constructing the output prediction model of the photovoltaic power station, the method further includes: The output prediction model of the photovoltaic power station is used to process the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy to obtain the prediction value of the final Prophet algorithm model and the prediction value of the final LSTM model; Based on the LSTM model weight and the Prophet algorithm model weight, the predicted value of the final Prophet algorithm model and the predicted value of the final LSTM model are weighted and summed to obtain a final output prediction value.
3. The method according to claim 1, characterized in that The Prophet algorithm model is optimized by using the regularization term of the LSTM model, and the weights of the Prophet algorithm model and the LSTM model are calculated to obtain the LSTM model weight and the Prophet algorithm model weight, including: The total error function is constructed as: Adjusting the weight of the LSTM model and the weight of the Prophet algorithm model multiple times to gradually reduce the value of the total error function until the value of the total error function is a minimum value; in, is the value of the total error function, is the prediction error value of the LSTM model or the prediction error value of the Prophet algorithm model, P1 is the first penalty term, P2 is the second penalty term, the first penalty term limits the prediction values of the two models to the confidence interval of the other model, and the second penalty term is used to optimize the Prophet algorithm model and perform weighted average of the prediction values of the LSTM model and the Prophet algorithm model.
4. The method according to claim 3, characterized in that Before constructing the total error function, the method further includes: according to Determining the first penalty item; Among them, λ is the penalty coefficient, is the maximum value of the confidence interval of the LSTM model, is the minimum value of the confidence interval of the LSTM model, is the maximum value of the confidence interval of the Prophet algorithm model, is the maximum value of the confidence interval of the Prophet algorithm model.
5. The method according to claim 3, characterized in that: Before constructing the total error function, the method further includes: according to determining the second penalty item; Among them, λ is the penalty coefficient, T is the number of weight vector parameters, and w j is the LSTM model weight or the Prophet algorithm model weight.
6. The method according to claim 1, characterized in that Get multiple surface extraterrestrial irradiance correlation coefficients, including: according to Determining a plurality of correlation coefficients of extraterrestrial irradiance on the surface; Where R is the correlation coefficient of the surface extraterrestrial irradiance, E O,i is the measured value of surface irradiance at the i-th moment, is the mean of the measured values of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, is the mean of the measured values of the surface irradiance at the i-th moment, and N is the maximum moment.
7. The method according to claim 1, characterized in that Obtain multiple irradiance difference waveform entropies, including: according to Determining a plurality of said surface extraterrestrial irradiance fluctuation coefficients; Where S is the irradiance difference waveform entropy, p i is the intermediate parameter, E O,i is the measured value of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, and N is the maximum moment.
8. The method according to claim 1, characterized in that Obtain multiple extraterrestrial irradiance fluctuation coefficients, including: according to determining a plurality of said extraterrestrial irradiance fluctuation coefficients; Wherein, B is the extraterrestrial irradiance fluctuation coefficient, E O,i is the measured value of surface irradiance at the i-th moment, E S,i is the measured value of surface irradiance at the i-th moment, and N is the maximum moment.
9. A device for constructing an output prediction model of a photovoltaic power station, characterized in that: include: An acquisition unit is used to acquire an original data set consisting of a plurality of surface extraterrestrial irradiance correlation coefficients, a plurality of surface extraterrestrial irradiance fluctuation coefficients and a plurality of irradiance difference waveform entropies, and cluster the original data set using a K-Means clustering algorithm to obtain a clustering result, so as to divide the original data set into a plurality of fuzzy weather clustering sub-data sets; A first processing unit is used to use a Prophet algorithm model and an LSTM model to perform parallel training based on the clustering results, respectively, to obtain confidence values and confidence intervals of the Prophet algorithm model and the LSTM model; The second processing unit is used to optimize the Prophet algorithm model by using the regularization term of the LSTM model, and calculate the weights of the Prophet algorithm model and the LSTM model to obtain a final Prophet algorithm model, a final LSTM model, an LSTM model weight, and a Prophet algorithm model weight; The third processing unit is used to construct an output prediction model of the photovoltaic power station based on the final Prophet algorithm model, the final LSTM model, the LSTM model weights and the Prophet algorithm model weights, wherein the output prediction model of the photovoltaic power station is used to predict the output of the photovoltaic power station according to the input surface extraterrestrial irradiance correlation coefficient, surface extraterrestrial irradiance fluctuation coefficient and irradiance difference waveform entropy.
10. A system for constructing an output prediction model of a photovoltaic power station, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for constructing an output prediction model for executing the photovoltaic power station described in any one of claims 1 to 8.