Machine learning irradiance prediction method based on error compensation framework

Through the error compensation framework, the model is dynamically updated with error information, and the error problem of machine learning models in irradiance prediction is solved, achieving higher prediction accuracy.

CN115409250BActive Publication Date: 2025-08-26SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210989917.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2025-08-26
Estimated Expiration
2042-08-17

AI Technical Summary

Technical Problem

Machine learning models are difficult to completely eliminate errors when predicting irradiance, resulting in inevitable error components in the prediction results, affecting the prediction accuracy.

Method used

The error compensation framework is adopted to dynamically update the model using error information without changing the structure of the machine learning model to reduce prediction errors.

Benefits of technology

It effectively reduces irradiance prediction error and improves prediction accuracy, and is suitable for various machine learning prediction models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115409250B_ABST
    Figure CN115409250B_ABST
Patent Text Reader

Abstract

The present invention relates to a machine learning irradiance prediction method based on an error compensation framework, and belongs to the technical field of photovoltaic power generation. The prediction method includes: S1, training data acquisition, obtaining historical irradiance data of the target area and its corresponding meteorological data; S2, data preprocessing, including meteorological information feature encoding and data normalization; S3, obtaining the irradiance prediction error of the current machine model from time T-K to T, without updating the model in this process; fusing the prediction error sequence from time T-K to T with the external meteorological data sequence, and using it to update the model; S4, prediction, inputting the historical irradiance and meteorological data into the error compensation framework, and utilizing the compensation mechanism of the framework to reduce the prediction error while predicting the irradiance. Through the end-to-end error compensation framework of the present invention, the model error information can be used to dynamically update the machine learning model, reduce the prediction error of the irradiance without changing the model structure, and improve the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a machine learning irradiance prediction technology based on an error compensation framework, and belongs to the technical field of photovoltaic power generation. Background Art

[0002] Solar energy is the most promising renewable energy resource. A survey by the International Renewable Energy Agency shows that as of 2020, 29% of global electricity production came from renewable energy sources, with solar energy accounting for 26.77% of this share, a figure that continues to rise annually. However, photovoltaic power generation exhibits considerable instability due to the uncertainty and intermittency of irradiance. This complicates grid connection and scheduling, hindering the widespread application of solar energy resources.

[0003] Currently, machine learning methods, such as support vector machines, random forests, long short-term memory networks, and convolutional neural networks, are widely used for solar irradiance prediction. However, machine learning methods approximate the true distribution and cannot fully reflect the mapping relationship between irradiance predictions and historical data. Using machine learning models to predict irradiance inevitably introduces errors during the approximation process. Therefore, reducing the prediction error of machine learning models and improving irradiance prediction accuracy has long been a challenge for researchers. Summary of the Invention

[0004] Technical issues:

[0005] The technical problem to be solved by the present invention is that the irradiance predicted by the machine learning model is an approximation of the true distribution, and the machine learning model will inevitably produce errors in the approximation process. This error is difficult to eliminate under the machine learning model, resulting in the presence of predictable components in the prediction results.

[0006] In order to solve the above technical problems, the present invention provides a machine learning irradiance prediction method based on an error compensation framework. Through the error compensation framework, without changing the structure of the machine learning model, the error information is effectively utilized, the model is dynamically updated based on the error information, and the prediction effect is improved.

[0007] Technical solution:

[0008] The present invention provides a machine learning irradiance prediction method based on an error compensation framework, the method comprising the following steps:

[0009] S1, training data acquisition, obtain the historical irradiance data of the target area and its corresponding meteorological data, and make a supervision dataset according to the prediction task;

[0010] S2, data preprocessing, including meteorological information feature encoding and data normalization;

[0011] S3, updates the machine learning model based on the error compensation framework;

[0012] S4, prediction, inputs the historical data into the error compensation framework in step S3 and the trained machine learning model to predict the solar irradiance for multiple steps in the future.

[0013] Furthermore, step S1 includes the following contents:

[0014] (1.1) Obtain historical irradiance data and corresponding meteorological data (including but not limited to temperature, humidity, air pressure, wind speed, etc.) of the target area;

[0015] (1.2) If a segment of historical data is missing or illegal, it is replaced by the mean of the adjacent data before and after to ensure the continuity and authenticity of the data and thus guarantee the quality of the training data;

[0016] (1.3) Matching supervision information is used to make supervision data sets by reading the current period t0~t N The irradiance of the image is used as supervision information, and the historical irradiance and corresponding meteorological information are matched as input information to produce a supervision dataset.

