Power prediction method considering photovoltaic power clustering

By combining time convolution network and timing basic model, combined with STL decomposition and DBSCAN clustering, the improved honey badger algorithm optimizes hyperparameters, the problem of difficult nonlinear characteristics in photovoltaic power prediction is solved, and the prediction accuracy and system are improved Stability promotes sustainable development.

CN119272905APending Publication Date: 2025-01-07HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 7 Cited by

Patent Information

Application Number
CN202310818541.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing PV power prediction methods are difficult to accurately capture the nonlinear characteristics of PV power, resulting in poor performance on unseen data and overfitting problems, affecting prediction accuracy.

Method used

The time convolution network (TCN) and the time series basic model TimesNet are combined, and the high and low power predictions of photovoltaic data are carried out through STL time series decomposition and DBSCAN clustering algorithm. The improved honey badger algorithm (MHBA) is used to optimize hyperparameters and establish More accurate prediction model.

Benefits of technology

It improves the accuracy and practicality of photovoltaic power prediction, enhances the power supply reliability and grid stability of the power system, reduces dependence on traditional energy, and promotes sustainable development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272905A_ABST
    Figure CN119272905A_ABST
Patent Text Reader

Abstract

The invention discloses a power prediction method considering photovoltaic power clustering, which comprises the following steps of: firstly, acquiring historical data of a photovoltaic power station, decomposing a photovoltaic power time sequence by using an STL time sequence decomposition method, performing DBSCAN clustering on the decomposed photovoltaic power data, identifying a low-power cluster and a high-power cluster, and predicting the power of the photovoltaic power station according to the low-power cluster and the high-power cluster; establishing a photovoltaic power prediction model based on a time convolutional network and Times Net for low power and high power respectively; secondly, a badger algorithm is improved, Chebyshev chaotic mapping is adopted to improve initialization of a badger population, and a Gaussian mutation strategy and a lens imaging reverse learning strategy are introduced to obtain MHBA; and optimizing hyper-parameters of the TCN photovoltaic low-power prediction model and the TimesNet photovoltaic high-power prediction model by using an improved badger algorithm, and predicting photovoltaic power by using the optimized models to obtain a final prediction value. Compared with the prior art, the precision and effectiveness of the photovoltaic power prediction model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of photovoltaic power prediction and data processing, and in particular to a power prediction method considering photovoltaic power clustering. Background Art

[0002] With the increasing demand for carbon peak and carbon neutrality, photovoltaic power generation has received increasing attention as an environmentally friendly clean energy, and photovoltaic installed capacity is also growing rapidly. However, due to the randomness, volatility and intermittency of photovoltaic power generation, it has brought challenges to the balance of supply and demand of the power grid, and also increased the difficulty of real-time regulation. Therefore, we need to assist the dispatching department in arranging a reasonable dispatching plan through accurate photovoltaic power generation power forecasting to increase the power grid's absorption capacity. The main purpose of photovoltaic power forecasting is to predict the output power of photovoltaic modules based on weather conditions, light intensity, temperature, wind speed and other factors, which helps power system operators, users and power market participants to better plan and manage power networks. Accurate photovoltaic power forecasting can improve power supply reliability, reduce power fluctuations, and improve power grid stability. At the same time, it can also reduce dependence on traditional energy and promote sustainable development.

[0003] In the photovoltaic power forecast, factors such as meteorological conditions, geographical conditions, seasonality, and diurnal changes also need to be considered. At the same time, with the continuous development of photovoltaic module technology, the application of new materials, surface material and structural improvements will also affect the accuracy of photovoltaic power forecasts. Therefore, it is necessary to combine multiple factors for comprehensive analysis and forecasting in order to obtain more accurate forecast results.

[0004] At present, photovoltaic power prediction is mainly based on machine learning, neural networks and regression analysis. Among them, the method based on machine learning inputs historical data and real-time data into the machine learning algorithm for training, and then predicts the future photovoltaic power through the model. The neural network method imitates the structure and working mode of human brain neurons, processes input data through multiple layers of neurons, and outputs prediction results. Regression analysis predicts the change of photovoltaic power by analyzing the trends and laws in historical data in a statistical way. The change of photovoltaic power often has nonlinear characteristics. The traditional linear regression model may not be able to accurately capture the complex relationship. Machine learning and neural network methods sometimes tend to overfit the training data, resulting in poor performance on unseen data. The prediction method of photovoltaic power clustering can divide the data into different clusters or groups, so as to establish a prediction model that is more suitable for a specific pattern in each cluster. This can better handle nonlinear relationships and improve prediction accuracy. Summary of the invention

[0005] Purpose of the invention: In view of the problems existing in the prior art, the present invention provides a power prediction method taking photovoltaic power clustering into consideration, which adopts a temporal convolutional network and a time series basic model TimesNet to predict high and low power of photovoltaic data respectively. In practical applications, it is more in line with the needs of the power system, helps to improve the accuracy and practicality of photovoltaic power prediction, and can also promote the increase in the proportion of clean energy consumption and the stability of the load balance of the power system.

[0006] Technical solution: The present invention proposes a power prediction method considering photovoltaic power clustering, comprising the following steps:

[0007] Step 1: After collecting historical data of the photovoltaic power station, perform data preprocessing;

[0008] Step 2: Use the STL time series decomposition method to decompose the photovoltaic power series after data preprocessing to obtain three parts: long-term trend, seasonality and random components. According to the STL decomposition results, extract the long-term trend and seasonal characteristics of photovoltaic power data and calculate the residuals, and denoise the random components. After normalization, further analyze and model it;

[0009] Step 3: Use the DBSCAN algorithm to cluster the normalized photovoltaic power data. The normalized long-term trend and seasonality are used as feature vectors to cluster the results into low-power and high-power clusters. A photovoltaic power prediction model based on a temporal convolutional network is established to train the low-power cluster, and a TimesNet photovoltaic power prediction model is established to train the high-power cluster.

