Photovoltaic power generation power prediction method based on ICSO-SVM model

Through the photovoltaic power generation prediction method based on the ICSO-SVM model, the problem of low prediction accuracy in complex weather conditions is solved, and the SVM hyperparameters are optimized by using the improved competitive particle swarm algorithm to achieve more efficient prediction effects and stability.

CN119093323APending Publication Date: 2024-12-06STATE GRID HENAN ELECTRIC POWER COMPANY ANYANG POWER SUPPLY +4
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411015052.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The prior art has the problem that the prediction accuracy of photovoltaic power generation power is not high and the prediction convergence speed is slow.

Method used

The photovoltaic power generation power prediction method based on the ICSO-SVM model is adopted, and the original data is acquired and preprocessed, and the features with low correlation are eliminated, and the competitive particle swarm algorithm is improved to optimize the hyperparameters of SVM, and an ICSO-SVM prediction model is established.

Benefits of technology

It improves the accuracy and stability of photovoltaic power generation prediction, and it still has a high prediction effect especially in non-sunny working conditions, which improves the convergence speed and search ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119093323A_ABST
    Figure CN119093323A_ABST
Patent Text Reader

Abstract

The invention relates to a photovoltaic power generation power prediction method based on an ICSO-SVM model, and the method comprises the following steps: firstly, obtaining historical power generation data and numerical weather prediction (NWP) data of a certain photovoltaic power station, forming an original photovoltaic power generation prediction data set, and then carrying out the preprocessing of the data; then, performing correlation analysis on the features by adopting a Spearman correlation coefficient method, and screening the features with relatively high correlation with the photovoltaic power generation power as input features of model training; in order to further compete for the search and convergence performance of a particle swarm optimization (CSO) algorithm in the SVM hyper-parameter optimization process, the algorithm is improved; on the basis, optimizing hyper-parameters of the SVM by using an improved CSO algorithm (ICSO) so as to construct an ICSO-SVM photovoltaic generation power prediction model; and then, dividing the data set into a training set and a test set according to 8: 2, fully training the prediction model by using the training set, inputting the test set into the trained optimal model for photovoltaic power generation power prediction, and evaluating a model prediction effect by using a root-mean-square error (RMSE) and a mean absolute percentage error (MAPE). Through embodiment analysis, the effectiveness and superiority of the method are verified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of new energy power generation prediction, and in particular relates to a photovoltaic power generation prediction method based on an ICSO-SVM model. Background Art

[0002] Under the "dual carbon" goal, building a new power system with a gradually increasing proportion of clean energy is the main direction of future power industry development. Photovoltaic power generation is one of the most important new energy power generation technologies and has developed rapidly. However, its intermittent, variable and random characteristics bring great challenges to the consumption of new energy and the stability of the power grid. Photovoltaic power forecasting can alleviate the problem of new energy consumption to a certain extent, reduce the abandonment rate, and play an active role in power grid management and dispatching, further provide reliable power cost analysis, and improve economic benefits.

[0003] At present, there are many methods for predicting photovoltaic power generation, including statistical methods, photovoltaic performance models, machine learning methods, and hybrid models. Since machine learning models can achieve end-to-end mapping, using a variety of machine learning combined models to predict photovoltaic output can not only provide multi-dimensional and high-depth data information for the model, but also further expand the complexity of the model itself and improve the model's ability to learn nonlinear relationships between features.

[0004] Based on the above background, establishing a high-precision prediction model based on deep learning for short-term photovoltaic power generation forecasting has practical value and guiding significance in helping power dispatching departments to improve dispatching plans, enhance photovoltaic power generation forecasting capabilities, increase the economic benefits of the photovoltaic industry, and conduct related theoretical research. Summary of the invention

[0005] The present invention aims to overcome the shortcomings of the prior art and to address the problem of low prediction accuracy of photovoltaic power generation under complex weather conditions. A photovoltaic power generation prediction method based on the ICSO-SVM model is proposed. The proposed method adopts SVM as the main prediction model and uses an improved competitive particle swarm algorithm to update its weights and bias parameters, thereby making up for the shortcomings of traditional methods in terms of low prediction accuracy and slow prediction convergence speed in scenarios with large weather fluctuations.

