Distribution area distributed photovoltaic power prediction method and system

Through the multi-predictive scenario static modeling and dynamic migration methods, combined with dynamic mining of historical similarities and transfer learning of Informer basic source domain models, the accuracy and cost problems of distributed photovoltaic power prediction in massive station areas are solved, and fast and high-precision prediction modeling is achieved.

CN120109786AActive Publication Date: 2025-06-06SHANDONG UNIV +1

Patent Information

Application Number
CN202510178231.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-06-06
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively predict distributed photovoltaic power in massive station areas, especially in the case of large number of station areas, small number of effective samples, and complex correlation between station areas, traditional methods cannot take into account the unique operating characteristics of station areas, resulting in reduced prediction accuracy and increased calculation and maintenance costs.

Method used

The static modeling and dynamic migration of multi-prediction scenarios are used to dynamically explore the individual output characteristics of each station area through historical similarity days to build a highly targeted prediction model. The specific steps include: obtaining historical measurement power data and meteorological data, preprocessing and fusion; using clustering algorithm to divide weather prediction scenarios, and training Informer's basic source domain model; during the prediction process, dynamically match the weather prediction scenario and basic source domain model, and update the model parameters through the transfer learning model fine-tuning idea to obtain the power prediction results of each station area.

Benefits of technology

It realizes rapid modeling of distributed photovoltaic power prediction in massive station areas, improves the pertinence and accuracy of the prediction results, reduces calculation and maintenance costs, and enhances the adaptability and generalization capabilities of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120109786A_ABST
    Figure CN120109786A_ABST
Patent Text Reader

Abstract

The invention provides a transformer area distributed photovoltaic power prediction method and system, and the method comprises the steps: carrying out the clustering according to meteorological feature vectors in meteorological data through employing a clustering algorithm, dividing a source domain shared data set into similar data sets of different weather prediction scenes, training an Informer basic source domain model through employing a key representative sample in each prediction scene, and carrying out the prediction of the power of a transformer area. In the prediction process, the similarity between the meteorological characteristics of the day to be predicted and the meteorological characteristics of the typical weather scene is calculated, and the weather prediction scene and the corresponding basic source domain model are dynamically matched for each transformer area; and screening a key historical similar day of a day to be predicted of each transformer area as a micro training set, and dynamically updating decoder parameters of the adaptive Informer basic source domain model based on a model fine tuning thought of transfer learning to obtain a power prediction result of each transformer area. According to the method, the pertinence of a prediction result is improved, so that rapid modeling of distributed photovoltaic power prediction of massive transformer areas is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of distributed photovoltaic power prediction, and in particular relates to a distributed photovoltaic power prediction method and system for an area. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] As a large number of distributed photovoltaic power generation systems penetrate into the power grid, the distribution network flow has changed from the traditional one-way flow to a two-way flow, causing a large number of low-voltage distribution transformers to reverse transmission, threatening the stability of the power grid. In order to deal with these uncertainties, power prediction of distributed photovoltaic power in specific areas will help trace the distribution of photovoltaic power in the distribution network, accurately describe the future state of power generation units in the distribution network, and then formulate more effective and detailed scheduling plans to ensure the safety and reliability of power grid operation.

[0004] At present, the distributed photovoltaic power prediction modeling methods can be mainly divided into physical methods, statistical methods, machine learning methods, and hybrid methods. The above methods are usually applicable to the power prediction of large-scale distributed photovoltaic power stations and distributed photovoltaic clusters. However, considering the reasons such as component aging, equipment loss, and poor maintenance, the unit power generation capacity of distributed photovoltaic power generation systems will also decrease. Even the power characteristics of adjacent photovoltaic power stations in the same area may be different. If the above method is used to build a unified prediction model for all the substations in the region, it is impossible to take into account the unique operating characteristics between substations, reducing the accuracy of the prediction; if the massive substations are modeled separately, on the one hand, it will undoubtedly increase the additional calculation and maintenance costs. On the other hand, due to the outdated equipment technology and unclear management methods, the massive distributed photovoltaic power generation data collection, transmission, and storage face huge pressure, resulting in poor data quality in a single substation and great difficulty in modeling.

[0005] At present, the new generation of prediction technology for distributed photovoltaic multi-point and multi-state access mode is not yet mature, especially for the modeling of distributed photovoltaic power generation units in massive areas. Therefore, how to quickly and cheaply build a targeted prediction model for distributed photovoltaic in massive areas is a key technical problem that needs to be solved urgently. Transfer learning applies the experience of the pre-trained model to another related task, allowing the model to use existing knowledge to accelerate the learning process. It has shown good application effects in the knowledge transfer in the field of new energy power prediction and is a feasible method to achieve fast and high-precision prediction of distributed photovoltaic in massive areas. However, considering that distributed photovoltaic in the area faces multiple problems such as a large number of areas, a small number of effective samples, and complex correlations between stations, there are still certain difficulties in realizing the efficient application of transfer learning methods in distributed photovoltaic in massive areas. Summary of the invention

[0006] In order to solve the above problems, the present invention proposes a method and system for predicting distributed photovoltaic power in substations. The present invention is based on static modeling and dynamic migration of multiple prediction scenarios, and dynamically mines the individual output characteristics of each substation through historical similar days to improve the pertinence of the prediction results, thereby realizing rapid modeling of distributed photovoltaic power predictions in massive substations.

