Photovoltaic generating capacity prediction method and domain knowledge driven visual analysis system

Through the integrated prediction method of the depth timing prediction model and the decision tree model, combined with the domain knowledge-driven visual analysis system, the problem of low accuracy of the existing photovoltaic power generation prediction model in non-stationary and nonlinear data processing is solved, and the problem of low accuracy of the existing photovoltaic power generation prediction model is achieved. Efficient and accurate photovoltaic power generation forecast.

CN119474490APending Publication Date: 2025-02-18ZHEJIANG UNIV

Patent Information

Application Number
CN202411311261.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing photovoltaic power generation prediction model has low prediction accuracy when processing non-stationary and nonlinear data, and the model structure is complex and difficult to explain, so it cannot be effectively optimized with domain knowledge.

Method used

By constructing a deep timing prediction model and a decision tree model for integrated prediction, and combining a domain knowledge-driven visual analysis system, we intuitively display the model prediction process and support users to interactively build prediction models.

Benefits of technology

It improves the accuracy and efficiency of photovoltaic power generation prediction, enhances the adaptability and reliability of the model, supports automated identification of abnormal time series, and provides multi-angle perspective evaluation of model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474490A_ABST
    Figure CN119474490A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic generating capacity prediction method and a domain knowledge-driven visual analysis system, and the method is based on the photovoltaic generating capacity prediction method, and compared with an existing photovoltaic generating capacity prediction method, the prediction method is based on the current photovoltaic generating capacity and covariable as sample data, and the prediction result is more accurate. Integrated prediction is performed by constructing a depth time sequence prediction model and a decision tree model, so that the adaptability and reliability of the model are enhanced, and a dynamic prediction scene of a real photovoltaic power plant can be effectively coped with; the invention further provides a photovoltaic generating capacity visual analysis system based on domain knowledge driving, which supports application of domain knowledge to model optimization and visual display of performance of a prediction model, and supports automatic identification of abnormal time sequences in a model prediction process. The method can visually understand the prediction process and provide multi-angle visual angle evaluation model performance, is used for interactively constructing a prediction model, and improves the prediction efficiency and accuracy of photovoltaic power generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a photovoltaic power generation prediction method and a domain knowledge-driven visualization analysis system. Background Art

[0002] With the continuous development of modern photovoltaic power generation technology and the continuous expansion of photovoltaic power stations, the massive data collected through real-time monitoring provides important data support for photovoltaic power generation prediction, fault analysis and precise operation and maintenance of power stations. However, affected by uncertain factors such as meteorology, photovoltaic power generation shows significant intermittency and volatility, which not only causes intermittent penetration, reverse power flow, frequency harmonic distortion and other problems, affecting the reliability and stability of the power system, but also affects the dispatching and production of photovoltaic power stations.

[0003] According to different principles, photovoltaic power generation prediction models can be divided into physical models, statistical models and artificial intelligence models. Among them, physical models have disadvantages such as poor anti-interference and poor versatility; statistical models realize photovoltaic power generation prediction. Statistical models perform well for stationary time series data, but due to the influence of clouds and climate, photovoltaic power generation has inherent non-stationarity and nonlinearity, resulting in low prediction accuracy. With the rapid increase in the complexity of power systems and the amount of data, artificial intelligence models have shown better performance in photovoltaic power generation prediction. The existing time series prediction artificial intelligence model architectures are mainly divided into LSTM and Transformer. LSTM can model time series dynamics and can perform well in short-term predictions. The Transformer model has a strong ability to capture long dependencies and extract multi-level representations in sequences by introducing an attention mechanism.

[0004] In the scenario of photovoltaic string power generation prediction, the deep time series prediction model will predict multiple string power generation sequences at the same time. For example, the invention application with publication number CN 118232332 A discloses a power generation prediction method and device based on time series prediction and hybrid neural network, specifically by combining the DLinear model and the hybrid neural network model, multiple historical photovoltaic parameter sequences are predicted for trend characteristics. This method has differences in the prediction accuracy of different variables, and it is easy to produce results that violate domain knowledge; the invention application with publication number CN 117708716 A discloses a photovoltaic power generation power / amount prediction method and device based on regression and time series fusion, specifically by using multiple machine learning models: histogram gradient boosting regression model HGBR, Transformer-based time series prediction model, random forest, deep neural network DNN and Informer model, weighted fusion of the prediction results of these models. However, the comprehensive use of multiple models for prediction requires repeated experimental parameter adjustment, and the work efficiency is limited. In addition, the deep time series prediction model has the characteristics of many parameters, complex structure, and invisible internal mechanism. It is difficult for users to intuitively understand the prediction and decision-making process of the model, and it is impossible to evaluate the performance differences of various parts of the photovoltaic power station and complete the operation and maintenance planning. A photovoltaic power station usually includes thousands of photovoltaic strings, and the status of photovoltaic strings is affected by many factors such as geographical location, installation angle and orientation. The existing model lacks modeling of domain experience knowledge and is difficult to cope with the highly dynamic prediction scenarios of real photovoltaic power plants.

