Optical power prediction method and system based on machine learning
By performing outlier detection and processing in optical power prediction technology, comprehensive features are constructed, and long-term memory network models and optimization methods are adopted, the problem of insufficient data quality and feature extraction in the existing technology is solved, the accuracy and stability of optical power prediction are improved, and real-time scheduling support is provided for photovoltaic power generation systems.
Patent Information
- Application Number
- CN202411494003.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-25
AI Technical Summary
The existing optical power prediction technology has data anomalies and missing values that affect the accuracy of the model. The feature extraction is not comprehensive enough and the interaction between factors such as geographical information, atmospheric quality and temperature cannot be fully considered, resulting in the model need to be improved in terms of accuracy, stability and generalization capabilities.
Through strict outlier detection and processing, linear interpolation method is used to process missing values, comprehensive geographical dynamic characteristics, light attenuation characteristics and temperature trend characteristics are constructed, and long-term memory network models are used to combine grid search, averaging method and early stop method to improve the performance and stability of the model.
It improves data quality and model performance, enhances the accuracy and stability of optical power prediction, and can conduct optical power prediction in real time, providing timely and effective support for the scheduling of photovoltaic power generation systems.
Smart Images

Figure CN119692512A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a method and system for predicting optical power based on machine learning. Background Art
[0002] As the global demand for clean energy continues to grow, photovoltaic power generation has developed rapidly as a sustainable and pollution-free energy production method; the output power of photovoltaic power generation systems is affected by many factors, among which optical power is one of the most critical factors; accurate prediction of optical power is of great significance for optimizing the operation of photovoltaic power generation systems, improving energy utilization efficiency, and ensuring the stable operation of power grids; in recent years, with the rapid development of machine learning technology, more and more researchers have begun to apply machine learning methods to the field of optical power prediction; through learning and analyzing a large amount of historical data, machine learning models can effectively capture the complex relationship between optical power and various influencing factors, thereby improving the accuracy of optical power prediction;
[0003] However, the prior art still has the following problems:
[0004] First, the data collected in practical applications often contain outliers and missing values, which will affect the accuracy and reliability of the model. Second, optical power is affected by many factors such as geographic information, air quality, and temperature. The existing technology is not comprehensive and in-depth enough in feature extraction, and fails to fully consider the interaction between these factors, resulting in the model being unable to accurately capture the variation of optical power. In addition, the current optical power prediction model needs to be improved in terms of accuracy, stability, and generalization ability. Some traditional prediction methods cannot effectively handle complex nonlinear relationships, and existing machine learning models also have certain difficulties in hyperparameter adjustment and optimization.
[0005] Therefore, the technical field is in urgent need of an optical power prediction method and system based on machine learning to solve the above problems. Summary of the invention
[0006] The present invention provides an optical power prediction method and system based on machine learning, which can effectively solve the above problems; by strictly detecting and processing outliers on data, and using linear interpolation to process missing values, the data quality is improved; comprehensive geographical dynamic characteristics, light attenuation characteristics and temperature trend characteristics are constructed, and the influence of various factors on optical power is fully considered; a long short-term memory network model is adopted, and combined with optimization methods such as grid search, averaging method and early stopping method, the performance and stability of the model are improved; at the same time, the present invention can perform optical power prediction in real time, and provide timely and effective support for the scheduling of photovoltaic power generation systems.
[0007] On the one hand, the present invention provides an optical power prediction method based on machine learning, comprising:
[0008] Step 1: Collect historical and current optical power data, geographic information data, and air quality data to form historical data sets and current data sets, and perform outlier detection and processing;
[0009] Step 2: construct the geographic dynamic features, light attenuation features, and temperature trend features of the historical data set and the current data set respectively, and generate historical feature information and current feature information;
[0010] Step 3: Input the historical feature information into the long short-term memory network model to perform optical power prediction training;
[0011] Step 4: Evaluate and optimize the long short-term memory network model based on the training results, and finally generate an optical power prediction model;
[0012] Step 5, inputting the current characteristic information into the optical power prediction model to calculate the optical power prediction value;
[0013] Step six, applying the light power prediction value to the scheduling process of the photovoltaic power generation system.
[0014] According to a method for optical power prediction based on machine learning provided by the present invention, in step 1, the optical power data, geographic information data and air quality data include:
[0015] The optical power data are optical power measurements at different time points;
[0016] The geographic information data is the latitude and longitude information and hour angle information at the time corresponding to the optical power data;
[0017] The air quality data is the meteorological information at the time corresponding to the optical power data.
[0018] According to a method for predicting optical power based on machine learning provided by the present invention, in step 1, the process of detecting and processing abnormal values includes:
[0019] The 3σ rule is used for outlier detection, that is, if a data point in the data set deviates from the mean by more than three times the standard deviation, it is considered an outlier and is removed;
[0020] Linear interpolation method was used to process missing values in the data after outliers were removed.
[0021] According to a method for optical power prediction based on machine learning provided by the present invention, in step 2, the process of respectively constructing geographic dynamic features, light attenuation features, and temperature trend features of the historical data set and the current data set to generate historical feature information and current feature information includes:
[0022] S21, constructing geographic dynamic features: constructing solar altitude angle features based on geographic information and time information, and the construction formula is:
[0023]
[0024] Where h is the solar altitude angle, is the latitude, δ is the solar declination, and H is the hour angle;
[0025] S22, construct light attenuation characteristics: construct light attenuation characteristics based on air quality data, and the construction formula is:
[0026] I=I0e -αd
[0027] Where I is the attenuated light intensity, d is the atmospheric thickness, α is the attenuation coefficient, and I0 is the initial light intensity;
[0028] S23, construct temperature trend characteristics: introduce the change trend characteristics of meteorological information, that is, the rate of change of temperature in the past period of time, and construct the formula as follows:
[0029]
[0030] Wherein, {t1, t2} is the time interval, T1 and T2 are the temperature values at time points t1 and t2 respectively.
[0031] According to a method for optical power prediction based on machine learning provided by the present invention, in step 4, the evaluation and optimization process includes:
[0032] S41, Model Evaluation: Evaluate model performance based on historical datasets and their validation sets, and calculate observation metrics;
[0033] The observation index includes the determination coefficient R 2 And the root mean square error RMSE, the evaluation formula is:
[0034]
[0035] Where n is the number of data groups in the historical data set, i is the index of the data group; y i is the real optical power corresponding to the data group, is the predicted optical power corresponding to the data group, is the mean value of each real optical power;
[0036] S42, presetting an observation index threshold, comparing the current observation index with the threshold, and determining whether to optimize the model based on the comparison result;
[0037] S43, for the model to be optimized, the number of LSTM layers, the number of hidden units and the learning rate in the model are adjusted by using a grid search method;
[0038] S44, repeating steps S41 to S43 until the current observation index is less than the threshold, and generating an optimized optical power prediction model.
[0039] According to a method for predicting optical power based on machine learning provided by the present invention, step S43 further includes:
[0040] The averaging method is used to combine multiple different long short-term memory network models to improve the stability and accuracy after optimization.
[0041] According to a method for predicting optical power based on machine learning provided by the present invention, step S44 further includes:
[0042] The early stopping method is used to prevent overfitting. That is, when the loss function on the validation set no longer decreases within several consecutive epochs, the training is stopped and the current optimal optical power prediction model is saved.
[0043] On the other hand, the present invention provides an optical power prediction system based on machine learning, comprising:
[0044] A data collection module, which is used to collect historical and current optical power data, geographic information data, and air quality data, and to establish historical data sets and current data sets;
[0045] A preprocessing module, connected to the data collection module, for detecting and processing outliers on the collected data set;
[0046] A feature construction module, which is connected to the preprocessing module and is used to construct the geographic dynamic features, light attenuation features and temperature trend features of the historical data set and the current data set respectively, and generate historical feature information and current feature information;
[0047] A training optimization module, which is connected to the feature construction module, is used to input historical feature information into the long short-term memory network model to perform optical power prediction training, evaluate and optimize the long short-term memory network model based on the training results, and finally generate an optical power prediction model;
[0048] A prediction application module is connected to the feature construction module and the training optimization module, and is used to input current feature information into the optical power prediction model, calculate the optical power prediction value, and apply the optical power prediction value to the scheduling process of the photovoltaic power generation system.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] 1. Improve data quality: This application uses the 3σ rule for outlier detection, which can accurately identify and remove outliers in the data set, avoid the interference of abnormal data on model training, and improve the reliability of data; the missing value processing of the data after removing outliers is carried out by linear interpolation method, which ensures the integrity of the data and enables subsequent analysis and modeling to proceed smoothly;
[0051] 2. More comprehensive feature extraction: The solar altitude angle feature is constructed based on geographic information and time information, fully considering the impact of geographic location and time on optical power; the light attenuation feature is constructed using atmospheric quality data. The introduction of this feature enables the model to better adapt to different atmospheric conditions and improves the accuracy of optical power prediction; temperature changes may cause changes in the performance of photovoltaic cells, thereby affecting the output of optical power. By constructing temperature trend features, the model can better capture this change and improve the accuracy of prediction;
[0052] 3. Improve model performance: The long short-term memory network LSTM model can effectively process the long-term dependency of time series data. Compared with traditional prediction methods, the LSTM model can better capture the dynamic changes of optical power and improve the accuracy of prediction. By adjusting the hyperparameters of the LSTM model such as the number of layers, the number of hidden units, and the learning rate through grid search, the optimal hyperparameter combination can be found to improve the performance of the model. At the same time, the averaging method is used to combine multiple different LSTM models, which can further improve the stability and accuracy of the model.
[0053] 4. Enhanced real-time performance: This application can collect current optical power data, geographic information data, and air quality data in real time, and input them into the optimized optical power prediction model to calculate the optical power prediction value; this enables the photovoltaic power generation system to be scheduled and optimized in a timely manner according to the optical power prediction results, thereby improving the efficiency and stability of the system;
[0054] In summary, the optical power prediction method and system based on machine learning proposed in this application have significant advantages in data quality, feature extraction, model performance and real-time performance, and can provide more accurate and reliable support for the optimized operation of photovoltaic power generation systems.
[0055] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0056] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0058] Figure 1 It is a flowchart of an optical power prediction method based on machine learning provided by an embodiment of the present invention;
[0059] Figure 2 It is a structural schematic diagram of an optical power prediction system based on machine learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0061] Example 1
[0062] This embodiment provides a method for predicting optical power based on machine learning. Figure 1 ,include:
[0063] Step 1: Collect historical and current optical power data, geographic information data, and air quality data to form historical data sets and current data sets, and perform outlier detection and processing;
[0064] Step 2: construct the geographic dynamic features, light attenuation features, and temperature trend features of the historical data set and the current data set respectively, and generate historical feature information and current feature information;
[0065] Step 3: Input the historical feature information into the long short-term memory network model to perform optical power prediction training;
[0066] Step 4: Evaluate and optimize the long short-term memory network model based on the training results, and finally generate an optical power prediction model;
[0067] Step 5, inputting the current characteristic information into the optical power prediction model to calculate the optical power prediction value;
[0068] Step six, applying the light power prediction value to the scheduling process of the photovoltaic power generation system.
[0069] The principle of the above embodiment is: by comprehensively utilizing multi-source data (optical power data, geographic information data and air quality data), by constructing targeted features (geographic dynamic features, light attenuation features and temperature trend features), and using a long short-term memory network model suitable for processing time series data for training and prediction; during the training process, continuously evaluating and optimizing the model to improve the accuracy and stability of the prediction; and finally applying the predicted optical power value to the scheduling of the photovoltaic power generation system to achieve optimized management of the photovoltaic power generation system.
[0070] The beneficial effects of the above embodiments are: by detecting and processing outliers and processing missing values, the reliability and integrity of the data are ensured, providing a good data basis for accurate prediction; a variety of features are constructed, fully considering the impact of various factors such as geographic information, air quality and temperature on optical power, thereby improving the accuracy of prediction; a long short-term memory network model is adopted, and combined with hyperparameter optimization, model combination and anti-overfitting methods, the performance and stability of the model are improved; the current data can be collected in real time for prediction, and the prediction results can be applied to the scheduling of photovoltaic power generation systems, thereby improving the efficiency and stability of the system.
[0071] In order to further optimize the above embodiment, in step 1, the optical power data, geographic information data and air quality data include:
[0072] The optical power data are the optical power measurements at different time points;
[0073] The geographic information data is the latitude and longitude information and hour angle information at the time corresponding to the optical power data;
[0074] The air quality data is the meteorological information at the time corresponding to the optical power data.
[0075] It should be noted that optical power data is the optical power measurement value at different time points, which directly reflects the amount of light energy received at a specific moment. By collecting optical power data at different time points, a time series can be formed to provide a basis for subsequent analysis and prediction. These measurement values can come from the monitoring equipment of the photovoltaic power station or other optical power measurement instruments.
[0076] The longitude and latitude information in the geographic information data determines the geographical location of the photovoltaic power station; different geographical locations will be affected by different angles and intensities of sunlight; the hour angle information is related to time, which reflects the change of the position of the sun in the sky over time; combining the longitude and latitude and hour angle information, the geographical dynamic characteristics such as the solar altitude angle can be calculated, so as to better understand the impact of lighting conditions on optical power;
[0077] Atmospheric quality data is meteorological information at the time corresponding to the optical power data, such as cloud thickness, humidity, atmospheric pollution level, etc. These meteorological factors affect the propagation and attenuation of light in the atmosphere, thereby affecting the optical power. By collecting atmospheric quality data, light attenuation characteristics can be constructed to more accurately predict the changes in optical power under different atmospheric conditions.
[0078] Optical power data, geographic information data, and air quality data are all collected at corresponding times. This ensures that when making optical power predictions, the information of various factors is synchronized and can more accurately reflect the actual situation. For example, if the optical power is measured at a certain point in time, and the longitude and latitude, hour angle, and meteorological information at that time are also collected, then when constructing features and conducting model training, the relationship between these factors and optical power can be established more accurately.
[0079] In order to further optimize the above embodiment, in step 1, the process of outlier detection and processing includes:
[0080] The 3σ rule is used for outlier detection, that is, if a data point in the data set deviates from the mean by more than three times the standard deviation, it is considered an outlier and is removed;
[0081] Linear interpolation method was used to process missing values in the data after outliers were removed.
[0082] It should be noted that the historical data set is represented as:
[0083] D={(x1,y1),(x1,y1),···,(x n ,y n ),}, where x n for
[0084] Input feature vector, y n Actual optical power value;
[0085] The outliers in the data are detected and processed using the 3σ rule, that is, if the deviation of a data point from the mean exceeds three times the standard deviation, it is considered an outlier and is removed. The specific steps are as follows:
[0086] First, determine the mean μ and standard deviation σ of the data;
[0087] For data point d, if |d-μ|>3σ, then d is eliminated.
[0088] For data missing value processing, linear interpolation is used; the specific process is:
[0089] For missing values in time series data, assume that the values of two adjacent time points are y1 and y2, the corresponding times are t1 and t2, and the time point to be interpolated is t, then the interpolation result is
[0090]
[0091] The above method can effectively identify data points that are significantly deviated from the normal range. The processed data is more suitable for specific models and analysis methods, thereby improving the accuracy and reliability of predictions.
[0092] In order to further optimize the above embodiment, in step 2, the geographic dynamic features, light attenuation features, and temperature trend features of the historical data set and the current data set are respectively constructed, and the process of generating the historical feature information and the current feature information includes:
[0093] S21, constructing geographic dynamic features: constructing solar altitude angle features based on geographic information and time information, and the construction formula is:
[0094]
[0095] Where h is the solar altitude angle, is the latitude, δ is the solar declination, and H is the hour angle;
[0096] S22, construct light attenuation characteristics: construct light attenuation characteristics based on air quality data, and the construction formula is:
[0097] I=I0e -αd
[0098] Where I is the attenuated light intensity, d is the atmospheric thickness, α is the attenuation coefficient, and I0 is the initial light intensity;
[0099] S23, construct temperature trend characteristics: introduce the change trend characteristics of meteorological information, that is, the rate of change of temperature in the past period of time, and construct the formula as follows:
[0100]
[0101] Wherein, {t1, t2} is the time interval, T1 and T2 are the temperature values at time points t1 and t2 respectively.
[0102] It should be noted that the solar altitude angle reflects the relative height of the sun to the observation point, which changes with the geographical location and time. Different solar altitude angles will lead to different light intensities, thus affecting the optical power. The above formula can accurately calculate the solar altitude angle at a specific location and time as geographical dynamic feature information;
[0103] Various factors in the atmosphere will cause light to attenuate during propagation, and different atmospheric qualities will have different attenuation degrees. The above formula can be used to calculate the attenuation of light under specific atmospheric conditions, thus reflecting the impact of atmospheric quality on optical power;
[0104] Temperature changes affect the performance of photovoltaic cells, thus affecting the optical power. By calculating the rate of change of temperature, the trend of temperature change can be captured as an important feature;
[0105] The geographic dynamic feature reflects the change in light angle, the light attenuation feature takes into account the influence of the atmosphere on light, and the temperature trend feature captures the impact of temperature changes on the performance of photovoltaic cells. Combining these features can more comprehensively describe the change law of light power.
[0106] In order to further optimize the above embodiment, in step 4, the evaluation and optimization process includes:
[0107] S41, Model Evaluation: Evaluate model performance based on historical datasets and their validation sets, and calculate observation metrics;
[0108] The observed indicators include the coefficient of determination R 2 And the root mean square error RMSE, the evaluation formula is:
[0109]
[0110] Where n is the number of data groups in the historical data set, i is the index of the data group; y i is the real optical power corresponding to the data group, is the predicted optical power corresponding to the data group, is the mean value of each real optical power;
[0111] S42, presetting an observation index threshold, comparing the current observation index with the threshold, and determining whether to optimize the model based on the comparison result;
[0112] S43, for the model to be optimized, the number of LSTM layers, the number of hidden units and the learning rate in the model are adjusted by using a grid search method;
[0113] S44, repeating steps S41 to S43 until the current observation index is less than the threshold, and generating an optimized optical power prediction model.
[0114] It should be noted that the calculation of the coefficient of determination and the root mean square error can quantitatively measure the prediction ability of the model. 2 ) reflects the degree of fit of the model to the data. The closer its value is to 1, the better the model fit is. The root mean square error (RMSE) indicates the average error between the predicted value and the true value. The smaller its value is, the higher the prediction accuracy of the model is.
[0115] The purpose of presetting the observation index threshold is to determine whether the model needs further optimization. If the current observation index exceeds the threshold, it means that the performance of the model still has room for improvement and needs to be optimized. By comparing the current observation index with the threshold, the optimization direction of the model can be clarified;
[0116] For models that need to be optimized, grid search is used to adjust the number of LSTM layers, the number of hidden units, and the learning rate. Grid search is a parameter tuning method that traverses all possible combinations within a given parameter range, trains and evaluates the model for each combination, and finally selects the parameter combination with the best performance. By adjusting these hyperparameters, the performance and generalization ability of the model can be improved.
[0117] It should be further explained that the structure of the long short-term memory network LSTM model is as follows:
[0118] First, the internal state update formula of the LSTM unit is:
[0119] Forget gate: f t =σ(W f ·{h t-1 , x t}+b f ), where W f is the weight matrix of the forget gate, b f is the bias term, σ is the sigmoid function, h t-1 is the hidden state at the previous moment, x t It is the characteristic information of the current input.
[0120] Input gate: i t =σ(W i ·{h t-1 , x t}+b i ), W i and b i are the weight matrix and bias term of the input gate respectively.
[0121] Candidate status: W C and b C is the weight matrix and bias term corresponding to the candidate state.
[0122] Update cell status: C t =f t ⊙C t-1 +i t ⊙C t , where ⊙ represents element-wise multiplication.
[0123] Output gate: o t =σ(W o ·{h t-1, x t}+b o ), W o and b o is the weight matrix and bias term of the output gate.
[0124] Hide status update:h t =o t ⊙tanh(C t );
[0125] Finally, for optical power prediction, assume that after multiple time steps of LSTM processing, the final hidden state is obtained The predicted optical power value can be calculated by the following formula:
[0126]
[0127] Among them, W y is the weight matrix of the output layer, b y is the bias term.
[0128] So, the steps of the grid search method are as follows:
[0129] First, determine the hyperparameter combination to search for. For example, for the three hyperparameters of LSTM, the number of layers, the number of hidden units, and the learning rate, you can set a grid where each hyperparameter has several different values.
[0130] Assume that the number of LSTM layers is [1, 2, 3], the number of hidden units is [32, 64, 128], and the learning rate is [0.001, 0.01, 0.1].
[0131] Then, the model is trained and evaluated for each hyperparameter combination. The specific steps are as follows:
[0132] For each set of hyperparameter combinations, the LSTM model is trained using the training data. During the training process, the model is initialized according to the set hyperparameter values.
[0133] After training, the model is evaluated using the validation set. Metrics such as root mean square error (RMSE), mean absolute percentage error (MAPE), or coefficient of determination (R 2 )wait.
[0134] Finally, compare the model performance under different hyperparameter combinations and select the hyperparameter combination with the best performance. For example, if the RMSE of the model on the validation set is the smallest under a certain set of hyperparameter combinations, then select this set of hyperparameters as the optimal hyperparameter combination.
[0135] In order to further optimize the above embodiment, step S43 further includes:
[0136] The averaging method is used to combine multiple different long short-term memory network models to improve the stability and accuracy after optimization.
[0137] It should be noted that different LSTM models may produce different prediction results during the training process due to factors such as the randomness of the initial parameters and slight differences in the data. Combining multiple models through the averaging method can reduce the fluctuation of a single model, thereby improving the stability of the overall prediction. For example, a model may have a large deviation on some data points, but other models may perform better on these points. The impact of this deviation can be reduced by averaging; multiple different models may learn the characteristics and laws of data from different perspectives. Combining them can combine the advantages of each model to improve the accuracy of the prediction. For example, one model may be more sensitive to a certain type of data pattern, while another model may be better at other patterns. The combination can better adapt to various situations.
[0138] In order to further optimize the above embodiment, step S44 further includes:
[0139] The early stopping method is used to prevent overfitting. That is, when the loss function on the validation set no longer decreases within several consecutive epochs, the training is stopped and the current optimal optical power prediction model is saved.
[0140] It should be noted that during the model training process, as the training progresses, the model may gradually overfit the training data, resulting in good performance on the training set, but degraded performance on the validation set or new data. The early stopping method monitors the loss function on the validation set and stops training when the loss function no longer decreases within several consecutive epochs, thereby avoiding further overfitting of the model; the early stopping method helps to find a model with good performance on both the training set and the validation set, and improves the generalization ability of the model. Such a model is more likely to make accurate predictions when faced with new data; if the early stopping method is not used, the model may continue to train for a long time, consuming a lot of computing resources. The early stopping method can stop training at the appropriate time, saving computing time and resources.
[0141] Example 2
[0142] This embodiment provides an optical power prediction system based on machine learning. Figure 2 ,include:
[0143] A data collection module, which is used to collect historical and current optical power data, geographic information data, and air quality data, and to establish historical data sets and current data sets;
[0144] A preprocessing module, which is connected to the data collection module and is used to detect and process outliers on the collected data set;
[0145] A feature construction module, which is connected to the preprocessing module, is used to construct the geographic dynamic features, light attenuation features, and temperature trend features of the historical data set and the current data set, respectively, and generate historical feature information and current feature information;
[0146] A training optimization module, which is connected to the feature construction module, is used to input historical feature information into the long short-term memory network model to perform optical power prediction training, evaluate and optimize the long short-term memory network model based on the training results, and finally generate an optical power prediction model;
[0147] The prediction application module is connected to the feature construction module and the training optimization module, and is used to input the current feature information into the optical power prediction model, calculate the optical power prediction value, and apply the optical power prediction value to the scheduling process of the photovoltaic power generation system.
[0148] It should be noted that the data collection module is responsible for collecting historical and current optical power data, geographic information data, and air quality data. These data are the basis for optical power prediction, covering the optical power measurement values at different time points, the latitude and longitude information and hour angle information (geographic information data) at the time corresponding to the optical power data, and the meteorological information (air quality data) at the time corresponding to the optical power data. By collecting these multi-source data, rich information can be provided for subsequent analysis and prediction. Establish historical data sets and current data sets for model training and real-time prediction, respectively.
[0149] The preprocessing module is connected to the data collection module and receives data from the data collection module. This module mainly performs outlier detection and processing. It uses the 3σ rule to detect data points in the data set that deviate more than three times the standard deviation from the mean and removes them to improve the reliability of the data. At the same time, the linear interpolation method is used to process missing values of the data after removing outliers to ensure the integrity of the data.
[0150] The feature construction module is connected to the preprocessing module and receives the preprocessed data. Geographic dynamic features (sun altitude angle features based on geographic information and time information), light attenuation features (light attenuation features based on air quality data), and temperature trend features (introducing the trend of meteorological information, i.e., the rate of change of temperature over a period of time) are constructed for the historical data set and the current data set respectively. Historical feature information and current feature information are generated to provide more valuable input for subsequent model training and prediction.
[0151] The training optimization module is connected to the feature construction module to receive historical feature information. The historical feature information is input into the long short-term memory network model for optical power prediction training. Based on the training results, the long short-term memory network model is evaluated, and the model performance is measured using observation indicators such as the coefficient of determination and the root mean square error. For the model that needs to be optimized, the number of LSTM layers, the number of hidden units, and the learning rate are adjusted using a grid search method. The averaging method can also be used to combine multiple different LSTM models to improve stability and accuracy, and the early stopping method is used to prevent overfitting. Finally, the optimized optical power prediction model is generated.
[0152] The prediction application module is connected with the feature construction module and the training optimization module to receive the current feature information and the optimized optical power prediction model. The current feature information is input into the optical power prediction model to calculate the optical power prediction value. The optical power prediction value is applied to the scheduling process of the photovoltaic power generation system, such as adjusting the output power of the power generation system in advance, combining with the energy storage system to improve energy utilization efficiency and ensure the stability of power supply.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting optical power based on machine learning, characterized in that: include: Step 1: Collect historical and current optical power data, geographic information data, and air quality data to form historical data sets and current data sets, and perform outlier detection and processing; Step 2: construct the geographic dynamic features, light attenuation features, and temperature trend features of the historical data set and the current data set respectively, and generate historical feature information and current feature information; Step 3: Input the historical feature information into the long short-term memory network model to perform optical power prediction training; Step 4: Evaluate and optimize the long short-term memory network model based on the training results, and finally generate an optical power prediction model; Step 5, inputting the current characteristic information into the optical power prediction model to calculate the optical power prediction value; Step six, applying the light power prediction value to the scheduling process of the photovoltaic power generation system.
2. The optical power prediction method based on machine learning according to claim 1, characterized in that: In step 1, the optical power data, geographic information data and air quality data include: The optical power data are optical power measurements at different time points; The geographic information data is the latitude and longitude information and hour angle information at the time corresponding to the optical power data; The air quality data is the meteorological information at the time corresponding to the optical power data.
3. The optical power prediction method based on machine learning according to claim 2 is characterized in that: In step 1, the process of outlier detection and processing includes: The 3σ rule is used for outlier detection, that is, if a data point in the data set deviates from the mean by more than three times the standard deviation, it is considered an outlier and is removed; Linear interpolation method was used to process missing values in the data after outliers were removed.
4. The optical power prediction method based on machine learning according to claim 3 is characterized in that: In step 2, the process of respectively constructing the geographic dynamic features, light attenuation features, and temperature trend features of the historical data set and the current data set to generate the historical feature information and the current feature information includes: S21, constructing geographic dynamic features: constructing solar altitude angle features based on geographic information and time information, and the construction formula is: Where h is the solar altitude angle, is the latitude, δ is the solar declination, and H is the hour angle; S22, construct light attenuation characteristics: construct light attenuation characteristics based on air quality data, and the construction formula is: I=I0e -αd Where I is the attenuated light intensity, d is the atmospheric thickness, α is the attenuation coefficient, and I0 is the initial light intensity; S23, construct temperature trend characteristics: introduce the change trend characteristics of meteorological information, that is, the rate of change of temperature in the past period of time, and construct the formula as follows: Wherein, {t1, t2} is the time interval, T1 and T2 are the temperature values at time points t1 and t2 respectively.
5. The optical power prediction method based on machine learning according to claim 4 is characterized in that: In step 4, the evaluation and optimization process includes: S41, Model Evaluation: Evaluate model performance based on historical datasets and their validation sets, and calculate observation metrics; The observation index includes the determination coefficient R 2 And the root mean square error RMSE, the evaluation formula is: Where n is the number of data groups in the historical data set, i is the index of the data group; y i is the real optical power corresponding to the data group, is the predicted optical power corresponding to the data group, is the mean value of each real optical power; S42, presetting an observation index threshold, comparing the current observation index with the threshold, and determining whether to optimize the model based on the comparison result; S43, for the model to be optimized, the number of LSTM layers, the number of hidden units and the learning rate in the model are adjusted by using a grid search method; S44, repeating steps S41 to S43 until the current observation index is less than the threshold, and generating an optimized optical power prediction model.
6. The optical power prediction method based on machine learning according to claim 5, characterized in that: The step S43 further includes: The averaging method is used to combine multiple different long short-term memory network models to improve the stability and accuracy after optimization.
7. The optical power prediction method based on machine learning according to claim 5, characterized in that: The step S44 further includes: The early stopping method is used to prevent overfitting. That is, when the loss function on the validation set no longer decreases within several consecutive epochs, the training is stopped and the current optimal optical power prediction model is saved.
8. An optical power prediction system based on machine learning, based on the method of claims 1-7, characterized in that: include: A data collection module, which is used to collect historical and current optical power data, geographic information data, and air quality data, and to establish historical data sets and current data sets; A preprocessing module, connected to the data collection module, for detecting and processing outliers on the collected data set; A feature construction module, which is connected to the preprocessing module and is used to construct the geographic dynamic features, light attenuation features and temperature trend features of the historical data set and the current data set respectively, and generate historical feature information and current feature information; A training optimization module, which is connected to the feature construction module, is used to input historical feature information into the long short-term memory network model to perform optical power prediction training, evaluate and optimize the long short-term memory network model based on the training results, and finally generate an optical power prediction model; A prediction application module is connected to the feature construction module and the training optimization module, and is used to input current feature information into the optical power prediction model, calculate the optical power prediction value, and apply the optical power prediction value to the scheduling process of the photovoltaic power generation system.