[0007] According to some embodiments, the present invention adopts the following technical solutions:

[0008] A distributed photovoltaic power prediction method in an area includes the following steps:

[0009] Obtain the historical measured power data of all substations in the area to be predicted and the meteorological data of the corresponding location of each substation, pre-process and fuse the data, and build a source domain shared standard data set;

[0010] A clustering algorithm is used to cluster meteorological feature vectors in meteorological data, and the source domain shared data set is divided into similar data sets of different weather forecast scenarios. The key representative samples in each forecast scenario are used to train the Informer basic source domain model to preliminarily learn the mapping relationship between meteorology and power.

[0011] During the prediction process, the similarity between the meteorological characteristics of the day to be predicted and the meteorological characteristics of the typical weather scene is calculated, and the weather prediction scene and its corresponding basic source domain model are dynamically matched for each station area;

[0012] The key historical similar days of the predicted day in each substation are selected as micro-training sets. Based on the model fine-tuning idea of ​​transfer learning, the decoder parameters of the adapted Informer basic source domain model are dynamically updated to obtain the power prediction results of each substation.

[0013] As an optional implementation, the process of preprocessing the data includes missing value processing, outlier processing and normalization processing, wherein the mean value interpolation method is used to fill the missing values; the 3σ 2 Methods: Outliers were determined and new data were calculated to replace the outliers using the missing value interpolation method; the maximum and minimum standard method was used to standardize the data.

[0014] As an optional implementation, the meteorological feature vector includes maximum irradiance, average irradiance, maximum temperature, average temperature, maximum humidity and average humidity.

[0015] As an optional implementation method, in the process of clustering the meteorological feature vectors in the meteorological data using a clustering algorithm, the nearest neighbor propagation clustering algorithm is used to divide the weather forecast scenarios to obtain a data set under similar weather conditions, and the photovoltaic power prediction model is trained based on the key representative samples in each scenario, and the common output characteristics of each substation under the same weather forecast scenario are extracted to preliminarily learn the mapping relationship between meteorology and power.

[0016] As a further step, in the process of dividing the weather forecast scenes using the proximity propagation clustering algorithm, the Euclidean distance is used to construct the initial similarity matrix, the attraction matrix and the attribution matrix are continuously updated, the damping coefficient is introduced for adjustment during the iteration process, and the silhouette coefficient is introduced after clustering as the evaluation function of the clustering results until the final optimal clustering result is obtained.

[0017] As a further example, the silhouette coefficient is:

[0018]

[0019] Among them, h(i) is the silhouette coefficient of area i; m(i) is the sample x of area i i The average distance to other samples in the same cluster is called cohesion; n(i) is x i The average distance from all samples in other clusters is called separation degree; the average silhouette coefficient is the average of the silhouette coefficients of all samples, and its value range is [-1, 1]. The larger its value is, the smaller the distance within the cluster is, the larger the distance between clusters is, and the better the clustering effect is.

[0020] As an optional implementation, the Informer base source domain model includes an embedding layer, an encoder layer and a decoder layer. The embedding layer is used to encode time series data and timestamp information into a feature vector of fixed dimension to map the characteristics of each element in the sequence and the spatiotemporal dependencies between elements; the encoder layer includes multiple stacked Informer blocks, each Informer block contains a ProbSparse self-attention mechanism and a distillation operation module, and utilizes residual connections and layer normalization layers to accelerate convergence and enhance the stability of the model; the structure of the decoder layer is the same as that of the encoder layer, but the parameters are different.

[0021] As an optional implementation, the ProbSparse self-attention mechanism controls the sparsity of the generated attention weight matrix by introducing probabilistic sparsity, specifically including: calculating the dot product of the query vector and the key vector, and using the softmax function to obtain a preliminary attention weight matrix; introducing probabilistic sparsity, by calculating the KL divergence between the query vector and the uniformly distributed query vector, measuring the degree of discreteness of the query vector relative to the uniform distribution; combining the sparsity score, multiplying the discreteness by the sparsity score to obtain an adjusted attention weight matrix, and then multiplying it by the value vector to obtain a weighted value vector as the final self-attention representation.

[0022] As an optional implementation, the process of dynamically matching the weather forecast scenario and its corresponding basic source domain model for each substation includes: calculating the similarity between the meteorological characteristics of the predicted day for each substation and the meteorological characteristics of the typical weather scenario, and dynamically matching the weather forecast scenario and its corresponding basic source domain model according to the similarity.

[0023] As a further step, the entropy weight method and Euclidean distance are combined to calculate the similarity between the meteorological feature vectors of each day in the historical data and the day to be predicted, and the selection of similar days to the day to be predicted is completed.

[0024] As an optional implementation method, the process of dynamically updating the decoder parameters of the adapted Informer basic source domain model based on the model fine-tuning idea of ​​transfer learning includes: calculating the similarity of each day in the historical data of each substation with the meteorological feature vector of the forecast day, screening out several historical similar days with the highest similarity as model input, and retraining the key layer parameters of the basic source domain model through the data of historical similar days, so that the model can better capture the actual changes in power generation capacity of each substation.

[0025] A distributed photovoltaic power prediction system in an area, comprising:

[0026] The data processing module is configured to obtain the historical measured power data of all substations in the area to be predicted and the meteorological data of the corresponding location of each substation, pre-process the data, fuse them, and construct a source domain shared standard data set;

[0027] The clustering and model training module is configured to use a clustering algorithm to cluster the meteorological feature vectors in the meteorological data, divide the source domain shared data set into similar data sets of different weather forecast scenarios, use the key representative samples in each forecast scenario to train the Informer basic source domain model, and preliminarily learn the mapping relationship between meteorology and power;

[0028] The model dynamic matching module is configured to calculate the similarity between the meteorological characteristics of the day to be predicted and the meteorological characteristics of the typical weather scene during the prediction process, and dynamically match the weather prediction scene and its corresponding basic source domain model for each station area;

[0029] The dynamic migration module is configured to select the key historical similar days of the predicted day for each substation as the micro-training set, and dynamically update the decoder parameters of the adapted Informer basic source domain model based on the model fine-tuning idea of ​​transfer learning to obtain the power prediction results for each substation.

[0030] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps in the above method are completed.

[0031] An electronic device comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the above method are completed.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] The present invention integrates the historical measured power data of all substations in the region and extracts the meteorological data of the corresponding location of each substation through measured reanalysis data to construct a high-quality source domain shared standard data set, which solves the problem of limited data samples of a single substation as a source domain and effectively improves the amount of training data and generalization ability of the model.

[0034] The present invention divides the historical data set into training samples of different weather forecast scenarios according to the daily meteorological characteristics, and further constructs a basic prediction model to mine the common output characteristics of each substation under the same weather forecast scenario. This not only helps the model capture the specific effect of meteorological variables on power output under different prediction scenarios and improve the model's prediction performance, but also reduces the repeated learning of the basic "weather-power" mapping features by each substation.

[0035] The present invention dynamically matches the weather forecast scenario and its corresponding basic forecast model based on the meteorological characteristics of the day to be predicted, and dynamically updates the key layer parameters of the basic forecast model by adopting the model fine-tuning idea of ​​the transfer learning method, which not only enhances the adaptability of massive substations to the basic model, but also significantly shortens the training time and cost of the model.

[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0038] Figure 1 The present invention is an architectural diagram of a method according to an embodiment.

[0039] Figure 2 A flowchart of weather scene division based on AP clustering according to an embodiment.

[0040] Figure 3 A schematic diagram of the Informer algorithm structure of an embodiment.

[0041] Figure 4 A Pearson correlation coefficient heat map is shown as an example. DETAILED DESCRIPTION

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

[0043] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in this embodiment have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0044] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0045] In the absence of conflict, the embodiments in this application and the features in the embodiments may be combined with each other.

[0046] Embodiment 1

[0047] A distributed photovoltaic power prediction method in an area, comprising:

[0048] Collect the historical measured power data of all substations in the area to be predicted and extract the meteorological data of the corresponding location of each substation through measured reanalysis data. After cleaning and normalizing the data, fuse them to build a source domain shared standard data set.

[0049] The AP clustering algorithm is used to cluster the daily meteorological feature vectors, dividing the source domain shared dataset into similar datasets of different weather forecast scenarios. The key representative samples in each forecast scenario are used to train the Informer basic source domain model, and the mapping relationship between meteorology and power is preliminarily learned.

[0050] During the prediction process, the similarity between the meteorological characteristics of the day to be predicted and the meteorological characteristics of the typical weather scene is calculated, and the weather prediction scene and its corresponding basic source domain model are dynamically matched for each station area;

[0051] The key historical similar days of the predicted day in each substation are selected as micro-training sets, and the decoder parameters of the adapted Informer basic source domain model are dynamically updated based on the model fine-tuning idea of ​​transfer learning, so as to quickly and accurately obtain the power prediction results of each substation.

[0052] As an embodiment, the present invention discloses a distributed photovoltaic power prediction method for a substation, which is based on static modeling and dynamic migration of multiple prediction scenarios, and dynamically mines the individual output characteristics of each substation through historical similar days to improve the pertinence of the prediction results, thereby realizing rapid modeling of distributed photovoltaic power prediction for a large number of substations. The specific implementation process is as follows: Figure 1 As shown:

[0053] Step S1: Collect the historical measured power data of all substations in the area to be predicted and extract the meteorological data of the corresponding location of each substation through the measured reanalysis data. After cleaning and normalizing the data, fuse them to construct a source domain shared standard data set.

[0054] Due to data collection device failure or human factors, there may be a deviation between the actual power of photovoltaic power generation and the collected data, which will interfere with the learning and training of the model. Common interference data include missing values ​​and outliers in time series. If these interference data are directly used in the prediction model, it may cause the model iteration to not converge or the prediction accuracy to decrease. Therefore, after the data collection work is completed, the data needs to be cleaned.

[0055] Specifically, data processing includes three aspects: missing value processing, outlier processing and normalization processing.

[0056] Missing value processing: Since the photovoltaic power series is a time series and is affected by weather changes, it has a certain fluctuation pattern related to time. The photovoltaic power value at each moment must be closely related to the moments before and after it, and the power value deviation at adjacent moments is small. Therefore, this embodiment uses the average value interpolation method to fill in the missing values ​​to maintain the integrity and accuracy of the photovoltaic power data. The formula is as follows:

[0057]

[0058] Where x represents the data point, t represents the time when the power data is missing, and t-1 and t+1 represent the power data of the previous step and the next step respectively when the data is missing.

[0059] Outlier processing: This embodiment uses the 3σ commonly used in statistics. 2 Method. In this method, an outlier is defined as a value that deviates from the mean by more than three standard deviations. In addition, this embodiment also determines that the case where the photovoltaic power is negative is an outlier. For the detected outliers, this embodiment adopts the missing value interpolation method to replace these outliers by calculating new data. This can maintain the integrity of the data and ensure the accuracy of the subsequent analysis and modeling process.

[0060] Normalization processing: This embodiment uses the maximum and minimum value standard method to normalize the sample data, and linearly maps the sample data to [0, 1].

[0061]

[0062] In the formula: y represents the sample data after standardization; x represents the sample data to be standardized; x max and x min They represent the maximum and minimum values ​​in this type of sample data respectively.

[0063] Step S2: The AP clustering algorithm is used to cluster the daily meteorological feature vectors, and the source domain shared dataset is divided into similar datasets of different weather forecast scenarios. The key representative samples in each forecast scenario are used to train the Informer basic source domain model to preliminarily learn the mapping relationship between meteorology and power.

[0064] In scenarios with multiple meteorological variables, different meteorological factors have different degrees of influence on photovoltaic power generation, and these meteorological factors are often interrelated, further exacerbating the complexity. Therefore, the correlation between meteorological forecast data and measured power data should be analyzed first to obtain the key factors affecting photovoltaic power generation and provide a basis for the input division of weather forecast scenarios. Based on the analysis results, the maximum irradiance, average irradiance, maximum temperature, average temperature, maximum humidity, and average humidity in the daily meteorological characteristics are finally selected to construct a six-dimensional input feature vector.

[0065] Specifically, the Pearson correlation coefficient method is used for the correlation analysis of multiple meteorological variables that affect power generation. The correlation between each meteorological factor and photovoltaic power in the historical data set is analyzed. In this embodiment, irradiance, temperature, cloud cover, surface pressure, 10-meter wind speed and humidity meteorological factors are considered, and the Pearson correlation coefficient method is used to determine the correlation between each meteorological factor and photovoltaic power. The calculation formula is as follows:

[0066]

[0067] Where: X i and Y i They are the standardized meteorological factors and the output power sample point data of photovoltaic in the substation area, and are their corresponding average values; n is the number of samples; R(x,y) is the correlation coefficient, ranging from [-1,1]. The larger its absolute value, the stronger the correlation. By determining the key meteorological variables that affect photovoltaic power generation, the clustering characteristic indicators for weather forecast scene division are constructed.

[0068] according to Figure 2 The correlation coefficient results show that the correlation between photovoltaic power generation and irradiance, temperature and humidity is the greatest. Finally, the maximum temperature, average temperature, maximum humidity, average humidity, maximum irradiance and average irradiance of each day are selected as the basis for weather scene division and the input of the power prediction model.

[0069] Photovoltaic power generation is highly correlated with meteorological conditions. Under different weather conditions, the sensitivity of photovoltaic output to different meteorological factors varies. By dividing different weather forecast scenarios, the specific relationship between meteorological variables and power output can be captured in each scenario to improve the forecast accuracy. At the same time, since the basic mapping rules of "weather-power" for all distributed photovoltaics have a certain consistency and universality, building a unified basic forecasting model in each scenario can reduce the repetitive learning of such mapping relationships in a large number of substations.

[0070] Specifically, this embodiment uses the affinity propagation (AP) clustering algorithm to divide the weather forecast scenarios, obtains data sets under similar weather conditions, and trains photovoltaic power prediction models based on key representative samples in each scenario, extracts the common output characteristics of each substation under the same weather forecast scenario, and preliminarily learns the mapping relationship between meteorology and power.

[0071] AP clustering is an unsupervised clustering algorithm that performs cluster division based on information transmission. It can adapt to various types of data distribution and is not affected by the selection of the initial center. When faced with complex and nonlinearly distributed meteorological characteristic data in reality, it can effectively identify weather with "similar fluctuation patterns", and the clustering results can be more stable. The core idea of ​​this algorithm is to use all historical meteorological characteristic vectors as potential clustering centers. Each data point sends two types of information to other points: attraction information and belonging information. The clustering center is automatically determined by iterating the two types of information. Compared with other clustering methods, AP clustering can automatically select the most representative real sample data point in the entire cluster as the cluster center, that is, the typical weather scene of this class, thereby providing an intuitive basis for analyzing power generation behavior under different meteorological conditions. The specific clustering process can be seen. Figure 3 .

[0072] In the clustering process, this embodiment uses Euclidean distance to construct the initial similarity matrix, continuously updates the attraction matrix and the attribution matrix, and introduces a damping coefficient for adjustment in order to ensure the convergence speed and stability during the iteration process. After clustering, the silhouette coefficient (SC) is introduced as the evaluation function of the clustering result until the final optimal clustering result is obtained. The calculation formula of the silhouette coefficient is as follows:

[0073]

