Small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network

Through the combination of instance transfer learning and hybrid neural network, the problem of insufficient accuracy in small sample photovoltaic power generation prediction is solved, high-precision prediction under small sample conditions is achieved, and the generalization ability of the model is enhanced.

CN119476551APending Publication Date: 2025-02-18GUANGDONG YUDEAN HUADU NATURAL GAS THERMAL POWER CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Under the conditions of small sample data, traditional photovoltaic power generation prediction methods are difficult to capture complex patterns, resulting in insufficient prediction accuracy, especially when data collection costs are high and periods are long.

Method used

Using a small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network, we can select source domains similar to the target domain, filter instances in the source domain, migrate their knowledge, and build a hybrid neural network prediction model that integrates LSTM and QRF. , dynamically adjust the weights to achieve the optimal comprehensive prediction effect.

Benefits of technology

It improves the prediction accuracy of the model, enhances the generalization ability of the model, and can achieve accurate photovoltaic power generation prediction in small samples, improving the reliability of the prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476551A_ABST
    Figure CN119476551A_ABST
Patent Text Reader

Abstract

The invention discloses a small sample photovoltaic prediction method based on instance transfer learning and a hybrid neural network, and the method comprises the steps: selecting a source domain instance similar to a target domain based on the instance transfer learning for training a model, and then migrating the model to a target task. Meanwhile, an efficient hybrid neural network prediction model is constructed, the model fuses the advantages of a long short-term memory network (LSTM) algorithm and a quantile forest regression (QRF) algorithm, through a parallel training strategy, the LSTM is responsible for mining a deep mode in time sequence data, and the QRF focuses on probability distribution of prediction results. The innovation of the model lies in that a weighted network is introduced, the weight is dynamically adjusted according to the prediction performance of the LSTM and the QRF so as to realize the optimal comprehensive prediction effect, and finally, the trained hybrid neural network prediction model is used for photovoltaic prediction, and the reliability is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power photovoltaic output prediction, and in particular to a small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network. Background Art

[0002] Accurate prediction of photovoltaic power generation is crucial for the stable operation of the power grid and energy management. However, under the condition of small sample data, traditional prediction methods often have difficulty in capturing the complex patterns of photovoltaic power generation, resulting in insufficient prediction accuracy.

[0003] At present, photovoltaic prediction methods mainly include physical models, statistical models and machine learning methods. Physical models rely on meteorological data and the physical parameters of photovoltaic systems, but it is difficult to accurately model with small samples. Statistical models, such as ARIMA, although they do not require a large amount of data, may not be able to fully capture nonlinear characteristics. Machine learning methods, especially deep learning, although they perform well under large sample conditions, are prone to overfitting under small sample conditions. The small sample problem limits the improvement of the model's generalization ability, especially in the field of photovoltaic power generation prediction, where data collection is costly and time-consuming, and it is difficult to obtain sufficient training samples. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects of traditional photovoltaic prediction methods in small sample conditions, and provide a small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network. By selecting a source domain similar to the target domain and screening instances in the source domain, its knowledge is transferred to improve the prediction accuracy of the model. At the same time, an efficient hybrid neural network prediction model is constructed to achieve the optimal comprehensive prediction effect.

[0005] To achieve the above object, the technical solution provided by the present invention is: a small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network, comprising the following steps: S1: Select multiple PV power stations with complete data, and use their historical PV power data, historical irradiance, meteorological data and time information as multi-source domains. Collect small sample PV data of the target PV power station, including PV power data, irradiance, meteorological data and time information, and use it as the target domain. S2: The MK-MMD method is used to measure the similarity between the data distribution of the multi-source domain and the target domain. The MK-MMD mean between the multi-source domain and the target domain is calculated respectively. The source domain with the most similar data distribution to the target domain, i.e., the source domain with the smallest MK-MMD mean, is selected from the multi-source domain as the migration source domain. S3: Use the KNN algorithm to perform cross-validation optimization on the K value to ensure that the best K value is selected. Then, for each data point in the target domain, calculate the Euclidean distance between it and all data points in the migration source domain. Finally, select the K nearest neighbor instances in the migration source domain to form an instance data set. S4: Build a hybrid neural network prediction model that combines the advantages of the long short-term memory network LSTM and the quantile forest regression QRF algorithm. Through the parallel training strategy, LSTM is responsible for mining the deep patterns in the time series data, while QRF focuses on the probability distribution of the prediction results. The innovation of this model lies in the introduction of a weighted network, which dynamically adjusts the weights according to the prediction performance of LSTM and QRF to achieve the best comprehensive prediction effect. Finally, the hybrid neural network prediction model is trained using an example data set, and the trained model can be used for accurate small-sample photovoltaic prediction.