[0010] Step 4: Improve the honey badger algorithm HBA, use Chebyshev chaotic mapping to initialize the population of the honey badger algorithm to improve the population balance; introduce Gaussian mutation strategy and lens imaging reverse learning strategy in the mining stage to improve the convergence accuracy and expand the search range to obtain the MHBA algorithm;

[0011] Step 5: Use the MHBA algorithm to optimize the hyperparameters of the TCN photovoltaic power prediction model in step 3 to obtain the optimal parameters, and use the optimized TCN photovoltaic power prediction model to predict low power data to obtain prediction results;

[0012] Step 6: Use the MHBA algorithm to optimize the hyperparameters of the TimesNet photovoltaic power prediction model in step 3 to obtain the optimal parameters, and use the optimized TimesNet photovoltaic power prediction model to predict high power data to obtain the prediction results.

[0013] Furthermore, the step 1 performs data preprocessing on the historical data of the photovoltaic power station, including the following steps:

[0014] Step 1.1: Collect data of the photovoltaic power station during the historical training cycle, including ground temperature, humidity, wind speed, ground irradiance and its corresponding output power;

[0015] Step 1.2: Clean the collected historical data to determine whether there are outliers or missing data, remove outliers, and interpolate missing data;

[0016] Step 1.3: Perform feature normalization on the cleaned data, and the calculation formula used is:

[0017]

[0018] Among them, y norm is the normalized eigenvalue, y min is the minimum eigenvalue, y max is the maximum eigenvalue, and y is the original eigenvalue of the data.

[0019] Furthermore, in step 2, the STL time series decomposition method is used to perform signal processing on the photovoltaic power series, including the following steps:

[0020] Step 2.1: Decompose the preprocessed photovoltaic power series through STL to obtain three parts: long-term trend, seasonality and random components. Among them, the long-term trend reflects the overall trend of photovoltaic power stations over time, the seasonality reflects the periodic changes of power data over time, and the random component is the residual term, which contains random noise that cannot be captured by the model. The decomposition formula is:

[0021] Y t =T t +S t +R t (2)

[0022] Among them, Y t is the power data at time t, T t , S t , R t They are the trend component, periodic component and residual component at time t respectively.

[0023] Step 2.2: Perform an inner loop process to update the trend component and period component of the photovoltaic power series. Assume that T v (k) , S v (k) For the trend component and cycle component after the kth iteration in the inner loop, perform the k+1th iteration of the inner loop.

[0024] Step 2.3: Perform the outer loop process to calculate the robust weights required for the next inner loop. Assume that the trend component and cycle component obtained after one inner loop are T v , S v The residual component is calculated as:

[0025] R v =Y v -T v -S v (3)

[0026] Step 2.4: Introduce robust weight ρ for each time point v , its size can reflect the extreme situation of the residual component, and the calculation formula is as follows:

[0027] h=6*median(|R v |) (4)

[0028]

[0029] ρ v =B(R v | / h) (6)

[0030] Among them, h is the remainder, median() is the median function, B(u) is the bisquare weight function, u is the key parameter for adjusting the width of the local weighted regression window, and ρ v is the robust weight corresponding to time point v;

[0031] Step 2.5: After the recursive process of the STL inner and outer loops is completed, the STL decomposition result is obtained, the long-term trend and seasonal characteristics of the photovoltaic power data are extracted, and the residuals are calculated. The random components are denoised, that is, the residuals are normalized after removal, so that they are at the same scale, which is convenient for subsequent clustering operations.

[0032] Furthermore, the specific process of performing the k+1th inner loop iteration in step 2.2 is as follows:

[0033] Step 2.2.1: Detrending. Calculate the detrended series Y v -T v (k) .

[0034] Step 2.2.2: Perform Loess smoothing on the periodic subseries of the sequence in step 2.2.1, and obtain the smoothed results to form a temporary periodic sequence C v (k+1) .

[0035] Step 2.2.3: Temporary cycle sequence C v (k+1)After the low-throughput filtering process, that is, after three sliding average processes and one Loess process, the result sequence L is obtained. v (k+1) .

[0036] Step 2.2.4: Calculate the periodic component. The calculation expression of the periodic component of the k+1th iteration is:

[0037] S v (k+1) =C v (k+1) -L v (k+1) (7)

[0038] Step 2.2.5: Remove the periodic component. The expression for removing the periodic component is Y v -S v (k+1) .

[0039] Step 2.2.6: Calculate the trend component. Perform Loess smoothing on the photovoltaic power sequence after removing the periodic component to obtain the trend component T after the k+1th iteration. v (k+1) .

[0040] Furthermore, in step 3, a TCN-TimesNet photovoltaic power prediction model is established based on DBSCAN clustering into high power and low power clusters, including the following steps:

[0041] Step 3.1: Based on the photovoltaic power data set D processed in step 2, the DBSCAN algorithm is used to cluster high and low power. First, the E neighborhood and neighborhood density threshold MPs are set, which are defined as follows:

[0042] N E (p)={q∈D|D1(p,q)≤E} (8)

[0043] |N E (p)|≥MPs (9)

[0044] Where D is the data set, D1(p,q) is the distance between object p and object q, N E (p) contains all objects in the dataset D whose distance to object p is not greater than E, |N E (p)| is the number of E-neighboring objects of object p.

[0045] Step 3.2: Define the number of clusters C. When C=1, it is a high-power cluster; when C=2, it is a low-power cluster.

[0046] Step 3.3: If object p does not belong to any cluster, then object p is a noise point, that is:

[0047]

[0048] Where N is the set of noise points, C i is a cluster in the dataset D.

[0049] Step 3.4: Visit any unread object point and determine whether it is a core object based on E and MPs. If not, it is a boundary point or a noise point. If it is a core object, find all sample sets that can be densely reached by this object, which is a cluster. Visit other unread core objects and find sample sets that can be densely reached. At this time, another cluster is obtained. This process continues until all core objects have been visited.

[0050] Step 3.5: After the DBCSAN algorithm clusters the PV power data into two clusters, high power and low power, both data sets are divided into training set, validation set, and test set in a ratio of 6:2:2;

