Photovoltaic power prediction method and system
By using a hybrid nuclear limit learning machine and honey badger algorithm to optimize model parameters in photovoltaic power prediction, the problems of low prediction accuracy and insufficient generalization ability in the existing technology are solved, and higher prediction accuracy and stronger generalization ability are achieved.
Patent Information
- Application Number
- CN202311583792.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-05-27
AI Technical Summary
In the prior art, the prediction accuracy of photovoltaic power prediction is not high and the generalization ability is insufficient, making it difficult to accurately predict the power of a photovoltaic power station in complex environment changes.
A hybrid core limit learning machine is adopted to build a more powerful prediction model through the weighting sum of the two kernel functions as a hybrid kernel function, combined with the honey badger algorithm to optimize the model parameters.
It improves the accuracy and generalization ability of photovoltaic power prediction, can predict the power of photovoltaic power stations more accurately, and reduces prediction errors.
Smart Images

Figure CN120049397A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a photovoltaic power prediction method and system, belonging to the technical field of photovoltaic power prediction. Background Art
[0002] Building a new power system and increasing the proportion of clean energy output and grid connection and consumption are the top priorities for the transformation of the power system. As a typical representative of new energy power generation, photovoltaic power generation is greatly affected by meteorological factors, and its output has the characteristics of strong uncertainty, time-variation and volatility. At the same time, photovoltaic power stations have the characteristics of massive distributed grid connection, which further increases the difficulty of power grid dispatching and control. Therefore, it is of great significance to predict the power of photovoltaic and improve the prediction accuracy, to reasonably formulate dispatching plans for the power grid dispatching platform, to reduce the negative impact of photovoltaic grid connection on the power grid, to improve the operation stability of the power grid, and to increase the proportion of new energy output.
[0003] At present, most of the existing technologies for photovoltaic power prediction adopt physical modeling and data-driven modeling methods. Although the physical modeling method considers the physical characteristics of photovoltaic panels and photovoltaic power stations, it is difficult to accurately model and optimize parameters in actual applications, and it has poor adaptability in complex environmental changes. The data-driven modeling method is based on historical data to solve the mapping relationship between meteorology and photovoltaic power, and mainly uses BP neural network, support vector machine and extreme learning machine. Although BP neural network, support vector machine and extreme learning machine can reflect the mapping relationship between data, their parameters are complex and their stability is poor, resulting in low prediction accuracy of the model.
[0004] The kernel extreme learning machine combines the kernel method on the basis of the extreme learning machine. Although it has the ability of nonlinear mapping, the kernel extreme learning machine uses a single kernel function, and its prediction accuracy is not high and its generalization ability is insufficient when dealing with high-dimensional data feature samples such as photovoltaic power. Summary of the Invention
[0005] The purpose of the present invention is to provide a photovoltaic power prediction method and system, which are used to solve the problems of low prediction accuracy and insufficient generalization ability in the prior art.
[0006] To achieve the above purpose, the technical solution provided by the present invention is:
[0007] The present invention provides a photovoltaic power prediction method, and the photovoltaic power prediction method includes the following steps:
[0008] 1) Obtain the historical power data and meteorological factors of the photovoltaic power station, and preprocess the historical power data and meteorological factors of the photovoltaic power station to form a historical data set;
[0009] 2) Construct a hybrid kernel extreme learning machine, and the hybrid kernel extreme learning machine uses the weighted sum of two kernel functions as the hybrid kernel function;
[0010] 3) Train the hybrid kernel extreme learning machine using the historical dataset to obtain a prediction model, and use the prediction model to predict the photovoltaic power.
[0011] The present invention uses the weighted sum of two kernel functions as the hybrid kernel function on the basis of the existing single kernel function, which can make the learning and generalization ability of the hybrid kernel extreme learning machine stronger, the fitting ability of the photovoltaic power data with high-dimensional data feature samples stronger, and the prediction accuracy higher. Compared with the prior art, the present invention solves the problems of low prediction accuracy and insufficient generalization ability.
[0012] Further, the photovoltaic power prediction method further includes optimizing the model parameters for constructing the hybrid kernel extreme learning machine using the honey badger algorithm, and the model parameters include a regularization coefficient, a kernel parameter, and a weight coefficient.
[0013] The present invention optimizes the model parameters for constructing the hybrid kernel extreme learning machine using the honey badger algorithm, which can improve the prediction accuracy of the hybrid kernel extreme learning machine and avoid the hybrid kernel extreme learning machine falling into a local optimum and having a low prediction accuracy due to improper parameter settings during the training process.
[0014] Further, when optimizing the model parameters for constructing the hybrid kernel extreme learning machine using the honey badger algorithm, the Iterative mapping is used for population initialization.
[0015] The present invention uses the Iterative mapping for population initialization, which can make the initial population distribution more uniform and improve the population diversity.
[0016] Further, when optimizing the model parameters for constructing the hybrid kernel extreme learning machine using the honey badger algorithm, the sine-cosine search operator is used to optimize the search direction of the honey badger.
[0017] The present invention uses the sine-cosine search operator to optimize the search direction of the honey badger, which improves the global search ability and the local search ability.
[0018] Further, when optimizing the model parameters for constructing the hybrid kernel extreme learning machine using the honey badger algorithm, the reverse learning strategy is used to establish a direction solution at the optimal position determined by the honey badger algorithm each time.
[0019] The present invention uses the reverse learning strategy to establish a direction solution at the optimal position determined by the honey badger algorithm each time, which can avoid the honey badger algorithm falling into a local optimum.
[0020] Further, the two kernel functions are a radial basis kernel function and a polynomial kernel function, the radial basis kernel function is used as a local-type kernel function, and the polynomial kernel function is used as a global-type kernel function.
[0021] Furthermore, the preprocessing comprises the following steps:
[0022] A. Eliminate abnormal data and complete the eliminated abnormal data;
[0023] B. Normalize all data.
[0024] The present invention performs preprocessing operations of eliminating abnormal data, filling abnormal values and normalizing the data, which can avoid the influence of bad data on the later model training.
[0025] Furthermore, the meteorological factors obtained in step 1) are meteorological factors that have a strong correlation with photovoltaic power.
[0026] The meteorological factors obtained by the present invention are meteorological factors that have a strong correlation with photovoltaic power, and can reduce the interference of unnecessary meteorological factors on prediction.
[0027] Furthermore, the meteorological factors with strong correlation are extracted using the Pearson correlation coefficient between the photovoltaic power and the meteorological factors.
[0028] The meteorological factors with strong correlation in the present invention are extracted by using the Pearson correlation coefficient between photovoltaic power and meteorological factors. The Pearson correlation coefficient method is simple and easy to use, and the Pearson correlation coefficient method has good robustness for large sample data.
[0029] To solve the above technical problems, the present invention further provides a photovoltaic power prediction system, including a memory and a processor, wherein the processor is used to execute computer program instructions stored in the memory to implement the photovoltaic power prediction method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flow chart of the photovoltaic power prediction method of the present invention;
[0031] Figure 2 is a model structure diagram of the hybrid kernel extreme learning machine of the present invention;
[0032] Figure 3 It is the flow chart of the improved honey badger algorithm of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0034] The photovoltaic power prediction method proposed in the present invention first obtains the historical power data and meteorological factors of the photovoltaic power station, and pre-processes the historical power data and meteorological factors of the photovoltaic power station to form a historical data set. Then, a hybrid kernel extreme learning machine is constructed, and the hybrid kernel extreme learning machine uses the weighted sum of two kernel functions as the hybrid kernel function. Finally, the hybrid kernel extreme learning machine is trained using the historical data set to obtain a prediction model, and the prediction model is used to predict photovoltaic power. Compared with the prior art, the present invention solves the problems of low prediction accuracy and insufficient generalization ability.
[0035] Embodiment of photovoltaic power prediction method:
[0036] The photovoltaic power prediction method of the present invention is as follows: Figure 1 As shown, the technical solution of the present invention is specifically described as follows:
[0037] 1. Obtain the historical power data and meteorological factors of the photovoltaic power station, and pre-process the historical power data and meteorological factors of the photovoltaic power station to form a historical data set
[0038] The present invention obtains historical power data through power generation metering equipment in a photovoltaic power station, and obtains numerical weather data of areas related to the photovoltaic power station through a meteorological information detection module of the National Meteorological Science Data Center or the photovoltaic power station.
[0039] There are many types of meteorological factors in numerical weather data, including but not limited to temperature, humidity, wind speed, total radiation, air pressure, diffuse radiation and direct radiation. Considering too many meteorological factors will increase the complexity of the model, and data coupling will blur the mapping relationship between the main factors and photovoltaic power. In order to reduce the interference of unnecessary meteorological factors on the prediction, the Pearson correlation coefficient formula is used to extract meteorological factors that have a strong correlation with photovoltaic power. The Pearson correlation coefficient formula is as follows:
[0040]
[0041] Among them, X is the photovoltaic power generation, Y is a type of meteorological factor, and the larger the value of |r|, the stronger the correlation between the two. The correlation of all categories of meteorological factors is calculated, and the four categories of meteorological factors with the strongest correlation are selected as the input of the model.
[0042] The steps of preprocessing data in the present invention are described as follows:
[0043] 1) Eliminate abnormal data and complete the eliminated abnormal data
[0044] The present invention adopts the normal distribution 3σ criterion: P(x-μ>3σ)≤0.003 to eliminate abnormal data. Since meteorological data and photovoltaic power have strong continuity, the K nearest neighbor method is used to fill in the abnormal values. The formula is as follows:
[0045]
[0046] Among them, x i is the outlier at the current moment, and x i-k is the k-th data before the outlier at the current moment, and x i+k is the k-th data after the outlier at the current moment.
[0047] 2) Normalize all data
[0048] Finally, the present invention normalizes all data to avoid different weights of different dimension factors. The normalization formula is as follows:
[0049]
[0050] Among them, w max and w min are the maximum and minimum values of the data sample w, respectively.
[0051] The present invention takes the first 70% of the preprocessed data as the training set and the last 30% as the test set.
[0052] 2. Construct a hybrid kernel extreme learning machine, which uses the weighted sum of two kernel functions as the hybrid kernel function
[0053] The model structure of the hybrid kernel extreme learning machine of the present invention is as Figure 2 shown. The model structure of the kernel extreme learning machine includes an input layer, a hidden layer, and an output layer. The neuron nodes of the input layer include 4 types of strongly correlated meteorological factors and the corresponding photovoltaic power values. The number of neuron nodes in the output layer is 1, that is, the photovoltaic power prediction value.
[0054] For a given input sample, the output of the kernel extreme learning machine is:
[0055]
[0056] Among them, C is the regularization coefficient, I is the diagonal matrix, T is the target vector matrix, K(x, x i ) is the kernel function, and K ELM is the kernel matrix.
[0057] Considering the multi-dimensional data characteristics of photovoltaic power prediction and the nonlinear relationship between data, the radial basis kernel function (RBF) is used as the local kernel function, and the polynomial kernel function (Poly) is used as the global kernel function. The two are weighted to form the hybrid kernel function, and its function expression is as follows:
[0058]
[0059]
[0060] K Total (x, x i ) = λK Local + (1 - λ)K Global
[0061] Where σ, μ, υ are the kernel parameters of the kernel function respectively, λ is the weight coefficient, and λ ∈ (0, 1).
[0062] 3. Train the hybrid kernel extreme learning machine using the historical dataset to obtain a prediction model, and use the prediction model for photovoltaic power prediction
[0063] The present invention uses the honey badger algorithm to optimize the regularization coefficient C, kernel parameters σ, μ, υ and weight coefficient λ of the hybrid kernel extreme learning machine, that is, the optimization objective Ω is:[[]]
[0064] Ω = [C, σ, μ, υ, λ][[]]
[0065]
[0066] Select the mean square error (MSE) between the true value and the predicted value as the fitness function of the honey badger algorithm, and the expression of the fitness function is:[[]]
[0067]
[0068] After the iteration of the honey badger algorithm ends, output the honey badger position Ω with the optimal fitness and output it to the hybrid kernel extreme learning machine.[[]]
[0069] When the present invention optimizes the model parameters for constructing the hybrid kernel extreme learning machine using the honey badger algorithm, the Iterative mapping is used to initialize the population, the sine-cosine search operator and the reverse learning strategy are used to optimize the honey badger algorithm. The improved honey badger algorithm process of the present invention is as[[]] Figure 3 shown, and the specific steps are described as follows:[[]]
[0070] 1) Initialize the population using the Iterative mapping. The Iterative mapping has good chaotic ergodicity, randomness and regularity, making the initial population more uniform. The mathematical model for initializing the population using the Iterative mapping is:[[]]
[0071]
[0072] Where x i+1 is the position of the (i + 1)-th iteration of the population, b ∈ (0, 1), and b is 0.7 in this embodiment.[[]]
[0073] 2) Define the intensity to simulate the process of the honey badger smelling the target and finding the approximate position of the target. The function expression is as follows:[[]]
[0074]
[0075] S = (x i - x i+1 ) 2
[0076] d i = x prey - x i
[0077] wherein, I i is the odor intensity of the target, r 2 is a random number within (0, 1), S is the source intensity or prey concentration intensity, d i is the distance between the prey and the i-th honey badger.
[0078] 3) Define the density factor to simulate the process of the honey badger discovering the target and approaching the target under the guidance of the honey guide bird. The functional expression of the density factor is:
[0079]
[0080] wherein, w is the density factor, max_iter is the maximum number of iterations, and C is the constant 2.
[0081] 4) Introduce the sine-cosine search operator to optimize the search direction of the honey badger, improve the multi-dimensional solution ability of the honey badger, and enhance the global search ability and local search ability of the honey badger algorithm. Its functional expression is as follows:
[0082]
[0083] wherein, F is the flag for changing the search direction, x best is the position of the optimal individual in the current population, x prey is the position of the target, λ 2 ∈[0, 2π], λ 3 ∈[-2, 2], λ 4 ∈[0, 1]. All three parameters are random quantities subject to a uniform distribution. λ 1 is the amplitude conversion factor, and the formula is:
[0084] wherein, max_iter is the maximum number of iterations, and a is a constant. In this embodiment, a is 2.
[0085] 5) Simulate the excavation stage of the honey badger for the target and update the position of the honey badger. Its functional expression is as follows:
[0086] x new = x prey + F × {β × I × x prey + r 3 × w × di ×|cos(2πr 4 )×[1 - cos(2πr 5 )]|}
[0087] Among them, x prey is the global optimal position of the target, β is the hunting ability of the honey badger, and β is 6 in this embodiment. d i is the distance between the target and the i-th honey badger, and r 3 , r 4 and r 5 are random numbers within (0, 1).
[0088] 6) Simulate the process of the honey badger following the honey guide to find the target, and update the position of the honey badger. Its function expression is as follows:
[0089] x new = x prey + F × r 6 × w × d i
[0090] Among them, x new is the new position of the honey badger, x prey is the position of the target, r 6 is a random number within (0, 1), F is the flag to change the search direction, w is the density factor, and d i is the distance between the target and the i-th honey badger.
[0091] 7) Introduce the reverse learning strategy, establish a direction solution at the current optimal individual position, and perform perturbation to enhance the ability of the honey badger algorithm to jump out of the local optimum. Its function expression is as follows:
[0092] gBest back = ub + rand * (lb - gBest)
[0093] gBest = gBest back + b 1 * (gBest - gBest back )
[0094] b 1 = (max_iter - i / max_iter) i
[0095] Among them, gBest back is the reverse solution of the current optimal individual position in the i-th iteration, rand is a random matrix whose dimension follows the standard uniform distribution (0, 1), ub and lb are the upper and lower bounds, and b 1 is the information exchange control parameter.
[0096] 8) After meeting the number of iterations, output the model parameters of the optimal hybrid kernel extreme learning machine.
[0097] Embodiment of the photovoltaic power prediction system:
[0098] The photovoltaic power prediction system includes a memory and a processor. The processor is configured to execute computer program instructions stored in the memory to implement the photovoltaic power prediction method of the present invention. The specific content of the photovoltaic power prediction method has been introduced in detail in the embodiment of the photovoltaic power prediction method, and will not be elaborated in this embodiment.
Claims
1. A photovoltaic power prediction method, It is characterized in that The photovoltaic power prediction method comprises the following steps: 1) Obtain historical power data and meteorological factors of photovoltaic power plants, and pre-process the historical power data and meteorological factors of photovoltaic power plants to form a historical data set; 2) constructing a hybrid kernel extreme learning machine, wherein the hybrid kernel extreme learning machine uses a weighted sum of two kernel functions as a hybrid kernel function; 3) Using historical data sets to train the hybrid core extreme learning machine to obtain a prediction model, and using the prediction model to predict photovoltaic power.
2. The photovoltaic power prediction method according to claim 1, It is characterized in that The photovoltaic power prediction method also includes optimizing the model parameters of the hybrid kernel extreme learning machine by using a honey badger algorithm, wherein the model parameters include a regularization coefficient, a kernel parameter and a weight coefficient.
3. The photovoltaic power prediction method according to claim 2, It is characterized in that When the Honey Badger algorithm is used to optimize the model parameters of the hybrid kernel extreme learning machine, iterative mapping is used to initialize the population.
4. The photovoltaic power prediction method according to claim 2, It is characterized in that When the honey badger algorithm is used to optimize the model parameters of the hybrid kernel extreme learning machine, the sine and cosine search operators are used to optimize the search direction of the honey badger.
5. The photovoltaic power prediction method according to claim 2, It is characterized in that When the Honey Badger algorithm is used to optimize the model parameters of the hybrid kernel extreme learning machine, a reverse learning strategy is used to establish a directional solution each time the Honey Badger algorithm determines the optimal position.
6. The photovoltaic power prediction method according to claim 1, It is characterized in that The two kernel functions are a radial basis kernel function and a polynomial kernel function, the radial basis kernel function is used as a local kernel function, and the polynomial kernel function is used as a global kernel function.
7. The photovoltaic power prediction method according to claim 1, It is characterized in that The pre-processing comprises the following steps: A. Eliminate abnormal data and complete the eliminated abnormal data; B. Normalize all data.
8. The photovoltaic power prediction method according to claim 1, It is characterized in that The meteorological factors obtained in step 1) are meteorological factors that have a strong correlation with photovoltaic power.
9. The photovoltaic power prediction method according to claim 8, It is characterized in that The meteorological factors with strong correlation are extracted using the Pearson correlation coefficient between photovoltaic power and meteorological factors.
10. A photovoltaic power prediction system, It is characterized in that The method comprises a memory and a processor, wherein the processor is used to execute computer program instructions stored in the memory to implement the photovoltaic power prediction method according to any one of claims 1 to 9.