[0006] The technical solution adopted by the present invention is: a photovoltaic power generation power prediction method based on the ICSO-SVM model, comprising the following steps:

[0007] S1: obtain raw data and preprocess the data;

[0008] S2: Perform correlation analysis on the original features and remove features with low correlation;

[0009] S3: Improve the standard competitive particle swarm optimization algorithm;

[0010] S4: Optimize the hyperparameters of SVM based on the improved CSO algorithm, and establish an ICSO - SVM prediction model to predict the photovoltaic power generation;

[0011] S5: Data denormalization and evaluation of model prediction effect.

[0012] Specifically, in step S1: Obtain the original data and preprocess the data. There may be bad data such as missing values and outliers in the original dataset due to abnormal data acquisition devices or sensors, so the data needs to be preprocessed. On this basis, perform normalization on the data to avoid reducing the prediction accuracy of the machine learning model due to different dimensions. This part specifically includes:

[0013] (1) Filling missing values. Represent the data as {X1, X2,..., X n}, and divide it into observed data and missing data. The observed data is the non - missing value, and the observed data can be expressed as X obs = {X1, X2,..., X p}, and the missing data is expressed as X miss = {X p+1 , X p+2 ,..., X n}, where p < n. Use the EM algorithm to fill the missing values, and the steps are as follows:

[0014] 1) Initialize the current iteration number k, convergence parameter ε, evaluation parameter θ(k) at the k - th iteration, predicted value X fill , observed value X obs , and maximum expected value E(X fill |X obs ,θ(k));

[0015] 2) Execute the maximum expectation step (E - step), that is, calculate the expected value of the filled data at the k - th iteration. The calculation formula is as follows:

[0016] E(X fill |X obs ,θ(k)) = θ(k - 1) (1)

[0017] 3) Execute the maximization step (M - step), and the calculation formula is:

[0018]

[0019] In the formula, X i is the observed data.

[0020] 4) Determine whether the convergence condition is met. If the condition is met, go to the next step. Otherwise, execute k=k+1 and go to step 3). The convergence condition is:

[0021] |E(Xfill|Xobs,θ(k))-E(Xfill|Xobs,θ(k-1))|<ε (3)

[0022] 5) Output predicted value X fill , use this value as the filling value for all missing data in this dataset, and the calculation formula is:

[0023] X fill =E(X fill |X obs ,θ(k)) (4)

[0024] (2) Use the box plot method to detect abnormal data and fill it with the EM algorithm. The box plot principle is used to detect outliers in the original data, and then the outliers are regarded as missing values, and the EM algorithm is used to fill the missing values. The conditions for judging the box plot as an outlier are:

[0025]

[0026] In the formula, x a represents an outlier; Q1 and Q3 represent the upper quartile and lower quartile of the box plot, respectively; IQR represents the interquartile range, i.e., IQR = Q1-Q3;

[0027] (3) Data normalization. The dimensions of the time series data in the original data set are different and the numerical differences are large. If they are directly used for model training, the model's ability to learn nonlinear features will be weakened. The data needs to be normalized to the [0,1] interval. The min-max method is used to normalize the data, and the calculation formula is:

[0028]

[0029] In the formula, x i (k) is the original value of the kth sample of feature i, x i,max 、x i,min are the minimum and maximum values ​​of feature i, respectively, i ′(k) is the normalized value.

[0030] Specifically, step S2: performing correlation analysis on the original features and eliminating features with low correlation coefficients. The output of the photovoltaic system is mainly affected by changes in meteorological factors, such as solar irradiance, temperature, humidity, air pressure, etc. In order to select the main features that affect photovoltaic output from many meteorological factors and reduce the negative impact of factors with low correlation on the results, it is necessary to first perform correlation analysis on meteorological factors.

