Photovoltaic power output intelligent prediction correction system based on multi-model comparison verification

CN122926385APending Publication Date: 2026-10-16CHONGQING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611073927.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

预测环节的误差会通过能量平衡方程与运行逻辑向下游传递并被非线性放大:峰值预测偏低会低估弃光风险,导致储能配置不足;夜间虚假出力会导致充电策略偏误

Benefits of technology

本发明的系统内置五组不同结构的时序预测模型并行运算,通过三项标准化指标量化对比,可针对不同地域、不同气候、不同装机规模的应用场景,自动筛选匹配度最高的最优预测模型。相比单一固定模型的方案,有效避免了单一网络结构的局限性,场景适应性显著增强。基于西南地区实际数据验证,最优模型(LSTM)的决定系数可达0.9472,均方根误差控制在47.12kW以内,预测精度处于行业先进水平。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122926385A_ABST
    Figure CN122926385A_ABST
Patent Text Reader

Abstract

The application discloses a photovoltaic output intelligent prediction correction system based on multi-model comparison verification, a data preprocessing module completes periodic time coding, multi-feature normalization and sliding window sample construction, a multi-model prediction library is built-in different time sequence prediction networks, and parallel output prediction results are output, a model comparison verification module is based on RMSE, MAE and R2 three indexes to quantitatively evaluate on a unified test set, and the optimal prediction model is automatically screened, and a physical constraint correction module takes 0.1 W / m2 irradiance as a threshold value, eliminates night false output through a post-processing mode, and guarantees the physical consistency of the prediction result. The system can automatically match the optimal model for different scenes, completely corrects non-physical output, and significantly improves the prediction accuracy and engineering practicability, and can provide reliable data support for photovoltaic storage system capacity planning, power grid dispatching operation and new energy consumption evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of photovoltaic power generation prediction technology, specifically involving a photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification. Background Technology

[0003] As the penetration rate of photovoltaic (PV) power generation continues to increase, the challenges its output characteristics pose to the safe and stable operation of the power system are becoming increasingly prominent. The output power of PV power generation is directly determined by solar irradiance and is also influenced by various meteorological factors such as temperature, humidity, and cloud cover, exhibiting inherent intermittency, volatility, and randomness. This power generation characteristic, highly dependent on natural weather conditions, can lead to a series of problems in the power grid, including voltage exceeding limits, frequency fluctuations, and reverse power flow. Furthermore, the peak output of PV power is concentrated during midday, creating a mismatch with the evening peak load characteristics of residential and industrial loads, exhibiting typical anti-peak-shaving characteristics, further exacerbating the pressure on the power grid's peak-shaving, and even leading to severe curtailment in some areas.

[0004] Configuring electrochemical energy storage systems is one of the most effective technical means to solve the above problems. Through the charging and discharging scheduling of energy storage systems, electrical energy can be shifted over time: storing electricity during periods of high photovoltaic power generation and surplus, and releasing it during periods of insufficient photovoltaic output and peak load. This can both smooth out short-term fluctuations in photovoltaic output and improve grid-friendliness, as well as reduce curtailment of photovoltaic power and enhance the absorption of new energy sources. However, energy storage systems generally suffer from high initial investment costs and high operation, maintenance, and replacement costs. Over-configuration of capacity leads to equipment idleness and low return on investment, while under-configuration fails to meet absorption and load smoothing needs, rendering the configuration meaningless. Therefore, scientifically optimizing energy storage capacity configuration based on accurate photovoltaic output forecast data is the core prerequisite for balancing investment costs and operational efficiency.

[0005] The development of photovoltaic (PV) power output forecasting technology has roughly gone through three generations of iterations: The first generation is traditional statistical methods, represented by Autoregressive Moving Average (ARIMA), multiple linear regression, and exponential smoothing. These methods are simple in structure, have low computational cost, and are highly interpretable, showing some predictive effectiveness for relatively stationary time series. However, PV power output is a typical non-stationary time series data, affected by the nonlinear coupling of multiple meteorological factors. Statistical methods struggle to capture complex nonlinear mapping relationships and abrupt changes, and prediction errors rise sharply when facing cloudy or rainy weather, failing to meet current high-precision forecasting requirements. The second generation is shallow machine learning methods, represented by Support Vector Machines (SVM) and Backpropagation Neural Networks (BPNN). These methods improve the nonlinear fitting ability of the model to some extent through kernel function mapping or shallow nonlinear activation. However, shallow networks have limited feature extraction capabilities, making it difficult to effectively mine long-range dependencies when facing high-dimensional, long-term meteorological and power output data, thus encountering a bottleneck in improving prediction accuracy. The third generation is deep learning methods, which, with the rapid development of artificial intelligence technology, have become the mainstream technical approach in the current PV forecasting field. Long Short-Term Memory (LSTM) neural networks, with their unique gating mechanism, effectively overcome the gradient vanishing problem of traditional recurrent neural networks, efficiently capturing long-range dependencies in time series data. They are widely recognized as the benchmark model for handling time-series problems such as photovoltaic forecasting. Current research continues to optimize them, for example, by preprocessing data through variational mode decomposition, introducing attention mechanisms to optimize feature weights, and combining intelligent algorithms to optimize network parameters, thus improving prediction accuracy from different dimensions. Current research trends have shifted from simply stacking network depth to the collaborative optimization of feature engineering and model structure. Researchers are paying more attention to the physical laws inherent in the data itself, injecting the diurnal and seasonal periods of irradiance and temperature into the model through feature encoding, ensuring predictive performance while maintaining a lightweight design.

[0006] Despite the significant achievements in existing research, the following prominent technical shortcomings still exist in practical engineering applications: Most existing prediction systems employ a single, fixed network structure. While these may achieve good results on specific datasets and in specific scenarios, the output characteristics of photovoltaic power plants vary significantly across different regions, climates, and installed capacities. A single model cannot guarantee optimal performance in all scenarios. Some studies have excessively pursued model structural complexity, which, while slightly improving accuracy, has led to an exponential increase in training costs and a decrease in generalization ability, resulting in insufficient stability when facing sudden weather changes. Furthermore, the industry lacks a standardized multi-model cross-validation mechanism, making it impossible to automatically select the optimal prediction model for specific application scenarios, thus hindering the scenario adaptability and long-term stability of prediction accuracy.

[0007] Most deep learning prediction models are purely data-driven, focusing solely on minimizing the overall prediction error during training, without incorporating the physical boundary rules of photovoltaic power generation. Because the zero-value samples at night are diluted by a large number of high-output samples during the daytime, the model often outputs tiny spurious output values, or even negative values, during the nighttime periods without radiation. While these non-physical outputs have a small impact on the overall error metric, they are completely unreasonable from an engineering application perspective. If used directly as input for energy storage capacity optimization, these spurious nighttime outputs can lead to systematic biases in energy storage charging strategies, resulting in uneconomical and unreliable capacity configuration schemes, significantly reducing the engineering practical value of the prediction results.

[0008] Photovoltaic power output exhibits significant diurnal and seasonal periodicity, determined by the objective astronomical laws of the Earth's rotation and revolution, and is crucial prior knowledge for prediction. However, most existing schemes directly input hours and months as integer features into the model, ignoring the cyclical adjacency of time: for example, 23:00 and 0:00 are physically adjacent times, but differ by 23 in integer value. This numerical jump can mislead the model's learning of time patterns, reduce the model's efficiency in capturing periodic features, and limit further improvements in prediction accuracy.

[0009] Some simplified prediction systems lack robust training management mechanisms. When faced with long-term training data spanning the entire year, these models are prone to overfitting, exhibiting excellent performance on the training set but significantly reduced generalization ability on unknown test sets. Furthermore, the lack of dynamic learning rate adjustment and early stopping mechanisms ensures convergence, leading to oscillations, premature convergence, or overfitting during model training. This results in insufficient stability and reliability of the final prediction results, making it difficult to support long-term stable operation at an engineering level.

[0010] Existing research often treats photovoltaic (PV) output prediction and energy storage capacity optimization as two separate processes, failing to establish an integrated modeling approach. Errors in the prediction process are propagated downstream through the energy balance equation and operational logic, and amplified nonlinearly: underestimating peak output risks leads to insufficient energy storage deployment; false nighttime output results in biased charging strategies. This error propagation effect means that even small deviations in prediction accuracy can ultimately cause significant biases in energy storage configuration schemes, impacting the economic viability and feasibility of decisions.

