A distributed photovoltaic power prediction method, device, equipment, medium and product

Through the comprehensive utilization of multi-source weather forecast data and historical power timing data, combined with fuzzy clustering algorithm, Bayesian method and Transformer model, the accuracy of distributed photovoltaic power prediction is solved, and the accuracy of prediction and the operating quality of the distribution network are improved.

CN119340995BActive Publication Date: 2025-03-28CHANGCHUN POWER SUPPLY OF JILIN POWER +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411865374.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-28
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately predict distributed photovoltaic power, especially in the case of wide distribution, complex surrounding environment, and large differences in weather factors, which leads to an over-limited voltage of the distribution network and an increase in the peak-to-valley difference in load, affecting the power supply quality and dispatch operation.

Method used

Multi-source weather forecast data and historical power timing data of distributed photovoltaic power stations are used to determine network parameters through feature extraction, fuzzy clustering algorithm, and Bayesian methods, and a Transformer model is used to predict distributed photovoltaic power.

Benefits of technology

It improves the accuracy of distributed photovoltaic power prediction, can more accurately reflect complex meteorological elements in the distributed photovoltaic area, and improves the power supply quality and scheduling operation of the distribution network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119340995B_ABST
    Figure CN119340995B_ABST
Patent Text Reader

Abstract

The present application discloses a distributed photovoltaic power prediction method, device, equipment, medium and product, which relates to the field of distributed photovoltaic technology. The method includes obtaining a multi-source meteorological matrix; according to historical power time series data, using a fuzzy clustering algorithm based on time series morphology to divide the distributed photovoltaic power stations in the prediction area; using the Bayesian method to determine the optimal network parameters of each sub-area; applying the optimal network parameters to the Transformer model of each sub-area to obtain a distributed photovoltaic power prediction model for each sub-area; inputting the multi-source meteorological matrix of the future prediction period into the distributed photovoltaic power prediction model of each area, and using the first multi-layer perceptron to obtain the distributed photovoltaic power prediction results of the area to be predicted in the future prediction period. The present application can be applied to distributed photovoltaic power prediction and improve the accuracy of distributed photovoltaic power prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed photovoltaic technology, and in particular to a distributed photovoltaic power prediction method, device, equipment, medium and product. Background Art

[0002] With the construction and development of new power systems, massive distributed photovoltaics are gradually connected to the distribution network. Due to the small capacity and wide distribution of distributed photovoltaics, the intermittent and non-stable power generation, the large-scale distributed photovoltaic access has caused the distribution network to have voltage limit violations and increased load peak-to-valley differences, which seriously affects the power supply quality and dispatching operation of the distribution network. Accurate distributed photovoltaic power prediction can provide strong support for the operation and regulation of the distribution network, and is of great significance to the optimal configuration and real-time dispatching of the power system.

[0003] At present, there have been a lot of research results on the power prediction of centralized photovoltaic power stations. Distributed photovoltaic power prediction mostly follows the centralized power prediction method, using meteorological numerical forecasting and artificial intelligence methods to predict power. However, due to the wide distribution, complex surrounding environment, large differences in weather factors and lack of dedicated meteorological monitoring equipment, it is difficult to directly apply the existing research results on the power prediction of centralized photovoltaic power stations. Summary of the invention

[0004] The purpose of this application is to provide a distributed photovoltaic power prediction method, device, equipment, medium and product, which can be applied to distributed photovoltaic power prediction and improve the accuracy of distributed photovoltaic power prediction.

[0005] To achieve the above objectives, this application provides the following solutions.

[0006] In the first aspect, the present application provides a distributed photovoltaic power prediction method, including: collecting multi-source weather forecast historical data of each forecast point in the area to be predicted within the historical period, and historical power time series data of all distributed photovoltaic power stations; extracting the characteristics of the multi-source weather forecast historical data, and forming a multi-source meteorological matrix together with the multi-source weather forecast historical data; according to the historical power time series data, using a fuzzy clustering algorithm based on time series morphology to divide the distributed photovoltaic power stations in the prediction area into regions to obtain multiple sub-regions; according to the multi-source meteorological matrix and historical power time series data of each sub-region, using the Bayesian method to determine the optimal network parameters of each sub-region; applying the optimal network parameters of each sub-region A Transformer model is applied to each sub-region to obtain a distributed photovoltaic power prediction model for each sub-region; the Transformer model encodes the time series of a single meteorological feature in a multi-source meteorological matrix as input; multi-source weather forecast data for each forecast point in the area to be predicted in the future prediction period are collected, and the multi-source weather forecast data for the future prediction period is input into the distributed photovoltaic power prediction model of each region corresponding to the multi-source meteorological matrix of each sub-region, and a distributed photovoltaic power prediction value of each sub-region is output; according to the distributed photovoltaic power prediction value of each sub-region, a first multi-layer perceptron is used to obtain a distributed photovoltaic power prediction result of the area to be predicted in the future prediction period.