[0051] Step 3.6: Send the low-power training set data to the TCN model for initialization and update learning. After learning is completed, send the low-power verification set data to the TCN model for training to establish the TCN photovoltaic low-power prediction model. Use the test set to verify the performance of the TCN model and obtain the final prediction result.

[0052] Step 3.7: Send the high-power training set data to the TimesNet model for initialization and update learning. After learning is completed, send the high-power verification set data to the TimesNet model for training to establish the TimesNet photovoltaic low-power prediction model. Use the test set to verify the performance of the TimesNet model and obtain the final prediction result.

[0053] Furthermore, the specific steps of the MHBA algorithm for improving the Honey Badger Algorithm HBA in step 4 are as follows:

[0054] Step 4.1: Set the population size and maximum number of iterations of the MHBA algorithm, as well as the upper and lower limits of the search space;

[0055] Step 4.2: Initialize the honey badger population using Chebyshev chaotic mapping, which is defined as follows:

[0056] p i+1 =cos(icos -1 (p i )) (11)

[0057] Where p is a random number in the interval [-1, 1], and i is the order. The steps to initialize the honey badger population using Chebyshev mapping are as follows:

[0058] Initialize the honey badger population N, initialize the spatial position of the first individual in the D-dimensional space,

[0059] Z1={z1,z2,…,z i ,…,z D},z i ∈[-1,1],i∈[1,d] (12)

[0060] Formula (11) is used to update each dimension of individual X generation by generation until the remaining N-1 honey badger individuals are generated; combined with the above chaotic sequence, it is further mapped into the initial position of the honey badger individual in the search space:

[0061] x id =lb+(1+z id )*(ub-lb) / 2 (13)

[0062] Among them, ub and lb are the upper and lower bounds of the search space, x is the dth dimension of the i-th honey badger in the search space, and id is the d-dimensional coordinate value of the i-th honey badger in the search space;

[0063] Step 4.3: During the digging phase, the honey badger performs a heart-shaped motion, and the simulation equation is as follows:

[0064]

[0065] Among them, x new Indicates the updated position of the honey badger, x prey Indicates the updated position of the prey, which refers to the best position updated so far. F is the search direction, which is used to provide the scanning space. Its expression formula is shown in (15). β ≥ 1 (the default is 6) is the predation ability of the honey badger, r3, r4, r5, r6 are random numbers between 0 and 1, and d i is the distance between the prey and the i-th honey badger;

[0066]

[0067] Step 4.4: During the honey collection stage, the honey badger finds the beehive through the honey guide bird. This behavior can be simulated by formula (16):

[0068] x new =x prey +Fr7αd i (16)

[0069] Here, r7 is a random number between 0 and 1.

[0070] Step 4.5: Introduce the Gaussian mutation strategy and give the corresponding Gaussian mutation operator to the honey badger position iteration of equations (14) and (16), as shown in equation (17):

[0071]

[0072] Among them, x new (t+1) is the position of the next generation of iterative honey badgers, α is the attenuation factor, and N(0,1) is the standard Gaussian distribution.

[0073] Step 4.6: After the mining and honey collecting stages of the honey badger algorithm, a lens imaging reverse learning strategy is added. In the two-dimensional coordinates, a reverse position is generated based on the current coordinates to expand the search range. The reverse learning formula is as follows:

[0074]

[0075] Among them, x j is the position of the individual in the jth dimension, For x j The reverse solution of j and b j They are the maximum and minimum boundaries of the jth dimension in the search space, respectively. Assuming that the projection height of an object P on the x-axis in the two-dimensional coordinate is h, the projection height of the other side can be obtained by the lens imaging principle. * , where k = h / h * .

[0076] Furthermore, the hyperparameters of the TCN photovoltaic low power prediction model in step 3 are optimized using the MHBA algorithm to obtain the optimal parameters, and the low power data are predicted using the optimized TCN photovoltaic low power prediction model, including the following steps:

[0077] Step 5.1: Initialize the relevant parameters of the HBA algorithm, including the number of honey badger populations, individual positions, dimensions, maximum number of iterations, and upper and lower bounds of the search space;

[0078] Step 5.2: Calculate the predicted value YC after TCN model training i and the actual value of the sample YS i The root mean square error between them is used as the fitness value Fit of each individual in the HBA algorithm:

[0079]

[0080] Step 5.3: According to the mining mode strategy and the honey collection mode strategy, calculate the position of each individual, use formula (20) to calculate the fitness value of each individual, and sort them.

[0081] Step 5.4: In the honey collection stage, the Gaussian mutation strategy is used to re-update the individual position of the honey badger according to formula (17). After the excavation stage and the honey collection stage, the search range is expanded using formula (19) to obtain the reverse solution, and the individual fitness value is calculated using formula (20). It is compared with the individual fitness value obtained in step 5.3 to obtain the optimal position corresponding to the optimal fitness value.

[0082] Step 5.5: Determine whether the maximum number of iterations has been reached. If so, output the optimal solution and extract the hyperparameters of the TCN model from it. Otherwise, return to step 5.3; input the low-power test set data into the optimized TCN model for prediction to obtain the final photovoltaic low-power prediction result.

[0083] Furthermore, the hyperparameters of the TimesNet photovoltaic high power prediction model in step 3 are optimized using the MHBA algorithm to obtain the optimal parameters, and the high power data is predicted using the optimized TimesNet photovoltaic high power prediction model, including the following steps:

[0084] Step 6.1: Initialize the relevant parameters of the HBA algorithm, including the number of honey badger populations, individual positions, dimensions, maximum number of iterations, and upper and lower bounds of the search space;

[0085] Step 6.2: Use formula (20) to calculate the predicted value YC trained by the TimesNet model i and the actual value of the sample YS i The root mean square error between them is used as the fitness value Fit of each individual in the HBA algorithm.

