Microgrid-oriented distributed photovoltaic power generation prediction method
By combining statistical learning and machine learning technology, the fusion model is built and parameters are adjusted, the complexity and flexibility problems in photovoltaic power generation prediction are solved, the prediction accuracy and adaptability are improved, and the operation and management of photovoltaic power stations are optimized.
Patent Information
- Application Number
- CN202410611690.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-11-05
AI Technical Summary
Existing photovoltaic power generation prediction technologies are difficult to fully capture complex nonlinear relationships and time series characteristics, especially in extreme weather conditions, with limited responsiveness and lack of flexibility and adaptability, and cannot effectively combine short-term and medium- and long-term forecasting needs.
Data is collected using environmental sensors and performance monitoring modules, and a fusion model is constructed through statistical learning methods and machine learning technology, combining linear regression and long-term memory networks, adjusting model parameters to adapt to prediction needs of different time scales, and through automatic adjustment and visualization tools Optimize prediction accuracy.
It improves the accuracy and adaptability of photovoltaic power generation forecasts, meets short-term and medium- and long-term forecast needs, optimizes energy management and power station operations, and enhances the operating efficiency and economic benefits of photovoltaic power stations.
Smart Images

Figure CN118898051A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of renewable energy technology, and in particular to a distributed photovoltaic power generation prediction method for a microgrid. Background Art
[0002] In the context of the current global energy transformation, renewable energy, especially solar photovoltaic power generation, has become an area that attracts widespread attention. With the rapid development of photovoltaic technology and the continuous decline in costs, photovoltaic power generation systems have been deployed on a large scale around the world. However, since photovoltaic power generation is strongly affected by weather conditions and environmental factors, its power generation has great uncertainty and volatility, which brings challenges to the energy management of photovoltaic power stations and the stable operation of power grids. Especially in the power market environment, how to accurately predict photovoltaic power generation to optimize power station operations and improve economic benefits has become an urgent problem to be solved.
[0003] Existing photovoltaic power generation forecasting technologies mainly focus on using a single model for forecasting, such as traditional statistical learning methods or single machine learning algorithms. Although these methods have improved the accuracy of forecasting to a certain extent, they are still difficult to fully capture the complex nonlinear relationships and time series characteristics in photovoltaic power generation forecasting, especially when faced with extreme weather conditions or emergencies, the response capacity is limited. In addition, most existing methods fail to effectively combine short-term and medium- to long-term forecasting needs, and lack flexibility and adaptability in forecasting model updates and parameter adjustments.
[0004] Therefore, developing a photovoltaic power generation prediction method that can comprehensively utilize the advantages of multiple prediction models, and at the same time has high accuracy, strong adaptability and can meet the prediction needs of different time scales is of great significance for promoting the efficient utilization of photovoltaic energy and the economic operation of photovoltaic power stations. Summary of the invention
[0005] Based on the above objectives, the present invention provides a distributed photovoltaic power generation prediction method for microgrids.
[0006] The distributed photovoltaic power generation prediction method for microgrids includes the following steps:
[0007] S1: Use environmental sensors to collect data on solar radiation intensity, ambient temperature, humidity and wind speed around the photovoltaic equipment, and use a preset performance monitoring module to collect data on photovoltaic panel efficiency, inverter efficiency and status of each component;
[0008] S2: Clean and normalize the data collected in step S1, and extract the features that affect photovoltaic power generation, including sunshine time, environmental influencing factors and equipment performance indicators, through a preset feature extraction algorithm;
[0009] S3: By combining the preset statistical learning method and machine learning technology, a fusion model for photovoltaic power generation prediction is constructed based on the features processed and extracted in step S2;
[0010] S4: According to different prediction requirements, including short-term and medium- to long-term prediction requirements, adjust the parameters of the fusion model constructed in step S3 and perform the prediction task;
[0011] S5: Based on the deviation between the prediction result of S4 and the actual power generation, the parameters of the fusion model are automatically adjusted to optimize the prediction accuracy;
[0012] S6: Present the prediction results optimized in S5 through visualization tools and generate decision support information for energy management and optimization.
[0013] Furthermore, the S1 specifically includes:
[0014] S11: Deploy various types of environmental sensors, including solar radiation sensors for measuring the intensity of solar radiation at the location of the photovoltaic equipment, temperature sensors for determining the ambient temperature, humidity sensors for detecting air humidity, and wind speed sensors for measuring wind speed;
[0015] S12: using a preset performance monitoring module to monitor the photovoltaic system in real time. The performance monitoring module is connected to the communication interface of the photovoltaic system to collect data on photovoltaic panel efficiency and inverter efficiency. The performance monitoring module includes a data acquisition unit and an analysis and processing unit. The data acquisition unit is used to collect operation data of the photovoltaic system, including information on current, voltage, and power generation. The analysis and processing unit is used to calculate photovoltaic panel efficiency and inverter efficiency based on the collected data.
[0016] S13: For monitoring the status of photovoltaic panels and components, the performance monitoring module will also use the built-in fault diagnosis function of the photovoltaic system to detect and record various status information that affect power generation efficiency and system stability in real time, including component aging, hot spot effects, and line failures. The performance monitoring module also identifies whether there are obstructions or pollution problems on the photovoltaic panels by analyzing the current-voltage characteristic curve, thereby accurately evaluating the actual operating efficiency of the photovoltaic panels;
[0017] S14: All data collected by environmental sensors and performance monitoring modules are transmitted to the central processing system via wireless or wired networks to provide data support for subsequent photovoltaic power generation prediction and system optimization.
[0018] Furthermore, the S2 specifically includes:
[0019] S21: First, the environmental and equipment performance data collected in step S1 are preprocessed, including data cleaning and normalization. Data cleaning aims to remove erroneous data records, fill missing values, and identify and correct outliers. Specifically, data cleaning uses the statistical Z-score method to identify and exclude data points that are beyond the normal range. Normalization is to scale the data into a standard range to eliminate the impact of data of different magnitudes, thereby ensuring the consistency and effectiveness of data processing.
[0020] S22: using a preset feature extraction algorithm to extract features from the normalized data, including sunshine time, environmental impact factors, and equipment performance indicators. The feature extraction algorithm specifically uses a principal component analysis method to determine which features have a significant impact on photovoltaic power generation;
[0021] S23: For sunshine time characteristics, the sunrise and sunset times are calculated according to the geographical location and date to determine the potential power generation time of the photovoltaic panels; the environmental impact factor is determined by analyzing the relationship between temperature and power generation efficiency;
[0022] The calculation of sunshine time is performed based on the geographical location and date using an astronomical algorithm. The approximate formula for sunrise and sunset times is expressed as:
[0023] hours, where T is the sunshine time, which means the length of time from sunrise to sunset, in hours; φ is the geographical latitude of the observation site, in degrees; positive values indicate north latitude, and negative values indicate south latitude; δ is the declination of the sun, that is, the angle between the position of the sun on the celestial sphere and the equatorial plane of the earth, in degrees, -0.83° is this particular angle that takes into account the effect of atmospheric refraction on the sunrise and sunset times, as well as the apparent radius of the solar disk;
[0024] Linear regression is used to analyze the relationship between temperature T and power generation efficiency E. The specific analysis formula is:
[0025] E = β0 + β1T + ∈, where E is the power generation efficiency of the photovoltaic panel, expressed as a percentage of the power output to solar energy input ratio; T is the ambient temperature, as an independent variable, indicating the air temperature at the location of the photovoltaic panel, in degrees Celsius (℃); β0 is the intercept term, indicating the baseline value of the power generation efficiency when the temperature T = 0℃; β1 is the slope coefficient of the temperature, quantifying the average impact of each unit (℃) change in temperature on the power generation efficiency E; ∈ is the error term, and the values of β0 and β1 are estimated by the least squares method, which can quantitatively analyze the impact of temperature on power generation efficiency;
[0026] S24: Extraction of equipment performance indicators focuses on analyzing the equipment's operating data, as well as historical maintenance and fault records. Specifically, a time series-based anomaly detection algorithm is used to evaluate the equipment's health status and performance trends.
[0027] Furthermore, the S24 specifically includes:
[0028] S241: constructing a time series of photovoltaic equipment operation data, including indicators of voltage, current and power generation, each time series reflects the performance indicators of the equipment within a predetermined time;
[0029] S242: Use sliding window technology to extract features from time series data and calculate statistical features within each time window, including mean, standard deviation, minimum and maximum values;
[0030] S253: The isolation forest algorithm is used to detect anomalies in the data after feature extraction. The isolation forest algorithm is suitable for processing high-dimensional data. Specifically, the tree structure in the random forest is used to isolate data points. The anomaly points have a shorter path length. The anomaly score calculation formula is: Where x is the data point being evaluated, n is the number of samples, E(h(x)) is the average path length from the root node to the data point x in the tree structure, and c(n) is a factor used for normalization. The closer this score is to 1, the more likely the data point x is an anomaly.
[0031] S254: For the time series points detected as abnormal, the corresponding environmental factors and equipment status are analyzed to determine the cause of the abnormality. Specifically, the abnormality detection results are correlated with the environment and equipment status data to identify the external and internal factors that cause the performance change.
[0032] Furthermore, the S3 specifically includes:
[0033] S31: The linear regression model is selected as the basic statistical learning method to process the direct linear relationship between the features extracted in step S2 and the photovoltaic power generation. The linear regression model is used to predict the linear dependent variable with multiple independent variables;
[0034] S32: Long short-term memory network (LSTM) is used as a machine learning algorithm to handle complex patterns and long-term dependency problems in time series data. LSTM avoids long-term dependency problems through gate structure and is suitable for prediction tasks where photovoltaic power generation changes over time and is affected by multiple factors.
[0035] S33: Use model fusion technology to integrate the prediction results of the linear regression model and the LSTM model. Specifically, the weighted average method is used as the fusion strategy, where the weight is determined based on the performance of each model in the cross-validation process. By integrating the advantages of different models, the prediction accuracy is improved;
[0036] S34: Apply the fusion model of S33 to the actual PV power generation forecast. The fusion model will use the latest environmental data and PV panel performance indicators to make predictions, providing support for the daily operation and long-term planning of PV power plants.
[0037] Furthermore, the S33 specifically includes:
[0038] S331: First, run the linear regression model and LSTM model independently to predict the power generation of the same data set, and generate two sets of prediction results. Let the prediction result of the linear regression model be P LR , the prediction result of the LSTM model is P LSTM ;
[0039] S332: Evaluate the prediction performance of each model using performance indicators, specifically using mean square error (MSE) or root mean square error (RMSE), and calculate the error of each model on the validation set. Suppose the performance indicator of the linear regression model is E LR , the performance index of the LSTM model is E LSTM ;
[0040] S333: Based on the performance index obtained in S332, the weight of each model is calculated. The weight calculation method reflects the relative merits of the model performance. The better the performance of the model, the higher the weight. The weight calculation method is to use the inverse of the performance index as the weight. The specific formula is:
[0041] Among them, W LR is the weight of the linear regression model, W LSTM is the weight of the LSTM model;
[0042] S334: Multiply the prediction results of the two models by the corresponding weights, and then add the weighted results to obtain the final fusion prediction result. The fusion prediction result P fusion The calculation formula is:
[0043] P fusion =W LR ·P LR +W LSTM ·P LSTM ;
[0044] S335: Final fusion prediction result P fusionIt will be used for actual solar power generation prediction tasks and provide data support for operational decisions of photovoltaic systems.
[0045] Furthermore, the S4 specifically includes:
[0046] S41: First define the types of forecasting needs. For short-term forecasting, the focus is on capturing immediate changes, specifically sudden changes in weather conditions. For medium- and long-term forecasting, the focus is on understanding seasonal changes and trends.
[0047] S42: For short-term prediction, adjust the LSTM model parameters to improve the response speed to immediate data changes, especially reduce the memory length of the LSTM layer, which can be achieved by reducing the time step or modifying the number of LSTM units. The purpose is to reduce the model's dependence on past data and make it more sensitive to changes in recent data;
[0048] S43: For medium- and long-term forecasts, increase the memory capacity of the LSTM model by increasing the time step or the number of LSTM units to capture longer-term data dependencies and seasonal trends. At the same time, adjust the parameters of the linear regression model to enhance the modeling ability of long-term trends, including reselecting features or adjusting feature weights.
[0049] S44: for the two forecast demands, respectively perform model training and validation, use corresponding time series data, select corresponding historical data length for model training according to the type of forecast demand, specifically evaluate model performance through cross-validation method, and optimize model parameters based on performance indicators;
[0050] S45: In the model fusion stage, the fusion weights of the linear regression model and the LSTM model are adjusted according to the prediction requirements. In short-term predictions, the LSTM model will be given a higher weight, as it is better at handling short-term data changes. In medium- and long-term predictions, the weight of the linear regression model will be increased to better capture long-term trends.
[0051] Furthermore, the S5 specifically includes:
[0052] S51: First, calculate the deviation between the predicted result and the actual power generation. The deviation is quantified by calculating the error between the predicted value and the actual value. Specifically, the mean square error (MSE) is used as the evaluation indicator: Among them, Y i is the ith observed value of actual power generation, is the corresponding predicted value, and n is the total number of observations;
[0053] S52: Based on the calculated deviation, the prediction performance of the current fusion model is evaluated, and when the prediction performance does not reach a predetermined threshold, the automatic adjustment process of the model parameters is started;
[0054] S53: Use the gradient descent method to automatically adjust the LSTM model parameters. According to the gradient information of the deviation, update the weights and biases of the LSTM model to reduce the prediction error. The update formula is: Among them, w new and w old Respectively represent the model weights before and after the update, α is the learning rate, is the gradient of MSE with respect to the weight;
[0055] S54: For the linear regression model, adjust the model coefficients to reduce the prediction bias by re-performing the parameter estimation process of the linear regression and recalculating the optimal coefficients based on the current data set using the least squares method;
[0056] S55: After adjusting the individual model parameters, re-evaluate the fusion model weights and redistribute the fusion weights using a weighted average method based on the updated model performance;
[0057] S56: Repeat steps S51-S55 until the prediction performance of the model reaches or exceeds a predetermined performance threshold, or the change in the model parameter update is lower than a set minimum threshold, to avoid overfitting.
[0058] Furthermore, the S6 specifically includes:
[0059] S61: First, use data visualization software or library to display the forecast results in the form of charts, including time series charts to show the changes of actual power generation and forecast power generation over time; error charts to show the deviation between the forecast value and the actual value;
[0060] S62: Calculate performance indicators based on the prediction results, including prediction accuracy, energy utilization, and system load matching;
[0061] S63: Generate energy management decision support information, including energy storage scheduling recommendations, maintenance and upgrade recommendations, and demand-side management;
[0062] S64: Presents all data and decision support information through an interactive dashboard that allows users to view forecast results and performance indicators based on different time scales, including hours, days, and months, and receive targeted management and optimization recommendations.
[0063] Beneficial effects of the present invention:
[0064] The present invention, by combining statistical learning methods and advanced machine learning techniques, especially long short-term memory networks (LSTM), can effectively process and analyze complex time series data and improve the accuracy of photovoltaic power generation prediction. This fusion strategy not only utilizes the advantages of statistical methods in processing linear relationships, but also gives full play to the powerful ability of deep learning in capturing nonlinear patterns and long-term dependencies. Therefore, compared with a single model method, the present invention can more accurately predict photovoltaic power generation, providing strong support for the operation and management of photovoltaic power stations and participation in the power market.
[0065] The present invention meets the prediction needs of different time scales, including short-term (hourly) and medium- and long-term (daily and monthly) predictions, by flexibly adjusting the model parameters. This adjustment mechanism increases the adaptability and flexibility of the prediction method, enabling photovoltaic power station operators to formulate more accurate and effective energy management and scheduling strategies based on actual needs and situations, thereby optimizing energy utilization and economic benefits.
[0066] The present invention presents a method for generating decision support information for energy management and optimization through visualization tools, which not only improves the long-term prediction performance of the model, but also provides an intuitive and practical decision support tool for the daily operation and long-term planning of photovoltaic power stations. Through these beneficial effects, the present invention helps to improve the operating efficiency and reliability of photovoltaic power generation systems and promote the widespread application of renewable energy. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0068] Figure 1 A schematic diagram of a distributed photovoltaic power generation prediction method according to an embodiment of the present invention;
[0069] Figure 2 The figure is a schematic diagram of a process of automatically adjusting parameters of a fusion model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0071] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0072] like Figure 1-Figure 2 As shown, the distributed photovoltaic power generation prediction method for microgrids includes the following steps:
[0073] S1: Use environmental sensors to collect data on solar radiation intensity, ambient temperature, humidity and wind speed around the photovoltaic equipment, and use a preset performance monitoring module to collect data on photovoltaic panel efficiency, inverter efficiency and status of each component;
[0074] S2: Clean and normalize the data collected in step S1, and extract the features that affect the photovoltaic power generation, including sunshine time, environmental influencing factors (such as temperature influence coefficient) and equipment performance indicators through a preset feature extraction algorithm;
[0075] S3: By combining the preset statistical learning method and machine learning technology (such as deep learning algorithm), a fusion model for photovoltaic power generation prediction is constructed based on the features processed and extracted in step S2;
[0076] S4: According to different prediction requirements, including short-term (hourly) and medium- to long-term (daily and monthly) prediction requirements, adjust the parameters of the fusion model constructed in step S3 and perform the prediction task;
[0077] S5: Based on the deviation between the prediction result of S4 and the actual power generation, the parameters of the fusion model are automatically adjusted to optimize the prediction accuracy;
[0078] S6: The forecast results after optimization in S5 are presented through visualization tools, and decision support information for energy management and optimization is generated, such as energy storage scheduling, load balancing, and equipment maintenance planning.
[0079] S1 specifically includes:
[0080] S11: Deploy various types of environmental sensors, including solar radiation sensors for measuring the intensity of solar radiation at the location of the photovoltaic equipment, temperature sensors for measuring the ambient temperature, humidity sensors for detecting air humidity, and wind speed sensors for measuring wind speed. These sensors are installed at appropriate locations near the photovoltaic panels to ensure that the environmental factors that affect the power generation performance of the photovoltaic panels can be accurately captured;
[0081] S12: Use a preset performance monitoring module to monitor the photovoltaic system in real time. The performance monitoring module is connected to the communication interface (such as MODBUS protocol interface) of the photovoltaic system to collect data on photovoltaic panel efficiency and inverter efficiency. The performance monitoring module includes a data acquisition unit and an analysis and processing unit. The data acquisition unit is used to collect operation data of the photovoltaic system, including information on current, voltage, and power generation. The analysis and processing unit is used to calculate photovoltaic panel efficiency and inverter efficiency based on the collected data.
[0082] S13: For monitoring the status of photovoltaic panels and components, the performance monitoring module will also use the built-in fault diagnosis function of the photovoltaic system to detect and record various status information that affect power generation efficiency and system stability in real time, including component aging, hot spot effects, and line failures. The performance monitoring module also identifies whether there are obstructions or pollution problems on the photovoltaic panels by analyzing the current-voltage characteristic curve, thereby accurately evaluating the actual operating efficiency of the photovoltaic panels;
[0083] S14: All data collected by environmental sensors and performance monitoring modules are transmitted to the central processing system via wireless or wired networks. In the central processing system, the data will be further processed and analyzed to provide data support for subsequent photovoltaic power generation prediction and system optimization.
[0084] S2 specifically includes:
[0085] S21: First, the environmental and equipment performance data collected in step S1 are preprocessed, including data cleaning and normalization. Data cleaning aims to remove erroneous data records, fill missing values, and identify and correct outliers. Specifically, data cleaning uses the statistical Z-score method to identify and exclude data points that are beyond the normal range. Normalization is to scale the data to a standard range (such as between 0 and 1) to eliminate the impact of data of different magnitudes and ensure the consistency and effectiveness of data processing.
[0086] S22: using a preset feature extraction algorithm to extract features from the normalized data, including sunshine time, environmental influencing factors (such as temperature influence coefficient), and equipment performance indicators (such as photovoltaic panel efficiency and inverter efficiency). The feature extraction algorithm specifically uses the principal component analysis (PCA) method to determine which features have a significant impact on photovoltaic power generation. PCA is a dimensionality reduction method that converts data into a new coordinate system through linear transformation, so that the first coordinate (i.e., the first principal component) of this coordinate system has the largest variance (i.e., the amount of information), and each subsequent coordinate (i.e., the principal component) has the largest variance and is orthogonal to the previous coordinate. PCA determines the principal component by calculating the covariance matrix of the data and its eigenvalues;
[0087] S23: For sunshine time characteristics, the sunrise and sunset times are calculated according to the geographical location and date to determine the potential power generation time of the photovoltaic panels; environmental influencing factors, such as temperature influence coefficient, are determined by analyzing the relationship between temperature and power generation efficiency;
[0088] The calculation of sunshine time is based on the geographical location and date using an astronomical algorithm. The approximate formula for sunrise and sunset times is expressed as:
[0089] Among them, T is the sunshine time, which means the length of time from sunrise to sunset, in hours; φ is the geographical latitude of the observation site, in degrees; positive values indicate north latitude, and negative values indicate south latitude; δ is the declination of the sun, that is, the angle between the position of the sun on the celestial sphere and the equatorial plane of the earth, in degrees. The change of the declination angle reflects the movement of the direct point of the sun during the year, and -0.83° is this specific angle. It takes into account the effect of atmospheric refraction on the sunrise and sunset times, as well as the apparent radius of the solar disk. This formula provides the approximate time of sunrise and sunset based on the observer's geographical location, which is used to determine the potential power generation time of photovoltaic panels;
[0090] Linear regression is used to analyze the relationship between temperature T and power generation efficiency E. The specific analysis formula is:
[0091] E = β0 + β1T + ∈, where E is the power generation efficiency of the photovoltaic panel, expressed as the percentage of the power output to the solar energy input ratio, and is the dependent variable that the prediction model attempts to explain; T is the ambient temperature, as an independent variable, indicating the air temperature at the location of the photovoltaic panel, in degrees Celsius (℃); β0 is the intercept term, indicating the baseline value of the power generation efficiency when the temperature T = 0℃; β1 is the slope coefficient of the temperature, which quantifies the average impact of each unit (℃) change in temperature on the power generation efficiency E; ∈ is the error term, indicating the impact of all factors other than temperature that are not explicitly considered in the model. The values of β0 and β1 are estimated by the least squares method, which can quantitatively analyze the impact of temperature on power generation efficiency;
[0092] S24: Extraction of equipment performance indicators focuses on analyzing the equipment's operating data (such as voltage and current), as well as historical maintenance and fault records. Specifically, a time series-based anomaly detection algorithm is used to evaluate the equipment's health status and performance trends.
[0093] S24 specifically includes:
[0094] S241: constructing a time series of photovoltaic equipment operation data, including indicators of voltage, current and power generation, each time series reflects the performance indicators of the equipment within a predetermined time;
[0095] S242: Use sliding window technology to extract features from time series data and calculate statistical features within each time window, including mean, standard deviation, minimum and maximum values. These statistical features can depict short-term fluctuations and long-term trends in equipment performance.
[0096] S253: The isolation forest algorithm is used to detect anomalies in the data after feature extraction. The isolation forest algorithm is suitable for processing high-dimensional data. Specifically, the tree structure in the random forest is used to isolate data points. The anomaly points have a shorter path length. The anomaly score calculation formula is: Where x is the data point being evaluated, n is the number of samples, E(h(x)) is the average path length from the root node to the data point x in the tree structure, and c(n) is a factor used for normalization. The closer this score is to 1, the more likely the data point x is an anomaly.
[0097] S254: For the time series points detected as abnormal, the corresponding environmental factors (such as temperature, humidity, etc.) and equipment status are analyzed to determine the cause of the abnormality. Specifically, the abnormal detection results are correlated with the environmental and equipment status data to identify the external and internal factors that cause performance changes.
[0098] The specific analysis steps are as follows:
[0099] S2541: For each detected abnormal point, extract the timestamp of occurrence, and obtain the environmental data (such as temperature, humidity, etc.) and equipment operation data (such as current, voltage) at the corresponding time point. This step ensures a comprehensive understanding of the situation around the abnormal point;
[0100] S2541: Use correlation analysis methods, such as the Pearson correlation coefficient, to evaluate the relationship between environmental factors and equipment operating parameters and abnormal points. The calculation formula of the Pearson correlation coefficient is: Where n is the number of data points, x and y are the values of the two variables, r ranges from -1 (perfect negative correlation) to 1 (perfect positive correlation), and O means no correlation.
[0101] S2541: For the factors identified in the correlation analysis, a regression analysis, such as simple linear regression, is performed to quantitatively evaluate the relationship between the identified factors and the change in equipment performance. The linear regression formula is: y = β0 + β1x + , where y is the response variable (equipment performance indicator), x is the explanatory variable (such as ambient temperature or current change), β0 is the intercept, β1 is the slope, which represents the impact of the change in the explanatory variable on the response variable, and β is the error term;
[0102] S2542: Based on the above analysis, identify the factors most relevant to the abnormal performance change. If an environmental factor or equipment operating parameter has a high correlation or obvious causal relationship with the abnormal point, it is identified as a possible cause of the abnormality.
[0103] Through the above steps, a method combining time series analysis and anomaly detection is provided to efficiently and accurately evaluate the health status and performance trends of photovoltaic equipment. This method can not only detect potential performance problems of equipment in a timely manner, but also identify the possible causes of the problems, providing a scientific basis for equipment maintenance and performance optimization.
[0104] S3 specifically includes:
[0105] S31: Linear regression model is selected as the basic statistical learning method to process the direct linear relationship between the features extracted in step S2 and the photovoltaic power generation. The linear regression model is used to predict the linear dependent variable with multiple independent variables. It is an effective way to analyze and quantify the impact of each feature on the power generation.
[0106] S32: Long short-term memory network (LSTM) is used as a machine learning algorithm to handle complex patterns and long-term dependency problems in time series data. LSTM avoids long-term dependency problems through gate structure and is suitable for prediction tasks where photovoltaic power generation changes over time and is affected by multiple factors.
[0107] S33: Use model fusion technology to integrate the prediction results of the linear regression model and the LSTM model. Specifically, the weighted average method is used as the fusion strategy, where the weight is determined based on the performance of each model in the cross-validation process. By integrating the advantages of different models, the prediction accuracy is improved;
[0108] S34: Apply the fusion model of S33 to the actual PV power generation forecast. The fusion model will use the latest environmental data and PV panel performance indicators to make predictions, providing support for the daily operation and long-term planning of PV power plants.
[0109] By redesigning the above steps, the present invention provides a photovoltaic power generation prediction method that can handle both linear relationships and complex nonlinear relationships. Through the combination of carefully selected statistical learning and machine learning algorithms, and the application of model fusion, the method aims to provide high-accuracy and high-reliability power generation prediction to optimize the performance and output of photovoltaic power stations.
[0110] S33 specifically includes:
[0111] S331: First, run the linear regression model and LSTM model independently to predict the power generation of the same data set, and generate two sets of prediction results. Let the prediction result of the linear regression model be P LR , the prediction result of the LSTM model is P LSTM ;
[0112] S332: Evaluate the prediction performance of each model using performance indicators, specifically using mean square error (MSE) or root mean square error (RMSE), and calculate the error of each model on the validation set. Suppose the performance indicator of the linear regression model is E LR , the performance index of the LSTM model is E LSTM ;
[0113] S333: Based on the performance index obtained in S332, the weight of each model is calculated. The weight calculation method reflects the relative merits of the model performance. The better the performance of the model, the higher the weight. The weight calculation method is to use the inverse of the performance index as the weight. The specific formula is:
[0114] Among them, W LR is the weight of the linear regression model, W LSTM is the weight of the LSTM model;
[0115] S334: Multiply the prediction results of the two models by the corresponding weights, and then add the weighted results to obtain the final fusion prediction result. The fusion prediction result P fusion The calculation formula is:
[0116] P fusion =W LR ·P LR +W LSTM ·P LSTM , combining the advantages of the two models through the weighted average method to provide more accurate and stable prediction results;
[0117] S335: Final fusion prediction result P fusion It will be used for actual solar power generation prediction tasks and provide data support for operational decisions of photovoltaic systems;
[0118] Through the above steps, the present invention proposes a model fusion strategy based on weighted average, which effectively integrates the prediction capabilities of the linear regression model and the LSTM model, and enhances the accuracy and robustness of the prediction results. This method makes full use of the advantages of each model in different aspects and provides an efficient and reliable solution for photovoltaic power generation prediction.
[0119] S4 specifically includes:
[0120] S41: First define the types of forecasting needs. For short-term (hourly) forecasts, the focus is on capturing immediate changes, specifically sudden changes in weather conditions. For medium- and long-term (daily and monthly) forecasts, the focus is on understanding seasonal changes and trends.
[0121] S42: For short-term prediction, adjust the LSTM model parameters to improve the response speed to immediate data changes, especially reduce the memory length of the LSTM layer, by reducing the time steps (timesteps) or modifying the number of LSTM units, in order to reduce the model's dependence on past data and make it more sensitive to changes in recent data;
[0122] S43: For medium- and long-term forecasts, increase the memory capacity of the LSTM model by increasing the time step or the number of LSTM units to capture longer-term data dependencies and seasonal trends. At the same time, adjust the parameters of the linear regression model to enhance the modeling ability of long-term trends, including reselecting features or adjusting feature weights.
[0123] S44: for the two forecast demands, respectively perform model training and validation, use corresponding time series data, select corresponding historical data length for model training according to the type of forecast demand (short-term or medium- to long-term), evaluate model performance through cross-validation method, and optimize model parameters based on performance indicators;
[0124] S45: In the model fusion stage, the fusion weights of the linear regression model and the LSTM model are adjusted according to the prediction requirements. In short-term predictions, the LSTM model will be given a higher weight, which is better at processing short-term data changes. In medium- and long-term predictions, the weight of the linear regression model will be increased to better capture long-term trends.
[0125] Through the above steps, the present invention provides a flexible method to adjust the parameters of the fusion model according to different prediction needs. This method can ensure that the model can provide accurate power generation prediction on different time scales and meet the diverse needs of photovoltaic power station operation and management.
[0126] S5 specifically includes:
[0127] S51: First, calculate the deviation between the predicted result and the actual power generation. The deviation is quantified by calculating the error between the predicted value and the actual value. Specifically, the mean square error (MSE) is used as the evaluation indicator: Among them, Y i is the ith observed value of actual power generation, is the corresponding predicted value, and n is the total number of observations;
[0128] S52: Based on the calculated deviation, the prediction performance of the current fusion model is evaluated, and when the prediction performance does not reach a predetermined threshold (for example, a preset MSE upper limit), the automatic adjustment process of the model parameters is started;
[0129] S53: Use the gradient descent method to automatically adjust the LSTM model parameters. According to the gradient information of the deviation, update the weights and biases of the LSTM model to reduce the prediction error. The update formula is: Among them, w new and w old Respectively represent the model weights before and after the update, α is the learning rate, is the gradient of MSE with respect to the weight;
[0130] S54: For the linear regression model, adjust the model coefficients to reduce the prediction bias by re-performing the parameter estimation process of the linear regression and recalculating the optimal coefficients based on the current data set using the least squares method;
[0131] S55: After adjusting the individual model parameters, re-evaluate the fusion model weights and redistribute the fusion weights using a weighted average method based on the updated model performance;
[0132] S56: Repeat steps S51-S55 until the prediction performance of the model reaches or exceeds a predetermined performance threshold, or the change in the model parameter update is lower than a set minimum threshold, so as to avoid overfitting;
[0133] Through the above steps, the present invention provides a method for dynamically adjusting the parameters of the fusion model to respond to the deviation between the actual power generation and the predicted value, and continuously optimize the prediction accuracy. This adaptive adjustment mechanism ensures that the model maintains optimal performance over time, and is particularly suitable for the dynamically changing application scenario of photovoltaic power generation prediction.
[0134] S6 specifically includes:
[0135] S61: First, use data visualization software or library to display the forecast results in the form of charts, including time series charts to show the changes of actual power generation and forecast power generation over time; error charts to show the deviation between the forecast value and the actual value;
[0136] S62: Based on the prediction results, performance indicators (KPIs) are calculated, including prediction accuracy, energy utilization, and system load matching. These indicators can be obtained by comparing the predicted values with the actual values and are used to evaluate the effectiveness of the system performance and the prediction model;
[0137] S63: Generate energy management decision support information, including energy storage scheduling recommendations, maintenance and upgrade recommendations, and demand-side management;
[0138] Energy storage scheduling recommendations: Based on short-term and mid- to long-term forecast results, provide the best timing for charging and discharging the battery storage system to optimize energy utilization and reduce electricity costs;
[0139] Maintenance and upgrade recommendations: By analyzing long-term forecast trends and performance anomalies, we can identify equipment components that may need maintenance or upgrades, so that maintenance work can be planned in advance to avoid unexpected downtime;
[0140] Demand-side management: Based on the predicted power generation and load demand, a reasonable energy consumption plan is recommended, such as adjusting the operating hours of high-energy-consuming equipment to improve energy consumption efficiency;
[0141] S64: Presents all data and decision support information through an interactive dashboard that allows users to view forecast results and performance indicators based on different time scales, including hours, days, and months, and receive targeted management and optimization recommendations;
[0142] Through the above steps, not only a method for visualizing the prediction results is provided, but also practical and actionable energy management and optimization decision support information is generated based on these results, helping photovoltaic power generation system operators to more effectively manage and optimize system performance and improve energy utilization and economic benefits.
[0143] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A distributed photovoltaic power generation prediction method for microgrids, characterized in that: The following steps are involved: S1: Use environmental sensors to collect data on solar radiation intensity, ambient temperature, humidity and wind speed around the photovoltaic equipment, and use a preset performance monitoring module to collect data on photovoltaic panel efficiency, inverter efficiency and status of each component; S2: Clean and normalize the data collected in step S1, and extract the features that affect photovoltaic power generation, including sunshine time, environmental influencing factors and equipment performance indicators, through a preset feature extraction algorithm; S3: By combining the preset statistical learning method and machine learning technology, a fusion model for photovoltaic power generation prediction is constructed based on the features processed and extracted in step S2; S4: According to different prediction requirements, including short-term and medium- to long-term prediction requirements, adjust the parameters of the fusion model constructed in step S3 and perform the prediction task; S5: Based on the deviation between the prediction result of S4 and the actual power generation, the parameters of the fusion model are automatically adjusted to optimize the prediction accuracy; S6: Present the prediction results optimized in S5 through visualization tools and generate decision support information for energy management and optimization.
2. The distributed photovoltaic power generation prediction method for microgrid according to claim 1 is characterized in that: The S1 specifically includes: S11: Deploy various types of environmental sensors, including solar radiation sensors for measuring the intensity of solar radiation at the location of the photovoltaic equipment, temperature sensors for determining the ambient temperature, humidity sensors for detecting air humidity, and wind speed sensors for measuring wind speed; S12: using a preset performance monitoring module to monitor the photovoltaic system in real time. The performance monitoring module is connected to the communication interface of the photovoltaic system to collect data on photovoltaic panel efficiency and inverter efficiency. The performance monitoring module includes a data acquisition unit and an analysis and processing unit. The data acquisition unit is used to collect operation data of the photovoltaic system, including information on current, voltage, and power generation. The analysis and processing unit is used to calculate photovoltaic panel efficiency and inverter efficiency based on the collected data. S13: For monitoring the status of photovoltaic panels and components, the performance monitoring module will also use the built-in fault diagnosis function of the photovoltaic system to detect and record various status information that affect power generation efficiency and system stability in real time, including component aging, hot spot effects, and line failures. The performance monitoring module also identifies whether there are obstructions or pollution problems on the photovoltaic panels by analyzing the current-voltage characteristic curve, thereby accurately evaluating the actual operating efficiency of the photovoltaic panels; S14: All data collected by environmental sensors and performance monitoring modules are transmitted to the central processing system via wireless or wired networks to provide data support for subsequent photovoltaic power generation prediction and system optimization.
3. The distributed photovoltaic power generation prediction method for microgrid according to claim 2 is characterized in that: The S2 specifically includes: S21: First, the environmental and equipment performance data collected in step S1 are preprocessed, including data cleaning and normalization. Data cleaning aims to remove erroneous data records, fill missing values, and identify and correct outliers. Specifically, data cleaning uses the statistical Z-score method to identify and exclude data points that are beyond the normal range. Normalization is to scale the data into a standard range to eliminate the impact of data of different magnitudes, thereby ensuring the consistency and effectiveness of data processing. S22: using a preset feature extraction algorithm to extract features from the normalized data, including sunshine time, environmental impact factors, and equipment performance indicators. The feature extraction algorithm specifically uses a principal component analysis method to determine which features have a significant impact on photovoltaic power generation; S23: For sunshine time characteristics, the sunrise and sunset times are calculated according to the geographical location and date to determine the potential power generation time of the photovoltaic panels; the environmental impact factor is determined by analyzing the relationship between temperature and power generation efficiency; The calculation of sunshine time is performed based on the geographical location and date using an astronomical algorithm. The approximate formula for sunrise and sunset times is expressed as: Hours, where T is the sunshine time, which means the length of time from sunrise to sunset in hours; is the geographical latitude of the observation site, in degrees; positive values indicate north latitude, negative values indicate south latitude; δ is the declination of the sun, that is, the angle between the sun's position on the celestial sphere and the plane of the earth's equator, in degrees, -0.83°. This particular angle takes into account the effect of atmospheric refraction on the times of sunrise and sunset, as well as the apparent radius of the solar disk; Linear regression is used to analyze the relationship between temperature T and power generation efficiency E. The specific analysis formula is: E = β0 + β1T + ∈, where E is the power generation efficiency of the photovoltaic panel, expressed as a percentage of the power output to solar energy input ratio; T is the ambient temperature, as an independent variable, indicating the air temperature at the location of the photovoltaic panel, in degrees Celsius (℃); β0 is the intercept term, indicating the baseline value of the power generation efficiency when the temperature T = 0℃; β1 is the slope coefficient of the temperature, quantifying the average impact of each unit (℃) change in temperature on the power generation efficiency E; ∈ is the error term, and the values of β0 and β1 are estimated by the least squares method, which can quantitatively analyze the impact of temperature on power generation efficiency; S24: Extraction of equipment performance indicators focuses on analyzing the equipment's operating data, as well as historical maintenance and fault records. Specifically, a time series-based anomaly detection algorithm is used to evaluate the equipment's health status and performance trends.
4. The distributed photovoltaic power generation prediction method for microgrid according to claim 3 is characterized in that: The S24 specifically includes: S241: constructing a time series of photovoltaic equipment operation data, including indicators of voltage, current and power generation, each time series reflects the performance indicators of the equipment within a predetermined time; S242: Use sliding window technology to extract features from time series data and calculate statistical features within each time window, including mean, standard deviation, minimum and maximum values; S253: The isolation forest algorithm is used to detect anomalies in the data after feature extraction. The isolation forest algorithm is suitable for processing high-dimensional data. Specifically, the tree structure in the random forest is used to isolate data points. The anomaly points have a shorter path length. The anomaly score calculation formula is: Where x is the data point being evaluated, n is the number of samples, E(h(x)) is the average path length from the root node to the data point x in the tree structure, and c(n) is a factor used for normalization. The closer this score is to 1, the more likely the data point x is an anomaly. S254: For the time series points detected as abnormal, the corresponding environmental factors and equipment status are analyzed to determine the cause of the abnormality. Specifically, the abnormality detection results are correlated with the environment and equipment status data to identify the external and internal factors that cause the performance change.
5. The distributed photovoltaic power generation prediction method for microgrid according to claim 4 is characterized in that: The S3 specifically includes: S31: The linear regression model is selected as the basic statistical learning method to process the direct linear relationship between the features extracted in step S2 and the photovoltaic power generation. The linear regression model is used to predict the linear dependent variable with multiple independent variables; S32: Long short-term memory network (LSTM) is used as a machine learning algorithm to handle complex patterns and long-term dependency problems in time series data. LSTM avoids long-term dependency problems through gate structure and is suitable for prediction tasks where photovoltaic power generation changes over time and is affected by multiple factors. S33: Use model fusion technology to integrate the prediction results of the linear regression model and the LSTM model. Specifically, the weighted average method is used as the fusion strategy, where the weight is determined based on the performance of each model in the cross-validation process. By integrating the advantages of different models, the prediction accuracy is improved; S34: Apply the fusion model of S33 to the actual PV power generation forecast. The fusion model will use the latest environmental data and PV panel performance indicators to make predictions, providing support for the daily operation and long-term planning of PV power plants.
6. The distributed photovoltaic power generation prediction method for microgrid according to claim 5 is characterized in that: The S33 specifically includes: S331: First, run the linear regression model and LSTM model independently to predict the power generation of the same data set, and generate two sets of prediction results. Let the prediction result of the linear regression model be P LR , the prediction result of the LSTM model is P LSTM ; S332: Evaluate the prediction performance of each model using performance indicators, specifically using mean square error (MSE) or root mean square error (RMSE), and calculate the error of each model on the validation set. Suppose the performance indicator of the linear regression model is E LR , the performance index of the LSTM model is E LSTM ; S333: Based on the performance index obtained in S332, the weight of each model is calculated. The weight calculation method reflects the relative merits of the model performance. The better the performance of the model, the higher the weight. The weight calculation method is to use the inverse of the performance index as the weight. The specific formula is: Among them, W LR is the weight of the linear regression model, W LSTM is the weight of the LSTM model; S334: Multiply the prediction results of the two models by the corresponding weights, and then add the weighted results to obtain the final fusion prediction result. The fusion prediction result P fusion The calculation formula is: P fusion =W LR ·P LR +W LSTM ·P LSTM ; S335: Final fusion prediction result P fusion It will be used for actual solar power generation prediction tasks and provide data support for operational decisions of photovoltaic systems.
7. The distributed photovoltaic power generation prediction method for microgrid according to claim 6 is characterized in that: The S4 specifically includes: S41: First define the types of forecasting needs. For short-term forecasting, the focus is on capturing immediate changes, specifically sudden changes in weather conditions. For medium- and long-term forecasting, the focus is on understanding seasonal changes and trends. S42: For short-term prediction, adjust the LSTM model parameters to improve the response speed to immediate data changes, especially reduce the memory length of the LSTM layer, which can be achieved by reducing the time step or modifying the number of LSTM units. The purpose is to reduce the model's dependence on past data and make it more sensitive to changes in recent data; S43: For medium- and long-term forecasts, increase the memory capacity of the LSTM model by increasing the time step or the number of LSTM units to capture longer-term data dependencies and seasonal trends. At the same time, adjust the parameters of the linear regression model to enhance the modeling ability of long-term trends, including reselecting features or adjusting feature weights. S44: for the two forecast demands, respectively perform model training and validation, use corresponding time series data, select corresponding historical data length for model training according to the type of forecast demand, specifically evaluate model performance through cross-validation method, and optimize model parameters based on performance indicators; S45: In the model fusion stage, the fusion weights of the linear regression model and the LSTM model are adjusted according to the prediction requirements. In short-term predictions, the LSTM model will be given a higher weight, as it is better at handling short-term data changes. In medium- and long-term predictions, the weight of the linear regression model will be increased to better capture long-term trends.
8. The distributed photovoltaic power generation prediction method for microgrid according to claim 7 is characterized in that: The S5 specifically includes: S51: First, calculate the deviation between the predicted result and the actual power generation. The deviation is quantified by calculating the error between the predicted value and the actual value. Specifically, the mean square error (MSE) is used as the evaluation indicator: Among them, Y i is the ith observed value of actual power generation, is the corresponding predicted value, and n is the total number of observations; S52: Based on the calculated deviation, the prediction performance of the current fusion model is evaluated, and when the prediction performance does not reach a predetermined threshold, the automatic adjustment process of the model parameters is started; S53: Use the gradient descent method to automatically adjust the LSTM model parameters. According to the gradient information of the deviation, update the weights and biases of the LSTM model to reduce the prediction error. The update formula is: Among them, w new and w old Respectively represent the model weights before and after the update, α is the learning rate, is the gradient of MSE with respect to the weight; S54: for the linear regression model, adjusting the model coefficients to reduce the prediction bias by re-performing the parameter estimation process of the linear regression, specifically using the least squares method to recalculate the optimal coefficients based on the current data set; S55: After adjusting the individual model parameters, re-evaluate the fusion model weights and redistribute the fusion weights using a weighted average method based on the updated model performance; S56: Repeat steps S51-S55 until the prediction performance of the model reaches or exceeds a predetermined performance threshold, or the change in the model parameter update is lower than a set minimum threshold, to avoid overfitting.
9. The distributed photovoltaic power generation prediction method for microgrid according to claim 8, characterized in that: The S6 specifically includes: S61: First, use data visualization software or library to display the forecast results in the form of charts, including time series charts to show the changes of actual power generation and forecast power generation over time; error charts to show the deviation between the forecast value and the actual value; S62: Calculate performance indicators based on the prediction results, including prediction accuracy, energy utilization, and system load matching; S63: Generate energy management decision support information, including energy storage scheduling recommendations, maintenance and upgrade recommendations, and demand-side management; S64: Presents all data and decision support information through an interactive dashboard that allows users to view forecast results and performance indicators based on different time scales, including hours, days, and months, and receive targeted management and optimization recommendations.
Citation Information
Cited By
Photovoltaic off-grid and grid-connected system and method
CN119401558A
Method and system for acquiring climbing angle of underground loader
CN119474688A
A method and system for obtaining climbing angle of underground loader
CN119474688B
Edge gateway-based electricity room environment regulation and control method and device
CN119781337A
Photovoltaic prediction method and system capable of explaining MLREP multi-level regression integration
CN119885084A