[0074] Among them, h(i) is the silhouette coefficient of area i; m(i) is the sample x of area i i The average distance to other samples in the same cluster is called cohesion; n(i) is x i The average distance from all samples in other clusters is called separation degree; the average silhouette coefficient is the average of the silhouette coefficients of all samples, and its value range is [-1, 1]. The larger its value is, the smaller the distance within the cluster is, the larger the distance between clusters is, and the better the clustering effect is.

[0075] In order to reduce the time and computational costs of model training, it is necessary to screen the historical data of massive distributed photovoltaics under the same scenario based on the clustering results, and select key representative samples similar to typical weather scenarios as the training set of the basic source domain model. Note that during screening, it is necessary to ensure that the screened samples can represent the overall distribution characteristics of the weather scene to enhance the generalization ability of the model.

[0076] After constructing a shared standard data set in the source domain, it is necessary to use the rich data set in the source domain to build a basic prediction model to provide sufficient basis for transfer learning. Traditional prediction models, such as autoregressive models, support vector machines, and neural networks, can capture the temporal characteristics of photovoltaic power to a certain extent, but due to their limited ability to handle nonlinear relationships and long-term dependencies, their accuracy and robustness are often inferior to deep learning methods. Deep learning methods can capture the complex nonlinear characteristics of the photovoltaic power generation process through deep structures, and have shown excellent performance in processing time series data.

[0077] Specifically, this embodiment constructs an Informer basic prediction model based on historical samples of different weather scenarios, mines the common mapping features from meteorology to power in different weather scenarios between stations, and provides a basis for realizing dynamic migration of the model.

[0078] The Informer neural network model is an efficient long sequence prediction model for processing time series data. The traditional Transformer model has become the mainstream choice in many sequence modeling tasks due to its powerful parallel processing capabilities, but the Transformer model has two main problems when processing long time series: high computational complexity and large memory usage. Informer effectively reduces the impact of these problems by introducing a probabilistic sparse self-attention mechanism and combining some special designs for sequence prediction. The overall structure of Informer is based on Transformer, but has been optimized for long time series tasks. It includes three main modules: embedding layer, encoder layer, and decoder layer. The overall structure is as follows Figure 4 shown.

[0079] The role of the embedding layer is to encode time series data and timestamp information into a fixed-dimensional feature vector, which can map the characteristics of each element in the sequence and reveal the spatiotemporal dependencies between them. The encoder layer is composed of multiple informer blocks stacked together, each of which contains two main components: the ProbSparse self-attention mechanism and the distillation operation. Residual connections and layer normalization are used to accelerate convergence and enhance the stability of the model. The decoder usually adopts a similar structural design to the encoder to ensure that the two are functionally coordinated. It is worth noting that despite the similar structure, the parameters of the decoder are not shared with the encoder. This maintains the flexibility and independence of the model, so that it can better adapt to different prediction tasks.

[0080] The core formula of the traditional self-attention mechanism can be summarized as:

[0081]

[0082] Where: Q is the query vector, which represents the features of the current time step; K is the key vector, which represents the features of all time steps; V is the value vector, which represents the value to be weighted; d k is the dimension of K. Compared with the traditional self-attention mechanism, ProbSparse controls the sparsity of the generated attention weight matrix by introducing probabilistic sparsity, thereby reducing the amount of calculation and model parameters. First, the dot product of the query vector and the key vector is calculated, and the softmax function is used to obtain the preliminary attention weight matrix. Next, probabilistic sparsity is introduced to measure the degree of discreteness of the query vector relative to the uniform distribution by calculating the KL divergence between the query vector and the uniformly distributed query vector. Finally, combined with the sparsity score, the discreteness is multiplied by the sparsity score to obtain the adjusted attention weight matrix, which is then multiplied by the value vector to obtain the weighted value vector as the final self-attention representation. By introducing sparsity, the complexity of attention calculation is reduced from O(L 2 ) is reduced to O(LlnL), which significantly reduces the computational tasks.

[0083] Step S3: During the prediction process, the similarity between the meteorological characteristics of the day to be predicted and the meteorological characteristics of the typical weather scene is calculated, and the weather prediction scene and its corresponding basic source domain model are dynamically matched for each substation.

[0084] Step S4: Select the key historical similar days of the predicted day for each substation as the micro-training set, and dynamically update the decoder parameters of the adapted Informer basic source domain model based on the model fine-tuning idea of ​​transfer learning, so as to quickly and accurately obtain the power prediction results of each substation.

[0085] The process of step S3 and step S4 can be summarized as follows:

[0086] (1) Based on the AP clustering algorithm, the most representative real sample point in each cluster is selected as the cluster center, which is used as the typical representative sample of the weather scene;

[0087] (2) During the prediction process, the similarity between the meteorological characteristics of the predicted day and the meteorological characteristics of the typical weather scene is calculated for each station area, and the weather prediction scene and its corresponding basic source domain model are dynamically matched according to the similarity;

[0088] (3) Based on information entropy and Euclidean distance, the key historical similar days of the predicted day in each station area are selected to form a micro-training set;

[0089] (4) Dynamically migrate the basic source domain model, fine-tune the decoder parameters of the basic source domain model, and retrain the basic source domain model using a micro-training set to quickly obtain a prediction model for each station area.

[0090] (5) Obtain the final power prediction results of distributed photovoltaics in each area of ​​the target domain.