[0011] Therefore, developing a photovoltaic power output intelligent prediction and correction system with multi-model comparison and automatic selection, physical boundary constraint correction, refined feature engineering, and a sound training and control mechanism, while taking into account prediction accuracy, physical rationality, and scenario adaptability, and providing reliable data support for downstream energy storage optimization and other applications, is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0012] To address the problems raised in the background section, the objective of this invention is to provide a photovoltaic power output intelligent prediction and correction system based on multi-model comparative verification. To achieve this objective, the technical solution adopted by this invention is as follows: The photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification includes a data preprocessing module, a multi-model prediction library module, a model comparison and verification module, a physical constraint correction module, and a main control output module. The data preprocessing module receives raw meteorological and historical photovoltaic power output data at its input end and is connected to the input end of the multi-model prediction library module at its output end. It is used to clean and perform feature engineering on the raw data and construct standardized supervised learning samples. The multi-model prediction library module has multiple sets of time series prediction networks with different structures built in it, which are used to output multiple sets of photovoltaic power output prediction results in parallel. The input of the model comparison and verification module is connected to the output of the multi-model prediction library module, and is used to quantitatively evaluate the prediction accuracy of each model based on a unified test set and select the optimal prediction model. The input of the physical constraint correction module is connected to the output of the optimal model, and is used to correct the rationality of the prediction results based on the physical boundary of photovoltaic power output. The main control output module is bidirectionally connected to each of the above modules to coordinate data flow and parameter configuration, and output the final corrected photovoltaic power output prediction result.

[0013] Further specifying, the data preprocessing module includes a feature construction unit, a normalization processing unit, and a sliding window sample generation unit. The feature construction unit is used to extract time features from the original data and perform periodic encoding, while also completing outlier removal and data cleaning. The normalization processing unit is used to unify the scale of features with different dimensions. The sliding window sample generation unit is used to construct input-output sample pairs that meet the requirements of time series prediction.

[0014] Further specifying, the feature construction unit extracts the discrete features of hours and months from the timestamp, and uses sine and cosine coding to map the hours and months to a two-dimensional unit circle space respectively, preserving the periodic adjacency relationship of time. The input meteorological features include at least four categories: surface horizontal radiation, ambient temperature, relative humidity, and precipitation.

[0015] Furthermore, the multi-model prediction library module includes five parallel time-series prediction networks: LSTM prediction unit, CNN prediction unit, RNN prediction unit, TCN prediction unit, and ResNet prediction unit. Each network receives the same standardized sample input, independently completes training and prediction, and synchronously outputs its own photovoltaic power output prediction sequence.

[0016] Further specifying, the LSTM prediction unit adopts a two-layer stacked structure. The first layer sets 128 hidden units and outputs the hidden state of the entire time sequence. The second layer sets 64 hidden units and outputs the hidden state of the final time step. Dropout layers are set between the two layers and after the second layer to suppress model overfitting.

[0017] Furthermore, the model comparison and verification module incorporates three evaluation indicators: root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). Using the test set data as a benchmark, the module calculates the values ​​of these three indicators for each model and comprehensively selects the model with the highest prediction accuracy as the system's benchmark output model.

[0018] Furthermore, the physical constraint correction module uses solar irradiance as the criterion and sets an irradiance threshold. When the irradiance at a corresponding moment is lower than the threshold, the predicted output at that moment is forcibly corrected to zero. When the irradiance is higher than the threshold, the original prediction result is retained.

[0019] Further specified, the irradiance threshold is set to 0.1 W / m².

[0020] Further, it also includes a model training and control module, which is bidirectionally connected to the multi-model prediction library module. The model training and control module uses the Adam optimizer and the loss function is mean squared error.

[0021] Furthermore, the output of the main control output module includes the corrected hourly photovoltaic power output prediction sequence, a data table comparing the accuracy of each model, and statistical results of the prediction error distribution.

[0022] The beneficial effects of this invention are: The system of this invention incorporates five sets of time-series prediction models with different structures for parallel computation. Through quantitative comparison using three standardized indicators, it can automatically select the optimal prediction model with the highest matching degree for application scenarios with different regions, climates, and installed scales. Compared with a single fixed model, it effectively avoids the limitations of a single network structure, significantly enhancing scenario adaptability. Based on actual data from Southwest China, the coefficient of determination of the optimal model (LSTM) reaches 0.9472, and the root mean square error is controlled within 47.12kW, placing the prediction accuracy at an advanced level in the industry.

[0023] This invention establishes an optimization mathematical model with the objective of minimizing the total lifecycle cost. It considers the initial investment cost, operation and maintenance cost, and curtailment penalty cost of the energy storage system. Physical constraints such as limits on the state of charge (SBC) of the energy storage, limits on charge and discharge power, energy balance relationships, and an annual curtailment rate not exceeding 5% are incorporated into the optimization framework. Through hourly simulations throughout the year, the system's operational characteristics under different energy storage configurations are evaluated in detail. The particle swarm optimization algorithm is used to solve the energy storage capacity optimization configuration problem, resulting in a final optimized scheme with good economic efficiency, avoiding unnecessary increased investment due to over-configuration. Therefore, this invention can achieve optimal overall system cost while ensuring efficient absorption of new energy, and the effectiveness and economic value of this technical approach have been verified in engineering practice.

[0024] This invention employs a post-processing correction strategy based on irradiance thresholds. Without altering the model structure or retraining the network, and with virtually no increase in computational cost, it completely eliminates non-physical spurious power output at night, ensuring that the prediction results fully conform to the objective physical laws of photovoltaic power generation. After correction, not only are nighttime sample errors reduced to zero, but the overall MAE and RMSE indices are also further optimized. More importantly, it avoids systemic biases in downstream energy storage configuration caused by spurious power output, fundamentally enhancing the engineering practical value of the prediction results. Attached Figure Description

[0025] The present invention can be further illustrated by the non-limiting embodiments given in the accompanying drawings; Figure 1 This is a typical day's photovoltaic output variation diagram of an embodiment of the photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification of the present invention. Figure 2 This is a topology diagram of a photovoltaic energy storage system based on an embodiment of the photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification of the present invention. Figure 3 This is a technical roadmap of an embodiment of the intelligent photovoltaic output prediction and correction system based on multi-model comparison and verification of the present invention; Figure 4 This is an internal structural diagram of the LSTM prediction unit in an embodiment of the photovoltaic power output intelligent prediction and correction system based on multi-model comparison verification of the present invention. Figure 5 This is a year-round meteorological data chart of an embodiment of the intelligent photovoltaic output prediction and correction system based on multi-model comparison and verification of the present invention; Figure 6 This is a time series diagram of the actual photovoltaic output of an embodiment of the intelligent photovoltaic output prediction and correction system based on multi-model comparison and verification of the present invention. Figure 7 This is a comparison curve of the predicted and actual values ​​of an embodiment of the intelligent prediction and correction system for photovoltaic output based on multi-model comparison and verification of the present invention. Figure 8 This is a photovoltaic output prediction comparison diagram of an embodiment of the photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification of the present invention; Figure 9 This is an error analysis diagram of an embodiment of the photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification of the present invention; Figure 10 Comparison of time-series prediction curves for an embodiment of the intelligent photovoltaic output prediction and correction system based on multi-model comparison and verification of the present invention; Figure 11 This is a typical sunny day prediction comparison chart of an embodiment of the photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification of the present invention; Figure 12 This is a bar chart showing the algorithm running time of an embodiment of the intelligent photovoltaic output prediction and correction system based on multi-model comparison and verification of the present invention. Figure 13 This is a radar chart comparing the comprehensive performance of the algorithms in an embodiment of the intelligent prediction and correction system for photovoltaic power output based on multi-model comparison and verification of the present invention. Figure 14 This is a PSO convergence curve (LCC) diagram of an embodiment of the photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification of the present invention. Figure 15 The PSO convergence curve (curtailment rate) is shown in the embodiment of the photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification of the present invention. Figure 16 This is a PSO search space distribution diagram of an embodiment of the photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification of the present invention. Figure 17 This is a typical cycle power operation curve of an embodiment of the photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification of the present invention; Figure 18 This is a typical periodic SOC variation curve of an embodiment of the photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification of the present invention. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments. The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0027] The photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification of the present invention includes a data preprocessing module, a multi-model prediction library module, a model comparison and verification module, a physical constraint correction module, and a main control output module; The data preprocessing module receives raw meteorological and historical photovoltaic power output data at its input end and is connected to the input end of the multi-model prediction library module at its output end. It is used to clean and perform feature engineering on the raw data and construct standardized supervised learning samples. The multi-model prediction library module has multiple sets of time series prediction networks with different structures built in it, which are used to output multiple sets of photovoltaic power output prediction results in parallel. The input of the model comparison and verification module is connected to the output of the multi-model prediction library module, and is used to quantitatively evaluate the prediction accuracy of each model based on a unified test set and select the optimal prediction model. The input of the physical constraint correction module is connected to the output of the optimal model, and is used to correct the rationality of the prediction results based on the physical boundary of photovoltaic power output. The main control output module is bidirectionally connected to each of the above modules to coordinate data flow and parameter configuration, and output the final corrected photovoltaic power output prediction result.