[0006] Further, the step S2 comprises the following steps: S21: input the datasets of multiple source domains and target domains, and ensure that the datasets contain historical data of photovoltaic power generation, including photovoltaic power data, historical irradiance, meteorological data and time information; S22: Preprocess the input data set, including data cleaning, i.e., removing outliers and missing values, and normalization to ensure that the data is on the same scale for subsequent processing; S23: Segment the long-period source domain data according to the time dimension to obtain a series of subsequences with the same length as the short-term photovoltaic data of the target domain to ensure the consistency of the time series; S24: Calculate the MK-MMD mean between all PV subsequences of each source domain and the PV sequence of the target domain as the similarity between the source domain and the target domain, where MK-MMD is obtained by mapping function Source domain data and target domain data Map them to the reproducible kernel Hilbert space respectively, then find the expected difference between the two and get the average difference value. The upper bound of the difference value is the MK-MMD value. ; Where: is the MK-MMD value; is the function domain; is the data distribution of the source domain; is the data distribution of the target domain; For the upper bound; is the expected data distribution of the source domain, is the expected data distribution of the target domain; S25: Select the source domain with the most similar data distribution to the target domain as the migration source domain, that is, the source domain with the smallest MK-MMD value, to improve the effect of transfer learning.

[0007] Further, the step S3 comprises the following steps: S31: Represent the data points in the source domain and target domain datasets as feature vectors, map their high-dimensional information, and normalize the feature vectors to ensure the consistency of the model input; S32: determining a candidate range of a K value according to the size and feature dimension of the data set, where the K value represents the number of nearest neighbors considered in the K nearest neighbor algorithm; S33: Perform K-fold cross validation on the dataset, dividing the dataset into K subsets. In each iteration, one subset is used as the validation set, and the remaining K-1 subsets are combined as the training set. This process is repeated K times, and the precision recall rate and F1 score are comprehensively considered to evaluate the performance of different K values. S34: Select a best performing K value according to the performance graph and the performance index to optimize the prediction performance of the model; S34: For each data point in the target domain, calculate the Euclidean distance between it and all data points in the source domain: ; In the formula, is the Euclidean distance, is the data point in the target domain The coordinate values ​​in the dimension, is the data point in the source domain The coordinate values ​​in the dimension, It is the dimension of space.

[0008] S35: For each data point in the target domain, select the K data points in the source domain that are closest to it, and use all the selected data points in the source domain as instance data sets.

[0009] Further, the step S4 comprises the following steps: S41: Construct an input layer for the model to receive input data. The number of nodes in the input layer should match the number of features in the instance dataset. S42: Build LSTM to capture long-term dependencies in time series data. It consists of multiple LSTM layers, each containing a preset number of hidden units, and uses a gating mechanism to maintain and update the internal state. S43: Construct QRF, which is a regression model based on random forests. It can predict the probability distribution of photovoltaic output between different possible values, select the output with the highest probability, and improve the stability of the prediction by constructing multiple decision trees and taking the average of the prediction results of all decision trees; S44: Construct a weighted network. The weighted network is the core of the hybrid neural network prediction model. It is responsible for merging the prediction outputs of LSTM and QRF into a comprehensive prediction result. The weights are not statically assigned, but dynamically adjusted according to the performance of each model on the instance data set. Bayesian optimization is used to determine the optimal weight assignment. First, the objective function is defined. The objective function takes the prediction results and weights of LSTM and QRF as input. The output is calculated as: ; Where: is the total number of samples in the instance dataset; and They are The actual and predicted values ​​at the time. is the average absolute deviation of the prediction results; Then select the prior distribution for the weights, use the Gaussian process as the posterior distribution, select the acquisition function UCB to balance exploration and utilization, guide the selection of weights, and finally, through an iterative process, continuously update the Gaussian process model and adjust the weights until the weight combination that minimizes the prediction error is found.