[0031] The Spearman correlation coefficient method is an effective way to determine the similarity of vectors. Compared with the Pearson correlation coefficient, the Spearman correlation coefficient is not affected by outliers and is suitable for calculating the correlation between two nonlinear vectors. It does not need to care about how the data changes or what distribution it conforms to. It only needs to care about the position of the corresponding value of each variable. If the corresponding values ​​of the two variables are arranged in the same or similar order in each group (or understood as one variable is a strictly monotonic function of another variable), they have significant correlation. The Spearman correlation coefficient method is used to analyze meteorological characteristics and extract key features as input features for model training.

[0032] The formula for calculating the Spearman correlation coefficient for two sequences X and Y is:

[0033]

[0034] In the formula, n is the sequence length, x i and i are the i-th variables of the sequences X and Y respectively, and are the average values ​​of the sequences X and Y, respectively. The value range of S is [-1,1]. The closer S is to 0, the lower the correlation between the two vectors. The closer it is to -1, the negative correlation is formed, and the closer it is to 1, the positive correlation is formed.

[0035] Specifically, step S3: improve the standard competitive particle swarm algorithm. Assume that the population size is M, randomly initialize the population in the solution space, and in each iteration process, first randomly divide the population into two groups, and the two groups of particles compete and compare with each other. According to the size of the fitness value, they are respectively the winner and the loser. The winner directly enters the next iteration, and the loser learns from the winner and updates its own position and speed according to the following formula.

[0036]

[0037] In the formula, x losser (t), x winner (t) represents the position vector of the loser and the winner respectively; v losser (t) represents the velocity vector of the loser; t is the number of iterations; r1(t), r2(t), and r3(t) are three random vectors in [0,1]; is the control factor, control Impact on loser position updates; There are two options, one is the average position of all particles, which is global, and the other is the average position of all particles in the local range, which is local. Usually, represents the average position of all particles.

[0038] The CSO algorithm only updates the speed and position of the loser in each iteration, which leads to a slow convergence of the population. In addition, since the exploration of the population in the global space only depends on the learning process of the loser to the winner, the population is underdeveloped, so the following method is used to improve it.

[0039] (1) In the standard CSO algorithm, the population is initialized randomly. The degree of dispersion of the initial position and whether its position in the search space is uniform will directly affect the convergence speed of the entire search process and the optimization efficiency of the algorithm. Using the chaotic optimization strategy to initialize the particle swarm, the Tent mapping has a relatively uniform ergodic distribution interval and can generate a uniformly distributed chaotic sequence, which effectively ensures the uniform distribution of the population in the solution space, thereby improving the search efficiency of the algorithm. The mathematical expression is:

[0040]

[0041] In the formula, x n is a chaotic variable, n is the chaotic variable number, n=1,2,…,m; β∈[0,1], and the appropriate β value can be selected according to the specific situation.

[0042] The Tent chaos map is used to generate the initial particle swarm position. The steps are as follows:

[0043] 1) For the n initial particle positions in the D-dimensional space, first randomly generate a D-dimensional vector as the first chaotic vector r1∈[0,1];

[0044] 2) Each dimension of r1 is iterated n-1 times using the Tent chaotic mapping formula to generate n-1 chaotic vectors, r2, r3, …, r n ;

[0045] 3) Map the generated n chaotic vectors to the solution search space according to the following formula.

[0046]

[0047] In the formula, x max 、x min Respectively represent the upper and lower limits of the search space; x i That is the position information of the i-th chaotic initialization particle.

[0048] (2) Since the mutation operator has a significant effect on improving the convergence performance of the algorithm and the diversity of the population, the t-distribution perturbation mutation is introduced to enhance the diversity of the population and help particles jump out of the local optimal position. Its mathematical expression is:

[0049]

[0050] In the formula, γ is the variable step length, which is expressed as γ = 0.01 + 0.49 (t / t max );t max is the maximum number of iterations; t_distrub represents the degree of freedom parameter, which changes with the number of iterations; x j 、x k represents the position of two random particles; p m represents the probability of mutation.

