A short-term power forecasting method for photovoltaic power plants based on improved ESOA-GA
Through the improved ESOA-GA algorithm, combined with the egret group optimization and genetic algorithm, a training and optimized neural network power prediction model was constructed, which solved the problem of difficult nonlinear relationships in short-term power prediction of photovoltaic power plants and the early maturity convergence of the algorithm, and achieved high-precision and reliability power prediction, supporting the efficient operation of photovoltaic power plants and power grids.
Patent Information
- Application Number
- CN202510183747.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-02-19
AI Technical Summary
The existing short-term power prediction methods for photovoltaic power plants are difficult to accurately characterize the nonlinear relationship between the power output of photovoltaic power plants and the complex and variable meteorological conditions and power station operating parameters, resulting in large errors in the prediction results. Moreover, the optimization algorithm is prone to premature convergence when dealing with complex parameter optimization problems, and local optimal solution traps.
The improved ESOA-GA algorithm is used to conduct local searches through the egret group optimization algorithm, and global searches are carried out in combination with the genetic algorithm. The trained and optimized neural network power prediction model is built to deeply explore the optimal solutions in the local area and search in a wider solution space to avoid falling into the local optimal solutions.
It significantly improves the accuracy and reliability of short-term power prediction of photovoltaic power plants, enhances the generalization ability and robustness of the prediction model, helps photovoltaic power plants to formulate scientific and reasonable power generation plans, improves the utilization efficiency of power resources, reduces operating costs, and provides reliable guarantees for the stable operation of the power grid.
Smart Images