[0010] Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. The present invention adopts instance-based transfer learning technology to provide a small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network. By selecting a source domain similar to the target domain and screening instances in the source domain, its knowledge is transferred to improve the prediction accuracy of the model and enhance the generalization ability of the model. It can well solve the problem of inaccurate model prediction in small sample cases.

[0011] 2. The present invention constructs an efficient hybrid neural network prediction model for prediction, which combines the advantages of the long short-term memory network (LSTM) and the quantile forest regression (QRF) algorithm. Through the parallel training strategy, LSTM is responsible for mining the deep patterns in the time series data, while QRF focuses on the probability distribution of the prediction results. The innovation of the model lies in the introduction of a weighted network, which dynamically adjusts the weights according to the prediction performance of LSTM and QRF to achieve the best comprehensive prediction effect. Finally, the trained hybrid neural network prediction model can be used to perform accurate small sample photovoltaic prediction, which is highly reliable and worthy of promotion. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 This is a transfer learning framework diagram of a small sample photovoltaic output prediction example of the present invention.

[0013] Figure 2 It is a flow chart for screening the migration source domain.

[0014] Figure 3 It is the architecture diagram of the hybrid neural network prediction model. DETAILED DESCRIPTION

[0015] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0016] like Figures 1 to 3 As shown, this embodiment discloses a small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network, comprising the following steps: S1: Select multiple PV power stations with complete data, and use their historical PV power data, historical irradiance, meteorological data and time information as multi-source domains. Collect small sample PV data of the target PV power station, including PV power data, irradiance, meteorological data and time information, and use it as the target domain. S2: The MK-MMD method is used to measure the similarity between the data distribution of the multi-source domain and the target domain. The MK-MMD mean between the multi-source domain and the target domain is calculated respectively. The source domain with the most similar data distribution to the target domain, i.e., the source domain with the smallest MK-MMD mean, is selected from the multi-source domain as the migration source domain, including the following steps: S21: input the datasets of multiple source domains and target domains, and ensure that the datasets contain historical data of photovoltaic power generation, including photovoltaic power data, historical irradiance, meteorological data and time information; S22: Preprocess the input data set, including data cleaning, i.e., removing outliers and missing values, and normalization to ensure that the data is on the same scale for subsequent processing; S23: Segment the long-period source domain data according to the time dimension to obtain a series of subsequences with the same length as the short-term photovoltaic data of the target domain to ensure the consistency of the time series; S24: Calculate the MK-MMD mean between all PV subsequences of each source domain and the PV sequence of the target domain as the similarity between the source domain and the target domain, where MK-MMD is obtained by mapping function Source domain data and target domain data Map them to the reproducible kernel Hilbert space respectively, then find the expected difference between the two and get the average difference value. The upper bound of the difference value is the MK-MMD value. ; Where: is the MK-MMD value; is the function domain; is the data distribution of the source domain; is the data distribution of the target domain; For the upper bound; is the expected data distribution of the source domain, is the expected data distribution of the target domain; S25: Select the source domain with the most similar data distribution to the target domain as the migration source domain, that is, the source domain with the smallest MK-MMD value, to improve the effect of transfer learning.

[0017] S3: Use the KNN algorithm to perform cross-validation optimization on the K value to ensure that the best K value is selected. Then, for each data point in the target domain, calculate the Euclidean distance between it and all data points in the migration source domain. Finally, select the K nearest neighbor instances in the migration source domain to form an instance data set, including the following steps: S31: Represent the data points in the source domain and target domain datasets as feature vectors, map their high-dimensional information, and normalize the feature vectors to ensure the consistency of the model input; S32: determining a candidate range of a K value according to the size and feature dimension of the data set, where the K value represents the number of nearest neighbors considered in the K nearest neighbor algorithm; S33: Perform K-fold cross validation on the dataset, dividing the dataset into K subsets. In each iteration, one subset is used as the validation set, and the remaining K-1 subsets are combined as the training set. This process is repeated K times, and the precision recall rate and F1 score are comprehensively considered to evaluate the performance of different K values. S34: Select a best performing K value according to the performance graph and the performance index to optimize the prediction performance of the model; S34: For each data point in the target domain, calculate the Euclidean distance between it and all data points in the source domain: ; In the formula, is the Euclidean distance, is the data point in the target domain The coordinate values ​​in the dimension, is the data point in the source domain The coordinate values ​​in the dimension, It is the dimension of space.