[0051] The above formula is used to perform t-distribution perturbations on individual particles. The degrees of freedom of the t-distribution change with the number of iterations. As the value of the degree of freedom parameter t increases, the numerical distribution state gradually approaches the Gaussian distribution from the Cauchy distribution. In the early stage of the algorithm iteration, the characteristics exhibited by the t-distribution are consistent with those of the Cauchy distribution, which helps to explore new search spaces and improve the global search capabilities of the algorithm. In the middle and late stages, the characteristics exhibited by the t-distribution are consistent with those of the Gaussian distribution, which helps the algorithm to search within the current solution neighborhood.

[0052] Specifically, the step S4: optimizing the hyperparameters of SVM based on the improved CSO algorithm, and establishing an ICSO-SVM prediction model to predict photovoltaic power generation.

[0053] SVM is a machine learning method based on statistical theory. It is proposed according to the principle of structural risk minimization and has the characteristics of strong generalization ability and fast calculation speed. SVM realizes nonlinear changes by introducing kernel functions. The objective function is:

[0054]

[0055] In the formula, w and b represent weights and biases; c is the penalty parameter; x i is the input of SVM.

[0056] Introducing the kernel function K(x i ,x j ), the above objective function is transformed into:

[0057]

[0058] The choice of kernel function directly affects the model performance of the support vector machine. The radial basis kernel function has the advantages of simple processing, good analytical performance, good radial symmetry, and good smoothness. Therefore, the radial basis function is selected as the kernel function of SVM. The kernel function expression is:

[0059]

[0060] Where γ is the kernel parameter of the radial basis kernel function.

[0061] The two key parameters in SVM are the penalty parameter c and the kernel parameter γ of the kernel function. The improved ICSO algorithm is used to optimize the two hyperparameters, and then the ICSO-SVM regression prediction model is constructed. The optimization steps are as follows:

[0062] 1) The SVM hyperparameters are matched one-to-one with the particle positions in the ICSO algorithm. The optimal position of the particle is the optimal hyperparameter value.

[0063] 2) Initialize the algorithm's maximum number of iterations, population size, variable step length and other parameters;

[0064] 3) Perform Tent chaos initialization on the initial position of the particle swarm;

[0065] 4) Calculate the fitness value of each particle according to the objective function of SVM;

[0066] 5) Randomly compare the populations in pairs and divide them into winners and losers according to the size of their fitness values;

[0067] 6) Update the speed and position of the failed particles and the winning particles according to the corresponding formula, then calculate and update the fitness value of the particles, and update the global optimal value and optimal solution;

[0068] 7) When the maximum number of iterations is reached, the algorithm ends and goes to step 8), otherwise continue to step 5);

[0069] 8) Obtain the optimal particle position, that is, obtain the optimal SVM hyperparameter value.

[0070] Specifically, the step S5: data denormalization and model prediction effect evaluation. The predicted photovoltaic power data is denormalized to make it physically meaningful. The calculation formula is:

[0071] x i (k) = x i ′(k)(x i,max -x i,min )+x i,min

[0072] And using the root mean square error (R MSE ), mean absolute percentage error (M APE ) to evaluate the prediction effect of the model. The test set was input into the trained best ICSO-SVM model to predict the photovoltaic power generation. MSE 、M APE The prediction effect of the model is evaluated and compared with multiple comparison algorithms to verify the effectiveness and superiority of the proposed method. MSE 、M APE The specific calculation expression is as follows:

[0073]

[0074] In the formula, y i Indicates the actual value, y i ′ represents the predicted value, is the average value, and n is the number of prediction samples.

[0075] The beneficial effects of the present invention are as follows: In the photovoltaic power generation prediction work, the setting of the hyperparameters of the prediction model needs to rely on a lot of experience and manual settings. The prediction effects of models with different parameters vary greatly, the prediction accuracy is not high enough, and the model prediction effect is not stable enough under various working conditions. In order to further improve the model prediction effect, the present invention proposes a photovoltaic power generation prediction method based on the ICSO-SVM model, and optimizes the hyperparameters of SVM using ICSO. After verification by examples, the proposed model can effectively improve the accuracy of photovoltaic power generation prediction, and still has high prediction stability under non-sunny conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Attached Figure 1 The photovoltaic power generation prediction process based on the ICSO-SVM model in the present invention;