[0007] In the second aspect, the present application provides a distributed photovoltaic power prediction device, including: a historical data acquisition module, used to collect multi-source weather forecast historical data of each forecast point in the area to be predicted within the historical period, and historical power time series data of all distributed photovoltaic power stations; a feature extraction module, used to extract the features of the multi-source weather forecast historical data, and together with the multi-source weather forecast historical data, form a multi-source meteorological matrix; a regional division module, used to divide the distributed photovoltaic power stations in the area to be predicted into regions according to the historical power time series data, using a fuzzy clustering algorithm based on time series morphology to obtain multiple sub-regions; a network parameter optimization module, used to determine the optimal network parameters of each sub-region according to the multi-source meteorological matrix and historical power time series data of each sub-region using a Bayesian method; a network parameter application module, The method is used to apply the optimal network parameters of each sub-region to the Transformer model of each sub-region to obtain the distributed photovoltaic power prediction model of each sub-region; the Transformer model encodes the time series of a single meteorological feature in the multi-source meteorological matrix as input; the power prediction module is used to collect the multi-source weather forecast data of each forecast point in the area to be predicted in the future prediction period, and input the multi-source weather forecast data of the future prediction period into the distributed photovoltaic power prediction model of each area corresponding to the multi-source meteorological matrix of each sub-region, and output the distributed photovoltaic power prediction value of each sub-region; the mapping module is used to obtain the distributed photovoltaic power prediction result of the area to be predicted in the future prediction period by using the first multi-layer perceptron according to the distributed photovoltaic power prediction value of each sub-region.

[0008] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described distributed photovoltaic power prediction methods.

[0009] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described distributed photovoltaic power prediction methods.

[0010] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned distributed photovoltaic power prediction methods.

[0011] According to the specific embodiments provided in this application, this application has the following technical effects.

[0012] The present application provides a distributed photovoltaic power prediction method, device, equipment, medium and product, which fully considers the characteristics of the wide distribution and large number of distributed photovoltaics, uses multiple meteorological sources and multiple forecast points to obtain multi-source weather forecast historical data, and generates a multi-source meteorological matrix for the area to be predicted, which can more accurately reflect the complex meteorological elements in the distributed photovoltaic area; considers the spatiotemporal correlation of distributed photovoltaics, and uses a fuzzy clustering algorithm based on time series morphology to divide the distributed photovoltaic power stations in the prediction area; combines the Bayesian method to establish a distributed photovoltaic interval power model under the Transformer model, highlighting the uncertainty of photovoltaic output affected by meteorological factors; the improved Transformer model encodes the time series of a single meteorological feature as input, which is conducive to the attention mechanism to capture the correlation between different meteorological features, thereby effectively improving the accuracy of photovoltaic power prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0014] Figure 1 A schematic diagram of a flow chart of a distributed photovoltaic power prediction method provided in one embodiment of the present application.

[0015] Figure 2 A schematic diagram of the distributed photovoltaic power prediction process using the Bayesian and Transformer models provided in another embodiment of the present application.

[0016] Figure 3 A schematic diagram of the improved Transformer model structure provided for another embodiment of the present application.

[0017] Figure 4 A schematic diagram of the working principle of a distributed photovoltaic power prediction method provided in another embodiment of the present application.

[0018] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0021] The power prediction of centralized photovoltaic power stations can be divided into physical methods and artificial intelligence methods. Among them, the physical method uses the relative position of the photovoltaic power station and the sun, and converts the solar irradiance received by the photovoltaic cell into output power according to the physical model of the photovoltaic panel and inverter. The physical method requires accurate photovoltaic panel models, inverter models, and solar relative position models, and the inaccuracy of these models is prone to systematic deviations, affecting the prediction accuracy. The artificial intelligence method establishes a mapping relationship between numerical weather forecasts and photovoltaic power generation, and then builds a photovoltaic power prediction model, using numerical weather forecasts as input for photovoltaic power prediction. The artificial intelligence method makes full use of data mining, ignores the influence of internal components such as photovoltaic panels, avoids prediction errors caused by inaccurate component parameters, and has relatively good prediction effects, and is widely used.