[0018] S35: For each data point in the target domain, select the K data points in the source domain that are closest to it, and use all the selected data points in the source domain as instance data sets.

[0019] S4: Build a hybrid neural network prediction model, which combines the advantages of the long short-term memory network LSTM and the quantile forest regression QRF algorithm. Through the parallel training strategy, LSTM is responsible for mining the deep patterns in the time series data, while QRF focuses on the probability distribution of the prediction results. The innovation of this model is the introduction of a weighted network, which dynamically adjusts the weights according to the prediction performance of LSTM and QRF to achieve the best comprehensive prediction effect. Finally, the hybrid neural network prediction model is trained using an example data set, and the trained model can be used for accurate small sample photovoltaic prediction. The construction of the hybrid neural network prediction model includes the following steps: S41: Construct an input layer for the model to receive input data. The number of nodes in the input layer should match the number of features in the instance dataset. S42: Build LSTM to capture long-term dependencies in time series data. It consists of multiple LSTM layers, each of which contains a preset number of hidden units and maintains and updates the internal state through a gating mechanism (input gate, forget gate, output gate); S43: Construct QRF, which is a regression model based on random forests. It can predict the probability distribution of photovoltaic output between different possible values, select the output with the highest probability, and improve the stability of the prediction by constructing multiple decision trees and taking the average of the prediction results of all decision trees; S44: Construct a weighted network. The weighted network is the core of the hybrid neural network prediction model. It is responsible for merging the prediction outputs of LSTM and QRF into a comprehensive prediction result. The weights are not statically assigned, but dynamically adjusted according to the performance of each model on the instance data set. Bayesian optimization is used to determine the optimal weight assignment. First, the objective function is defined. The objective function takes the prediction results and weights of LSTM and QRF as input. The output is calculated as: ; Where: is the total number of samples in the instance dataset; and They are The actual and predicted values ​​at the time. is the average absolute deviation of the prediction results; Then select a prior distribution for the weights, use the Gaussian process as the posterior distribution, and select the acquisition function UCB (UpperConfidence Bound) to balance exploration and utilization and guide the selection of weights. Finally, through an iterative process, continuously update the Gaussian process model and adjust the weights until the weight combination that minimizes the prediction error is found.

[0020] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network, characterized in that: The following steps are involved: S1: Select multiple PV power stations with complete data, and use their historical PV power data, historical irradiance, meteorological data and time information as multi-source domains. Collect small sample PV data of the target PV power station, including PV power data, irradiance, meteorological data and time information, and use it as the target domain. S2: The MK-MMD method is used to measure the similarity between the data distribution of the multi-source domain and the target domain. The MK-MMD mean between the multi-source domain and the target domain is calculated respectively. The source domain with the most similar data distribution to the target domain, i.e., the source domain with the smallest MK-MMD mean, is selected from the multi-source domain as the migration source domain. S3: Use the KNN algorithm to perform cross-validation optimization on the K value to ensure that the best K value is selected. Then, for each data point in the target domain, calculate the Euclidean distance between it and all data points in the migration source domain. Finally, select the K nearest neighbor instances in the migration source domain to form an instance data set. S4: Build a hybrid neural network prediction model that combines the advantages of the long short-term memory network LSTM and the quantile forest regression QRF algorithm. Through the parallel training strategy, LSTM is responsible for mining the deep patterns in the time series data, while QRF focuses on the probability distribution of the prediction results. The innovation of this model lies in the introduction of a weighted network, which dynamically adjusts the weights according to the prediction performance of LSTM and QRF to achieve the best comprehensive prediction effect. Finally, the hybrid neural network prediction model is trained using an example data set, and the trained model can be used for accurate small-sample photovoltaic prediction.