[0086] Step 6.3: According to the mining mode strategy and the honey collection mode strategy, calculate the position of each individual, use formula (20) to calculate the fitness value of each individual, and sort them.

[0087] Step 6.4: In the honey collection stage, the Gaussian mutation strategy is used to re-update the individual position of the honey badger according to formula (17). After the excavation stage and the honey collection stage, the search range is expanded using formula (19) to obtain the reverse solution, and the individual fitness value is calculated using formula (20). It is compared with the individual fitness value obtained in step 6.3 to obtain the optimal position corresponding to the optimal fitness value.

[0088] Step 6.5: Determine whether the maximum number of iterations has been reached. If so, output the optimal solution and extract the hyperparameters of the TimesNet model from it. Otherwise, return to step 6.3; input the high-power test set data into the optimized TimesNet model for prediction to obtain the final photovoltaic high-power prediction result.

[0089] Beneficial effects:

[0090] (1) The present invention collects data of photovoltaic power stations in the historical training cycle, including ground temperature, humidity, wind speed, ground irradiance and its corresponding output power. After data preprocessing, the STL time series decomposition method is used to perform signal processing on the photovoltaic power sequence, and the trend and seasonal factors in the photovoltaic power sequence are separated, which can more accurately reflect the change law of photovoltaic data and provide help for subsequent analysis and prediction. In addition, the local smoothing algorithm adopted can maintain the stability and robustness of the data while reducing noise.

[0091] (2) The present invention uses the DBSCAN clustering algorithm to cluster the photovoltaic power data after STL signal processing, while reducing the dimension and scale of the data, so that the time complexity and space complexity of the clustering algorithm are reduced to a certain extent, thereby improving the clustering efficiency. Photovoltaic power data has strong volatility and randomness, and is easily affected by external environmental factors. Therefore, when the photovoltaic system is running, there will always be some abnormal points and noise. By using the DBSCAN clustering algorithm, these abnormal points and noise can be effectively discovered and eliminated, the accuracy of the data can be improved, and different prediction models can be established according to the characteristics of different clusters.

[0092] (3) The present invention establishes a prediction model for photovoltaic data of high and low power clusters based on a temporal convolutional network and a time series basic model TimesNet. In view of the problem that photovoltaic power data has changes on different time scales, various types of features are effectively identified by combining TCN and TimesNet, thereby improving the accuracy of the prediction model. Among them, using TCN to predict low-power photovoltaic power data has the advantages of effectively capturing long-term dependencies in the sequence, high parallelism and computational efficiency, processing sequences of different lengths, and adaptive learning sequence features. The time series basic model TimesNet decomposes complex time series changes into different periods through a modular structure, and transforms the original one-dimensional time series into a two-dimensional space to achieve unified modeling of intra-period and inter-period changes. After alignment at the bottom layer, as the number of deep model layers increases, the prediction results are continuously updated to capture the association between past and future time series changes. It is more efficient when processing photovoltaic data of high-power clusters, and can effectively improve the accuracy and reliability of the prediction model, bringing more value to the operation and maintenance management of photovoltaic systems.

[0093] (4) The present invention aims at the problems that the honey badger algorithm is prone to fall into local optimum and insufficient search ability during the optimization process. The Chebyshev chaotic mapping is used to initialize the honey badger population to improve the population balance. The Gaussian mutation strategy and lens imaging reverse learning strategy are introduced in the mining stage to improve the convergence accuracy and expand the search range to obtain MHBA. At the same time, MHBA is used to optimize the temporal convolutional network and TimesNet to obtain the optimal hyperparameter combination, which can effectively improve the accuracy and effectiveness of the photovoltaic power prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] Figure 1 It is a schematic diagram of the process of the present invention;

[0095] Figure 2 A schematic diagram of the process flow of the improved HBA algorithm (MHBA) provided by the present invention;

[0096] Figure 3 The present invention provides a schematic diagram of the photovoltaic prediction model process based on TCN-TimesNet. DETAILED DESCRIPTION

[0097] The present invention will be further described below in conjunction with the accompanying drawings.

[0098] Combination Figure 1 , Figure 2 , Figure 3 , the present invention discloses a power prediction method considering photovoltaic power clustering, collects historical data of photovoltaic power stations, decomposes photovoltaic power time series by using STL time series decomposition method, performs DBSCAN clustering on photovoltaic power data set D after signal processing, identifies two clusters of low power and high power, and establishes photovoltaic power prediction models based on time convolution network and TimesNet for low and high power respectively; in view of the influence of the selection of hyperparameters in the model on the model performance, the honey badger algorithm is improved, the initialization of the honey badger population is improved by using Chebyshev chaotic mapping, and the Gaussian mutation strategy and lens imaging reverse learning strategy are introduced to obtain the improved HBA algorithm (MHBA); MHBA is used to optimize the hyperparameters of TCN photovoltaic low power prediction model and TimesNet photovoltaic high power prediction model, and the optimized model is used to predict photovoltaic power to obtain the final prediction result. The specific steps are as follows:

[0099] Step 1: After collecting historical data of the photovoltaic power station, perform data preprocessing on it.

[0100] Step 1.1: Collect data of the PV power station during the historical training period, including ground temperature, humidity, wind speed, ground irradiance and its corresponding output power.

[0101] Step 1.2: Clean the collected historical data to determine whether there are outliers or missing data, remove outliers, and interpolate missing data.

[0102] Step 1.3: Perform feature normalization on the cleaned data, and the calculation formula used is:

[0103]

[0104] Among them, y norm is the normalized eigenvalue, y min is the minimum eigenvalue, y max is the maximum eigenvalue, and y is the original eigenvalue of the data.

[0105] Step 2: Use the STL time series decomposition method to decompose the photovoltaic power series after data preprocessing to obtain three parts: long-term trend, seasonality and random components. According to the STL decomposition results, the long-term trend and seasonal characteristics of photovoltaic power data are extracted and the residuals are calculated, and the random components are denoised. After normalization, it is further analyzed and modeled.