[0028] In the practical application of this embodiment, the data preprocessing module includes a feature construction unit, a normalization processing unit, and a sliding window sample generation unit. The feature construction unit is used to extract time features from the original data and perform periodic encoding, while also completing outlier removal and data cleaning. The normalization processing unit is used to unify the scale of features with different dimensions. The sliding window sample generation unit is used to construct input-output sample pairs that meet the requirements of time series prediction.

[0029] In the practical application of this embodiment, the feature construction unit extracts the discrete features of hours and months from the timestamp, and uses sine and cosine coding to map the hours and months to a two-dimensional unit circle space respectively, preserving the periodic adjacency relationship of time. The input meteorological features include at least four categories: surface horizontal radiation, ambient temperature, relative humidity, and precipitation.

[0030] In the practical application of this embodiment, the multi-model prediction library module includes five parallel time-series prediction networks: LSTM prediction unit, CNN prediction unit, RNN prediction unit, TCN prediction unit, and ResNet prediction unit. Each network receives the same standardized sample input, independently completes training and prediction, and synchronously outputs its own photovoltaic power output prediction sequence.

[0031] In the practical application of this embodiment, the LSTM prediction unit adopts a two-layer stacked structure. The first layer sets 128 hidden units and outputs the hidden state at the full time sequence. The second layer sets 64 hidden units and outputs the hidden state at the final time. Dropout layers are set between the two layers and after the second layer to suppress model overfitting.

[0032] In the practical application of this embodiment, the model comparison and verification module has three built-in evaluation indicators: root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). Based on the test set data, the three indicator values ​​of each model are calculated, and the model with the highest prediction accuracy is selected as the benchmark output model of the system.

[0033] In the practical application of this embodiment, the physical constraint correction module uses solar irradiance as the criterion and sets an irradiance threshold. When the irradiance at a corresponding moment is lower than the threshold, the predicted output at that moment is forcibly corrected to zero. When the irradiance is higher than the threshold, the original prediction result is retained.

[0034] In the practical application of this embodiment, the irradiance threshold is set to 0.1 W / m².

[0035] In practical applications of this embodiment, a model training and control module is also included. The model training and control module is bidirectionally connected to the multi-model prediction library module. The model training and control module uses the Adam optimizer and the loss function is mean squared error.

[0036] In the practical application of this embodiment, the output of the main control output module includes the corrected hourly photovoltaic power output prediction sequence, a data table comparing the accuracy of each model, and statistical results of the prediction error distribution.

[0037] The output power of photovoltaic power generation systems is affected by a variety of natural factors, exhibiting characteristics such as randomness, fluctuation, and intermittency. By clarifying these influencing factors, more reasonable input features can be selected in the prediction model, thereby significantly improving the prediction accuracy.

[0038] Solar irradiance is the most crucial factor determining photovoltaic (PV) power output, and there is a clear positive correlation between the output power of a PV array and incident irradiance. On a clear, cloudless day, irradiance starts from zero after sunrise, gradually increases, reaches its maximum around noon, and then gradually decreases, returning to zero at night. This perfectly reflects the logic behind the time-varying nature of PV power output. The typical daily PV power output variation is shown below. Figure 1 As shown. In general, photovoltaic output is the result of the combined effects of several factors, including irradiance as the primary factor, temperature correction, fine-tuning by other meteorological factors, and time cycle constraints. These factors are interconnected. This multi-factor interplay makes photovoltaic output highly random and prone to curtailment. Therefore, predicting photovoltaic output and allocating energy storage capacity accordingly is of great significance.

[0039] In a photovoltaic-storage integrated system, the energy storage system's operating modes are broadly classified into two categories: energy time-shifting and power translation. The overall system function is as follows: Figure 2 As shown, the energy time-shifting mode primarily regulates electricity generation over long time scales. For example, it stores excess energy during peak solar power generation in the daytime and releases it at night or on cloudy or rainy days to match load demand. The power shifting mode, on the other hand, focuses on suppressing fluctuations over short time scales. It compensates for sudden power changes caused by cloud cover by rapidly charging and discharging the energy storage system, thus smoothing the grid-connected power curve and reducing the impact on the grid. In actual operation, energy storage systems often perform both functions simultaneously, with different emphases at different time scales. However, the investment cost of energy storage systems remains high at present, with the purchase cost of battery packs accounting for the majority of the total system cost.

[0040] The overall technical roadmap used in this embodiment is as follows: Figure 3 As shown, this mainly includes the construction and improvement of the photovoltaic power output prediction model, the establishment of the energy storage capacity optimization model, optimization solution and scheme comparison.

[0041] Implementation environment and data source description: This embodiment takes the photovoltaic power generation system of a low-carbon park in Southwest my country as the application object. Based on the hourly meteorological and photovoltaic power output data for the whole year of 2024, this intelligent prediction and correction system is deployed to achieve high-precision and high physical consistency short-term photovoltaic power output prediction. The prediction results are used to support the optimization of energy storage capacity in the park.

[0042] The data used in this embodiment comes from the measured operation data of the low-carbon park, spanning from January 1, 2024 to December 31, 2024, with a sampling frequency of once per hour, totaling 8784 data points throughout the year.

[0043] The original data contains the following fields: Time stamps: complete timestamps for year, month, day, and hour; Meteorological characteristics: Horizontal surface radiation (W / m²), ambient temperature (°C), relative humidity (%), precipitation (mm / h); Target variable: Actual photovoltaic output (kW), meteorological data such as Figure 5 As shown.

[0044] The photovoltaic system in this park has a moderate installed capacity and covers all four seasons, including various weather conditions such as sunny, cloudy, and rainy days. The data is highly representative, and the verification results have engineering reference value.

[0045] Data preprocessing is a fundamental step in ensuring the effectiveness of model training. This embodiment completes three steps in sequence: feature construction, normalization, and sliding window sample generation. The specific implementation process is as follows: First, the raw data is cleaned to remove outliers and missing values ​​caused by sensor malfunctions. For the small number of missing data, linear interpolation is used to fill in the missing data.

[0046] The feature construction unit extracts two discrete time features, hour and month, from the timestamp and performs periodic transformation using sine and cosine coding, as shown in the following formula:

[0047]

[0048]

[0049]

[0050] After encoding, the hourly and monthly features are each expanded into two-dimensional continuous variables. The encoded vector spaces of 11 PM and midnight, and December and January, are extremely close, fully preserving the cyclical adjacency of time. The model can more naturally learn the periodic patterns of day and night and seasons. Specifically, for example… Figure 6 As shown.

[0051] The final input model has a total of 9 feature variables: surface horizontal radiation, ambient temperature, relative humidity, precipitation, plus 4 time-coded features: hourly sine, hourly cosine, monthly sine, and monthly cosine, as well as historical power output values.

[0052] In the normalization process, this embodiment uses the Min-Max normalization method to linearly map each feature to the interval [0,1]. The parameters required for normalization are the maximum and minimum values ​​of each feature, which are statistically derived from the training set data and then applied to the test set. This approach avoids information leakage from the test set into the training phase and ensures that the two datasets are consistent in terms of input scale. To construct samples for supervised learning, this embodiment uses the sliding window method, employing the feature sequence of the past 24 hours (L=24) as input to predict the output in the second hour. Each sliding step of the window generates a sample, resulting in a total of L=24 samples. In chronological order, the first 80% (7023 samples) is allocated to the training set, and the last 20% (1752 samples) is allocated to the test set, thereby simulating a real prediction scenario.

[0053] This embodiment's multi-model prediction library contains five groups of time-series prediction networks with different structures. All models receive the exact same input samples and use the same training configuration to ensure fairness in the comparison. The specific structures of each group of models are as follows: (1) LSTM prediction unit (core baseline model) like Figure 4 As shown, the Long Short-Term Memory (LSTM) network is the core model of this system. Unlike traditional RNNs, which only transmit hidden states, LSTMs also maintain an information channel called "cell state" between adjacent time steps, denoted as... This cell state persists throughout the entire sequence, undergoing only a small number of linear interactions, allowing information to propagate across multiple time steps with almost no loss. To facilitate access to and modification of the cell state, LSTM employs three gating units: a forget gate, an input gate, and an output gate. Each gating unit is essentially a single-layer neural network with the sigmoid function as its activation function, outputting a value between 0 and 1, representing the proportion of information that passes through.