[0005] Visual analysis systems are widely used in deep learning fields including time series forecasting models. Existing visual analysis work for time series forecasting models combines model interpretation analysis technology to use intuitive visualization to display the internal structural parameters, inputs and outputs of the model. TiMoVA combines the Box-Jenkin method for selecting the optimal model with interactive visualization and compares ARIMA models with different parameter settings. DFSeer supports model comparison and selection at different levels of detail for historical demand forecasting models, revealing the forecasting risks of different models for specific products. TimeTuner provides different time series conversion methods and explores the relationship between local correlation, stationarity and model behavior of time series. These works can help users understand model behavior and assist in evaluating and selecting models to a certain extent, but most of them cannot support users to embed domain knowledge into the model for optimization. Given the importance of domain knowledge in industrial fields such as photovoltaic power generation, intelligent manufacturing, and supply chain management, how to effectively combine domain knowledge and deep time series forecasting models is an urgent problem to be solved. Summary of the invention

[0006] The purpose of the present invention is to provide a photovoltaic power generation prediction method and a visual analysis system driven by domain knowledge, which integrates domain knowledge for model optimization to overcome the problem of difficulty in interpreting the model due to its complex structure, and provides a visualization system for intuitively displaying the model prediction process, combining domain knowledge to evaluate the model predictability from multiple angles, so as to interactively construct a photovoltaic power generation prediction model and improve the prediction accuracy of photovoltaic power generation.

[0007] To achieve the above-mentioned purpose of the invention, the embodiment provides a photovoltaic power generation prediction method and a photovoltaic power generation visualization analysis system driven by domain knowledge, including a photovoltaic power generation prediction method and a photovoltaic power generation visualization analysis system driven by domain knowledge.

[0008] In one embodiment, the photovoltaic power generation prediction method comprises the following steps:

[0009] Build and train a deep time series prediction model based on the historical power generation data of photovoltaic strings;

[0010] Based on the photovoltaic power generation and covariates predicted by the trained deep time series prediction model, a decision tree model is constructed and trained;

[0011] The trained decision tree model is used to perform integrated prediction of photovoltaic power generation based on the current photovoltaic power generation and covariates predicted by the deep time series prediction model to obtain the final photovoltaic power generation.

[0012] In one embodiment, the construction and training of the deep time series prediction model based on the historical power generation data of photovoltaic strings includes:

[0013] (1) Based on the historical power generation data of photovoltaic strings, the sliding window method is used to construct deep time series sample data;

[0014] (2) Based on the iTransformer model, a deep time series prediction model for predicting photovoltaic power generation is constructed, and the deep time series prediction model is trained using deep time series sample data and a loss function constructed using mean square error.

[0015] In one embodiment, the photovoltaic power generation and covariates predicted by the trained deep time series prediction model are used to construct and train a decision tree model, including:

[0016] (1) Randomly sample the photovoltaic power generation predicted by the trained deep time series prediction model to obtain sample data. The time characteristics and environmental characteristics of each sample at the corresponding time point are used as covariates together with the sample data as input, and the corresponding actual power generation is used as output to generate a decision tree data set;

[0017] (2) The root node of the decision tree contains all the samples in the decision tree data set. Decision tree partitioning is recursively performed starting from the root node to train the decision tree model.

[0018] In order to clearly display the prediction results of the model, a photovoltaic power generation visualization analysis system driven by domain knowledge is provided. The system uses the photovoltaic power generation prediction method in the visualization analysis. The visualization analysis system includes: a data view module, a mapping view module, a detailed view module, a comparison view module and a decision tree view module;

[0019] The data view module is used to provide a selection function of a deep time series prediction model and a photovoltaic power generation data set, and display the photovoltaic string information of the selected photovoltaic power generation data set, and the model performance of the model deep time series prediction model for reasoning the photovoltaic power generation data set;

[0020] The mapping view module is used to display the distribution status of photovoltaic strings in geographic space and feature space;

[0021] The detailed view module is used to display the photovoltaic power generation predicted by the deep time series prediction model or the decision tree model and the actual photovoltaic power generation, provide power anomaly detection and display the anomaly detection results, and display the importance of different photovoltaic strings and different time points in the model prediction to enhance the interpretability of the prediction;

[0022] The comparison view module is used for historical time series of current and voltage of different photovoltaic strings, and makes in-depth comparisons to explore the differences between strings;

[0023] The decision tree view module is used to visually construct a decision tree model for integrated prediction of photovoltaic power generation in combination with domain knowledge and to save the structure.

[0024] In one embodiment, the display of the photovoltaic string information of the selected photovoltaic power generation data set includes:

[0025] Filtering and sorting functions are provided to quickly locate and display PV strings. Each card in the displayed PV string information list corresponds to a PV string. The card contains the string category, string number and radar chart. The radar chart is used to display multi-dimensional string information and the differences between different string data.

[0026] In one embodiment, the display of the distribution of photovoltaic strings in the geographic space and the feature space includes:

[0027] Provides map mode and scatter plot mode. The map mode truly reflects the geographical distribution of strings in the PV power station, and the scatter plot mode is used to explore the power generation patterns and potential connections of different strings. Specifically, the time series data of PV string power generation is reduced to a two-dimensional plane and mapped to a scatter plot. Each data point uniquely identifies a string.

[0028] Use unified string color coding for map mode and scatter plot mode. Switch, zoom or refresh the provided modes to view the details of PV power generation data and explore potential connections between strings.

[0029] In one embodiment, the display of predicted photovoltaic power generation and actual photovoltaic power generation includes: displaying predicted photovoltaic power generation and actual photovoltaic power generation through a line graph, and displaying the string-related information and category corresponding to each time point, and viewing photovoltaic power generation data details through zooming, dragging and hovering;

