Energy optimization control method based on real-time energy consumption prediction

CN122801231APending Publication Date: 2026-09-22SHANDONG BAIQING PUHUI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611095808.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0003]现有技术中,在多能源系统启动初期,由于可用运行记录不足会导致初始参数整定存在偏差,而不同能源子系统固有的响应滞后差异进一步模糊了优先级判定依据,且能源系统中遇突发负载扰动或环境变化,会使实时能耗轨迹偏离预计走向,但反馈回路难以甄别该偏离是供给侧出力波动还是需求侧随机突变所致,使得切换决策所依赖的修正基准失真,进一步地,各能源边际成本曲线固有的非凸拐点特性易诱发临界状态下的往复投切震荡,不仅会降低系统响应品质,还会对储能单元的循环寿命构成直接损耗,为此,现提出基于实时能耗预测的能源优化控制方法,以解决上述提出的问题

Benefits of technology

所述小批量梯度更新的批量大小与经验缓存区容量的比值由当前策略熵值调节,熵值高于设定上限时增大采样批量以充分利用历史经验稳定更新,熵值低于设定下限时减小采样批量以侧重近期新经验提升策略新鲜度,实现探索与利用的平衡调度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122801231A_ABST
    Figure CN122801231A_ABST
Patent Text Reader

Abstract

The application discloses an energy optimization control method based on real-time energy consumption prediction and relates to the technical field of multi-energy system optimization control, comprising the following steps: collecting limited real-time energy consumption data of a target multi-energy system at the initial stage of starting, quantifying the response rate and historical setting deviation of each sub-energy system by using fuzzy logic, generating an initial weight base value, introducing an improved grey wolf algorithm with an embedded population diversity compensation strategy, and searching for an optimal weight combination in the weight space. The application quantifies the response rate difference and historical setting deviation of each sub-energy system by using fuzzy logic, generates an initial weight base value, and cooperates with the improved grey wolf algorithm with the embedded population diversity compensation strategy to quickly search for an optimal weight combination in the weight space, so that the dominant energy system can be locked and the auxiliary output quota can be reasonably distributed in a very short time after starting, the output deviation in the starting stage is reduced, and the stability and reliability of the multi-energy system starting process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-energy system optimization control technology, specifically to an energy optimization control method based on real-time energy consumption prediction. Background Technology

[0002] With population growth and economic development, energy demand is rising rapidly, leading to increasingly serious problems of high resource consumption and environmental pollution. Real-time monitoring and analysis of energy supply and consumption can dynamically adjust the use of various energy sources and promote the integration and optimized utilization of renewable energy to adapt to ever-changing market demands and environmental requirements.

[0003] In existing technologies, during the initial startup phase of a multi-energy system, insufficient available operational records can lead to deviations in initial parameter tuning. Furthermore, the inherent response lag differences among different energy subsystems further obscure the criteria for priority determination. In addition, sudden load disturbances or environmental changes in the energy system can cause the real-time energy consumption trajectory to deviate from the expected trend. However, the feedback loop struggles to distinguish whether this deviation is caused by fluctuations in supply-side output or random changes in demand, resulting in distortion of the correction benchmark upon which switching decisions rely. Moreover, the inherent non-convex inflection point characteristics of the marginal cost curves of each energy source can easily induce reciprocating switching oscillations under critical conditions, which not only reduces the system response quality but also directly damages the cycle life of energy storage units. Therefore, this paper proposes an energy optimization control method based on real-time energy consumption prediction to address the aforementioned problems. Summary of the Invention

[0004] The purpose of this invention is to provide an energy optimization control method based on real-time energy consumption prediction to solve the problems mentioned in the background art.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: The energy optimization control method based on real-time energy consumption prediction includes the following steps: S1: Collect limited real-time energy consumption data of the target multi-energy system at the initial stage of startup, use fuzzy logic to quantify the response rate and historical tuning deviation of each sub-energy system, generate initial weight base values, introduce an improved gray wolf algorithm with embedded population diversity compensation strategy, search for the optimal weight combination in the weight space, quickly lock the dominant energy system in the startup stage, reduce startup offset, and overcome the blindness of parameter tuning caused by the lack of data in the early stage of startup. S2: Based on a locked dominant energy system, a long short-term memory network (LSTM) and an adaptive Kalman filter are coupled. The LSTM network is used to model the long-term time-series dependence of real-time energy consumption data, predict the energy consumption drift trend, and simultaneously correct the residual covariance online through the adaptive Kalman filter. The two types of disturbance characteristics, namely the power output fluctuation on the supply side and the random change in demand side, are separated. Based on the separation results, the switching threshold of the optimization control is corrected, so that the control benchmark tracks the real operating conditions of the system in real time, and the energy consumption trend is accurately predicted and the disturbance source is accurately located. S3: The corrected switching threshold and the stripped perturbation features are jointly encoded into the decision state space. The near-end policy optimization is used for reinforcement learning training. The continuous probability distribution of the switching action of each sub-energy system is output. A single robust switching is executed in a probability sampling manner to replace the traditional hard switching logic and suppress the repeated probing and oscillation in the critical interval. S4: Feedback the switching results and subsequent energy consumption response of each switch to the fuzzy logic and Kalman filter respectively, update the weight benchmark and noise covariance, continuously fine-tune and optimize the control strategy, realize the adaptive evolution of the control strategy, ensure the robustness of energy optimization control and energy storage cycle life, and form a closed-loop self-evolving control system.

[0006] A further improvement to the technical solution of the present invention is that: S1 specifically includes: The instantaneous power, voltage fluctuation rate, and temperature change rate of each sub-energy system within a preset time window after startup are collected as limited real-time energy consumption data. Input feature vectors are constructed, and the response rate is divided into three membership levels (fast, medium, and slow) using a fuzzy logic rule base. Historical tuning deviations are divided into three membership levels (small, medium, and large). The initial weight base values ​​of each sub-energy system are output by defuzzifying using the centroid method. This achieves the quantification of rapid response characteristics under limited data in the initial startup phase and provides a reasonable starting center for subsequent weight search. The initial weight base value is used as the cluster center of the initial population of the improved Grey Wolf algorithm. Tent chaotic mapping is used to generate uniformly distributed weight individuals. During the iteration process, the population aggregation degree is calculated. When the population aggregation degree is lower than the preset threshold, Levy flight perturbation is triggered. The new individuals after perturbation are sorted by fitness to replace the current worst individual, thus compensating for population diversity. Tent mapping refers to tent mapping, which effectively avoids premature homogenization of the population, maintains search vitality, and reduces the risk of getting trapped in local optima. Using the weighted product of overall energy supply reliability and unit energy consumption output ratio as the fitness function, the improved Grey Wolf algorithm is driven to iteratively search for the optimal weight combination. Based on the final weight ranking result, the sub-energy system with the highest weight is selected as the dominant energy system in the start-up phase. The remaining sub-energy systems are allocated auxiliary output quotas according to their weight ratios to ensure the rationality and clarity of the output allocation in the start-up phase, laying a stable output benchmark for subsequent operating condition tracking.