[0017] Furthermore, the step S2 specifically includes the following contents:

[0018] (2.1) Encode the meteorological information corresponding to the irradiance, use one-hot encoding to encode the weather type, and use the value itself as the encoding value for numerical information;

[0019] (2.2) To ensure that the model gradient changes reasonably during training, the input data needs to be normalized. The normalization formula is as follows:

[0020]

[0021] Among them, a represents the feature in the data set, a′ represents the normalized feature value, and a max and a min Respectively represent the maximum and minimum values ​​of the feature in the historical data.

[0022] Furthermore, step S3 specifically includes the following contents:

[0023] (3.1) Obtain the irradiance prediction error of the current machine learning model from time TK to T. The model is not updated during this process.

[0024] (3.2) The prediction error from time TK to T is fused with external meteorological data and historical irradiance data, and used to update the machine learning model.

[0025] In addition, the error compensation framework is characterized as follows:

[0026] (4.1) This framework is an end-to-end solar irradiance prediction framework. After inputting historical irradiance and historical meteorological data, the framework can automatically run and output multi-step prediction results. At the same time, the error information is automatically utilized within the framework without any additional operations.

[0027] (4.2) Error acquisition phase: The framework only uses the machine learning model to obtain error information, and this process does not update the model parameters; the error compensation phase uses the error information to dynamically update the model;

[0028] (4.3) This framework can effectively reduce the irradiance prediction error without changing the structure of the machine learning model;

[0029] (4.4) This framework is a universal paradigm that is applicable to different machine learning prediction models. It can effectively utilize error information for different machine learning prediction models and dynamically update the model based on the error information.

[0030] Furthermore, the detailed steps of the error compensation framework in step S3 are as follows:

[0031] (1) Sliding window to obtain subsequence:

[0032] The framework first receives the data from time T-2K to time T-1 as input, and divides it into K subsequences in the form of a sliding window starting from time T-2K, with a sliding step of 1;

[0033] The K subsequences are {(I T-2k ,…,I T-K-1 ),…,(I t-K+1 ,…,I t ),…,(I T-K-1 ,…,I T-2 )}, where I t represents the solar irradiance at time t;

[0034] (2) Scroll to get error information:

[0035] For the subsequence (I t-K ,…,I t-1 ), and its corresponding external meteorological information is (M t-K ,…,M t-1 ), the input of the machine learning model under the current parameters is {(I t-K ,…,I t-1 ),(M t-K ,…,M t-1 )}, and its predicted value is The corresponding supervision information can be expressed as (I t ,…,It+N ), where N represents the prediction step size; based on the predicted value and supervision information, the prediction error E of the model at the current moment can be obtained t =[e t ,…,e t+N ];

[0036] The above K subsequences are input cyclically, and the prediction error of the machine learning model under the current parameters at the current moment is obtained through supervision information; this cyclic process can obtain the error sequence (E T-K ,…,E T-1 );

[0037] Moreover, this process does not update the model parameters;

[0038] (3) Information fusion:

[0039] In this stage, the error sequence (E T-K ,…,E T-1 ) is fused with historical irradiance and meteorological data to obtain a new feature input {(E T-K ,…,E T-1 ),(I T-K ,…,I T-1 ),(M T-K ,…,M T-1 )}, and its supervision information is (I T ,…,I T+N );

[0040] The input features after information fusion add the prediction error information of the current model for the corresponding moment in history. This information is determined by the internal prediction mechanism of the model and fed back to the machine learning model.

[0041] (4) Update the model:

[0042] Update the model parameters using the input features and supervision information from step (3).

[0043] Beneficial effects:

[0044] The error compensation framework of the present invention can effectively reduce the irradiance prediction error by utilizing the prediction error of the model under the current parameters for the historical adjacent moments as an additional input feature without changing the structure of the machine learning model. In addition, the error compensation framework of the present invention is a universal paradigm. The framework can be used for different types of machine learning prediction models. For different machine learning prediction models, it can effectively utilize error information and dynamically update the model based on the error information. In addition, the framework only completes irradiance prediction and error compensation simultaneously through an end-to-end structure. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1A flowchart of irradiance prediction according to the present invention;

[0046] Figure 2 is a schematic diagram of an error compensation framework of the present invention;

[0047] Figure 3 This is the internal structure diagram of LSTM in the present invention;

[0048] Figure 4 A schematic diagram of the network structure of the machine learning model used in the present invention;

[0049] Figure 5 Schematic diagram of the results of the present invention. DETAILED DESCRIPTION