[0054] The function of the forget gate is to determine the cell state at the previous moment. How much information should be discarded? It includes the hidden state from the previous moment. Input at the current moment After concatenation, the data passes through a fully connected layer and a sigmoid activation, outputting a forgetting ratio vector between 0 and 1. The formula is:

[0055] Among them sigmoid function, and The weights and biases of the forget gate. The closer each component value is to 0, the more likely the historical information at the corresponding location is to be forgotten; the closer it is to 1, the more likely it is to be retained.

[0056] The input gate determines the strength of new information written into the cell state at the current moment. It is jointly controlled by the sigmoid layer and the tanh layer, and the formula is as follows: sigmoid output By controlling the update intensity in each dimension, the tanh layer compresses candidate values ​​to the interval [−1,1].

[0057] With the outputs of the forget gate and the input gate, the cell state can be updated. Old states are discarded according to the forget gate ratio, and new candidate states are added according to the input gate ratio. The formula is:

[0058] in This means that two vectors are multiplied element by element. LSTM can alleviate gradient vanishing mainly by using this linear update method—the forget gate performs element-wise multiplication, allowing the gradient to pass through the time step in an approximate identity mapping during backpropagation, thus avoiding the exponential decay caused by continuous multiplication.

[0059] Finally, the output gate generates the hidden state output at the current time step based on the updated cell state. It also uses a sigmoid layer to determine which information to output, and then a tanh layer to compress the cell state and multiply it by the output gate result. The formula is:

[0060]

[0061] Hidden state It serves both as the network output at the current moment (or as the input to subsequent fully connected layers) and as the loop input for the next moment.

[0062] This embodiment employs a two-layer stacked LSTM structure. The first layer has 128 hidden units, required to return the hidden state sequence at each time step. This allows the second LSTM layer to receive complete temporal context information, rather than just the compressed result of the last time step. A Dropout layer with a dropout rate of 0.2 is placed between the two layers. During training, some neurons are randomly "turned off," forcing the network to learn more stable feature representations that are less prone to overfitting. The second layer has 64 hidden units, returning only the hidden state of the last time step. This state condenses the core information of the input sequence over the past 24 hours. Another Dropout layer with a dropout rate of 0.2 is placed after the second layer. After the Dropout layer, a fully connected layer is connected: the fully connected layer contains 32 neurons, using the ReLU activation function for non-linear feature transformation; finally, a single neuron outputs the predicted photovoltaic output value using linear activation.

[0063] The model was trained using the Adam optimizer with an initial learning rate of 0.001 and a loss function of mean squared error (MSE). The batch size was 64, and the maximum number of training epochs was 100. To prevent overfitting and improve training efficiency, three callback mechanisms were implemented: an early stopping mechanism monitors the loss value of the test set (used as a validation set during training). If the loss value does not decrease for 20 consecutive epochs, training is terminated early, and the model automatically reverts to the weight set with the lowest historical loss, preventing the model from becoming increasingly biased towards the optimal training direction later in the training process; a model checkpoint automatically saves the currently optimal model weights during training; and a learning rate decay strategy halves the learning rate when the test loss no longer improves for 10 consecutive epochs, allowing the model to converge more stably when approaching the optimal solution. Through continuous optimization using these methods, the model can achieve the desired convergence effect within a limited number of training epochs.

[0064] The overall LSTM parameter settings are shown in Table 3-1.

[0065] Table 3-1 LSTM Parameter Settings Input time step 24 LSTM layers 2 First layer of hidden unit 128 Second hidden unit 64 Dropout ratio 0.2 Fully connected layer unit 32 (ReLU) Output layer unit 1 (Linear) Optimizer Adam Initial learning rate 0.001 Batch size 64 After the model is trained, it is run on a unified test set for prediction, and evaluated using three quantitative metrics to select the optimal model. This system employs three complementary evaluation metrics to comprehensively characterize the model's predictive performance from different dimensions: Root Mean Square Error (RMSE): The arithmetic square root of the mean square of the differences between the predicted and actual values. The formula is:

[0066] in, This represents the actual output value of the i-th sample. Here, n represents the predicted value, and n is the total number of samples in the test set. Since the error term is first squared and then squared, RMSE is particularly sensitive to large deviations. In photovoltaic power output prediction, this means that prediction errors during peak periods (such as around noon) will be given greater weight. A lower RMSE value indicates that the model maintains good tracking accuracy even during critical high-output periods, which is especially important for energy storage capacity planning—deviations in peak prediction often directly lead to estimation errors in energy storage capacity. The unit of RMSE is the same as photovoltaic power output, in kW.

[0067] Mean Absolute Error (MAE): The arithmetic mean of the absolute values ​​of the differences between predicted and actual values, expressed by the formula:

[0068] Unlike RMSE, MAE directly calculates the average of the absolute values ​​of errors. The contribution of each sample is proportional to its error, without the amplification effect of squared errors. Therefore, MAE is less sensitive to a few outliers with large errors and can more robustly measure the overall prediction bias of the model in most normal scenarios. If RMSE focuses on the extent of the bias in the worst case, then MAE's task is to measure the average to see how accurate the prediction is. Using these two metrics together can avoid a one-sided evaluation based on only one indicator. The unit of MAE is the same as RMSE, which is kW.

[0069] Coefficient of determination (R²): Measures how well the model explains the fluctuations in the true values. The formula is:

[0070] Here, y refers to the mean of the actual output on the test set. The numerator in the formula is the sum of squared residuals from the model's predictions, and the denominator is the sum of the variances of the actual outputs themselves. If the model simply outputs a constant value (e.g., using the mean of the training set as the output), then the sum of squared residuals will equal the total variance. The sum of squared residuals is close to 0; conversely, if the model could perfectly predict every sample, the sum of squared residuals would be 0. It also equals 1. In the scenario of photovoltaic forecasting, The physical meaning is: what proportion of the total fluctuation in photovoltaic power output can be explained by the model's predictions? A figure close to 0.9... This indicates that the model has captured over 90% of the output variation patterns, and the remaining less than 10% of fluctuations are because the model failed to incorporate random factors. It is a dimensionless indicator, and its value is generally between 0 and 1.

[0071] The three metrics mentioned above each have their own focus: RMSE amplifies large errors and is more suitable for scenarios requiring high peak prediction accuracy; MAE reflects the overall average level and highlights the stability of the model; R² provides a comprehensive evaluation from the perspective of variance interpretation.

[0072] After the model is trained, the test set samples are fed into the network to obtain normalized predicted values, which are then denormalized to restore the actual power values. These values ​​are then compared with the actual output, and various indicators are calculated and visualized.

[0073] To evaluate the overall prediction accuracy, three evaluation metrics of the basic LSTM model on the test set were calculated and summarized in Table 3-2. Table 3-2 shows that the model achieved relatively ideal prediction results without any post-processing. (Coefficient of Determination) The model achieved a mean square error (MSE) of 0.9471, indicating that it can explain over 90% of the fluctuations in photovoltaic power output, demonstrating a fairly good fit. Both the root mean square error (RMSE) and the mean absolute error (MAE) are within reasonable ranges, meaning that the overall deviation between the predicted and actual values ​​is manageable.

[0074] Table 3-2 Evaluation Indicators

[0075] To further observe the model's predictive performance at different time periods, a curve comparing predicted and actual values ​​was plotted using 500 consecutive samples (approximately 20 days) from the test set. Figure 7 As shown.

[0076] In the graph, the solid blue line represents the actual power output of photovoltaic systems, and the dashed orange line represents the power output predicted by the model. Figure 7 It can be seen that the fluctuations of the predicted curve and the actual curve during the daytime are basically synchronized; whether it is a smooth curve with a single peak like on a sunny day, or a jagged and violent fluctuation caused by cloud cover in cloudy weather, the model can fit the actual output well, without obvious lag or oversmoothing. This shows that the two-layer LSTM structure can effectively capture short-term output fluctuations caused by changes in irradiance, while also having the ability to judge the overall trend.

[0077] During the nighttime hours, the predicted photovoltaic output data approaches zero, indicating that the model has learned the basic circadian rhythm from the data. However, a closer look at Table 3-3 reveals that the model still outputs a very small value at night. Although these values ​​are small, physically speaking, solar irradiance is zero at night, and photovoltaic modules should not output any power. Because the model's training objective is to minimize the overall mean squared error, the zero-value constraint of the nighttime samples is diluted by the high output fluctuations of the numerous daytime samples. Furthermore, due to inertia and other factors, the optimizer lacks sufficient motivation to precisely reduce it to absolute zero. Therefore, it is necessary to address this illogical output.