[0106] Step 2.1: Decompose the preprocessed photovoltaic power series through STL to obtain three parts: long-term trend, seasonality and random components. Among them, the long-term trend reflects the overall trend of photovoltaic power stations over time, the seasonality reflects the periodic changes of power data over time, and the random component is the residual term, which contains random noise that cannot be captured by the model. The decomposition formula is:

[0107] Y t =T t +S t +R t (2)

[0108] Among them, Y t is the power data at time t, T t , S t , R t They are the trend component, periodic component and residual component at time t respectively.

[0109] Step 2.2: Perform an inner loop process to update the trend component and period component of the photovoltaic power series. Assume that T v (k) , S v (k) For the trend component and cycle component after the kth iteration in the inner loop, perform the k+1th iteration of the inner loop.

[0110] Step 2.2.1: Detrending. Calculate the detrended series Y v -T v(k) .

[0111] Step 2.2.2: Perform Loess smoothing on the periodic subseries of the sequence in step 2.2.1, and obtain the smoothed results to form a temporary periodic sequence C v (k+1) .

[0112] Step 2.2.3: Temporary cycle sequence C v (k+1) After the low-throughput filtering process, that is, after three sliding average processes and one Loess process, the result sequence L is obtained. v (k+1) .

[0113] Step 2.2.4: Calculate the periodic component. The calculation expression of the periodic component of the k+1th iteration is:

[0114] S v (k+1) =C v (k+1) -L v (k+1) (7)

[0115] Step 2.2.5: Remove the periodic component. The expression for removing the periodic component is Y v -S v (k+1) .

[0116] Step 2.2.6: Calculate the trend component. Perform Loess smoothing on the photovoltaic power sequence after removing the periodic component to obtain the trend component T after the k+1th iteration. v (k+1) .

[0117] Step 2.3: Perform the outer loop process to calculate the robust weights required for the next inner loop. Assume that the trend component and cycle component obtained after one inner loop are T v , S v .Y v is the photovoltaic power data at time v after an inner cycle, and the residual component R v The calculation formula is:

[0118] R v =Y v -T v -S v (3)

[0119] Step 2.4: Introduce robust weight ρ for each time point v , its size can reflect the extreme situation of the residual component, and the calculation formula is as follows:

[0120] h=6*median(|R v |) (4)

[0121]

[0122] ρ v =B(|R v | / h) (6)

[0123] Among them, h is the remainder, median() is the median function, B(u) is the bisquare weight function, u is the key parameter for adjusting the width of the local weighted regression window, and ρ v is the robust weight corresponding to time point v.

[0124] Step 2.5: After the recursive process of the STL inner and outer loops is completed, the STL decomposition result is obtained, the long-term trend and seasonal characteristics of the photovoltaic power data are extracted, and the residuals are calculated. The random components are denoised, that is, the residuals are normalized after removal, so that they are at the same scale, which is convenient for subsequent clustering operations.

[0125] Step 3: Use the DBSCAN algorithm to cluster the normalized photovoltaic power data. The normalized long-term trend and seasonality are used as feature vectors to cluster the results into low-power and high-power clusters. A photovoltaic power prediction model based on a temporal convolutional network is established to train the low-power cluster, and a TimesNet photovoltaic power prediction model is established to train the high-power cluster.

[0126] Step 3.1: Based on the photovoltaic power data set D processed in step 2, the DBSCAN algorithm is used to cluster high and low power. First, the E neighborhood and neighborhood density threshold MPs are set, which are defined as follows:

[0127] N E (p)={q∈D|D1(p,q)≤E} (8)

[0128] |N E (p)|≥MPs (9)

[0129] Where D is the data set, D1(p,q) is the distance between object p and object q, N E (p) contains all objects in the dataset D whose distance to object p is not greater than E, |N E (p)| is the number of E-neighboring objects of object p.

[0130] Step 3.2: Define the number of clusters C. When C=1, it is a high-power cluster; when C=2, it is a low-power cluster.

[0131] Step 3.3: If object p does not belong to any cluster, then object p is a noise point, that is:

[0132]

[0133] Where N is the set of noise points, C i is a cluster in the dataset D.

[0134] Step 3.4: Visit any unread object point and determine whether it is a core object based on E and MPs. If not, it is a boundary point or a noise point. If it is a core object, find all sample sets that can be densely reached by this object, which is a cluster. Visit other unread core objects and find sample sets that can be densely reached. At this time, another cluster is obtained. This process continues until all core objects have been visited.

[0135] Step 3.5: After the DBCSAN algorithm clusters the PV power data into two clusters, high power and low power, both data sets are divided into training set, validation set, and test set in a ratio of 6:2:2.

[0136] Step 3.6: Send the low-power training set data to the TCN model for initialization and update learning. After learning is completed, send the low-power verification set data to the TCN model for training to establish the TCN photovoltaic low-power prediction model. Use the test set to verify the performance of the TCN model.

[0137] Step 3.7: Send the high-power training set data to the TimesNet model for initialization and update learning. After learning is completed, send the high-power verification set data to the TimesNet model for training to establish the TimesNet photovoltaic low-power prediction model. Use the test set to verify the performance of the TimesNet model.

[0138] Step 4: Improve the honey badger algorithm HBA and use Chebyshev chaotic mapping to initialize the population of the honey badger algorithm to improve the population balance; introduce Gaussian mutation strategy and lens imaging reverse learning strategy in the mining stage to improve convergence accuracy and expand the search range to obtain the MHBA algorithm.

[0139] Step 4.1: Set the population size and maximum number of iterations of the MHBA algorithm, as well as the upper and lower limits of the search space.

[0140] Step 4.2: Initialize the honey badger population using Chebyshev chaotic mapping, which is defined as follows:

[0141] p i+1 =cos(icos -1 (p i )) (11)

[0142] Where p is a random number in the interval [-1, 1], and i is the order. The steps to initialize the honey badger population using Chebyshev mapping are as follows:

[0143] Initialize the honey badger population N, initialize the spatial position of the first individual in the D-dimensional space,

