A photovoltaic power station light power prediction and energy storage charging and discharging collaborative optimization method
Patent Information
- Application Number
- CN202611121292.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]为了克服上述光功率预测与储能充放电控制之间缺乏深度耦合、预测误差信息未能在调度决策中得到充分利用且储能调控边界不能随预测误差传播特性动态调整的问题,本发明提出一种光伏电站光功率预测与储能充放电协同优化方法,通过构建预测误差传播动力学模型与动态虚拟储能模型,将预测不确定性的演化规律与储能调控边界的时变特性深度融合,实现预测与调度的双向协同优化
[0018] 1. This invention constructs a prediction error propagation dynamics model, quantifies the cumulative evolution of optical power prediction error over time into an error propagation factor, and uses this factor as a coupling variable to dynamically correct the energy storage control boundary. This enables the energy storage charging and discharging strategy to no longer passively rely on fixed prediction values, but actively adapt to the time-varying propagation characteristics of prediction errors. This overcomes the problem of severe disconnect between energy storage scheduling and actual output after the prediction deviation is amplified over the prediction time scale in the existing serial architecture, and significantly improves the forward-looking compensation capability of the energy storage system for optical power prediction deviation.
Smart Images

Figure CN122931906A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power generation and energy storage control technology, and in particular to a method for co-optimizing photovoltaic power plant photovoltaic power prediction and energy storage charging and discharging. Background Technology
[0002] To mitigate the impact of photovoltaic (PV) power fluctuations on the power grid, the current mainstream technical approach is to configure battery energy storage systems at the PV power plant level, utilizing their rapid response and bidirectional regulation capabilities to pre-regulate the PV grid-connected power. Within this technical framework, PV power prediction and energy storage charge / discharge control constitute the two core components of PV power plant operation and management. Existing methods typically involve the PV power prediction system outputting a power prediction value, which is then used as input to the energy storage scheduling system, which formulates a charge / discharge plan based on the prediction. Around this basic paradigm, extensive research has been conducted from the perspectives of improving prediction accuracy and optimizing scheduling algorithms. For example, attention mechanisms, Transformers, and Long Short-Term Memory (LSTM) networks are used to improve the accuracy of PV power prediction, while model predictive control and mixed-integer programming are employed to optimize energy storage charge / discharge strategies.
[0003] First, the point prediction values output by the photovoltaic power prediction model inherently contain a certain degree of uncertainty, which accumulates and amplifies as the prediction timescale increases. Existing energy storage dispatch systems typically only receive the predicted values without fully utilizing the probability distribution information of the prediction error. This leads to a severe disconnect between the charging and discharging strategy and the actual output when the prediction deviation is large, resulting in power exceeding limits and operational risks. Second, the prediction and dispatching stages are treated as independent serial tasks, lacking effective two-way information feedback and dynamic closed-loop adjustment mechanisms. The prediction model cannot adaptively correct itself based on the actual adjustment effect of the energy storage system, and the energy storage system cannot actively transmit its time-varying boundary of adjustment capability to the prediction stage. This information barrier makes the system insufficiently adaptable to rapidly changing weather conditions. Third, existing methods typically treat the energy storage system's state of charge, charging and discharging efficiency, and lifetime degradation as fixed boundaries, failing to dynamically adjust the energy storage's control margin based on the propagation characteristics of the prediction error. This results in the energy storage system either failing to effectively compensate for prediction deviations due to overly conservative dispatching strategies or accelerating lifetime degradation due to aggressive charging and discharging strategies.
[0004] Therefore, in response to the problems mentioned above, this invention proposes a method for the coordinated optimization of photovoltaic power prediction and energy storage charging and discharging. Summary of the Invention
[0005] To overcome the problems mentioned above, such as the lack of deep coupling between photovoltaic power prediction and energy storage charging and discharging control, the failure to fully utilize prediction error information in scheduling decisions, and the inability of energy storage regulation boundaries to be dynamically adjusted according to the propagation characteristics of prediction errors, this invention proposes a collaborative optimization method for photovoltaic power prediction and energy storage charging and discharging. By constructing a prediction error propagation dynamics model and a dynamic virtual energy storage model, the evolution law of prediction uncertainty and the time-varying characteristics of energy storage regulation boundaries are deeply integrated to achieve bidirectional collaborative optimization of prediction and scheduling.
[0006] The technical solution of this invention is: a method for co-optimizing photovoltaic power prediction and energy storage charging and discharging in a photovoltaic power plant, comprising the following steps:
[0007] S1. Acquire historical operating data of the photovoltaic power plant (including historical power and historical meteorological measurement data), numerical weather forecast data (including irradiance, temperature, humidity, and wind speed), and real-time status data of the energy storage system (including state of charge, voltage, current, and temperature). Based on this, construct a multi-timescale photovoltaic power prediction model based on an attention mechanism. This model specifically includes three prediction modules: an ultra-short-term prediction model with a minute-level (e.g., 15-minute) time resolution, using a temporal convolutional network (TCN) to extract minute-level fluctuation features of photovoltaic power; a short-term prediction model with an hour-level (e.g., 1-hour) time resolution, using a Transformer encoder to extract daily periodic features of photovoltaic power; and a medium-to-long-term prediction model with a daily time resolution, using a long short-term memory network (LSTM) to extract seasonal trend features of photovoltaic power. The outputs of the three models are adaptively weighted and fused through an attention mechanism, ultimately outputting the predicted photovoltaic power value at the prediction time. Simultaneously, based on the statistical analysis of the prediction residuals, output the probability distribution characteristics of the prediction error (including the error interval and error probability density function at different confidence levels).
[0008] S2 decomposes the optical power prediction error into a systematic bias component and a random fluctuation component. For the systematic bias component, an exponential smoothing model is used to describe its monotonically accumulating trend over the prediction time scale. For the random fluctuation component, an Ornstein-Uhlenbeck stochastic process is used to describe its mean regression characteristics. The systematic bias component and the random fluctuation component are superimposed to obtain the time-varying probability density function of the prediction error over the continuous prediction time scale. Based on this time-varying probability density function, its preset quantile is extracted as a risk metric for each prediction time. The error propagation factor for each prediction time is calculated based on this risk metric. The error propagation factor is a dimensionless scalar. The larger its value, the higher the prediction uncertainty at that time and the stronger the propagation and accumulation effect of the prediction bias.
[0009] S3, based on the state of charge (SOC) value of the energy storage system, its operating range is divided into four zones from low to high: deep discharge zone (lower SOC range), normal discharge zone, normal charging zone, and deep charging zone (higher SOC range). In this dynamic virtual energy storage model, the rate of change of the virtual charge / discharge power boundary with respect to the SOC is set differently in different zones. In the deep discharge and deep charging zones, to avoid over-discharge or overcharge, the rate of change of the virtual charge / discharge power boundary with respect to the SOC is set to the first rate of change. In the normal discharge and normal charging zones, the rate of change of the virtual charge / discharge power boundary with respect to the SOC is set to the second rate of change, where the first rate of change is greater than the second rate of change. This ensures that the power boundary contracts rapidly under extreme SOC conditions to achieve protection, while the power boundary remains relatively flat under normal SOC conditions to ensure regulation capability. At the same time, the virtual charge / discharge capacity boundary is dynamically corrected according to the cycle life decay curve of the energy storage system. That is, the greater the cumulative charge / discharge amount and the deeper the aging of the energy storage system, the smaller the virtual charge / discharge capacity boundary will be to reflect the decay of the actual usable capacity of the energy storage.
[0010] S4. The error propagation factor is compared with the preset error propagation threshold. When the error propagation factor is greater than the preset threshold, it indicates that the prediction uncertainty at the current moment or in the future is high, and the energy storage system needs to reserve a larger adjustment margin. At this time, the virtual charge and discharge capacity boundary and the virtual charge and discharge power boundary are expanded to increase the energy storage system's ability to compensate for optical power prediction deviations. When the error propagation factor is less than or equal to the preset threshold, it indicates that the prediction accuracy is high. At this time, the virtual charge and discharge capacity boundary and the virtual charge and discharge power boundary are narrowed to limit the overcharging and discharging of the energy storage system, thereby extending its service life and reducing unnecessary operating losses. After the above corrections, the feasible region for energy storage regulation that dynamically changes with the prediction time domain is finally obtained. This feasible region covers the upper / lower limit of the allowed state of charge and the upper / lower limit of the allowed charge and discharge power at each moment.
[0011] S5. Within the feasible region for energy storage regulation generated in step S4, a joint optimization objective is constructed and the optimal control sequence for energy storage charging and discharging power is solved. The joint optimization objective includes two sub-objectives: the first sub-objective is to minimize the cumulative sum of the absolute values of the deviation between the actual output of optical power and the predicted value of optical power within the prediction time window, which is used to maximize the compensation effect of the prediction deviation; the second sub-objective is to maximize the charging and discharging benefits of the energy storage system within the prediction time window. These charging and discharging benefits are calculated based on the product of the time-of-use electricity price and the energy storage charging and discharging power (negative benefits during charging and positive benefits during discharging). The above two sub-objectives are combined by weighted summation to form the final joint optimization objective. The weighting coefficients can be adjusted according to actual operating preferences.
[0012] During the solution process, a model predictive control (MPC) framework is used for rolling time-domain optimization. In each control cycle, starting from the current moment, the above joint optimization objective is solved within the prediction time window to obtain the optimal charge and discharge power control sequence within the prediction time window. However, only the first control action in the sequence (i.e., the charge and discharge power command at the current moment) is executed. When the next control cycle arrives, the optimization solution is re-solved using the updated real-time state data of the energy storage system as the initial conditions to achieve closed-loop rolling control.
[0013] During the solution process, the optimal control sequence for charging and discharging power must strictly meet the following constraints: the state of charge of the energy storage system does not exceed the dynamically corrected virtual charging and discharging capacity boundary at any time; the charging and discharging power of the energy storage system does not exceed the dynamically corrected virtual charging and discharging power boundary at any time; the rate of change of charging and discharging power of the energy storage system in adjacent control cycles does not exceed the preset power ramp-up rate limit to avoid power surges impacting the power grid and energy storage equipment; and the cumulative charging and discharging amount of the energy storage system does not exceed the preset daily cumulative charging and discharging amount limit to ensure the safety of the energy storage system's daily operation.
[0014] S6. After the charging and discharging operation, the actual charging and discharging power of the energy storage system and the actual output data of the photovoltaic power station are collected. Based on this, the actual photovoltaic power prediction deviation compensation effect is calculated. The actual compensation effect is used as a feedback signal and input into the prediction error propagation dynamics model in step S2. The parameters of the prediction error propagation dynamics model are updated online using online parameter estimation methods such as recursive least squares or Kalman filtering, so that the evolution law of prediction error can be adaptively adjusted according to weather changes and seasonal changes. The updated prediction error propagation dynamics model will be used for the collaborative optimization calculation of the next control cycle to form a complete closed loop.
[0015] The method of this invention is executed in the day-ahead scheduling phase and the intraday rolling scheduling phase, forming a hierarchical and collaborative scheduling architecture. In the day-ahead scheduling phase, with an hourly (e.g., 1 hour) time resolution, based on the prediction results of the medium- and long-term prediction models and the short-term prediction models, the above steps S1 to S6 are executed in their entirety to generate a day-ahead energy storage charging and discharging plan; this day-ahead plan serves as a reference trajectory for intraday scheduling.
[0016] During the intraday rolling scheduling phase, with a time resolution of minutes (e.g., 15 minutes), based on the prediction results of the ultra-short-term prediction model, the day-ahead energy storage charging and discharging plan is used as a reference trajectory constraint. Steps S1 to S6 are executed again to generate intraday energy storage charging and discharging correction instructions. This is to cope with sudden weather changes and ultra-short-term power fluctuations during the day, and to achieve refined online correction of the day-ahead plan. Through the above-mentioned hierarchical coordination of dual time scales, both long-term trend tracking of photovoltaic power output and short-term fluctuation smoothing are taken into account.
[0017] The beneficial effects of this invention are:
[0018] 1. This invention constructs a prediction error propagation dynamics model, quantifies the cumulative evolution of optical power prediction error over time into an error propagation factor, and uses this factor as a coupling variable to dynamically correct the energy storage control boundary. This enables the energy storage charging and discharging strategy to no longer passively rely on fixed prediction values, but actively adapt to the time-varying propagation characteristics of prediction errors. This overcomes the problem of severe disconnect between energy storage scheduling and actual output after the prediction deviation is amplified over the prediction time scale in the existing serial architecture, and significantly improves the forward-looking compensation capability of the energy storage system for optical power prediction deviation.
[0019] 2. This invention feeds back the deviation compensation effect after actual execution to the prediction error propagation dynamics model online, and uses the recursive least squares algorithm to update the model parameters in a rolling manner, thereby realizing the adaptive correction of the prediction error evolution law. This enables the prediction model to dynamically adjust its estimation of error propagation according to the actual regulation effect of the energy storage system, forming a complete closed loop of prediction-guided scheduling and scheduling feedback to correct prediction, which greatly improves the adaptability and robustness of the system in scenarios with rapidly changing weather conditions.
[0020] 3. This invention constructs a dynamic virtual energy storage model, incorporating the state-of-charge zoning control and cycle life decay characteristics of the energy storage system into a dynamic correction system of time-varying virtual charge and discharge capacity and power boundaries. It also adjusts the regulation margin of the energy storage in real time according to the prediction error propagation factor, which avoids insufficient compensation for prediction deviations caused by overly conservative fixed boundaries, and prevents accelerated energy storage aging due to overcharging and discharging. While effectively smoothing out the fluctuations in photovoltaic grid-connected power, it significantly extends the actual service life of the energy storage system, achieving a balance between operational safety and economy. Attached Figure Description
[0021] Figure 1 The diagram shown is a schematic representation of the overall process of this invention.
[0022] Figure 2 The diagram shown is a schematic of the multi-timescale optical power prediction model based on the attention mechanism of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all 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.
[0024] Please see Figure 1The present invention provides an embodiment:
[0025] S1 extracts at least one year's worth of historical operating data from the photovoltaic power plant's data acquisition and monitoring system, including but not limited to the actual output power of the photovoltaic array, backsheet temperature, and inverter AC side electrical parameters sampled at minute intervals. It also accesses numerical weather forecast data provided by the local meteorological bureau or commercial meteorological service, which covers meteorological elements such as surface horizontal irradiance, normal direct irradiance, ambient temperature, relative humidity, and 10-meter-high wind speed.
[0026] To ensure the effectiveness of the input features of the prediction model, the above raw data were preprocessed. The median absolute deviation method was used to remove outliers caused by sensor failure or communication interruption. Cubic spline interpolation was used to fill in the missing data. Z-score standardization was performed on all input features to make their mean 0 and standard deviation 1, thereby eliminating the influence of dimensional differences on model training.
[0027] Please see Figure 2 This invention constructs a three-model fusion prediction system based on an attention mechanism.
[0028] The ultra-short-term prediction model takes minute-level power data and meteorological measurements from the past 4 hours as input and employs a temporal convolutional network as its feature extraction backbone. This temporal convolutional network expands its receptive field through dilated causal convolutional structures, ensuring that the output at each time step covers historical information from at least 128 time steps. Simultaneously, residual connections are used to avoid the gradient vanishing problem in deep networks. The model's output layer is a linear fully connected layer that directly maps to the predicted optical power values for the next 15 minutes to 4 hours, with a temporal resolution of 15 minutes.
[0029] The short-term forecasting model takes historical daily data from the past 7 days and numerical weather forecasts for the next 24 hours as input, employing a Transformer encoder structure. This encoder consists of six identical stacked coding layers, each containing a multi-head self-attention sublayer and a feedforward neural network sublayer. The multi-head attention sublayer has 8 heads to capture the long-range dependence of photovoltaic power output across different hours (e.g., midday peak and zero output at night). The model's output covers photovoltaic power forecasts for the next 4 to 72 hours, with a time resolution of 1 hour.
[0030] The medium- and long-term forecasting model adopts a two-layer long short-term memory network with 128 hidden layer nodes. The input features are the daily average power, daily cumulative sunshine hours and daily average temperature of the past 30 days, which are used to extract the seasonal trend and climate pattern of photovoltaic power output. Its output covers the predicted daily average power for the next 3 to 7 days.
[0031] The outputs of the three models are adaptively combined through a trainable attention fusion layer, which calculates the importance weights of the three model predictions to the final prediction result for each prediction time t.
[0032] Specifically, the predicted value and prediction confidence of each model at that moment are concatenated with the average absolute percentage error of all models in the most recent historical period to form a feature vector. This vector is then mapped to a scalar score via a single hidden layer neural network and normalized to weight coefficients using the Softmax function. The final output optical power point prediction value is the weighted sum of the prediction values from the three models. To quantify the uncertainty of the prediction, this step approximates the distribution of the prediction residuals during the model training phase using the Monte Carlo dropout method. Specifically, during model inference, the dropout layer is kept active, and 50 forward propagations are performed to obtain 50 sets of prediction values. The standard deviation of these 50 sets of prediction values is used as the probability distribution feature of the prediction error, and the upper and lower limits of the error interval at different confidence levels are also calculated.
[0033] S2. The propagation of optical power prediction error over time is not a random walk, but rather exhibits a systematic cumulative pattern and random fluctuation characteristics. This step addresses these characteristics by establishing a dynamic model for the propagation of prediction error. This model decomposes the error into two components with different physical meanings: a systematic bias component and a random fluctuation component.
[0034] The systematic bias component characterizes the unidirectional offset trend caused by factors such as initial field errors in numerical weather prediction and prediction biases in cloud movement speed. This component has a cumulative amplification effect over longer prediction time scales. This invention uses an exponential smoothing model to express this component, and its recursive form is as follows:
[0035] The systematic deviation at the current prediction time k is equal to the deviation at the previous time multiplied by the smoothing coefficient. Multiply by the current measured deviation The combination of these factors, but it should be clarified that when this exponential smoothing model is extrapolated forward along the time axis, the deviation increases. The rate of accumulation, where This is a cumulative coefficient, and its value is related to the degree of change in local meteorological conditions, ranging from 0.02 to 0.15. To predict the time span, the random fluctuation component originates from stochastic physical processes such as atmospheric turbulence and cloud fragmentation. Its characteristic is short-term fluctuations around the mean but a tendency to revert to the long-term mean. This invention uses an Ornstein-Uhlenbeck stochastic process for accurate modeling, whose stochastic differential equation is:
[0036] ;
[0037] in The regression rate parameter controls how quickly the value reverts to the mean after fluctuations deviate from it. This is the long-term mean (usually taken as 0). For volatility parameters, This is the increment for the standard Wiener process.
[0038] By superimposing the two components mentioned above, the prediction error is reduced. The time-varying probability density function can be expressed as:
[0039] ;
[0040] in The expected value of the systematic bias is accumulated over time. The variance of the systematic bias. Let be the variance of the OU process.
[0041] During implementation, historical prediction error data is used to estimate the parameters using the maximum likelihood estimation method. , , , The system identifies the parameters and re-identifies them every 7 days using newly accumulated data, in order to adapt to changes in meteorological characteristics caused by local seasonal variations.
[0042] Based on the error probability distribution characteristics obtained in step S1, the absolute value of the error at a preset quantile level (preferably the 90th quantile in this embodiment) is taken as the risk metric R(t), and the formula is:
[0043] ;
[0044] in Let be the cumulative distribution function of the prediction error at time t. Let x be its xth quantile.
[0045] Then R(t) is compared with the benchmark risk value The ratio of the baseline risk value (defined as the risk measure at the same confidence level when the forecast time span is 1 hour) to the error propagation factor is defined as the error propagation factor. The error propagation factor A value greater than 1 indicates that the error propagation during the current forecast period has exceeded the baseline level, and the forecast uncertainty has been significantly amplified. A value less than 1 indicates high prediction reliability.
[0046] S3. Construct a dynamic virtual energy storage model and acquire real-time monitoring data from the battery management system of the energy storage system, including the current state of charge (SOC(t), bus voltage, charging and discharging current, battery pack temperature, and accumulated equivalent cycle count. Based on the specific value of SOC(t), the operating range of the energy storage system is divided into four functional regions, with the division threshold based on the percentage of SOC, where:
[0047] The deep discharge region is defined as ;
[0048] Normal discharge region is defined as ;
[0049] Normal charging zone is defined as ;
[0050] The deep charging zone is defined as .
[0051] in and These are the minimum and maximum allowable state-of-charge protection thresholds for the energy storage system, determined by the hardware protection parameters of the energy storage converter, and are generally set to 5% and 95%.
[0052] In the dynamic virtual energy storage model, the virtual charge / discharge power boundary is a piecewise function of the State of Charge (SOC). Specifically, the virtual maximum discharge power... and virtual maximum charging power The following rules shall apply:
[0053] Within the deep discharge region, as the SOC decreases, the virtual maximum discharge power exhibits a rapid linear decreasing trend, with the absolute value of the decreasing slope set as k1.
[0054] Within the normal discharge region, the virtual maximum discharge power decreases slowly as the SOC decreases, and the absolute value of the decreasing slope is set as k2.
[0055] Within the normal charging zone, the virtual maximum charging power decreases slowly as the SOC increases, with the upward slope set to k3.
[0056] Within the deep charging zone, as the SOC increases, the virtual maximum charging power exhibits a rapid linear decreasing trend, with the absolute value of the decreasing slope set as k4.
[0057] The values of k1 and k4 are significantly larger than those of k2 and k3, and the specific numerical relationships are as follows: , This ensures that the power regulation capability of the energy storage system shrinks rapidly when it approaches the over-discharge or overcharge boundary, providing soft protection, while maintaining sufficient regulation margin in the middle safe range.
[0058] Meanwhile, the virtual charge / discharge capacity boundary (SOC upper limit) and SOC lower limit The system is dynamically corrected based on the cycle life degradation curve of the energy storage system. In this embodiment, the equivalent cycle number is established based on the measured aging data of the lithium-ion battery. With available capacity retention rate Mapping relationship between them: ;
[0059] This empirical formula shows that available capacity decreases exponentially with increasing cycle count. Based on the above, the virtual capacity boundary is revised as follows:
[0060] ;
[0061] ;
[0062] When the available capacity decays, the upper limit of charging shifts downward and the lower limit of discharging shifts upward, with both shrinking together, truly reflecting the actual adjustment capability of the aging energy storage system.
[0063] S4, Set the error propagation threshold This threshold is determined by analyzing the correlation between historical prediction errors of photovoltaic power plants and optimal energy storage scheduling margin; in this embodiment, a value of 1.2 is preferred. At the start of each control cycle, the error propagation factor for the current moment is obtained. and with The comparison determines the direction and magnitude of the boundary correction.
[0064] when > This indicates that the forecast uncertainty for the current and future period has exceeded the normal fluctuation range, requiring the energy storage system to provide additional compensation capabilities to cope with possible large forecast deviations. At this point, an expansion operation is applied to the virtual charge / discharge power boundary:
[0065] ;
[0066] ;
[0067] in The expansion coefficient, its value is related to... The degree to which the threshold is exceeded is positively correlated; the specific calculation formula is as follows: , This is the expansion gain coefficient, ranging from 0.3 to 0.8. Simultaneously, the virtual capacity boundary is also expanded accordingly.
[0068] ;
[0069] ;
[0070] in To expand the capacity boundary step size, and The overshoot is proportional to the overshoot, but with the hardware protection boundary as the absolute upper limit to ensure that physical overcharging and over-discharging do not occur. Conversely, when ≤
[0071] When the prediction accuracy is within an acceptable range, there is no need for the energy storage system to maintain an excessively high control margin. In this case, a shrinkage operation is applied to the virtual power boundary:
[0072] ;
[0073] ;
[0074] in The contraction coefficient is less than 1 and not less than 0.7, in order to prevent excessive contraction from leading to insufficient regulatory capacity.
[0075] The capacity boundary is also scaled down proportionally:
[0076] ;
[0077] ;
[0078] After the above dynamic corrections, a time-varying feasible domain for energy storage regulation is generated. The feasible region is defined by the quadruple boundary at each time step ( , , , The feasible region is defined by the two sides and is the constraint space for optimization in the subsequent step S5.
[0079] S5 defines the length of the prediction time window as H, which is 24 hours during the day-ahead scheduling phase and 4 hours during the intraday rolling phase. In each control cycle... At the current moment To optimize the starting point, we construct a joint optimization objective function J in the following form:
[0080] ;
[0081] in, for The actual output of photovoltaic power at any given time is used as the optimal estimate in the optimization solution by taking the point prediction value from step S1. The two are the predicted optical power values at the same time point; the absolute values of the difference between them are accumulated within the time window to form the first objective function, which is the prediction bias compensation term. For energy storage systems in The charging and discharging power at any given time (charging is negative, discharging is positive). for The time-of-use electricity prices corresponding to each time point are multiplied and summed to obtain the second objective function, which is the energy storage charging and discharging revenue term. and The weighting coefficient is used to balance the trade-off between prediction bias compensation and energy storage economics. In this embodiment, The value is set according to the grid connection assessment standards for photovoltaic power plants. The value is set based on the ratio of local peak-valley electricity price difference to the cost per kilowatt-hour of energy storage, and is set to [value missing]. , And the sum of the two is 1.
[0082] When minimizing the above objective function, the dynamic constraints defined in step S4 must be satisfied, specifically including:
[0083] ;
[0084] From the formula, we can see that the state of charge must not exceed the dynamically corrected capacity boundary at any time.
[0085] ;
[0086] From the formula, we can see that the absolute value of the charging and discharging power must not exceed the dynamic power boundary;
[0087] ;
[0088] As can be seen from the formula, the power change rate between adjacent control cycles must not exceed the preset ramp rate limit. In this embodiment It is taken as 20% of the rated power of the energy storage per minute;
[0089] ;
[0090] As can be seen from the formula, the daily cumulative charging and discharging amount must not exceed the preset daily cumulative limit. This limit is determined based on the design daily throughput of the energy storage system, and is usually taken as 1.2 times the rated capacity.
[0091] The model predictive control framework used in this step employs an optimization algorithm (using sequential quadratic programming, since both the objective function and constraints are continuously differentiable) to obtain the optimal control sequence within the time window during each control cycle. However, this invention only executes the first control action in the sequence. The current energy storage charging and discharging commands are issued to the energy storage converter for execution. When the next control cycle arrives, the system re-acquires updated photovoltaic measured data, energy storage SOC data, and the latest numerical weather forecast data. Using the updated system state as the new initial condition, the entire optimization process is repeated. This closed-loop rolling strategy allows energy storage control commands to be adjusted in real time as the prediction model is updated, effectively overcoming the problem of poor adaptability of fixed scheduling plans to sudden weather changes.
[0092] S6: After the energy storage system executes the charging and discharging commands issued in step S5, the power station data acquisition system records the actual output of the photovoltaic array in real time. and the actual response power of the energy storage system And by comparing with the predicted value in step S1 By comparing the results, a quantitative index of the actual prediction deviation compensation effect was calculated. This quantitative index is specifically defined as the deviation compensation rate:
[0093] ;
[0094] The closer the value is to 1, the more ideal the energy storage compensation effect is; the closer it is to 0 or a negative value, the worse the compensation effect is or even the deviation is aggravated.
[0095] The calculated As a feedback signal, it is input into the prediction error propagation dynamics model in step S2 to update the model parameters online.
[0096] Specifically, a recursive least squares algorithm with a forgetting factor is used, employing prediction error time-series data and actual deviation compensation rate data from the most recent M sampling periods (M = 200) as training samples to refine the cumulative coefficients of the exponential smoothing model. and Regression rate of the process Online parameter identification is performed. The introduction of a forgetting factor allows the algorithm to forget historical data from too long ago, thus paying more attention to changes in error characteristics caused by recent weather pattern variations. In this embodiment, the forgetting factor is set to 0.98. Parameter updates are performed using a sliding window approach, triggering parameter reassessment every 15 minutes. The reassessed parameters are then updated... and The error propagation factor is immediately used for calculation in the next time step. Through this online update mechanism, the prediction error dynamics model can adaptively track the seasonal changes in local climate, ensuring that the calculation of the error propagation factor always maintains optimal adaptation to the current meteorological conditions, thereby guaranteeing the effectiveness and robustness of the co-optimization strategy in long-term operation.
[0097] S7. In order to take into account the control needs of different time scales, the present invention implements the above steps in layers at two time levels: day-ahead and intraday, forming a dual-scale architecture that coordinates day-ahead planning and intraday correction.
[0098] During the day-ahead scheduling phase, execution time is 17:00 daily. Based on the next day's numerical weather forecast data (time resolution of 1 hour) and the output of the short-term and medium-to-long-term forecast models in step S1, steps S1 to S6 are executed in their entirety. At this time, the forecast time window H = 24 hours, the control cycle is 1 hour, and the generated day-ahead energy storage charging and discharging plan contains a sequence of energy storage charging and discharging power instructions for 24 time periods from 0:00 to 24:00 the next day. The main function of this day-ahead plan is to determine the energy balance target of the energy storage system for each time period of the next day, including arranging charging to store energy during periods of low electricity prices, arranging discharging during periods of high electricity prices and low photovoltaic output to support grid-connected power, and reserving sufficient energy to cope with forecast deviations.
[0099] During the intraday rolling scheduling phase, the process runs on a 15-minute cycle. Based on the output of the ultra-short-term prediction model (prediction time window H = 4 hours, time resolution 15 minutes), steps S1 to S6 are executed again. A penalty term is added to the optimization objective function during the intraday phase. Specifically, the square of the difference between the energy storage charging / discharging power and the reference value at the corresponding time in the day-ahead plan is multiplied by a penalty coefficient and added to the objective function. That is, the incremental objective term is... ,in This is the reference trajectory for the plan made recently. To track the penalty coefficient, this embodiment uses 0.15. The introduction of this penalty term ensures that intraday optimization, while pursuing prediction bias compensation and maximizing returns, does not deviate significantly from the previously established power balance plan. This guarantees a basic balance between the total daily discharge and total daily charging of the energy storage system, avoiding the predicament of excessive intraday discharge leading to no power available at night or excessive intraday charging resulting in an inability to absorb photovoltaic power at midday. Through the above-mentioned hierarchical collaboration across dual time scales, this invention achieves a unified processing of long-term photovoltaic output trend tracking and short-term random fluctuation smoothing.
[0100] To further illustrate this invention, this example demonstrates its deployment in a grid-connected photovoltaic power station, where the photovoltaic installed capacity is 20MW and the supporting energy storage system is 5MW / 10MWh. Specific parameters are shown in Table 1.
[0101] Table 1 Summary of Model Parameters
[0102]
[0103] To verify the effectiveness of the proposed collaborative optimization method in actual operation, a backtesting comparison experiment was conducted using 60 consecutive days of actual operation data from the photovoltaic power station. The control group used the traditional "prediction-dispatch" serial method with the same LSTM prediction model and conventional MPC control for energy storage dispatch, but with the energy storage boundary fixed at its rated value. The experimental group used the method of this invention. Both groups of experiments were run under identical input data conditions, and the key performance indicators are shown in Table 2.
[0104] Table 2 Comparison of the operational effects of the method of the present invention and the prior art methods
[0105]
[0106] As shown in Table 2, compared with existing technologies, the method of this invention achieves significant performance improvements in multiple dimensions, including prediction deviation compensation, energy storage operation economy, equipment lifespan protection, and adaptability to extreme weather. This invention effectively mitigates the risk of grid connection point power exceeding limits by utilizing the mechanism of dynamically adjusting the energy storage control margin using the error propagation factor, significantly reducing the maximum exceedance rate to below the assessment threshold. Simultaneously, because the contraction strategy limits unnecessary deep charging and discharging actions of energy storage when prediction accuracy is high, the energy storage lifespan decay rate is also effectively reduced.
[0107] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for co-optimizing photovoltaic power prediction and energy storage charging and discharging in a photovoltaic power plant, characterized in that, Includes the following steps: S1: Acquire historical operating data of photovoltaic power plants, numerical weather forecast data, and real-time status data of energy storage systems; construct a multi-timescale photovoltaic power prediction model based on attention mechanism; and output the predicted value of photovoltaic power points at the prediction time and the probability distribution characteristics of its prediction error. S2. Based on the probability distribution characteristics of the prediction error, a prediction error propagation dynamic model is constructed. This prediction error propagation dynamic model describes the cumulative evolution of optical power prediction error over time, and the error propagation factor at each prediction time is calculated based on the cumulative evolution. S3. Based on the real-time state of charge, charge and discharge efficiency characteristics and lifetime decay characteristics of the energy storage system, a dynamic virtual energy storage model is constructed. The dynamic virtual energy storage model maps the state of charge of the energy storage system to time-varying virtual charge and discharge capacity boundaries and virtual charge and discharge power boundaries. S4. The error propagation factor is input as a coupling variable into the dynamic virtual energy storage model to correct the virtual charge and discharge capacity boundary and the virtual charge and discharge power boundary, and generate a feasible energy storage regulation domain that is coordinated with the prediction error propagation characteristics. S5. Within the feasible domain of energy storage regulation, with optical power prediction deviation compensation and energy storage system operation economy as joint optimization objectives, the optimal control sequence of energy storage charging and discharging power is solved, and the charging and discharging operation of the energy storage system is executed according to the optimal control sequence.
2. The method for coordinated optimization of photovoltaic power prediction and energy storage charging and discharging in a photovoltaic power plant according to claim 1, characterized in that: In step S1, the multi-timescale photovoltaic power prediction model based on the attention mechanism includes an ultra-short-term prediction model, a short-term prediction model, and a medium-to-long-term prediction model. The ultra-short-term prediction model uses a minute-level time resolution and employs a temporal convolutional network to extract minute-level fluctuation features of photovoltaic power. The short-term prediction model uses an hour-level time resolution and employs a Transformer encoder to extract daily periodic features of photovoltaic power. The medium-to-long-term prediction model uses a daily time resolution and employs a long short-term memory network to extract seasonal trend features of photovoltaic power. The prediction results of the three models in the multi-timescale optical power prediction model are weighted and fused through an attention mechanism to obtain the optical power point prediction value.
3. The method for coordinated optimization of photovoltaic power prediction and energy storage charging and discharging in a photovoltaic power plant according to claim 1, characterized in that, In step S2, the method for constructing the prediction error propagation dynamics model includes: decomposing the optical power prediction error into a systematic deviation component and a random fluctuation component, then superimposing the systematic deviation component and the random fluctuation component to obtain the time-varying probability density function of the prediction error, and finally calculating the error propagation factor at each prediction time based on the quantile of the time-varying probability density function. The systematic bias component is described by an exponential smoothing model to indicate its monotonic cumulative trend over the prediction time scale; the random fluctuation component is described by an Ornstein-Uhlenbeck stochastic process to indicate its mean regression characteristics.
4. The method for coordinated optimization of photovoltaic power plant photovoltaic power prediction and energy storage charging and discharging according to claim 1, characterized in that, In step S3, the method for constructing the dynamic virtual energy storage model includes: dividing the operating range of the energy storage system into a deep discharge zone, a normal discharge zone, a normal charging zone, and a deep charging zone according to the state of charge of the energy storage system. Within the deep discharge and deep charge regions, the rate of change of the virtual charge / discharge power boundary with respect to the state of charge is greater than that within the normal discharge and normal charge regions. The virtual charge / discharge capacity boundary is corrected based on the cycle life decay curve of the energy storage system. The larger the cumulative charge / discharge amount of the energy storage system, the smaller the virtual charge / discharge capacity boundary.
5. The method for coordinated optimization of photovoltaic power prediction and energy storage charging and discharging in a photovoltaic power plant according to claim 1, characterized in that, In step S4, the method for correcting the virtual charge / discharge capacity boundary and the virtual charge / discharge power boundary includes: comparing the error propagation factor with a preset error propagation threshold; when the error propagation factor is greater than the error propagation threshold, expanding the virtual charge / discharge capacity boundary and the virtual charge / discharge power boundary to increase the energy storage system's ability to compensate for optical power prediction deviations; when the error propagation factor is less than or equal to the error propagation threshold, shrinking the virtual charge / discharge capacity boundary and the virtual charge / discharge power boundary to extend the lifespan of the energy storage system.
6. The method for coordinated optimization of photovoltaic power plant photovoltaic power prediction and energy storage charging and discharging according to claim 1, characterized in that: In step S5, the joint optimization objective includes a first objective function and a second objective function; The first objective function is to minimize the cumulative sum of the absolute values of the deviation between the actual output of optical power and the predicted value of optical power within the prediction time window; the second objective function is to maximize the charging and discharging revenue of the energy storage system within the prediction time window, which is calculated based on the time-of-use electricity price and the charging and discharging power of the energy storage system; the first objective function and the second objective function constitute a joint optimization objective by weighted summation.
7. The method for coordinated optimization of photovoltaic power prediction and energy storage charging and discharging in a photovoltaic power plant according to claim 6, characterized in that, In step S5, when solving for the optimal control sequence of energy storage charging and discharging power, a model predictive control framework is used for rolling time-domain optimization: in each control cycle, starting from the current time, the joint optimization objective is solved within the prediction time window to obtain the optimal control sequence within the prediction time window. Only the first control action in the optimal control sequence is executed, and when the next control cycle arrives, the optimization solution is re-performed with the updated real-time state data of the energy storage system as the initial condition.
8. The method for coordinated optimization of photovoltaic power prediction and energy storage charging and discharging in a photovoltaic power plant according to claim 5, characterized in that, In step S5, the solution for the optimal control sequence of energy storage charging and discharging power also satisfies the following constraints: The state of charge of the energy storage system does not exceed the modified virtual charge / discharge capacity boundary at any time. The charging and discharging power of the energy storage system does not exceed the corrected virtual charging and discharging power boundary at any time. The rate of change of charging and discharging power of the energy storage system within adjacent control cycles shall not exceed the preset power ramp-up rate limit. The cumulative charge and discharge of the energy storage system shall not exceed the preset daily cumulative charge and discharge limit.
9. The method for coordinated optimization of photovoltaic power prediction and energy storage charging and discharging in a photovoltaic power plant according to claim 1, characterized in that: The method also collects the actual charging and discharging power of the energy storage system after performing charging and discharging operations and the actual output data of the photovoltaic power station, calculates the actual light power prediction deviation compensation effect, then feeds the actual light power prediction deviation compensation effect back to the prediction error propagation dynamics model, updates the parameters of the prediction error propagation dynamics model online, and finally uses the updated prediction error propagation dynamics model for collaborative optimization in the next control cycle.
10. A method for coordinated optimization of photovoltaic power prediction and energy storage charging and discharging according to any one of claims 1-9, characterized in that, The method is executed in the day-ahead scheduling phase and the intraday rolling scheduling phase, respectively: During the day-ahead scheduling phase, the day-ahead energy storage charging and discharging plan is generated based on the prediction results of the medium- and long-term forecasting model with an hourly time resolution. During the intraday rolling scheduling phase, with a time resolution of minutes, the execution is based on the prediction results of the ultra-short-term prediction model and the day-ahead energy storage charging and discharging plan is used as a reference trajectory to generate intraday energy storage charging and discharging correction instructions.