[0007] A further improvement to the technical solution of the present invention is that: S1 further includes: The size of the gray wolf population and the maximum number of iterations are set. Each individual is encoded as a multidimensional real vector containing the weight values ​​of each sub-energy system, and weight normalization constraints are applied. Tent chaotic mapping is used to replace random initialization to enhance the ergodicity of the initial population. In the early stage of iteration, a nonlinear decaying convergence factor is used to expand the global search range, effectively improving the coverage uniformity of the initial solution space, enhancing the early global exploration capability, and avoiding getting stuck in local regions. In each iteration, the top three individuals are recorded as α, β, and δ wolves, respectively, and the position update vectors of the remaining individuals relative to the three are calculated. Dynamic weight coefficients are introduced to improve the position update formula from equal weight average to weighted according to fitness ratio, making the position update direction more optimal. At the same time, Gaussian mutation operator is introduced in the later stage of iteration to perform neighborhood perturbation on the best individual, strengthen the guiding role of excellent individuals, and improve convergence speed and accuracy. Fine-tuning in the later stage enhances local development capability. When the population aggregation is lower than a preset threshold, a diversity compensation mechanism is triggered. Based on the current optimal individual position and boundary constraints, a new random walk individual is generated and injected into the population. The same number of individuals with the lowest fitness are eliminated to keep the population size constant. After the iteration terminates, the weight combination corresponding to the α wolf is output as the optimal weight combination to maintain population diversity, prevent premature convergence, and ensure the global optimality and stability of the final output weight combination.

[0008] A further improvement of the technical solution of the present invention is that: the step size of the Levy flight perturbation in the improved gray wolf algorithm is dynamically scaled by the Mantegna algorithm in combination with the ratio of the current iteration number to the maximum iteration number. The step size scaling factor is adjusted in the opposite direction with the population aggregation degree. The lower the aggregation degree, the larger the step size to enhance the global exploration capability. The initial value of the Tent chaotic map is determined by the variance of the weight base values ​​of each sub-energy system output by the fuzzy logic. The larger the variance, the stronger the chaotic disturbance amplitude, so as to cover a wider weight search space. The mutation probability of the Gaussian mutation operator decreases non-uniformly as the iteration progresses, and the mutation amplitude is adaptively adjusted according to an exponential distribution centered on the current best individual, so that the search in the later stage focuses on fine optimization of the optimal neighborhood, balancing global search and local potential tapping.

[0009] A further improvement to the technical solution of the present invention is that: S2 specifically includes: Using the output sequence of the dominant energy system as a benchmark, the real-time collected multi-source energy consumption data, environmental irradiance and environmental temperature are spliced ​​into a time-series input matrix and input into a trained long short-term memory network. Through the gating mechanism, long-range time-series dependencies are extracted, and the predicted energy consumption values ​​and their prediction confidence intervals for future multi-step steps are output. This achieves accurate capture of energy consumption change trends, provides reliable state prior information for subsequent filtering, and enhances the reliability of prediction. The predicted energy consumption is used as a priori input to the adaptive Kalman filter, and the real-time collected actual energy consumption is used as the measurement update. The innovation covariance is estimated online during the filter recursion process. The measurement noise covariance matrix is ​​dynamically adjusted by the exponential weighted moving average method, so that the filter gain adaptively tracks the signal change characteristics, enabling the filter to respond to signal changes in real time and improve the sensitivity of the filter output to the actual energy consumption. Based on the filtered innovation sequence, a residual chi-square test statistic is constructed to decompose the deviation of actual energy consumption from the predicted value into low-frequency slowly varying components and high-frequency abrupt changes. The low-frequency components are attributed to supply-side power output fluctuations, and the high-frequency components are attributed to demand-side random abrupt changes. The amplitude and duration parameters of the two types of disturbance characteristics are extracted respectively, so as to achieve accurate identification and quantification of the disturbance source and provide clear characteristic basis for the correction of the switching threshold.

[0010] A further improvement to the technical solution of the present invention is that: S2 further includes: A basic switching threshold vector is preset for each sub-energy system. This basic switching threshold vector includes a power increase switching threshold and a power decrease switching threshold. The amplitude of the power output fluctuation on the supply side is used as the dead zone adjustment factor. When the amplitude of the supply side fluctuation exceeds the set threshold, the basic switching threshold is offset proportionally in the positive direction to expand the switching dead zone, avoid false switching caused by supply side disturbances, and improve the system's operational stability under fluctuating conditions. Using the product of the magnitude and duration of random demand-side mutations as a sensitive adjustment factor, when the characteristics of demand-side mutations are significant, the basic switching threshold is negatively offset proportionally to reduce the switching dead zone. The switching threshold after correction by the two types of factors is used as the actual switching benchmark for the current control cycle, so that the switching decision can respond quickly to load mutations and significantly improve the system's tracking agility for sudden demands. The actual switching baseline is compared with the upper limit of the predicted confidence interval output by the long short-term memory network, and the lower limit of the predicted confidence interval is compared with the upper limit of the predicted confidence interval to generate the switching threshold boundary after dynamic clamping. This allows the control baseline to maintain tolerance for prediction uncertainty while tracking the actual operating conditions, thus balancing the operating condition tracking accuracy and prediction uncertainty tolerance of the switching threshold.

[0011] A further improvement to the technical solution of the present invention is that: S3 specifically includes: The corrected switching threshold, supply-side disturbance amplitude, demand-side disturbance amplitude, current output margin of each sub-energy system, and energy storage charge state are all normalized into a continuous state vector to construct a decision state space. A multi-layer fully connected network is used as the policy function approximator and value function approximator for near-end policy optimization to achieve a unified representation of multi-source heterogeneous state information and provide a complete environmental perception foundation for reinforcement learning. The strategy function approximator outputs Gaussian strategy parameters for the switching actions of each sub-energy system, including the mean vector and the logarithmic standard deviation vector. It constructs a continuous action probability distribution, performs single sampling based on the continuous action probability distribution to obtain candidate switching action vectors, and applies amplitude and rate of change limits to the candidate actions to ensure execution safety. It smooths the decision output into continuous probability actions, effectively avoiding the impact and oscillation of the actuator caused by hard switching. The sampled switching action vectors are linearly transformed and mapped to the actual output adjustment commands of each sub-energy system. A single fine-tuning switching operation is executed according to the adjustment command, and the system state transition trajectory before and after execution is recorded. The trajectory is stored in the experience cache for subsequent updates and iterations of the policy function, accumulating actual operating experience data to provide a sufficient and realistic source of training samples for continuous policy optimization.

[0012] A further improvement of the technical solution of the present invention is that: after the logarithmic standard deviation vector of the Gaussian policy is mapped to a positive value by the Softplus function, it is further multiplied by a dynamic scaling factor derived from the absolute value of the near-end policy optimization advantage function. When the advantage function fluctuates violently, the standard deviation is increased to increase the action exploration entropy. When the advantage function is stable, the standard deviation is reduced to solidify the optimal policy, thereby achieving an autonomous balance between exploration and utilization. Exploration is enhanced in the uncertain region of the policy, and stable output is achieved in the mature region. The mean vector of the Gaussian strategy is mapped to the interval [-1, 1] by the Tanh function, and then a bias correction term generated by the energy storage state of charge is superimposed. The closer the state of charge is to the boundary, the more the bias correction term tends to adjust in the opposite direction, forming a safety constraint-oriented switching offset, ensuring that the amplitude of the action increment is bounded while taking into account the safety of energy storage.

[0013] A further improvement to the technical solution of the present invention is that: S4 specifically includes: The steady-state energy consumption response data after each switching operation is collected, including the bus voltage recovery time, frequency deviation integral value and energy storage charge and discharge depth. The steady-state energy consumption response data is paired with the state vector before the current switching operation and used as a feedback sample input to the fuzzy logic module. This triggers the online correction of the fuzzy rule consequent parameters of the initial weight base value. The fuzzy rule is calibrated in reverse using the actual switching response quality to continuously improve the rationality of the initial weight output. Simultaneously, the real-time energy consumption sequence after switching is compared with the predicted innovation sequence of the adaptive Kalman filter, and the deviation between the actual value and the current estimated value of the innovation covariance is calculated. Based on the direction and magnitude of the deviation, the measurement noise covariance matrix of the filter is dynamically corrected through proportional-integral adjustment, so that the filter noise model always fits the actual statistical characteristics and maintains the long-term accuracy of disturbance identification. Every fixed number of control cycles, a batch of trajectory samples are extracted from the experience buffer to perform small-batch gradient updates on the policy network for near-end policy optimization. At the same time, a soft-target update method is used to synchronize the value network parameters, thereby realizing the gradual adaptive evolution of the control policy, achieving continuous self-optimization of the decision policy, and enhancing the long-term adaptability to the time-varying characteristics of the system.