[0091] The above process is described in detail below:

[0092] In the AP clustering algorithm, the cluster center is determined by the transmission mechanism of "attraction information" and "attribution information". Each data point transmits "attraction information" about whether it should become the cluster center, and "attribution information" about whether it is the cluster center with other data points. Compared with the traditional K-means clustering based on Euclidean distance, AP clustering can use the similarity information between more complex meteorological features for clustering. In meteorological data, characteristics such as light intensity, temperature, and humidity may have complex nonlinear effects on photovoltaic power generation, and AP clustering can be effectively divided according to the similarity of these characteristics, so that each cluster center can better represent a specific weather scenario, thereby improving the accuracy of the photovoltaic power prediction model.

[0093] Furthermore, in distributed photovoltaic power prediction, it is difficult to ensure that the sample data of distributed photovoltaic in a single substation covers all possible weather scenarios. Transfer learning can solve the problem of data scarcity in a single substation by migrating the trained model or knowledge from the data-rich source domain to the substation with less data. In addition, using transfer learning, only the existing model needs to be fine-tuned or adjusted, avoiding the repeated learning of the basic mapping features of "weather-power" in each substation, significantly reducing training time and computing costs. Transfer learning can quickly adapt to and generate efficient prediction models in the target substation with the help of existing pre-trained models or features.

[0094] Specifically, this embodiment dynamically matches the basic source domain model based on the meteorological characteristics of the day to be predicted, and fine-tunes the key layer parameters of the basic source domain model based on the idea of ​​fine-tuning the transfer learning model to help the model quickly adapt to the characteristic distribution of the target substation.

[0095] In the aforementioned training process, the basic prediction model training for each weather forecast scenario has been realized based on the AP clustering results and Informer. In order to enhance the adaptability of massive substations to the basic source domain model and realize the effective migration of the source domain model to the target domain, this embodiment measures the similarity by calculating the Euclidean distance between the meteorological characteristics of the day to be predicted and the meteorological vector of the typical weather scene, selects the weather forecast scene with the smallest Euclidean distance as the source domain of the substation, dynamically matches the corresponding basic source domain model for each substation, and optimizes the performance of the source domain model in the target domain.

[0096] The core idea of ​​transfer learning is to transfer existing knowledge to new tasks, thereby reducing the sample requirements and training time of new tasks, while improving model performance. In transfer learning, the source domain and the target domain are the two core concepts of transfer learning. The data space of the source domain and the target domain are expressed by the formulas:

[0097] H s =(X s ,T s ) (6)

[0098] H t =(X t ,T t ) (7)

[0099] Among them, H s and H t They represent the source domain data space and target domain data space based on weather scene division, respectively. s and X t Respectively represent the characteristics of the data space under different weather scenarios, T s and T t Represent the corresponding labels respectively.

[0100] The task of the source domain and the target domain is to use the appropriate mapping function f s and f t Find the optimal source domain parameter w of the corresponding mapping function respectively s and the optimal target domain parameter w t , so that the learning task P s and P t Probably close to label T s and T t , while transfer learning is to find the optimal source domain parameter w s Based on fine-tuning, the target domain parameter w t As quickly as possible, P s and P t It is expressed as follows:

[0101] P s =f s (X s ,w s ) (8)

[0102] P t =f t (X t ,w t ) (9)

[0103] After rich data training, the basic source domain model can distinguish how to deal with the complex relationship between photovoltaic power generation and meteorological characteristics under specific meteorological conditions. These characteristics and relationships have certain universality. However, the equipment status, aging, terrain characteristics and other factors of each photovoltaic area will be different. The unique output characteristics of each area need to be considered during prediction. Through the fine-tuning strategy in transfer learning, these common features learned in the source domain model can be effectively retained, while taking into account the unique data space characteristics of the target domain. Therefore, this embodiment adopts the model fine-tuning strategy of transfer learning, fine-tunes the parameters of the Informer model through the key historical similar day samples of the predicted day, and retrains the model. Since the encoder is mainly responsible for extracting features in the time series, the meteorological features it learns in the source domain have strong universality. Regardless of the specific area where the photovoltaic area is located, the impact pattern of meteorological conditions on power generation is relatively consistent. Therefore, the encoder part can be well migrated to the target domain without retraining. The decoder is mainly responsible for mapping the encoded features to the target output value, and its function is more affected by the target domain data. Therefore, in the fine-tuning process, by fine-tuning the parameters of the decoder, the output mode of the target domain can be better adapted, while reducing the training complexity.

[0104] This embodiment adopts the model fine-tuning strategy in transfer learning to dynamically adjust the Informer decoder parameters to adapt to the output characteristics of different substations. Specifically, for each substation, a few or some key historical similar day samples are selected based on the meteorological characteristics of the day to be predicted, and a micro-training set is constructed to retrain the basic source domain model to enhance the model's ability to learn from historical similar days the response of the photovoltaic system to the meteorological fluctuations of the day to be predicted. In this process, the encoder parameters are frozen, and the decoder parameters are dynamically updated to finally obtain the photovoltaic power prediction model for each substation.