[0022] Considering the large number of distributed photovoltaic power plants, their decentralized access, and the random fluctuations affected by the meteorological environment, the power prediction of distributed photovoltaic power plants cannot directly apply the research results of centralized photovoltaic power plant power prediction. In view of this, this application aims at the problem of distributed photovoltaic power prediction in the power system. In an exemplary embodiment, Figure 1 As shown, a distributed photovoltaic power prediction method is provided, including the following steps 101 to 107.

[0023] Step 101: Collect multi-source weather forecast historical data for each forecast point in the area to be predicted during the historical period, and historical power time series data of all distributed photovoltaic power stations.

[0024] Step 102: extracting the features of the multi-source weather forecast historical data, and constructing a multi-source meteorological matrix together with the multi-source weather forecast historical data.

[0025] Step 103: Based on the historical power time series data, a fuzzy clustering algorithm based on time series morphology is used to divide the distributed photovoltaic power stations in the prediction area into regions to obtain multiple sub-regions.

[0026] Step 104: Based on the multi-source meteorological matrix and historical power time series data of each sub-region, the optimal network parameters of each sub-region are determined using the Bayesian method.

[0027] Step 105: Apply the optimal network parameters of each sub-region to the Transformer model of each sub-region to obtain a distributed photovoltaic power prediction model for each sub-region; the Transformer model encodes the time series of a single meteorological feature in the multi-source meteorological matrix as input.

[0028] Step 106: Collect multi-source weather forecast data for each forecast point in the area to be predicted during the future forecast period, and input the multi-source weather forecast data for the future forecast period into the distributed photovoltaic power prediction model of each area corresponding to the multi-source meteorological matrix of each sub-area, and output the distributed photovoltaic power prediction value of each sub-area.

[0029] Step 107: According to the distributed photovoltaic power prediction value of each sub-region, using the first multi-layer perceptron, obtain the distributed photovoltaic power prediction result of the area to be predicted in the future prediction period.

[0030] The implementation of the above steps 101 to 107 fully considers the characteristics of the wide distribution and large number of distributed photovoltaics, uses multiple meteorological sources and multiple forecast points to obtain multi-source weather forecast historical data, and generates a multi-source meteorological matrix for the area to be predicted, which can more accurately reflect the complex meteorological elements in the distributed photovoltaic area; considers the spatiotemporal correlation of distributed photovoltaics, and uses a fuzzy clustering algorithm based on time series morphology to divide the distributed photovoltaic power stations in the prediction area; combines the Bayesian method to establish a distributed photovoltaic interval power model under the Transformer model, highlighting the uncertainty of photovoltaic output affected by meteorological factors; the improved Transformer model encodes the time series of a single meteorological feature as input, which is conducive to the attention mechanism to capture the correlation between different meteorological features, thereby effectively improving the accuracy of photovoltaic power prediction.

[0031] In another exemplary embodiment of the present application, numerical weather forecast is an important factor affecting the output of distributed photovoltaic power generation. Due to the dispersion of distributed photovoltaic areas, the numerical weather forecast selected in the present application includes multiple forecast points and multiple meteorological sources in the area to be predicted. Since different meteorological sources differ in accuracy and precision, the meteorological sources used in the above step 101 include GFS (Global Forecasting System), GEM (Global Environmental Multi-scale model), GSM (Global System for mobile communication), ICON (Icosahedral Nonhydrostatic) and ECMWF (European Center for Mediumrange Weather Forecasts), and multi-source weather forecast historical data of forecast points in the area to be predicted are collected at a spatial resolution of 15×15km. Meteorological elements include temperature, humidity, air pressure, irradiation intensity, cloud cover, wind speed, and wind direction, which constitute a multi-source meteorological matrix X of the area to be predicted, which is used as the input of the subsequent model, as shown below,

[0032] ,

[0033] In the formula, They represent the meteorological matrices of GFS, GEM, GSM, ICON and ECMWF respectively.

[0034] by Take the temperature data in as an example, The specific form is as follows:

[0035] ,

[0036] In the formula, T Indicates that the meteorological element is temperature, Indicates the relative position in the area to be predicted is c OK, d The temperature data of the column points, , m is the number of rows of forecast points, , n is the column number of the forecast point.

[0037] In another exemplary embodiment of the present application, the features of the multi-source weather forecast historical data extracted in the above step 102 include statistical features and time series features, the statistical features are used to describe the degree of fluctuation of meteorological features, and the time series features are used to describe the short-term characteristics of distributed photovoltaic output at various time scales (such as hours, days, months, etc.). Extracting the features of the multi-source weather forecast historical data can be replaced by the following steps 201 to 202.