[0014] A further improvement of the technical solution of the present invention is that: the soft target update method adopts Polyak averaging and the update coefficient is dynamically and adaptively adjusted with the rate of change of the policy network loss function. When the loss function continuously decreases, the update coefficient is increased to accelerate value network tracking. When the loss function oscillates, the update coefficient is decreased to suppress value network fluctuations, thereby realizing the autonomous and stable adjustment of value network update. The ratio of the batch size of the mini-batch gradient update to the capacity of the experience buffer is adjusted by the current policy entropy value. When the entropy value is higher than the set upper limit, the sampling batch is increased to make full use of historical experience for stable updates. When the entropy value is lower than the set lower limit, the sampling batch is decreased to focus on recent new experience to improve policy freshness, thereby achieving a balanced scheduling of exploration and utilization.

[0015] Due to the adoption of the above technical solution, the technical progress achieved by this invention compared to the prior art is as follows: 1. This invention provides an energy optimization control method based on real-time energy consumption prediction. It quantifies the differences in response rates and historical tuning deviations of each sub-energy system through fuzzy logic, generates initial weight base values, and combines an improved gray wolf algorithm with an embedded population diversity compensation strategy to quickly search for the optimal weight combination in the weight space. This allows the dominant energy system to be locked in a very short time after startup and the auxiliary output quota to be reasonably allocated, reducing the output deviation during the startup phase and improving the stability and reliability of the multi-energy system startup process.

[0016] 2. This invention provides an energy optimization control method based on real-time energy consumption prediction. It uses a long short-term memory network to model the long-term time-series dependence of real-time energy consumption data, accurately predicts the energy consumption drift trend, and simultaneously couples an adaptive Kalman filter to correct the residual covariance online. This method can separate the two different types of disturbances: supply-side output fluctuations and demand-side random mutations. It enables the control benchmark to track the actual operating conditions of the system in real time, avoiding the distortion of the correction benchmark caused by the feedback loop's inability to identify the source of disturbances.

[0017] 3. This invention provides an energy optimization control method based on real-time energy consumption prediction. The modified switching threshold and the stripped disturbance characteristics are jointly encoded into a decision state space. The continuous probability distribution of the switching actions of each sub-energy system is optimized by using a near-end strategy. A single robust switching is executed by probability sampling, replacing the traditional hard switching logic. This eliminates the frequent back-and-forth probing behavior induced by the non-convex inflection point characteristics of the marginal cost curves of each energy source, and significantly improves the response quality of the system under critical conditions. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0019] Figure 1 This is a schematic diagram illustrating the workflow of the energy optimization control method based on real-time energy consumption prediction according to the present invention. Figure 2 This is a schematic diagram of the method flow of the energy optimization control method based on real-time energy consumption prediction of the present invention. Detailed Implementation

[0020] 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 only some embodiments of the present invention, 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.