[0030] The provision of power generation anomaly detection and display of anomaly detection results includes: identifying persistent anomalies in the predicted photovoltaic power generation of a single string based on a self-defined anomaly threshold and deviation multiple by using an unsupervised anomaly detection algorithm implemented with reference to the 3σ criterion;

[0031] The display model predicts the importance of different photovoltaic strings and different time points to enhance the interpretability of the prediction, including: based on the string importance WS and displaying the model's importance of different strings through a horizontal line graph, based on the importance of a single string on a time scale WT and displaying the model's importance of different time points through an area graph overlapping with the predicted photovoltaic power generation series.

[0032] In one embodiment, the display of the historical time series of currents and voltages of different photovoltaic strings and the in-depth comparison to explore the differences between the strings include:

[0033] Based on the same time axis, the current time series and voltage time series of the selected PV strings are displayed synchronously through line graphs. By selecting the zoomed-in time interval, the differences in the operating status of the PV strings can be explored.

[0034] In one embodiment, the visual construction of a decision tree model for integrated prediction of photovoltaic power generation in combination with domain knowledge and the preservation of the structure include:

[0035] The decision tree adopts the Sankey diagram design structure. Each tree node is encoded as a rectangle. The nodes are connected by edges. The width of the rectangle represents the amount of data, and the division rules are displayed above the parent node. The decision tree structure is visually modified to build a decision tree model. The linear regression calculation of the decision tree model is performed based on scikit-learn to implement model training and save the trained model structure.

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

[0037] Compared with the existing photovoltaic power generation prediction methods, the photovoltaic power generation prediction method provided by the present invention is based on the current photovoltaic power generation and covariates as sample data, and integrates prediction by constructing a deep time series prediction model and a decision tree model, thereby enhancing the adaptability and reliability of the model and being able to effectively cope with the prediction scenarios of the real photovoltaic power plant dynamics; the present invention also provides a photovoltaic power generation visualization analysis system driven by domain knowledge, which supports the application of domain knowledge to model optimization and intuitively displays the performance of the prediction model, supports automatic identification of abnormal time series in the process of model prediction, can intuitively understand the prediction process and provide multi-angle perspectives to evaluate model performance, so as to interactively construct a prediction model and improve the prediction efficiency and accuracy of photovoltaic power generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0039] Figure 1 A flow chart of a photovoltaic power generation prediction method;

[0040] Figure 2 is a schematic diagram of the visual analysis system;

[0041] Figure 3 is a schematic diagram of a data view module;

[0042] Figure 4 is a schematic diagram of a mapping view module;

[0043] Figure 5 is a schematic diagram of a detailed view module;

[0044] Figure 6 is a schematic diagram of the comparison view module;

[0045] Figure 7 is a schematic diagram of the decision tree view module;

[0046] Figure 8 Schematic diagram of anomaly detection;

[0047] Fig. 9 This is a schematic diagram of the prediction results of the decision tree model. DETAILED DESCRIPTION

[0048] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0049] In order to improve the accuracy of photovoltaic power generation prediction, the embodiment provides a photovoltaic power generation prediction method, which enhances the adaptability and reliability of the model by constructing a deep time series prediction model and a decision tree model for integrated prediction, and can effectively cope with the prediction scenario of the real photovoltaic power plant dynamics. Figure 1 As shown, the photovoltaic power generation prediction method provided in the embodiment includes the following steps:

[0050] S1. Build and train a deep time series prediction model based on the historical power generation data of photovoltaic strings.

[0051] In the embodiment, the deep time series sample data is constructed using the sliding window method based on the historical power generation data of the photovoltaic strings obtained from the photovoltaic power station. The power generation data of each string is used as a time series of 120 hours as the input feature of the model, with a sliding step of 1 hour to predict the power generation of the next 24 hours. The deep time series sample data is divided into a training set (70%) and a test set (30%) in chronological order;

[0052] In multivariate time series forecasting, it is assumed that the historical time series data is X = {x1, x2, ..., x T}∈R T×N , where T is the time step, N is the number of variables, and the data Y={x T+1 , x T+2 , ..., x T+s}={y1,y2,....,y s}∈R s×N It should be noted that, in the present invention, N represents the number of photovoltaic strings, and X is used. t,: Represents the historical time series data recorded at the tth time point, using X ,:n Represents the time series of the nth variable.

[0053] Based on the iTransformer model, a deep time series prediction model for predicting photovoltaic power generation is constructed, and the deep time series prediction model is trained using deep time series sample data and a loss function constructed using mean square error. Specifically, iTransformer adopts the pure encoder architecture of Transformer, including an embedding layer (Embedding), a projection layer (Projection), a multi-layer stackable Transformer layer (TrmBlock) and a mapping layer. The embedding operation of the embedding layer and the projection operation of the projection layer are both implemented through a multi-layer perceptron (MLP). The iTransformer model treats the time series of a single variable as an independent token input into the iTransformer model by transposing the input, and the embedding layer is used to transform each X ,:nIndependently embed them to obtain a high-dimensional feature representation H = {h1, h2,, ..., h n}∈R N×D , where D represents the dimension of the embedded features. ,:n For example, high-dimensional features are obtained through the embedding layer at layer 0. Used to represent the time series changes of variable n in the past time:

[0054]