[0038] Step 201: According to the formula , extract the statistical characteristics of multi-source weather forecast historical data; where, For the The multi-source weather forecast historical data at the moment The average value within t For the time period, For the Multi-source weather forecast historical data at all times; For the The multi-source weather forecast historical data at the moment Standard deviation within ; For The maximum value of the historical data of multi-source weather forecast, To obtain the maximum value, For the Multi-source weather forecast historical data at all times, For the Multi-source weather forecast historical data at all times, For the Multi-source weather forecast historical data at all times, For the Multi-source weather forecast historical data at all times.

[0039] Step 202: According to the formula , extract the time series characteristics of multi-source weather forecast historical data; where, For the Time series characteristics of multi-source weather forecast historical data at each moment, For the The minute value corresponding to the multi-source weather forecast historical data at the moment, For the The hourly value corresponding to the multi-source weather forecast historical data at the moment, For the The day value corresponding to the multi-source weather forecast historical data at the moment, For the The monthly value corresponding to the multi-source weather forecast historical data at the moment.

[0040] In another exemplary embodiment of the present application, it is assumed that the number of distributed photovoltaic power stations in the area to be predicted is , then the historical power data matrix Y composed of historical power time series data is: Y= .in, are column vectors, Represents the historical power time series data curve of distributed photovoltaic power station 1, Represents the historical power time series data curve of distributed photovoltaic power station 2, Represents a distributed photovoltaic power station The historical power time series data curve. Since photovoltaic output is affected by cloud fluctuations, the output data has a certain front-to-back dependency in the time series. The distance measurement methods usually used to measure the similarity of time series include Euclidean distance, DTW (dynamic time warping) distance, etc. The Euclidean distance only focuses on the straight-line distance and is easily affected by noise and outliers. The DTW distance can reasonably align the time series, but the high time complexity poses a challenge to massive distributed photovoltaics. This application uses the Jeffreys composite distance to measure the similarity of two distributed photovoltaic power stations in time series morphology. Not only does it achieve linear complexity, but it also solves the problem that the Jeffreys composite distance cannot handle negative time series. Then the above step 103 uses a fuzzy clustering algorithm based on the time series morphology to divide the distributed photovoltaic power stations in the prediction area according to the historical power time series data to obtain multiple sub-areas, which can be replaced by the following steps 301~302.

[0041] Step 301: Based on the historical power time series data, according to the formula , calculate the Jeffreys composite distance between any two distributed photovoltaic power stations in the predicted area; where, For distributed photovoltaic power stations A and distributed photovoltaic power stations B The Jeffreys composite distance between Respectively represent distributed photovoltaic power stations A and distributed photovoltaic power stations B Historical power time series data, and Respectively represent distributed photovoltaic power stations A and distributed photovoltaic power stations B The minimum value of the historical power, for function.

[0042] Step 302: Based on the Jeffreys composite distance between any two distributed photovoltaic power stations in the area to be predicted, a fuzzy clustering algorithm is used to divide the distributed photovoltaic power stations in the area to be predicted to obtain multiple sub-areas.

[0043] In the above step 302, it is first assumed that the photovoltaic output curve of the distributed photovoltaic power station in the area to be predicted has obvious upward and downward trends in time form, and the fuzzy clustering algorithm is used to divide the areas with similar photovoltaic output into the same category. The algorithm will give the membership degree of each photovoltaic station in each category. The membership degree reflects the weight of the photovoltaic station to the category to which it belongs. The calculation formula is as follows:

[0044] ,

[0045] In the formula, Weiguang distributed photovoltaic power station The membership degree of For distributed photovoltaic power stations Jeffreys distance to the cluster center, g is the fuzzy coefficient, the default value is 2, which determines the fuzziness of the distributed photovoltaic power station belonging to the class. g The larger the membership The closer it is to 1, g The closer to 1, the higher the membership The higher the value, the higher the initial membership.

[0046] The calculation formula of cluster center is: ,

[0047] In the formula, is the cluster center of the class to which it belongs, For distributed photovoltaic power stations The historical power, is the number of distributed photovoltaic power stations in the category.

[0048] In another exemplary embodiment of the present application, Figure 2 As shown, in order to reflect the uncertainty of distributed photovoltaic output, this application establishes the posterior distribution of historical power prediction errors through Bayesian theory, and then obtains the probability distribution of distributed photovoltaic power prediction errors based on Bayesian deep learning, and then obtains the distributed photovoltaic output prediction results within the confidence interval. Then the above step 104 uses the Bayesian method to determine the optimal network parameters for each sub-region based on the multi-source meteorological matrix and historical power time series data of each sub-region, which can be replaced by the following steps 401 to 406.

[0049] Step 401: Divide the multi-source meteorological matrix of each sub-region into a meteorological training set and a meteorological test set, and divide the historical power time series data into a power training set and a power test set.