[0021] Example 1, as Figure 1 , Figure 2 As shown, this invention provides an energy optimization control method based on real-time energy consumption prediction, comprising the following steps: S1: Collect limited real-time energy consumption data of the target multi-energy system during the initial startup phase. Utilize fuzzy logic to quantify the response rate and historical tuning deviation of each sub-energy system, generating initial weight base values. Introduce an improved Grey Wolf algorithm with an embedded population diversity compensation strategy to search for the optimal weight combination in the weight space, quickly identifying the dominant energy system during startup, reducing startup offset, overcoming the blindness in parameter tuning caused by limited data in the initial startup phase, significantly shortening the time for identifying the dominant energy system, and reducing the output deviation amplitude during startup. Collect the instantaneous power, voltage fluctuation rate, and temperature change rate of each sub-energy system within a preset time window after startup as limited real-time energy consumption data, constructing an input feature vector. Use a fuzzy logic rule base to divide the response rate into three membership levels: fast, medium, and slow, and the historical tuning deviation into three membership levels: small, medium, and large. Defuzzify the output using the centroid method to output the initial weight base values ​​of each sub-energy system, achieving rapid response characteristic quantification under limited data in the initial startup phase. To provide a reasonable starting center for subsequent weight search, the initial weight base value is used as the cluster center of the initial population of the improved Grey Wolf algorithm. Tent chaotic mapping is used to generate uniformly distributed weight individuals. During the iteration process, the population aggregation degree is calculated. When the population aggregation degree is lower than the preset threshold, Levy flight perturbation is triggered. The new individuals after perturbation are sorted according to fitness to replace the current worst individual, compensating for population diversity. Tent mapping refers to tent mapping, which effectively avoids premature homogenization of the population, maintains search vitality, and reduces the risk of getting trapped in local optima. The weighted product of comprehensive energy supply reliability and unit energy consumption output ratio is used as the fitness function to drive the improved Grey Wolf algorithm to iteratively search for the optimal weight combination. According to the final weight ranking result, the sub-energy system with the highest weight is selected as the dominant energy system in the start-up phase. The other sub-energy systems are allocated auxiliary power quotas according to their weight ratios to ensure the rationality and priority of power allocation in the start-up phase, laying a stable power output benchmark for subsequent working condition tracking. It should be noted that the data acquisition window duration is set to 30 seconds after startup, the data sampling frequency is 100 Hz, the instantaneous power unit is kilowatts, the voltage fluctuation rate is expressed as a percentage, and the temperature change rate unit is degrees Celsius per second. For the membership function of the response rate, the fast level corresponds to a power ramp-up time of less than 500 milliseconds, the medium level corresponds to 500 milliseconds to 2 seconds, and the slow level corresponds to more than 2 seconds. For historical setting deviation, small deviation refers to a deviation from the rated output of less than 5%, medium deviation refers to a deviation between 5% and 15%, and large deviation refers to a deviation greater than 15%. The fuzzy rule base contains a total of nine inference rules, covering all combinations of response rate and historical setting deviation. The consequent of each rule is the weight adjustment of the corresponding sub-energy system. When defuzzifying using the centroid method, the continuous region enclosed by the output membership function curve and the horizontal axis is traversed. The abscissa value of the geometric centroid of this region is calculated, and this abscissa value is used as the initial weight base value of the sub-energy system. The population size of the improved gray wolf algorithm is set to 30 individuals, with a maximum iteration count of 200. Each individual is encoded as a real vector with a dimension equal to the number of sub-energy systems. The initial value of the Tent chaotic mapping is determined by the variance of the weight base values ​​of each sub-energy system output by the fuzzy logic. When the variance is greater than 0.15, a strong chaotic perturbation amplitude is used; when the variance is less than 0.05, a weak chaotic perturbation amplitude is used to ensure the uniformity of the initial population traversal in the weight space. The population aggregation degree is calculated as follows: The normalized clustering index is obtained by averaging the Euclidean distances between all pairs of individuals in the current population and dividing it by the Euclidean diameter of the weight space. This index ranges from 0 to 1, with a preset trigger threshold of 0.35. When the clustering falls below this threshold, the Levy flight perturbation mechanism is triggered. The Mantegna algorithm generates a random step size following a Levy stable distribution. This step size is superimposed with the position vector of the current best individual to generate a new individual. New individuals must undergo boundary constraint checks and weight normalization before being injected into the population. Each round of perturbation generates 10% of the current population size, i.e., 3 new individuals, replacing an equal number of individuals with the lowest fitness. The comprehensive energy supply reliability index consists of three sub-indicators. Weighted synthesis: the percentage of time the bus voltage is maintained within ±5% of the rated value, the percentage of time the system frequency is maintained within 50 Hz ± 0.2 Hz, and the safety margin of each sub-energy system's output not exceeding its rated capacity. The unit energy consumption output ratio is defined as the ratio of the active power output by each sub-energy system per unit time to the primary energy consumed or the energy released by the energy storage. The weight of the reliability index in the fitness function is set to 0.6, and the weight of the unit energy consumption output ratio is set to 0.4, reflecting the scheduling principle that system stability takes precedence over economy. In each iteration of the improved gray wolf algorithm, the position of each wolf is updated according to the convergence factor. The convergence factor adopts a nonlinear decay strategy, linearly decaying from the initial value of 2.0 to the termination value of 0.1. The first 100 iterations are the global exploration phase, and the next 100 iterations are the local development phase. After the algorithm terminates, it outputs the corresponding weight combination. The values ​​of each dimension in this combination represent the scheduling priority weight of the corresponding sub-energy system. The sub-energy system with the highest weight value is selected as the dominant energy system to undertake the basic load output, and the remaining sub-energy systems are allocated auxiliary output quotas according to the proportion of their respective weights to the sum of the remaining weights. Furthermore, S1 also includes: setting the gray wolf population size and maximum number of iterations; encoding each individual as a multi-dimensional real vector containing the weight values ​​of each sub-energy system; applying weight normalization constraints; using Tent chaotic mapping to replace random initialization to enhance the ergodicity of the initial population; employing a nonlinear decaying convergence factor in the early stages of iteration to expand the global search range, effectively improving the coverage uniformity of the initial solution space, enhancing the early global exploration capability, and avoiding getting trapped in local regions; recording the top three individuals as α, β, and δ wolves in each iteration; calculating the position update vectors of the remaining individuals relative to the three; and introducing dynamic weight coefficients to improve the position update formula from equal-weighted average to... Weighting by fitness ratio makes the position update direction more optimal. At the same time, Gaussian mutation operator is introduced in the later stage of iteration to perform neighborhood perturbation on the best individual, strengthen the guiding role of excellent individuals, and improve convergence speed and accuracy. Fine-tuning in the later stage enhances local development capability. When the population aggregation degree is lower than the preset threshold, a diversity compensation mechanism is triggered. Based on the current best individual position and boundary constraints, a new random walk individual is generated, injected into the population, and the same number of individuals with the lowest fitness are eliminated to keep the population size constant. After the iteration terminates, the weight combination corresponding to α wolf is output as the optimal weight combination to maintain population diversity, prevent premature convergence, and ensure the global optimality and stability of the final output weight combination. It should be noted that the population size of the Grey Wolf optimization algorithm is fixed at 30 individuals, and the maximum number of iterations is set to 200. Extensive offline simulations have verified that the parameters achieve an optimal balance between search accuracy and computational time. Each individual is encoded as a real-number vector with a dimension equal to the total number of sub-energy systems. Each dimension of the vector represents the scheduling weight value of the corresponding sub-energy system, with values ​​limited to between 0.05 and 0.70. A sum-normalization constraint is applied to ensure that the sum of the values ​​of each dimension equals 1. In the initialization phase, the traditional random initialization method is abandoned, and the initial population is generated using a Tent chaotic mapping. The initial value of this mapping is determined by the variance of the weight base values ​​of each sub-system output by the fuzzy logic. When the variance value is greater than... A strong chaotic perturbation amplitude is used when the variance is 0.15, and a weak chaotic perturbation amplitude is used when the variance is less than 0.05. This ensures that the initial individuals have good traversal uniformity in the weight space and avoids the phenomenon of individual clustering caused by random initialization. The convergence factor adopts a nonlinear decay strategy, decaying exponentially from the initial value of 2.0 to the final value of 0.1. The first 100 iterations maintain a high decay rate to expand the global search range, and the last 100 iterations slow down the decay rate to promote local fine search. After each iteration, the fitness values ​​of all 30 individuals in the current population are calculated immediately. They are sorted from high to low fitness, and the individuals ranked first, second, and third are labeled as α wolf, β wolf, and δ wolf, respectively. For the remaining 27 individuals (excluding α, β, and δ wolves), their position update vectors relative to α, β, and δ wolves are calculated. Dynamic weighting coefficients are introduced, determined by the proportion of each α, β, and δ wolf's fitness value to the sum of their fitness values. Individuals with higher fitness are assigned greater weights, prioritizing position updates towards these better individuals. In the later stages of iteration (after more than 150 iterations), a Gaussian mutation operator is applied to the α wolf individual for neighborhood perturbation. The mutation probability is set to 0.3, and the standard deviation of the mutation amplitude is set to 0.02, which is less than 1% of the weight space. Simultaneously, the mutation probability linearly decreases from 0.3 to 0.05 as iterations progress. The population aggregation degree is calculated by... The Euclidean distances between all 30 individuals are averaged and then divided by the Euclidean diameter of the weight space to obtain the normalized clustering index. The preset trigger threshold is set to 0.35. When the calculated normalized clustering is lower than this threshold, it indicates that the individuals in the population tend to be homogeneous, and the risk of the search getting trapped in a local optimum increases significantly. At this time, the diversity compensation mechanism is triggered. A new individual is generated based on the current position vector of the α wolf and the random walk step size. The random walk step size is obtained by multiplying a random number that follows a Levy stable distribution generated by the Mantegna algorithm by the step size scaling factor. The scaling factor is inversely proportional to the current clustering, that is, the lower the clustering, the larger the step size. After the new individual is generated, it needs to go through a period of 0.05 to 0.Boundary constraint checks and sum-normalization are performed on individuals with a fitness level of 70. The number of new individuals generated in each round of perturbation is fixed at 10% of the current population size, i.e., 3. After injecting these 3 new individuals into the population, the 3 individuals with the lowest fitness ranking are eliminated to maintain a constant population size of 30. The iteration terminates when the maximum number of iterations (200) is reached. After termination, the weight vector corresponding to the α wolf is output as the optimal weight combination. The values ​​of each dimension in the optimal weight combination represent the scheduling priority weights of the corresponding sub-energy systems. The sub-energy system with the highest weight value is selected as the dominant energy system to bear the basic load output. Furthermore, in the improved Grey Wolf algorithm, the step size of the Levy flight perturbation is dynamically scaled by the Mantegna algorithm based on the ratio of the current iteration number to the maximum iteration number. The step size scaling factor is adjusted inversely with the population aggregation degree; the lower the aggregation degree, the larger the step size to enhance global exploration capabilities and achieve adaptive adjustment of the perturbation amplitude. This effectively escapes local extreme value regions when the population is highly homogeneous. The initial value of the Tent chaotic mapping is determined by the variance of the weight base values ​​of each sub-energy system output by fuzzy logic. The larger the variance, the stronger the chaotic perturbation amplitude to cover a wider weight search space. This makes the initial population distribution closely match the weight distribution characteristics, significantly improving the comprehensiveness of traversal in the early stages of the search. The mutation probability of the Gaussian mutation operator decreases non-uniformly with the iteration process, and the mutation amplitude is adaptively adjusted exponentially with the current best individual as the center. This allows the search to focus on fine optimization of the optimal neighborhood in the later stages, balancing global search and local potential mining. The optimal neighborhood is refined in the later stages, improving the engineering practicality of the optimal solution.