[0055] Then the high-dimensional features The input is sent to the TrmBlock of each layer. Through the linear feedforward network in TrmBlock, the time features extracted by MLP are shared in different time series, and the correlation between different variables is modeled using the self-attention mechanism model. Input into TrmBlock to get

[0056]

[0057] Finally, the mapping layer Mapping future time series data into forecasts The forecast sequence of variable n is expressed as

[0058]

[0059] Among them, the iTransformer model uses mean square error (MSE) as the loss function to minimize the mean square error. The specific calculation formula is as follows:

[0060]

[0061] Where Y = {y1, y2, ..., y s} represents the actual photovoltaic power generation, Represents the photovoltaic power generation predicted by the deep time series prediction model.

[0062] S2. Based on the photovoltaic power generation and covariates predicted by the trained deep time series prediction model, a decision tree model is constructed and trained;

[0063] In the embodiment, the photovoltaic power generation predicted by the deep time series prediction model is randomly sampled to obtain sample data. Assuming that the number of strings is K, q data points are randomly sampled from the predicted power generation of each string, and a total of N sample data are sampled, where N = K × q. The i-th predicted photovoltaic power generation sample data and its time characteristics and environmental characteristics at the corresponding time point are used as covariates together with the photovoltaic power generation sample data as input x i∈R M , M represents the feature dimension of the input, and the corresponding actual power generation is represented by y i , generate a decision tree data set;

[0064] The root node of the decision tree contains all the samples in the decision tree data set. Starting recursively from the root node, the MSE is used as the optimal split point to split the data set. Feature selection and data splitting are repeated for each child node until the stopping condition is met.

[0065] Assume that the sample set of the current node is G, the number of samples is |G|, y i represents the true value of sample i, Indicates the predicted value of sample i. In the decision tree algorithm, the predicted values ​​of all samples under the current node are According to formula (4), the mean square error of the current node can be obtained.

[0066] The specific process of building and training a decision tree model is as follows:

[0067] (a) Consider all the features in the sample set and traverse all possible values ​​of each feature to split the sample set into two parts G1 and G2;

[0068] (b) Calculate the mean square error of G1 and G2 respectively to obtain MSE1 and MSE2. The mean square error sum of this division is s=MSE1+MSE2. Compare the mean square error sums obtained by divisions with different eigenvalues ​​and segmentation points, select the feature and segmentation point corresponding to the minimum mean square error sum, and generate two child nodes;

[0069] (c) Repeat the process described in (a) and (b) for these two child nodes until the stopping condition is met.

[0070] S3. Use the trained decision tree model to perform integrated prediction of photovoltaic power generation based on the current photovoltaic power generation and covariates predicted by the deep time series prediction model to obtain the final photovoltaic power generation.

[0071] In the embodiment, the photovoltaic power generation predicted by the deep time series prediction model and the covariates at the corresponding time points are taken as input, expressed as Input the decision tree model for integrated prediction to obtain the final photovoltaic power generation Y′ :,n ={y′1,y′2,...,y′ s}.

[0072] During the analysis of the prediction results, it was found that due to differences in geographical location, installation angle, orientation and other factors, different photovoltaic strings have different photovoltaic power generation. At the same time, a photovoltaic power station is often composed of tens of thousands of photovoltaic strings. How to clearly display the prediction effect of the model and identify the model's prediction accuracy for different strings is of great significance. In order to solve these problems, based on the photovoltaic power generation prediction method, the present invention also provides a photovoltaic power generation visualization analysis system driven by domain knowledge, which is used to help understand the behavior of the photovoltaic time series prediction model and reduce the difficulty of evaluating and analyzing the model. Figure 2 As shown, the visual analysis system provided by the embodiment includes: a data view module, a mapping view module, a detailed view module, a comparison view module and a decision tree view module.

[0073] In the embodiment, the data view module is used to provide a selection function of a deep time series prediction model and a photovoltaic power generation data set, and display the photovoltaic string information of the selected photovoltaic power generation data set, as well as the model performance of the deep time series prediction model for the photovoltaic power generation data set. Figure 3 As shown in the figure, select the deep time series prediction model and PV power generation data set you want to analyze. The bar chart in the data view shows the performance distribution of the selected deep time series prediction model. The horizontal axis represents the mean square error (MSE) between the prediction result and the actual power generation, and the vertical axis represents the number of strings within the corresponding MSE range, providing users with an intuitive overview of the model performance; then the string information list provides sorting and filtering functions to help users quickly locate the strings of interest. Each card in the string information list corresponds to a PV string. The card contains the string category, string number and radar chart, where the radar chart is used to display multi-dimensional string information. The radar chart rotates clockwise, and each dimension shows the discrete rate, average mean square error, number of power generation days, average power generation and total power generation of the inverter on the string of the deep time series prediction model. The data range of different features sets the corresponding minimum and maximum values. The data axis coordinates of the radar chart will be the maximum scale with the maximum value of the corresponding variable and drawn in proportion. The radar chart sets a unified data axis to show the differences between different string data. By clicking on the string unit, the user can further analyze the historical operation of the string in the comparison view. The background of the selected string unit will be highlighted, and the highlight is the same as the comparison view. Figure 1 Color coding.

