A transformer area distributed photovoltaic power prediction method and system
Through static modeling and dynamic transfer learning of multiple prediction scenarios, combined with the Informer basic source domain model, and dynamic updating of decoder parameters, the accuracy and efficiency issues of power prediction in massive distributed photovoltaic power generation systems in different substations are solved, and low-cost, high-precision distributed photovoltaic power prediction in different substations is achieved.
Patent Information
- Application Number
- CN202510178231.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-02-18
AI Technical Summary
Existing technologies make it difficult to achieve low-cost, high-precision power forecasting in distributed photovoltaic power generation systems in massive substations, especially due to the insufficient forecast accuracy caused by differences in operating characteristics between substations and the pressure of data collection and transmission.
By adopting static modeling and dynamic transfer learning methods for multiple prediction scenarios, the individual output characteristics of each substation are dynamically mined through historical similar days to build a high-quality source domain shared standard dataset. The Informer basic source domain model is used for transfer learning, and the decoder parameters are dynamically updated to achieve fast and accurate power prediction.
The model's training data volume and generalization capabilities have been increased, computing and maintenance costs have been reduced, training time has been significantly shortened, and the accuracy and efficiency of distributed photovoltaic power prediction in massive areas have been improved.
Smart Images

Figure CN120109786B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of distributed photovoltaic power prediction, and in particular relates to a method and system for predicting distributed photovoltaic power in a substation 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 are integrated into the power grid, the distribution network flow has shifted from the traditional unidirectional flow to a bidirectional flow, triggering a large number of low-voltage distribution transformers to reverse power transmission, threatening grid stability. To address these uncertainties, power forecasting for distributed photovoltaic power generation at the substation level helps track the distribution of photovoltaic power in the distribution network, accurately depict the future state of power generation units in the distribution network, and thus formulate more effective and precise scheduling plans to ensure the safety and reliability of grid operation.
[0004] Currently, 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 generally applicable to the power prediction of large-scale distributed photovoltaic power stations and distributed photovoltaic clusters. However, considering the aging of components, equipment loss, poor maintenance and other reasons, the unit power generation capacity of distributed photovoltaic power generation systems will also decline. Even the power characteristics of adjacent photovoltaic substations in the same area may show differences. If the above methods are used to build a unified prediction model for all substations in the region, it will not be possible to take into account the unique operating characteristics between substations, reducing the accuracy of the prediction. If a large number of substations are modeled separately, on the one hand, additional computing and maintenance costs will undoubtedly be increased. On the other hand, due to outdated equipment technology and unclear management methods, the collection, transmission, and storage of distributed photovoltaic power generation data in a large number of substations are under tremendous 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 modes is still immature, especially for the related research on 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 areas faces multiple problems such as the large number of areas, the small number of effective samples, and the complex correlation between areas, 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 method for predicting distributed photovoltaic power in a substation area includes the following steps:
[0009] Obtain historical measured power data for all substations in the area to be predicted and meteorological data for the corresponding location of each substation, preprocess and fuse the data, and construct a source domain shared standard dataset;
[0010] A clustering algorithm is used to cluster meteorological feature vectors in meteorological data, dividing the source domain shared dataset into similar datasets for different weather forecast scenarios. Key representative samples from each forecast scenario are used to train the Informer-based source domain model, preliminarily learning the mapping relationship between meteorological and power.
[0011] During the forecasting process, the similarity between the meteorological characteristics of the day to be forecasted and the meteorological characteristics of the typical weather scene is calculated, and the weather forecast scene and its corresponding basic source domain model are dynamically matched for each substation 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 identified and new data were calculated to replace them using the missing value interpolation method; the data were standardized using the maximum and minimum standard method.
[0014] As an optional implementation manner, the meteorological characteristic 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. 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 station i; m(i) is the sample x of station 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; 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, the smaller the intra-cluster distance, the larger the inter-cluster distance, and the better the clustering effect.
[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, as well as 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 model stability; 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 and the sparsity score to obtain an adjusted attention weight matrix, and then multiplying it with the value vector to obtain a weighted value vector as the final self-attention representation.
[0022] As an optional implementation method, 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 for a substation 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 meteorological feature vectors in the meteorological data, partitioning the source domain shared dataset into similar datasets for different weather forecast scenarios. It then uses key representative samples from each forecast scenario to train the Informer-based source domain model and initially learn the mapping relationship between meteorological and power.
[0028] The model dynamic matching module is configured to calculate the similarity between the meteorological characteristics of the predicted day 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 substation;
[0029] The dynamic migration module is configured to select key historical similar days for each substation to be predicted as a micro-training set. 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 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 includes 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 dataset, which solves the problem of limited data samples of a single substation as a source domain and effectively improves the training data volume 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 explore 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 in different forecast scenarios and improve the model prediction performance, but also reduces the repeated learning of the basic "weather-power" mapping features in 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 using the model fine-tuning idea of the transfer learning method. This 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, 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 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 Pearson correlation coefficient heat map for one embodiment. DETAILED DESCRIPTION
[0042] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0043] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in this embodiment have the same meaning as 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 the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0045] In the absence of conflict, the embodiments and features in the embodiments of this application can be combined with each other.
[0046] Example 1
[0047] A method for predicting distributed photovoltaic power in a substation area, comprising:
[0048] Collect historical measured power data from all substations in the forecast area and extract meteorological data for each substation's corresponding location through measured reanalysis data. After cleaning and normalizing the data, fuse them to construct a source domain shared standard dataset.
[0049] The AP clustering algorithm is used to cluster daily meteorological feature vectors, dividing the source domain shared dataset into similar datasets for different weather forecast scenarios. Key representative samples from each forecast scenario are used to train the Informer-based source domain model and initially learn the mapping relationship between meteorological and power.
[0050] During the forecasting process, the similarity between the meteorological characteristics of the day to be forecasted and the meteorological characteristics of the typical weather scene is calculated, and the weather forecast scene and its corresponding basic source domain model are dynamically matched for each substation area;
[0051] The key historical similar days of the predicted day for 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 massive 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 forecast area 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 failures or human error, actual photovoltaic power generation may deviate from the collected data, disrupting model training. Common interfering data include missing values and outliers in time series. Directly incorporating this interfering data into the prediction model can lead to non-convergence of model iterations or reduced prediction accuracy. Therefore, data cleaning is necessary after data collection is completed.
[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 certain time-related fluctuation patterns. The photovoltaic power value at each moment must be closely related to the previous and next moments, and the power value deviations at adjacent moments are small. Therefore, this embodiment uses the mean value interpolation method to fill 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, t-1 and t+1 represent the power data of the previous step and the next step respectively.
[0059] Outlier processing, this embodiment uses the 3σ commonly used in statistics 2 This method defines outliers as values that deviate from the mean by more than three standard deviations. Furthermore, this embodiment also identifies negative photovoltaic power values as outliers. For detected outliers, this embodiment uses missing value interpolation to replace them by calculating new data. This maintains data integrity and ensures the accuracy of subsequent analysis and modeling.
[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 Represent the maximum and minimum values in this type of sample data respectively.
[0063] Step S2: Use the AP clustering algorithm to cluster daily meteorological feature vectors, dividing the source domain shared dataset into similar datasets for 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.
[0064] In scenarios with multiple meteorological variables, different meteorological factors affect photovoltaic power generation to varying degrees, and these factors are often interrelated, further exacerbating complexity. Therefore, the correlation between weather forecast data and measured power data should be analyzed to identify the key factors affecting photovoltaic power generation and provide a basis for weather forecast scenario input classification. Based on this analysis, six meteorological factors were ultimately selected from the daily meteorological characteristics: maximum irradiance, average irradiance, maximum temperature, average temperature, maximum humidity, and average humidity to construct a six-dimensional input feature vector.
[0065] Specifically, the Pearson correlation coefficient method is used to analyze the correlation between various meteorological factors and photovoltaic power in the historical data set. This embodiment considers meteorological factors such as irradiance, temperature, cloud cover, surface pressure, 10-meter wind speed, and humidity. 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] wherein X i and Y i are the normalized meteorological factors and the output power sample point data of the photovoltaic power station in the area, respectively, and are the average values thereof, respectively; n is the sample number; R(x, y) is the correlation coefficient, and the range of the value is [-1, 1], and the greater the absolute value is, the stronger the correlation is. By determining the key meteorological variables affecting the photovoltaic power generation, the clustering characteristic index for the weather prediction scene division is constructed.
[0068] According to Figure 2 the correlation coefficient result, the correlation between the photovoltaic power generation and the irradiance, temperature and humidity is the greatest, and finally the highest temperature, average temperature, highest humidity, average humidity, maximum irradiance and average irradiance of each day are selected as the basis for the weather scene division and the input of the power prediction model.
[0069] The photovoltaic power generation is highly correlated with the meteorological conditions, and under different weather conditions, the sensitivity of the photovoltaic output to different meteorological factors is different. By dividing different weather prediction scenes, the specific action relationship of the meteorological variables to the power output can be captured under the respective scenes, and the prediction accuracy is improved. Meanwhile, since all the basic mapping relationships of the distributed photovoltaic "meteorological conditions-power" have certain consistency and universality, the unified basic prediction model can be constructed under each scene, and the repetitive learning of the mapping relationship by the massive areas can be reduced.
[0070] Specifically, the affinity propagation (AP) clustering algorithm is adopted in the embodiment to divide the weather prediction scenes, the data sets under the similar weather are obtained, and the photovoltaic power prediction model is trained based on the key representative samples under each scene, the common output features of each area under the same weather prediction scene are extracted, and the mapping relationship between the meteorological conditions and the power is preliminarily learned.
[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 choice 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, and automatically determines the clustering center 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 is shown in Figure 3 .
[0072] During 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 to adjust the convergence speed and stability during the iteration process. After clustering, the silhouette coefficient (SC) is introduced as an evaluation function for the clustering results until the final optimal clustering result is obtained. The silhouette coefficient calculation formula is as follows:
[0073]
[0074] Among them, h(i) is the silhouette coefficient of station i; m(i) is the sample x of station 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; 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, the smaller the intra-cluster distance, the larger the inter-cluster distance, and the better the clustering effect.
[0075] In order to reduce the time and computational costs of model training, it is necessary to screen massive historical data of 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 the screening process, it is necessary to ensure that the screened samples can represent the overall distribution characteristics of the weather scenario to enhance the generalization ability of the model.
[0076] After constructing a shared standard dataset in the source domain, it is necessary to leverage this rich dataset to build a basic prediction model, providing a sufficient basis for transfer learning. Traditional prediction models, such as autoregressive models, support vector machines, and neural networks, while able to capture the temporal characteristics of photovoltaic power to a certain extent, are often inferior to deep learning methods in terms of accuracy and robustness due to their limited ability to handle nonlinear relationships and long-term dependencies. Deep learning methods, which can capture the complex nonlinear characteristics of the photovoltaic power generation process through deep structures, demonstrate excellent performance when processing time series data.
[0077] Specifically, this embodiment constructs an Informer basic prediction model based on historical samples of different weather scenarios, explores the common mapping features of meteorological data 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 that not only maps the characteristics of each element in the sequence but also reveals the spatiotemporal dependencies between them. The encoder layer is composed of multiple stacked Informer blocks, each of which contains two main components: the ProbSparse self-attention mechanism and a distillation operation. Residual connections and layer normalization are used to accelerate convergence and enhance model stability. The decoder typically adopts a similar structural design to the encoder to ensure functional coordination between the two. It is worth noting that despite the similar structure, the decoder parameters are not shared with the encoder. This maintains the flexibility and independence of the model, allowing it to 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: Filter 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 for 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 each area to be predicted 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 substation in the target area.
[0091] The following is a detailed description of the above process:
[0092] In the AP clustering algorithm, cluster centers are determined through a transmission mechanism of "attraction information" and "attribution information." Each data point transmits "attraction information" about whether it should become a cluster center, as well as "attribution information" about whether it and other data points are cluster centers. Compared to traditional K-means clustering based on Euclidean distance, AP clustering can utilize 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. AP clustering can effectively divide data based on the similarity of these characteristics, allowing each cluster center to better represent a specific weather scenario, thereby improving the accuracy of the photovoltaic power prediction model.
[0093] Furthermore, in distributed photovoltaic power forecasting, it is difficult to ensure that the sample data for distributed photovoltaics in a single substation covers all possible weather scenarios. Transfer learning can address the data scarcity problem in a single substation by migrating pre-trained models or knowledge from a data-rich source domain to a substation with less data. Furthermore, using transfer learning only requires fine-tuning or adjusting the existing model, avoiding the repeated learning of the basic "weather-to-power" mapping features for each substation, significantly reducing training time and computational costs. Transfer learning can leverage existing pre-trained models or features to quickly adapt and generate efficient prediction models for the target substation.
[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 achieved 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 predicted day 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 for the new tasks while improving model performance. In transfer learning, the source domain and target domain are the two core concepts. The data spaces of the source domain and target domain are respectively expressed as:
[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 divided based on weather scenarios, respectively. s and X t Represent the characteristics of 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 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 Fine-tuning based on the target domain parameter w t Reach the optimum 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 extensive data training, the basic source-domain model can discern how to handle the complex relationship between photovoltaic power generation and meteorological characteristics under specific meteorological conditions. These characteristics and relationships have a certain degree of universality. However, factors such as the equipment status, aging, and topographical characteristics of each photovoltaic power station vary from one area to another, necessitating the unique output characteristics of each area during forecasting. Through the fine-tuning strategy employed in transfer learning, these universal features learned in the source-domain model can be effectively retained while also taking into account the unique spatial characteristics of the target domain data. Therefore, this embodiment employs a model fine-tuning strategy based on transfer learning. The parameters of the informer model are fine-tuned using samples of key historically similar days to the predicted day, and the model is retrained. Because the encoder primarily extracts features from time series, the meteorological features it learns in the source domain are highly universal. Regardless of the specific region where the photovoltaic power station is located, the pattern of meteorological conditions affecting power generation is relatively consistent. Therefore, the encoder portion can be well transferred to the target domain without the need for retraining. The decoder, on the other hand, is primarily responsible for mapping the encoded features to the target output value, and its function is more influenced by the target domain data. Therefore, during the fine-tuning process, by fine-tuning the decoder parameters, it can better adapt to the output pattern of the target domain while reducing training complexity.
[0104] This embodiment uses a model fine-tuning strategy from transfer learning to dynamically adjust the Informer decoder parameters to adapt to the output characteristics of different substations. Specifically, for each substation, a small number or portion of key historically similar day samples are selected based on the meteorological characteristics of the predicted day. A micro-training set is constructed to retrain the basic source domain model. This enhances the model's ability to learn from historically similar days the PV system's response to the meteorological fluctuations of the predicted day. During this process, the encoder parameters are frozen, while the decoder parameters are dynamically updated, ultimately resulting in a PV power prediction model for each substation.
[0105] The dynamically updated attention mechanism parameters in the decoder, including the query, key, and value weight matrices and biases, are fine-tuned based on the specific weather and equipment operating conditions of the substation. The query matrix update enables the input of each time step to be more effectively compared with the data of other time steps, capturing the substation's unique temporal dependencies. The key and value matrix updates ensure that the input of each time step participates in the model's attention calculations, optimizing weight distribution and improving the substation's feature modeling capabilities.
[0106] In addition, considering the differences in photovoltaic power generation capacity among different areas, the weights and biases of the linear output layer are also adjusted according to the output characteristics of each area to more accurately map the decoder output to the photovoltaic power prediction value.
[0107] While the basic source domain model can effectively learn the unique characteristics of each weather scenario, its limitation lies in its inability to fully account for the individual differences in power generation capacity at each substation. Relying solely on the basic forecast model for each weather forecast scenario cannot accurately reflect the actual power generation status of each substation. To address this issue, the basic source domain model needs to be fine-tuned and retrained.
[0108] Specifically, this embodiment calculates the similarity between each day in the historical data of each substation and 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 power generation capacity changes of each substation.
[0109] The more similar the photovoltaic power generation patterns between two days are, the higher the model's prediction accuracy. Given that different weather characteristics have different impacts on photovoltaic power generation, weighting each feature helps to more accurately select similar days.
[0110] This embodiment combines the entropy weight method and Euclidean distance to calculate the similarity between the meteorological feature vectors of each day in the historical data and the day to be predicted, and completes the selection of similar days to the day to be predicted. Currently, the determination of weights is mainly divided into subjective weighting and objective weighting. Subjective weighting is easily affected by experience and expert knowledge. As an objective weighting method, the entropy weight method has stronger objectivity and can achieve higher accuracy. Its specific calculation formulas are shown in (11)-(13). First, according to the degree of variation of each indicator, its proportion is calculated, then the information entropy of each indicator is calculated, and then the objective weight of each meteorological indicator is calculated based on 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 the 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, and x0 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 the 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 equations (15)-(16):
[0116]
[0117] Where: P RMSE 、P R2 Represents the RMSE and R between the predicted power and the true 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] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, 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 magnetic 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 flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, 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 flowcharts and / or block diagrams. 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 that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.
[0121] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable devices to generate computer-implemented processes, so that the instructions executed on the computer or other programmable devices provide operational steps for implementing the functions specified in the flowchart Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0122] The above only the preferred embodiments of the present application, and is not intended to limit the present application, for those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principles of the present application without the need for creative labor, should be included in the scope of protection of the present application.
Claims
1. A method for predicting distributed photovoltaic power in a substation, characterized by: The following steps are involved: Obtain historical measured power data for all substations in the area to be predicted and meteorological data for the corresponding location of each substation, preprocess and fuse the data, and construct a source domain shared standard dataset; A clustering algorithm is used to cluster meteorological feature vectors in meteorological data, dividing the source domain shared dataset into similar datasets for different weather forecast scenarios. Key representative samples from each forecast scenario are used to train the Informer-based source domain model, preliminarily learning the mapping relationship between meteorological and power. During the forecasting process, the similarity between the meteorological characteristics of the day to be forecasted and the meteorological characteristics of the typical weather scene is calculated, and the weather forecast scene and its corresponding basic source domain model are dynamically matched for each substation area; We select key historical similar days for each substation to be predicted as micro-training sets, and dynamically update the decoder parameters of the adapted Informer-based source domain model based on the idea of transfer learning model fine-tuning to obtain the power prediction results for each substation. In the process of clustering meteorological feature vectors in meteorological data using a clustering algorithm, the proximity propagation clustering algorithm is used to divide weather forecast scenarios, obtaining a data set under similar weather conditions. 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 initially learn the mapping relationship between weather and power. In the process of using the proximity propagation clustering algorithm to divide the weather forecast scene, the Euclidean distance is used to construct the initial similarity matrix, and the attraction matrix and the attribution matrix are continuously updated. The damping coefficient is introduced in the iterative process for adjustment. After clustering, the silhouette coefficient is introduced as the evaluation function of the clustering result until the final optimal clustering result is obtained. The silhouette coefficient is: ; in, Taiwan area Silhouette coefficient; For Taiwan sample The average distance to other samples in the same cluster is called cohesion; for The average distance from all samples in other clusters is called separation; 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, the smaller the intra-cluster distance, and the larger the inter-cluster distance, the better the clustering effect; 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 with the data of historical similar days, so that the model can better capture the actual changes in power generation capacity of each substation.
2. A method for predicting distributed photovoltaic power in a metropolitan area according to claim 1, characterized in that: The process of data preprocessing includes missing value processing, outlier processing and normalization processing, among which the mean value interpolation method is used to fill the missing values; Methods: Outliers were identified and new data were calculated to replace them using the missing value interpolation method; the data were standardized using the maximum and minimum standard method.
3. The method for predicting distributed photovoltaic power in a substation area according to claim 1, wherein: The meteorological characteristic vector includes maximum irradiance, average irradiance, maximum temperature, average temperature, maximum humidity and average humidity.
4. The method for predicting distributed photovoltaic power in a substation area according to claim 1, wherein: 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 fixed-dimensional feature vector 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 of which contains a ProbSparse self-attention mechanism and a distillation operation module, and uses residual connections and layer normalization layers to accelerate convergence and enhance model stability. The structure of the decoder layer is the same as that of the encoder layer, but the parameters are different.
5. A method for predicting distributed photovoltaic power in a substation area as claimed in claim 4, 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 a preliminary attention weight matrix; introducing probabilistic sparsity, by calculating the KL divergence between the query vector and the uniformly distributed query vector, to measure the degree of discreteness of the query vector relative to the uniform distribution; combining the sparsity score, multiplying the discreteness and the sparsity score to obtain an adjusted attention weight matrix, and then multiplying it with the value vector to obtain a weighted value vector as the final self-attention representation.
6. The method for predicting distributed photovoltaic power in a substation area according to claim 1, wherein: 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.
7. A method for predicting distributed photovoltaic power in a metropolitan area according to claim 6, 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.
8. A distributed photovoltaic power prediction system for a substation, applying the method of claim 1, characterized in that: include: 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 meteorological feature vectors in the meteorological data, partitioning the source domain shared dataset into similar datasets for different weather forecast scenarios. It then uses key representative samples from each forecast scenario to train the Informer-based source domain model and initially learn the mapping relationship between meteorological and power. The model dynamic matching module is configured to calculate the similarity between the meteorological characteristics of the predicted day 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 substation; The dynamic migration module is configured to select key historical similar days for each substation to be predicted as a micro-training set. 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 for each substation.
9. 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 7.
10. 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 the steps of the method according to any one of claims 1 to 7 are completed when the computer instructions are executed by the processor.
Citation Information
Patent Citations
Short-term prediction method for space-time load of big data power distribution network station area
CN113011630A
Regional distributed photovoltaic short-term power prediction method
CN116454870A