[0144] Z1={z1,z2,…,z i ,…,z D},z i ∈[-1,1],i∈[1,d] (12)

[0145] Formula (11) is used to update each dimension of individual X generation by generation until the remaining N-1 honey badger individuals are generated; combined with the above chaotic sequence, it is further mapped into the initial position of the honey badger individual in the search space:

[0146] x id =lb+(1+z id )*(ub-lb) / 2 (13)

[0147] Among them, ub and lb are the upper and lower bounds of the search space, x is the dth dimension of the i-th honey badger in the search space, and id is the d-dimensional coordinate value of the i-th honey badger in the search space.

[0148] Step 4.3: During the digging phase, the honey badger performs a heart-shaped motion, and the simulation equation is as follows:

[0149]

[0150] Among them, x new Indicates the updated position of the honey badger, x prey Indicates the updated position of the prey, which refers to the best position updated so far. F is the search direction, which is used to provide the scanning space. Its expression formula is shown in (15). β ≥ 1 (the default is 6) is the predation ability of the honey badger, r3, r4, r5, r6 are random numbers between 0 and 1, and d i is the distance between the prey and the i-th honey badger.

[0151]

[0152] Step 4.4: During the honey collection stage, the honey badger finds the beehive through the honey guide bird. This behavior can be simulated by formula (16):

[0153] x new =x prey +Fr7αd i (16)

[0154] Here, r7 is a random number between 0 and 1.

[0155] Step 4.5: Introduce the Gaussian mutation strategy and give the corresponding Gaussian mutation operator to the honey badger position iteration of equations (14) and (16), as shown in equation (17):

[0156]

[0157] Among them, x new (t+1) is the position of the next generation of iterative honey badgers, α is the attenuation factor, and N(0,1) is the standard Gaussian distribution.

[0158] Step 4.6: After the mining and honey collecting stages of the honey badger algorithm, a lens imaging reverse learning strategy is added. In the two-dimensional coordinates, a reverse position is generated based on the current coordinates to expand the search range. The reverse learning formula is as follows:

[0159]

[0160] Among them, x j is the position of the individual in the jth dimension, For x j The reverse solution of j and b j They are the maximum and minimum boundaries of the jth dimension in the search space, respectively. Assuming that the projection height of an object P on the x-axis in the two-dimensional coordinate is h, the projection height of the other side can be obtained by the lens imaging principle. * , where k = h / h * .

[0161] Step 5: Use the MHBA algorithm to optimize the hyperparameters of the TCN photovoltaic power prediction model in step 3 to obtain the optimal parameters, and use the optimized TCN photovoltaic power prediction model to predict low-power data to obtain prediction results.

[0162] Step 5.1: Initialize the relevant parameters of the HBA algorithm, including the number of honey badger populations, individual positions, dimensions, maximum number of iterations, and upper and lower bounds of the search space;

[0163] Step 5.2: Calculate the predicted value YC after TCN model training i and the actual value of the sample YS i The root mean square error between them is used as the fitness value Fit of each individual in the HBA algorithm:

[0164]

[0165] Step 5.3: According to the mining mode strategy and the honey collection mode strategy, calculate the position of each individual, use formula (20) to calculate the fitness value of each individual, and sort them.

[0166] Step 5.4: In the honey collection stage, the Gaussian mutation strategy is used to re-update the individual position of the honey badger according to formula (17). After the excavation stage and the honey collection stage, the search range is expanded using formula (19) to obtain the reverse solution, and the individual fitness value is calculated using formula (20). It is compared with the individual fitness value obtained in step 5.3 to obtain the optimal position corresponding to the optimal fitness value.

[0167] Step 5.5: Determine whether the maximum number of iterations has been reached. If so, output the optimal solution and extract the hyperparameters of the TCN model from it. Otherwise, return to step 5.3; input the low-power test set data into the optimized TCN model for prediction to obtain the final photovoltaic low-power prediction result.

[0168] Step 6: Use the MHBA algorithm to optimize the hyperparameters of the TimesNet photovoltaic power prediction model in step 3 to obtain the optimal parameters, and use the optimized TimesNet photovoltaic power prediction model to predict high power data to obtain the prediction results.

[0169] Step 6.1: Initialize the relevant parameters of the HBA algorithm, including the number of honey badger populations, individual positions, dimensions, maximum number of iterations, and upper and lower bounds of the search space;

[0170] Step 6.2: Calculate the predicted value YC after TimesNet model training i and the actual value of the sample YS i The root mean square error between them (Formula 20) is used as the fitness value Fit of each individual in the HBA algorithm.

[0171] Step 6.3: According to the mining mode strategy and the honey collection mode strategy, calculate the position of each individual, use formula (20) to calculate the fitness value of each individual, and sort them.

[0172] Step 6.4: In the honey collection stage, the Gaussian mutation strategy is used to re-update the individual position of the honey badger according to formula (17). After the excavation stage and the honey collection stage, the search range is expanded using formula (19) to obtain the reverse solution, and the individual fitness value is calculated using formula (20). It is compared with the individual fitness value obtained in step 6.3 to obtain the optimal position corresponding to the optimal fitness value.

[0173] Step 6.5: Determine whether the maximum number of iterations has been reached. If so, output the optimal solution and extract the hyperparameters of the TimesNet model from it. Otherwise, return to step 6.3; input the high-power test set data into the optimized TimesNet model for prediction to obtain the final photovoltaic high-power prediction result.

[0174] Step 7: Use root mean square error RMSE, mean absolute percentage error MAPE and coefficient of determination R 2 Three evaluation indicators are used to judge the accuracy of the current model, using RMSE, MAPE, and R 2 The three evaluation index formulas are as follows:

[0175]

[0176]

[0177]

[0178] In the formula, RMSE is the root mean square error, MAPE is the mean absolute percentage error, R 2 is the coefficient of determination, pred i is the predicted value, real i is the actual value of the training sample, av i is the mean value, and n is the number of samples.