[0050] In order to more clearly illustrate the technical solution of the present invention, the present invention is described below in conjunction with the accompanying drawings. The examples given are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0051] Example 1

[0052] refer to Figure 1 , a machine learning irradiance prediction method based on an error compensation framework, comprising the following steps:

[0053] S1, training data acquisition, obtains historical irradiance data of the target area and its corresponding meteorological data and creates a supervision dataset. Furthermore, S1 includes the following contents:

[0054] (1.1) Obtain historical irradiance data of the target area and its corresponding meteorological data. In this embodiment, temperature T, humidity H, air pressure P, wind speed W, etc. are selected as meteorological data;

[0055] (1.2) If a segment of historical data is missing or illegal, it is replaced by the mean of the adjacent data before and after to ensure the continuity and authenticity of the data and thus guarantee the quality of the training data;

[0056] (1.3) Match the supervision information to make the supervision data set, by reading the current period t0~t N Irradiance x0~x N As the supervision information of multi-step prediction, the historical irradiance and the corresponding meteorological information are matched as input information to produce a supervision data set; specifically, the historical irradiance information of the K moments before the current moment T and the historical information of meteorological data are selected as the input of the model to predict the irradiance at the next N+1 moments. The input data of the prediction model data set can be expressed as follows: {(I T-K ,…,I T-1 ),(T T-K ,…,T T-1 ),(W T-K ,…,WT-1 ),(P T-K ,…,P T-1 ),(H T-K ,…,H T-1 )}, the supervision information of the dataset can be expressed as (I0,…,I N ), where [I T-t ,T T-t ,W T-t ,P T-t ,H T-t ] represents the irradiance and meteorological information of the t moments before the current moment.

[0057] S2, data preprocessing, includes meteorological information feature encoding and data normalization, specifically including the following:

[0058] (2.1) Encode the meteorological information corresponding to the irradiance, use one-hot encoding to encode the weather type, and use the value itself as the encoding value for numerical information;

[0059] (2.2) To ensure that the model gradient changes reasonably during training, the input data needs to be normalized. The normalization formula is as follows:

[0060]

[0061] Where a represents the feature in the data set, a′ represents the normalized feature value, and a max and a min They represent the maximum and minimum values ​​of the feature in the historical data respectively; in this embodiment, the features that need to be normalized are historical irradiance information and historical meteorological information, where the historical meteorological information includes temperature, humidity, wind speed and air pressure.

[0062] S3, updates the machine learning model based on the error compensation framework, the schematic diagram of which is attached Figure 2 , which includes:

[0063] (3.1) Obtain the irradiance prediction error of the machine learning model corresponding to the current parameters from time TK to T-1. The model is not updated during this process. The prediction error at each time point is obtained using the data of the K time points before this time point as the model input.

[0064] (3.2) The forecast error sequence from time TK to T-1 is fused with the external meteorological data sequence and used to update the model;

[0065] S4, prediction, inputs the historical data into the error compensation framework in step S3 and the trained machine learning model to predict the solar irradiance for multiple steps in the future.

[0066] Furthermore, the error compensation framework in step S3 has the following features:

[0067] (4.1) This framework is an end-to-end solar irradiance prediction framework. After inputting historical irradiance and historical meteorological data, the framework can automatically run and output multi-step prediction results. At the same time, the error information is automatically utilized within the framework without any additional operations.

[0068] (4.2) Error acquisition phase: The framework only uses the machine learning model to obtain error information, and this process does not update the model parameters; the error compensation phase uses the error information to dynamically update the model;

[0069] (4.3) This framework can effectively reduce the irradiance prediction error without changing the structure of the machine learning model;

[0070] (4.4) This framework is a universal paradigm that is applicable to different machine learning prediction models. It can effectively utilize error information for different machine learning prediction models and dynamically update the model based on the error information.

[0071] Furthermore, this embodiment selects the long short-term memory network (LSTM) as the prediction model for illustration. The network structure is as follows: Figure 4 As shown, the internal structure of LSTM is as follows Figure 3 As shown, it specifically includes: a forget gate, which is used to discard unimportant information; in the forget stage, the output f of the forget gate is t Calculated by the sigmoid activation function, the output value of the activation function determines whether to discard the information of the previous moment. The calculation formula of the forget gate is as follows:

[0072] f t =sigmoid(W if x t +b if +W hf h t-1 +b hf )

[0073] The input gate and activation function work together to complete the memory selection. The two perform matrix multiplication to determine which values ​​to save to the current state.

[0074] Input gate i t The calculation formula is as follows:

[0075] i t =sigmoid(W ii x t +b ii +W hi h t-1 +b hi )