[0078] Table 3-3 Nighttime Prediction Results of the Model 2024 / 10 / 200:00 0 -1.2893986 1.289399 2024 / 10 / 201:00 0 -1.1101898 1.11019 2024 / 10 / 202:00 0 -1.8277699 1.82777 2024 / 10 / 203:00 0 -1.955131 1.955131 2024 / 10 / 204:00 0 -0.76599807 0.765998 2024 / 10 / 205:00 0 -1.731069 1.731069 2024 / 10 / 206:00 0 -1.291521 1.291521 The physical prerequisite for photovoltaic power output is solar irradiance. When the measured irradiance is zero or extremely low, it should be forcibly set to zero regardless of the model's output value. This post-processing method does not require modification of the model structure or retraining of the network; it only makes a one-time reasonable correction to the output after the prediction is completed. The implementation cost is very low, and it does not have any negative impact on the daytime prediction accuracy.

[0079] Specifically, for each predicted sample in the test set, the measured irradiance value at the corresponding time is first obtained. Then, based on the preset threshold For the original predicted value The correction rules are shown in the formula.

[0080]

[0081] When selecting this threshold δ, on the one hand, it is necessary to tolerate the small noise and measurement errors inherent in the irradiance sensor itself, avoiding misclassifying cloudy or rainy days with weak power output as nighttime; on the other hand, it is necessary to clearly distinguish the periods of truly no sunlight. Referring to the start-up irradiance characteristics of photovoltaic modules and the accuracy level of conventional measuring instruments, this embodiment sets the threshold at 0.1 W / m². This value is slightly larger than absolute zero, effectively filtering out false power output at night and during completely cloudy or rainy weather, without affecting the transitional periods at dawn and dusk when irradiance is low but there is still a small amount of power output.

[0082] To verify the actual effectiveness of this physical constraint strategy, this embodiment corrected the original prediction results of the base LSTM model on the test set according to the rules above, and recalculated RMSE, MAE, and These three indicators are compared with the results before the constraints were added. The specific data is summarized in Table 3-4.

[0083] Table 3-4 Comparison of Evaluation Indicators (with added physical constraints)

[0084] As shown in Table 3-4, the addition of physical constraints improved all three evaluation indicators to varying degrees. The root mean square error (RMSE) and mean absolute error (MAE) both decreased to varying degrees. This is mainly because the errors caused by spurious output at night were completely eliminated. For nighttime samples where the true value was zero, even a slight deviation in the original prediction would contribute a positive error; after correction, these errors were reduced to zero, thus lowering the overall mean and RMS values. (Coefficient of Determination) The improvement indicates that the revised predictions better explain the fluctuations in actual output, and the model's fit to nighttime samples no longer has any fundamental bias.

[0085] like Figure 8 The photovoltaic power output prediction comparison chart intuitively shows the correction effect of physical constraints. It is a segment of the test set containing multiple day-night alternation periods. The three curves of actual power output, original prediction and prediction after constraints are plotted on the same coordinate system. In order to more intuitively observe the impact of physical constraints on false power output at night, a table is drawn as shown in Table 3-5, comparing the values ​​of nighttime power output of the basic model and the improved model.

[0086] Table 3-5 Nighttime False Output Correction Table 2024 / 10 / 200:00 0 -1.2894 0 0 2024 / 10 / 201:00 0 -1.11019 0 0 2024 / 10 / 202:00 0 -1.82777 0 0 2024 / 10 / 203:00 0 -1.95513 0 0 2024 / 10 / 204:00 0 -0.766 0 0 2024 / 10 / 205:00 0 -1.73107 0 0 2024 / 10 / 206:00 0 -1.29152 0 0 As shown in Table 3-5, during the daytime periods with irradiance, the prediction curves before and after the constraint are completely identical, indicating that this post-processing strategy does not interfere with the normal daytime predictions. During the nighttime periods without irradiance, the occasional minor errors in the original predictions are strictly corrected to zero by the constrained curves, perfectly matching the actual output. This differentiated processing of "retaining daytime values ​​and zeroing them at night" fundamentally improves the physical plausibility of the prediction results.

[0087] The distribution of prediction error (actual value minus predicted value) is as follows: Figure 9 As shown, the left side is the histogram of prediction errors, and the right side is the sequence diagram of prediction errors.

[0088] The histogram shows that the error distribution basically follows a normal distribution with a slight skewness, with the vast majority of errors concentrated in the range of [-5, 5] kW. The distribution does not exhibit significant positive or negative skewness, indicating that the model does not systematically overestimate or underestimate photovoltaic output, demonstrating good unbiasedness. Looking at the error sequence plot, the errors generally fluctuate around the zero line, showing relatively stable performance across different time periods. No trend of error amplitude accumulating over time was observed, further validating the model's stability.

[0089] To verify the advantages of LSTM in handling photovoltaic power output prediction problems, this embodiment designs a horizontal comparison with other mainstream deep learning models. While maintaining the same data partitioning, training configuration, and post-processing of physical constraints, this embodiment introduces four models: Convolutional Neural Network (CNN), Simple Recurrent Neural Network (RNN), Temporal Convolutional Network (TCN), and Residual Network (ResNet). A systematic comparison is made from two dimensions: prediction accuracy and temporal fitting ability, thereby verifying the superiority of the LSTM deep learning model in handling photovoltaic power output problems.

[0090] In contrast, the CNN model consists of three convolutional layers. The first layer uses 64 kernels with kernel sizes of 7 and 5, followed by max pooling. The second layer increases the number of kernels to 128, using a uniform kernel size of 3, and also uses max pooling. The third layer increases the number of kernels to 256, maintaining the kernel size of 3, but switching to average pooling. All three layers use a pooling window of 2. Batch normalization and Dropout are also added to each convolutional layer to stabilize the model on unfamiliar data. After convolution, the feature maps are flattened and fed into two fully connected layers with 128 and 64 neurons respectively, finally outputting the predicted value linearly. CNNs compute relatively quickly by sharing parameters, but even with multiple layers, their receptive range expands gradually layer by layer. Establishing long-distance connections requires stacking layers, so the efficiency of information transmission is somewhat limited in situations like 24-hour timelines where global temporal dependencies need to be captured.

[0091] RNNs are the predecessors of LSTMs. They have a recurrent connection structure and can theoretically propagate historical information forward along time steps. The RNN comparison model built in this embodiment uses two stacked SimpleRNN layers. The first layer has 64 hidden units and returns the complete sequence, while the second layer has 32 hidden units and only returns the last hidden state. However, SimpleRNNs encounter a serious gradient vanishing problem in actual training—as the sequence length increases, the gradients from backpropagation decay exponentially after multiple multiplications, causing the network to hardly learn long-distance dependencies. This is particularly disadvantageous for tasks like photovoltaic forecasting that require reference to meteorological information from several hours prior.

[0092] Temporal convolutional networks are designed using dilated convolutions and residual connections, which retain the advantages of parallel computing in CNNs while expanding the receptive range. ResNet, on the other hand, uses skip connections to allow gradients to propagate directly back along shortcuts, effectively mitigating the degradation problem of deep networks. Both models perform well in output temporal prediction tasks, and this embodiment also includes them in the comparison to more comprehensively evaluate the performance positioning of LSTM.

[0093] In this embodiment, the four comparative models have unified global hyperparameters. After training, all models undergo physical constraint post-processing (irradiance threshold of 0.1 W / m²) to ensure that no model has spurious output at night, thus ensuring the fairness of the comparative experiment.

[0094] After the experiments, to more intuitively compare the results of the five models, the three-phase evaluation metrics of all deep learning models were calculated and compared. The corresponding time-series prediction curves were also summarized, as follows: Figure 10 As shown in the figure, the prediction performance on the test set is summarized in Table 3-6.

[0095] Table 3-6 Comparison of Evaluation Indicators

[0096] As can be seen from the data in Table 3-6, LSTM holds an absolute advantage in the comparison of evaluation indicators, with a determination coefficient of [missing information]. It reached 0.9472, and its root mean square error and mean absolute error were the lowest among the five models.

[0097] The results of RNN are slightly lower than those of LSTM. The value is 0.9460, which indicates that when the input sequence length is set to 24 hours, the time series modeling capability of the loop structure itself has already played a key role.

[0098] The gating mechanism of LSTM further alleviates gradient decay, resulting in a small but still relatively stable improvement in accuracy.

[0099] CNN The value is 0.8974, which is significantly different from the two recurrent models mentioned above. This is because CNNs are good at capturing pattern changes within local time windows, but for prediction tasks such as photovoltaic power output, which require integrating meteorological evolution information over several hours or even across day and night, the temporal perception range of pure convolutional structures is still relatively limited.

