Photovoltaic power prediction method based on extreme learning machine
By combining a photovoltaic power prediction method based on extreme learning machine with sparrow search algorithm and meteorological factors, the problems of accuracy and anti-interference in photovoltaic output power prediction are solved, achieving high-precision photovoltaic power prediction and supporting the optimization of power grid dispatch.
Patent Information
- Application Number
- CN202211459106.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-11-21
AI Technical Summary
Existing technologies have low accuracy in predicting photovoltaic output power and poor anti-interference capabilities, making it difficult to meet the needs of grid dispatch.
A photovoltaic power prediction method based on Extreme Learning Machine (ELM) is adopted. The weights and thresholds of the ELM are optimized by combining the Sparrow Search algorithm. By selecting meteorological factors as input features and performing dimensionality reduction and clustering operations, the stability and robustness of the prediction model are improved.
It achieves high-precision photovoltaic power prediction, improves the anti-interference ability and accuracy of the prediction model, supports the power grid in rationally arranging day-ahead dispatch plans, and reduces economic losses.
Smart Images

Figure CN115907153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power prediction technology, and more specifically to a photovoltaic power prediction method based on extreme learning machine. Background Technology
[0002] The application of photovoltaic (PV) power generation in the power industry is developing rapidly. The large-scale grid connection of PV power plants has brought significant impacts to the power grid, posing challenges to the rationality and economic efficiency of the day-ahead dispatch plan. Accurately predicting the short-term output power of PV power systems helps the power grid dispatch center to rationally arrange day-ahead dispatch plans, reduce economic losses of grid-connected PV power plants, and is of great significance to the stable operation of the power system.
[0003] Currently, scholars both domestically and internationally have conducted extensive research on photovoltaic (PV) output power prediction technology. Based on the prediction timescale, prediction methods can be categorized into ultra-short-term (0–4 h), short-term (0–72 h), and medium-to-long-term (30 days–1 year). Depending on the method, PV output power prediction is mainly divided into physical methods, statistical methods, and combined methods. Physical methods are based on the power generation principle of PV cells, establishing a physical model using meteorological data and PV power plant information, and then calculating the output power value of the PV power generation system. However, physical modeling methods are highly dependent on the accuracy of geographical location information and meteorological data, and have poor anti-interference capabilities.
[0004] Therefore, improving the accuracy and anti-interference capability of photovoltaic output power prediction technology has become an urgent problem to be solved. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a photovoltaic power prediction method based on extreme learning machine to solve the problems of low accuracy and poor anti-interference ability of photovoltaic output power prediction using physical methods in the prior art.
[0006] This invention provides a photovoltaic power prediction method based on extreme learning machine, comprising:
[0007] Obtain the photovoltaic power prediction dataset and divide it into training and test sets;
[0008] The training set error is used as the fitness function of the sparrow search algorithm to optimize the weights and thresholds of the extreme learning machine, thereby obtaining the optimal weights and thresholds.
[0009] Meteorological factors were selected from the photovoltaic power prediction dataset as input features for the extreme learning machine.
[0010] Perform dimensionality reduction and clustering operations on the input features;
[0011] Photovoltaic power prediction results are obtained through Extreme Learning Machine.
[0012] Optionally, the training set error is used as the fitness function of the sparrow search algorithm to optimize the weights and thresholds of the extreme learning machine, obtaining the optimal weights and thresholds, including:
[0013] The initial population of the sparrow search algorithm is mapped by the congestion control algorithm.
[0014] Optionally, the congestion control algorithm includes:
[0015] Set the target optimization function as minf(x1,x2,x3,...x n ),a i <x i <b i ;
[0016] Obtain the homogenized cascaded chaotic sequence [y n ]:
[0017]
[0018] Where x represents an individual sparrow; a i and b i ρ represents the minimum and maximum values of the optimization variable interval; ρ is the multiplication factor of the congestion control algorithm.
[0019] Optionally, the initial position of the initial population in the sparrow search algorithm is z. i =a i +(b i -a i )x n .
[0020] Optionally, the safety value of the sparrow search algorithm is set in a non-linear decreasing manner.
[0021] Optionally, dimensionality reduction and clustering operations are performed on the input features, including:
[0022] The input feature vectors for clustering samples obtained based on grey relational analysis are: daily maximum solar irradiance, minimum solar irradiance, average solar irradiance, daily maximum temperature, minimum temperature, average temperature, daily average wind speed, and daily average humidity.
[0023] Optionally, K-means clustering algorithm can be used to select historical data with similar characteristics to the day to be predicted.
[0024] Optionally, principal component analysis can be used to reduce the dimensionality of the input features.
[0025] Optionally, it also includes:
[0026] A reverse learning strategy is used to generate a reverse solution, thereby expanding the search space of the sparrow search algorithm.
[0027] Beneficial effects of the embodiments of the present invention:
[0028] This invention combines an improved sparrow search algorithm to better enhance the stability and robustness of the Extreme Learning Machine, thereby achieving high-precision photovoltaic power prediction. Attached Figure Description
[0029] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:
[0030] Figure 1 A flowchart of a photovoltaic power prediction method based on extreme learning machine is shown in an embodiment of the present invention;
[0031] Figure 2 The topology of the extreme learning machine in an embodiment of the present invention is shown;
[0032] Figure 3 Another flowchart of a photovoltaic power prediction method based on extreme learning machine is shown in an embodiment of the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] This invention provides a photovoltaic power prediction method based on extreme learning machine, such as... Figure 1 and Figure 2 As shown, it includes:
[0035] Step S10: Obtain the photovoltaic power prediction dataset and divide it into training set and test set.
[0036] In this embodiment, a large amount of photovoltaic power generation data and its corresponding meteorological characteristics are collected, features and labels are constructed, and training and testing sets are defined. The effectiveness of the method is verified using a large amount of data.
[0037] Step S20: Use the training set error as the fitness function of the sparrow search algorithm to optimize the weights and thresholds of the extreme learning machine, and obtain the optimal weights and optimal thresholds.
[0038] The Sparrow Search Algorithm is a novel swarm intelligence optimization (SSA) algorithm based on the predation and anti-predation behaviors of sparrows. The SSA algorithm follows these principles: ① The population is divided into three types: discoverers, followers, and early warning sparrows; ② Discoverers provide the foraging direction and area for the entire population; ③ Discoverers and followers are allocated in a fixed ratio, which can be switched but the ratio remains unchanged; early warning sparrows are randomly generated in a certain ratio; ④ Once a predator appears, individuals issue an early warning; if the warning value is greater than the safe value, the discoverer leads the followers to move to forage; ⑤ Followers can always find the discoverer and forage or compete for resources in the vicinity; ⑥ Sensing danger, sparrows on the edge will move to the safe zone to obtain a better position.
[0039] In the SSA algorithm, the position update of an individual after each iteration is closely related to the previous one. By eliminating weaker individuals and selecting better ones to join the population, the population can be guaranteed to find the optimal region and the optimal solution more quickly, thereby achieving the initial optimization of the input weights and thresholds of the Extreme Learning Machine prediction model.
[0040] In a specific embodiment, the training set error in the dataset is set as the fitness function of CISSA. Then, the initial parameters in CISSA are set and iterated sequentially. Reaching the maximum number of iterations or the algorithm stabilizing indicates that the optimal value has been found.
[0041] The formulas for the fitness function and error function are as follows:
[0042] Error = F predict -F actual
[0043] Step S30: Select meteorological factors from the photovoltaic power prediction dataset as input features for the extreme learning machine.
[0044] Extreme Learning Machine (ELM) was selected as the prediction model. ELM is an algorithm based on Single Hidden Layer Feedforward Neural Networks (SLFNs). The ELM model can be represented as:
[0045]
[0046] The objective function of the Extreme Learning Machine is as follows:
[0047] min||Hβ-T|| 2 ,β∈R L×m
[0048] Using knowledge of linear algebra and matrix theory, the optimal solution to the formula can be derived as follows:
[0049] β * =H + T
[0050] The function g(x) is the activation function, β is the output weight, and H is the hidden layer output matrix. + Let H be the Moore-Penrose generalized inverse matrix.
[0051] In this embodiment, training the model with historical data that is similar to the characteristics of the day to be predicted can significantly improve the prediction accuracy.
[0052] Step S40: Perform dimensionality reduction and clustering operations on the input features.
[0053] In this embodiment, dimensionality reduction and clustering operations are performed on the input features to avoid the curse of dimensionality and data redundancy.
[0054] Step S50: Obtain photovoltaic power prediction results through Extreme Learning Machine.
[0055] In this embodiment, the training set error is used as the fitness function to optimize the sparrow search algorithm. The weights and thresholds of the extreme learning machine are optimized to reach the optimal state. The optimal weights and thresholds obtained by optimization are used to initialize the prediction model of the extreme learning machine. The meteorological factors in the test set are used as input features to realize photovoltaic power prediction.
[0056] This invention combines an improved sparrow search algorithm to better enhance the stability and robustness of the Extreme Learning Machine, thereby achieving high-precision photovoltaic power prediction.
[0057] As an optional implementation, step S20 includes:
[0058] The initial population of the sparrow search algorithm is mapped by the congestion control algorithm.
[0059] In this embodiment, the population is initialized by mapping through a congestion control algorithm, which makes the initial solution locations more evenly distributed, generates high-quality initial solutions, and increases population richness.
[0060] As an optional implementation, the congestion control algorithm includes:
[0061] Set the target optimization function as minf(x1,x2,x3,...x n ),a i <x i <b i ;
[0062] Obtain the homogenized cascaded chaotic sequence [y n ]:
[0063]
[0064] Where x represents an individual sparrow; a i and b iρ represents the minimum and maximum values of the optimization variable interval; ρ is the multiplication factor of the congestion control algorithm.
[0065] In this embodiment, the improved Cubic chaotic mapping expression is as follows:
[0066]
[0067] [y n ]
[0068] The update formulas for the discoverer, scout, and early warning agent in the sparrow search algorithm are as follows:
[0069]
[0070]
[0071]
[0072] A population of n sparrows can be represented in the following form:
[0073]
[0074] In swarm intelligence optimization algorithms, Cubic chaos is widely used, but the uniformity of the original Cubic chaos mapping distribution cannot be guaranteed. Therefore, in this embodiment, an improved Cubic mapping is used to initialize the sparrow search algorithm.
[0075] As an optional implementation, the initial position of the initial population in the sparrow search algorithm is z. i =a i +(b i -a i )x n .
[0076] The basic SSA algorithm does not address this during population initialization, using random generation to initialize the sparrow population, resulting in weak traversal of individual sparrows. An improved Cubic chaotic mapping method is used to initialize the population, resulting in a more diverse population and a more even distribution of initial solutions in the initial space, thus improving the algorithm's convergence speed and accuracy. The improved Cubic chaotic mapping is a common mapping method used in swarm intelligence algorithms for population initialization, possessing strong applicability, good randomness, and wide distribution. The improved Cubic chaotic initialization results in a more balanced distribution of individuals in the population, performing better than traditional Cubic chaotic initialization. Using the improved Cubic chaotic mapping allows the algorithm to have a better individual distribution during population initialization, enabling the improved algorithm to achieve faster iteration speeds in the early stages of the search.
[0077] As an optional implementation, the safety value of the sparrow search algorithm is set in a non-linear decreasing manner.
[0078] In the SSA algorithm, the discoverer is responsible for finding food and providing the foraging area and direction for the entire population; therefore, updating the discoverer's position is extremely important. The discoverer's position update is related to the safety value ST. Choosing different safety values at different iterations can help the population escape local optima. This method uses a non-linear decreasing method for ST. The formula for calculating ST is as follows:
[0079]
[0080] In the formula, ST takes the value [0.5, 1]; ST max 1; ST min 0.5; t is the current iteration number, and Maxiterm is the maximum number of iterations.
[0081] In the early stages of iteration, ST is set to a larger value, ensuring that the population has a high probability of searching for the optimal solution within a wide range of safe locations. In the later stages of iteration, ST is set to a smaller value, allowing the population to escape the current position and local optima with a higher probability.
[0082] In the SSA algorithm, the position update of an individual after each iteration is closely related to its previous position. By eliminating weaker individuals and selecting stronger ones to join the population, the population can be guaranteed to find the optimal region and the optimal solution more quickly. Therefore, this method uses a back-learning strategy to generate back-side solutions, enabling particles to explore more high-quality spaces, thereby improving the diversity of the population.
[0083] This invention combines an improved sparrow search algorithm to better enhance the stability and robustness of the Extreme Learning Machine, thereby achieving high-precision photovoltaic power prediction. Based on the original sparrow search algorithm, an improved Cubic chaotic mapping, adaptive dynamic safety value, and reverse learning mechanism are added, improving the performance and convergence speed of the original sparrow search algorithm, thus further increasing the prediction speed of photovoltaic power generation.
[0084] As an optional implementation, dimensionality reduction and clustering operations are performed on the input features, including:
[0085] The input feature vectors for clustering samples obtained based on grey relational analysis are: daily maximum solar irradiance, minimum solar irradiance, average solar irradiance, daily maximum temperature, minimum temperature, average temperature, daily average wind speed, and daily average humidity.
[0086] As an optional implementation, the K-means clustering algorithm is used to select historical data with characteristics similar to the day to be predicted.
[0087] In this embodiment, the K-means clustering algorithm is used to select similar days. The main idea of K-means clustering is as follows: First, K clusters are randomly selected by manually assigning a number K to each cluster using K-means; then, the distance between each sample point and the center is calculated, and sample points that are closer to each center point are assigned to it; then, the cluster centers are updated until the mean vector of each cluster is updated, that is, the iteration ends when the cluster centers are no longer updated; finally, K clusters with different characteristics are generated.
[0088] As an optional implementation, principal component analysis (PCA) is used to reduce the dimensionality of the input features.
[0089] In this embodiment, PCA dimensionality reduction is used to solve the problems of the curse of dimensionality and data redundancy.
[0090] As an optional implementation, it also includes:
[0091] A reverse learning strategy is used to generate a reverse solution, thereby expanding the search space of the sparrow search algorithm.
[0092] In this embodiment, the steps of the reverse learning strategy are as follows:
[0093] S1: Initialize the population using an elite reverse learning strategy, including the number of iterations and the ratio of predators to participants.
[0094] S2: Calculate fitness values and sort them.
[0095] S3: Sparrows update predator positions.
[0096] S4: Sparrow updates the position of new joiners.
[0097] S5: Sparrow updates the location of the Watcher.
[0098] S6: Calculate fitness values and update sparrow positions.
[0099] S7: Obtain elite sparrows, find the dynamic boundary, and update the elite sparrows using an elite reverse learning strategy.
[0100] S8: Calculate fitness values and update sparrow positions.
[0101] S9: Check if the stopping condition is met. If it is, exit and output the result; otherwise, repeat S2-8. In optional implementations, such as... Figure 3 As shown, photovoltaic power prediction is achieved through the following steps:
[0102] Step S1: Establish a photovoltaic power prediction dataset.
[0103] Step S2: Determine the Extreme Learning Machine as the prediction model, select appropriate meteorological factors as model input features, and perform dimensionality reduction and clustering operations to avoid the curse of dimensionality and data redundancy problems.
[0104] Step S3: Improve the performance of the sparrow search algorithm. First, initialize the population using an improved Cubic chaotic mapping to make the initial solution positions more evenly distributed, generate high-quality initial solutions, and increase population richness. Second, increase the adaptability of the safety value among the discoverers to balance the global search and local search of the algorithm. In addition, use back learning to enable the particles to explore a lot of search space.
[0105] Step S4: Use the training set error as the fitness function of the optimization algorithm, and optimize the weights and thresholds of the extreme learning machine to achieve the optimal state.
[0106] Step S5: Input the best result obtained from the optimization into the test set to achieve photovoltaic power prediction.
[0107] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A photovoltaic power prediction method based on extreme learning machine, characterized in that, include: Obtain the photovoltaic power prediction dataset and divide it into training and test sets; The training set error is used as the fitness function of the sparrow search algorithm to optimize the weights and thresholds of the extreme learning machine, thereby obtaining the optimal weights and thresholds; this includes mapping the initial population of the sparrow search algorithm through a congestion control algorithm. Meteorological factors are selected from the photovoltaic power prediction dataset as input features for the extreme learning machine; Perform dimensionality reduction and clustering operations on the input features; The photovoltaic power prediction results are obtained through the extreme learning machine. The congestion control algorithm includes: Set the target optimization function as minf(x1,x2,x3,...x n ),a i <x i <b i ; Obtain the homogenized cascaded chaotic sequence [y n ]: Where x represents an individual sparrow; a i and b i ρ represents the minimum and maximum values of the optimization variable interval; ρ is the multiplication factor of the congestion control algorithm. The initial position of the initial population in the sparrow search algorithm is z. i =a i +(b i -a i )x n .
2. The photovoltaic power prediction method based on extreme learning machine according to claim 1, characterized in that, The safety value of the sparrow search algorithm is set in a non-linear decreasing manner.
3. The photovoltaic power prediction method based on extreme learning machine according to claim 1, characterized in that, Performing dimensionality reduction and clustering operations on the input features includes: The input feature vectors for clustering samples obtained based on grey relational analysis are: daily maximum solar irradiance, minimum solar irradiance, average solar irradiance, daily maximum temperature, minimum temperature, average temperature, daily average wind speed, and daily average humidity.
4. The photovoltaic power prediction method based on extreme learning machine according to claim 3, characterized in that, The K-means clustering algorithm is used to select historical data with similar characteristics to the day to be predicted.
5. The photovoltaic power prediction method based on extreme learning machine according to claim 4, characterized in that, Principal component analysis (PCA) is used to reduce the dimensionality of the input features.
6. The photovoltaic power prediction method based on extreme learning machine according to claim 5, characterized in that, Also includes: The search space of the sparrow search algorithm is expanded by generating a reverse solution through a reverse learning strategy.
Citation Information
Patent Citations
Photovoltaic short-term power prediction model training method, prediction method and device
CN113392972A
Earth surface settlement prediction method based on EMD-CASSA-ELM
CN115018157A