[0076] Activation function g t The calculation formula is as follows:

[0077] g t =tanh(W ii x t +b ii +W hi h t-1 +b hi )

[0078] The state c of the memory unit at the current moment t It is determined by the input gate and the forget gate. The matrix multiplication of the forget gate and the previous moment conversion indicates that some unnecessary information is discarded, and the matrix multiplication of the input gate and the activation function indicates that important information is preserved. The calculation formula is as follows:

[0079]

[0080] Output gate o t :

[0081] o t =sigmoid(W io x t +b io +W ho h t-1 +b ho )

[0082] The output gate determines the output value of the memory cell state at the current moment, thereby obtaining the output state h of the LSTM cell t , and its calculation formula is as follows:

[0083]

[0084] Where W if and b if Represent the weight matrix and bias matrix of the external input of the forget gate, W hf and b hf Represent the weight matrix and bias matrix of the hidden state input of the forget gate, W ii and b ii Represent the weight matrix and bias matrix of the external input of the input gate, W hi and b hi Represent the weight matrix and bias matrix of the input gate hidden state input, W io and b io Represent the weight matrix and bias matrix of the external output of the output gate, W ho and b ho Represent the weight matrix and bias matrix of the hidden state input of the output gate, respectively, f t 、it and o t are the outputs of the forget gate, input gate, and output gate at time t, respectively, h t is the hidden state at time t.

[0085] Furthermore, in this embodiment, the data set is prepared in step S1 as follows:

[0086] In this embodiment, the historical information of irradiance at the 24 moments before time t and the historical information of meteorological data are selected as the input of the model to predict the irradiance at the next 6 moments. The input data of the prediction model data set can be expressed as follows: t-24 ,…,I t-1 ),(T t-24 ,…,T t-1 ),(W t-24 ,…,W t-1 ),(P t-24 ,…,P t-1 ),(H t-24 ,…,H t-1 )}, the supervision information of the dataset can be expressed as (I0,…,I5), where [I t-m ,T t-m ,W t-m ,P t-m ,H t-m ] represents the irradiance and meteorological information at m moments before time t.

[0087] Furthermore, to satisfy the error compensation framework's operational mechanism, error information must be included in the dataset. For the current time T, the error information is derived from the error compensation framework in step S3. Other time points represent the error acquisition phase, where error information is lacking. To ensure consistent model input, this embodiment introduces a zero error sequence; in effect, this is equivalent to ignoring the LSTM model's compensation function during the error acquisition process.

[0088] Furthermore, the detailed steps of the error compensation framework in step S3 are as follows:

[0089] (1) Sliding window to obtain subsequence:

[0090] The framework first receives the data from time T-48 to time T-1 as input, and divides it into 24 subsequences starting from time T-48 in the form of a sliding window with a sliding step of 1;

[0091] The 24 subsequences obtained are {(I T-48 ,…,I T-25 ),…,(I t-23 ,…,I t ),…,(I T-25 ,…,IT-2 )}, where I t represents the solar irradiance at time t;

[0092] (2) Scroll to get error information:

[0093] For the subsequence (I t-24 ,…,I t-1 ), and its corresponding external meteorological information is (M t-24 ,…,M t-1 ), in this embodiment, the external meteorological information M includes temperature T, humidity H, air pressure P and wind speed W, which can be expressed as (T t-24 ,…,T t-1 ), (W t-24 ,…,W t-1 ), (P t-24 ,…,P t-1 ), (H t-24 ,…,H t-1 );

[0094] The input of the LSTM model under the current parameters is {(I t-24 ,…,I t-1 ),(M t-24 ,…,M t-1 )}, whose output is the predicted value The corresponding supervision information can be expressed as (I t ,…,I t+5 ), where N represents the prediction step size; based on the predicted value and supervision information, the prediction error E of the model at the current moment can be obtained t =[e t ,…,e t+5 ];

[0095] The above 24 subsequences are input cyclically, and the prediction error of the LSTM model under the current parameters at the current moment is obtained through supervision information; this cyclic process can obtain the error sequence (E T-24 ,…,E T-1 );

[0096] Moreover, this process does not update the LSTM model parameters;

[0097] (3) Information fusion:

[0098] In this stage, the error sequence (E T-24 ,…,E T-1 ) is fused with historical irradiance and meteorological data to obtain a new feature input {(E T-24 ,…,E T-1 ),(I T-24 ,…,I T-1 ),(M T-24,…,M T-1 )}, and its supervision information is (I T ,…,I T+5 );