[0050] Step 402: According to the formula , calculate the posterior distribution of network parameters on the meteorological training set and the power training set; where, is the network parameter W in the meteorological training set and power training set The posterior distribution on , is the marginal likelihood distribution of the network parameter W, is the prior distribution of network parameters W, The meteorological training set and power training set The joint probability distribution of . It is specified as a standard normal distribution.

[0051] Step 403: Calculate the KL divergence between the variational distribution of the network parameters and the posterior distribution.

[0052] because It is a function of the network parameter W. It is difficult to solve its integral. We use the variational distribution approximate , the KL divergence is used to measure the distance between the variational distribution and the posterior distribution.

[0053] Step 404: Determine whether the KL divergence converges.

[0054] Step 405: If not, update the variational distribution of the network parameters, and return to the step of calculating the KL divergence between the variational distribution of the network parameters and the posterior distribution.

[0055] Step 406: If yes, the variational distribution of the current network parameters is determined as the optimal variational distribution, and the network parameters in the optimal variational distribution are determined as the optimal network parameters of each sub-region.

[0056] In another exemplary embodiment of the present application, Figure 2 As shown, after step 406, the method further includes: according to the formula , calculate the probability distribution between the test set and the distributed photovoltaic power prediction value of each sub-region; the test set includes a meteorological test set and a power test set.

[0057] In the formula, is the probability distribution between the test set and the distributed photovoltaic power prediction value of each sub-region, for Regarding the likelihood probability distribution of network parameters W, is the optimal variational distribution, is the meteorological training set, is the power training set, is the meteorological test set, For the power test set.

[0058] In another exemplary embodiment of the present application, the Transformer model captures the dependencies of long time series through the attention mechanism. However, after feature extraction, the multi-source meteorological matrix uses position encoding to form a coding vector as input, which makes it difficult for the model to retain the correlation between the meteorological features, further limiting the model's ability to capture key meteorological features. The present application improves the Transformer model. The improved Transformer model embeds the time series of each meteorological feature independently without position encoding, and processes the correlation between meteorological features through the attention mechanism. The entire improved Transformer structure is shown in the figure. Figure 3 As shown. The Transformer model in the above step 105 includes: an embedding layer, a multi-head attention mechanism, a first normalization layer, a feedforward neural network, a second normalization layer and a second multi-layer perceptron connected in sequence; the embedding layer is used to encode the time series of a single meteorological feature in the multi-source meteorological matrix; the multi-head attention mechanism is used to calculate the attention weight of each encoded meteorological feature, and assign an attention weight to each encoded meteorological feature to obtain the output tensor of each meteorological feature; the first normalization layer is used to normalize the output tensor of each meteorological feature; the feedforward neural network is used to perform linear processing on the output tensor of each normalized meteorological feature; the second normalization layer is used to normalize each linearly processed meteorological feature to obtain an output matrix; the second multi-layer perceptron is used to perform nonlinear mapping on the output matrix to output the distributed photovoltaic power prediction value.

[0059] Among them, the multi-head attention mechanism is used to calculate the attention weight of each meteorological feature, and high weight is assigned to key features. The calculation formula is as follows:

[0060] ,

[0061] ,

[0062] ,

[0063] ,

[0064] ,

[0065] ,

[0066] Where Q represents the query matrix, K represents the key matrix, and V represents the value matrix. are the corresponding weights, is the dimension of the time series, For the kThe output of the attention mechanism, is the output of the multi-head attention mechanism. X represents the input meteorological characteristics, represents the output of the self-attention mechanism, Represents the output transformation matrix.

[0067] Furthermore, the normalization layer is used to standardize the data, and the feedforward neural network is used to avoid overfitting of the model under long time series. The calculation formula is as follows:

[0068] ,

[0069] ,

[0070] ,

[0071] In the formula, is the normalized meteorological characteristic, x is the element in X, For normalization, is the linear processing of the feedforward neural network, is the output matrix, are weights, All are biased.

[0072] Finally, a multi-layer perceptron (MLP) is used to Perform nonlinear mapping and output the short-term prediction value of photovoltaic power in the area to be predicted ,

[0073] .

[0074] A distributed photovoltaic power prediction method of the present application is applicable to distributed photovoltaic short-term power prediction in a power system, and the short-term may be 4 days, 7 days or 10 days. Figure 4 The working principle of a distributed photovoltaic power prediction method of the present application is shown. Figure 4 The initial features in refer to the multi-source weather forecast historical data.

