Intelligent charging and discharging control method and system of household energy storage system
By extracting electricity price and state of charge information, encoding them into statistical embedding vectors, and performing diffusion and noise prediction, combined with multi-source heterogeneous anchor point residual optimization charging and discharging strategies, the control challenges of home energy storage systems under electricity price fluctuations and battery aging are solved, achieving more efficient battery management and safety regulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LISHUI YIYUAN TECH CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing intelligent charging and discharging control methods for home energy storage systems are ill-suited to the uncertainties of electricity price fluctuations and the dynamic changes in battery aging conditions. This leads to batteries operating under extreme charging conditions for extended periods, impacting battery capacity degradation and the system's economic efficiency and safety.
By extracting the electricity price fluctuation profile, state of charge change, and charge/discharge power sequence, encoding them into statistical embedding vectors and applying diffusion noise, and combining them with multi-source heterogeneous anchor point residuals for noise prediction, a probability prediction interval is constructed to achieve safe regulation of charge/discharge power.
It improves the charging and discharging economy and battery cycle life of home energy storage systems in environments with fluctuating electricity prices, and enhances the ability to consistently regulate the operational safety boundary.
Smart Images

Figure CN122159459A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of home energy storage technology, and more specifically, to an intelligent charging and discharging control method and system for a home energy storage system. Background Technology
[0002] Home energy storage systems typically consist of energy storage batteries, a battery management system, and energy conversion devices. They can store electrical energy during off-peak hours and release it during peak hours, thereby optimizing electricity cost management. They can also operate in conjunction with distributed energy sources such as photovoltaic power generation to improve energy self-sufficiency and electricity reliability for households. With the increasing prevalence of time-of-use pricing mechanisms and the growing complexity of household electricity loads, intelligent charging and discharging control of home energy storage systems has become a key technological aspect for improving system economy and safety.
[0003] Existing intelligent charging and discharging control for residential energy storage systems can be categorized into three types: rule-based threshold control, model predictive control (MPC)-based optimization control, and reinforcement learning-based adaptive control. Rule-based control is simple to implement but struggles to adapt to the uncertainties of electricity price fluctuations and the dynamic changes in battery aging states, easily leading to prolonged operation under extreme charge states and accelerated capacity decay. MPC-based control, by continuously optimizing charging and discharging power in the future time domain, can balance economic efficiency with constraints, but its performance is highly dependent on the accuracy of the prediction model. Furthermore, it typically treats physical constraints such as battery charge state dynamics, aging losses, and power boundaries as hard constraints, making it difficult to achieve a flexible balance among multiple conflicting objectives. Reinforcement learning-based control optimizes strategies through trial-and-error interactive learning, but the training process requires a large number of samples, the uncertainty of the strategy output is difficult to quantify, and there is a lack of explicit evaluation of the reliability of control commands. Therefore, how to achieve adaptive embedding of multi-source heterogeneous physical constraints and joint optimization of the strategy probability prediction interval to improve the comprehensive control capability of residential energy storage systems remains a challenge for the industry. Summary of the Invention
[0004] This application provides an intelligent charging and discharging control method and system for a home energy storage system, which can realize the adaptive embedding of multi-source heterogeneous physical constraints and the joint optimization of the strategy probability prediction range, so as to improve the overall control capability of the home energy storage system.
[0005] In a first aspect, this application provides an intelligent charging and discharging control method for a home energy storage system, the control method comprising the following steps: Extract the electricity price fluctuation profile, state of charge change, and charge / discharge power sequence of a residential energy storage system; The electricity price fluctuation profile and the state of charge change are encoded into statistical embedding vectors, and the charging and discharging power sequence is diffused and noise-added to obtain a perturbation sequence. Based on the statistical embedding vector, noise prediction is performed on the perturbation sequence to obtain the noise prediction value, and the perturbation sequence is subjected to reverse denoising iteration to obtain the reconstructed charging and discharging strategy. Multi-source heterogeneous anchor point residuals are embedded into the noise prediction values to obtain the total anchor point loss. The reconstructed charging and discharging strategy is then physically constrained based on the total anchor point loss to obtain the probability prediction interval. The safe adjustment range of charging and discharging power is determined by the probability prediction interval.
[0006] In this embodiment, extracting the electricity price fluctuation profile, state of charge change, and charge / discharge power sequence of a residential energy storage system specifically includes: Peak and valley values are detected in historical electricity price data from residential energy storage systems to obtain electricity price peak and valley sequences. The electricity price fluctuation profile is obtained by performing difference fitting between the electricity price peak sequence and the electricity price trough sequence. Differential calculations are performed on the state of charge of batteries in a home energy storage system to obtain the changes in the state of charge. By monitoring the charging and discharging power of a home energy storage system, a charging and discharging power sequence can be obtained.
[0007] In this embodiment, encoding the electricity price fluctuation profile and the state of charge change into a statistical embedding vector specifically includes: Piecewise linear interpolation is performed on the electricity price fluctuation profile to obtain a high-dimensional feature vector of the electricity price fluctuation. The changes in the state of charge are normalized by a sliding window to obtain the marginal normalized vector of the state of charge. The high-dimensional feature vector and the marginal normalized vector are concatenated and then mapped in a high dimension to obtain the statistical embedding vector.
[0008] In this embodiment, the diffusion and noise addition to the charge / discharge power sequence to obtain the perturbation sequence specifically includes: The total diffusion step is determined, and Gaussian noise is added to the charge and discharge power sequence to obtain the noise figure of all diffusion steps; The noise power sequence is determined by the noise figures of all diffusion steps, thus obtaining the perturbation sequence.
[0009] In this embodiment, the noise prediction of the perturbation sequence based on the statistical embedding vector to obtain the noise prediction value specifically includes: Based on the statistical embedding vector, downsampling features are extracted from the perturbation sequence to obtain a multi-scale noise feature map; Perform a one-dimensional convolution operation on the multi-scale noise feature map to obtain the noise prediction tensor; The noise prediction tensor is activated element-wise to obtain the noise prediction value.
[0010] In this embodiment, performing reverse denoising iteration on the perturbation sequence to obtain the reconstructed charging and discharging strategy specifically includes: The perturbation sequence is traversed in descending order using statistical embedding vectors as conditional information to obtain the noise estimate for each reverse step; The noise estimates for all reverse steps are backsampled and calculated to obtain the reconstructed charging and discharging strategy.
[0011] In this embodiment, embedding multi-source heterogeneous anchor point residuals into the noise prediction value to obtain the total anchor point loss specifically includes: The predicted state of charge is obtained by back-calculating the noise prediction value through the recursive equation of the state of charge, and then the dynamic anchor point residual of the battery state of charge is obtained. The residual loss anchor point for battery aging is determined based on the charge / discharge rate and aging penalty function value calculated from the noise prediction value. The safety boundary anchor point residual for charging and discharging is determined by the positive part of the noise prediction value exceeding the preset power upper limit and the negative part below the preset power lower limit; The total anchor point loss is obtained by weighted summing of the dynamic anchor point residual, the loss anchor point residual, and the safety boundary anchor point residual.
[0012] In this embodiment, the reconstructed charging and discharging strategy is physically constrained and predicted based on the total anchor point loss, resulting in a probability prediction interval that specifically includes: A training set is constructed based on multi-source heterogeneous anchor point residuals; With the goal of minimizing the total loss of the anchor points, the training set is updated in the first and second stages, and the convergence of the total loss of the anchor points is monitored. When the total loss of the anchor point converges to a preset loss threshold, forward propagation is performed on the reconstructed charging and discharging strategy to obtain multiple random sampling strategy samples. Confidence intervals for all random sampling strategies at each sampling time are constructed using the mean and standard deviation of the samples at each sampling time. By concatenating all the confidence intervals, we obtain the probability prediction interval.
[0013] In this embodiment, determining the safe adjustment range of charging and discharging power based on the probability prediction interval specifically includes: Extract the upper confidence limit and lower confidence limit from the probability prediction interval; Collect the upper and lower limits of the hardware safety power of home energy storage systems; The safe adjustment range of charging and discharging power is determined by the upper confidence limit, the upper hardware safety power limit, the lower confidence limit, and the lower hardware safety power limit.
[0014] Secondly, this application provides an intelligent charging and discharging control system for a home energy storage system, used to execute an intelligent charging and discharging control method for a home energy storage system, the control system comprising: The data parsing module is used to extract the electricity price fluctuation profile, state of charge change, and charge / discharge power sequence of a home energy storage system. An embedding and perturbation module is used to encode the electricity price fluctuation profile and the state of charge change into statistical embedding vectors, and to diffuse and add noise to the charging and discharging power sequence to obtain a perturbation sequence; The denoising and prediction module is used to predict noise in the perturbation sequence based on the statistical embedding vector to obtain the noise prediction value, and to perform reverse denoising iteration on the perturbation sequence to obtain the reconstructed charging and discharging strategy. The constraint prediction module is used to embed multi-source heterogeneous anchor point residuals into the noise prediction value to obtain the total anchor point loss, and to perform physical constraint prediction on the reconstructed charging and discharging strategy based on the total anchor point loss to obtain the probability prediction interval. The confidence control module is used to determine the safe adjustment range of charging and discharging power based on the probability prediction interval.
[0015] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects: The technical solution provided in this application enables the joint optimization of adaptive embedding of multi-source heterogeneous physical constraints and policy probability prediction intervals. First, it separates and extracts the original features reflecting the time distribution of electricity prices, the rate of change of battery state, and real-time power behavior, providing a physically meaningful input basis for subsequent statistical embedding and diffusion noise addition. The electricity price fluctuation profile and state of charge change are encoded into statistical embedding vectors, and the charge-discharge power sequence is diffused and denoised to obtain a perturbation sequence. This preserves global information on the scale of electricity price amplitude and the trend of state of charge change, and provides a differentiable training space for simultaneously embedding multiple physical constraints in the noise domain. Second, noise prediction is performed on the perturbation sequence based on the statistical embedding vectors, and a reverse denoising iteration is simultaneously performed on the perturbation sequence to obtain a reconstructed charge-discharge strategy. Simultaneously, the multi-source heterogeneous anchor point residuals are embedded in the noise prediction values to obtain the total anchor point loss, enabling a unified differentiable expression of three different types of physical constraints: battery state of charge dynamics residuals, battery aging loss residuals, and charge-discharge safety boundary residuals. Then, based on the total anchor point loss, the noise prediction network is jointly optimized to obtain a physical constraint model, and the reconstructed charging and discharging strategy is physically constrained to obtain a probabilistic prediction interval. Using a reverse denoising process guided by physical anchor points, the noise prediction implicitly embedded with multi-source constraints is progressively restored to a physically feasible charging and discharging power sequence, which facilitates the deep integration of physical laws and data-driven approaches. Finally, the safe adjustment range of charging and discharging power is determined by the probabilistic prediction interval. This probabilistic prediction interval can be merged with the hardware safe power boundary to form the final safe adjustment range, achieving an upgrade from deterministic command output to probabilistic safe range control. This improves the consistency of charging and discharging economy, battery cycle life, and operational safety boundary control capabilities of residential energy storage systems in environments with fluctuating electricity prices.
[0016] In summary, the technical solution adopted in this application can realize the adaptive embedding of multi-source heterogeneous physical constraints and the joint optimization of the strategy probability prediction range, so as to improve the overall control capability of home energy storage systems. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of an intelligent charging and discharging control method for a home energy storage system provided in this application; Figure 2 This is an exemplary flowchart for determining statistical embedding vectors provided in this application; Figure 3This is a schematic diagram of the structure of the noise prediction network provided in this application; Figure 4 This is a modular structure diagram of an intelligent charging and discharging control system for a home energy storage system provided in this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Example 1: To better understand the technical solution of this application, the above technical solution will be described in detail below with reference to the accompanying drawings and specific embodiments. Figure 1 As shown in the figure, this is a flowchart of an intelligent charging and discharging control method for a home energy storage system according to this embodiment of the present application. The control method includes the following steps: In step S1, the electricity price fluctuation profile, state of charge change, and charge / discharge power sequence of the home energy storage system are extracted.
[0021] In this embodiment, the extraction of the electricity price fluctuation profile, state of charge change, and charge / discharge power sequence of a residential energy storage system can be achieved in the following manner: Peak and valley values are detected in historical electricity price data from residential energy storage systems to obtain electricity price peak and valley sequences. The electricity price fluctuation profile is obtained by performing difference fitting between the electricity price peak sequence and the electricity price trough sequence. Differential calculations are performed on the state of charge of batteries in a home energy storage system to obtain the changes in the state of charge. By monitoring the charging and discharging power of a home energy storage system, a charging and discharging power sequence can be obtained.
[0022] In practice, firstly, historical electricity price data from the household energy storage system is collected through smart meters. Preferably, the historical electricity price data can be a sequence of electricity price values at each 0:00 point within the past three months. The electricity price value at each 0:00 point is compared with the electricity price values at adjacent points. If the electricity price value at a certain 0:00 point is greater than the electricity price values at adjacent 0:00 points, then the electricity price value at that 0:00 point is marked as an electricity price peak. If the electricity price value at a certain 0:00 point is less than the electricity price values at adjacent 0:00 points, then the electricity price value at that 0:00 point is marked as an electricity price trough. All the marked electricity price peaks are arranged in chronological order to obtain an electricity price peak sequence, and all the marked electricity price troughs are arranged in chronological order to obtain an electricity price trough sequence. Secondly, linear interpolation fitting is performed on the electricity price peak sequence and the electricity price trough sequence. That is, straight lines are used to connect two adjacent electricity price peaks and two adjacent electricity price troughs, and the resulting broken line is used as the electricity price fluctuation profile. Then, the battery management system reads the state of charge (SOC) values of the battery packs in the home energy storage system in real time, collecting an SOC sampling point at fixed time intervals to continuously obtain a SOC time series. A first-order forward difference operation is performed on the SOC time series, i.e., the SOC value of the previous sampling point is subtracted from the SOC value of the subsequent sampling point, and the difference is divided by the sampling time interval. The result is then used as the SOC change. Finally, a power sensor continuously monitors the real-time power value in the charging and discharging circuit of the home energy storage system, recording one power sampling point after each sampling cycle. The continuously recorded power sampling points are arranged in chronological order to obtain the charging and discharging power sequence.
[0023] It should be noted that the electricity price fluctuation profile is a curve describing the fluctuation pattern of electricity prices over time, used to characterize the distribution pattern of peak and off-peak periods in electricity prices over a future period; the state of charge (SCC) change is a time series of the rate of SCC change, used to reflect the speed at which the battery's SCC changes over time, i.e., the rate of battery charging or discharging; the charge / discharge power sequence is a data set composed of continuously sampled real-time power values arranged in chronological order, used to characterize the actual charging and discharging behavior of a home energy storage system at various times. By performing peak and valley detection on historical electricity price data, the occurrence times of electricity price peaks and valleys can be identified, providing a basis for the time period division of charging and discharging strategies; the SCC change obtained through differential operations can quantify the trend of battery SCC change, providing the rate of state change input for the dynamic equations in the physical constraints.
[0024] In step S2, the electricity price fluctuation profile and the state of charge change are encoded into statistical embedding vectors, and the charging and discharging power sequence is diffused and denoised to obtain a perturbation sequence.
[0025] Preferably, in this embodiment, reference Figure 2 As shown, this figure is an exemplary flowchart for determining statistical embedding vectors according to the present application. In this embodiment, encoding the electricity price fluctuation profile and the state of charge change into statistical embedding vectors can be achieved by the following steps: First, in step S21, piecewise linear interpolation is performed on the electricity price fluctuation profile to obtain a high-dimensional feature vector of the electricity price fluctuation. Then, in step S22, the change in the state of charge is normalized by a sliding window to obtain the marginal normalized vector of the state of charge. Finally, in step S23, the high-dimensional feature vector and the marginal normalized vector are concatenated and then subjected to high-dimensional mapping to obtain the statistical embedding vector.
[0026] In practice, firstly, multiple contour sampling points are selected at equal intervals from the electricity price fluctuation profile. Each contour sampling point contains a time value and its corresponding electricity price value. Then, linear interpolation is performed between adjacent contour sampling points by connecting them with a straight line. This involves calculating the electricity price value at the midpoint of the straight line within the time interval of the two sampling points, transforming the electricity price fluctuation profile into a high-dimensional sequence composed of dense electricity price values. This high-dimensional sequence is then used as the high-dimensional feature vector of the electricity price fluctuation. Next, a sliding window normalization process is applied to the sequence of rates of change of state of charge (RBCs) included in the RBC change. A sliding window is set up, starting from the first data point in the RBC change rate sequence. Each time, continuous rate of change values within the window are taken, and the arithmetic mean and standard deviation of all values are calculated. The arithmetic mean is subtracted from each rate of change value, and then the result is divided by the standard deviation to obtain the normalized rate of change value. The window is then moved forward by one step, and the above calculation is repeated until the entire RBC change rate sequence has been traversed. All normalized rate of change values are arranged in their original order to obtain the marginal normalized vector of the RBC. Finally, the high-dimensional feature vector of electricity price fluctuations and the marginal normalized vector of the state of charge are concatenated at the end to obtain a concatenated vector; each component in the concatenated vector is substituted into the sine and cosine functions respectively to generate a set of high-dimensional encoded values, and then all the encoded values are combined to obtain a statistical embedding vector.
[0027] It should be noted that the high-dimensional feature vector of electricity price fluctuation is a numerical sequence obtained by densely sampling the original electricity price fluctuation curve. It is used to transform the temporal distribution characteristics of electricity price into a high-dimensional representation that is easy for neural networks to process. The marginal normalized vector of state of charge is a sequence of state of charge change rates after being standardized by a sliding window. It is used to eliminate the dimensional differences of the change rate values in different time periods, so that they have a consistent data distribution. The statistical embedding vector is the result of fusing the electricity price fluctuation characteristics and the marginal features of state of charge, and then mapping them to a high-dimensional space through position encoding. This statistical embedding vector serves as a conditional input to the noise prediction network and can be used to guide the network to learn the noise distribution patterns under different electricity price environments and battery states.
[0028] In this embodiment, the perturbation sequence obtained by spreading and adding noise to the charge / discharge power sequence can be achieved in the following manner: The total diffusion step is determined, and Gaussian noise is added to the charge and discharge power sequence to obtain the noise figure of all diffusion steps; The noise power sequence is determined by the noise figures of all diffusion steps, thus obtaining the perturbation sequence.
[0029] In specific implementation, firstly, a total number of diffusion steps is set. Preferably, the total number of diffusion steps can be set to fifty steps, which helps to ensure that the noise energy fully covers the structural features of the original charge and discharge power sequence during the forward diffusion process, so that the noise-added power sequence of the last diffusion step approaches the standard normal distribution. The total number of diffusion steps represents the total number of steps that need to be executed in the forward diffusion process. For the first diffusion step, a set of Gaussian noise values with the same dimension as the charge and discharge power sequence is randomly sampled from the standard normal distribution. The Gaussian noise values are added to the charge and discharge power sequence according to the preset noise intensity coefficient to obtain the first step noise-added power sequence. For each subsequent diffusion step, the noise power sequence obtained in the previous step is used as the input for the current step. A new set of Gaussian noise values is randomly sampled from the standard normal distribution. The new Gaussian noise values are added to the noise power sequence of the previous step according to the noise intensity coefficient corresponding to the current step, thus obtaining the noise power sequence of the current step. The above operation is repeated until all the steps corresponding to the total number of diffusion steps are completed. The Gaussian noise values added in each step are recorded and used as noise coefficients. Then, all noise coefficients are sorted according to the diffusion steps to form a noise power sequence, which is used as the perturbation sequence.
[0030] It should be noted that the diffusion step refers to each independent step in the forward diffusion process where noise is added sequentially, and the total diffusion steps refer to the fineness of the noise addition; the noise figure is the value of Gaussian noise added at each step, used to record the evolution path of the noise during the diffusion process; the perturbation sequence is the power sequence after multiple steps of Gaussian noise superposition. The perturbation sequence is sufficiently perturbed by noise, and its distribution approaches a standard normal distribution. By gradually adding Gaussian noise, the deterministic structure in the original charge and discharge power sequence is gradually masked by noise, enabling the subsequent noise prediction network to learn the ability to recover the original structure from the noisy distribution.
[0031] In step S3, noise prediction is performed on the perturbation sequence based on the statistical embedding vector to obtain the noise prediction value, and the perturbation sequence is subjected to reverse denoising iteration to obtain the reconstructed charging and discharging strategy.
[0032] In this embodiment, noise prediction of the perturbation sequence based on the statistical embedding vector can be performed in the following manner to obtain the noise prediction value: Based on the statistical embedding vector, downsampling features are extracted from the perturbation sequence to obtain a multi-scale noise feature map; Perform a one-dimensional convolution operation on the multi-scale noise feature map to obtain the noise prediction tensor; The noise prediction tensor is activated element-wise to obtain the noise prediction value.
[0033] In practical implementation, firstly, a convolutional neural network architecture is created that serially connects a spatial coordinate input layer, a residual block stacking layer, and an output layer. Then, a batch normalization layer, a random dropout layer, and an activation function layer are respectively set in the residual block stacking layer to obtain the noise prediction network. In actual implementation, firstly, a spatial coordinate input layer is created to receive perturbation sequences and statistical embedding vectors as input data. The perturbation sequence is essentially a multidimensional numerical sequence, and the statistical embedding vector is essentially a feature vector. The spatial coordinate input layer is connected to the residual block stacking layer, which is composed of multiple residual blocks connected in series. Each residual block contains a batch normalization layer, a random dropout layer, and an activation function layer. Finally, the noise prediction network is constructed by connecting the output layer.
[0034] It should be noted that, preferably, in this embodiment, reference is made to... Figure 3As shown in the figure, this is a schematic diagram of the noise prediction network provided in this application. The spatial coordinate input layer is the entry layer in the network structure used to receive the original input data, and its function is to transform the external data into a tensor format that the network can process. The batch normalization layer is a network layer that standardizes the numerical distribution of each mini-batch of data. Its function is to adjust the mean of the input data to zero and the variance to 1, thereby accelerating the convergence speed of network training and improving numerical stability. The random dropout layer is a network layer that randomly forces the output of some neurons to zero according to a fixed proportion. Its function is to prevent the network from becoming overly dependent on specific features, thereby suppressing overfitting and enhancing the network's generalization ability. The activation function layer is a network layer that performs nonlinear mapping on the input data. Its function is to introduce nonlinear transformations, enabling the network to fit complex functions. The residual block stacking layer refers to a network structure layer formed by multiple residual blocks connected in series. The shortcut connections within each residual block can directly transmit the input signal to the output of deeper layers, thereby alleviating the gradient decay problem in deep network training. The output layer is used to map deep features to the final prediction result.
[0035] In practice, the perturbation sequence is first fed into the spatial coordinate input layer of the noise prediction network as input data. Simultaneously, the statistical embedding vector and the encoding vector of the current diffusion step index are concatenated and input into the middle channel of each residual block stack layer. When the perturbation sequence passes through the first residual block stack layer, the numerical distribution of the input data is standardized by a batch normalization layer, and then some feature values are randomly set to zero according to a preset ratio by a random discard layer. Then, a nonlinear mapping is performed by an activation function layer to obtain the first layer feature map. Next, the first layer feature map is input into the next residual block stack layer, and the above standardization, random discard, and nonlinear mapping operations are repeated. Simultaneously, after each residual block, the input and output features are added through a shortcut connection to obtain the feature map for that layer. After passing through all residual block stack layers, the spatial resolution of the feature map gradually decreases while the number of channels gradually increases with each residual block, thus obtaining a multi-scale noise feature map. Then, the multi-scale noise feature map is input into the output layer of the noise prediction network. One-dimensional convolution is applied to the output layer, where a set of learnable convolutional kernels slide along the length dimension of the feature map. Each kernel performs a dot product with a local feature, generating an output value. The output values of all convolutional kernels are combined into a one-dimensional vector, which is then used as the noise prediction tensor. Finally, an element-wise activation function is applied to each element of the noise prediction tensor, meaning each element is independently transformed by a non-linear activation function, resulting in a sequence of transformed values that are used as the noise prediction values.
[0036] It should be noted that multi-scale noise feature maps refer to a set of feature representations with different spatial resolutions and channel depths. Shallow feature maps retain local details of the perturbation sequence, while deep feature maps encode global structural information. Element-wise activation applies the same nonlinear function to each independent component in the tensor to increase the nonlinear expressive power of the network, enabling the noise prediction value to fit complex noise distributions. The noise prediction value is the estimation result of the noise prediction network on the Gaussian noise value contained in the noisy strategy in the current diffusion step. It can be used in subsequent reverse denoising iterations to gradually subtract the predicted noise from the noisy strategy, thereby recovering the original charging and discharging strategy.
[0037] In this embodiment, the reverse denoising iteration of the perturbation sequence to obtain the reconstructed charging and discharging strategy can be carried out in the following manner: The perturbation sequence is traversed in descending order using statistical embedding vectors as conditional information to obtain the noise estimate for each reverse step; The noise estimates for all reverse steps are backsampled and calculated to obtain the reconstructed charging and discharging strategy.
[0038] In practice, firstly, the perturbation sequence is used as the starting sequence for the reverse denoising iteration, and the statistical embedding vector is used as the conditional information. The current step index is set to the total number of diffusion steps, and the iteration is decremented downwards from the total number of diffusion steps. Each time a reverse step is executed, the current step index is decremented by 1. In the current reverse step, the noisy power sequence of the current step, the current step index, and the statistical embedding vector are simultaneously input into the noise prediction network. After one forward computation, the noise prediction network outputs a noise value sequence with the same dimension as the noisy power sequence. This noise value sequence is used as the noise estimate for the current reverse step. Then, a backsampling calculation is performed based on the noise estimate: first, a recovery coefficient is calculated, which is the diffusion parameter corresponding to the current step index; the noisy power sequence of the current step is subtracted from the recovery coefficient multiplied by the noise estimate to obtain the preliminary recovery sequence; then, the preliminary recovery sequence is scaled and adjusted according to the diffusion parameter of the previous step to obtain the power sequence of the previous step; the current step index is decremented by one, and the above process is repeated until the current step index is zero; the final power sequence with a step index of zero is used as the reconstruction charging and discharging strategy.
[0039] It should be noted that the reverse denoising iteration is a process of gradually recovering the original power sequence with low noise from a high-noise perturbation sequence. Each reverse step uses a noise prediction network to estimate the noise component in the current noisy sequence and subtracts it. The decreasing traversal refers to a cyclic process that gradually decreases from the total number of diffusion steps to zero, with each cycle corresponding to one reverse step. The noise estimate is the prediction result of the noise prediction network for the Gaussian noise value contained in the noisy sequence of the current step. The reverse sampling calculation is a mathematical operation that derives the power sequence of the previous step in reverse from the noise estimate and diffusion parameters. Its core is to use the mean estimate of the conditional probability distribution for deterministic reconstruction. The reconstructed charge-discharge strategy is the power sequence recovered after all reverse denoising iterations. This sequence eliminates the Gaussian noise added during the diffusion process and retains the structural characteristics of the original charge-discharge strategy. At the same time, due to the embedding of multi-source heterogeneous anchor point residuals during training, this reconstruction strategy naturally satisfies the consistency of charge state dynamics, battery aging friendliness, and safety boundary constraints.
[0040] In step S4, the multi-source heterogeneous anchor point residual is embedded into the noise prediction value to obtain the total anchor point loss. Based on the total anchor point loss, the reconstructed charging and discharging strategy is physically constrained to predict the probability prediction interval.
[0041] In this embodiment, the total anchor point loss is obtained by embedding multi-source heterogeneous anchor point residuals into the noise prediction value, which can be achieved in the following way: The predicted state of charge is obtained by back-calculating the noise prediction value through the recursive equation of the state of charge, and then the dynamic anchor point residual of the battery state of charge is obtained. The residual loss anchor point for battery aging is determined based on the charge / discharge rate and aging penalty function value calculated from the noise prediction value. The safety boundary anchor point residual for charging and discharging is determined by the positive part of the noise prediction value exceeding the preset power upper limit and the negative part below the preset power lower limit; The total anchor point loss is obtained by weighted summing of the dynamic anchor point residual, the loss anchor point residual, and the safety boundary anchor point residual.
[0042] In practice, firstly, the noise prediction value is reverse-calculated using the state of charge recursive equation. That is, starting from the current state of charge value, the power value multiplied by the time interval and divided by the battery capacity is subtracted to obtain the state of charge value of the previous moment. This process is repeated to obtain the predicted state of charge sequence for all moments. The predicted state of charge sequence is then subtracted from the actual state of charge sequence extracted from the home energy storage system moment by moment to obtain the difference sequence. The square of each difference in the difference sequence is then calculated, and the average value of all the squared values is obtained to obtain the dynamic anchor point residual of the battery state of charge.
[0043] In addition, the charge / discharge rate is calculated based on the noise prediction value, i.e., the power value corresponding to the noise prediction value is divided by the battery's rated capacity. This charge / discharge rate value is then substituted into a preset aging penalty function, which is a quadratic function of the charge / discharge rate. When the charge / discharge rate exceeds a preset threshold, the penalty value increases sharply. This aging penalty value is used as the residual value at the battery aging loss anchor point. Next, the noise prediction value is compared with a preset upper power limit. If the noise prediction value is greater than the upper power limit, the difference is taken as the positive part; otherwise, the positive part is zero. The noise prediction value is also compared with a preset lower power limit. If the noise prediction value is less than the lower power limit, the absolute value of the difference is taken as the negative part; otherwise, the negative part is zero. The positive and negative parts are squared and then summed to obtain the residual value at the safe boundary of the charge / discharge process. Finally, the weighted sum of the dynamic anchor residual, loss anchor residual, and safety boundary anchor residual is used as the total anchor loss. The weight values are determined by a combination of initial magnitude balancing and dynamic updating. Specifically, the average magnitude of each anchor residual is calculated in the early training phase. Using the magnitude of the dynamic anchor residual as a benchmark, the reciprocal of the ratio of the magnitudes of other residuals is multiplied by the benchmark weight to ensure that the contribution of each weighted term to the total loss is of a similar magnitude. During training, the current magnitude of each residual is recalculated every certain number of iterations, and the weight coefficients are dynamically adjusted to maintain balanced learning across multiple physical constraints and prevent any one constraint from dominating the optimization direction.
[0044] It should be noted that the dynamic anchor point residual is a quantitative indicator used to measure the degree of deviation between the predicted state of charge and the actual state of charge. The smaller the value, the higher the physical consistency of the noise prediction value under the dynamic constraints of the state of charge. The loss anchor point residual is a quantitative indicator used to measure the impact of the current charge / discharge rate on the battery aging life. The smaller the value, the more beneficial the charge / discharge strategy is to delay battery aging. The safety boundary anchor point residual is a quantitative indicator used to measure the degree to which the noise prediction value exceeds the safe range of charge / discharge power. The smaller the value, the closer the generated strategy is to the safe operating range. The total anchor point loss is the comprehensive loss value obtained by weighted summation of the three physical constraint residuals of different natures. It is used to guide the noise prediction network to simultaneously satisfy dynamic consistency, lifespan friendliness, and safety boundary constraints.
[0045] In this embodiment, the reconstructed charging and discharging strategy is physically constrained and predicted based on the total anchor point loss, resulting in a probability prediction interval that specifically includes: A training set is constructed based on multi-source heterogeneous anchor point residuals; With the goal of minimizing the total loss of the anchor points, the training set is updated in the first and second stages, and the convergence of the total loss of the anchor points is monitored. When the total loss of the anchor point converges to a preset loss threshold, forward propagation is performed on the reconstructed charging and discharging strategy to obtain multiple random sampling strategy samples. Confidence intervals for all random sampling strategies at each sampling time are constructed using the mean and standard deviation of the samples at each sampling time. By concatenating all the confidence intervals, we obtain the probability prediction interval.
[0046] In practice, firstly, a training set is constructed using the network weight parameters of the noise prediction network and the multi-source heterogeneous anchor residuals. Then, all trainable parameters are extracted from the noise prediction network, including the convolutional kernels of the convolutional layers, the weights of the fully connected layers, the scaling factors and offset factors of the batch normalization layers, as well as the physical parameters involved in the multi-source heterogeneous anchor residuals. These parameters, along with the perturbation sequences, statistical embedding vectors, and real state-of-charge sequences collected from historical periods, are used to form the training set. Secondly, an adaptive moment estimation optimizer is used to minimize the total anchor loss, performing a first-stage gradient update on the training set and monitoring the rate of change of the total anchor loss. When the rate of change of the total anchor loss is lower than a preset threshold, a quasi-Newton optimizer is switched to perform a second-stage gradient update, monitoring the convergence of the total anchor loss. The adaptive moment estimation optimizer is used for the first-stage training, randomly sampling a small batch of samples in each iteration to calculate the total anchor loss and its partial derivative with respect to each trainable parameter. The optimizer adaptively adjusts the learning step size of each parameter and updates the parameter values based on the first and second moments of the gradient. Every 200 iterations, the rate of change of the total anchor loss relative to the number of iterations is calculated, i.e., the difference between the two most recent losses divided by the difference in the number of iterations. When this rate of change is lower than one-thousandth for ten consecutive iterations, the first stage is considered to have entered a plateau period. Then, the second stage of training is performed using a quasi-Newton optimizer. The quasi-Newton optimizer does not require a preset learning rate and estimates the optimal update direction using the inverse of the approximate Hessian matrix. Every 100 iterations, the total anchor loss is recorded, and its convergence is monitored. When the change in the total anchor loss is less than one ten-thousandth over 20 consecutive iterations, and the absolute value of the total anchor loss is less than 0.01%, the loss is considered converged. Finally, when the total anchor loss converges to a preset loss threshold, the converged noise prediction network is used as the physical constraint model. It should be noted that the selection of the number of iterations and the threshold is based on typical deep learning training experience: 200 iterations are sufficient to assess the trend of loss change; ten consecutive changes below one-thousandth can exclude random fluctuations; the quasi-Newton stage monitors every 100 iterations, and twenty consecutive changes less than one ten-thousandth indicate stability; the loss threshold of 0.01 corresponds to an acceptable approximate accuracy for engineering applications. The above values can be adjusted appropriately according to specific training conditions and are not fixed limitations.
[0047] It should be noted that the adaptive moment estimation optimizer is a parameter update algorithm that adaptively adjusts the learning rate based on the first and second moments of the gradient. Its function is to quickly reduce the loss value in the early stages of training and it is suitable for optimizing non-stationary objective functions. The quasi-Newton optimizer is an optimization algorithm that uses the second derivative information to approximate the Hessian matrix for parameter update. Its function is to achieve fine convergence when the loss function is close to the optimal solution, thereby improving the accuracy of parameter estimation. The rate of change of the total loss at the anchor point refers to the magnitude of the change in the loss value per unit number of iterations, used to determine whether the optimization process has entered a plateau. By using a two-stage joint optimization strategy of first using the adaptive moment estimation optimizer for rapid coarse tuning and then switching to the quasi-Newton optimizer for fine tuning, we can balance the convergence speed in the early stages of training with the parameter accuracy in the later stages of training, thus obtaining a physical constraint model with sufficient physical constraint embedding and accurate noise estimation.
[0048] In specific implementation, firstly, the reconstructed charging / discharging strategy is input into the physical constraint model. During the forward inference process of the physical constraint model, the following operations are repeated multiple times: During each forward propagation, a portion of the output values of neurons in each randomly discarded layer of the physical constraint model are temporarily set to zero according to a preset discard ratio, while the remaining neurons compute normally, resulting in the output of one forward propagation. This output is used as a random sampling strategy sample. The forward propagation is repeated a preset number of times, with each instance of independently and randomly selecting discarded neurons, thus obtaining multiple random sampling strategy samples. Each random sampling strategy sample is a power value sequence with the same dimension as the reconstructed charging / discharging strategy. Then, for each sampling time, the power values of all random sampling strategy samples at that time are collected, and the arithmetic mean of these power values is calculated as the mean for that sampling time. The standard deviation for that sampling time is calculated, and an interval is constructed with the mean as the center and the standard deviation as the radius, ranging from the mean minus the radius to the mean plus the radius. This interval is used as the confidence interval for that sampling time. Finally, the confidence intervals for all sampling times are connected sequentially in chronological order to form an interval band that varies with the sampling time. This interval band is used as the probability prediction interval.
[0049] It should be noted that the random sampling strategy sample is the output power numerical sequence obtained in each forward propagation, and the set of multiple samples is used to approximately characterize the uncertainty distribution of the model prediction; the confidence interval is a numerical interval constructed based on the mean and standard deviation, used to represent the reliable range of the model's predicted value for each sampling time; the probability prediction interval is an interval band formed by splicing the confidence intervals of all sampling times in chronological order, and its upper and lower boundaries describe the uncertainty boundaries of the entire charging and discharging strategy sequence, respectively.
[0050] In step S5, the safe adjustment range of charging and discharging power is determined by the probability prediction interval.
[0051] In this embodiment, the safe adjustment range of charging and discharging power determined by the probability prediction interval can be specifically adopted in the following manner: Extract the upper confidence limit and lower confidence limit from the probability prediction interval; Collect the upper and lower limits of the hardware safety power of home energy storage systems; The safe adjustment range of charging and discharging power is determined by the upper confidence limit, the upper hardware safety power limit, the lower confidence limit, and the lower hardware safety power limit.
[0052] In practice, firstly, the upper and lower boundary values are read from the probability prediction interval time by time. The upper boundary value at each time is taken as the upper confidence limit, and the lower boundary value at each time is taken as the lower confidence limit. Then, by reading the preset protection parameters in the battery management system of the home energy storage system, the maximum allowable charging power value and the maximum discharge power value of the battery pack are obtained. These maximum charging power value and maximum discharge power value are taken as the upper and lower hardware safety power limits, respectively. Finally, the smaller value between the upper confidence limit and the upper hardware safety power limit is taken as the upper boundary of the safety adjustment range; the larger value between the lower confidence limit and the lower hardware safety power limit is taken as the lower boundary of the safety adjustment range; the closed interval formed by the upper and lower boundaries of the safety adjustment range is taken as the safety adjustment range of the charging and discharging power at that time.
[0053] It should be noted that the upper confidence limit is the upper boundary value of each time step within the probability prediction interval, representing the higher estimated power value that the model predicts at that time step; the lower confidence limit is the lower boundary value of each time step within the probability prediction interval, representing the lower estimated power value that the model predicts at that time step; the hardware safe power limit is the maximum allowable charging or discharging power value set by the battery management system based on the battery's chemical characteristics and temperature state; exceeding this value may lead to safety risks; the hardware safe power lower limit is the minimum allowable power value set by the battery management system; falling below this value may lead to deep battery discharge or system instability; the safe adjustment range is the feasible range of charging and discharging power determined after comprehensively considering the uncertainty of model prediction and hardware physical limitations. Its upper boundary is determined by the smaller value between the upper boundary of model prediction and the upper hardware limit, and its lower boundary is determined by the larger value between the lower boundary of model prediction and the lower hardware limit. By merging the probability prediction interval and the hardware safety boundary by taking the smaller and larger values, it can be ensured that the final selected charging and discharging power meets the reliability requirements of model prediction without exceeding the physical safety limits of the battery, thereby achieving joint optimization of safety and economy.
[0054] In summary, the technical solution adopted in this application can realize the adaptive embedding of multi-source heterogeneous physical constraints and the joint optimization of the strategy probability prediction range, so as to improve the overall control capability of home energy storage systems.
[0055] Example 2: This application provides an intelligent charging and discharging control system for a home energy storage system, referencing... Figure 4 As shown, this figure is a modular structure diagram of an intelligent charging and discharging control system for a home energy storage system according to this application. The control system includes: Data parsing module 100 is used to extract the electricity price fluctuation profile, state of charge change and charging and discharging power sequence of the home energy storage system; The embedding and perturbation module 200 is used to encode the electricity price fluctuation profile and the state of charge change into statistical embedding vectors, and to diffuse and add noise to the charging and discharging power sequence to obtain a perturbation sequence; The denoising and prediction module 300 is used to predict noise in the perturbation sequence based on the statistical embedding vector to obtain the noise prediction value, and to perform reverse denoising iteration on the perturbation sequence to obtain the reconstructed charging and discharging strategy. The constraint prediction module 400 is used to embed multi-source heterogeneous anchor point residuals into the noise prediction value to obtain the total anchor point loss, and to perform physical constraint prediction on the reconstructed charging and discharging strategy based on the total anchor point loss to obtain the probability prediction interval. The confidence control module 500 is used to determine the safe adjustment range of the charging and discharging power based on the probability prediction interval.
[0056] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0057] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compactdisc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0058] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
Claims
1. A smart charging and discharging control method for a home energy storage system, characterized in that, The control method includes the following steps: Extract the electricity price fluctuation profile, state of charge change, and charge / discharge power sequence of a residential energy storage system; The electricity price fluctuation profile and the state of charge change are encoded into statistical embedding vectors, and the charging and discharging power sequence is diffused and noise-added to obtain a perturbation sequence. Based on the statistical embedding vector, noise prediction is performed on the perturbation sequence to obtain the noise prediction value, and the perturbation sequence is subjected to reverse denoising iteration to obtain the reconstructed charging and discharging strategy. Multi-source heterogeneous anchor point residuals are embedded into the noise prediction values to obtain the total anchor point loss. The reconstructed charging and discharging strategy is then physically constrained based on the total anchor point loss to obtain the probability prediction interval. The safe adjustment range of charging and discharging power is determined by the probability prediction interval.
2. The intelligent charging and discharging control method for a home energy storage system as described in claim 1, characterized in that, Extracting the electricity price fluctuation profile, state of charge change, and charge / discharge power sequence of a residential energy storage system specifically includes: Peak and valley values are detected in historical electricity price data from residential energy storage systems to obtain electricity price peak and valley sequences. The electricity price fluctuation profile is obtained by performing difference fitting between the electricity price peak sequence and the electricity price trough sequence. Differential calculations are performed on the state of charge of batteries in a home energy storage system to obtain the changes in the state of charge. By monitoring the charging and discharging power of a home energy storage system, a charging and discharging power sequence can be obtained.
3. The intelligent charging and discharging control method for a home energy storage system as described in claim 1, characterized in that, Encoding the electricity price fluctuation profile and the state of charge change into a statistical embedding vector specifically includes: Piecewise linear interpolation is performed on the electricity price fluctuation profile to obtain a high-dimensional feature vector of the electricity price fluctuation. The changes in the state of charge are normalized by a sliding window to obtain the marginal normalized vector of the state of charge. The high-dimensional feature vector and the marginal normalized vector are concatenated and then mapped in a high dimension to obtain the statistical embedding vector.
4. The intelligent charging and discharging control method for a home energy storage system as described in claim 1, characterized in that, The perturbation sequence obtained by spreading and adding noise to the charge / discharge power sequence specifically includes: The total diffusion step is determined, and Gaussian noise is added to the charge and discharge power sequence to obtain the noise figure of all diffusion steps; The noise power sequence is determined by the noise figures of all diffusion steps, thus obtaining the perturbation sequence.
5. The intelligent charging and discharging control method for a home energy storage system as described in claim 1, characterized in that, Based on the statistical embedding vector, noise prediction of the perturbation sequence is performed to obtain the noise prediction value, specifically including: Based on the statistical embedding vector, downsampling features are extracted from the perturbation sequence to obtain a multi-scale noise feature map; Perform a one-dimensional convolution operation on the multi-scale noise feature map to obtain the noise prediction tensor; The noise prediction tensor is activated element-wise to obtain the noise prediction value.
6. The intelligent charging and discharging control method for a home energy storage system as described in claim 1, characterized in that, The reverse denoising iteration of the perturbation sequence to obtain the reconstructed charging and discharging strategy specifically includes: The perturbation sequence is traversed in descending order using statistical embedding vectors as conditional information to obtain the noise estimate for each reverse step; The noise estimates for all reverse steps are backsampled and calculated to obtain the reconstructed charging and discharging strategy.
7. The intelligent charging and discharging control method for a home energy storage system as described in claim 1, characterized in that, The total anchor point loss is obtained by embedding the multi-source heterogeneous anchor point residuals into the noise prediction value, specifically including: The predicted state of charge is obtained by back-calculating the noise prediction value through the recursive equation of the state of charge, and then the dynamic anchor point residual of the battery state of charge is obtained. The residual loss anchor point for battery aging is determined based on the charge / discharge rate and aging penalty function value calculated from the noise prediction value. The safety boundary anchor point residual for charging and discharging is determined by the positive part of the noise prediction value exceeding the preset power upper limit and the negative part below the preset power lower limit; The total anchor point loss is obtained by weighted summing of the dynamic anchor point residual, the loss anchor point residual, and the safety boundary anchor point residual.
8. The intelligent charging and discharging control method for a home energy storage system as described in claim 1, characterized in that, Based on the total anchor point loss, the reconstructed charging and discharging strategy is physically constrained and predicted to obtain a probability prediction interval, which specifically includes: A training set is constructed based on multi-source heterogeneous anchor point residuals; With the goal of minimizing the total loss of the anchor points, the training set is updated in the first and second stages, and the convergence of the total loss of the anchor points is monitored. When the total loss of the anchor point converges to a preset loss threshold, forward propagation is performed on the reconstructed charging and discharging strategy to obtain multiple random sampling strategy samples. Confidence intervals for all random sampling strategies at each sampling time are constructed using the mean and standard deviation of the samples at each sampling time. By concatenating all the confidence intervals, we obtain the probability prediction interval.
9. The intelligent charging and discharging control method for a home energy storage system as described in claim 1, characterized in that, Determining the safe adjustment range of charging and discharging power based on the probability prediction interval specifically includes: Extract the upper confidence limit and lower confidence limit from the probability prediction interval; Collect the upper and lower limits of the hardware safety power of home energy storage systems; The safe adjustment range of charging and discharging power is determined by the upper confidence limit, the upper hardware safety power limit, the lower confidence limit, and the lower hardware safety power limit.
10. An intelligent charging and discharging control system for a home energy storage system, characterized in that, For executing a smart charging and discharging control method for a home energy storage system as described in any one of claims 1 to 9, the control system includes: The data parsing module is used to extract the electricity price fluctuation profile, state of charge change, and charge / discharge power sequence of a home energy storage system. An embedding and perturbation module is used to encode the electricity price fluctuation profile and the state of charge change into statistical embedding vectors, and to diffuse and add noise to the charging and discharging power sequence to obtain a perturbation sequence; The denoising and prediction module is used to predict noise in the perturbation sequence based on the statistical embedding vector to obtain the noise prediction value, and to perform reverse denoising iteration on the perturbation sequence to obtain the reconstructed charging and discharging strategy. The constraint prediction module is used to embed multi-source heterogeneous anchor point residuals into the noise prediction value to obtain the total anchor point loss, and to perform physical constraint prediction on the reconstructed charging and discharging strategy based on the total anchor point loss to obtain the probability prediction interval. The confidence control module is used to determine the safe adjustment range of charging and discharging power based on the probability prediction interval.