[0074] In the embodiment, the mapping view module is used to display the distribution of photovoltaic strings in the geographic space and feature space. Figure 4As shown, the mapping view provides a map mode, which uses rectangles to truly reflect the geographical distribution of strings in the photovoltaic power station. The color coding of the strings corresponds to the clustering results, indicating different string categories. Optionally, the mapping view uses the k-means algorithm based on dynamic time warping (DTW) to cluster the photovoltaic power generation time series. DTW can accurately calculate the distance between different power generation time series, and mine the correlation between the strings based on the obtained clustering results. The clustering results are color-coded to indicate different string categories. The mapping view also provides a scatter plot mode for exploring the power generation patterns and connections of different strings. Optionally, the scatter plot mode uses the t-SNE algorithm to reduce the dimension of the time series data of photovoltaic string power generation to a two-dimensional plane and map it to a scatter plot. Each data point uniquely identifies a string. The map mode and the scatter plot mode use a unified string color coding. According to the mode switching button on the mapping view interface, users can zoom or refresh to view data details, further focus on the data, and explore the potential connections between strings from the dual perspectives of the map and the scatter plot.

[0075] In the embodiment, the detailed view module is used to display the photovoltaic power generation predicted by the deep time series prediction model or the decision tree model and the actual photovoltaic power generation, provide power generation anomaly detection and display the anomaly detection results, and display the importance of different photovoltaic strings and different time points in the model prediction to enhance the interpretability of the prediction. Figure 5 As shown in the table, each row in the detailed view list represents a string. The display order of the strings is the same as that in the data view. Figure 1 The left side of the string unit shows the string-related information and categories, and the line chart on the right shows the predicted photovoltaic power generation and the actual photovoltaic power generation, which are coded in orange and dark gray respectively, and show the string-related information and categories corresponding to each time point. Users can zoom and drag to view the photovoltaic power generation data details. At the same time, when the mouse hovers, the system will pop up annotation information (such as Figure 2 d in the figure).

[0076] The power generation of photovoltaic strings is highly volatile, so extreme deviations may occur in the deep time series prediction model or decision tree model when predicting photovoltaic power generation. These deviations may have a significant impact on the prediction performance of the model. Therefore, the power generation anomaly detection function is also provided in the detailed view and the anomaly detection results are displayed. Optionally, the unsupervised anomaly detection algorithm is implemented by referring to the 3σ criterion, and based on the anomaly threshold and deviation multiple defined by Bai, the persistent anomaly in the power generation prediction result of a single string is identified, and the time interval where the anomaly is detected is highlighted in light gray. The algorithm definition of anomaly detection is as follows:

[0077]

[0078] where r iIndicates the current power generation y of the string at time i i With the predicted value The absolute value of the difference, R = {r1, r2, ..., r n} represents a set of differences with a time step of n, u represents the mean of R, σ represents the standard deviation of R, and t is the standard deviation multiple of the abnormal deviation from the mean. The default value is 3.

[0079]

[0080] If and only if there are s or more consecutive a m is 1, A ij Represents the identified abnormal interval. The default value of s is 10.

[0081] Providing anomaly detection in the detailed view and automatically identifying and displaying anomaly detection results can assist users in exploring model inefficiencies and provide direction for subsequent troubleshooting.

[0082] The detailed view also shows the importance of different PV strings and different time points in the model prediction to enhance the interpretability of the prediction, including: based on the importance of the string, a horizontal line chart is used to show the importance of the model to different strings, and the depth of the color is used to encode the importance of the string; based on the importance of a single string on a time scale, an area chart overlapping with the predicted PV power generation series is used to show the importance of the model to different time points. In deep learning, gradients are often used to indicate the sensitivity of model output to input data and can be used for feature-level analysis. Optionally, by defining the importance of the string WS and the importance of a single string on a time scale WT, it is used to show the importance of the time series prediction model to different strings and different time points, as follows:

[0083] For a given output Y i , calculate the input sequence X i The gradient of the output W(Y i , X i ):

[0084]

[0085] The input three-dimensional structure of the time series prediction dataset is (N×T×D), where N represents the number of sequences, T represents the sequence length, and D represents the feature dimension. The dataset X consisting of N sequences is {X1, X2, ..., X N}, a single sequence X i ={x i,1 , x i,2 , ..., x i,t}, where x i,t Represents a multidimensional feature vector at time step t, and each feature is represented as That is, the power generation of string k at time step t in the sequence, The calculated gradient W(Y i , X i ) is the same dimension as X i Same, every feature The gradient of Indicates that the two correspond one to one, t∈[1, T], k∈[1, D];

[0086] The importance of string k is obtained by accumulating the power generation gradient of string k at time step t in all sequences. The string importance WS can be used to analyze the sensitivity of the model to different strings. The calculation formula is as follows:

[0087]

[0088] When calculating the importance of group k on the time scale, all gradients Mapped to the moment bucket B with a total length of Nq k ={b1, b2, ..., b N-q} and renumber them. l All the gradient values ​​of the corresponding time l are recorded. Assume that b l There are m gradient values ​​in , and the importance of group k at time l is:

[0089]

[0090] Based on the calculation of importance, users can evaluate the prediction accuracy of the time series prediction model on different groups of strings while obtaining the overall performance of the model.

[0091] In the embodiment, the comparison view module is used to display the historical time series of current and voltage of different photovoltaic strings, and to conduct in-depth comparison and exploration of the differences between the strings. Figure 6 As shown, the user selects the string to be analyzed in the detailed view. Based on the same time axis, the line chart in the comparison view synchronously displays the current time series and voltage time series of the selected PV string. Different PV strings are distinguished by color coding. Clicking the legend can highlight the current series and voltage series corresponding to the selected string. The user can zoom in on the time interval through the selection area at the bottom to explore the differences in the operating status of the strings in depth.