[0075] Due to the dispersion of distributed photovoltaic areas, the numerical weather forecast selected in this application includes multiple numerical weather forecast points and multiple meteorological sources in the area to be predicted; secondly, considering the spatiotemporal correlation of distributed photovoltaics, the distributed photovoltaic power generation power in similar geographical locations and similar meteorological conditions will show similar change trends. By using a fuzzy clustering algorithm based on time series morphology to analyze the correlation of distributed photovoltaic output, the predicted area is clustered to improve the accuracy of power prediction; finally, due to the uncertainty of distributed photovoltaic output, compared with point prediction, the use of probabilistic prediction can more reasonably reflect the uncertainty of distributed photovoltaic power, thereby achieving a more efficient, accurate and flexible power prediction effect.

[0076] The main technical advantages of the present application method are as follows.

[0077] (1) This application fully considers the characteristics of the wide distribution and large number of distributed photovoltaics. It uses multiple meteorological sources and multiple forecast points to obtain multi-source weather forecast historical data and generate a multi-source meteorological matrix for the area to be predicted, which can more accurately reflect the complex meteorological elements in the distributed photovoltaic area.

[0078] (2) This application takes into account the temporal and spatial correlation of distributed photovoltaics, and uses a fuzzy clustering algorithm based on time series morphology to measure the similarity of the power time series of distributed photovoltaic power stations using the Jeffreys composite distance, and divides the distributed photovoltaic power stations in the region into sub-regions. This method is simple, efficient, and takes comprehensive factors into consideration.

[0079] (3) This application uses an improved Transformer model to establish a distributed photovoltaic power prediction model, encoding the time series of a single meteorological feature as input, which is conducive to the attention mechanism capturing the correlation between different meteorological features, thereby effectively improving the accuracy of photovoltaic power prediction.

[0080] (4) Combining the Bayesian method, a distributed photovoltaic interval power model under the Transformer model is established, highlighting the uncertainty of photovoltaic output affected by meteorological factors.

[0081] Based on the same inventive concept, the embodiment of the present application also provides a distributed photovoltaic power prediction device for implementing the above-mentioned distributed photovoltaic power prediction method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more distributed photovoltaic power prediction device embodiments provided below can refer to the above-mentioned limitations on the distributed photovoltaic power prediction method, and will not be repeated here.

[0082] In an exemplary embodiment, a distributed photovoltaic power prediction device is provided, including: a historical data acquisition module, a feature extraction module, a region division module, a network parameter optimization module, a network parameter application module, a power prediction module and a mapping module.

[0083] A historical data collection module is used to collect the multi-source weather forecast historical data of each forecast point in the area to be predicted within the historical period, as well as the historical power time series data of all distributed photovoltaic power stations. A feature extraction module is used to extract the features of the multi-source weather forecast historical data, and together with the multi-source weather forecast historical data, form a multi-source meteorological matrix. A regional division module is used to divide the distributed photovoltaic power stations in the area to be predicted into regions based on the historical power time series data, using a fuzzy clustering algorithm based on the time series morphology to obtain multiple sub-regions. A network parameter optimization module is used to determine the optimal network parameters of each sub-region using the Bayesian method based on the multi-source meteorological matrix and historical power time series data of each sub-region. A network parameter application module is used to apply the optimal network parameters of each sub-region to the Transformer model of each sub-region to obtain a distributed photovoltaic power prediction model for each sub-region; the Transformer model encodes the time series of a single meteorological feature in the multi-source meteorological matrix as input. The power prediction module is used to collect the multi-source weather forecast data of each forecast point in the area to be predicted in the future prediction period, and input the multi-source weather forecast data of the future prediction period into the distributed photovoltaic power prediction model of each area corresponding to the multi-source meteorological matrix of each sub-area, and output the distributed photovoltaic power prediction value of each sub-area. The mapping module is used to obtain the distributed photovoltaic power prediction result of the area to be predicted in the future prediction period according to the distributed photovoltaic power prediction value of each sub-area using the first multi-layer perceptron.

[0084] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the distributed photovoltaic power prediction results of the area to be predicted in the future prediction period. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a distributed photovoltaic power prediction method is implemented.