2. The small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network according to claim 1 is characterized in that: The step S2 comprises the following steps: S21: input the datasets of multiple source domains and target domains, and ensure that the datasets contain historical data of photovoltaic power generation, including photovoltaic power data, historical irradiance, meteorological data and time information; S22: Preprocess the input data set, including data cleaning, i.e., removing outliers and missing values, and normalization to ensure that the data is on the same scale for subsequent processing; S23: Segment the long-period source domain data according to the time dimension to obtain a series of subsequences with the same length as the short-term photovoltaic data of the target domain to ensure the consistency of the time series; S24: Calculate the MK-MMD mean between all PV subsequences of each source domain and the PV sequence of the target domain as the similarity between the source domain and the target domain, where MK-MMD is obtained by mapping function Source domain data and target domain data Map them to the reproducible kernel Hilbert space respectively, then find the expected difference between the two and get the average difference value. The upper bound of the difference value is the MK-MMD value. ; Where: is the MK-MMD value; is the function domain; is the data distribution of the source domain; is the data distribution of the target domain; is the upper bound; is the expected data distribution of the source domain, is the expected data distribution of the target domain; S25: Select the source domain with the most similar data distribution to the target domain as the migration source domain, that is, the source domain with the smallest MK-MMD value, to improve the effect of transfer learning.

3. The small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network according to claim 1 is characterized in that: The step S3 comprises the following steps: S31: Represent the data points in the source domain and target domain datasets as feature vectors, map their high-dimensional information, and normalize the feature vectors to ensure the consistency of the model input; S32: determining a candidate range of a K value according to the size and feature dimension of the data set, where the K value represents the number of nearest neighbors considered in the K nearest neighbor algorithm; S33: Perform K-fold cross validation on the dataset, dividing the dataset into K subsets. In each iteration, one subset is used as the validation set, and the remaining K-1 subsets are combined as the training set. This process is repeated K times, and the precision recall rate and F1 score are comprehensively considered to evaluate the performance of different K values. S34: Select a best performing K value according to the performance graph and the performance index to optimize the prediction performance of the model; S34: For each data point in the target domain, calculate the Euclidean distance between it and all data points in the source domain: ; In the formula, is the Euclidean distance, is the data point in the target domain The coordinate values ​​in the dimension, is the data point in the source domain The coordinate values ​​in the dimension, It is the dimension of space; S35: For each data point in the target domain, select the K data points in the source domain that are closest to it, and use all the selected data points in the source domain as instance data sets.

4. The small sample photovoltaic prediction method based on instance transfer learning and hybrid neural network according to claim 1 is characterized in that: The step S4 comprises the following steps: S41: Construct an input layer for the model to receive input data. The number of nodes in the input layer should match the number of features in the instance dataset. S42: Build LSTM to capture long-term dependencies in time series data. It consists of multiple LSTM layers, each containing a preset number of hidden units, and uses a gating mechanism to maintain and update the internal state. S43: Construct QRF, which is a regression model based on random forests. It can predict the probability distribution of photovoltaic output between different possible values, select the output with the highest probability, and improve the stability of the prediction by constructing multiple decision trees and taking the average of the prediction results of all decision trees; S44: Construct a weighted network. The weighted network is the core of the hybrid neural network prediction model. It is responsible for merging the prediction outputs of LSTM and QRF into a comprehensive prediction result. The weights are not statically assigned, but dynamically adjusted according to the performance of each model on the instance data set. Bayesian optimization is used to determine the optimal weight assignment. First, the objective function is defined. The objective function takes the prediction results and weights of LSTM and QRF as input. The output is calculated as: ; Where: is the total number of samples in the instance dataset; and They are The actual and predicted values ​​at the time. is the average absolute deviation of the prediction results; Then select the prior distribution for the weights, use the Gaussian process as the posterior distribution, select the acquisition function UCB to balance exploration and utilization, guide the selection of weights, and finally, through an iterative process, continuously update the Gaussian process model and adjust the weights until the weight combination that minimizes the prediction error is found.

Citation Information

Cited By

  • Thermal power generating unit control parameter optimization method based on artificial intelligence

    CN120178754A