[0077] Attached Figure 2 It is a normalized box plot of the original feature data in an embodiment of the present invention;

[0078] Attached Figure 3 It is a heat map of the Spearman correlation coefficients between the features in the embodiment of the present invention;

[0079] Attached Figure 4 It is an iterative convergence curve of each comparison algorithm in the embodiment of the present invention;

[0080] Attached Figure 5 The following is a comparison of the prediction effects of various models under sunny and non-sunny conditions in the embodiment of the present invention. DETAILED DESCRIPTION

[0081] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention, and are specifically described in combination with the embodiments below.

[0082] The present invention comprises the following steps:

[0083] S1: obtain raw data and preprocess the data;

[0084] S2: Perform correlation analysis on the original features and remove features with low correlation;

[0085] S3: Improve the standard competitive particle swarm algorithm;

[0086] S4: Based on the improved CSO algorithm, the hyperparameters of SVM are optimized and the ICSO-SVM prediction model is established to predict the photovoltaic power generation;

[0087] S5: Data denormalization and evaluation of model prediction effect.

[0088] The effectiveness of the present invention is verified as follows:

[0089] According to step 1, data is obtained and preprocessed. This embodiment uses public data from the Australian Solar Energy Center website, including data from January 1, 2020 to January 1, 2021, with a time resolution of 5 minutes and a total of 105,120 data. The characteristic information contained in this data set is shown in Table 1:

[0090] Table 1 Original dataset feature information

[0091]

[0092] Then, the data was preprocessed. The sample data obtained did not contain missing values ​​and outliers, so the data was normalized directly. The normalized box plot is shown in the attached figure. Figure 2 shown.

[0093] According to step 2, the Spearman correlation analysis method is used to perform correlation analysis on the characteristics in Table 1. After calculation, a correlation coefficient heat map is drawn as shown in the attached figure. Figure 3 As shown in the figure, the features with an absolute value of correlation with the output power greater than 0.5 are taken as the input features for model training. As can be seen from the figure, the screened features are: AC, WT, GHR, DHR, RGT, and RDT, a total of 6 input features.

[0094] According to steps 3 to 5, the data is divided into a training set and a test set in an 8:2 ratio, that is, 84,096 pieces of data are used as a training set and 21,024 pieces of data are used as a test set. Then, the ICSO-SVM photovoltaic power generation prediction model is established, and the initial population size of ICSO is set to 30 and the number of iterations is set to 200. In order to verify the effectiveness and superiority of the improved optimization algorithm, ICSO is compared with CSO, traditional particle swarm algorithm (PSO) and genetic algorithm (GA). The prediction model uses SVM. After repeated average experiments, the fitness curves of different algorithms for optimizing SVM hyperparameters and predicting are obtained as shown in the attached figure. Figure 4As shown in the figure, it can be seen that the proposed improved algorithm is better than other algorithms. Comprehensive comparison shows that ICSO can take into account the advantages of both convergence speed and search ability, so it has better optimization performance.

[0095] On this basis, in order to verify the superiority of the proposed prediction method, the prediction effects of the proposed method with SVM, LSTM, and CSO-SVM models under sunny and non-sunny conditions were compared. The parameters were set according to the empirical values. In order to objectively evaluate the prediction accuracy of the model and avoid the influence of accidental errors, 10 experiments were conducted on the prediction work under the two working conditions. The average value of the 10 prediction values ​​was taken as the final prediction result, and the error calculation and analysis was performed with the true value. The prediction effect is shown in the attached figure. Figure 5 The prediction error results are shown in Table 2. When no parameter optimization is performed, the hyperparameters are set according to the empirical values. Under the two weather conditions, the R of the proposed model is relatively good compared with that of SVM, LSTM, and CSO-SVM models. MSE and M APE The values ​​are all small. The photovoltaic power generation power fluctuates less under sunny conditions. Under cloudy conditions, the photovoltaic power generation output is more random and volatile due to weather factors. At this time, the prediction effect of each model is worse than that under sunny conditions. The maximum fluctuation of the error of the proposed model does not exceed 2%, which shows that the proposed method can effectively predict the photovoltaic power generation power with high accuracy under sunny or cloudy conditions, that is, the model has a certain stability.