[0022] S2: Based on a locked dominant energy system, this system couples a Long Short-Term Memory (LSTM) network with an adaptive Kalman filter. The LSM network models long-range time-series dependencies in real-time energy consumption data to predict energy consumption drift trends. Simultaneously, the adaptive Kalman filter corrects residual covariance online, separating supply-side output fluctuations and demand-side random abrupt changes. Based on the separation results, the switching threshold for optimized control is adjusted, enabling the control benchmark to track the actual system operating conditions in real time. This achieves accurate prediction of energy consumption trends and precise location of disturbance sources, ensuring the switching threshold always aligns with the actual system operating state and improving the tracking accuracy of the control benchmark. Using the output sequence of the dominant energy system as a benchmark reference, real-time collected multi-source energy consumption data, environmental irradiance, and environmental temperature are concatenated into a time-series input matrix, which is then input into the trained LSM network. A gating mechanism extracts long-range time-series dependencies, outputting future multi-step energy consumption predictions and their prediction confidence intervals. To accurately capture energy consumption trends and provide reliable prior information for subsequent filtering, thereby enhancing prediction reliability, the system uses predicted energy consumption as a priori input to an adaptive Kalman filter and real-time collected actual energy consumption as a measurement update. During the filtering recursion process, the innovation covariance is estimated online, and the measurement noise covariance matrix is ​​dynamically adjusted using an exponentially weighted moving average method. This enables the filter gain to adaptively track signal mutation characteristics, allowing the filter to respond to signal mutations in real time and improving the sensitivity of the filter output to actual energy consumption. Based on the filter innovation sequence, a residual chi-square test statistic is constructed, decomposing the deviation of actual energy consumption from the predicted value into low-frequency slowly varying components and high-frequency abrupt components. The low-frequency components are attributed to supply-side output fluctuations, and the high-frequency components are attributed to demand-side random mutations. The amplitude and duration parameters of the two types of disturbances are extracted respectively, enabling accurate identification and quantification of disturbance sources and providing clear characteristic basis for switching threshold correction. It should be noted that the Long Short-Term Memory (LSTM) network adopts a two-layer stacked structure, with 128 neurons in the hidden layer and a time step of 30 sampling points corresponding to a 3-second historical sequence length. During network training, an adaptive moment estimation optimizer is used, with an initial learning rate of 0.001, which decays to 90% of the current rate every 50 training epochs. The maximum number of training epochs is set to 500, and an early stopping mechanism is introduced to prevent overfitting. The prediction output layer uses a fully connected structure, outputting the energy consumption prediction value for the next 5 steps (500 milliseconds). Simultaneously, a Monte Carlo dropout method is used to run 50 forward propagations at a dropout rate of 0.2, and the mean of the prediction results is taken as the final prediction value, twice the standard deviation. As the upper and lower boundaries of the 95% confidence interval, the network input matrix is ​​fixed in the order of three channels: energy consumption, irradiance, and temperature. Each channel's data undergoes Z-score standardization before input. The standardization parameters are derived from data collected within the first 30-second window after startup and are fixed for all subsequent predictions. Network weights are fine-tuned offline every 24 hours using accumulated daily data. During fine-tuning, a sliding window method is used to select the most recent 72 hours' worth of data as the training set to ensure the network always tracks the latest dynamic characteristics of the system. The state transition matrix of the adaptive Kalman filter is set to an identity matrix, and the control input matrix is ​​set according to the output adjustment rate of the dominant energy system. The initial value of the process noise covariance matrix is ​​set to 0.1. The initial value of the process noise covariance matrix is ​​set to a diagonal matrix with diagonal elements of 0.01. The initial value of the measurement noise covariance matrix is ​​set to 0.05. The forgetting factor for the exponentially weighted moving average is set to 0.95, ensuring that the response time constant of the noise covariance update to recent information is approximately 20 sampling periods (200 milliseconds). The sampling period for the filter recursion is consistent with the data acquisition frequency at 10 milliseconds. Each sampling period performs a two-step recursion: prediction and update. In the measurement update step, the dynamic adjustment of the Kalman gain depends entirely on the real-time estimated measurement noise covariance. When a sudden signal change causes an increase in information, the estimated measurement noise covariance increases accordingly. The Kalman gain is increased accordingly to enable the filter output to track the measured value faster. The initial state vector of the filter is set by the average measured energy consumption of the first 100 sampling points after startup. The initial value of the state estimation error covariance matrix is ​​set to 0.01 times the identity matrix to ensure fast convergence characteristics in the early stage of filtering. The sliding window length of the residual chi-square test is set to 50 sampling points, i.e., 500 milliseconds, and the significance level is set to 0.05. The corresponding chi-square distribution critical value is determined by the degree of freedom equal to the window length. The bias decomposition adopts a parallel structure of a first-order low-pass filter and a high-pass filter. The cutoff frequency of the low-pass filter is set to 0.5 Hz, and the cutoff frequency of the high-pass filter is also set to 0 Hz.5 Hz, the two complement each other to separate low-frequency and high-frequency components. The low-frequency component is identified as supply-side power output fluctuations, which must meet the following conditions: the absolute value of its rate of change is less than 2% of the rated power per second and the duration is more than 2 seconds. The high-frequency component is identified as demand-side random mutations, which must meet the following conditions: the absolute value of its rate of change is greater than 10% of the rated power per second and the duration is less than 500 milliseconds. The amplitude is extracted using the peak detection method. For the low-frequency component, the peak value within the sliding window is extracted as the fluctuation amplitude. For the high-frequency component, the amplitude jump at the start and end points of the mutation is extracted as the mutation amplitude. The duration parameter is the time for the low-frequency component to rise and cross the rated value ±3% dead zone and fall back into the dead zone. For the high-frequency component, the duration for the mutation is the time from triggering to recovering to the steady-state value within ±5%. Furthermore, S2 also includes: a preset basic switching threshold vector for each sub-energy system, which includes a power increase switching threshold and a power decrease switching threshold. The amplitude of supply-side output fluctuations is used as a dead-zone adjustment factor. When the amplitude of supply-side fluctuations exceeds a set threshold, the basic switching threshold is proportionally shifted positively to expand the switching dead zone, avoiding erroneous switching caused by supply-side disturbances and improving the system's operational stability under fluctuating conditions. The product of the amplitude and duration of random demand-side mutations is used as a sensitive adjustment factor. When demand-side mutations are significant, the basic switching threshold is proportionally shifted negatively. The threshold is changed to reduce the switching dead zone. The switching threshold after correction by two types of factors is used as the actual switching benchmark for the current control cycle, so that the switching decision can respond quickly to load changes and significantly improve the system's tracking agility to sudden demands. The actual switching benchmark is calculated by taking the larger value of the upper limit of the prediction confidence interval output by the long short-term memory network and the smaller value of the lower limit of the prediction confidence interval to generate the switching threshold boundary after dynamic clamping. This allows the control benchmark to maintain tolerance for prediction uncertainty while tracking the actual operating conditions, and to balance the operating condition tracking accuracy and prediction uncertainty tolerance of the switching threshold. It should be noted that power increase and power decrease switching thresholds are pre-set based on the equipment nameplate parameters and historical operating data of each sub-energy system. These thresholds are initially set at 12% of the rated output of each sub-system, with the energy storage system's base threshold set separately at 8% of the rated output. The specific values ​​need to be determined through step response tests during the pre-commissioning phase. In actual operation, when the amplitude of the low-frequency fluctuation component on the supply side separated by the adaptive Kalman filter exceeds 2% of the rated power for three consecutive sampling cycles, the dead-zone adjustment program is activated, gradually increasing the switching threshold according to the ratio of the excess fluctuation amplitude to the rated power. The single upward adjustment is limited to 15% of the base threshold, and the cumulative upward adjustment must not exceed 30% of the base threshold. When a high-frequency mutation component is detected within the residual chi-square test window, and the absolute value of the rate of change of this high-frequency mutation component exceeds 10% per second of the rated power, a significant random mutation is determined to have occurred on the demand side. At this time, the product of the mutation amplitude and duration is used as a sensitive adjustment factor to trigger the threshold fast response procedure. When the product value exceeds the product of the rated power and 0.1 seconds, negative offset adjustment is initiated. The adjustment amplitude is dynamically determined according to the magnitude of the mutation energy. To ensure system stability, the single negative offset amplitude is limited to 20% of the base threshold, and the cumulative negative offset is limited to 30% of the base threshold. The amount must not exceed 40% of the base threshold. The actual switching threshold after offset takes effect immediately after the next sampling period (10 milliseconds), rapidly tightening the switching judgment condition to capture sudden load changes and continuously tracking the attenuation of the mutation component. When the mutation amplitude falls back to within 3% of the rated power and has not been triggered again for 50 sampling periods (500 milliseconds), the threshold is gradually restored to the level before correction, with a recovery rate of 5% every 100 milliseconds. After completing the correction of the two types of factors, the obtained actual switching baseline value is dynamically clamped against the upper and lower boundaries of the future 500 millisecond prediction confidence interval output by the Long Short-Term Memory Network at the current moment. The clamping logic is as follows: If the corrected rise threshold is lower than the upper limit of the prediction confidence interval, the upper limit is used as the final rise switching boundary; otherwise, the correction value remains unchanged. Similarly, if the corrected fall threshold is higher than the lower limit of the prediction confidence interval, the lower limit is used as the final fall switching boundary; otherwise, the correction value remains unchanged. The clamping mechanism uses the statistical confidence boundary obtained by running 50 forward propagations using the Monte Carlo dropout method to ensure that the switching benchmark tracks the actual operating conditions while reserving a fault tolerance space of about two standard deviations for the inherent uncertainty of the LSTM prediction model. The final switching threshold after clamping will be used as the state input parameter of the proximal policy optimization decision module in the current control cycle.