[0092] In the embodiment, the decision tree view module is used to visually construct a decision tree model for integrated prediction of photovoltaic power generation in combination with domain knowledge and save the structure. Figure 7As shown in the figure, the decision tree model adopts the Sankey diagram design structure. Each tree node is encoded as a rectangle. The parent node and child node are connected by edges. The width of each edge encodes the amount of data flowing from the parent node to the child node. The wider the incoming edge of a node, the more data points the node contains. The label above each parent node indicates the division rule. In order to avoid node overlap and visual confusion, the decision tree view provides a node dragging function to facilitate the layout adjustment of the decision tree view, and only displays the structure of the first 3 layers of the decision tree by default.

[0093] like Figure 7 As shown in (a) in the figure, the view is designed with a configuration panel, which provides the decision tree model parameter configuration function. By expanding or shrinking the decision tree model configuration panel through the configuration button at the top of the view, the maximum depth, branching method, and eigenvalue parameters of the decision tree can be set respectively.

[0094] When you click any node, the system will pop up a node editing window, such as Figure 7 As shown in (b), users can edit the node's partitioning attributes and boundary values, or delete the corresponding nodes for pruning. After building or modifying the decision tree, click the training button, and the system will call the modified decision tree for automatic expansion and model training. Optionally, the linear regression calculation of the decision tree model is performed based on scikit-leam to implement model training. After the training is completed, the decision tree structure will be synchronously updated to the Sankey diagram. The strip below the Sankey diagram shows the average MSE of the time series prediction model alone and the average MSE of the prediction algorithm combined with the decision tree model; the user can click the enable button in the upper right corner to view the photovoltaic power generation predicted by the decision tree model in the detailed view. In the process of exploring the decision tree model, the user can save a snapshot of the decision tree model. The content displayed in the snapshot is consistent with the decision tree model. The snapshot list is displayed at the bottom of the decision tree view. Click the model snapshot and the system will load the corresponding decision tree model.

[0095] In order to verify the effectiveness of the prediction method and visualization system of the present invention, a series of empirical experiments are conducted to predict the photovoltaic power generation based on the actual operating data of a photovoltaic power station. The total installed capacity of the photovoltaic power station is 25.2MWp, and it adopts string inverter, which consists of 8 box transformers, 102 inverters and 56,000 450Wp photovoltaic modules, and every 28 modules are connected in series to form a string. The string number follows a unified format rule, that is, "BT [box transformer number] - I [inverter number] - DC [string number]", and each string number uniquely identifies a string.

[0096] like Figure 2 As shown in Figure A, after the user selects the deep time series prediction model and photovoltaic power generation data set that he wants to analyze, the system clusters the data set and shows that the average MSE of the deep time series prediction model on the entire test set is about 148.8. Figure 2 As shown in A1, the bar chart shows the MSE distribution of the power generation prediction of a single string, indicating that the predicted MSE distribution of most strings is in the range of 0.1-0.2. Figure 2 As shown in A2, the user chooses to sort by MSE in the string information list. Through the exploration and analysis of the string information, it is found that Figure 2 The radar chart in (a) shows that the MSEs of the three strings BT004-I008-DC001, BT004-1008-DC005 and BT004-1008-DC004 are abnormally large, namely 107137.34, 73461.06 and 4483.16 respectively, and the number of power generation days is about half of the maximum power generation days.