[0096] Table 2 Evaluation index values

[0097]

[0098] In summary, after optimizing the hyperparameters of SVM using ICSO, the convergence speed can be accelerated to achieve better prediction results. From the examples, the effectiveness and superiority of the proposed method are fully verified, and the model still has a high prediction accuracy when facing non-sunny conditions with large fluctuations.

[0099] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations within the meaning and scope of the elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A photovoltaic power generation prediction method based on ICSO-SVM model, comprising the following steps: S1: obtain raw data and preprocess the data; S2: Perform correlation analysis on the original features and remove features with low correlation; S3: Improve the standard competitive particle swarm algorithm; S4: Based on the improved CSO algorithm, the hyperparameters of SVM are optimized and the ICSO-SVM prediction model is established to predict the photovoltaic power generation; S5: Data denormalization and evaluation of model prediction effect.

2. A photovoltaic power generation prediction method based on ICSO-SVM model according to claim 1, It is characterized in that In step S1, the original data is obtained and preprocessed. The original data set may contain bad data such as missing values ​​and abnormal values ​​caused by abnormal data acquisition equipment or sensors, and the data needs to be preprocessed. On this basis, the data is normalized to avoid the reduction of the prediction accuracy of the machine learning model due to different dimensions. The data preprocessing method in step S1 mainly includes filling the missing values ​​and processing the abnormal data. The EM algorithm is used to fill the missing values, and the box plot method is used to process the abnormal data, which specifically includes: (1) Missing value filling; Represent the data as {X 1 , X 2 , …, X n}, and divide it into observed data and missing data. The observed data are the non-missing values, and the observed data can be represented as X obs = {X 1 , X 2 , …, X p}, and the missing data are represented as X miss = {X p+1 , X p+2 , …, X n}, where p < n; Use the EM algorithm to fill in the missing values. The steps are as follows: 1) Initialize the current number of iterations k, the convergence parameter ε, the evaluation parameter θ(k) at the kth iteration, and the predicted value X fill , observed value X obs 、The maximum expected value E(X fill |X obs ,θ(k)); 2) Execute the maximum expected step (E step), that is, calculate the expected value of the filling data at the kth iteration. The calculation method is as follows: E(X fill |X obs ,θ(k))=θ(k-1) 3) Execute the maximization step (M step), the calculation formula is: In the formula, X i For observational data; 4) Determine whether the convergence condition is met. If the condition is met, go to the next step. Otherwise, execute k=k+1 and go to step 3). The convergence condition is: |E(X fill |X obs ,θ(k))-E(X fill |X obs ,θ(k-1))|<ε 5) Output predicted value X fill , use this value as the filling value for all missing data in this dataset, and the calculation formula is: X fill =E(X fill |X obs ,θ(k)) (2) Use the box plot method to detect abnormal data and use the EM algorithm to fill it. Use the box plot principle to detect outliers in the original data, then treat the outliers as missing values ​​and use the EM algorithm to fill the missing values. The conditions for judging the box plot as an outlier are: In the formula, x a Indicates outliers; Q 1 , Q 3 They represent the upper quartile and lower quartile of the box plot respectively; IQR represents the interquartile range, i.e., IQR = Q 1 -Q 3 .

3. A photovoltaic power generation prediction method based on ICSO-SVM model according to claims 1 and 2, It is characterized in that Step S1, further, normalize the data to avoid the reduction of prediction accuracy of the machine learning model due to different dimensions; the data needs to be normalized to the interval [0,1]; the min-max method is used to normalize the data, and the calculation formula is: In the formula, x i (k) is the original value of the kth sample of feature i, x i,max 、x i,min are the minimum and maximum values ​​of feature i, respectively, i ′(k) is the normalized value.