[0179] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A power prediction method considering photovoltaic power clustering, characterized in that: The following steps are involved: Step 1: After collecting historical data of the photovoltaic power station, perform data preprocessing on it; Step 2: Use the STL time series decomposition method to decompose the photovoltaic power series after data preprocessing to obtain three parts: long-term trend, seasonality and random components; according to the STL decomposition results, extract the long-term trend and seasonal characteristics of photovoltaic power data and calculate the residuals, and denoise the random components. After normalization, further analyze and model it; Step 3: Use the DBSCAN algorithm to cluster the normalized photovoltaic power data. The normalized long-term trend and seasonality are used as feature vectors to cluster the results into low-power and high-power clusters. A TCN photovoltaic power prediction model based on a temporal convolutional network is established to train the low-power cluster and a TimesNet photovoltaic power prediction model is established to train the high-power cluster. Step 4: Improve the honey badger algorithm HBA and use Chebyshev chaotic mapping to initialize the population of the honey badger algorithm; introduce Gaussian mutation strategy and lens imaging reverse learning strategy in the mining stage to obtain the MHBA algorithm; Step 5: Use the MHBA algorithm to optimize the hyperparameters of the TCN photovoltaic power prediction model and the TimesNet photovoltaic power prediction model in step 3 to obtain the optimal parameters, use the optimized TCN photovoltaic power prediction model to predict the low-power data, and use the optimized TimesNet photovoltaic power prediction model to predict the high-power data to obtain the final prediction results.

2. A power prediction method considering photovoltaic power clustering according to claim 1, characterized in that: The step 1 performs data preprocessing on the historical data of the photovoltaic power station, including the following steps: Step 1.1: Collect data of the photovoltaic power station during the historical training cycle, including ground temperature, humidity, wind speed, ground irradiance and its corresponding output power; Step 1.2: Clean the collected historical data to determine whether there are outliers or missing data, remove outliers, and interpolate missing data; Step 1.3: Perform feature normalization on the cleaned data.

3. A power prediction method considering photovoltaic power clustering according to claim 1, characterized in that: In step 2, the STL time series decomposition method is used to perform signal processing on the photovoltaic power sequence, including the following steps: Step 2.1: Decompose the preprocessed PV power sequence through STL to obtain three parts: long-term trend, seasonality and random component. The long-term trend reflects the overall trend of PV power stations over time, the seasonality reflects the periodic change of power data over time, and the random component is the residual term, which contains random noise that cannot be captured by the model. The decomposition formula is: Y t =T t +S t +R t (2) Among them, Y t is the power data at time t, T t , S t , R t They are the trend component, period component and residual component at time t respectively; Step 2.2: Perform the inner loop process to update the trend component and period component of the photovoltaic power series. Assume that T v (k) , S v (k) For the trend component and cycle component after the kth iteration in the inner loop, perform the k+1th inner loop iteration; Step 2.3: Perform the outer loop process to calculate the robust weights required for the next inner loop; assume that the trend component and cycle component obtained after one inner loop are T v , S v , Y v is the photovoltaic power data at time v after one inner cycle, and the residual component R v The calculation formula is: R v =Y v -T v -S v (3) Step 2.4: Introduce robust weight ρ for each time point v , whose size reflects the extreme situation of the residual component, and the calculation formula is as follows: h=6*median(|R v |) (4) r v =B(|R v | / h) (6) Among them, h is the remainder, median() is the median function, B(u) is the bisquare weight function, u is the key parameter for adjusting the width of the local weighted regression window, and ρ v is the robust weight corresponding to time point v; Step 2.5: After the recursive process of the STL inner and outer loops is completed, the STL decomposition result is obtained, the long-term trend and seasonal characteristics of the photovoltaic power data are extracted, and the residuals are calculated. The random components are denoised, that is, normalization is performed after the residuals are removed.

4. A power prediction method considering photovoltaic power clustering according to claim 3, characterized in that: The specific process of performing the k+1th inner loop iteration in step 2.2 is as follows: Step 2.2.1: Detrending, calculating the detrended sequence Y v -T v (k) ; Step 2.2.2: Perform Loess smoothing on the periodic subseries of the sequence in step 2.2.1, and obtain the smoothed results to form a temporary periodic sequence C v (k+1) ; Step 2.2.3: Temporary cycle sequence C v (k+1) After the low-throughput filtering process, that is, after three sliding average processes and one Loess process, the result sequence L is obtained. v (k+1) ; Step 2.2.4: Calculate the periodic component. The calculation expression of the periodic component of the k+1th iteration is: S v (k+1) =C v (k+1) -L v (k+1) (7) Step 2.2.5: Remove the periodic component. The expression after removing the periodic component is Y v -S v (k+1) ; Step 2.2.6: Calculate the trend component and perform Loess smoothing on the photovoltaic power series after removing the periodic component to obtain the trend component T after the k+1th iteration. v (k+1) .

5. A power prediction method considering photovoltaic power clustering according to claim 1, characterized in that: In step 3, clustering is performed into two clusters of high power and low power according to the DBSCAN algorithm, and a TCN photovoltaic power prediction model and a TimesNet photovoltaic power prediction model are established, including the following steps: Step 3.1: Based on the photovoltaic power data set D processed in step 2, the DBSCAN algorithm is used to cluster high and low power. First, the E neighborhood and neighborhood density threshold MPs are set, which are defined as follows: N E (p)={q∈D|D1(p,q)≤E} (8) |N E (p)|≥MPs (9) Where D is the data set, D1(p,q) is the distance between object p and object q, N E (p) contains all objects in the dataset D whose distance to object p is not greater than E, |N E (p)| is the number of objects in the E neighborhood of object p; Step 3.2: Define the number of clusters C. When C=1, it is a high-power cluster; when C=2, it is a low-power cluster; Step 3.3: If object p does not belong to any cluster, then object p is a noise point, that is: Where N is the set of noise points, C i is the cluster in the data set D; Step 3.4: Visit an object point that has not been read at random, and determine whether it is a core object based on E and MPs. If not, it is a boundary point or a noise point. If it is a core object, find all sample sets that can be densely reached by this object, which is a cluster. Visit other core objects that have not been read, and find sample sets that can be densely reached. At this time, another cluster is obtained, and the process continues until all core objects have been visited. Step 3.5: After the DBCSAN algorithm clusters the PV power data into two clusters, high power and low power, both data sets are divided into training set, validation set, and test set in a ratio of 6:2:2; Step 3.6: Send the low-power training set data to the TCN model for initialization and update learning. After the learning is completed, send the low-power verification set data to the TCN model for training, establish the TCN photovoltaic low-power prediction model, and use the test set to verify the performance of the TCN model; Step 3.7: Send the high-power training set data to the TimesNet model for initialization and update learning. After the learning is completed, send the high-power verification set data to the TimesNet model for training, establish the TimesNet photovoltaic low-power prediction model, and use the test set to verify the performance of the TimesNet model.