[0100] ResNet and TCN ranked fourth and fifth, respectively. The values ​​are 0.8844 and 0.8075 respectively. Although ResNet improves deep optimization through residual structure, its structural advantages are not reflected in the sample size and feature dimension of this task. Although TCN can be optimized through dilated convolution, its feature extraction efficiency is not as flexible as the gating mechanism of LSTM on relatively regular daily cycle sequences.

[0101] Observing the prediction curves, the output curves show a smooth single peak under sunny conditions, while frequently exhibiting sawtooth fluctuations under cloudy conditions. The prediction lines of LSTM and RNN maintain good synchronization with the actual output under both weather conditions, without significant lag or lead. CNN tends to underestimate output during certain peak periods, while TCN and ResNet deviate more significantly during periods of sharp fluctuations, especially when output rises and falls rapidly, where the errors are more pronounced. Overall, LSTM and RNN demonstrate stronger tracking capabilities.

[0102] To compare the prediction results of various deep learning models in more detail, this example uses images comparing predictions for a typical sunny day. For example... Figure 11 As shown in the figure, it can be observed that the overall curve amplitude predicted by LSTM is slightly better than that of RNN, and is closest to the true value. Considering the three quantitative indicators and the intuitive performance of curve fitting, LSTM has both accuracy advantages and robust structure in the specific task of photovoltaic power output prediction. Therefore, it is a very suitable choice as the prediction model in the energy storage capacity optimization configuration study of this embodiment.

[0103] In the problem of optimizing the capacity configuration of photovoltaic energy storage systems, the optimization model is usually nonlinear and has many constraints, such as energy storage state of charge constraints, charging and discharging power constraints, and curtailment rate constraints. Traditional analytical methods are difficult to use to handle such nonlinear multi-constraint problems, so intelligent optimization algorithms are needed to solve them.

[0104] Different intelligent optimization algorithms vary in computational efficiency, convergence speed, and stability. Randomly choosing an algorithm for energy storage capacity optimization may result in excessively long computation times and unsatisfactory convergence, negatively impacting the overall optimization performance. Therefore, it is necessary to compare several algorithm systems before formally building an energy storage capacity optimization model.

[0105] The main objective of this embodiment is to minimize the total lifecycle cost of the system, which is a single-objective optimization. After researching the relevant materials, this chapter intends to select from several advanced algorithms, including Particle Swarm Optimization (PSO), Genetic Algorithm (GA), Whale Algorithm (WOA), and Sparrow Search Algorithm (SSA).

[0106] Particle Swarm Optimization (PSO) is a swarm intelligence-based optimization method inspired by the behavior of birds searching for food. The algorithm allows multiple particles to search the solution space together. Each particle continuously updates its velocity and position based on its historical best position and the best position found by the entire swarm, gradually approaching the optimal solution. This algorithm has a simple structure, few parameters, and relatively fast convergence speed.

[0107] Genetic algorithms (GA) originate from the theory of biological evolution. They continuously update the population through operations such as selection, crossover, and mutation to optimize the solution. They have strong global search capabilities, but they have many parameters, making the computation process relatively complex in practical applications.

[0108] The Whale Optimization Algorithm (WOA) mimics the hunting process of humpback whales, using a spiral update and encirclement mechanism for searching. This algorithm can balance global search and local exploitation to a certain extent, but it is prone to convergence fluctuations in complex problems.

[0109] The Sparrow Search Algorithm (SSA) is based on the foraging behavior of sparrows and achieves optimization through cooperation between individuals with different roles. It has certain advantages in escaping local optima, but its computational cost is relatively high.

[0110] To ensure fairness and comparability in comparing different algorithms, this embodiment uses a unified test function for experiments instead of directly using the energy storage capacity optimization model. This avoids the interference of model complexity on algorithm performance evaluation, making the comparison results more objective.

[0111] The following test function was used in the experiment:

[0112] Regarding parameter settings, all algorithms used the same conditions: population size of 30, maximum number of iterations of 100, 10 independent runs, and variable dimension of 2; all experiments were completed in the same computing environment to ensure the consistency of experimental results.

[0113] To comprehensively evaluate the algorithm's performance, this embodiment selects several different metrics for analysis, including average running time, running time fluctuation, average optimization result, result fluctuation, and the number of iterations required to reach stability.

[0114] After obtaining the results from the experiments, we will mainly analyze each algorithm from three aspects: computational efficiency, convergence performance, and optimization results.

[0115] Algorithm runtime histogram as follows Figure 12 As shown. From Figure 12 As can be seen, different algorithms have significant differences in running time. The PSO algorithm has the shortest average running time, indicating its highest computational efficiency; the WOA algorithm ranks second; the SSA and GA algorithms have relatively longer running times and higher computational costs. A summary of other algorithm performance evaluation metrics is shown in Table 5-1.

[0116] Table 5-1 Algorithm Evaluation Metrics

[0117] Observing the data in Table 5-1, it can be seen that the average optimization result of the PSO algorithm is closest to the theoretical optimal value (-6.06153), and the result fluctuation is extremely small (8.07E-12), indicating that it has strong optimization ability and the best stability. At the same time, PSO requires the fewest iterations to reach stability (7.53 times), and has the fastest convergence speed. In contrast, GA has a slower convergence speed, and the optimization results of WOA and SSA fluctuate relatively more, with slightly inferior stability compared to PSO.

[0118] To provide a clear comparison of the overall performance of each algorithm, this embodiment normalizes three metrics (average running time, average optimization result, and number of iterations required to reach stability) and visualizes them using a radar chart, as shown below. Figure 13 As shown in the radar chart, a higher score for each dimension indicates better performance.

[0119] As can be seen from the radar chart, the PSO algorithm achieved the highest scores in all three dimensions, with the largest overall coverage area, and its overall performance was significantly better than GA, WOA, and SSA. The GA algorithm had acceptable optimization accuracy, but its convergence speed and computational efficiency were relatively low; although WOA had a shorter running time, its optimization results fluctuated greatly; the convergence speed of SSA was between that of WOA and GA, but its optimization results were slightly inferior to PSO.

[0120] In summary, the Particle Swarm Optimization (PSO) algorithm demonstrates superior performance in terms of computational efficiency, optimization accuracy, and convergence speed, while also exhibiting outstanding stability. Therefore, this embodiment selects the PSO algorithm as the solution algorithm for the subsequent energy storage capacity optimization configuration problem.

[0121] In addition, to verify whether the energy storage capacity optimization method based on photovoltaic power output prediction proposed in this embodiment can be implemented, this embodiment uses photovoltaic power output prediction data combined with load data to guide the optimal configuration of energy storage capacity.

[0122] The load data uses hourly data at the same time scale as the photovoltaic data, and then the two are time-aligned to form a unified dataset; the simulation period is 8784 hours per year, and the time step is set to 1 hour.

[0123] Regarding system parameters, the original predicted output is scaled up by 1.5 times to simulate a scenario with high photovoltaic penetration. The grid-connected power limit is set at 300kW to limit the photovoltaic's ability to supply power to the grid. If the photovoltaic output exceeds the grid-connected capacity and energy storage cannot completely absorb the excess electricity, the excess is considered as curtailed power.

[0124] The energy storage system uses lithium iron phosphate batteries, and its main operating parameters are as follows: initial state of charge (SOC) is 0.50, the safe operating range of SOC is set to [0.10, 0.90], and the charge / discharge efficiency is 0.95%. To reflect the physical characteristics of lithium iron phosphate batteries, the rated capacity and rated power of the energy storage are coupled and constrained by the continuous discharge duration, i.e.:

[0125] Regarding economic parameters, this embodiment only calculates the various expenses of the energy storage system itself, mainly to make the economics of different configuration schemes clearer and to accurately evaluate the economics of the energy storage configuration scheme itself. The cost consists of several parts: the unit price of PCS is calculated at 230 yuan / kW, the lithium iron phosphate energy storage part is calculated at 810 yuan / kWh, the annual operation and maintenance cost is taken as 1.5% of the initial investment, the battery can be used for about 10 years, and the project cycle is 15 years. Therefore, the battery body needs to be replaced once at the end of the 10th year. The replacement cost is discounted to year 0 and then included in the total cost. At the same time, in order to take into account the loss caused by curtailment, a curtailment penalty price of 0.35 yuan / kWh is set, and the discount rate is calculated at 5%. The above parameters are summarized in Table 6-1.