[0085] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0086] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0087] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0088] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0089] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0090] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0091] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0092] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A distributed photovoltaic power prediction method, characterized in that: include: Collect multi-source weather forecast historical data for each forecast point in the forecast area during the historical period, as well as historical power time series data of all distributed photovoltaic power stations; Extract the features of multi-source weather forecast historical data, and form a multi-source meteorological matrix together with the multi-source weather forecast historical data; According to the historical power time series data, a fuzzy clustering algorithm based on time series morphology is used to divide the distributed photovoltaic power stations in the prediction area into regions to obtain multiple sub-regions; Based on the multi-source meteorological matrix and historical power time series data of each sub-region, the Bayesian method is used to determine the optimal network parameters for each sub-region; Applying the optimal network parameters of each sub-region to the Transformer model of each sub-region to obtain a distributed photovoltaic power prediction model for each sub-region; the Transformer model encodes the time series of a single meteorological feature in the multi-source meteorological matrix as input; Collect multi-source weather forecast data for each forecast point in the area to be predicted in the future forecast period, and input the multi-source weather forecast data for the future forecast period into the distributed photovoltaic power prediction model of each area corresponding to the multi-source meteorological matrix of each sub-area, and output the distributed photovoltaic power prediction value of each sub-area; According to the distributed photovoltaic power prediction value of each sub-region, using the first multi-layer perceptron, a distributed photovoltaic power prediction result of the area to be predicted in the future prediction period is obtained; Based on the multi-source meteorological matrix and historical power time series data of each sub-region, the Bayesian method is used to determine the optimal network parameters for each sub-region, including: The multi-source meteorological matrix of each sub-region is divided into a meteorological training set and a meteorological test set, and the historical power time series data is divided into a power training set and a power test set; According to the formula Calculate the posterior distribution of network parameters on the meteorological training set and the power training set; where p(W|X train ,Y train ) is the network parameter W in the meteorological training set Y train and power training set X train The posterior distribution on , p(Y train |X train ,W) is the marginal likelihood distribution of the network parameter W, p(W) is the prior distribution of the network parameter W, p(Y train |X train ) is the meteorological training set Y train and power training set X train The joint probability distribution of Calculate the KL divergence between the variational distribution of network parameters and the posterior distribution; Determine whether the KL divergence converges; If not, then update the variational distribution of the network parameters, and return to the step of calculating the KL divergence between the variational distribution of the network parameters and the posterior distribution; If so, the variational distribution of the current network parameters is determined as the optimal variational distribution, and the network parameters in the optimal variational distribution are determined as the optimal network parameters of each sub-region.

2. The distributed photovoltaic power prediction method according to claim 1, characterized in that: Extract the features of multi-source weather forecast historical data, including: According to the formula Extract the statistical characteristics of multi-source weather forecast historical data; where, is the average value of the multi-source weather forecast historical data at time a in [at, a+t], t is the time period, x a+v is the multi-source weather forecast historical data at the a+vth moment; x a,std is the standard deviation of the multi-source weather forecast historical data at time a within [at, a+t]; x a,max is the maximum value of the multi-source weather forecast historical data in [at, a+t], max is the maximum value, x a-t is the multi-source weather forecast historical data at the time, x a-t+1 is the multi-source weather forecast historical data at time a-t+1, x a is the multi-source weather forecast historical data at time a, x a+t The multi-source weather forecast historical data at time a+t; According to the formula x a,time =[x a,minute ,x a,hour ,x a,day ,x a,month ], extract the time series characteristics of multi-source weather forecast historical data; where x a,time is the time series characteristics of the multi-source weather forecast historical data at time a, x a,minute is the minute value corresponding to the multi-source weather forecast historical data at time a, x a,hour is the hourly value corresponding to the multi-source weather forecast historical data at time a, x a,day is the day value corresponding to the multi-source weather forecast historical data at time a, x a,month It is the monthly value corresponding to the multi-source weather forecast historical data at the ath moment.

3. The distributed photovoltaic power prediction method according to claim 1, characterized in that: According to the historical power time series data, a fuzzy clustering algorithm based on time series morphology is used to divide the distributed photovoltaic power stations in the prediction area to obtain multiple sub-areas, including: According to the historical power time series data, according to formula J com (A,B)=(y A -y B )(ln(y A +|y Amin |)-ln(y B +|y Bmin |)), calculate the Jeffreys composite distance between any two distributed photovoltaic power stations in the predicted area; where J com (A, B) is the Jeffreys composite distance between distributed photovoltaic power station A and distributed photovoltaic power station B, y A ,y B Represent the historical power time series data of distributed photovoltaic power station A and distributed photovoltaic power station B, y Amin and Bmin They represent the minimum historical power of distributed photovoltaic power station A and distributed photovoltaic power station B respectively, and ln is the ln function; Based on the Jeffreys composite distance between any two distributed photovoltaic power stations in the area to be predicted, the distributed photovoltaic power stations in the area to be predicted are divided into regions using a fuzzy clustering algorithm to obtain multiple sub-regions.