[0023] S3: The corrected switching threshold and the stripped disturbance features are jointly encoded into the decision state space. Reinforcement learning training is carried out using near-end policy optimization to output the continuous probability distribution of the switching actions of each sub-energy system. A single robust switching is executed in a probabilistic sampling manner to replace the traditional hard switching logic, suppress the back-and-forth probing and oscillation in the critical interval, effectively eliminate the frequent switching oscillation in the critical interval, improve the smoothness of system output, and reduce the risk of fatigue damage to the actuator.

[0024] S4: Feedback the switching results and subsequent energy consumption responses of each operation to the fuzzy logic and Kalman filter respectively, update the weight benchmark and noise covariance, continuously fine-tune and optimize the control strategy, realize the adaptive evolution of the control strategy, ensure the robustness of energy optimization control and energy storage cycle life, form a closed-loop self-evolving control system, continuously improve the decision quality under complex operating conditions, and extend the recyclable life of energy storage equipment.

[0025] Example 2, as Figure 1 , Figure 2 As shown, based on Embodiment 1, this invention provides a technical solution: S3 specifically includes: normalizing the corrected switching threshold, supply-side disturbance amplitude, demand-side disturbance amplitude, current output margin of each sub-energy system, and energy storage state of charge into a continuous state vector to construct a decision state space; using a multi-layer fully connected network as the policy function approximator and value function approximator for near-end policy optimization to achieve a unified representation of multi-source heterogeneous state information, providing a complete environmental perception foundation for reinforcement learning; the policy function approximator outputs Gaussian policy parameters for the switching actions of each sub-energy system, including the mean vector and the logarithmic standard deviation vector, to construct the continuous action probability. Based on the probability distribution of continuous actions, candidate switching action vectors are obtained by single sampling. Amplitude and rate of change limits are applied to the candidate actions to ensure execution safety. The decision output is smoothed into continuous probability actions, effectively avoiding the impact and oscillation of the actuator caused by hard switching. The sampled switching action vectors are linearly transformed and mapped to the actual output adjustment instructions of each sub-energy system. Single fine-tuning switching operations are performed according to the adjustment instructions, and the system state transition trajectory before and after execution is recorded. The trajectory is stored in the experience cache for subsequent updates and iterations of the strategy function, accumulating actual operation experience data and providing a sufficient and real source of training samples for continuous strategy optimization. It should be noted that the decision state space consists of seven continuous state variables, including the final upward switching threshold, the final downward switching threshold, the supply-side fluctuation amplitude, the demand-side mutation amplitude, the duration of the demand-side mutation, the output margin vector of each subsystem, and the energy storage state of charge. The state vectors are normalized before being input into the policy network. The switching threshold is expressed as a percentage of rated power, the disturbance amplitude is expressed as a percentage of rated power, the output margin is expressed as a percentage, and the energy storage state of charge is expressed as a percentage, ensuring that all state variable values ​​are within a uniform dimension. Both the policy function approximator and the value function approximator adopt a three-layer fully connected network structure, with each layer containing 256 neurons. The activation function is a hyperbolic tangent to maintain the boundedness of the output. Orthogonal initialization is used for network weights to accelerate convergence in the early training stages. Bias terms are uniformly initialized to zero. The policy network and value network share the parameters of the first two layers. The third layer outputs the action probability distribution parameters and state value estimates, respectively. The output layer dimension of the policy function approximator is twice the number of sub-energy systems. The first half outputs the mean vector of each sub-energy system's actions, and the second half outputs the logarithmic standard deviation vector of each sub-energy system's actions. The mean vector is mapped to the -1 to +1 interval using a hyperbolic tangent, representing the direction and magnitude of the output adjustment of each sub-energy system. The logarithmic standard deviation vector is mapped using a Sof... The tplus function is converted into a positive standard deviation to characterize the uncertainty of the actions of each sub-energy system. The constructed Gaussian distribution has a diagonal covariance structure. After independent sampling of each dimension, candidate switching action vectors are formed. The value of each dimension in the action vector corresponds to the normalized amplitude of the power adjustment of the corresponding sub-energy system. This value is multiplied by 10% of the rated power of the sub-energy system to obtain the actual adjusted power value. The amplitude limit is set to no more than 5% of the rated power in a single adjustment to prevent the actuator from being subjected to excessive impact. The rate of change limit is set to no more than 1% of the rated power in each sampling period to ensure that the power change is gradual. For energy storage systems, additional state of charge boundary constraints are applied. When the state of charge is high... Positive adjustments are prohibited when the power level is 90% and negative adjustments are prohibited when it is below 10%, ensuring that energy storage operates within a safe range. When the sampled action vector is linearly transformed into an actual output adjustment command, for renewable energy subsystems including photovoltaic and wind power systems, only downward adjustments to the output limit are allowed, and upward adjustments beyond the maximum available output corresponding to the current maximum power point are not permitted. This constraint is achieved by setting the positive adjustment amount in the corresponding dimension to zero. For dispatchable power sources such as diesel generators and gas turbines, bidirectional adjustments are allowed, but the adjustment step size is limited by the unit ramp rate constraint. The actual ramp rate is limited to no more than 20% of the rated output per minute, which translates to approximately 0% of the rated output per 10-millisecond sampling period.0.33%; For energy storage systems, bidirectional adjustment is allowed and the response rate is not limited by the ramp rate, but is constrained by the state of charge boundary. Adjustment commands are sent to the local controllers of each sub-energy system via the fieldbus at a frequency of 10 milliseconds. The local controllers execute output adjustment according to the commands and feed back the actual response values. Before execution, the complete state vector at the current moment is recorded. After execution, a new state vector and the obtained instant reward signal are recorded after waiting for one sampling period, i.e., 10 milliseconds. The reward signal is a weighted synthesis of three parts: the absolute value of the energy supply deviation, the degree of deviation of the energy storage state of charge from the ideal range, and the output adjustment amplitude. The state transition quintuple is stored in the experience buffer. Furthermore, after the logarithmic standard deviation vector of the Gaussian strategy is mapped to a positive value by the Softplus function, it is further multiplied by a dynamic scaling factor derived from the absolute value of the near-end strategy optimization advantage function. When the advantage function fluctuates drastically, the standard deviation is increased to increase the action exploration entropy; when the advantage function is stable, the standard deviation is reduced to solidify the optimal strategy, achieving an autonomous balance between exploration and utilization. This enhances exploration in the uncertain region of the strategy and stabilizes output in the mature region. After the mean vector of the Gaussian strategy is mapped to the [-1, 1] interval by the Tanh function, a bias correction term generated by the energy storage state of charge is superimposed. The closer the state of charge is to the boundary, the more the bias correction term tends to adjust in the opposite direction, forming a safety constraint-oriented switching offset. This ensures that the action increment amplitude is bounded while taking into account energy storage safety, embedding the energy storage safety boundary into the decision-making process, actively avoiding the risks of overcharging and over-discharging, and extending the cycle life of energy storage equipment.