[0126] Table 6-1 Summary of Simulation System Parameters SOC operating range [0.10,0.90] Initial SOC 0.5 Charge and discharge efficiency 0.95 Continuous discharge duration constraint 1h~4h (Lithium iron phosphate) Converter (PCS) cost 230 yuan / kW Battery system cost 810 yuan / kWh Annual maintenance fee rate 1.50% Continued from Table 6-1: Summary of Simulation System Parameters

[0127] The complete formula for calculating total lifecycle cost is: The definitions of each item are as follows.

[0128] The initial investment cost is: The present value of the battery replacement cost in year 10 is: Annual maintenance costs are: The annual fine for light aberration is: in The amount of solar power curtailed annually (kWh). =0.35 yuan / kWh is the penalty electricity price.

[0129] The present value annuity factor is: When the discount rate =5%, Project Lifespan =15 years ago, (5%,15)=10.3797.

[0130] It is important to note that the LCC (Limited Cost of Storage) assessment system in this embodiment does not include the system's electricity purchase cost. This is because the electricity purchase cost is a background operating cost at the system level, and its magnitude is mainly determined by the load scale and photovoltaic penetration rate. This cost exists in large quantities regardless of the energy storage scale configuration, and including it in the LCC would mask the economic differences in the energy storage configuration schemes themselves. Therefore, the LCC in this embodiment only reflects the construction, replacement, operation and maintenance, and curtailment penalty costs of the energy storage system itself throughout its entire life cycle, in order to achieve an accurate evaluation of the economics of energy storage configuration.

[0131] PSO Optimization Process Analysis: This embodiment uses the Particle Swarm Optimization (PSO) algorithm selected after comparative experiments to optimize the rated power of energy storage. and rated capacity Conduct joint optimization. Based on the rated power of energy storage. and duration of continuous discharge As decision variables, through = Indirectly determine the rated capacity of energy storage and optimize for the lowest life-cycle cost of the energy storage system.

[0132] In the PSO algorithm, the inertia weight adopts a linear decreasing strategy, gradually decreasing from 0.9 to 0.4. This setting aims to allow the algorithm to fully optimize within a large search space at the beginning, and then refine its search for locally optimal areas in the later stages. This prevents standard PSO from getting stuck in local conditions before finding the global optimum when solving high-dimensional non-convex problems. For constraints, a priority-based approach is used: if a particle's solution satisfies the condition of a waste rate ≤ 5%, its fitness value is directly calculated using the annualized lifetime cost; otherwise, a penalty is added to this cost. This design ensures that all feasible solutions are prioritized over infeasible solutions when comparing the performance of different particles in the population. After multiple iterations, the algorithm can reliably fall within the constraints, thus yielding energy storage capacity optimization results that meet practical engineering needs.

[0133] Figure 14 The convergence curve of the global optimal LCC of the PSO algorithm with the number of iterations is given. From Figure 14The optimization process can be clearly observed to consist of two distinct stages. In the early stages of iteration (around generation 1 to generation 30), the particle swarm is relatively dispersed in the search space, and the global optimum LCC value decreases rapidly, accounting for more than 70% of the total decrease. This indicates that the PSO algorithm has strong global exploration capabilities and can quickly locate potential regions in a broad search space. As the number of iterations increases, the rate of decrease in the objective function tends to level off, and the curve gradually becomes horizontal. By around generation 80, the global optimum has basically stabilized around 3.25 million yuan, and the LCC has not changed significantly in subsequent iterations, indicating that the algorithm has successfully escaped the local suboptimal region and stably converged to the global optimum.

[0134] Figure 15 The evolution of the light abandonment rate corresponding to the global optimal solution with the number of iterations is shown. Figure 15 In the initial optimization phase, the energy storage capacity configuration corresponding to some particles was too small, and the system could not effectively absorb the surplus photovoltaic power, with the curtailment rate far exceeding the constraint limit of 5%. As the particle swarm gradually migrated to the feasible region under the joint guidance of individual optimality and global optimality, the curtailment rate corresponding to the global optimal solution rapidly decreased and eventually stabilized near the constraint boundary of 5.00%.

[0135] The aforementioned convergence characteristics profoundly reveal the inherent economic laws of this optimization problem: under the premise of satisfying the curtailment rate constraint, the system tends to minimize the energy storage scale as much as possible to control the initial investment and battery replacement costs; therefore, the optimal solution of the LCC minimization problem naturally tends to lie at the constraint boundary, rather than deep within the feasible region. The PSO algorithm can accurately search for and stably fall at this boundary equilibrium point, fully demonstrating its effectiveness in handling complex constrained optimization problems.

[0136] Figure 16 A scatter plot of the distribution of all evaluated particles in the solution space of "energy storage power - energy storage capacity" is given, with the color intensity representing the corresponding LCC size.

[0137] Depend on Figure 16 It is evident that there is a clear boundary between feasible and infeasible solutions within the search space. This is also marked in the figure. =1h and =4h Two coupled constraint boundary lines, all particles are constrained to search within the wedge-shaped region between the two boundary lines, effectively avoiding invalid solutions with severe power-capacity mismatch. The optimal solution (marked with a red star) is located at At the 4h constraint boundary, its LCC is the smallest in the feasible solution set, which is consistent with the analysis conclusion of the convergence curve.

[0138] The experiments described above demonstrate that, under the 0.25C low-rate charge / discharge mode provided in this embodiment, the system achieves superior full-lifecycle economics with relatively mild battery operating conditions, consistent with the cycle degradation characteristics of lithium iron phosphate batteries. From the spatial distribution of feasible and infeasible solutions, the particle population consistently searches within the reasonable region defined by the power-capacity coupling constraint, indicating that the joint optimization strategy effectively avoids ineffective configurations due to power-capacity mismatch. The above analysis verifies the applicability and effectiveness of the PSO algorithm in solving the energy storage capacity optimization configuration problem from three dimensions: convergence, economy, and physical rationality, providing a reliable methodological foundation for subsequent optimization result analysis.

[0139] Analysis of Energy Storage Capacity Optimization Results: Through global optimization using the PSO algorithm, and under the constraint that the annual curtailment rate does not exceed 5%, the configuration scheme that minimizes the total lifecycle cost of the energy storage system is obtained. The energy storage system parameters are shown in Table 6-2.

[0140] Table 6-2 Energy Storage System Parameters

[0141] The life cycle cost structure is shown in Table 6-3.

[0142] Table 6-3 Composition of Life Cycle Costs ① Initial investment (PCS + battery) 1,736,765 yuan PCS cost 115,117 yuan Battery cost 1.621648 million yuan ② Battery replacement cost (discounted) 995,551 yuan ③ Annual maintenance costs 26,051 yuan / year Annual maintenance discounted total value 270,405 yuan ④ Annual light abandonment fines 23,827 yuan / year Total value of annual light skipping penalties 247,315 yuan Discount rate 5.00% Annuity present value factor (5%, 15 years) 10.3797 Lifecycle Cost (LCC) 3.250037 yuan Analyzing the components of the total lifecycle cost, the initial investment accounts for 53.44% of the total lifecycle cost, reaching RMB 1.7368 million. Battery costs are RMB 1.6216 million, significantly higher than the PCS cost of RMB 115,100. This is directly related to the higher cost per unit capacity of lithium iron phosphate batteries (RMB 810 / kWh) and the energy storage configuration of this solution (2002.03kWh). The discounted cost of battery replacement is RMB 995,600, accounting for 30.63%, ranking second, indicating that the batteries must be replaced once every 15 years, which is a considerable expense. The annual operation and maintenance costs and the annual curtailment penalty, after discounting, add up to approximately RMB 517,700, accounting for 15.93% of the total cost, with a relatively limited impact.

[0143] These figures reveal that the key issue with lithium iron phosphate energy storage over its entire lifecycle is the initial investment plus battery replacement, totaling 2.7323 million yuan, accounting for 84.07% of the total cost. Capital expenditure essentially determines the overall cost. Therefore, the most direct way to reduce the total cost is to decrease the scale of energy storage configuration. The solution found by PSO manages to keep the energy storage scale as small as possible within the constraint of a curtailment rate of no more than 5%. The optimized continuous discharge duration is set at 4 hours, corresponding to a relatively gentle charge-discharge method of 0.25C. This approach is reasonable for two reasons: firstly, given a fixed power output, a longer duration results in a larger energy storage capacity, allowing for the storage of more excess photovoltaic power and reducing curtailment penalties; secondly, the low charge-discharge rate of 0.25C is beneficial for extending battery cycle life, slowing down capacity decay, which aligns with the 10-year battery replacement requirement, making it more economical from a lifecycle perspective.