Figure CN119647548B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of photovoltaic power stations, and in particular to a photovoltaic power station power short-term prediction method based on improved ESOA-GA. Background Art
[0002] In the field of energy, the utilization and prediction of renewable energy is an important research direction. Among them, photovoltaic power stations, as an important part of renewable energy, have attracted much attention for their power prediction. The photovoltaic power station short-term power prediction method based on improved ESOA-GA involved in this paper aims to improve the accuracy and reliability of photovoltaic power station short-term power prediction by combining advanced optimization algorithms, and provide strong support for the efficient operation of photovoltaic power stations and the stable dispatch of power grids.
[0003] There are currently many problems with short-term prediction of photovoltaic power station power. Most traditional prediction methods are based on simple mathematical models or empirical formulas, which make it difficult to accurately describe the nonlinear relationship between photovoltaic power station power output and complex and changeable meteorological conditions, power station operating parameters and other factors, resulting in large errors in the prediction results. Some existing prediction models based on a single optimization algorithm are prone to premature convergence when dealing with complex parameter optimization problems, that is, they fall into the local optimal solution too early without finding the global optimal model parameter combination, thus limiting the further improvement of prediction accuracy.
[0004] These current situations and shortcomings are mainly caused by the following aspects. On the one hand, the power output of photovoltaic power stations is jointly affected by various meteorological factors such as solar irradiance, temperature, humidity, wind speed, and operating factors such as photovoltaic module characteristics and inverter efficiency. These factors interact with each other to form a complex nonlinear relationship, which is difficult for traditional methods to deal with effectively. On the other hand, some existing optimization algorithms have limitations in search strategies, such as insufficient search range and excessive sensitivity to local optimal solutions, which leads to the inability to fully explore the solution space when optimizing the parameters of the prediction model. The abnormal effects brought by these deficiencies include: large prediction errors may cause the power generation plan of the photovoltaic power station to be seriously inconsistent with the actual power generation situation, thereby affecting the supply and demand balance of the power grid and increasing the difficulty and cost of the power grid scheduling; at the same time, it will also affect the economic benefits of the photovoltaic power station, such as missing the best power trading opportunity due to inaccurate prediction or increasing the unreasonable use of energy storage equipment; in addition, it may also threaten the stability of the power grid. For example, when a large-scale photovoltaic power station is connected to the power grid, inaccurate power prediction may cause voltage fluctuations, frequency deviations and other problems, affecting the safe and stable operation of the power system. Summary of the invention
[0005] In view of the above problems existing in the prior art, the present application provides a photovoltaic power station short-term power prediction method based on improved ESOA-GA.
[0006] The embodiment of the present disclosure provides a photovoltaic power station short-term power prediction method based on improved ESOA-GA, comprising the following steps:
[0007] S1. Collect the operation data and meteorological data of the photovoltaic power station in advance through multiple source channels, and construct a data set after preprocessing and storage;
[0008] S2. Using the egret swarm optimization algorithm, randomly generate an initial population, and the initial population includes several groups of individuals. Combined with the data set after feature extraction, analyze the prediction accuracy of each individual to obtain the initial fitness of each individual. , based on the initial fitness numerical value, attempting to conduct a local search process around the current position of the corresponding individual, and updating each individual, by analyzing the situation before and after the update of each individual, judging the search mode of the corresponding individual, and obtaining the preliminary optimized individuals through iteration;
[0009] S3, based on S2, using genetic algorithm to simulate the natural selection process, calculate the selection probability P of each individual initially optimized, screen the individuals to be optimized, and generate a group of mixed individuals through crossover operation;
[0010] S4. According to the parameters of the neural network model corresponding to each dimension in the mixed individual, a trained and optimized power prediction model is constructed, and the final predicted power is obtained based on the trained and optimized power prediction model. .
[0011] Optionally, the specific steps of S1 include:
[0012] S11, pre-collecting the operation data and meteorological data of the photovoltaic power station from the photovoltaic power station monitoring system and the public meteorological database, wherein the operation data includes but is not limited to the actual power SP, the temperature, voltage, current and fault alarm information of the photovoltaic panels in each monitoring period, and the meteorological data includes but is not limited to the solar irradiance, temperature, humidity and wind speed in each monitoring period;
[0013] S12, removing abnormal values in the operation data and the meteorological data, and performing filling operation by interpolation method, and then normalizing the operation data and the meteorological data by data normalization method;
[0014] The coefficient method in the dimensionless processing technology is used to eliminate the units in the operating data and the meteorological data. Finally, the pre-processed operating data and the meteorological data are stored at intervals of 24 hours, and the stored operating data and the meteorological data are marked as a historical data group.
[0015] Optionally, the specific steps of S2 include:
[0016] S21. Using the egret swarm optimization algorithm and combining the historical data set, randomly generate an initial population with a population size of N. Each individual (representing a set of model parameters) is represented in a D-dimensional space, where the i-th individual The expression is: ; Where i=1, 2, ..., N;
[0017] S211, the dimension values of each individual in the initial population are within the given search range Randomly select values within , j = 1, 2, ..., D. Among them, Indicates the lower limit of the search range. Indicates the upper limit of the search range.
[0018] Optionally, the specific steps of S2 also include:
[0019] S22, by marking the unstored operating data and the meteorological data as input vectors, and combining the dimensional values in each individual, respectively calculating from the input layer to the hidden layer, and from the hidden layer to the output layer, finally obtaining the predicted power YP corresponding to each individual, combining the actual power SP, analyzing the prediction accuracy of each individual, to obtain the initial fitness of each individual , which can be obtained by:
[0020] ;
[0021] Where n represents the monitoring period, k=1, 2, ..., n, represents the predicted power in the kth monitoring period, Represents the actual power in the kth monitoring period.
[0022] Optionally, the specific steps of S2 also include:
[0023] S23, based on initial fitness numerical value, attempting to conduct a local search process around the current position of the corresponding individual to obtain the pseudo gradient estimate of each individual in the corresponding dimension , which is obtained by the following formula:
[0024] ;
[0025] In the formula, represents the pseudo gradient estimate of the jth dimension within the i-th individual; It means that on the basis of the i-th individual, after adding a disturbance to its j-th dimension value, the neural network model is rebuilt, and then the model with the perturbed dimension value combination is used to predict the training data, and then the initial fitness is obtained according to S22 The fitness value calculated by the method of It means that on the basis of the i-th individual, after removing a disturbance from its j-th dimension value, the neural network model is rebuilt, and then the model with the perturbed dimension value combination is used to predict the training data, and then the initial fitness is obtained according to S22 The fitness value calculated by the method of represents the disturbance value;
[0026] S24, each individual is estimated according to the pseudo gradient of each individual in the corresponding dimension Update to obtain the updated individuals, taking the i-th individual as an example: ;in, represents the updated i-th individual, Represents the learning rate.
[0027] Optionally, the specific steps of S2 also include:
[0028] S25, according to the updated i-th individual obtained in S24 , re-obtain the initial fitness according to S22 The updated i-th individual is calculated by Fitness ;
[0029] S26, pre-set the discrimination threshold H, and according to the updated i-th individual Fitness , analyze the situation before and after each individual update, and determine the search mode of the corresponding individual. The specific contents are as follows:
[0030] like ≤H, the corresponding individual is judged to be trapped in local search, and the search mode will be switched at this time, and the switching instruction will be triggered, where represents the initial fitness of the i-th individual;
[0031] like >H, it is determined that the corresponding individual has not yet fallen into local search. At this time, the search mode will not be switched temporarily and the local search operation will continue;
[0032] S27, when receiving the switching instruction, randomly select an individual from the initial population , where r≠i, calculate the i-th individual With a selected individual The distance is marked as , which is obtained according to the following formula:
[0033] ;
[0034] Where D represents the number of dimension values within an individual, j = 1, 2, ..., D, represents the j-th dimension value in the i-th individual, represents the value of the jth dimension within the rth individual;
[0035] S28, based on S27, according to the distance For the i-th individual Update to obtain the updated i-th individual again. The specific update content is: ;in, represents the i-th individual after updating again, represents the learning rate, is in the interval Random numbers within
[0036] S29. Based on S28, repeat the contents of S25, S26, S27 and S28 to finally obtain the preliminary optimized individuals.
[0037] Optionally, the S3 specific steps include:
[0038] S31. According to each of the preliminarily optimized individuals obtained in S29, a roulette wheel selection method is used to simulate the natural selection process and calculate the selection probability P of each of the preliminarily optimized individuals. The selection probability P is obtained in the following manner:
[0039] ;
[0040] In the formula, represents the selection probability of the i-th individual in the initial optimization, represents the maximum fitness in the population, Represents the population size, i=1, 2, ..., N.
[0041] Optionally, the S3 specific steps also include:
[0042] S32. According to the selection probability P of each initially optimized individual, screen the individuals to be optimized, mark the initially optimized individuals with a selection probability P ≥ 80% of the total probability as individuals to be optimized, otherwise, do not mark them, and generate a group of mixed individuals through a crossover operation.
[0043] Optionally, the specific steps of S4 include:
[0044] S41, constructing a trained and optimized power prediction model according to the parameters of the neural network model corresponding to each dimension in the hybrid individual, and marking the unstored operation data and the meteorological data as input vectors, inputting them into the trained and optimized power prediction model to obtain a normalized value of the predicted power, and restoring the normalized value of the predicted power to the final predicted power through an inverse normalization formula .
[0045] The present invention provides a photovoltaic power station short-term power prediction method based on improved ESOA-GA, which has the following beneficial effects:
[0046] (1) The ESOA algorithm is used to randomly generate the initial population, and the individual prediction accuracy is analyzed in combination with the feature-extracted data set to obtain the initial fitness. On this basis, a local search is carried out around the current position of the individual, and the individual is updated by calculating the pseudo-gradient estimate. This process can deeply explore the optimal solution in the local area. For example, when dealing with the complex nonlinear relationship between the power of a photovoltaic power station and multiple factors, ESOA can accurately adjust the individual parameters so that the model fits the local data features more accurately, thereby improving the prediction accuracy. After multiple rounds of iterations, the quality of the individuals can be effectively improved, and each individual can be preliminarily optimized to provide a high-quality initial population for the subsequent genetic algorithm. The efficiency of GA global search: Based on the preliminary optimization of individuals by ESOA, a genetic algorithm is introduced. GA simulates the natural selection process, calculates the selection probability to select the individuals to be optimized, and generates mixed individuals through crossover operations. This method can search in a wider solution space and avoid falling into the local optimal solution. For example, when faced with a large number of parameter combinations, GA can quickly screen out individual combinations with potential advantages, create more competitive new individuals through crossover operations, and achieve global optimization of the prediction model parameters. Through GA's further processing of the preliminary optimization results of ESOA, the entire algorithm system achieves a good balance in search efficiency and accuracy. Prediction model and application advantages: The parameters of the neural network model corresponding to each dimension in the mixed individual are used to construct a trained and optimized power prediction model, and finally obtain accurate predicted power. This process realizes the efficient transformation from raw data to accurate prediction. The prediction model shows many advantages in practical applications, such as improving the accuracy of power scheduling of photovoltaic power stations and reducing power waste or insufficient supply caused by prediction errors. By accurately predicting power, power stations can better arrange power generation plans, improve the utilization efficiency of power resources, and reduce operating costs. At the same time, it provides reliable guarantees for the stable operation of the power grid, reduces the impact on the power grid caused by power fluctuations of photovoltaic power stations, and improves the stability and reliability of the entire power system.
[0047] (2) Using the Egret Swarm Optimization Algorithm, combined with the historical data set, the initial population of N is randomly generated. In the D-dimensional space, the values of each dimension of each individual are randomly selected within the given search range. This method enriches the diversity of the initial solution as much as possible, preparing for the subsequent avoidance of the algorithm from falling into the local optimal solution. In the complex problem of photovoltaic power station power prediction, different initial solutions mean different combinations of neural network model parameters, thereby fully exploring the parameter space and increasing the probability of finding the global optimal solution. Taking the unstored operating data and meteorological data as the input vector, the predicted power YP is calculated in combination with the values of each dimension of the individual, and then combined with the actual power SP, the initial fitness is calculated to further measure the prediction accuracy of the model represented by each individual, providing a clear direction for algorithm optimization. In the iteration of the Egret Swarm Optimization Algorithm, individuals are selected according to the fitness level, guiding the population to evolve in the direction of higher prediction accuracy, significantly improving the accuracy of the photovoltaic power station power prediction model, providing a reliable basis for the power dispatching, operation and management of the power station, and reducing the losses caused by inaccurate prediction.
[0048] (3) Based on the initial fitness, local search is carried out. By calculating the pseudo-gradient estimate, the parameter optimization direction around the individual's current position can be accurately located. In the power prediction of photovoltaic power stations, different parameter combinations have a certain impact on the prediction accuracy. For example, when adjusting the weights and biases of the neural network model, by applying a small perturbation to each dimension, comparing the fitness values before and after the perturbation, and then calculating the pseudo-gradient, it is like finding a path to a better solution in a complex parameter maze, helping individuals to continuously approach the optimal solution in the local area, significantly improving the accuracy of the prediction model.
[0049] (4) Individuals are updated based on pseudo-gradient estimates, and the update step size is controlled by the learning rate, thus achieving stable and effective adjustment of model parameters. This process avoids missing the optimal solution due to excessive update amplitude, and also prevents slow convergence due to slow update. For example, in actual prediction scenarios, with the continuous update of individuals, the model's prediction error for photovoltaic power station power gradually decreases, and it can simulate and predict power changes more accurately, providing solid data support for the power station to reasonably arrange power generation plans and optimize energy scheduling, effectively reducing operational risks.
[0050] (5) The fitness is recalculated after each update of the individual. This process ensures that the algorithm can closely track the changes in individual performance. In the photovoltaic power station power prediction scenario, the individuals are continuously updated iteratively, so that the model parameters gradually approach the optimal solution, and the prediction error continues to decrease. By repeatedly comparing the fitness before and after the update, it is ensured that each update is carried out in the direction of improving the prediction accuracy. The final preliminary optimized individuals can provide a solid foundation for building a high-precision power prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application.
[0052] Figure 1 The present invention is a schematic flow chart of a method for short-term power prediction of a photovoltaic power station based on improved ESOA-GA. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] Example 1
[0055] See also Figure 1 The present invention provides a photovoltaic power station short-term power prediction method based on improved ESOA-GA, comprising the following steps:
[0056] S1. Collect the operation data and meteorological data of the photovoltaic power station in advance through multiple source channels, and construct a data set after preprocessing and storage;
[0057] S2. Use the Egret Swarm Optimization Algorithm (ESOA) to randomly generate an initial population, which includes several groups of individuals. Combined with the data set after feature extraction, analyze the prediction accuracy of each individual to obtain the initial fitness of each individual. , based on the initial fitness numerical value, attempting to conduct a local search process around the current position of the corresponding individual to obtain the pseudo gradient estimate of each individual in the corresponding dimension , and update each individual, by analyzing the situation before and after the update of each individual, determine the search mode of the corresponding individual, and obtain the preliminary optimized individuals through iteration;
[0058] S3. Based on S2, a genetic algorithm (GA) is used to simulate the natural selection process, calculate the selection probability P of each initially optimized individual, screen the individuals to be optimized, and generate a group of mixed individuals through crossover operation;
[0059] S4. According to the parameters of the neural network model corresponding to each dimension in the mixed individual, a trained and optimized power prediction model is constructed, and the final predicted power is obtained based on the trained and optimized power prediction model. .
[0060] In this embodiment, comprehensive operation data and meteorological data in the photovoltaic power station are collected through multi-source channels, and a data set is constructed after preprocessing, which ensures the richness and accuracy of the data and lays the foundation for accurate prediction. By utilizing the local search capability of the Egret Swarm Optimization Algorithm (ESOA) and combining the data set after feature extraction, it is possible to carefully analyze the prediction accuracy of each individual, obtain the initial fitness and perform individual updates, and effectively mine the potential laws in the data, thereby improving the prediction model's ability to characterize the complex nonlinear relationship between the power output of the photovoltaic power station and various factors, and significantly improving the accuracy of short-term power prediction. Experimental verification shows that compared with traditional prediction methods, the prediction accuracy of the present invention can be further improved, making the prediction results closer to the actual power output, and providing a more reliable basis for the operation management of photovoltaic power stations and grid dispatching.
[0061] The combination of Egret Swarm Optimization Algorithm (ESOA) and Genetic Algorithm (GA) brings out the advantages of both. ESOA performs well in local search, can obtain the pseudo-gradient estimation value of each individual in the corresponding dimension, and accurately update the individual; while GA simulates the natural selection process, screens the individuals to be optimized by calculating the selection probability P and generates hybrid individuals through crossover operation, can search in a wider solution space, avoid falling into the local optimal solution, and achieve global optimization of model parameters. This hybrid optimization strategy makes the parameters of the power prediction model finally constructed more reasonable, the model performance is better, and it can better adapt to the power prediction needs of photovoltaic power stations under different working conditions, and improve the generalization ability and robustness of the model. Accurate short-term power prediction helps photovoltaic power stations to formulate scientific and reasonable power generation plans, so that they can match the supply and demand of the power grid more closely, and reduce the difficulty and cost increase of power grid scheduling caused by prediction errors. For example, it can avoid the phenomenon of abandonment of light due to excessively high predicted power, or the influence of power supply stability of the power grid due to too low predicted power, thereby enhancing the stability of the power grid and reducing the operation risk of the power grid. At the same time, accurate prediction can help photovoltaic power stations grasp the best time for power trading, reasonably arrange the use of energy storage equipment, and improve the economic benefits of power stations. In addition, stable power output is also conducive to improving the competitiveness of photovoltaic power stations in the electricity market, promoting the widespread application of renewable energy and optimizing the energy structure.
[0062] Example 2
[0063] Please refer to Figure 1 , specifically: S1 specific steps include:
[0064] S11, pre-collecting the operation data and meteorological data in the photovoltaic power station from the photovoltaic power station monitoring system and the public meteorological database, wherein the operation data includes but is not limited to the actual power SP, the temperature, voltage, current and fault alarm information of the photovoltaic panels in each monitoring period, and the fault alarm information records the alarm signal when each device of the photovoltaic power station fails, including the fault type, fault occurrence time, fault location, etc.; the meteorological data includes but is not limited to the solar irradiance, temperature, humidity and wind speed in each monitoring period;
[0065] S12, removing abnormal values in the operation data and the meteorological data, and performing filling operation by interpolation method, and then normalizing the operation data and the meteorological data by data normalization method, wherein, taking the actual power SP as an example, the normalization processing method is:
[0066] ;
[0067] In the formula, represents the normalized value of the actual power, represents the actual power in the ith monitoring period, and Indicates the maximum and minimum values of actual power;
[0068] The coefficient method in the dimensionless processing technology is used to eliminate the units in the operating data and the meteorological data. Finally, the pre-processed operating data and the meteorological data are stored at intervals of 24 hours, and the stored operating data and the meteorological data are marked as a historical data group.
[0069] In this embodiment, multi-source data fusion: operation data is collected from the photovoltaic power station monitoring system, covering the actual power SP, temperature, voltage, current and fault alarm information of the photovoltaic panel in each monitoring period. These data directly reflect the internal operation status of the photovoltaic power station. At the same time, meteorological data is obtained from the public meteorological database, including solar irradiance, temperature, humidity and wind speed, etc. These factors have an important impact on the power generation of the photovoltaic power station. The fusion of multi-source data makes the data more comprehensive, and can more completely describe the internal and external environment of the photovoltaic power station operation, providing a rich information basis for subsequent analysis and prediction. For example, by combining the actual power and solar irradiance data, the influence of light intensity on the power generation can be accurately analyzed. Detailed operation data: The fault alarm information in the operation data records the fault type, fault occurrence time and fault location in detail, which is crucial for the operation and maintenance management of the power station. The operation and maintenance personnel can quickly locate the fault point based on this information, carry out maintenance in time, and reduce the power generation loss caused by the fault. For example, when it is monitored that the current of a photovoltaic panel is abnormally reduced and accompanied by a fault alarm, the location of the panel can be quickly determined, and maintenance personnel can be arranged to inspect and replace it. Outlier processing: Remove outliers from operating data and meteorological data, and fill them in through interpolation, which effectively improves the quality of data. Outliers may be caused by sensor failure, data transmission errors, etc. If they are not processed, they will seriously affect the accuracy of data analysis and model prediction. Filling out outliers through reasonable interpolation methods ensures the continuity and integrity of data. For example, in a certain monitoring period, the solar irradiance data showed an obviously abnormally low value. After filling it through interpolation, the data of this period maintained a reasonable change trend with the data of the previous and next periods, avoiding interference with subsequent analysis. Normalization and dimensionless processing: The data normalization method is used to normalize the operating data and meteorological data, especially the normalization method taking the actual power SP as an example, mapping the data to a specific interval, eliminating the dimensional difference between the data. At the same time, the coefficient method in the dimensionless processing technology is used to eliminate the unit, so that different types of data can be compared and analyzed on the same scale, which is very critical for the subsequent use of machine learning algorithms for model training and prediction, and can accelerate model convergence and improve the stability and accuracy of the model. For example, when building a neural network model, normalized and dimensionless processed data can avoid the problem of unbalanced weight updates caused by differences in data magnitude, and improve the model's training efficiency and prediction accuracy. Scheduled storage and historical data group marking: The preprocessed operating data and meteorological data are stored at regular intervals of 24 hours and marked as historical data groups, which facilitates subsequent data analysis and application. This storage method facilitates data query and analysis by time series, and can quickly obtain historical data for different time periods.For example, when conducting long-term power generation trend analysis, 24-hour data from different years and months can be easily extracted from the historical data set for comparison, providing strong support for the long-term planning and performance evaluation of the power station. At the same time, the historical data set also provides rich data samples for establishing and verifying the power prediction model, which helps to improve the reliability and generalization ability of the prediction model.
[0070] Example 3
[0071] Please refer to Figure 1 , specifically: S2 specific steps include:
[0072] S21. Using the egret swarm optimization algorithm and combining the historical data set, randomly generate an initial population with a population size of N. Each individual (representing a set of model parameters) is represented in a D-dimensional space, where the i-th individual The expression is: ; Where i=1, 2, ..., N;
[0073] The meaning of the initial population: The initial population is a group of individuals randomly generated at the beginning of the algorithm. These individuals can be regarded as different initial guesses for the parameters of the prediction model. In the ESOA algorithm, each individual is a dimensional vector (for example, for a simple neural network model, the dimension may correspond to different weights and bias parameters), and the population size indicates how many groups of such parameter guesses there are. After initializing the population, the fitness function is needed to evaluate the quality of each individual. For each individual in the population, the corresponding parameters are used to build a prediction model;
[0074] S211, the dimension values of each individual in the initial population are within the given search range Randomly select values within , j=1, 2, ..., D; where, in the ESOA-GA algorithm, individuals are a way of encoding the parameters of the neural network model. Suppose we have a neural network for photovoltaic power plant power prediction. This neural network contains multiple parameters, such as the weight from the input layer to the hidden layer, the weight from the hidden layer to the output layer, and the bias of each layer. In addition, the parameters of each dimension have a search range. For the weight parameters from the input layer to the hidden layer and from the hidden layer to the output layer in the neural network, their value ranges can usually be determined based on experience and data characteristics. If the input data has been normalized, for example, normalized to the interval , the initial value range of the weight can be set to a smaller value, such as or This is because larger initial weights may cause neurons to operate in the saturation region of the activation function, making the gradient vanishing or exploding problem more likely to occur, which is not conducive to model training. For example, when using the Sigmoid activation function, excessive weights may cause the neuron output to quickly approach 0 or 1, causing the gradient to approach 0 during back propagation, making it difficult to update the parameters. The function of the bias parameter is to adjust the activation threshold of the neuron. The value range of the bias of the hidden layer and the output layer can also be determined according to the specific situation. Generally speaking, the initial value range of the bias can match the value range of the weight. For example, if it is also set to or However, in some simple models, the initial value of the bias can also be set to 0, because during the training process, the model will automatically adjust the bias value according to the data to achieve a better state.
[0075] The specific steps of S2 also include:
[0076] S22, by marking the unstored operation data and the meteorological data as input vectors, and combining the values of each dimension in each individual, respectively calculating from the input layer to the hidden layer, and from the hidden layer to the output layer, and dividing the input vector into a training set and a validation set, for the i-th individual , use the corresponding dimension values to build a neural network model (the model has not been optimized at this time), predict the training set, and finally obtain the predicted power YP corresponding to each individual. Combined with the actual power SP, analyze the prediction accuracy of each individual to obtain the initial fitness of each individual , which can be obtained by:
[0077] ;
[0078] Where n represents the monitoring period (24 hours), k=1, 2, ..., n, represents the predicted power in the kth monitoring period, Represents the actual power in the kth monitoring period.
[0079] Fitness is a measure of the quality of an individual (representing a set of model parameters). In the scenario of short-term power prediction of a photovoltaic power station, we hope to find a set of model parameters that makes the predicted power as close to the actual power as possible. By defining the fitness, the prediction accuracy of the prediction model corresponding to each individual can be quantified. The smaller the fitness, the smaller the difference between the predicted value and the actual value, and the higher the fitness of the individual. Fitness provides a goal orientation for the ESOA algorithm, allowing the algorithm to know how to evaluate and compare different individuals, thereby guiding the algorithm to search for better individuals (i.e., model parameter combinations) in the direction of improving prediction accuracy.
[0080] The predicted power is obtained by constructing a prediction model using the parameters corresponding to the individuals. For example, if a neural network model is used, the parameters in the individuals are assigned to the weights and biases of the neural network. For the input data in a given training data set (such as normalized meteorological data and historical power data), the forward propagation algorithm of the neural network is used for calculation. Starting from the input layer, the data is passed layer by layer to the output layer through operations such as weighted summation and activation function, and the final output value is the predicted power;
[0081] In this embodiment, the initial population is randomly generated: the Egret Swarm Optimization Algorithm is used in combination with the historical data set to randomly generate the initial population, and the population size is N. This operation ensures that the algorithm can search from multiple different initial solutions. In the complex problem of photovoltaic power station power prediction, different initial solutions mean different combinations of neural network model parameters, which provides rich diversity for the subsequent optimization process. By representing each individual in a D-dimensional space, and randomly taking values of each dimension of each individual within a given search range, the search space is effectively expanded, so that the algorithm can explore possible parameter combinations more comprehensively. For example, when determining the initial values of the weights and bias parameters of the neural network, the random value method avoids the risk of the algorithm falling into a local optimal solution due to fixed initial values, and increases the possibility of finding a global optimal solution; for normalized input data, the initial value range of the weight is set to a smaller value, such as [-1,1] or [-0.5,0.5], which effectively avoids the problem of neurons working in the saturation area of the activation function due to excessive weights, and prevents the gradient from disappearing or exploding, which is conducive to the stable training of the model. For example, when using the Sigmoid activation function, the appropriate weight value range ensures that the neuron output will not approach 0 or 1 too early, ensures the effectiveness of the gradient during back propagation, and enables the model to update parameters smoothly. The bias parameter value range matches the weight or is adjusted according to the simplicity of the model, which provides reasonable initial conditions for the optimization of the model and helps to improve the convergence speed and optimization effect of the algorithm. Accurately calculate the predicted power: By marking the unstored operating data and meteorological data as input vectors, and combining the values of each dimension in each individual, the input layer to the hidden layer and the hidden layer to the output layer of the neural network are calculated to obtain the predicted power YP corresponding to each individual. This calculation method based on actual data and individual parameters can accurately reflect the performance of the model parameter combination represented by each individual in actual applications. For example, by inputting real-time meteorological data such as solar irradiance and temperature and the operating data of the photovoltaic power station into the neural network model determined by the individual parameters, the predicted power obtained can truly reflect the model's ability to predict the current power generation situation. Scientifically evaluate the initial fitness: Combined with the actual power SP, the initial fitness of each individual is calculated according to a specific formula, which provides a clear optimization direction for the algorithm. The fitness calculation is based on the difference between the predicted power and the actual power during the monitoring period, which accurately measures the prediction accuracy of the model corresponding to each individual. For example, by comprehensively calculating the error between the predicted power and the actual power in each period during the 24-hour monitoring period, the prediction performance of the model in different periods can be comprehensively evaluated. The accurate evaluation of individual fitness enables the algorithm to select better individuals for subsequent operations based on the fitness level. For example, in the iterative process of the egret group optimization algorithm, the population is guided to evolve in the direction of higher prediction accuracy, thereby continuously improving the prediction ability of the model.
[0082] Example 4
[0083] Please refer to Figure 1 Specifically: S2 includes the following specific steps:
[0084] S23, based on initial fitness numerical value, attempting to conduct a local search process around the current position of the corresponding individual to obtain the pseudo gradient estimate of each individual in the corresponding dimension , which is obtained by the following formula:
[0085] ;
[0086] In the formula, represents the pseudo gradient estimate of the jth dimension within the i-th individual; It means that on the basis of the i-th individual, after adding a disturbance to its j-th dimension value, the neural network model (individual) is rebuilt, and then the model with the perturbed dimension value combination is used to predict the training data, and then the initial fitness is obtained according to S22 The fitness value calculated by the method of It means that on the basis of the i-th individual, after removing a disturbance from its j-th dimension value, the neural network model (individual) is rebuilt, and then the model with the perturbed dimension value combination is used to predict the training data, and then the initial fitness is obtained according to S22 The fitness value calculated by the method of Represents the disturbance value, which is a small change imposed on the j-th dimension value of the individual. This small change is used to approximate the change of fitness in this dimension. By comparing the values of the fitness function under the original parameters and the parameters after adding a small disturbance, the slope of the fitness function in this dimension (i.e., pseudo gradient) can be approximately calculated, thereby providing a basis for parameter updating;
[0087] Based on pseudo gradient, the individual is guided to search near the current position. By calculating the pseudo gradient of the individual in each dimension, the direction in which the function (here is the fitness) decreases relatively quickly is estimated, and then the parameters of the individual are updated in this direction. This strategy allows the individual to conduct a detailed search in the better area that has been found, trying to find a better combination of parameters, thereby further reducing the value of the fitness function and improving the prediction accuracy.
[0088] S24, each individual is estimated according to the pseudo gradient of each individual in the corresponding dimension Update to obtain the updated individuals, taking the i-th individual as an example: ;in, represents the updated i-th individual, Represents the learning rate and controls the update step size.
[0089] The S23 process further helps the individual to conduct local fine search near the current position, trying to find a better solution.
[0090] In this embodiment, by conducting a local search around the current position of the individual to obtain a pseudo gradient estimate, a clear direction is provided for the optimization of the individual. In the prediction of photovoltaic power station power, this local search capability is crucial. Due to the complexity of the problem, the global optimal solution may be hidden in the local subtle parameter adjustment. For example, when adjusting the parameters of the neural network model, a small perturbation is made to each dimension, and the pseudo gradient is calculated by comparing the fitness values under different perturbations. The changing trend of the fitness function near the current parameter can be accurately detected, thereby helping the individual to find a better parameter combination in the local area, digging out potential better solutions, and improving the performance of the prediction model. The individual is updated using the pseudo gradient estimate to ensure the accuracy and effectiveness of the parameter adjustment. Taking the i-th individual as an example, the update step size is controlled by multiplying the learning rate, so that the parameter update will not be too aggressive to miss the better solution, nor will it converge too slowly due to too small an update. In practical applications, this precise parameter update can continuously optimize the prediction model. With the update of the individual, the prediction accuracy of the model for the photovoltaic power station power is gradually improved, providing a more reliable basis for the power generation plan formulation and power dispatch of the power station, and reducing the waste of resources and operational risks caused by prediction errors.
[0091] Example 5
[0092] Please refer to Figure 1 Specifically: S2 includes the following specific steps:
[0093] S25, according to the updated i-th individual obtained in S24 , re-obtain the initial fitness according to S22 The updated i-th individual is calculated by Fitness ;
[0094] S26, pre-set the discrimination threshold H, and according to the updated i-th individual Fitness , analyze the situation before and after each individual update, and determine the search mode of the corresponding individual. The specific contents are as follows:
[0095] like ≤H, the corresponding individual is judged to be trapped in local search, and the search mode will be switched at this time, and the switching instruction will be triggered, where represents the initial fitness of the i-th individual;
[0096] like >H, it is determined that the corresponding individual has not yet fallen into local search. At this time, the search mode will not be switched temporarily and the local search operation will continue;
[0097] It reflects the ratio of the change in fitness from the current round to the previous round relative to the fitness of the previous round.
[0098] Step S26 is used to balance the local search and global search capabilities of the algorithm.
[0099] After obtaining the updated individual, its fitness needs to be recalculated. This is because the individual has changed, and its performance (i.e., fitness) in the current problem environment may also change. By recalculating the fitness, it is possible to evaluate whether this update has made the individual develop in a better direction, that is, to determine whether the updated individual can better meet the goal of the problem (for example, in the power forecast of a photovoltaic power station, whether it can make the forecast error smaller, etc.).
[0100] S27, when receiving the switching instruction, randomly select an individual from the initial population , where r≠i, calculate the i-th individual With a selected individual The distance is marked as , which is obtained according to the following formula:
[0101] ;
[0102] Where D represents the number of dimension values within an individual, j = 1, 2, ..., D, represents the j-th dimension value in the i-th individual, represents the value of the jth dimension within the rth individual;
[0103] S28, based on S27, according to the distance For the i-th individual Update to obtain the updated i-th individual again. The specific update content is: ;in, represents the i-th individual after updating again, Represents the learning rate, controls the update step size, is in the interval Random numbers within
[0104] Step S28 enables individuals to explore in a larger range and avoid falling into local optimality.
[0105] By randomly selecting another individual, calculating the distance between the two, and updating the parameters of the current individual, the individual can jump out of the current local optimal area and explore in a wider parameter space, which helps to discover new possible better areas, avoid the algorithm from converging to the local optimal solution too early, and increase the chance of finding the global optimal solution.
[0106] S29, based on S28, repeat S25, S26, S27 and S28 to finally obtain the preliminary optimized individuals. Ensure the effectiveness of algorithm iteration: The repeated execution of S25-S28 in step S29 builds an effective iterative optimization process. Each iteration is based on the previous optimization results, and individuals are continuously screened and updated to make the entire population develop in a better direction. Through continuous iteration, each individual is gradually optimized to provide a high-quality initial population for the subsequent genetic algorithm, laying a solid foundation for finally obtaining accurate photovoltaic power station power prediction results.
[0107] In this embodiment, the intelligent balanced search strategy: by setting the discrimination threshold H to determine whether the individual is trapped in the local search, this mechanism realizes the intelligent switching of the algorithm between the local search and the global search. When the fitness change amplitude meets certain conditions, the search mode is switched in time to avoid the algorithm from lingering near the local optimal solution. For example, in the photovoltaic power station power prediction scenario, if the local search cannot improve the prediction accuracy for a long time, that is, the fitness change amplitude is less than the threshold H, it is switched to the global search, which provides the possibility of finding a better solution and effectively balances the ability of the algorithm in different search stages. Continuously optimize individual performance: the fitness is recalculated after each update of the individual, and the optimization effect of the individual can be evaluated in real time, which enables the algorithm to adjust the search direction and strategy in time according to the change of fitness. In the process of repeated updates and fitness calculations, the individual gradually evolves in a better direction to meet the needs of the continuous improvement of the power prediction accuracy of the photovoltaic power station, so that the prediction model can better fit the actual power data and reduce the prediction error. Enhance the global optimization ability of the algorithm: after receiving the switching instruction, the distance between individuals is calculated and the individual is updated accordingly, so that the individual can explore in a larger solution space. This method breaks the limitations of local search and avoids falling into the local optimum. When dealing with complex photovoltaic power station power prediction problems, complex meteorological conditions and power station operating conditions make the solution space extremely complex. This step helps the algorithm to escape local traps and find the global optimal solution in a wider range, thereby significantly improving the algorithm's global optimization ability and ultimately obtaining more accurate power prediction model parameters, thereby improving the accuracy of photovoltaic power station power prediction.
[0108] Example 6
[0109] Please refer to Figure 1 , specifically: S3 specific steps include:
[0110] S31. According to each of the preliminarily optimized individuals obtained in S29, a roulette wheel selection method is used to simulate the natural selection process and calculate the selection probability P of each of the preliminarily optimized individuals. The selection probability P is obtained in the following manner:
[0111] ;
[0112] In the formula, represents the selection probability of the i-th individual in the initial optimization, represents the maximum fitness in the population, Represents the population size, i=1, 2, ..., N.
[0113] The specific steps of S3 also include:
[0114] S32. According to the selection probability P of each initially optimized individual, the individuals to be optimized are screened, and the initially optimized individuals with a selection probability P ≥ 80% of the total probability are marked as individuals to be optimized. Otherwise, no marking is performed, and a group of mixed individuals are generated through crossover operation. According to the selection probability, individuals are selected to enter the next generation population through roulette. The selection operation retains individuals with better fitness and eliminates individuals with poor fitness, simulating the natural selection process.
[0115] The specific steps of S4 include:
[0116] S41, constructing a trained and optimized power prediction model according to the parameters of the neural network model corresponding to each dimension in the hybrid individual, and marking the unstored operation data and the meteorological data as input vectors, inputting them into the trained and optimized power prediction model to obtain a normalized value of the predicted power, and restoring the normalized value of the predicted power to the final predicted power through an inverse normalization formula The latest meteorological data and historical power data are preprocessed and input into the trained model to obtain the normalized value of the predicted power. Then, the data is restored to the actual power value through the inverse normalization formula to achieve short-term prediction of the photovoltaic power station power. Finally, the prediction results are evaluated by comparing with the actual power to provide a basis for subsequent model improvements and continuously improve the accuracy of the prediction.
[0117] Prediction power of ESOA: In ESOA, prediction power is mainly used to evaluate the fitness of individuals (i.e., model parameter combinations). The purpose is to measure the prediction accuracy of the model under the current parameter combination by comparing the prediction power and the actual power, so as to guide the ESOA algorithm to search for better parameters. The prediction power at this stage is continuously calculated during the algorithm optimization process to help find a parameter combination that makes the prediction model performance relatively better.
[0118] Predicted power in the short-term power forecasting part: This stage is the actual power forecasting link after the model parameters have been optimized using ESOA-GA and the model training has been completed. Its purpose is to use the trained model to obtain an estimated value of future short-term power based on the current input data (meteorological data and historical power data). This estimated value will be directly used in practical applications, such as power dispatching and other scenarios.
[0119] In this embodiment, high-quality individuals are efficiently screened: in S31, the roulette selection method is used to calculate the probability P of individual selection. This method is based on fitness, so that individuals with high fitness have a greater chance of being selected. In this way, individuals with excellent characteristics can be screened from the preliminarily optimized individuals, providing a good foundation for subsequent optimization. For example, in the power prediction of photovoltaic power stations, high fitness means that the model parameter combination represented by the individual has a better prediction effect on historical data. Selecting it into the set of individuals to be optimized helps to quickly improve the overall model performance. Accurately construct mixed individuals: S32 screens individuals to be optimized according to the selection probability, marks individuals with high selection probability as individuals to be optimized, and generates mixed individuals through crossover operations. The crossover operation simulates the genetic recombination of biological inheritance, integrates the dominant genes of different individuals, and creates new individuals with more potential. This not only increases the diversity of the population, but also combines the strengths of multiple high-quality individuals, so that the model has stronger generalization and adaptability in complex photovoltaic power station power prediction scenarios. Construct an accurate prediction model: S41 constructs a trained and optimized power prediction model by matching the parameters of the neural network model with the dimensions of the mixed individual. Using unstored operating data and meteorological data as input vectors, the model obtains the normalized value of the predicted power, and then restores it to the final predicted power through denormalization. This method makes full use of the results of previous data processing and individual optimization. The constructed model can accurately analyze the complex relationship between meteorological data, power station operating data and power output. The predicted power finally obtained is highly accurate and can provide a reliable basis for power dispatching and power generation planning of photovoltaic power stations, effectively reducing problems such as increased operating costs and waste of power resources caused by prediction errors.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A photovoltaic power station short-term power prediction method based on improved ESOA-GA, characterized by: The following steps are involved: S1. Collect the operation data and meteorological data of the photovoltaic power station in advance through multiple source channels, and construct a data set after preprocessing and storage; S2. Use the egret swarm optimization algorithm to randomly generate an initial population, which includes several groups of individuals. Combined with the feature-extracted data set, analyze the prediction accuracy of each individual to obtain the initial fitness of each individual. , based on the initial fitness numerical value, attempting to conduct a local search process around the current position of the corresponding individual, and updating each individual, by analyzing the situation before and after the update of each individual, judging the search mode of the corresponding individual, and obtaining the preliminary optimized individuals through iteration; The specific steps of S2 include: S21. Using the egret swarm optimization algorithm and combining the historical data set, the initial population is randomly generated, and the population size is N. Each individual is represented in D-dimensional space, where the i-th individual The expression is: ; Where i=1, 2, ..., N; S211, the dimension values of each individual in the initial population are within the given search range Randomly select values within , j = 1, 2, ..., D, where, Indicates the lower limit of the search range. Indicates the upper limit of the search range; S22, by marking the unstored operation data and meteorological data as input vectors, and combining the values of each dimension in each individual, respectively calculating from the input layer to the hidden layer, and from the hidden layer to the output layer, finally obtaining the predicted power YP corresponding to each individual, combining with the actual power SP, analyzing the prediction accuracy of each individual, to obtain the initial fitness of each individual , which can be obtained by: ; Where n represents the monitoring period, k=1, 2, ..., n, represents the predicted power in the kth monitoring period, represents the actual power in the kth monitoring period; S23, based on initial fitness numerical value, attempting to conduct a local search process around the current position of the corresponding individual to obtain the pseudo gradient estimate of each individual in the corresponding dimension , which is obtained by the following formula: ; In the formula, represents the pseudo gradient estimate of the jth dimension within the i-th individual; It means that on the basis of the i-th individual, after adding a disturbance to its j-th dimension value, the neural network model is rebuilt, and then the model with the perturbed dimension value combination is used to predict the training data, and then the initial fitness is obtained according to S22 The fitness value calculated by the method of It means that on the basis of the i-th individual, after removing a disturbance from its j-th dimension value, the neural network model is rebuilt, and then the model with the perturbed dimension value combination is used to predict the training data, and then the initial fitness is obtained according to S22 The fitness value calculated by the method of represents the disturbance value; S24, each individual is estimated according to the pseudo gradient of each individual in the corresponding dimension Update to obtain the updated individuals, taking the i-th individual as an example: ;in, represents the updated i-th individual, represents the learning rate; S3, based on S2, using genetic algorithm to simulate Process, calculate the selection probability P of each individual of the initial optimization, screen the individuals to be optimized, and generate a group of mixed individuals through crossover operation; S4. According to the parameters of the neural network model corresponding to each dimension in the mixed individual, a trained and optimized power prediction model is constructed, and the final predicted power is obtained based on the trained and optimized power prediction model. .
2. The photovoltaic power station short-term power prediction method based on improved ESOA-GA according to claim 1 is characterized by: The specific steps of S1 include: S11, pre-collecting the operation data and meteorological data of the photovoltaic power station from the photovoltaic power station monitoring system and the public meteorological database, wherein the operation data includes but is not limited to the actual power SP, the temperature, voltage, current and fault alarm information of the photovoltaic panels in each monitoring period, and the meteorological data includes but is not limited to the solar irradiance, temperature, humidity and wind speed in each monitoring period; S12, removing outliers in the operation data and meteorological data, and performing filling operations by interpolation method, and then normalizing the operation data and meteorological data by data normalization method; The coefficient method in the dimensionless processing technology is used to eliminate the units in the operating data and meteorological data. Finally, the preprocessed operating data and meteorological data are stored at intervals of 24 hours, and the stored operating data and meteorological data are marked as historical data groups.
3. The photovoltaic power station short-term power prediction method based on improved ESOA-GA according to claim 2 is characterized by: The specific steps of S2 also include: S25, according to the updated i-th individual obtained in S24 , re-obtain the initial fitness according to S22 The updated i-th individual is calculated by Fitness ; S26, pre-set the discrimination threshold H, and according to the updated i-th individual Fitness , analyze the situation before and after each individual update, and determine the search mode of the corresponding individual. The specific contents are as follows: like ≤H, the corresponding individual is judged to be trapped in local search, and the search mode will be switched at this time, and the switching instruction will be triggered, where represents the initial fitness of the i-th individual; like >H, it is determined that the corresponding individual has not yet fallen into local search. At this time, the search mode will not be switched temporarily and the local search operation will continue; S27, when receiving the switching instruction, randomly select an individual from the initial population , where r≠i, calculate the i-th individual With a selected individual The distance is marked as , which is obtained according to the following formula: ; Where D represents the number of dimension values within an individual, j = 1, 2, ..., D, represents the j-th dimension value in the i-th individual, represents the value of the jth dimension within the rth individual; S28, based on S27, according to the distance For the i-th individual Update to obtain the updated i-th individual again. The specific update content is: in, represents the i-th individual after updating again, represents the learning rate, is in the interval Random numbers within S29. Based on S28, repeat the contents of S25, S26, S27 and S28 to finally obtain the preliminary optimized individuals.
4. The photovoltaic power station short-term power prediction method based on improved ESOA-GA according to claim 3 is characterized by: The specific steps of S3 include: S31, based on the preliminary optimized individuals obtained in S29, a roulette wheel selection method is used to simulate The selection probability P of each individual after preliminary optimization is calculated, which can be obtained in the following way: ; In the formula, represents the selection probability of the i-th individual in the initial optimization, represents the maximum fitness in the population, Represents the population size, i=1, 2, ..., N.
5. The photovoltaic power station short-term power prediction method based on improved ESOA-GA according to claim 4 is characterized by: The specific steps of S3 also include: S32. According to the selection probability P of each initially optimized individual, screen the individuals to be optimized, mark the initially optimized individuals with a selection probability P ≥ 80% of the total probability as individuals to be optimized, otherwise, do not mark them, and generate a group of mixed individuals through a crossover operation.
6. The photovoltaic power station short-term power prediction method based on improved ESOA-GA according to claim 5 is characterized by: The specific steps of S4 include: S41. According to the parameters of the neural network model corresponding to each dimension in the hybrid individual, a trained and optimized power prediction model is constructed, and the unstored operation data and meteorological data are marked as input vectors and input into the trained and optimized power prediction model to obtain the normalized value of the predicted power. The normalized value of the predicted power is restored to the final predicted power through the denormalization formula. .
Citation Information
Patent Citations
Photovoltaic base station short-term photovoltaic power prediction method based on improved sparrow algorithm optimization
CN113762603A
Power prediction method considering photovoltaic power clustering
CN119272905A