6. A power prediction method considering photovoltaic power clustering according to claim 1, characterized in that: The specific steps of the MHBA algorithm for improving the Honey Badger Algorithm HBA in step 4 are as follows: Step 4.1: Set the population size and maximum number of iterations of the MHBA algorithm, as well as the upper and lower limits of the search space; Step 4.2: Initialize the honey badger population using Chebyshev chaotic mapping, which is defined as follows: p i+1 =cos(i cos -1 (p i )) (11) Among them, p is a random number in the interval [-1, 1], and i is the order; the steps of initializing the honey badger population by Chebyshev mapping are as follows: Initialize the honey badger population N, initialize the spatial position of the first individual in the D-dimensional space, Z1={z1,z2,…,z i ,…,With D },With i ∈[-1,1],i∈[1,d] (12) Formula (11) is used to update each dimension of individual X generation by generation until the remaining N-1 honey badger individuals are generated; combined with the above chaotic sequence, it is further mapped into the initial position of the honey badger individual in the search space: x id =lb+(1+z id )*(ub-lb) / 2 (13) Among them, ub and lb are the upper and lower bounds of the search space, z id is the dth dimension of the i-th honey badger in the search space, x id is the d-dimensional coordinate value of the i-th honey badger in the search space; Step 4.3: During the digging phase, the honey badger performs a heart-shaped motion, and the simulation equation is as follows: Among them, x new Indicates the updated position of the honey badger, x prey represents the updated position of the prey, and the prey refers to the best position updated so far; F is the search direction, which is used to provide the scanning space. Its expression formula is shown in (15), β ≥ 1 is the predation ability of the honey badger, r3, r4, r5, r6 are random numbers between 0 and 1; d i is the distance between the prey and the i-th honey badger; Step 4.4: During the honey collection stage, the honey badger finds the beehive through the honey guide bird. This behavior is simulated by equation (16): x new =x prey +Fr7αd i (16) Among them, r7 is a random number between 0 and 1, and α is the attenuation factor; Step 4.5: Introduce the Gaussian mutation strategy and give the corresponding Gaussian mutation operator to the honey badger position iteration of equations (14) and (16), as shown in equation (17): Among them, x new (t+1) is the position of the next generation of iterative honey badgers, and N(0,1) is a standard Gaussian distribution; Step 4.6: After the mining and honey collecting stages of the honey badger algorithm, a lens imaging reverse learning strategy is added. In the two-dimensional coordinates, a reverse position is generated based on the current coordinates to expand the search range. The reverse learning formula is as follows: Among them, x j is the position of the individual in the jth dimension, For x j The reverse solution of j and b j They are the maximum and minimum boundaries of the jth dimension in the search space, respectively. Assuming that the projection height of an object P on the x-axis in the two-dimensional coordinate is h, the projection height of the other side can be obtained by the lens imaging principle. * , k = h / h * .

7. A power prediction method considering photovoltaic power clustering according to claim 6, characterized in that: The MHBA algorithm is used to optimize the hyperparameters of the TCN photovoltaic low power prediction model and the TimesNet photovoltaic high power prediction model in step 3 to obtain the optimal parameters, and the optimized TCN photovoltaic low power prediction model and the TimesNet photovoltaic high power prediction model are used to predict the low power data and high power data, including the following steps: Step 5.1: Initialize the relevant parameters of the HBA algorithm, including the number of honey badger populations, individual positions, dimensions, maximum number of iterations, and upper and lower bounds of the search space; Step 5.2: Calculate the predicted value YC after training the TCN model and TimesNet model i and the actual value of the sample YS i The root mean square error between them is used as the fitness value Fit of each individual in the HBA algorithm: Step 5.3: According to the mining mode strategy and the honey collection mode strategy, calculate the position of each individual, use formula (20) to calculate the fitness value of each individual, and sort them; Step 5.4: In the honey collection stage, the Gaussian mutation strategy is used to re-update the individual position of the honey badger according to formula (17). After the digging stage and the honey collection stage, the search range is expanded using formula (19) to obtain the reverse solution, and the individual fitness value is calculated using formula (20). It is compared with the individual fitness value obtained in step 5.3 to obtain the optimal position corresponding to the optimal fitness value; Step 5.5: Determine whether the maximum number of iterations has been reached. If so, output the optimal solution and extract the hyperparameters of the TCN model and the TimesNet model. Otherwise, return to step 5.

3. Input the low-power test set data and the high-power test set data into the optimized TCN model and the optimized TimesNet model for prediction, and obtain the final photovoltaic low-power and photovoltaic high-power prediction results.

Citation Information

Cited By

  • Photovoltaic power station power short-term prediction method based on improved ESOA-GA

    CN119647548A

  • A short-term power forecasting method for photovoltaic power plants based on improved ESOA-GA

    CN119647548B

  • Distributed optical fiber sensing strain measurement method without pre-training

    CN120385289A

  • Wind power cluster power multi-scale fusion prediction method, system, equipment and medium

    CN121307841A

  • Photovoltaic power prediction method and device based on scene element learning perception

    CN121727001A