[0144] To verify the rationality of the optimal configuration scheme in actual operation, the first 168 hours (one week) of the simulation period were selected as a typical period, and hourly variation curves of each power component of the system were plotted, as shown below. Figure 17 As shown. From Figure 17 It's evident that during peak daytime solar power output, after meeting local load and grid-connected power transmission limits, there's still a significant surplus. At this time, the energy storage system continuously charges at near-rated power to absorb the excess electricity, preventing curtailment. When the energy storage's state of charge approaches its limit, but there's still surplus power, a small amount of curtailment occurs. In the evening and at night, solar power output quickly drops to zero, but the load remains at a relatively high level. At this point, the energy storage system switches to discharge mode to fill the power gap, significantly reducing the demand on the grid.

[0145] like Figure 18 The curves showing the change in the state of charge of the energy storage system during the same time period are shown. From... Figure 18 As can be seen, within a complete daily cycle, the state of charge fluctuates regularly within the safe range of 0.1 to 0.9, without prolonged exceedances or getting stuck at the boundary. This indicates that the ratio of energy storage capacity to power is reasonable; there is neither insufficient regulation due to too small a capacity, nor idle equipment due to too large a capacity. The simulation results for the entire year show that the energy storage system completes an average of approximately 0.8 equivalent full cycles per day, which is within a reasonable range for the whole year. This effectively extends battery life and ensures the long-term economic viability of the project.

[0146] Comparison of different configuration schemes: In order to compare the actual performance of different energy storage configuration schemes, this embodiment sets up three typical schemes and conducts a horizontal analysis from the two dimensions of technical performance and economic benefits. Each scheme must comply with the hard requirement that the annual curtailment rate is no higher than 5%.

[0147] Option 1 (No Energy Storage Baseline Option): No energy storage is installed. After the excess photovoltaic power generation is used to supply the local load and the grid-connected power limit (300kW), the remaining power is all abandoned. The abandoned power is converted into economic losses at the local photovoltaic feed-in tariff of 0.35 yuan / kWh and included in the total life cycle cost. This option can reflect the basic economic situation without energy storage regulation, but it cannot reduce the abandonment rate below the constraint value.

[0148] Option 2 (a typical over-allocation scheme in the market) refers to the common practice in current distributed photovoltaic and energy storage projects of "configuring according to the ratio of photovoltaic rated power". The energy storage power is set at 60% of the photovoltaic rated power, and the continuous discharge time is set at 4 hours. According to the conditions of this project, the rated power of photovoltaic output after amplification is about 1000kW. Therefore, the energy storage rated power is configured to be 600kW and the rated capacity is 2400kWh. This scheme represents a relatively large energy storage capacity configuration in the market. Although the curtailment rate is controlled within 5%, the initial investment and battery replacement costs are very high.

[0149] Scheme 3 (the optimized scheme in this embodiment) was obtained through comparative experiments using the selected PSO algorithm. It aims to minimize the total lifecycle cost and, under constraints such as an annual curtailment rate of ≤5%, yielded an optimal power of 500.51kW and an optimal capacity of 2002.03kWh. The hourly simulations throughout the year for all three schemes were consistent, and the comparison results are shown in Table 6-4.

[0150] Table 6-4 Comparison of different configuration options Energy storage capacity (kW) 0.00 600.00 500.51 Energy storage capacity (kWh) 0.00 2400.00 2002.03 Discard rate (%) 8.52% 4.55% 5.00% Lifecycle Cost (LCC) in RMB 10,000 42.14 382.46 325.00 The comparison of simulation results shows that the PSO optimization scheme presented in the paper achieves a good balance between technical requirements and economic efficiency. Option 1, lacking energy storage, has a curtailment rate of 8.52%, exceeding the ≤5% threshold, making it unusable in engineering practice. Although its total investment is only 421,400 yuan, this precisely demonstrates that energy storage is essential to meet the grid connection requirements. Option 2 uses a large-capacity configuration of 600kW / 2400kWh, reducing the curtailment rate to 4.55%, meeting the requirements. However, it requires an initial investment of 1,736,200 yuan, with battery replacement costing approximately 981,000 yuan, resulting in a total lifespan cost of 3,824,600 yuan. Option 3 utilizes the PSO algorithm for optimization, adjusting the energy storage capacity to precisely match the ≤5% curtailment rate, achieving a curtailment rate of 5.00%. Its initial investment is 1,736,800 yuan, with battery replacement costing 995,600 yuan, resulting in a total cost of only 3,250,000 yuan. Compared to Option 2, it saves 574,600 yuan, a reduction of approximately 15.0%, demonstrating the significant cost-saving effect of the optimized configuration.

[0151] In summary, among all feasible solutions that meet the mandatory requirements for curtailment rate, the PSO optimization scheme in this embodiment minimizes the total lifecycle cost and avoids investment waste caused by blindly adding more energy storage. This verifies the effectiveness of the optimization method and its significant economic advantages. Therefore, the method in this embodiment can optimize the overall system cost while ensuring efficient utilization of new energy, thus verifying the effectiveness and economic value of this technical approach in engineering practice.

[0152] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification, characterized in that: It includes a data preprocessing module, a multi-model prediction library module, a model comparison and verification module, a physical constraint correction module, and a main control output module; The data preprocessing module receives raw meteorological and historical photovoltaic power output data at its input end and is connected to the input end of the multi-model prediction library module at its output end. It is used to clean and perform feature engineering on the raw data and construct standardized supervised learning samples. The multi-model prediction library module has multiple sets of time series prediction networks with different structures built in it, which are used to output multiple sets of photovoltaic power output prediction results in parallel. The input of the model comparison and verification module is connected to the output of the multi-model prediction library module, and is used to quantitatively evaluate the prediction accuracy of each model based on a unified test set and select the optimal prediction model. The input of the physical constraint correction module is connected to the output of the optimal model, and is used to correct the rationality of the prediction results based on the physical boundary of photovoltaic power output. The main control output module is bidirectionally connected to each of the above modules to coordinate data flow and parameter configuration, and output the final corrected photovoltaic power output prediction result.

2. The photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification according to claim 1, characterized in that, The data preprocessing module includes a feature construction unit, a normalization processing unit, and a sliding window sample generation unit. The feature construction unit is used to extract time features from the original data and perform periodic encoding, while also removing outliers and cleaning the data. The normalization processing unit is used to unify the scale of features with different dimensions. The sliding window sample generation unit is used to construct input-output sample pairs that meet the requirements of time series prediction.

3. The photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification according to claim 2, characterized in that, The feature construction unit extracts the discrete features of hours and months from the timestamp, and uses sine and cosine coding to map the hours and months to a two-dimensional unit circle space, preserving the periodic adjacency relationship of time. The input meteorological features include at least four categories: surface horizontal radiation, ambient temperature, relative humidity, and precipitation.

4. The photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification according to claim 1, characterized in that, The multi-model prediction library module contains five parallel time-series prediction networks: LSTM prediction unit, CNN prediction unit, RNN prediction unit, TCN prediction unit, and ResNet prediction unit. Each network receives the same standardized sample input, independently completes training and prediction, and synchronously outputs its own photovoltaic power output prediction sequence.

5. The photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification according to claim 4, characterized in that, The LSTM prediction unit adopts a two-layer stacked structure. The first layer sets 128 hidden units and outputs the hidden state at the full time sequence. The second layer sets 64 hidden units and outputs the hidden state at the final time. Dropout layers are set between the two layers and after the second layer to suppress model overfitting.

6. The photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification according to claim 1, characterized in that, The model comparison and verification module incorporates three evaluation metrics: root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). Using the test set data as a benchmark, it calculates the values ​​of these three metrics for each model and comprehensively selects the model with the highest prediction accuracy as the system's benchmark output model.

7. The photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification according to claim 1, characterized in that, The physical constraint correction module uses solar irradiance as the criterion and sets an irradiance threshold. When the irradiance at a given time is lower than the threshold, the predicted output at that time is forcibly corrected to zero. When the irradiance is higher than the threshold, the original prediction result is retained.

8. The photovoltaic output intelligent prediction and correction system based on multi-model comparison and verification according to claim 7, characterized in that, The irradiance threshold is set to 0.1 W / m².

9. The intelligent photovoltaic output prediction and correction system based on multi-model comparison and verification according to claim 1, characterized in that, It also includes a model training and management module, which is bidirectionally connected to the multi-model prediction library module. The model training and management module uses the Adam optimizer and the loss function is mean squared error.

10. The photovoltaic power output intelligent prediction and correction system based on multi-model comparison and verification according to claim 1, characterized in that, The output of the main control output module includes the corrected hourly photovoltaic power output prediction sequence, a data table comparing the accuracy of each model, and statistical results of the prediction error distribution.