Power generation prediction method for optical storage power grid based on model-agnostic meta-learning method
By using the model-agnostic meta-learning method, the photovoltaic-storage grid power generation equipment is decomposed into sub-tasks and shared parameters for prediction, which solves the problems of limited historical records and complex environments, and achieves more efficient power generation prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DALIAN UNIV OF TECH
- Filing Date
- 2023-02-07
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies for predicting power generation in photovoltaic-storage grids struggle to effectively utilize the limited historical records of power generation equipment and the complex environmental characteristics in different regions, resulting in insufficient prediction accuracy, especially in new regions or rapidly changing scenarios.
The model-agnostic meta-learning method is adopted to break down power generation equipment with similar characteristics into different sub-tasks. By sharing parameters through meta-learning, "meta-knowledge" is learned and applied for prediction, and dynamic and static features are combined for comprehensive modeling.
It improves the accuracy and speed of forecasting in new regions or in situations with insufficient data, and is better able to adapt to complex environmental changes, thereby enhancing the overall accuracy and efficiency of power generation forecasting.
Smart Images

Figure SMS_22 
Figure SMS_53 
Figure SMS_63
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic-storage grid power generation technology, and more specifically, to a unified structured representation method of process knowledge for predicting the power generation of photovoltaic-storage grids. Background Technology
[0002] A photovoltaic-storage grid is a large-scale power generation system that utilizes solar energy to convert it into electricity. In such scenarios, the technical specifications of the equipment, the capacity of the storage devices, and the materials used in the transmission equipment need to be determined based on the power generation capacity of the equipment. This information can also be used to estimate future returns and assess the value of the investment. Therefore, the ability to accurately predict the power generation of equipment in each region is crucial. In the past, the accuracy of target power generation prediction depended on the personal experience of relevant personnel, requiring long-term tracking and analysis of the target situation, and analysis based on meteorological data, power plant data, and equipment data. Furthermore, the geographical locations for setting up photovoltaic-storage grids vary greatly, and their power generation trends differ. Considering the characteristics of different targets also requires comparative analysis of similar targets, which poses a significant challenge for manual prediction.
[0003] A crucial basis for predicting future power generation is the region's power generation efficiency data over a past period. Since power generation data is collected daily and exhibits certain regularities over time, the problem can be abstracted into a time series data prediction problem. This involves using past power generation data to predict future power generation trends. Currently, commonly used time series data prediction methods can be divided into two types: manual prediction and model prediction. Compared to computer modeling, manual prediction methods lag significantly behind in both speed and overall accuracy. However, manual prediction also has irreplaceable advantages: Firstly, experienced practitioners can quickly infer new patterns in time series data from similar sequence patterns. Secondly, for targets with rapidly changing patterns, experience learned from a large number of similar data patterns can be applied to the target, thus enabling more accurate predictions of seemingly irregular data. For model prediction methods, addressing these issues is crucial. According to the different methods used, model prediction methods can be divided into the following three major directions: (1) Direct modeling method: summarize the characteristics of historical data trends to find the pattern of the target and apply the pattern to future predictions (e.g., historical average method, rolling and averaging method). The advantage of this method is that it is simple, intuitive, and highly interpretable. It can also incorporate the results of human analysis of the data characteristics of the target. The disadvantage is that the workload is large, and it is still necessary to analyze different types of target classifications. At the same time, since the model has the lowest complexity, it is difficult to take into account complex environmental changes, so the accuracy is also difficult to guarantee. (2) Machine learning method: Historical data is trained by machine learning models (such as LDA, linear regression, decision tree, random forest, gradient boosting tree, etc.). The model learns the patterns of different targets in the past by using the characteristics of the target (equipment data, power plant data, meteorological data, etc.) and predicts the power generation efficiency of the target based on the characteristics of the future target. Compared with the direct modeling method, the main advantages of this method are as follows: First, the machine learning model can take the type and functional characteristics of the target as part of the target data and consider the patterns of similar targets at the same time during the learning process; Second, the machine learning model can learn the characteristics of all targets at the same time, which saves a lot of manpower compared with the direct modeling method that requires manual analysis; Third, some machine learning models (such as random forest, decision tree) retain a certain degree of interpretability while improving the accuracy of the model.However, from a macro perspective, there are still areas for optimization in this type of method. First, although the complexity of machine learning models has improved, they still cannot meet all prediction needs for complex situations and diverse scenarios. Second, machine learning models have poor generalization ability; models trained on a single dataset are prone to overfitting, and their performance will significantly decline for tasks with different features. Third, it is difficult to simultaneously consider complex features and time-series information during the training of machine learning models. In data processing, time information is usually used as a feature input (for example, in the training of random forest models, the rolling sum of the average daily power generation efficiency over a period of time before the current date is usually added as a feature dimension). For regions with obvious periodic characteristics in power generation efficiency, this method has poor learning ability for time series. (3) Deep learning methods: In recent years, deep learning methods based on neural network engines have been gradually applied to various time series prediction tasks, such as using RNN to predict user consumption behavior on Twitter. The most commonly used methods in prediction tasks are neural network models that can learn time series features (such as recurrent neural networks, long short-term memory neural networks, etc.). Choosing a suitable model can learn deeper patterns in the pattern and is far superior to the first two methods in terms of accuracy. However, the disadvantages of this method are also quite obvious: First, deep learning models based on loss functions tend to achieve the best results in all tasks, but this also means that for a specific task, using the same model to predict different targets still has insufficient generalization ability and it is difficult to capture the pattern differences between different targets; Second, predicting the future power generation efficiency trend by the power generation efficiency of the target over a period of time is not effective when facing new targets (areas where power plants have just been laid), and it is difficult to capture the target's pattern from the data collected in the short term. Summary of the Invention
[0004] To address the aforementioned issues, this invention proposes a technique based on the most effective deep learning method. It analyzes each group of targets with similar characteristics as a separate "meta-task" using a model-agnostic meta-learning approach. This allows the predictive experience learned from different tasks to be applied as "meta-knowledge" to other tasks. The invention's objective is shifted from training a model that performs well in every meta-task to training a method that automatically generates models that achieve optimal results for each meta-task. This invention provides a photovoltaic power generation prediction technology for energy storage networks based on model-agnostic meta-learning. On one hand, it can summarize common potential patterns across different tasks from power generation equipment with varying environmental characteristics and apply them to power generation in other regions. On the other hand, it can comprehensively consider static and dynamic multi-dimensional heterogeneous data related to power generation to more comprehensively predict its power generation trends.
[0005] The key point of this invention is to solve the problem of power generation prediction in photovoltaic-storage grids by using meta-learning technology. By designing a generative model and combining the characteristics of a specific task, the prediction problem of all devices is decomposed into power generation prediction problems of power generation devices within different power plant ranges. Through the meta-learning method, the meta-knowledge learned from one task can be transferred between different tasks. This is achieved by sharing parameters. The transfer of meta-knowledge between different tasks plays a key role in power generation prediction.
[0006] The present invention aims to address two problems in power generation prediction: limited reference samples and complex spatiotemporal patterns. It learns from task-specific spatiotemporal features and jointly models dynamic time series features and static features related to power generation efficiency. It learns a representative model initialization parameter value, which significantly improves the model's fitting speed and prediction accuracy in new scenarios.
[0007] To achieve the above objectives, this invention provides a method for predicting the power generation of a photovoltaic-storage grid based on a model-agnostic meta-learning method, comprising the following steps:
[0008] S1. Basic Data Information
[0009] In the task of predicting power generation, the input sample is specified. The characteristics of power generation include both dynamic and static characteristics. Dynamic characteristics are time-series data, including both equipment data and meteorological data. Equipment data includes battery voltage V, battery charging current A, battery power W, radiator temperature °C, battery charging status, and inverter status over a period of time.
[0010] Meteorological data includes the following characteristics of the equipment's location over a period of time: temperature (°C), humidity (%m³ / m³), CO2 concentration (ppm), evaporation (mm), air pressure (hPa), radiation (W / m²), wind direction (°), daily cumulative rainfall (mm), sunshine duration (h), cumulative radiation interval (MJ / m²), and illuminance (KLux).
[0011] The static features include four items in the equipment data: battery type, software main version number, device to which it belongs, and device name. The power station data includes two features: rated output power and inverter charging status.
[0012] Predicted Labels This represents the power generation trend of equipment in the region over a future period of time.
[0013] The entire dataset follows a distribution The overall input data structure can be used To indicate, among which Representing the time points within it, Representing the i-th recorded event, our goal is to find a sequence of events starting from the i-th recorded event. arrive The mapping, where It refers to the spatial scope to which all tasks belong;
[0014] S2. Linear Feature Extraction
[0015] Use linear autoregression to capture input samples A linear time dependency is obtained, and a coarse-grained but stable temporal representation is achieved. The model parameters are: Including autoregressive coefficients and bias value , This represents the result predicted by the linear model. The target efficiency at time t can be represented by the following formula in the AR model:
[0016]
[0017] In this scenario, AR models can be used to capture the linear growth or decline trend of a target;
[0018] enter Linear prediction results obtained from time-series data of power generation efficiency used for prediction. As one of the inputs for feature fusion;
[0019] S3. Periodic Feature Extraction
[0020] Skip-LSTM
[13] was used to extract nonlinear pattern features with different periodicity. express The input sample value at time 10:00. The target efficiency at time t is used to model time series data with different skip intervals to learn multiple periodic patterns and output embedding models with different intervals. The skip-LSTM is described as follows:
[0021]
[0022] Where p represents the time period, p=1 is used to mine features at the daily granularity, p=7 is used to mine features at the weekly granularity, and p=30 is used to mine features at the monthly granularity, resulting in prediction results containing different periodic patterns. As one of the inputs for feature fusion;
[0023] S4. Fusion of linear and periodic features
[0024] The inputs are the outputs of S2 and S3. and After passing through a multilayer perceptron Merge the two pieces of information:
[0025]
[0026] in These are the trainable parameters in the model. This is the loss function. The data obtained after this step serves as the input to the meta-learning model. ;
[0027] S5. Subtask Division
[0028] All data Randomly divided into and The source and target domains, serving as the training and testing sets for the meta-learning model, represent two complementary sets of sub-tasks. In this task, we discovered a correlation between the power generation trend of a power plant and its geographical location and the equipment status of the central power plant. Therefore, we divide the tasks into sub-tasks based on the power plant itself. Each sub-task focuses on predicting the power generation of photovoltaic power generation equipment surrounding a central power plant. Each sub-task includes its own input data and prediction results. Then, we input and output data for each independent meta-task. The training set is divided into tasks. and test set The samples in the source domain need to be updated under supervised learning, and then the results are applied to the target domain to test the effect.
[0029] S6. Selection of the base model
[0030] Choosing CNN or LSTM as the optimization objective for meta-learning, the training process for the base model is as follows:
[0031] CNN sequence model training: The CNN model can be divided into three layers: embedding layer, convolutional layer, and multi-layer perceptron layer. The convolution operation on a one-dimensional vector can extract data patterns in its time dimension t, thereby capturing features in the time series. The trainable parameters include: the weight matrix of the embedding layer. and bias vector The convolution matrix of the summation layer , among them The dimension representing the filter. Dimensions representing data include parameters in a multilayer perceptron. All trainable parameters are unified as ;
[0032] LSTM sequence model: RNNs are often used as a prediction model in sequence learning tasks. Theoretically, they can map previously processed "memory" information from the sequential records of previous inputs. The parameters in LSTM can be summarized as two matrices. and By controlling the input, output, and forget gate of the model, the update process can be controlled, and all trainable parameters can be unified into a single parameter. ;
[0033] S7. Sub-model optimization level adaptation
[0034] For a subtask in a source domain The input for this task is the training set. On The output is the corresponding Define the optimizable parameters in the subtask model as The initial values of the parameters for all tasks are defined as follows: The parameter update process for this task is then defined as follows:
[0035]
[0036] in These are the loss functions for different subtasks in the source domain. It is a hyperparameter that controls the learning rate. After training, a learning rate specific to the task is obtained. The parameters obtained during training are ;
[0037] S8. Obtain the optimized parameters of the model on the training set of the sub-task. Apply it to the test set for this task. The initial value of this parameter is obtained above. For this task loss value :
[0038]
[0039] For the source domain Applying this loss function to each subtask in the process, the loss function for the source domain is calculated as follows:
[0040]
[0041] Assumption As initial parameters for simulating the target domain, we set them before the target domain update step. The process of minimizing the loss function is as follows:
[0042]
[0043] in That is, the sub-tasks in the target domain, and the initialization parameters of the sub-models obtained by training in the source domain. Used as basic model parameters in the target domain to test the effectiveness of meta-learning;
[0044] S9. Meta-learning optimization level adaptation
[0045] Datasets used in training meta-learning models It is from a data distribution Meta-learning model parameters generated by sampling The learning process can be defined as:
[0046]
[0047] After obtaining the loss function within the target domain, the output parameters are obtained through updating the inner gradient in the equation. Then perform meta-optimization using the following formula.
[0048]
[0049] in It is the learning rate of meta-learning. The objective function for meta-learning has the following mathematical form:
[0050]
[0051] in It consists of data and labels from the source domain. and It comes from the event Training and test set samples, hyperparameters To balance the contribution ratio of the two in the meta-learning process, the meta-learning parameter update process is as follows:
[0052]
[0053] Based on general meta-learning, the loss function in the source domain is merged, and the overall parameter learning process is defined as follows:
[0054]
[0055] The final result The model used as initial parameters is the result of meta-learning optimization.
[0056] In the preferred embodiment, in step S1, the battery charging state includes four types: float charging, no charging, constant voltage, and constant current, and the inverter state includes three types: motor, battery, and power saving. These two features are input in the model in the form of one-hot encoding.
[0057] In the preferred embodiment, after step S9, the following steps are also included:
[0058] Step S10. Model Performance Testing
[0059] Step S9 yields an initial model optimized by the source and target domains. As a data distribution The initial model parameters of all subtasks sampled in the source domain are applied to test the effect on the set of subtasks in the source domain, depending on the prediction target.
[0060] In the preferred approach, the loss function involved in the above process falls into two categories:
[0061] When predicting sequence data, cross-entropy is used as the loss function, and the calculation formula is as follows:
[0062]
[0063] In the formula Indicates the batch number of the model training. This represents the actual data output. Indicates the result of the prediction;
[0064] When the prediction results follow a distribution, minimizing the KL divergence is the objective for performing end-to-end training, calculated as follows:
[0065]
[0066] The model output is a result based on the training data set. The obtained distribution ,in This indicates the parameters generated based on different tasks. For the trainable parameters in the sub-task model, we define the target distribution as... That is, the spatial distribution of actual power generation efficiency.
[0067] In the problem of power generation prediction in photovoltaic-storage power grids, the efficiency variation patterns of power generation equipment vary across different regions. While the equipment is widely distributed, historical records for each region are limited. Furthermore, the data types include both static and dynamic categories. Using a unified prediction model to analyze this problem yields poor results. To address this, this invention proposes a model-agnostic meta-learning method. This method decomposes a task within a certain range into different sub-tasks containing certain shared features, learns from each sub-task separately, and then fuses them. It utilizes the generalizable knowledge and experience between different tasks, as well as the independent features within each task, to perform knowledge generalization learning and independent task training. This compensates for existing prediction models based on the inherent characteristics of all time-series data. The main contributions of this method to address the above problems are as follows:
[0068] 1. For widely distributed power generation equipment data, lessons can be learned from the efficiency trends of power generation equipment in different regions and applied to a single task, so that the data can be fully utilized;
[0069] 2. When data for a single power generation device is limited, this technology can be applied to tasks with different regional characteristics, quickly applying knowledge learned from other tasks and fully considering the uniqueness of the task, to obtain more accurate results faster and with smaller samples.
[0070] 3. For diverse data types, feature fusion methods are used to simultaneously consider the impact of dynamic historical data, climate data, and static equipment data and power plant data on future power generation efficiency.
[0071] The goal of this invention is to accurately predict future power generation efficiency trends using multi-dimensional features of equipment. This requires two parts: optimizing the prediction model itself and optimizing the parameters within the prediction model. This invention refers to these as sub-model optimization level adaptation and meta-learning optimization level adaptation. The following section will first illustrate the selection of the base model and the work of feature fusion using the training process of a sub-task. Because this invention predicts different meta-tasks separately in this task, the features of different tasks can be fully learned. Simultaneously, the meta-knowledge accumulated from a large number of tasks can be applied to tasks with less training data. A model conforming to the prediction pattern of this task can be learned and applied with a small amount of initial data, achieving better results than other methods when handling "cold start" tasks. In the context of solar power generation, the climate, power plants, and equipment conditions vary across different regions. Therefore, it is difficult to uncover a consistent pattern of change that works in all situations by using a uniform model to learn and predict all power generation equipment. Furthermore, for equipment within a specific region, it is difficult to learn potential patterns that take into account all environmental characteristics from just a few dozen or a hundred days of power output data. To address this issue, a meta-learning approach is applied. This approach treats the power generation of equipment within a certain region (in this task, the power generation equipment within a certain region belongs to the same power plant, so the power plant is used as the standard for dividing the meta-tasks) as a meta-task for prediction. At the same time, a meta-learning model is used to generalize the experience learned from different meta-tasks. This allows the "meta-knowledge" learned from other tasks to be used as experience when predicting a sub-task. This "meta-knowledge" is transferred between tasks in the form of shared parameters, thus achieving better results with a smaller amount of data. Detailed Implementation
[0072] This invention discloses a method for predicting the power generation of a photovoltaic-storage power grid based on a model-agnostic meta-learning method, comprising the following steps:
[0073] S1. Basic Data Information
[0074] In the task of predicting power generation, the input sample is specified. The power generation characteristics include both dynamic and static features. Dynamic features are time-series data, encompassing both equipment data and meteorological data. Equipment data includes six parameters: battery voltage (V), battery charging current (A), battery power (W), radiator temperature (°C), battery charging status (float charge, no charge, constant voltage, constant current), and inverter status (motor, battery, energy saving). Meteorological data includes the following parameters: temperature (°C, average of five temperatures around the equipment), humidity (%m³ / m³, average of three soil moisture points around the equipment), CO2 concentration (ppm), and evaporation rate at the equipment's location over a past period. Eleven data features are included, including (mm), air pressure (hPa), radiation (W / ㎡, taking the average of instantaneous total radiation, instantaneous diffuse radiation, and instantaneous direct radiation), wind direction (°), daily cumulative rainfall (mm), sunshine duration (h), cumulative radiation interval (MJ / ㎡), and illuminance (KLux). (Both dynamic and static data are collected on a daily basis, with each data point being an average of multiple data points.) Static features are those of the equipment and the power station itself that do not change over time. Equipment data includes four items: battery type, software main version number, associated equipment, and equipment name. Power station data includes two features: rated output power and inverter charging status. Prediction labels are also included. The dataset represents the future power generation trend of devices within this region over a given period, and the entire dataset follows a specific distribution. The overall input data structure can be used To indicate, among which Representing the time points within it, Representing the i-th recorded event, the purpose of this invention is to find a sequence of events from... arrive The mapping, where It refers to the spatial scope to which all tasks belong. The input is sent to the temporal feature extraction module, which is divided into three parts: linear feature extraction, periodic feature extraction, and linear-periodic feature fusion.
[0075] S2. Linear Feature Extraction
[0076] Use linear autoregression to capture input samples A linear time dependency is obtained, and a coarse-grained but stable temporal representation is achieved. The model parameters are: Including autoregressive coefficients and bias value , This represents the result predicted by the linear model. The target efficiency at time t can be represented by the following formula in the AR model:
[0077]
[0078] In this scenario, AR models can be used to capture linear growth or decline trends in a target (e.g., during seasonal changes, power generation efficiency may linearly increase or decrease due to variations in daylight hours). Input Linear prediction results obtained from time-series data of power generation efficiency used for prediction. As one of the inputs for feature fusion.
[0079] S3. Periodic Feature Extraction
[0080] Skip-LSTM is used to extract features of nonlinear modes with different periodicity. express The input sample value at time 10:00. The target efficiency at time t is used to model time series data with different skip intervals to learn multiple periodic patterns and output embedding models with different intervals. The skip-LSTM is described as follows:
[0081]
[0082] Where p represents the time period, p=1 is used to mine recent feature preferences, p=7 is used to mine features at a weekly granularity, p=30 is used to mine features at a monthly granularity, and so on, to obtain prediction results that contain periodic patterns. As one of the inputs for feature fusion.
[0083] S4. Fusion of linear and periodic features
[0084] Two fully connected layers are used to integrate dynamic and static features. One layer integrates the output of the skip-LSTM to combine the temporal dependencies and periodic features of different time lengths in the data. The other layer learns time-related static features, such as date information and sample information, and then aggregates them into the final static feature samples, which is equivalent to an average pooling operation. The input is the output of the first two steps. and After passing through a multilayer perceptron Merge the two pieces of information:
[0085]
[0086] in These are the trainable parameters in the model. This is the loss function. The data obtained after this step serves as the input to the meta-learning model.
[0087] S5. Subtask Division
[0088] This invention will include all data Randomly divided into and The source and target domains, serving as the training and testing sets for the meta-learning model, are sets of two complementary sub-tasks. Each sub-task contains its own input data (power generation efficiency-related features) and prediction results (future trends in power generation efficiency). Each independent meta-task is then input and output data... The training set is divided into tasks. and test set The samples in the source domain need to be updated under supervised learning, and then the results are applied to the target domain to test the effect.
[0089] S6. Selection of the base model
[0090] The advantage of model-agnostic meta-learning lies in its ability to optimize for different model types. Different base models can be selected when processing different data formats. For sequential data, CNN or LSTM can be chosen as the optimization target for meta-learning. The training process for the base model is as follows:
[0091] CNN sequence model training: The CNN model can be divided into three layers: embedding layer, convolutional layer, and multi-layer perceptron layer. The convolution operation on a one-dimensional vector can extract data patterns in its time dimension t, thereby capturing features in the time series. The trainable parameters include: the weight matrix of the embedding layer. and bias vector The convolution matrix of the summation layer , among them The dimension representing the filter. Dimensions representing data include parameters in a multilayer perceptron. All trainable parameters can be unified as .
[0092] LSTM sequence model: RNNs are often used as a prediction model in sequence learning tasks. Theoretically, they can map previously processed "memory" information from the sequential records of previous inputs. The parameters in LSTM can be summarized as two matrices. and By controlling the input, output, and forget gate of the model, the update process can be controlled, and all trainable parameters can be unified into a single parameter. .
[0093] The base model is the model directly used to process sub-tasks, and it unifies the trainable parameters in the model into parameters. This parameter also serves as the initial value for the meta-learning model, and the initial parameter values are optimized based on the model's training process in different sub-tasks. Thus, a way to discover a The model parameter initial values can quickly obtain the best results on tasks within the scope. Therefore, different base models can be applied to process different data types, which is the unique feature of model-agnostic meta-learning compared to other meta-learning methods.
[0094] S7. Sub-model optimization level adaptation
[0095] For a subtask in a source domain The input for this task is the training set. On The output is the corresponding Define the optimizable parameters in the subtask model as The initial values of the parameters for all tasks are defined as follows: The parameter update process for this task is then defined as follows:
[0096]
[0097] in These are the loss functions for different subtasks in the source domain. It is a hyperparameter that controls the learning rate. After training, a learning rate specific to the task is obtained. The parameters obtained during training are
[0098] S8. Obtain the optimized parameters of the model on the training set of the sub-task. Apply it to the test set for this task. The initial value of this parameter is obtained above. For this task loss value :
[0099]
[0100] For the source domain Applying this loss function to each subtask in the process, the loss function for the source domain is calculated as follows:
[0101]
[0102] Assumption As initial parameters for simulating the target domain, this invention sets them before the target domain update step. The process of minimizing the loss function is as follows:
[0103]
[0104] in That is, the sub-tasks in the target domain, and the initialization parameters of the sub-models obtained by training in the source domain. As the basic model parameters on the target domain, the effectiveness of meta-learning is tested. The following section will introduce the adaptation process at the optimization level of meta-learning.
[0105] S9. Meta-learning optimization level adaptation
[0106] Datasets used in training meta-learning models It is from a data distribution Meta-learning model parameters generated by sampling The learning process can be defined as:
[0107]
[0108] After obtaining the loss function within the target domain, the output parameters are obtained through updating the inner gradient in the equation. Then perform meta-optimization using the following formula.
[0109]
[0110] in It is the learning rate of meta-learning. The objective function for meta-learning has the following mathematical form:
[0111]
[0112] in It consists of data and labels from the source domain. and It comes from the event Training and test set samples, hyperparameters To balance the contribution ratio of the two in the meta-learning process, the meta-learning parameter update process is as follows:
[0113]
[0114] Based on general meta-learning, the loss function in the source domain is merged, and the overall parameter learning process is defined as follows:
[0115]
[0116] The final result The model used as initial parameters is the result of meta-learning optimization, which can be...
[0117] S10. Model Performance Test
[0118] Thus, this invention yields an initial model optimized by the source and target domains. This model parameter can be used as a data distribution. The initial model parameters of all subtasks sampled in the middle can be applied to the set of subtasks in the source domain to test their effectiveness. Depending on the prediction target, the loss function can be divided into two cases. When predicting sequential data, this invention usually uses cross-entropy as the loss function, and the calculation formula is as follows:
[0119]
[0120] In the formula Indicates the batch number of the model training. This represents the actual data output (the actual trend of power generation efficiency). This represents the predicted result (the model predicts the trend of power generation efficiency). When the predicted result is a distribution (e.g., using a neural network to generate the distribution for variational inference and approximate estimation; this method can reduce model training time when the equipment's usage scenario is complex and the prediction range is wide), in order to perform end-to-end training, minimizing the KL divergence can be used as the objective. The calculation formula is as follows:
[0121]
[0122] The model output is a result based on the training data set. The obtained distribution ,in This indicates the parameters generated based on different tasks. For trainable parameters in the sub-task model, this invention defines the target distribution as follows: (i.e., the spatial distribution of actual power generation efficiency).
[0123] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for predicting the power generation of a photovoltaic-storage power grid based on model-agnostic meta-learning, characterized in that, Includes the following steps: S1. Basic Data Information In the task of predicting power generation, the input sample is specified. The characteristics of power generation include both dynamic and static characteristics. Dynamic characteristics are time-series data, including both equipment data and meteorological data. Equipment data includes battery voltage, battery charging current, battery power, radiator temperature, battery charging status, and inverter status over a period of time. Meteorological data includes temperature, humidity, CO2 concentration, evaporation, air pressure, radiation, wind direction, daily cumulative rainfall, sunshine duration, cumulative radiation interval, and illuminance at the location of the equipment over a period of time. The static features include four items: battery type, software main version number, device to which it belongs, and device name. The power station data includes two features: rated output power and inverter charging status. Predicted Labels This represents the trend of power generation from equipment within the region over a future period. The entire dataset is Find one from arrive The mapping, ,in It refers to the spatial scope to which all tasks belong; S2. Linear Feature Extraction Use linear autoregression to capture input samples A linear time dependency relationship is obtained, and a coarse-grained but stable temporal representation relationship is obtained; enter Linear prediction results obtained from time-series data of power generation efficiency used for prediction. ; S3. Periodic Feature Extraction Skip-LSTM is used to extract features of nonlinear modes with different periodicity. express The input sample value at time 10:
00. The target efficiency at time t is used to model time series data with different skip intervals to learn multiple periodic patterns and output embedding models with different intervals. The skip-LSTM is described as follows: Where p represents the time period, p=1 is used to mine features at the daily granularity, p=7 is used to mine features at the weekly granularity, and p=30 is used to mine features at the monthly granularity, resulting in prediction results containing different periodic patterns. ; S4. Fusion of linear and periodic features S2 obtained Obtained from S3 After a multi-layer perceptron Information fusion is performed to obtain data As input to the meta-learning model; S5. Subtask Division All data The data is randomly divided into a source domain and a target domain, which serve as the training and testing sets for the meta-learning model. Sub-tasks are divided based on power plants, with each sub-task being the prediction of the power generation of photovoltaic power generation equipment around a central power plant. Each sub-task contains its own input data and prediction results. The input and output data of each independent meta-task are then divided into training and testing sets within the task. Samples in the source domain need to be updated under supervised learning. The results are then applied to the target domain to test the effectiveness. S6. Selection of the base model Choosing CNN or LSTM as the optimization objective for meta-learning, the initial values of all trainable parameters of the base model are... ; S7. Sub-model optimization level adaptation For a subtask in a source domain, the input of the task is the training set. The output is the corresponding Define the optimizable parameters in the subtask model as The initial values of the parameters for all subtasks are defined as follows: After training, an optimizable parameter is obtained for training subtasks. ; S8. Optimizable parameters This parameter's initial value is obtained by applying it to the test set for this task. The loss value for this task; Apply the loss function to each subtask in the source domain to obtain the loss function for the source domain; Assumption As initial parameters for simulating the target domain, we set them before the target domain update step. Minimize the loss function, and obtain the initial parameters of the sub-model through training in the source domain. Used as basic model parameters in the target domain to test the effectiveness of meta-learning; S9. Meta-learning optimization level adaptation Datasets used in training meta-learning models It is generated by sampling from a data distribution, defining meta-learning model parameters, obtaining the loss function in the target domain, and then updating the output parameters through the loss function.
2. The photovoltaic-storage grid power generation prediction method based on model-agnostic meta-learning method according to claim 1, characterized in that, In step S1, the battery charging state includes four types: float charging, no charging, constant voltage, and constant current. The inverter state includes three types: motor, battery, and power saving. These two features are input into the model in the form of one-hot encoding.
3. The photovoltaic-storage grid power generation prediction method based on model-agnostic meta-learning method according to claim 1, characterized in that, After step S9, the following also includes: Step S10. Model Performance Testing Step S9 yields an initial model optimized by the source and target domains, which serves as the initial model parameters for all sub-tasks sampled from the data distribution. This model is then applied to the set of sub-tasks in the source domain to test its effectiveness, depending on the prediction objective.
4. The photovoltaic-storage grid power generation prediction method based on model-agnostic meta-learning method according to claim 1, 2, or 3, characterized in that, The loss function involved in the process falls into two categories: When predicting sequence data, cross-entropy is used as the loss function; When the prediction result follows a distribution, minimizing the KL divergence is the objective for performing end-to-end training. The model output is then determined based on the training data set. The resulting distribution.