[0105] Among them, the attention mechanism parameters dynamically updated in the decoder, including the weight matrix and bias of the query, key and value, are fine-tuned according to the characteristics of the station's unique meteorological and equipment operating conditions. The update of the query matrix enables the input of each time step to be more effectively compared with the data of other time steps, capturing the unique time dependency of the station; the update of the key and value matrix ensures that the input of each time step can participate in the model's attention calculation, optimize the weight distribution, and improve the station feature modeling capabilities.

[0106] In addition, considering the differences in photovoltaic power generation capacity among different stations, the weights and biases of the linear output layer will also be adjusted according to the output characteristics of each station to more accurately map the decoder output to the photovoltaic power prediction value.

[0107] Although the basic source domain model can effectively learn the unique features of each type of weather scenario, its limitation is that it fails to fully consider the individual differences in the power generation capacity of each substation. The basic prediction model that simply relies on each weather forecast scenario cannot accurately reflect the actual power generation status of each substation. In order to solve this problem, the basic source domain model needs to be fine-tuned and retrained in a targeted manner.

[0108] Specifically, this embodiment calculates the similarity of each day in the historical data of each substation with the meteorological feature vector of the forecast day, selects several historical similar days with the highest similarity as model input, and retrains the key layer parameters of the basic source domain model through the data of historical similar days, so that the model can better capture the actual changes in power generation capacity of each substation.

[0109] The higher the similarity of the photovoltaic power generation patterns on two days, the higher the prediction accuracy of the model. Given that the impact of each feature on photovoltaic power generation varies in different weather scenarios, weighting each feature helps to more accurately screen similar days.

[0110] This embodiment combines the entropy weight method and the Euclidean distance to calculate the similarity between each day in the historical data and the meteorological feature vector of the day to be predicted, and completes the selection of similar days to the day to be predicted. At present, the determination of weights is mainly divided into subjective weighting and objective weighting. Subjective weighting is easily affected by experience and expert knowledge. The entropy weight method, as an objective weighting method, has stronger objectivity and can achieve higher accuracy. Its specific calculation formula is shown in (11)-(13). First, according to the degree of variation of each indicator, its proportion is calculated, and then the information entropy of each indicator is calculated, and then the objective weight of each meteorological indicator is calculated by the information entropy.

[0111]

[0112] Where: m represents the number of historical meteorological samples, n represents the number of meteorological features of each sample, when p ij =0, lnp ij =0,ω j is the weight coefficient of each meteorological feature. The similarity calculation formula obtained by combining entropy weight method and Euclidean distance is as follows:

[0113]

[0114] Where: i represents one of the weather scenes, j represents the jth meteorological feature, x i represents the meteorological feature vector of the representative sample of the i-th weather scene, x 0 Represents the meteorological feature vector of the day to be predicted. ED represents the similarity between the meteorological feature vectors of two days. The smaller the value, the more similar the two days are.

[0115] Furthermore, in order to evaluate the accuracy of model prediction, this embodiment uses two indicators, root mean square error (RMSE) and determination coefficient (R-squared, R2), to evaluate the model and verify the photovoltaic power prediction performance. The specific calculation formulas are shown in formulas (15)-(16):

[0116]

[0117] Where: P RMSE , P R2 Represents the RMSE and R between the predicted power and the actual power respectively. 2 value, m represents the number of samples, i represents the sample sequence number, y i , Represent the true value and predicted value of the power of the i-th sample, d i Represents the mean of the true values.

[0118] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the present invention without creative labor shall be included in the protection scope of the present invention.

Claims

1. A distributed photovoltaic power prediction method in a metropolitan area, characterized in that: The following steps are involved: Obtain the historical measured power data of all substations in the area to be predicted and the meteorological data of the corresponding location of each substation, pre-process and fuse the data, and build a source domain shared standard data set; A clustering algorithm is used to cluster meteorological feature vectors in meteorological data, and the source domain shared data set is divided into similar data sets of different weather forecast scenarios. The key representative samples in each forecast scenario are used to train the Informer basic source domain model to preliminarily learn the mapping relationship between meteorology and power. During the prediction process, the similarity between the meteorological characteristics of the day to be predicted and the meteorological characteristics of the typical weather scene is calculated, and the weather prediction scene and its corresponding basic source domain model are dynamically matched for each station area; The key historical similar days of the predicted day in each substation are selected as micro-training sets. Based on the model fine-tuning idea of ​​transfer learning, the decoder parameters of the adapted Informer basic source domain model are dynamically updated to obtain the power prediction results of each substation.

2. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 1, characterized in that: The process of data preprocessing includes missing value processing, outlier processing and normalization processing. The mean value interpolation method is used to fill the missing values; the 3σ 2 Methods: Outliers were determined and new data were calculated to replace the outliers using the missing value interpolation method; the maximum and minimum standard method was used to standardize the data.

3. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 1, characterized in that: The meteorological characteristic vector includes maximum irradiance, average irradiance, maximum temperature, average temperature, maximum humidity and average humidity.

4. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 1, characterized in that: In the process of clustering the meteorological feature vectors in the meteorological data using the clustering algorithm, the nearest neighbor propagation clustering algorithm is used to divide the weather forecast scenarios to obtain data sets under similar weather conditions. The photovoltaic power prediction models are trained based on the key representative samples in each scenario, and the common output characteristics of each substation under the same weather forecast scenario are extracted to preliminarily learn the mapping relationship between meteorology and power.

5. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 4, characterized in that: In the process of dividing the weather forecast scenes using the proximity propagation clustering algorithm, the Euclidean distance is used to construct the initial similarity matrix, the attraction matrix and the attribution matrix are continuously updated, the damping coefficient is introduced for adjustment during the iteration process, and the silhouette coefficient is introduced after clustering as the evaluation function of the clustering results until the final optimal clustering result is obtained.

6. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 5, characterized in that: The silhouette coefficient is: Among them, h(i) is the silhouette coefficient of area i; m(i) is the sample x of area i i The average distance to other samples in the same cluster is called cohesion; n(i) is x i The average distance from all samples in other clusters is called separation degree; the average silhouette coefficient is the average of the silhouette coefficients of all samples, and its value range is [-1, 1]. The larger its value is, the smaller the distance within the cluster is, the larger the distance between clusters is, and the better the clustering effect is.

7. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 1, characterized in that: The Informer basic source domain model includes an embedding layer, an encoder layer and a decoder layer. The embedding layer is used to encode time series data and timestamp information into a feature vector of fixed dimension to map the characteristics of each element in the sequence and the spatiotemporal dependencies between elements; the encoder layer includes multiple stacked Informer blocks, each Informer block contains a ProbSparse self-attention mechanism and a distillation operation module, and uses residual connections and layer normalization layers to accelerate convergence and enhance the stability of the model; the structure of the decoder layer is the same as that of the encoder layer, but the parameters are different.

8. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 1, characterized in that: The ProbSparse self-attention mechanism controls the sparsity of the generated attention weight matrix by introducing probabilistic sparsity, specifically including: calculating the dot product of the query vector and the key vector, and using the softmax function to obtain the preliminary attention weight matrix; introducing probabilistic sparsity, by calculating the KL divergence between the query vector and the uniformly distributed query vector, measuring the discreteness of the query vector relative to the uniform distribution; combining the sparsity score, multiplying the discreteness with the sparsity score to obtain the adjusted attention weight matrix, and then multiplying it with the value vector to obtain the weighted value vector as the final self-attention representation.

9. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 1, characterized in that: The process of dynamically matching the weather forecast scenario and its corresponding basic source domain model for each substation includes: calculating the similarity between the meteorological characteristics of the day to be predicted for each substation and the meteorological characteristics of the typical weather scenario, and dynamically matching the weather forecast scenario and its corresponding basic source domain model according to the similarity.

10. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 9, characterized in that: By combining the entropy weight method and Euclidean distance, the similarity between the meteorological feature vectors of each day in the historical data and the day to be predicted is calculated, and the selection of similar days to the day to be predicted is completed.

11. A distributed photovoltaic power prediction method for a metropolitan area as claimed in claim 1, characterized in that: The process of dynamically updating the decoder parameters of the adapted Informer basic source domain model based on the idea of ​​model fine-tuning based on transfer learning includes: calculating the similarity of each day in the historical data of each substation with the meteorological feature vector of the forecast day, selecting several historical similar days with the highest similarity as model input, and retraining the key layer parameters of the basic source domain model through the data of historical similar days, so that the model can better capture the actual changes in power generation capacity of each substation.

12. A distributed photovoltaic power prediction system in an area, characterized by comprising: The data processing module is configured to obtain the historical measured power data of all substations in the area to be predicted and the meteorological data of the corresponding location of each substation, pre-process the data, fuse them, and construct a source domain shared standard data set; The clustering and model training module is configured to use a clustering algorithm to cluster the meteorological feature vectors in the meteorological data, divide the source domain shared data set into similar data sets of different weather forecast scenarios, use the key representative samples in each forecast scenario to train the Informer basic source domain model, and preliminarily learn the mapping relationship between meteorology and power; The model dynamic matching module is configured to calculate the similarity between the meteorological characteristics of the day to be predicted and the meteorological characteristics of the typical weather scene during the prediction process, and dynamically match the weather prediction scene and its corresponding basic source domain model for each station area; The dynamic migration module is configured to select the key historical similar days of the predicted day for each substation as the micro-training set, and dynamically update the decoder parameters of the adapted Informer basic source domain model based on the model fine-tuning idea of ​​transfer learning to obtain the power prediction results for each substation.

13. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of the method according to any one of claims 1 to 11.

14. An electronic device, characterized in that: The method comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps in the method according to any one of claims 1 to 11 are completed.

Citation Information

Patent Citations

  • Short-term prediction method for space-time load of big data power distribution network station area

    CN113011630A

  • Distributed wind power prediction method, system and device and storage medium

    CN114819377A

  • Photovoltaic power generation power short-term prediction method and device based on transfer learning

    CN115347571A

  • Photovoltaic output power prediction method based on fast online migration neural network

    CN115689062A

  • Regional distributed photovoltaic short-term power prediction method

    CN116454870A

Cited By

  • Improved SAC weighted load multi-model power prediction method and system based on similar day extraction

    CN120725232A

  • Transformer area distributed photovoltaic power ultra-short-term prediction method and system

    CN120806264A

  • Day-ahead photovoltaic prediction method and device based on weather sensitivity time-phased clustering

    CN121529549A

  • Multi-level source load prediction method and system based on spatial-temporal distribution and typical scene

    CN121813342A