[0097] In order to explore the reasons for the large prediction error of the deep time series prediction model, the user first compared the actual power generation series and the predicted power generation series of the three strings BT004-I008-DC005, BT004-I008-DC001 and BT004-I008-DC004 through the detailed view. Figure 2 As shown in Figure B, the overlap between the actual power generation series and the predicted power generation series of the three strings is very high, indicating that the difference between the actual power generation and the predicted power generation is small. In addition, the user noticed that the vertical coordinates of the three strings BT004-I008-DC005, BT004-I008-DC001 and BT004-I008-DC004 are 0-2000, 0-3000 and 0-800 respectively, which are significantly different from the power generation range of most strings -1 to 5 (see Figure 8 As shown in Figure 8 As shown in the figure, the anomaly detection function identifies and highlights the abnormal time interval in light gray. The user finds that the photovoltaic power generation forecast results of BT002-I1010-DC001 and BT008-1004-DC013 show abnormal spike-like fluctuations, such as Figure 8 As shown in a2 in the figure, compared with the predicted power generation of other strings (see Figure 8 There is a significant difference in a1).

[0098] like Figure 2 As shown in B2 in FIG. 1 , the user finds that the importance of different PV strings is very similar when observing the horizontal line graph in the detailed view, but there are a few strings with particularly high importance (see Figure 2 (b1) in the figure), by viewing the annotation information that pops up when the mouse is hovered (such as Figure 2, it can be concluded that the strings in the dark area are BT004-I008-DC004, BT004-I008-DC005, and BT004-I008-DC001. Users found that the string numbers with high importance coincided with the abnormal strings found in the previous analysis. This finding suggests that the model may have given higher weights to abnormal data, and abnormal data may play a more critical role in the model's decision-making process than normal data. In addition, through a detailed zoom analysis of the horizontal line graph, users also found that the feature importance of strings BT002-I010-DC001 and BT008-1004-DC013 is also higher than that of other strings (see Figure 2 (b2) and Figure 2 In (b3)), the MSEs of the strings are 1.28e -4 and 8.64e -5 Based on previous analysis experience, the user quickly screened out the string BT002-I009-DC012, which also has a high feature importance, in the data view. The feature importance of this string is 6.59e -5 , whose current and voltage patterns are similar to those of BT002-I010-DC001 and BT008-I004-DC013, further supporting the user's conjecture that the model is more sensitive to abnormal data than normal data.

[0099] To drill down further, the user highlights these three strings in the data view. Figure 2 As shown in (c) in the figure, the comparison view shows that the current data of the three strings are abnormal. According to the horizontal axis, it can be seen that the current of the three strings before February 26, 2023 is 0. Through further analysis, the user concluded that the above current data anomaly is due to the large difference in the photovoltaic power generation data of the three strings in the training set and the test set. The power generation in the data set was standardized based on the training set when it was constructed. To address this problem, the user re-standardized the data of the three strings based on the test set, and the recalculated MSE was significantly reduced. The MSE shown in the data view is 0.1464, 0.1424 and 0.1375 respectively.

[0100] In addition, the user found that there are multiple patterns in the photovoltaic power generation of the strings, so he hopes to further explore the distribution of the photovoltaic power generation data of the strings. The user randomly selected some areas in the mapping view and viewed the data of the strings with categories 0 and 3. Combined with the data view, the user found that the radar charts of strings of different categories are quite different, while the radar charts of strings under the same category have similar patterns. For example, the historical time series of current and voltage of the strings with category 3 also have the situation of no current in the first half of the operation. This shows that the clustering algorithm can better identify strings with similar power generation patterns. Based on the observation of the entire photovoltaic power station, the user found that most of the strings in the upper left corner of the photovoltaic power station belong to category 1, while most of the strings on the far right of the photovoltaic power station belong to category 2, indicating that photovoltaic strings in geographical proximity usually have similar power generation patterns.

[0101] In order to deeply understand the performance differences of the deep time series prediction model on the time scale and identify and improve the potential defects of the model, the user conducted a detailed analysis of the predicted power generation and actual power generation of the model on different strings. The user noticed that the prediction accuracy of the deep time series prediction model on different strings decreased in a specific time period. Figure 2 (e1) and Figure 2 As shown in (e2), in the two time periods of March 18-19 and March 23-25, 2023, the actual power generation of different strings simultaneously reached a trough, and the photovoltaic power generation predicted by the model also showed a large deviation. User analysis believes that this persistent and widespread low power generation phenomenon is caused by rainy weather, which shows that the deep time series prediction model still has significant room for improvement in capturing the volatility of photovoltaic power generation.

[0102] In order to further optimize the performance of the deep time series prediction model, users can build a decision tree model through the decision tree view. Figure 2 As shown in E in Figure 1, the user first selects appropriate features on the decision tree configuration panel and builds a decision tree model based on the features. Click the training button, and the system will build a decision tree data set and train the decision tree model (see Figure 2 E2 in the figure). Users can prune or modify nodes of the constructed decision tree, or after manually constructing the initial structure model of the decision tree, use the decision regression tree automatic generation algorithm based on scikit-learn to expand the decision tree model. Fig. 9 As shown in the figure, the upper part is three decision tree models built using the decision tree view, as shown in Fig. 9 a1 in Fig. 9 b1 and Fig. 9 As shown in c1 in the figure, the lower part is a detailed view of the prediction results of the photovoltaic power generation of the string based on the decision tree model, as shown in Fig. 9 a2 in Fig. 9 b2 and Fig. 9 As shown in c2 in . It can be seen from the results that compared with the deep time series prediction model, the photovoltaic power generation prediction method combining the deep time series prediction model and the decision tree model has been significantly optimized.

[0103] By comparing with the existing methods, it is found that the photovoltaic power generation prediction method constructed by the present invention is based on the current photovoltaic power generation and covariates as sample data, and integrates prediction by constructing a deep time series prediction model and a decision tree model, thereby enhancing the adaptability and reliability of the model, and can effectively cope with the prediction scenarios of the real photovoltaic power plant dynamics; the photovoltaic power generation visualization analysis system driven by domain knowledge supports the application of domain knowledge to model optimization and intuitively displays the performance of the prediction model, supports automatic identification of abnormal time series in the process of model prediction, can intuitively understand the prediction process and provide multi-angle perspectives to evaluate model performance, so as to interactively construct a prediction model and improve the prediction efficiency and accuracy of photovoltaic power generation.

[0104] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A photovoltaic power generation prediction method, characterized in that: The following steps are involved: Build and train a deep time series prediction model based on the historical power generation data of photovoltaic strings; Based on the photovoltaic power generation and covariates predicted by the trained deep time series prediction model, a decision tree model is constructed and trained; The trained decision tree model is used to perform integrated prediction of photovoltaic power generation based on the current photovoltaic power generation and covariates predicted by the deep time series prediction model to obtain the final photovoltaic power generation.

2. The photovoltaic power generation prediction method according to claim 1, characterized in that: The construction and training of the deep time series prediction model based on the historical power generation data of photovoltaic strings includes: (1) Based on the historical power generation data of photovoltaic strings, the sliding window method is used to construct deep time series sample data; (2) Based on the iTransformer model, a deep time series prediction model for predicting photovoltaic power generation is constructed, and the deep time series prediction model is trained using deep time series sample data and a loss function constructed using mean square error.

3. The photovoltaic power generation prediction method according to claim 1, characterized in that: The photovoltaic power generation and covariates predicted by the trained deep time series prediction model are used to construct and train a decision tree model, including: (1) Randomly sample the photovoltaic power generation predicted by the trained deep time series prediction model to obtain sample data. The time characteristics and environmental characteristics of each sample at the corresponding time point are used as covariates together with the sample data as input, and the corresponding actual power generation is used as output to generate a decision tree data set; (2) The root node of the decision tree contains all the samples in the decision tree data set. Decision tree partitioning is recursively performed starting from the root node to train the decision tree model.

4. A photovoltaic power generation visualization analysis system driven by domain knowledge, characterized in that: The system uses the photovoltaic power generation prediction method according to any one of claims 1 to 3 in visual analysis, and the visual analysis system comprises: a data view module, a mapping view module, a detailed view module, a comparison view module and a decision tree view module; The data view module is used to provide a selection function of a deep time series prediction model and a photovoltaic power generation data set, and display the photovoltaic string information of the selected photovoltaic power generation data set, and the model performance of the model deep time series prediction model for reasoning the photovoltaic power generation data set; The mapping view module is used to display the distribution status of photovoltaic strings in geographic space and feature space; The detailed view module is used to display the photovoltaic power generation predicted by the deep time series prediction model or the decision tree model and the actual photovoltaic power generation, provide power generation anomaly detection and display the anomaly detection results, and display the importance of different photovoltaic strings and different time points in the model prediction to enhance the interpretability of the prediction; The comparison view module is used for historical time series of current and voltage of different photovoltaic strings, and makes in-depth comparisons to explore the differences between strings; The decision tree view module is used to visually construct a decision tree model for integrated prediction of photovoltaic power generation in combination with domain knowledge and to save the structure.

5. The photovoltaic power generation visualization analysis system according to claim 4, characterized in that: The photovoltaic string information of the selected photovoltaic power generation data set is displayed, including: Filtering and sorting functions are provided to quickly locate and display PV strings. Each card in the displayed PV string information list corresponds to a PV string. The card contains the string category, string number and radar chart. The radar chart is used to display multi-dimensional string information and the differences between different string data.

6. The photovoltaic power generation visualization analysis system according to claim 4, characterized in that: The display of the distribution of photovoltaic strings in geographic space and feature space includes: Provides map mode and scatter plot mode. The map mode truly reflects the geographical distribution of strings in the PV power station, and the scatter plot mode is used to explore the power generation patterns and potential connections of different strings. Specifically, the time series data of PV string power generation is reduced to a two-dimensional plane and mapped to a scatter plot. Each data point uniquely identifies a string. Use unified string color coding for map mode and scatter plot mode. Switch, zoom or refresh the provided modes to view the details of PV power generation data and explore potential connections between strings.

7. The photovoltaic power generation visualization analysis system according to claim 4, characterized in that: The display of predicted photovoltaic power generation and actual photovoltaic power generation includes: displaying predicted photovoltaic power generation and actual photovoltaic power generation through a line chart, and displaying the string-related information and category corresponding to each time point, and viewing photovoltaic power generation data details through zooming, dragging and hovering; The providing of power generation anomaly detection and displaying of anomaly detection results includes: implementing an unsupervised anomaly detection algorithm by referring to the 3σ criterion, and identifying persistent anomalies in the predicted photovoltaic power generation of a single string based on a custom anomaly threshold and deviation multiple; The display model predicts the importance of different photovoltaic strings and different time points to enhance the interpretability of the prediction, including: based on the string importance WS and displaying the model's importance of different strings through a horizontal line graph, based on the importance of a single string on a time scale WT and displaying the model's importance of different time points through an area graph overlapping with the predicted photovoltaic power generation series.

8. The photovoltaic power generation visualization analysis system according to claim 4, characterized in that: The above shows the historical time series of current and voltage of different PV strings, and conducts in-depth comparison to explore the differences between strings, including: Based on the same time axis, the current time series and voltage time series of the selected PV strings are displayed synchronously through line graphs. By selecting the zoomed-in time interval, the differences in the operating status of the PV strings can be explored.

9. The photovoltaic power generation visualization analysis system according to claim 4, characterized in that: The decision tree model for integrated prediction of photovoltaic power generation is constructed by combining domain knowledge visualization and preserving the structure, including: The decision tree adopts the Sankey diagram design structure. Each tree node is encoded as a rectangle. The nodes are connected by edges. The width of the rectangle represents the amount of data, and the division rules are displayed above the parent node. The decision tree structure is visually modified to build a decision tree model. The linear regression calculation of the decision tree model is performed based on scikit-learn to implement model training and save the trained model structure.

Citation Information

Patent Citations

  • Generating capacity prediction method and device based on time sequence prediction and hybrid neural network

    CN118232332A

  • Ultra-short-term photovoltaic power combined prediction method based on similar daily clustering and multi-source data

    CN117613894A

  • Short-term photovoltaic power prediction method based on deep learning

    CN117669391A

  • Photovoltaic power interval prediction method and device based on multivariate data feature enhancement

    CN117688362A

  • Photovoltaic power generation power / quantity prediction method and device based on regression and time sequence fusion

    CN117708716A

Cited By

  • Photovoltaic generating capacity prediction method and system applied to photovoltaic power station

    CN120782290A