Photovoltaic power station output power prediction method, terminal and medium
Through the combination of self-organized mapping network and meta-learning model, real-time and cross-regional adaptability of photovoltaic power plant power generation station power prediction are achieved, solving the problems of low prediction accuracy and insufficient adaptability in the prior art, and significantly improving the accuracy and reliability of prediction.
Patent Information
- Application Number
- CN202411770649.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The existing photovoltaic power prediction methods face low prediction accuracy and lack real-time response and cross-regional adaptability when facing dynamic weather changes, cross-regional differences and environmental emergencies.
Adoptional mapping network and meta-learning model are adopted, combined with real-time meteorological data for environmental pattern recognition and cross-regional knowledge transfer, dynamically select power prediction models suitable for current environmental conditions, and real-time feedback and optimization are performed through personalized recommendation strategy models.
Real-time, dynamic and cross-regional adaptability of photovoltaic power station power prediction have been achieved, which significantly improves the accuracy and reliability of the prediction, and can effectively deal with different meteorological conditions and regional differences.
Smart Images

Figure CN119726664A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of machine learning, and in particular relates to a method, terminal and medium for predicting output power of a photovoltaic power station. Background Art
[0002] As one of the main sources of renewable energy, photovoltaic power generation technology plays a vital role in the transformation of the global energy structure. With the continuous expansion of photovoltaic power generation, power forecasting of photovoltaic power stations has gradually become a key link in energy dispatching and grid stability assurance. Due to the characteristics of photovoltaic power generation—that is, light intensity, weather conditions and seasonal changes have a significant impact on power generation—accurate power forecasting not only helps energy dispatching and avoids grid fluctuations, but also improves the economic benefits and operational efficiency of photovoltaic power generation. However, existing photovoltaic power forecasting methods still face multiple technical bottlenecks, which affect the accuracy of forecasts and the adaptability of the system, especially in the face of challenges such as dynamic weather changes, cross-regional differences and sudden environmental factors.
[0003] Traditional photovoltaic power prediction methods mostly rely on technologies such as statistical models, physical models, and machine learning models. Statistical models usually fit the relationship between photovoltaic power generation and meteorological factors through historical data. However, these methods have great limitations when dealing with complex weather changes. Physical models are based on the physical principles of photovoltaic power generation and simulate the power generation process under different meteorological conditions. However, due to the need to consider too many parameters and the high complexity of the model, real-time response is often not possible. In addition, with the rise of machine learning technology, regression analysis or deep learning methods based on historical data and meteorological conditions have gradually been widely used. However, although these methods can improve prediction accuracy in some cases, they still have many problems. For example, in the face of sudden meteorological changes (such as heavy rain, strong light, gusts, etc.), traditional machine learning models cannot dynamically adjust model parameters, resulting in a decrease in prediction accuracy. In addition, due to differences in geographical and climatic conditions, when cross-regional photovoltaic sites use the same model for prediction, the generalization ability of the model is often not strong, resulting in unsatisfactory prediction results. Especially in newly deployed photovoltaic power stations, there is usually a lack of sufficient local data, making it difficult to effectively train and optimize the model, which makes the accuracy and stability of cross-regional photovoltaic power prediction particularly prominent.
[0004] At present, although some advanced deep learning methods (such as convolutional neural networks, long short-term memory networks, etc.) have been used for photovoltaic power forecasting, these methods usually rely on a large amount of training data and are not sensitive enough to real-time changing meteorological conditions. Especially in different regions and different weather conditions, traditional deep learning models are difficult to achieve rapid model migration and real-time adaptation. In addition, existing methods generally lack the ability to dynamically switch between different environmental conditions, so when dealing with complex weather changes and diverse meteorological environments, their performance is still not ideal. At the same time, although some methods try to enhance stability by combining multiple prediction models, these methods still fail to effectively solve the problems of rapid adaptability and generalization ability of cross-regional predictions. Summary of the invention
[0005] The purpose of the present invention is to propose a photovoltaic power station output power prediction method, terminal and medium, which realizes the real-time, dynamic and cross-regional adaptability of photovoltaic power station power prediction, can effectively cope with the challenges brought by different meteorological conditions and regional differences, and significantly improve the accuracy and reliability of photovoltaic power prediction. Especially in the application scenarios of sudden weather changes, regional climate differences and newly built photovoltaic sites, the present invention provides powerful adaptability and generalization capabilities, and provides more accurate decision support for intelligent scheduling of photovoltaic power generation and power grid management.
[0006] In order to achieve the above object, a first aspect of the present invention provides a method for predicting output power of a photovoltaic power station, the method comprising:
[0007] S1, collect real-time meteorological data and pre-process it;
[0008] S2, construct a self-organizing map network, take the preprocessed data as input, identify and classify different environmental patterns in an unsupervised manner, and predict the photovoltaic power generation;
[0009] S3. Design a regional model of cross-regional knowledge transfer algorithm based on meta-learning model to transfer knowledge between different regions;
[0010] S4, predicting the category of the current meteorological environment based on the new meteorological data collected in real time, and then calculating the prediction error of each regional model under the new environmental data, and selecting the regional model with the smallest error for power prediction;
[0011] S5. Build a personalized recommendation strategy model based on the predicted power to provide real-time feedback and optimization for power prediction.
[0012] Furthermore, the self-organizing map network first combines the pre-processed data with the environmental model for recognition training, then matches the environmental data with the time series data, and finally predicts the photovoltaic power generation power to capture the photovoltaic power generation rules under different environmental modes.
[0013] Furthermore, the self-organizing map network is first combined with the pre-processed data and the environment model for recognition training, specifically including:
[0014] Assume that the grid size of the self-organizing map network is M×M, and each node w j ,j∈[1,M 2 ], each node w j represents a neuron, w j ∈R d , the weight vector w of each neuron j With meteorological data x′ i The dimensions are the same and are used to characterize the meteorological patterns in the region;
[0015] For each input data x′ i , and calculate the Euclidean distance between it and all neuron weight vectors:
[0016]
[0017] Then select the neuron w with the smallest distance BMU , that is, the best matching unit:
[0018]
[0019] Through the mechanism of competitive learning, the neuron weights of the best matching unit neighborhood are updated to make them forward to the input data x′ i The specific update formula is:
[0020]
[0021] Among them, w j (t) represents neuron w j The weight at time t, η(t) is the learning rate, h BMU,j (t) is the influence function of the BMU neighborhood;
[0022] During the training process, the self-organizing map network maps the meteorological pattern of the input data set x to a two-dimensional grid, where each neuron w j The corresponding area is regarded as an environmental mode area;
[0023] After the training is completed, the entire grid is subjected to pattern recognition, and adjacent regions with similar neuron weights are clustered into one class to form different meteorological pattern regions {C1, C2, ..., CK}, each region represents a meteorological mode category;
[0024] In view of the temporal nature of meteorological data, a time regularization term λ is introduced t , the meteorological data at different times are distinguished by weighting:
[0025]
[0026] Among them, λ t Represents the time weight, which is used to adjust the influence of meteorological data in different periods on the clustering results, thereby solving the problem of meteorological patterns changing over time.
[0027] After training, the self-organizing map network maps the meteorological data onto a two-dimensional grid and generates clustering results {C1, C2, ..., C K} represents different pattern areas in meteorological data, each category C k The center point w k Typical weather conditions for the current model.
[0028] Furthermore, the environmental data is matched with the time series data, and finally the photovoltaic power generation is predicted to capture the photovoltaic power generation law under different environmental modes, specifically including:
[0029] For the new meteorological data x′ i , calculate its relationship with each environment pattern category center point w k The Euclidean distance of:
[0030] D(x′ i ,C k )=∥x′ i -w k ∥
[0031] Then select the category with the smallest distance As the matching pattern of the current weather data:
[0032]
[0033] After environmental pattern recognition and matching, combined with environmental categories Predict photovoltaic power generation:
[0034] Design a power prediction model based on environment category The power prediction model Perform regression analysis on environmental categories:
[0035] Assume that for each environment category C k Design a power prediction model based on historical data P historicalFor training, assume that P historical For environment mode C k The goal of training the model is to:
[0036]
[0037] Finally, based on meteorological pattern recognition and matching, the output power of the photovoltaic power generation system under current meteorological conditions is predicted.
[0038] Furthermore, the S3 specifically includes:
[0039] Design a meta-learning model training objective based on unrelated meta-learning to predict photovoltaic power generation under different meteorological modes, and optimize it on historical data by minimizing the loss function. At the same time, introduce a regional weighting mechanism to enable the meta-learning model to transfer knowledge and adapt to changes in different meteorological regions.
[0040] After the training phase is completed, the meta-learning model is quickly adapted through irrelevant meta-learning. The meta-learning model after rapid adaptation will be used to predict photovoltaic power generation under the new meteorological mode, and finally the predicted power generation of the area will be output.
[0041] Furthermore, the training objective of the meta-learning model is expressed as follows:
[0042]
[0043] in, is the meta-learning model loss function, x′ i For region C k The input features, P i is the actual power generation in this area, is the predicted power generation, D k For region C k The training data set, |D k | represents the number of training samples;
[0044] The regional weighting mechanism specifically includes:
[0045] For each region C k , in the meta-learning model training process, introduce the weighted loss function
[0046]
[0047] in, For region C k The weighting factor reflects the influence of the region on the model training; the weighting factor The calculation is as follows:
[0048]
[0049] Among them, |D k | is region C k The amount of data, It is the sum of the data volume in all regions;
[0050] After the training phase is completed, the meta-learning model is quickly adapted through irrelevant meta-learning, and the meta-learning model after rapid adaptation is used for photovoltaic power generation prediction under the new meteorological mode, and finally the predicted power generation of the area is output, specifically including:
[0051] In the new area C new In the testing phase, we first use the parameters θ′ optimized by irrelevant meta-learning to make predictions. According to the irrelevant meta-learning algorithm, the process of rapid adaptation is as follows:
[0052]
[0053] Among them, β is the adaptive learning rate, It is area C new Test loss on ;
[0054] is the loss function A regular term is introduced to suppress overfitting of the model under small sample data:
[0055]
[0056] Among them, λ reg is the regularization coefficient, It is the L2 norm of the gradient of the meta-learning model, which can effectively control the complexity of the model and prevent overfitting in new small sample areas.
[0057] Furthermore, the S4 specifically includes:
[0058] The new meteorological data is input into the environmental pattern classification network to identify the category of the current meteorological environment, and the output is the predicted environmental pattern label. The environmental pattern classification network is optimized using the cross entropy loss.
[0059] For each regional model, calculate its prediction error under the new environmental data, and select the model with the smallest error for power prediction, which is expressed as follows:
[0060]
[0061] Select the model with the smallest error:
[0062]
[0063] Introduce L2 regularization term to avoid overfitting and ensure the generalization ability of the model:
[0064]
[0065] Where λ is the regularization coefficient, is the L2 norm of the model parameters;
[0066] If the prediction error of the selected regional model exceeds a preset threshold, the parameters of the model are adjusted through an optimization algorithm to better fit the new environmental data; the optimization algorithm is expressed as follows:
[0067]
[0068] Where γ is the learning rate, is the loss function with respect to the parameters The gradient of is the updated parameter;
[0069] Power predictions are made on new environment data through the selected and tuned meta-learned model.
[0070] Furthermore, the S5 specifically includes:
[0071] A personalized recommendation strategy model is designed according to the user's personalized demand vector and the global state output by the meta-learning model, and then the personalized recommendation strategy model is optimized by using a deep neural network; wherein the user's personalized demand vector includes the user's electricity consumption behavior characteristics and the user's demand for scheduling response; wherein the user's personalized demand vector is expressed as:
[0072]
[0073] in, is the power load of user i at time t; is the time delay for the user to respond to the scheduling request; is the maximum response capability of the user at time t; is the user's preferred scheduling period, representing the time window that he or she prioritizes;
[0074] The output of the personalized recommendation strategy model is:
[0075]
[0076] Among them, f θ It is a deep neural network model obtained through training, and θ represents the weight of the network. It is a personalized dispatching strategy, which indicates the power dispatching instruction that user i needs to execute at time t;
[0077] A comprehensive utility function is designed to quantify specific scheduling decisions, and a dynamic adjustment mechanism is designed. When the global state or the user's personalized demand vector changes, the personalized recommendation strategy will be updated according to real-time feedback; the comprehensive utility function It is expressed as follows:
[0078]
[0079] in, is the load satisfaction of user i at time t, usually measured by the difference between the actual power supply and the user's demand; is the response efficiency, which takes into account how quickly the user responds to the dispatch within the specified time; is the electricity cost saved by the user, which measures the impact of the dispatch strategy on the economic benefits of the user; γ1, γ2 and γ3 represent the corresponding weights;
[0080] When the global state or the user's personalized demand vector changes, the personalized recommendation strategy will be updated according to the real-time feedback. After each strategy is executed, the real-time reward is calculated. To evaluate the effect of the current strategy, it is expressed as:
[0081]
[0082] in, and The same is true for the user load satisfaction and cost savings mentioned before; α1, α2 are adjustment factors that control the priority of different utilities;
[0083] Design a weighted fusion mechanism to transform the global state a t Personalization strategy Perform synthesis to generate the final scheduling strategy It is expressed as:
[0084]
[0085] Among them, λ1 and λ2 are weighting coefficients;
[0086] Evaluate the long-term benefits of personalized strategies and update them based on continuous user feedback. Whenever new load patterns, changes in user demand, or unforeseen emergencies occur, the final dispatch strategy needs to be adjusted in a timely manner; the long-term benefits are calculated by periodically calculating the average value of the user utility function. To evaluate the long-term effectiveness of the strategy:
[0087]
[0088] Where T is the length of the evaluation period, is the user utility value at each time t;
[0089] Whenever encountering new load patterns, changes in user demand or unforeseen emergencies, the final dispatch strategy needs to be adjusted in a timely manner, introducing the adaptive regularization term Ensure efficient updating of personalized recommendation models under real-time feedback:
[0090]
[0091] in, is a regularization term that controls the difference between the personalized strategy and the global strategy; β1, β2 are regularization factors that control the weights of the two regularization terms; is the update amount of the final scheduling strategy.
[0092] According to a second aspect of the present invention, a terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can be used to execute any of the above-mentioned methods when executing the program.
[0093] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, which can be used to execute any of the above-mentioned methods when the program is executed by a processor.
[0094] The beneficial technical effects of the present invention are at least as follows:
[0095] (1) The present invention uses a self-organizing map network (SOM) to cluster and pattern recognize meteorological data, divides photovoltaic power generation behavior under different meteorological conditions into multiple modes (such as sunny, cloudy, overcast, stormy, etc.), and automatically identifies the current environmental mode based on real-time environmental data. Under each environmental mode, the power change law of photovoltaic power generation has significant differences. Therefore, the present invention dynamically selects the power prediction model that best suits the current environmental conditions through the switching mechanism of the environmental mode, thereby realizing adaptive dynamic adjustment in the face of rapidly changing weather. This method overcomes the problem of the traditional method's slow response to environmental changes and improves the real-time and accuracy of the prediction.
[0096] (2) The present invention, combined with meta-learning technology, can solve the problems of data scarcity and knowledge migration in cross-regional photovoltaic power prediction. By jointly training photovoltaic data from different regions and using the meta-learning framework to learn the common characteristics between regions, the rapid migration and adjustment of cross-regional photovoltaic power prediction models can be achieved. In newly deployed photovoltaic power stations, the system can quickly adjust the existing model parameters through a small amount of local data to adapt to new climate and environmental conditions, significantly improving the cross-regional adaptability of the model. This method solves the problem of insufficient prediction accuracy of traditional models when applied across regions, and is particularly suitable for the problem of data scarcity in newly built sites.
[0097] (3) The present invention integrates multiple photovoltaic power prediction models for different environmental modes and combines them with real-time environmental mode recognition to propose a dynamic model switching mechanism. When changes in meteorological conditions are detected, the system can quickly switch to the model that best suits the current environmental mode for power prediction, thereby achieving flexible adaptation to sudden meteorological events (such as heavy rain, strong light, etc.) and long-term seasonal changes. This overcomes the shortcomings of the existing methods of fixed models and lack of flexibility, and improves the robustness and accuracy of the system in complex environments.
[0098] (4) The present invention realizes the real-time, dynamic and cross-regional adaptability of photovoltaic power station power forecasting, can effectively cope with the challenges brought by different meteorological conditions and regional differences, and significantly improves the accuracy and reliability of photovoltaic power forecasting. Especially in the application scenarios of sudden weather changes, regional climate differences and new photovoltaic sites, the present invention provides powerful adaptability and generalization capabilities, providing more accurate decision support for intelligent scheduling of photovoltaic power generation and power grid management. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.
[0100] Figure 1 The present invention is a flowchart of a photovoltaic power station output power prediction method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0101] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0102] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting output power of a photovoltaic power station, the method comprising the following steps S1-S5:
[0103] S1. Collect real-time meteorological data and perform preprocessing.
[0104] Specifically, real-time meteorological data is collected from multiple sensors and meteorological service platforms (such as light, temperature, humidity, wind speed, etc.). Each meteorological data source may have time delays or different data quality, and the reliability information of the data source needs to be identified and recorded during the collection phase.
[0105] Further, noise removal and missing value processing:
[0106] The random noise in the data is removed by applying the Local Weighted Regression (LWR) algorithm. Specifically, assuming that the original meteorological data set is D = {d1, d2, ..., d n}, where each d i Indicates that at time point t i The meteorological data collected on the LWR is D′={d1′,d2′,...,d n '}, the formula is as follows:
[0107]
[0108] Among them, W(t i ,t j ) is based on time point t i and t j The weighting function of the distance between j is time point t j of meteorological data.
[0109] The missing values are filled using an interpolation method based on the K-nearest neighbor (KNN) algorithm. For the missing value position i, its distance d to other known values is calculated. i , select the nearest K neighboring data points {d j}, and then use the weighted average method to fill in the missing values. The formula is as follows:
[0110]
[0111] Among them, ω j Represents the weight of data point j, which is usually inversely proportional to the distance between data points.
[0112] Furthermore, in order to ensure the consistency of the scale of different meteorological data, Z-score standardization is used to process all meteorological data. Assume that each meteorological data is x i , whose mean and standard deviation are μ and σ respectively, then the standardized data x' i for:
[0113]
[0114] Among them, x' is the standardized meteorological data, μ is the mean of the data, and σ is the standard deviation of the data.
[0115] Furthermore, the preprocessed data is converted into a unified format and output as a multidimensional matrix X = {x1, x2, ..., x n}, where each x iRepresents the standardized meteorological characteristics at each time point.
[0116] At the same time, in order to support the subsequent environmental pattern recognition steps (such as SOM), the meteorological data and timestamps at each time point are combined into a time series dataset to enable pattern recognition for different time periods.
[0117] Furthermore, the standardized and denoised meteorological dataset X is in a matrix format, and each sample contains a timestamp, meteorological parameters, and related identification information.
[0118] S2. Construct a self-organizing map network, take the preprocessed data as input, identify and classify different environmental patterns in an unsupervised manner, and predict the photovoltaic power generation power.
[0119] Specifically, in step 1, the input meteorological data set X = {x'1, x'2, ..., x' n}, which includes data standardization and noise removal. Next, the meteorological data is used for environmental pattern recognition and clustering through the self-organizing map network (SOM). As an unsupervised learning model, SOM can effectively extract potential patterns from complex meteorological data and map them into a two-dimensional grid, thereby completing the spatial division of meteorological patterns.
[0120] Furthermore, after preprocessing the meteorological dataset X, each x′ i Represents a set of meteorological features at a point in time, including measurements of factors such as light intensity, temperature, humidity, wind speed, etc. The data dimension is d.
[0121] Further, SOM training and environmental pattern recognition: Assume that the grid size of the SOM model is M×M, and each node w j (j∈[1,M 2 ]) represents a neuron, w j ∈R d The weight vector w of each neuron is j With meteorological data x' i The dimension of is the same as that of , which is used to characterize the meteorological pattern of the area.
[0122] For each input data x' i , the present invention calculates the Euclidean distance between it and all neuron weight vectors:
[0123]
[0124] Then select the neuron w with the smallest distance BMU , that is, the best matching unit (Best Matching Unit, BMU):
[0125]
[0126] Through the mechanism of competitive learning, the weights of neurons in the BMU neighborhood are updated to make them respond to the input data x' i The specific update formula is:
[0127] w j (t+1)=w j (t)+η(t)·h BMU,j (t)·(x' i -w j (t))
[0128] Among them, w j (t) represents neuron w j The weight at time t, η(t) is the learning rate, h BMU,j (t) is the influence function of the BMU neighborhood, usually defined as a Gaussian function:
[0129]
[0130] where r j is the neuron w j is the two-dimensional grid position of , and σ(t) is the width of the neighborhood function that decays as the training progresses.
[0131] Furthermore, during training, SOM maps the meteorological patterns of the input dataset X onto a two-dimensional grid. Each neuron w j The corresponding area can be regarded as an environmental pattern area. After the training is completed, the present invention performs pattern recognition on the entire grid, clusters adjacent areas with similar neuron weights into one class, and forms different meteorological pattern areas {C1, C2, ..., C K}, each region represents a meteorological mode category.
[0132] Since meteorological patterns have strong temporal and spatial correlation, some special regularization terms are needed in the clustering process to avoid overfitting and over-segmentation. In order to enhance the sensitivity to time series data, this paper introduces a time regularization term λ according to the time series of meteorological data. t , the meteorological data at different times are distinguished by weighting:
[0133]
[0134] Among them, λ t Represents the time weight, which is used to adjust the influence of meteorological data in different periods on the clustering results, thereby solving the problem of meteorological patterns changing over time.
[0135] Furthermore, after training, SOM maps meteorological data onto a two-dimensional grid and generates clustering results for environmental pattern recognition. These clustering results {C1, C2, ..., C K} represents different pattern categories in meteorological data, each category C k The center point w k This is the typical meteorological condition of this mode.
[0136] Furthermore, in step 1, the environmental patterns of meteorological data are extracted and clustered through the SOM network. Next, the current meteorological data is matched with these environmental patterns to provide support for photovoltaic power generation prediction. Assuming that the new meteorological input is x' i The present invention first calculates its relationship with each environmental pattern category C k The most similar mode is selected for prediction.
[0137] Furthermore, the environmental matching formula is: for the new meteorological data x', calculate its matching with the center point w of each environmental pattern category k The Euclidean distance of:
[0138] D(x',C k )=∥x' i -w k ∥
[0139] Then select the category with the smallest distance As the matching pattern of the current weather data:
[0140]
[0141] Furthermore, the photovoltaic power generation prediction model: after environmental pattern recognition and matching, the environmental categories obtained in the previous steps are combined The present invention can further predict the photovoltaic power generation. In order to capture the photovoltaic power generation law under different environmental modes, a power prediction model based on environmental categories is designed. The model combines environmental categories with meteorological factors such as light and temperature to perform regression analysis.
[0142] Further, assuming that for each environment category C k Design a power prediction model based on historical data P historical Perform training. Assume P historical For environment mode C k The goal of training the model is to:
[0143]
[0144] Furthermore, finally, based on meteorological pattern recognition and matching, the output power of the photovoltaic power generation system under current meteorological conditions is predicted. This output power value will be used in the power dispatching and energy management system of the photovoltaic power station to provide support for subsequent load forecasting and grid dispatching.
[0145] S3. Design a regional model of cross-regional knowledge transfer algorithm based on meta-learning model to transfer knowledge between different regions.
[0146] Specifically, the meta-learning model adopts the Model-Agnostic Meta-Learning (MAML) framework, which can be used in multiple meteorological regions. k After training, it can be trained in a new area C new It can quickly adapt to the environment and achieve ideal prediction results with a small amount of sample data. Assume that through the above step 2, different regions C k Clustering results and corresponding historical photovoltaic power generation data set The present invention will perform model training on these data and optimize the model parameters θ.
[0147] The training goal of the present invention is to train a photovoltaic power generation prediction model It can predict photovoltaic power generation under different meteorological modes and optimize it on historical data by minimizing the loss function. for:
[0148]
[0149] Among them, x' i For region C k Input features (such as meteorological data), P i is the actual power generation in this area, is the predicted power generation, D k For region C k The training data set, |D k | represents the number of training samples.
[0150] Furthermore, in order to enable the model to effectively transfer knowledge and adapt to changes in different meteorological regions, the present invention introduces a regional weighting mechanism The weighting factor The weighting mechanism is determined by evaluating the quality of historical data in each region, the similarity between regions, and the importance of the region in the overall photovoltaic power generation system, so that the influence of different regions on the global model training can be reasonably adjusted. This weighting mechanism helps to transfer the knowledge of important regions to new regions and improve the cross-regional adaptability.
[0151] Weighted loss function: For each region C k In the model training process, the present invention introduces a weighted loss function
[0152]
[0153] in, For region C k The weighting factor reflects the influence of the region on the model training. This factor can be dynamically adjusted based on factors such as the amount of historical data in the region, the stability of meteorological conditions, and the prediction accuracy.
[0154] Furthermore, the present invention defines For region C k The weight can usually be calculated as follows:
[0155]
[0156] Among them, |D k | is region C k The amount of data, is the sum of all the data in all regions. This calculation method makes the regions with more historical data have greater influence in the training process, helping the model to better transfer the learned knowledge.
[0157] Furthermore, after the training phase is completed, the model is quickly adapted using the MAML algorithm. Assume that the new meteorological region C new There is new weather data x' new The present invention will quickly adjust the model parameters through the meta-learning framework so that the model can new In the new region C new In the testing phase, the present invention first uses the parameter θ′ optimized by MAML for prediction, but at this time θ′ needs to be further adjusted by a small number of test samples. According to the MAML algorithm, the process of rapid adaptation is as follows:
[0158]
[0159] Among them, β is the adaptive learning rate, It is area C new The test loss on .
[0160] Furthermore, in order to better adapt to the new environment mode and avoid overfitting, the present invention introduces a regularization term into the loss function to suppress the overfitting of the model under small sample data:
[0161]
[0162] Among them, λreg is the regularization coefficient, It is the L2 norm of the model gradient, which can effectively control the complexity of the model and prevent overfitting in new small sample areas.
[0163] Furthermore, the meta-learning model after rapid adaptation Will be used in the new weather model C new The photovoltaic power generation power forecast under the current situation is finally output to the predicted power generation power of the area.
[0164] Through the above design, the model can perform transfer learning in different meteorological regions, and when faced with new meteorological patterns, by quickly adjusting model parameters, the photovoltaic power generation prediction model can effectively adapt to new environmental conditions and provide more accurate predictions.
[0165] This step mainly achieves knowledge transfer and rapid adaptation between different meteorological regions by combining the meta-learning (MAML) framework, regional weighting mechanism and specific regularization term design. This solution can help the photovoltaic power generation prediction model learn from historical data and adapt to new meteorological patterns, improve the accuracy of cross-regional predictions, and optimize the scheduling and management of photovoltaic power generation systems.
[0166] S4. Predict the category of the current meteorological environment based on the new meteorological data collected in real time, then calculate the prediction error of each regional model under the new environmental data, and select the regional model with the smallest error for power prediction.
[0167] Specifically, collect new environmental data: x new = {I new ,T new ,H new ,…}, including radiation I new , Temperature T new 、Humidity new Etc. These data reflect current meteorological and environmental patterns.
[0168] Furthermore, the environmental data x new Input environment pattern classification network The network is used to identify the category of the current meteorological environment and output the predicted environmental pattern label.
[0169] Among them, the classification network output:
[0170]
[0171] in is the environmental data x new The environmental pattern prediction is φ, and φ is the parameter of the network.
[0172] Furthermore, the cross entropy loss is used to optimize the environmental pattern classification network
[0173]
[0174] Where II is the indicator function, y i is the real environment mode label, is the predicted label, P(y i |x new ) is the predicted probability of the label.
[0175] Furthermore, the selection criteria are: for each regional model Calculate its new environment data x new The prediction error under the condition is calculated and the model with the smallest error is selected for power prediction.
[0176] Among them, the error of each regional model is:
[0177]
[0178] Select the model with the smallest error:
[0179]
[0180] Furthermore, the L2 regularization term is introduced to avoid overfitting and ensure the generalization ability of the model:
[0181]
[0182] Where λ is the regularization coefficient, is the L2 norm of the model parameters.
[0183] Further, parameter fine-tuning:
[0184] If the prediction error of the selected regional model exceeds the preset threshold ∈ threshold , then adjust the parameters of the model through the optimization algorithm Make it better fit the new environment data.
[0185] The parameter update formula is:
[0186]
[0187] Where γ is the learning rate, is the loss function with respect to the parameters The gradient of is the updated parameter.
[0188] Furthermore, power prediction:
[0189] By selecting and adjusting the model Environmental data x new To make a power prediction:
[0190]
[0191] in, Indicates the updated regional model For new environment data x new Power prediction performed.
[0192] This step can effectively improve the accuracy of photovoltaic power prediction in complex meteorological changes by dynamically selecting the most appropriate regional model and adaptive adjustment mechanism, and ensure the stability and adaptability of the system under different environmental modes.
[0193] S5. Build a personalized recommendation strategy model based on the predicted power to provide real-time feedback and optimization for power prediction.
[0194] Specifically, in this stage, the input is the scheduling strategy optimization result a from the previous stage t , System Status t and real-time feedback data t Through these data, personalized needs are identified and modeled for each user or user group, and user needs are further refined. Personalized demand vectors are constructed by combining historical power load, response mode, preference and other data with time series analysis. This demand vector includes the user's electricity consumption behavior characteristics and the user's demand for dispatch response:
[0195]
[0196] in, is the power load of user i at time t. is the time delay for the user to respond to the scheduling request. is the maximum response capability of the user at time t. is the user's preferred scheduling period, representing the time window that he or she prioritizes.
[0197] Furthermore, the user groups are divided into different demand groups through clustering algorithms (such as K-means or density-based clustering algorithm DBSCAN), which can help to perform personalized scheduling more accurately.
[0198] Furthermore, in the personalized recommendation strategy model, the core goal is to and the system global state s t , output the user's personalized scheduling strategy Thereby achieving dynamic optimization of the power system. Here, the present invention adopts a recommendation system model based on a deep neural network θ Optimize decision making.
[0199] Furthermore, the recommendation strategy model generates personalized scheduling decisions based on the user demand vector and system status through a deep learning model:
[0200]
[0201] Among them, f θ It is a deep neural network model obtained through training, and θ represents the weight of the network. It is a personalized dispatching strategy, which represents the power dispatching instruction that user i needs to execute at time t.
[0202] Furthermore, the user utility function It is used to quantify the user's satisfaction under a specific scheduling decision. This utility function not only considers the satisfaction of the user's power demand, but also considers the efficiency of the response and the saving of related costs. Therefore, the present invention designs a comprehensive utility function including multiple aspects:
[0203]
[0204] in, It is the load satisfaction of user i at time t, which is usually measured by the difference between the actual power supply and the user's demand. It is the response efficiency, which takes into account how quickly the user responds to the dispatch within the specified time. It is the electricity cost saved by the user, which measures the impact of the dispatch strategy on the user's economic benefits. The weight coefficients γ1, γ2, and γ3 in the user utility function reflect the relative importance of different factors to the user and depend on the user's personalized needs.
[0205] Furthermore, in order to respond to real-time changes in the system, the present invention designs a dynamic adjustment mechanism. t or user feedback t Personalized recommendation strategy when changes occur It will be updated based on real-time feedback. After each strategy is executed, the effectiveness of the current strategy is evaluated by calculating the real-time reward:
[0206]
[0207] in, and The same is true for user load satisfaction and cost savings mentioned before; α1 and α2 are adjustment factors that control the priority of different utilities. The personalized recommendation model f is trained by reinforcement learning or incremental training method.θ Make adjustments and update the model parameters θ to better adapt to the real-time feedback.
[0208] Furthermore, while realizing personalized dispatch, it is necessary to combine personalized strategy with global dispatch strategy to ensure the coordination and optimization of the entire power system. Therefore, the present invention designs a weighted fusion mechanism to combine the global strategy a t Personalization strategy Perform synthesis to generate the final scheduling strategy
[0209] By introducing weight coefficients λ1 and λ2, the global strategy and personalized strategy are weighted and integrated according to different priorities:
[0210]
[0211] Among them, a t It is a global dispatch strategy to ensure that the power system is optimally dispatched at the global level; It is a personalized scheduling strategy that optimizes the needs of specific users or user groups. The weighting coefficients λ1 and λ2 can be dynamically adjusted according to system load, user demand changes and real-time feedback to ensure the flexibility and adaptability of the system.
[0212] Furthermore, the long-term personalized scheduling strategy needs to be adjusted and optimized through periodic effect evaluation. At the end of each cycle, the present invention evaluates the long-term benefits of the personalized strategy and updates the strategy based on the continuous feedback from users.
[0213] By periodically calculating the average value of the user utility function To evaluate the long-term effectiveness of the strategy:
[0214]
[0215] Where T is the length of the evaluation period, is the user utility value at each time t.
[0216] Furthermore, according to the long-term feedback results, the parameters θ of the personalized recommendation model are further adjusted through an optimization algorithm (such as a genetic algorithm or simulated annealing) to improve the overall benefit.
[0217] Furthermore, as the power dispatching system continues to evolve, the diversity and real-time nature of user needs require the system to be continuously optimized. Whenever the system encounters new load patterns, changes in user demand, or unforeseen emergencies, the personalized recommendation system needs to be adjusted in a timely manner.
[0218] Furthermore, an adaptive regularization term is introduced to ensure efficient updating of the personalized recommendation model under real-time feedback:
[0219]
[0220] in, is a regularization term that controls the difference between the personalized strategy and the global strategy; β1, β2 are regularization factors that control the weights of the two regularization terms.
[0221] Another embodiment of the present invention provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it can be used to execute any one of the methods in the above embodiments of the present invention.
[0222] Optionally, the memory is used to store programs; the memory may include volatile memory (English: volatile memory), such as random access memory (English: random-access memory, abbreviated: RAM), such as static random access memory (English: static random-access memory, abbreviated: SRAM), double data rate synchronous dynamic random access memory (English: Double Data Rate Synchronous Dynamic Random Access Memory, abbreviated: DDR SDRAM), etc.; the memory may also include non-volatile memory (English: non-volatile memory), such as flash memory (English: flash memory). The memory is used to store computer programs (such as applications, functional modules, etc. that implement the above method), computer instructions, etc., and the above computer programs, computer instructions, etc. can be partitioned and stored in one or more memories. And the above computer programs, computer instructions, data, etc. can be called by the processor.
[0223] The above-mentioned computer programs, computer instructions, etc. may be stored in one or more memories in partitions, and the above-mentioned computer programs, computer instructions, data, etc. may be called by a processor.
[0224] The processor is used to execute the computer program stored in the memory to implement the various steps in the method involved in the above embodiment. For details, please refer to the relevant description in the above method embodiment.
[0225] The processor and the memory may be independent structures or integrated structures. When the processor and the memory are independent structures, the memory and the processor may be coupled and connected via a bus.
[0226] Another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program can be used to execute any one of the methods in the above embodiments of the present invention.
[0227] The above embodiment of the present invention provides a method for predicting the output power of a photovoltaic power station, the method comprising: collecting real-time meteorological data and preprocessing it; constructing a self-organizing mapping network, taking the preprocessed data as input, identifying and classifying different environmental modes in an unsupervised manner, and predicting the photovoltaic power generation power; designing a regional model of a cross-regional knowledge transfer algorithm based on a meta-learning model, and performing knowledge transfer between different regions; predicting the category of the current meteorological environment according to the new meteorological data collected in real time, and then calculating the prediction error of each regional model under the new environmental data, and selecting the regional model with the smallest error for power prediction; constructing a personalized recommendation strategy model according to the predicted power to provide real-time feedback and optimization for power prediction. The present invention realizes the real-time, dynamic and cross-regional adaptability of photovoltaic power station power prediction, can effectively cope with the challenges brought by different meteorological conditions and regional differences, and significantly improves the accuracy and reliability of photovoltaic power prediction. Especially in the application scenarios of sudden weather changes, regional climate differences and newly built photovoltaic sites, the present invention provides powerful adaptability and generalization capabilities, and provides more accurate decision support for intelligent scheduling and power grid management of photovoltaic power generation.
[0228] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. A method for predicting output power of a photovoltaic power station, characterized in that: The method comprises: S1, collect real-time meteorological data and pre-process it; S2, construct a self-organizing map network, take the preprocessed data as input, identify and classify different environmental patterns in an unsupervised manner, and predict the photovoltaic power generation; S3. Design a regional model of cross-regional knowledge transfer algorithm based on meta-learning model to transfer knowledge between different regions; S4, predicting the category of the current meteorological environment based on the new meteorological data collected in real time, and then calculating the prediction error of each regional model under the new environmental data, and selecting the regional model with the smallest error for power prediction; S5. Build a personalized recommendation strategy model based on the predicted power to provide real-time feedback and optimization for power prediction.
2. A method for predicting output power of a photovoltaic power station according to claim 1, characterized in that: The self-organizing map network first combines the pre-processed data with the environmental model for recognition training, then matches the environmental data with the time series data, and finally predicts the photovoltaic power generation power to capture the photovoltaic power generation rules under different environmental modes.
3. A method for predicting output power of a photovoltaic power station according to claim 2, characterized in that: The self-organizing map network first combines the pre-processed data with the environment model for recognition training, specifically including: Assume that the grid size of the self-organizing map network is M×M, and each node w j ,j∈[1,M 2 ], each node w j represents a neuron, w j ∈R d , the weight vector w of each neuron j With meteorological data x′ i The same dimension is used to characterize the meteorological pattern of the region; For each input data x′ i , and calculate the Euclidean distance between it and all neuron weight vectors: Then select the neuron w with the smallest distance BMU , that is, the best matching unit: Through the mechanism of competitive learning, the neuron weights of the best matching unit neighborhood are updated so that they are consistent with the input data x′ i The specific update formula is: w j (t+1)=w j (t)+η(t)·h BMU,j (t)·(x′ i -w j (t)) Among them, w j (t) represents neuron w j The weight at time t, η(t) is the learning rate, h BMU,j (t) is the influence function of the BMU neighborhood; During the training process, the self-organizing map network maps the meteorological pattern of the input data set x to a two-dimensional grid, where each neuron w j The corresponding area is regarded as an environmental mode area; After the training is completed, the entire grid is subjected to pattern recognition, and adjacent regions with similar neuron weights are clustered into one class to form different meteorological pattern regions {C1, C2, ..., C K }, each region represents a meteorological mode category; In view of the temporal nature of meteorological data, a time regularization term λ is introduced t , the meteorological data at different times are distinguished by weighting: Among them, λ t Represents the time weight, which is used to adjust the influence of meteorological data in different periods on the clustering results, thereby solving the problem of meteorological patterns changing over time. After training, the self-organizing map network maps the meteorological data onto a two-dimensional grid and generates clustering results {C1, C2, ..., C K } represents different pattern areas in meteorological data, each category C k The center point w k Typical weather conditions for the current model.
4. A method for predicting output power of a photovoltaic power station according to claim 3, characterized in that: The environmental data is matched with the time series data, and finally the photovoltaic power generation is predicted to capture the photovoltaic power generation law under different environmental modes, specifically including: For the new weather data x′ i , calculate its relationship with each environment pattern category center point w k The Euclidean distance of: D(x′ i ,C k )=∥x′ i -w k ∥ Then select the category with the smallest distance As the matching pattern of the current weather data: After environmental pattern recognition and matching, combined with environmental categories Predict photovoltaic power generation: Design a power prediction model based on environment category The power prediction model Perform regression analysis on environmental categories: Assume that for each environment category C k Design a power prediction model based on historical data P historical For training, assume that P historical For environment mode C k The goal of training the model is to: Finally, based on meteorological pattern recognition and matching, the output power of the photovoltaic power generation system under current meteorological conditions is predicted.
5. A method for predicting output power of a photovoltaic power station according to claim 1, characterized in that: The S3 specifically includes: Design a meta-learning model training objective based on unrelated meta-learning to predict photovoltaic power generation under different meteorological modes, and optimize it on historical data by minimizing the loss function. At the same time, introduce a regional weighting mechanism to enable the meta-learning model to transfer knowledge and adapt to changes in different meteorological regions. After the training phase is completed, the meta-learning model is quickly adapted through irrelevant meta-learning. The meta-learning model after rapid adaptation will be used to predict photovoltaic power generation under the new meteorological mode, and finally the predicted power generation of the area will be output.
6. A method for predicting output power of a photovoltaic power station according to claim 5, characterized in that: The training objective of the meta-learning model is expressed as follows: in, is the meta-learning model loss function, x′ i For region C k The input features, P i is the actual power generation in this area, is the predicted power generation, D k For region C k The training data set, |D k | represents the number of training samples; The regional weighting mechanism specifically includes: For each region C k , in the meta-learning model training process, introduce the weighted loss function in, For region C k The weighting factor reflects the influence of the region on the model training; the weighting factor The calculation is as follows: Among them, |D k | is region C k The amount of data, It is the sum of the data volume in all regions; After the training phase is completed, the meta-learning model is quickly adapted through irrelevant meta-learning, and the meta-learning model after rapid adaptation is used for photovoltaic power generation prediction under the new meteorological mode, and finally the predicted power generation of the area is output, specifically including: In the new area C new In the testing phase, we first use the parameters θ′ optimized by irrelevant meta-learning to make predictions. According to the irrelevant meta-learning algorithm, the process of rapid adaptation is as follows: Among them, β is the adaptive learning rate, It is area C new Test loss on ; is the loss function A regular term is introduced to suppress overfitting of the model under small sample data: Among them, λ reg is the regularization coefficient, It is the L2 norm of the gradient of the meta-learning model, which can effectively control the complexity of the model and prevent overfitting in new small sample areas.
7. A method for predicting output power of a photovoltaic power station according to claim 6, characterized in that: The S4 specifically includes: The new meteorological data is input into the environmental pattern classification network to identify the category of the current meteorological environment, and the output is the predicted environmental pattern label. The environmental pattern classification network is optimized using the cross entropy loss. For each regional model, calculate its prediction error under the new environmental data, and select the model with the smallest error for power prediction, which is expressed as follows: Select the model with the smallest error: Introduce L2 regularization term to avoid overfitting and ensure the generalization ability of the model: Where λ is the regularization coefficient, is the L2 norm of the model parameters; If the prediction error of the selected regional model exceeds a preset threshold, the parameters of the model are adjusted through an optimization algorithm to better fit the new environmental data; the optimization algorithm is expressed as follows: Where γ is the learning rate, is the loss function with respect to the parameters The gradient of is the updated parameter; Power predictions are made on new environment data through the selected and tuned meta-learned model.
8. A method for predicting output power of a photovoltaic power station according to claim 1, characterized in that: The S5 specifically includes: A personalized recommendation strategy model is designed according to the user's personalized demand vector and the global state output by the meta-learning model, and then the personalized recommendation strategy model is optimized by using a deep neural network; wherein the user's personalized demand vector includes the user's electricity consumption behavior characteristics and the user's demand for scheduling response; wherein the user's personalized demand vector is expressed as: in, is the power load of user i at time t; is the time delay for the user to respond to the scheduling request; is the maximum response capability of the user at time t; is the user's preferred scheduling period, representing the time window that he or she prioritizes; The output of the personalized recommendation strategy model is: Among them, f θ It is a deep neural network model obtained through training, and θ represents the weight of the network. It is a personalized dispatching strategy, which indicates the power dispatching instruction that user i needs to execute at time t; A comprehensive utility function is designed to quantify specific scheduling decisions, and a dynamic adjustment mechanism is designed. When the global state or the user's personalized demand vector changes, the personalized recommendation strategy will be updated according to real-time feedback; the comprehensive utility function It is expressed as follows: in, is the load satisfaction of user i at time t, usually measured by the difference between the actual power supply and the user's demand; is the response efficiency, which takes into account how quickly the user responds to the dispatch within the specified time; is the electricity cost saved by the user, which measures the impact of the dispatch strategy on the economic benefits of the user; γ1, γ2 and γ3 represent the corresponding weights; When the global state or the user's personalized demand vector changes, the personalized recommendation strategy will be updated according to the real-time feedback. After each strategy is executed, the real-time reward is calculated. To evaluate the effect of the current strategy, it is expressed as: in, and The same is true for the user load satisfaction and cost savings mentioned before; α1, α2 are adjustment factors that control the priority of different utilities; Design a weighted fusion mechanism to transform the global state a t Personalization strategy Perform synthesis to generate the final scheduling strategy It is expressed as: Among them, λ1 and λ2 are weighting coefficients; Evaluate the long-term benefits of personalized strategies and update them based on continuous user feedback. Whenever new load patterns, changes in user demand, or unforeseen emergencies occur, the final dispatch strategy needs to be adjusted in a timely manner; the long-term benefits are calculated by periodically calculating the average value of the user utility function. To evaluate the long-term effectiveness of the strategy: Where T is the length of the evaluation period, is the user utility value at each time t; Whenever encountering new load patterns, changes in user demand or unforeseen emergencies, the final dispatch strategy needs to be adjusted in time, introducing the adaptive regularization term Ensure efficient updating of personalized recommendation models under real-time feedback: in, is a regularization term that controls the difference between the personalized strategy and the global strategy; β1, β2 are regularization factors that control the weights of the two regularization terms; is the update amount of the final scheduling strategy.
9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it can be used to perform the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it can be used to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Day-ahead photovoltaic power prediction method, device and system based on CAE and GAN hybrid network
CN114169445A
Photovoltaic power station power prediction method and system
CN115395502A
Short-term photovoltaic generating capacity prediction method based on SOM-BP neural network
CN116565829A
Construction engineering quality monitoring method and device based on artificial intelligence and big data
CN118133087A
Distributed photovoltaic cluster power short-term prediction method based on multi-source information forecast
CN118246586A
Cited By
Meteorological big data-based air water production intelligent prediction and adjustment method and system
CN119961654A
Design method of electrical equipment of photovoltaic power generation system and related product
CN120671322A
Photovoltaic power prediction method and device based on multi-scale meteorological characteristics
CN122315637A