[0099] The input features after information fusion add the prediction error information of the current model for the corresponding moment in history. This information is determined by the internal prediction mechanism of the model and fed back to the LSTM model.

[0100] (4) Update the model:

[0101] Update the LSTM model parameters using the input features and supervision information from step (3).

[0102] To verify the prediction performance of the present invention, this example selected the irradiance data of the American Measurement and Instrumentation Laboratory, specifically Hawaii as the location of the data set. The training set length is 4 years, the test set length is 1 year, and compared with the LSTM method, taking the one-step-ahead prediction as an example, the specific error prediction is shown in the attached figure. Figure 5 shown.

Claims

1. A machine learning irradiance prediction method based on an error compensation framework, characterized in that: The steps include: S1, training data acquisition, obtain the historical irradiance data of the target area and its corresponding meteorological data, and make a supervision dataset according to the prediction task; S2, data preprocessing, including meteorological information feature encoding and data normalization; S3, updates the machine learning model based on the error compensation framework; S4, prediction, inputs the historical data into the error compensation framework in step S3 and the trained machine learning model to predict the solar irradiance for multiple steps in the future; The step S3 specifically includes the following contents: (3.1) Get the current machine learning model at time arrive The irradiance prediction error is , and the model is not updated in this process; (3.2) Change the time arrive The prediction error is integrated with external meteorological data and historical irradiance data, and used to update the machine learning model; The error compensation framework features are as follows: (4.1) This framework is an end-to-end solar irradiance prediction framework. After inputting historical irradiance and historical meteorological data, the framework can automatically run and output multi-step prediction results. At the same time, the error information is automatically utilized within the framework without any additional operation. (4.2) Error acquisition phase: The framework only uses the machine learning model to obtain error information, and this process does not update the model parameters; The error compensation stage uses error information to dynamically update the model; (4.3) This framework can effectively reduce the irradiance prediction error without changing the structure of the machine learning model; (4.4) This framework is a universal paradigm that is applicable to different machine learning prediction models. It can effectively utilize error information for different machine learning prediction models and dynamically update the model based on the error information. The detailed steps of the error compensation framework in step S3 are as follows: (1) Sliding window to obtain subsequence: The framework first receives arrive The data at the moment is taken as input and Starting from the moment, it is divided into K subsequences in the form of a sliding window with a sliding step of 1; The K subsequences are { },in express Solar irradiance at the moment; (2) Scroll to get error information: For subsequence , and its corresponding external meteorological information is , the input of the machine learning model under the current parameters is { }, and its predicted value is , and its corresponding supervision information can be expressed as , where N represents the prediction step size; based on the predicted value and supervision information, the prediction error of the model at the current moment can be obtained ; The above K subsequences are input cyclically, and the prediction error of the machine learning model under the current parameters at the current moment is obtained through supervision information; this cyclic process can obtain the error sequence ; Moreover, this process does not update the model parameters; (3) Information fusion: At this stage, the error sequence Fusion with historical irradiance and meteorological data yields new feature input { }, and its supervision information is ; The input features after information fusion add the prediction error information of the current model for the corresponding moment in history. This information is determined by the internal prediction mechanism of the model and fed back to the machine learning model. (4) Update the model: Update the model parameters using the input features and supervision information from step (3).

2. The prediction method according to claim 1, characterized in that The step S1 includes the following contents: (1.1) Obtain historical irradiance data and corresponding meteorological data for the target area, including but not limited to temperature, humidity, air pressure, and wind speed; (1.2) If a segment of historical data is missing or illegal, it is replaced by the mean of the adjacent data before and after to ensure the continuity and authenticity of the data and thus guarantee the quality of the training data; (1.3) Matching supervision information is used to create a supervision dataset by reading the current period The irradiance of the dataset is used as supervision information, and the historical irradiance is matched with the corresponding meteorological information as input information to produce a supervision dataset.

3. The prediction method according to claim 1, wherein: The step S2 specifically includes the following contents: (2.1) Encode the meteorological information corresponding to the irradiance, use one-hot encoding to encode the weather type, and use the value itself as the encoding value for numerical information; (2.2) To ensure that the model gradient changes reasonably during training, the input data is normalized. The normalization formula is as follows: , in, represents the features in the dataset, represents the normalized eigenvalue, and Respectively represent the maximum and minimum values ​​of the feature in the historical data.

Citation Information

Patent Citations

  • Photovoltaic power station power prediction method based on NWP irradiance correction and error prediction

    CN114091317A

  • Coder-decoder-based deep learning multi-step irradiance prediction method

    CN114781744A