[0026] S4 specifically includes: collecting steady-state energy consumption response data after each switching operation, including bus voltage recovery time, frequency deviation integral value, and energy storage charge / discharge depth; pairing the steady-state energy consumption response data with the state vector before the current switching operation, and inputting it as a feedback sample to the fuzzy logic module to trigger online correction of the fuzzy rule consequent parameters of the initial weight base value; using the actual switching response quality to calibrate the fuzzy rules in reverse, continuously improving the rationality of the initial weight output; comparing the real-time energy consumption sequence after switching with the predicted innovation sequence of the adaptive Kalman filter, calculating the deviation between the actual value and the current estimated value of the innovation covariance; dynamically correcting the measurement noise covariance matrix of the filter through proportional-integral adjustment based on the direction and magnitude of the deviation, so that the filter noise model always fits the actual statistical characteristics, maintaining the long-term accuracy of disturbance identification; every fixed number of control cycles, extracting batch trajectory samples from the experience buffer to perform small-batch gradient updates on the policy network of the near-end policy optimization; and simultaneously using a soft target update method to synchronize the value network parameters, realizing the gradual adaptive evolution of the control strategy, achieving continuous self-optimization of the decision strategy, and enhancing the long-term adaptability to the time-varying characteristics of the system. It should be noted that steady-state response data is continuously collected for 100 sampling periods (1000 milliseconds) after each switching operation. The bus voltage recovery time is defined as the time required for the voltage to return to within ±5% of the rated value and remain there for more than 20 sampling periods from the moment of the disturbance. The frequency deviation integral value is obtained by performing a trapezoidal integral on the absolute value of the frequency deviation of the 50 Hz reference over the recovery period. The energy storage charge / discharge depth records the absolute value of the change in the energy storage state of charge before and after the switching operation. These three sets of data, together with the state vector stored before the switching, constitute a complete feedback sample. This sample is input into the fuzzy logic module in batches of 10 switching operations, triggering the online processing of the parameters of the original nine fuzzy rules. The correction process employs an incremental learning strategy, where the adjustment magnitude of the consequent parameters by new samples is added to the original parameters at a learning rate of 0.3. A single correction cap of 0.05 is set to prevent sudden parameter changes that could lead to control instability. The corrected consequent rules will directly affect the initial weight base value output in subsequent startup phases or restart scenarios. After each switching operation, real-time energy consumption data within 200 sampling periods (2000 milliseconds) after the switching is extracted and compared point-by-point with the filtered prediction value. The covariance of the actual innovation sequence is calculated and then compared with the estimated covariance of the measurement noise currently used by the filter. This deviation value is directly responded to by a proportional gain with a scaling factor of 0.6 and simultaneously enters the integration phase, with the integration time constant set to [value missing]. One hundred sampling periods are used to eliminate steady-state residuals. The output of the proportional-integral control is updated every 10 sampling periods to the measurement noise covariance matrix, but the magnitude of each update is limited to ±10% of the current estimate to prevent sudden changes in filter gain. The real-time correction mechanism ensures that the filter can continuously track the actual statistical characteristics of the measurement noise when faced with changes in system dynamics caused by switching operations, ensuring that the statistical validity of the chi-square test for innovation in subsequent disturbance separation is not affected by noise model mismatch, and maintaining the accuracy of supply-side and demand-side disturbance identification. A mini-batch sample set is formed by randomly selecting 64 state transition quintuples from the empirical buffer every 50 control periods (500 milliseconds). The gradient update of the shearing objective function is performed on the proximal policy optimization of the policy network parameters. The shearing parameter is set to 0.2, and the learning rate is the same as the initial value of 0.001 and kept constant during the update process to avoid training instability. The value network parameters are updated using a soft objective method, that is, the current value network parameters and the target value network parameters are averaged with a soft update coefficient of 0.005, which makes the update trajectory of value estimation smoother and more continuous. The update operation is repeated in each interval of continuous operation without a termination condition, so that the control policy has continuous adaptive evolution capability, maintains the optimality and robustness of the switching decision, and the updated policy network parameters are immediately used for the decision of the next control cycle. Furthermore, the soft target update method employs Polyak averaging, with the update coefficient dynamically and adaptively adjusted according to the rate of change of the policy network loss function. When the loss function continuously decreases, the update coefficient is increased to accelerate value network tracking; when the loss function oscillates, the update coefficient is decreased to suppress value network fluctuations, achieving autonomous and stable adjustment of value network updates. This accelerates convergence when training is smooth and suppresses oscillations when there are fluctuations. The ratio of the batch size to the capacity of the experience buffer in mini-batch gradient updates is adjusted by the current policy entropy value. When the entropy value is higher than the set upper limit, the sampling batch is increased to make full use of historical experience for stable updates; when the entropy value is lower than the set lower limit, the sampling batch is decreased to focus on recent new experience to improve policy freshness, achieving a balanced scheduling of exploration and utilization. This dynamically adjusts the composition ratio of training samples, taking into account both the utilization of historical experience and the injection of recent fresh experience, maintaining the continuous adaptability of the policy.

[0027] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An energy optimization control method based on real-time energy consumption prediction, characterized in that, Includes the following steps: S1: Collect limited real-time energy consumption data of the target multi-energy system at the initial stage of startup, use fuzzy logic to quantify the response rate and historical tuning deviation of each sub-energy system, generate initial weight base values, introduce an improved gray wolf algorithm with embedded population diversity compensation strategy, search for the optimal weight combination in the weight space, and quickly lock the dominant energy system in the startup stage. S2: Based on the locked dominant energy system, a long short-term memory network is coupled with an adaptive Kalman filter. The long short-term memory network is used to model the long-term time-series dependence of real-time energy consumption data, predict the energy consumption drift trend, and simultaneously correct the residual covariance online through the adaptive Kalman filter. The two types of disturbance characteristics, namely the power output fluctuation on the supply side and the random change on the demand side, are separated, and the switching threshold of the optimization control is corrected. S3: The corrected switching threshold and the stripped perturbation features are jointly encoded into the decision state space. Reinforcement learning training is performed using near-end policy optimization to output the continuous probability distribution of the switching action of each sub-energy system and execute a single robust switching. S4: Feed back the switching results and subsequent energy consumption response to the fuzzy logic and Kalman filter respectively, update the weight benchmark and noise covariance, and continuously fine-tune and optimize the control strategy.