4. The photovoltaic power generation prediction method based on the ICSO-SVM model according to claim 1, It is characterized in that In the step S2, correlation analysis is performed on the original features and features with low correlation coefficients are eliminated; the output of photovoltaic panels is mainly affected by changes in meteorological factors, such as solar irradiance, temperature, humidity, air pressure, etc.; in order to screen out the main features that affect photovoltaic output from many meteorological factors and reduce the negative impact of factors with low correlation on the results, it is necessary to first perform correlation analysis on meteorological factors; The Spearman correlation coefficient method is an effective way to judge the similarity of vectors. Compared with the Pearson correlation coefficient, the Spearman correlation coefficient is not affected by outliers and is suitable for calculating the correlation between two nonlinear vectors. It does not need to care about how the data changes or what kind of distribution it conforms to. It only needs to care about the position of the corresponding value of each variable. If the corresponding values ​​of the two variables are arranged in the same or similar order in each group (or understood as one variable is a strictly monotonic function of another variable), they have significant correlation. The Spearman correlation coefficient method is used to analyze meteorological characteristics and extract key features as input features for model training. The formula for calculating the Spearman correlation coefficient for two sequences X and Y is: In the formula, n is the sequence length, x i and i are the i-th variables of the sequences X and Y respectively, and are the average values ​​of sequences X and Y respectively; the value range of S is [-1,1]. The closer S is to 0, the lower the correlation between the two vectors. The closer it is to -1, the negative correlation is formed, and the closer it is to 1, the positive correlation is formed.

5. The photovoltaic power generation prediction method based on ICSO-SVM model according to claim 1, It is characterized in that In step S3, the standard competitive particle swarm algorithm is improved; the population size is set to M, and the population is randomly initialized in the solution space. In each iteration process, the population is first randomly divided into two groups, and the two groups of particles compete and compare with each other. The winner and the loser are respectively determined according to the size of the fitness value. The winner directly enters the next iteration, and the loser learns from the winner and updates its own position and speed according to the following formula; In the formula, x losser (t), x winner (t) represents the position vector of the loser and the winner respectively; v losser (t) represents the velocity vector of the loser; t is the number of iterations; r 1 (t), r 2 (t), r 3 (t) is a random vector in the range of 3 [0,1]; is the control factor, control Impact on loser position updates; There are two options, one is the average position of all particles, which is global, and the other is the average position of all particles in the local range, which is local. Usually, represents the average position of all particles; The CSO algorithm only updates the speed and position of the loser in each iteration, which leads to a slow convergence of the population. In addition, since the exploration of the population in the global space only depends on the learning process of the loser to the winner, the development of the population is insufficient. Therefore, the following method is used to improve it. (1) In the standard CSO algorithm, the population is initialized randomly. The degree of dispersion of the initial position and whether its position in the search space is uniform will directly affect the convergence speed of the entire search process and the optimization efficiency of the algorithm. Using the chaotic optimization strategy to initialize the particle swarm, the Tent mapping has a relatively uniform ergodic distribution interval and can generate a uniformly distributed chaotic sequence, which effectively ensures the uniform distribution of the population in the solution space, thereby improving the search efficiency of the algorithm. The mathematical expression is: In the formula, x n is the chaotic variable, n is the chaotic variable number, n=1,2,…,m; β∈[0,1], the appropriate β value can be selected according to the specific situation; The Tent chaos map is used to generate the initial particle swarm position. The steps are as follows: 1) For the n initial particle positions in the D-dimensional space, a D-dimensional vector is first randomly generated as the first chaotic vector r 1 ∈[0,1]; 2) r 1 Each dimension of is iterated n-1 times using the Tent chaotic mapping formula to generate n-1 chaotic vectors, r 2 ,r 3 ,…,r n ; 3) Map the generated n chaotic vectors to the solution search space according to the following formula; In the formula, x max 、x min Respectively represent the upper and lower limits of the search space; x i That is, the position information of the i-th chaotic initialization particle; (2) Since the mutation operator has a significant effect on improving the convergence performance of the algorithm and the diversity of the population, the t-distribution perturbation mutation is introduced to enhance the diversity of the population and help particles jump out of the local optimal position. Its mathematical expression is: In the formula, γ is the variable step length, which is expressed as γ = 0.01 + 0.49 (t / t max );t max is the maximum number of iterations; t_distrub represents the degree of freedom parameter, which changes with the number of iterations; x j 、x k represents the position of two random particles; p m represents the probability of mutation; The above formula is used to perform t-distribution perturbations on individual particles. The degrees of freedom of the t-distribution change with the number of iterations. As the value of the degree of freedom parameter t increases, the numerical distribution state gradually approaches the Gaussian distribution from the Cauchy distribution. In the early stage of the algorithm iteration, the characteristics exhibited by the t-distribution are consistent with those of the Cauchy distribution, which helps to explore new search spaces and improve the global search capabilities of the algorithm. In the middle and late stages, the characteristics exhibited by the t-distribution are consistent with those of the Gaussian distribution, which helps the algorithm to search within the current solution neighborhood.