4. The distributed photovoltaic power prediction method according to claim 1, characterized in that: If yes, the variational distribution of the current network parameters is determined as the optimal variational distribution, and the network parameters in the optimal variational distribution are determined as the optimal network parameters of each sub-region, and then the following is further included: According to the formula p(Y test |X test ,X train ,Y train )=∫p(Y test |X test ,W)q(W)dW, calculate the probability distribution between the test set and the distributed photovoltaic power prediction value of each sub-region; the test set includes a meteorological test set and a power test set; In the formula, p(Y test |X test ,X train ,Y train ) is the probability distribution between the test set and the distributed photovoltaic power prediction value of each sub-region, p(Y test |X test ,W) is p(Y test |X test ,X train ,Y train ) is the likelihood probability distribution of the network parameter W, q(W) is the optimal variational distribution, Y train is the meteorological training set, X train is the power training set, Y test is the meteorological test set, X test For the power test set.

5. The distributed photovoltaic power prediction method according to claim 1, characterized in that: The Transformer model includes: an embedding layer, a multi-head attention mechanism, a first normalization layer, a feedforward neural network, a second normalization layer and a second multi-layer perceptron connected in sequence; The embedding layer is used to encode the time series of a single meteorological feature in the multi-source meteorological matrix; The multi-head attention mechanism is used to calculate the attention weight of each encoded meteorological feature, and assign the attention weight to each encoded meteorological feature to obtain the output tensor of each meteorological feature; The first normalization layer is used to normalize the output tensor of each meteorological feature; The feedforward neural network is used to perform linear processing on the output tensor of each normalized meteorological feature; The second normalization layer is used to normalize each linearly processed meteorological feature to obtain an output matrix; The second multilayer perceptron is used to perform nonlinear mapping on the output matrix and output a distributed photovoltaic power prediction value.

6. A distributed photovoltaic power prediction device, characterized in that: The distributed photovoltaic power prediction device comprises: The historical data collection module is used to collect the multi-source weather forecast historical data of each forecast point in the forecast area during the historical period, as well as the historical power time series data of all distributed photovoltaic power stations; A feature extraction module is used to extract the features of multi-source weather forecast historical data and form a multi-source meteorological matrix together with the multi-source weather forecast historical data; A region division module is used to divide the distributed photovoltaic power stations in the prediction area into regions according to the historical power time series data and adopt a fuzzy clustering algorithm based on the time series morphology to obtain multiple sub-regions; The network parameter optimization module is used to determine the optimal network parameters for each sub-region using the Bayesian method based on the multi-source meteorological matrix and historical power time series data of each sub-region; A network parameter application module is used to apply the optimal network parameters of each sub-region to the Transformer model of each sub-region to obtain a distributed photovoltaic power prediction model of each sub-region; the Transformer model encodes the time series of a single meteorological feature in the multi-source meteorological matrix as input; The power prediction module is used to collect multi-source weather forecast data for each forecast point in the area to be predicted in the future forecast period, and input the multi-source weather forecast data for the future forecast period into the distributed photovoltaic power prediction model of each area corresponding to the multi-source meteorological matrix of each sub-area, and output the distributed photovoltaic power prediction value of each sub-area; A mapping module is used to obtain a distributed photovoltaic power prediction result of the area to be predicted in a future prediction period by using a first multi-layer perceptron according to the distributed photovoltaic power prediction value of each sub-area; Based on the multi-source meteorological matrix and historical power time series data of each sub-region, the Bayesian method is used to determine the optimal network parameters for each sub-region, including: The multi-source meteorological matrix of each sub-region is divided into a meteorological training set and a meteorological test set, and the historical power time series data is divided into a power training set and a power test set; According to the formula Calculate the posterior distribution of network parameters on the meteorological training set and the power training set; where p(W|X train ,Y train ) is the network parameter W in the meteorological training set Y train and power training set X train The posterior distribution on , p(Y train |X train ,W) is the marginal likelihood distribution of the network parameter W, p(W) is the prior distribution of the network parameter W, p(Y train |X train ) is the meteorological training set Y train and power training set X train The joint probability distribution of Calculate the KL divergence between the variational distribution of network parameters and the posterior distribution; Determine whether the KL divergence converges; If not, then update the variational distribution of the network parameters, and return to the step of calculating the KL divergence between the variational distribution of the network parameters and the posterior distribution; If so, the variational distribution of the current network parameters is determined as the optimal variational distribution, and the network parameters in the optimal variational distribution are determined as the optimal network parameters of each sub-region.

7. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the distributed photovoltaic power prediction method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the distributed photovoltaic power prediction method described in any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the distributed photovoltaic power prediction method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Heat accumulation electric boiler and clean energy prediction matching and consumption control method

    CN107256436A

  • Distributed photovoltaic power prediction method and device for medium and low voltage transformer area, and electronic equipment

    CN117613879A