2. The energy optimization control method based on real-time energy consumption prediction according to claim 1, characterized in that: S1 specifically includes: The instantaneous power, voltage fluctuation rate, and temperature change rate of each sub-energy system within the preset time window after startup are collected as limited real-time energy consumption data. Input feature vectors are constructed, and the response rate is divided into three membership levels (fast, medium, and slow) using a fuzzy logic rule base. Historical tuning deviations are divided into three membership levels (small, medium, and large). The initial weight base values ​​of each sub-energy system are output by defuzzifying using the centroid method. The initial weight base value is used as the cluster center of the initial population of the improved gray wolf algorithm. Tent chaotic mapping is used to generate uniformly distributed weight individuals. During the iteration process, the population aggregation degree is calculated. When the population aggregation degree is lower than the preset threshold, Levy flight perturbation is triggered. The new individuals after perturbation are sorted by fitness to replace the current worst individual to compensate for population diversity. Here, Tent mapping refers to tent mapping. The fitness function is the weighted product of the overall energy supply reliability and the unit energy consumption output ratio. The improved gray wolf algorithm is driven to iteratively search for the optimal weight combination. Based on the final weight ranking result, the sub-energy system with the highest weight is selected as the dominant energy system in the start-up phase, and the auxiliary output quotas of the remaining sub-energy systems are allocated according to their weight ratios.

3. The energy optimization control method based on real-time energy consumption prediction according to claim 2, characterized in that: S1 further includes: Set the gray wolf population size and maximum number of iterations, encode each individual as a multidimensional real vector containing the weight values ​​of each sub-energy system, and apply weight normalization constraints. Use Tent chaotic mapping to replace random initialization to enhance the ergodicity of the initial population. Use a nonlinear decaying convergence factor in the early stage of iteration to expand the global search range. In each iteration, the top three individuals are recorded as α, β, and δ wolves, respectively, and the position update vectors of the remaining individuals relative to the three are calculated. Dynamic weight coefficients are introduced to improve the position update formula from equal weight average to weighted according to fitness ratio, making the position update direction more optimal. At the same time, Gaussian mutation operator is introduced in the later stage of the iteration to perform neighborhood perturbation on the best individual. When the population aggregation is lower than a preset threshold, a diversity compensation mechanism is triggered. Based on the current optimal individual position and boundary constraints, a new random walk individual is generated, which is then injected into the population. The same number of individuals with the lowest fitness are eliminated to keep the population size constant. After the iteration terminates, the weight combination corresponding to the α wolf is output as the optimal weight combination.

4. The energy optimization control method based on real-time energy consumption prediction according to claim 3, characterized in that: In the improved gray wolf algorithm, the step size of the Levy flight perturbation is dynamically scaled by the Mantegna algorithm based on the ratio of the current iteration number to the maximum iteration number, and the step size scaling factor is adjusted inversely with the population aggregation degree. The initial value of the Tent chaotic map is determined by the variance of the weight base values ​​of each sub-energy system output by the fuzzy logic. The mutation probability of the Gaussian mutation operator decreases non-uniformly as the iteration progresses, and the mutation amplitude is adaptively adjusted according to an exponential distribution centered on the current best individual.

5. The energy optimization control method based on real-time energy consumption prediction according to claim 1, characterized in that: S2 specifically includes: Using the output sequence of the dominant energy system as a benchmark, the real-time collected multi-source energy consumption data, environmental irradiance and environmental temperature are spliced ​​into a time-series input matrix and input into a trained long short-term memory network. The long-range time-series dependencies are extracted through a gating mechanism, and the predicted values ​​of future multi-step energy consumption and their prediction confidence intervals are output. The predicted energy consumption is used as a state prior input to the adaptive Kalman filter, and the real-time collected actual energy consumption is used as the measurement update. During the filtering recursion process, the innovation covariance is estimated online, and the measurement noise covariance matrix is ​​dynamically adjusted by the exponential weighted moving average method. Based on the filtered innovation sequence, a residual chi-square test statistic is constructed to decompose the deviation of actual energy consumption from the predicted value into low-frequency slowly varying components and high-frequency abrupt changes. The low-frequency components are attributed to supply-side power output fluctuations, and the high-frequency components are attributed to demand-side random abrupt changes. The amplitude and duration parameters of the two types of disturbance characteristics are extracted respectively.

6. The energy optimization control method based on real-time energy consumption prediction according to claim 5, characterized in that: S2 further includes: A basic switching threshold vector is preset for each sub-energy system. This basic switching threshold vector includes a power increase switching threshold and a power decrease switching threshold. The amplitude of the power output fluctuation on the supply side is used as the dead zone adjustment factor. When the amplitude of the power supply fluctuation exceeds the set threshold, the basic switching threshold is offset proportionally in the positive direction to expand the switching dead zone. The product of the magnitude and duration of the random change in demand is used as a sensitive adjustment factor. When the characteristics of the change in demand are significant, the basic switching threshold is negatively offset proportionally to reduce the switching dead zone. The switching threshold after correction by the two types of factors is used as the actual switching benchmark for the current control cycle. The actual switching baseline is compared with the upper limit of the predicted confidence interval output by the long short-term memory network, and then compared with the lower limit of the predicted confidence interval to generate the switching threshold boundary after dynamic clamping.

7. The energy optimization control method based on real-time energy consumption prediction according to claim 1, characterized in that: S3 specifically includes: The corrected switching threshold, supply-side disturbance amplitude, demand-side disturbance amplitude, current output margin of each sub-energy system, and energy storage charge state are all normalized into a continuous state vector to construct a decision state space. A multi-layer fully connected network is used as the policy function approximator and value function approximator for near-end policy optimization. The strategy function approximator outputs the Gaussian strategy parameters of each sub-energy system switching action, including the mean vector and the log standard deviation vector, constructs a continuous action probability distribution, performs a single sampling based on the continuous action probability distribution to obtain candidate switching action vectors, and applies amplitude and rate of change limits to the candidate actions. The sampled switching action vector is linearly transformed and mapped to the actual output adjustment command of each sub-energy system. A single fine-tuning switching operation is executed according to the adjustment command, and the system state transition trajectory before and after execution is recorded and stored in the experience cache.

8. The energy optimization control method based on real-time energy consumption prediction according to claim 7, characterized in that: The logarithmic standard deviation vector of the Gaussian strategy is mapped to a positive value by the Softplus function, and then multiplied by a dynamic scaling factor derived from the absolute value of the advantage function of the near-end strategy optimization. When the advantage function fluctuates drastically, the standard deviation is increased; when the advantage function is stable, the standard deviation is decreased. The mean vector of the Gaussian strategy is mapped to the interval [-1, 1] by the Tanh function, and then a bias correction term generated by the energy storage state of charge is superimposed to form a safety constraint-guided switching offset.

9. The energy optimization control method based on real-time energy consumption prediction according to claim 1, characterized in that: S4 specifically includes: The steady-state energy consumption response data after each switching operation is collected, including the bus voltage recovery time, frequency deviation integral value and energy storage charge and discharge depth. The steady-state energy consumption response data is paired with the state vector before the current switching operation and used as a feedback sample to be input into the fuzzy logic module, triggering online correction of the fuzzy rule consequent parameters of the initial weight base value. Simultaneously, the real-time energy consumption sequence after switching is compared with the predicted innovation sequence of the adaptive Kalman filter, and the deviation between the actual value and the current estimated value of the innovation covariance is calculated. Based on the direction and magnitude of the deviation, the measurement noise covariance matrix of the filter is dynamically corrected by proportional-integral adjustment. Every fixed number of control cycles, a batch of trajectory samples are extracted from the experience buffer to perform mini-batch gradient updates on the policy network for near-end policy optimization, while the value network parameters are synchronized using a soft-target update method.

10. The energy optimization control method based on real-time energy consumption prediction according to claim 9, characterized in that: The soft target update method adopts Polyak averaging and the update coefficient is dynamically and adaptively adjusted according to the rate of change of the policy network loss function. The update coefficient is increased when the loss function is continuously decreasing and decreased when the loss function is oscillating. The ratio of the batch size of the mini-batch gradient update to the capacity of the experience buffer is adjusted by the current policy entropy value. When the entropy value is higher than the set upper limit, the sampling batch is increased; when the entropy value is lower than the set lower limit, the sampling batch is decreased.