6. The photovoltaic power generation prediction method based on ICSO-SVM model according to claim 1, It is characterized in that In the step S4, the hyperparameters of SVM are optimized based on the improved CSO algorithm, and an ICSO-SVM prediction model is established to predict the photovoltaic power generation; SVM is a machine learning method based on statistical theory. It is proposed according to the principle of structural risk minimization and has the characteristics of strong generalization ability and fast calculation speed. SVM realizes nonlinear changes by introducing kernel functions. The objective function is: In the formula, w and b represent weights and biases; c is the penalty parameter; x i is the input of SVM; Introducing the kernel function K(x i ,x j ), the above objective function is transformed into: The choice of kernel function directly affects the model performance of the support vector machine. The radial basis kernel function has the advantages of simple processing, good analytical performance, good radial symmetry, and good smoothness. Therefore, the radial basis function is selected as the kernel function of SVM; the kernel function expression is: K(x i ,x j )=exp(-γ||x i -x j || 2 ),γ>0 Where γ is the kernel parameter of the radial basis kernel function; The two key parameters in SVM are the penalty parameter c and the kernel parameter γ of the kernel function. The improved ICSO algorithm is used to optimize the two hyperparameters, and then the ICSO-SVM regression prediction model is constructed. The optimization steps are as follows: 1) The SVM hyperparameters are matched one-to-one with the particle positions in the ICSO algorithm. The optimal position of the particle is the optimal hyperparameter value. 2) Initialize the algorithm's maximum number of iterations, population size, variable step length and other parameters; 3) Perform Tent chaos initialization on the initial position of the particle swarm; 4) Calculate the fitness value of each particle according to the objective function of SVM; 5) Randomly compare the populations in pairs and divide them into winners and losers according to the size of their fitness values; 6) Update the speed and position of the failed particles and the winning particles according to the corresponding formula, then calculate and update the fitness value of the particles, and update the global optimal value and optimal solution; 7) When the maximum number of iterations is reached, the algorithm ends and goes to step 8), otherwise continue to step 5); 8) Obtain the optimal particle position, that is, obtain the optimal SVM hyperparameter value.

7. The photovoltaic power prediction method based on ICSO-SVM model according to claim 1, It is characterized in that The step S4, data denormalization and model prediction effect evaluation: the predicted photovoltaic power data is denormalized to make it have physical meaning, and the calculation formula is: x i (k)=x i ′(k)(x i,max -x i,min )+x i,min And using the root mean square error (R MSE ), mean absolute percentage error (M APE ) to evaluate the prediction effect of the model; the test set was input into the trained best ICSO-SVM model to predict the photovoltaic power generation, and R MSE 、M APE The prediction effect of the model was evaluated and compared with multiple comparison algorithms to verify the effectiveness and superiority of the proposed method; MSE 、M APE The specific calculation expression is as follows: In the formula, y i Indicates the actual value, y i ′ represents the predicted value, is the average value, and n is the number of prediction samples.

Citation Information

Cited By

  • Photovoltaic power generation system parameter identification method and system based on swarm intelligence optimization algorithm

    CN120012577A

  • A photovoltaic power generation system parameter identification method and system based on a swarm intelligence optimization algorithm

    CN120012577B

  • Photovoltaic power prediction method and system based on improved optimization particle algorithm

    CN120728598A

  • A photovoltaic power prediction method and system based on an improved optimization particle algorithm

    CN120728598B