Hydrogen-electricity composite scheduling optimization method and system

By integrating hydrogen energy storage, battery energy storage and flywheel energy storage technologies and combining them with intelligent scheduling algorithms, the problem of insufficient coordination of energy storage systems has been solved, efficient regulation and optimization of grid loads have been achieved, grid stability and energy utilization efficiency have been improved, and carbon emissions and costs have been reduced.

CN120613730APending Publication Date: 2025-09-09HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510602366.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Existing energy storage systems operate independently and lack effective coordination mechanisms and real-time scheduling strategies, resulting in low energy utilization efficiency. Especially when multiple energy storage technologies coexist, how to optimize the scheduling strategy and balance the operation of different energy storage devices with the grid load is an urgent problem to be solved.

Method used

By integrating hydrogen energy storage, battery energy storage and flywheel energy storage technologies, and combining deep autoencoders, isolation forest technology and the TS-SAC algorithm of the Transformer architecture, data anomaly detection and load forecasting are performed, an objective function for hydrogen-electric hybrid scheduling optimization is established, and the energy storage system and grid connection points are coordinated and controlled to achieve efficient regulation and optimization of the grid load.

Benefits of technology

It has improved grid stability and energy utilization efficiency, reduced carbon emissions and energy costs, extended the service life of energy storage equipment, and promoted the integration of smart grids and renewable energy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120613730A_ABST
    Figure CN120613730A_ABST
Patent Text Reader

Abstract

The invention discloses a hydrogen-electricity composite scheduling optimization method. The method comprises the following steps: (1) collecting power grid and load data, hydrogen energy storage system data, lithium battery system data and maintenance cost and system life data; (2) performing principal component analysis dimensionality reduction on the data matrix, and smoothing the data through time sequence feature processing; (3) according to the data obtained in the step (2), establishing an objective function of hydrogen-electricity composite scheduling optimization; (4) according to the objective function established in the step (3), load prediction and comprehensive strategy calculation are carried out by adopting a TS-SAC algorithm based on a Transform architecture; (5) transmitting the optimal battery charging and discharging power and the optimal power grid load scheduling calculated in the step (4) into a distributed control framework, and coordinating and controlling an energy storage system and a power grid connection point; and (6) the security of data transmission is ensured by using an encryption technology and an authentication technology. Through reasonable configuration and optimal scheduling, the power grid stability and the system efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This patent belongs to the field of smart grid and energy management, and in particular relates to a hydrogen-electricity composite scheduling optimization method and system. Background Art

[0002] Despite the widespread use of renewable energy sources such as wind and solar power, their intermittent and fluctuating characteristics lead to power system instability. Especially when large-scale wind and photovoltaic power generation is integrated into the grid, grid load fluctuations exacerbate the difficulty of peak and frequency regulation, placing higher demands on grid stability and power supply reliability. Grid dispatching must balance the uncertainty of grid load and power output, while also providing sufficient power support during peak loads.

[0003] Traditional power systems rely on peak-shaving power sources such as gas-fired and coal-fired power plants for emergency regulation. However, these methods are not only inefficient but also increase carbon emissions and energy waste, making them difficult to meet the requirements of a green grid. With the rapid development of battery energy storage and hydrogen energy technologies, hydrogen-electric coupled energy storage systems are gaining attention as a new energy regulation method. Currently, the joint scheduling and optimization of battery and hydrogen energy storage technologies has become a research hotspot in the field of energy management. Existing energy storage systems typically operate independently, lacking effective coordination mechanisms and real-time scheduling strategies, resulting in low energy utilization efficiency. Especially when multiple energy storage technologies coexist, optimizing scheduling strategies to balance the operation of different energy storage devices with grid load remains a pressing issue. Summary of the Invention

[0004] Purpose of the invention: In response to the problems of power grid load fluctuations, low efficiency of traditional peak-shaving power sources, and insufficient coordination of energy storage systems in the background technology, this patent proposes a hydrogen-electric composite scheduling optimization method and system. By integrating hydrogen energy storage, battery energy storage and flywheel energy storage technologies, and combining them with advanced intelligent scheduling algorithms, efficient regulation and optimization of power grid loads can be achieved, thereby improving the stability, efficiency and green and low-carbon performance of the system.

[0005] Technical solution: A hydrogen-electricity hybrid scheduling optimization method, comprising the following steps:

[0006] (1) Using wireless sensor networks to collect real-time data on power grids and loads, hydrogen energy storage systems, lithium battery systems, maintenance costs, and system lifespan, the collected data are constructed into a data matrix X, and anomaly detection is performed using deep autoencoders and isolation forest techniques.

[0007] (2) Perform principal component analysis on the data matrix X to reduce the dimension and obtain the reduced dimension data matrix X PCA , smooth the data by processing time series features to reduce the impact of short-term fluctuations.

[0008] (3) Based on the data obtained in step (2), establish the objective function of hydrogen-electric hybrid scheduling optimization;

[0009] (4) Based on the objective function established in step (3), the TS-SAC algorithm based on the Transformer architecture is used to perform load forecasting and comprehensive strategy calculation; the load forecasting analyzes the historical and real-time data of the power grid to obtain future load trends and provide a decision basis for scheduling; the comprehensive strategy calculation combines battery health assessment, monitors the battery status in real time, and comprehensively considers peak load regulation, frequency regulation and economic environment factors to calculate the optimal battery charge and discharge power P charge (t) and optimal grid load dispatch P grid (t);

[0010] (5) The optimal battery charge and discharge power P calculated according to step (4) charge (t) and optimal grid load dispatch P grid (t), incoming distributed control architecture, coordinated control of energy storage system and grid connection point;

[0011] (6) Use encryption and authentication technologies to ensure the security of data transmission.

[0012] Furthermore, the deep autoencoder and isolation forest technology are used for anomaly detection as follows:

[0013] Deep autoencoders are used for feature extraction and to detect and repair data loss. Isolation forests are used to detect abnormal data caused by sensor failures. When data loss occurs, deep autoencoders repair the lost data through feature learning and reconstruction. For abnormal data caused by sensor failures, isolation forest technology identifies and labels the abnormal data, and eliminates or corrects the abnormal data based on the labels.

[0014] Furthermore, in step (2), the sliding average is used to smooth the data as follows:

[0015]

[0016] Where: is the smoothed data, PC i (j) is the value of the i-th principal component at time point j, t is the time variable, and w is the sliding window size, which indicates the number of time steps considered when calculating the average.

[0017] Furthermore, the objective functions of hydrogen-electric hybrid scheduling optimization in step (3) include: a peak regulation objective function dominated by hydrogen energy storage, a frequency regulation objective function dominated by lithium batteries, a composite system life objective function, and an economic-environmental objective function;

[0018] The hydrogen energy storage-dominated peak-shaving objective function minimizes the error between the grid load and the target load during the peak-shaving process:

[0019]

[0020] P target (t) = γP load (t)+(1-γ)P grid (t-1)

[0021] Where: P grid (t) represents the grid load power, P target (t) represents the target load power after smoothing, P H2 (t) represents the power output / input of the hydrogen energy storage system, α and β represent the weight coefficients of the peak load regulation target, and γ represents the smoothing coefficient;

[0022] The lithium battery-dominated frequency regulation objective function minimizes the deviation between the grid frequency and the reference frequency:

[0023]

[0024] P bat (t) = -K freq (f grid (t)-f ref )

[0025] DOD(t)=1-SOC(t)

[0026] Where: f grid (t) represents the real-time frequency of the power grid, f ref Indicates the rated grid frequency, P bat (t) represents the charge and discharge power of the lithium battery, K freq represents the frequency modulation gain coefficient, SOC(t) represents the state of charge of the lithium battery, DOD(t) represents the depth of discharge of the lithium battery, and λ1, λ2, and λ3 represent the weight coefficients of the frequency modulation target;

[0027] The composite system lifetime objective function maximizes the overall lifetime of the composite system:

[0028]

[0029] Where: L sys represents the overall life of the composite system, L H2 Indicates the life of the hydrogen energy storage system, L bat Indicates the life of the lithium battery system, SOC H2 (t) represents the state of charge of the hydrogen energy storage system, T run (t) represents the operating time of the hydrogen energy storage system, DOD(t) represents the depth of discharge of the lithium battery, ΔP bat (t) represents the battery power fluctuation, μ1, μ2, k H2,k bat ,β P represents the correlation coefficient of the lifespan model;

[0030] The economic-environmental objective function minimizes the weighted sum of the operating cost, carbon emissions, and maintenance cost of the composite system:

[0031]

[0032] E carbon (t) = E grid (t)P grid (t)+E H2 (t)P H2 (t)

[0033] Where: C op (t) represents the operating cost, E carbon (t) represents carbon emissions, C maint (t) represents the maintenance cost, E grid ,E H2 represents the unit carbon emissions of the power grid and hydrogen energy, and λ,θ represent the weight coefficients of economic-environmental goals.

[0034] Furthermore, step (4) includes:

[0035] (4.1) Input data and state representation: The input data is the data matrix X after dimensionality reduction. PCA , which has undergone data preprocessing and dimensionality reduction and contains the most important features extracted from the original data;

[0036] (4.2) Introduction of embedding layer:

[0037] e t =Embedding(S t );

[0038] Where, e t is the embedded vector, the dimension is Embedding(S t );

[0039] (4.3) Establishing a self-attention mechanism

[0040]

[0041] Among them, Q, K, V are query, key and value matrices, which are obtained by embedding the vector e t Obtained by linear transformation;

[0042] (4.4) Position encoding to preserve the temporal information of the input data: The position encoding expression is as follows:

[0043]

[0044] Where s is the position in the sequence, d is the embedding dimension, and i is the dimension index. PE(s) is used to identify the order information of each position in the sequence;

[0045] (4.5) Physical constraints and objective function. Physical constraints act on the parameters in the objective function. Physical constraints are added to the objective function in the form of penalty terms. The physical constraints are:

[0046] P charge,min ≤P charge (t)≤P charge,max

[0047] SOC min ≤SOC(t)≤SOC max

[0048] DOD min ≤DOD(t)≤DOD max

[0049] Ensure the battery charge and discharge power P charge (t), the battery's state of charge SOC(t), and the battery's depth of discharge DOD(t) are all controlled within a reasonable range.

[0050] The penalty term of the physical constraint is combined with the objective function in the form of a penalty term to minimize the weighted error and the penalty term of the physical constraint:

[0051]

[0052] Where: α, β are weight coefficients, λ4, λ5, λ6 are penalty coefficients

[0053] (4.6) Construction of Q-value network to evaluate the value of the current state-action pair,

[0054] Q(s t ,a t )=E[r t +γQ(s t+1 ,a t+1 )]

[0055] Where: r t is the immediate reward, γ is the discount factor, Q(s t+1 ,a t+1 ) is the expected return of the next state-action pair, E is the expected value function, which represents the weighted average of future rewards; s t Indicates status, a t Indicates action;

[0056] (4.7) Construction of strategy network

[0057] The policy network formula is as follows:

[0058]

[0059] Where: π θ (a t |s t ) represents the output of the strategy network, which is a decision vector; including the optimal battery charge and discharge power P charge (t), optimal grid load dispatch P grid (t), as the basis for the system's next decision, focuses on peak load regulation and frequency regulation, and minimizes grid frequency fluctuations and load fluctuations by adjusting the power of batteries and grid loads, thereby balancing the supply and demand of the grid.

[0060] Furthermore, the distributed control architecture includes an energy storage system, a bidirectional PEM electrolyzer, and a grid connection point. The energy storage system includes a battery energy storage system, a hydrogen energy storage system, and a flywheel energy storage system. The grid connection point adjusts the grid load distribution in real time according to the optimal load scheduling plan. The bidirectional PEM electrolyzer uses excess electricity to produce hydrogen through water electrolysis during low-load periods and stores it in the hydrogen energy storage system. During high-load periods, the stored hydrogen is converted into electricity through a fuel cell to supplement the grid load. The battery energy storage system charges and discharges according to the optimal power. The flywheel energy storage system quickly adjusts the grid load to assist the battery energy storage system and the hydrogen energy storage system.

[0061] The executive control layer coordinates and controls the various energy storage systems and grid connection points to ensure stable system operation. The grid connection points adjust grid load distribution in real time based on the optimal load scheduling plan. During low-load periods, the bidirectional PEM electrolyzer converts excess electricity into hydrogen through water electrolysis and stores it. During high-load periods, the stored hydrogen is converted into electricity through fuel cells to supplement the grid load. The battery energy storage system charges and discharges at optimal power, optimizing battery efficiency and extending its service life. The flywheel energy storage system utilizes its rapid response characteristics to quickly adjust the grid load, assisting the battery and hydrogen energy storage systems and improving grid stability and response speed. Through the precise regulation of the executive control layer, the various components work together to achieve peak and frequency regulation, ensuring balanced and stable system operation under high and low loads, and improving grid stability and energy efficiency.

[0062] Furthermore, the encryption technology includes hash verification, and the authentication technology includes digital signature and multi-factor authentication MFA.

[0063] A hydrogen-electric hybrid scheduling optimization system includes a multi-source data acquisition layer, a data processing and analysis layer, an intelligent scheduling decision layer, an execution control layer, and a communication security layer;

[0064] The multi-source data acquisition layer collects power grid and load data, hydrogen energy storage system data, lithium battery system data, maintenance cost and system life data in real time through wireless sensor networks, constructs the collected data into a data matrix X, and uses deep autoencoders and isolation forest technology for anomaly detection;

[0065] The data processing and analysis layer performs principal component analysis on the data matrix X to reduce the dimension, and obtains the reduced dimension data matrix X PCA , smooth the data by processing time series features to reduce the impact of short-term fluctuations.

[0066] The intelligent scheduling decision layer establishes the objective function of hydrogen-electric hybrid scheduling optimization; uses the TS-SAC algorithm based on the Transformer architecture to perform load forecasting and comprehensive strategy calculation; the load forecast analyzes the historical and real-time data of the power grid to derive future load trends and provide a decision basis for scheduling; the comprehensive strategy calculation combines battery health assessment, monitors battery status in real time, and comprehensively considers peak load regulation, frequency regulation and economic environment factors to calculate the optimal battery charge and discharge power P charge (t) and optimal grid load dispatch P grid (t);

[0067] The execution control layer is based on the optimal battery charging and discharging power P charge (t) and optimal grid load dispatch P grid (t), incoming distributed control architecture, coordinated control of energy storage system and grid connection point;

[0068] The communication security layer utilizes encryption technology and authentication technology to ensure the security of data transmission.

[0069] Furthermore, the multi-source data acquisition layer uses wireless sensor networks (WSN) for real-time transmission and introduces time division multiple access (TDMA) and frequency division multiple access (FDMA) communication protocols.

[0070] Beneficial effects: (1) Improved grid stability: Through the coordinated scheduling of hydrogen energy storage systems, lithium battery energy storage systems, and flywheel energy storage systems, the present invention can effectively balance grid load fluctuations and improve grid stability. Under high load, hydrogen fuel cells provide efficient power support, while the flywheel energy storage system can quickly respond to grid frequency fluctuations, ensuring that the grid frequency remains within the normal range. Compared with traditional methods that rely on peak-shaving power sources such as coal and gas, this system can reduce carbon emissions and improve grid stability.

[0071] (2) Improved energy storage efficiency and operating life: The TC-SAC algorithm is used to optimize the charging and discharging strategies of batteries and hydrogen energy storage to avoid overcharging and discharging, thereby extending the service life of energy storage equipment. Dynamic optimization scheduling is achieved between battery energy storage and hydrogen energy storage, allowing each energy storage technology to maximize its efficiency at the most appropriate time, avoiding the inefficient operation of traditional energy storage systems.

[0072] (3) Reduce energy costs and carbon emissions: By optimizing energy storage and scheduling strategies, energy losses in energy storage equipment and grid operations are reduced, lowering power supply costs. This system not only improves operational efficiency in terms of peak load regulation and frequency regulation, but also reduces the use of traditional fossil energy through reasonable scheduling, thereby reducing carbon emissions.

[0073] (4) Promote the integration of smart grid and renewable energy: The present invention provides a flexible and efficient solution for grid dispatching by combining the hydrogen-electric composite energy storage system with the intelligent dispatching algorithm, thereby promoting the further integration of smart grid and renewable energy. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 Schematic diagram of the system structure of the present invention;

[0075] Figure 2 Flow chart of the method of the present invention. DETAILED DESCRIPTION

[0076] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0077] The present invention provides a technical solution, a hydrogen-electricity composite scheduling optimization method, comprising the following steps:

[0078] (1) Using wireless sensor networks to collect real-time data on power grids and loads, hydrogen energy storage systems, lithium battery systems, maintenance costs, and system lifespan, the collected data are constructed into a data matrix X, and anomaly detection is performed using deep autoencoders and isolation forest techniques.

[0079] (2) Perform principal component analysis on the data matrix X to reduce the dimension and obtain the reduced dimension data matrix X PCA , smooth the data by processing time series features to reduce the impact of short-term fluctuations.

[0080] (3) Based on the data obtained in step (2), establish the objective function of hydrogen-electric hybrid scheduling optimization;

[0081] (4) Based on the objective function established in step (3), the TS-SAC algorithm based on the Transformer architecture is used to perform load forecasting and comprehensive strategy calculation; the load forecasting analyzes the historical and real-time data of the power grid to obtain future load trends and provide a decision basis for scheduling; the comprehensive strategy calculation combines battery health assessment, monitors the battery status in real time, and comprehensively considers peak load regulation, frequency regulation and economic environment factors to calculate the optimal battery charge and discharge power P charge (t) and optimal grid load dispatch P grid (t);

[0082] (5) The optimal battery charge and discharge power P calculated according to step (4) charge (t) and optimal grid load dispatch P grid (t), incoming distributed control architecture, coordinated control of energy storage system and grid connection point;

[0083] (6) Use encryption and authentication technologies to ensure the security of data transmission. See the overall method flow for details. Figure 2 .

[0084] Furthermore, the deep autoencoder and isolation forest technology are used for anomaly detection as follows:

[0085] Deep autoencoders are used for feature extraction and to detect and repair data loss. Isolation forests are used to detect abnormal data caused by sensor failures. When data loss occurs, deep autoencoders repair the lost data through feature learning and reconstruction. For abnormal data caused by sensor failures, isolation forest technology identifies and labels the abnormal data, and eliminates or corrects the abnormal data based on the labels.

[0086] In step (2), the data matrix X collected from the previous layer is passed to this layer, and PCA is used to standardize the data:

[0087]

[0088] Where: X ij is the value of the i-th row and j-th column in the original data matrix X, μ j The mean of the jth column, σ j The standard deviation of the jth column, Z ij is the normalized data matrix Z.

[0089] Find linear relationships between eigenvalues, calculate covariance matrix, eigenvalues ​​and eigenvectors, select principal components and perform dimensionality reduction:

[0090] X PCA =Z·W

[0091] Where: X PCAis the data matrix after dimensionality reduction, containing 8 principal components. Z is the normalized data matrix, and W is the matrix composed of the 8 selected eigenvectors.

[0092] The data matrix X after dimensionality reduction PCA As shown below:

[0093]

[0094] Wherein, the data matrix includes the following parameters: grid load power P grid (t), hydrogen storage power P H2 (t), lithium battery power P bat (t), lithium battery state of charge SOC(t), hydrogen storage energy P storage (t), operating cost C op (t), carbon emissions E carbon (t), maintenance cost C maint (t).

[0095] Furthermore, in step (2), the sliding average is used to smooth the data as follows:

[0096]

[0097] Where: is the smoothed data, PC i (j) is the value of the i-th principal component at time point j, t is the time variable, and w is the sliding window size, which indicates the number of time steps considered when calculating the average.

[0098] Furthermore, the objective functions of hydrogen-electric hybrid scheduling optimization in step (3) include: a peak regulation objective function dominated by hydrogen energy storage, a frequency regulation objective function dominated by lithium batteries, a composite system life objective function, and an economic-environmental objective function;

[0099] The hydrogen energy storage-dominated peak-shaving objective function minimizes the error between the grid load and the target load during the peak-shaving process:

[0100]

[0101] P target (t) = γP load (t)+(1-γ)P grid (t-1)

[0102] Where: P grid (t) represents the grid load power, P target (t) represents the target load power after smoothing, P H2 (t) represents the power output / input of the hydrogen energy storage system, α and β represent the weight coefficients of the peak load regulation target, and γ represents the smoothing coefficient;

[0103] The lithium battery-dominated frequency regulation objective function minimizes the deviation between the grid frequency and the reference frequency:

[0104]

[0105] P bat (t) = -K freq (f grid (t)-f ref )

[0106] DOD(t)=1-SOC(t)

[0107] Where: f grid (t) represents the real-time frequency of the power grid, f ref Indicates the rated grid frequency, P bat (t) represents the charge and discharge power of the lithium battery, K freq represents the frequency modulation gain coefficient, SOC(t) represents the state of charge of the lithium battery, DOD(t) represents the depth of discharge of the lithium battery, and λ1, λ2, and λ3 represent the weight coefficients of the frequency modulation target;

[0108] The composite system lifetime objective function maximizes the overall lifetime of the composite system:

[0109]

[0110] Where: L sys represents the overall life of the composite system, L H2 Indicates the life of the hydrogen energy storage system, L bat Indicates the life of the lithium battery system, SOC H2 (t) represents the state of charge of the hydrogen energy storage system, T run (t) represents the operating time of the hydrogen energy storage system, DOD(t) represents the depth of discharge of the lithium battery, ΔP bat (t) represents the battery power fluctuation, μ1, μ2, k H2 ,k bat ,β P represents the correlation coefficient of the lifespan model;

[0111] The economic-environmental objective function minimizes the weighted sum of the operating cost, carbon emissions, and maintenance cost of the composite system:

[0112]

[0113] E carbon (t) = E grid (t)P grid (t)+E H2 (t)P H2 (t)

[0114] Where: C op (t) represents the operating cost, E carbon (t) represents carbon emissions, C maint (t) represents the maintenance cost, E grid ,E H2 represents the unit carbon emissions of the power grid and hydrogen energy, and λ,θ represent the weight coefficients of economic-environmental goals.

[0115] Furthermore, combined with the Transformer architecture, the TS-SAC algorithm is enhanced based on the traditional SAC algorithm, making it better able to handle complex data environments. Step (4) includes:

[0116] (4.1) Input data and state representation: The input data is the data matrix X after dimensionality reduction. PCA , which has undergone data preprocessing and dimensionality reduction and contains the most important features extracted from the original data;

[0117] (4.2) Introduction of embedding layer:

[0118] e t =Embedding(S t );

[0119] Where, e t is the embedded vector, the dimension is Embedding(S t );

[0120] (4.3) Establishing a self-attention mechanism

[0121]

[0122] Among them, Q, K, V are query, key and value matrices, which are obtained by embedding the vector e t By introducing the embedding layer and self-attention mechanism, the TS-SAC algorithm can more effectively handle complex and changing data environments. The original SAC algorithm has low processing efficiency when there is too much data.

[0123] (4.4) Position encoding to preserve the temporal information of the input data: The position encoding expression is as follows:

[0124]

[0125] Where s is the position in the sequence, d is the embedding dimension, and i is the dimension index. PE(s) identifies the order of each position in the sequence. By introducing position encoding, the algorithm can preserve the temporal information of the data and better process time series data such as power grid load.

[0126] (4.5) Physical constraints and objective function. Physical constraints act on the parameters in the objective function. Physical constraints are added to the objective function in the form of penalty terms. The physical constraints are:

[0127] P charge,min ≤P charge (t)≤P charge,max

[0128] SOC min ≤SOC(t)≤SOC max

[0129] DOD min ≤DOD(t)≤DOD max

[0130] Ensure the battery charge and discharge power P charge (t), the battery's state of charge SOC(t), and the battery's depth of discharge DOD(t) are all controlled within a reasonable range.

[0131] The penalty term of the physical constraint is combined with the objective function in the form of a penalty term to minimize the weighted error and the penalty term of the physical constraint:

[0132]

[0133] Where α and β are weight coefficients, and λ4, λ5, and λ6 are penalty coefficients. The TS-SAC algorithm incorporates physical constraints into the objective function in the form of penalty terms, ensuring that key parameters such as the battery's charge and discharge power, state of charge, and depth of discharge remain within a safe and reasonable operating range. Traditional SAC algorithms are often difficult to directly apply to actual energy storage system scheduling problems with strict physical constraints or cannot fully guarantee the satisfaction of these constraints.

[0134] (4.6) Construction of Q-value network to evaluate the value of the current state-action pair,

[0135] Q(s t ,a t )=E[r t +γQ(s t+1 ,a t+1 )]

[0136] Where: r t is the immediate reward, γ is the discount factor, Q(s t+1 ,a t+1 ) is the expected return of the next state-action pair, E is the expected value function, which represents the weighted average of future rewards; s t Indicates status, a t Indicates action;

[0137] (4.7) Construction of strategy network

[0138] The policy network formula is as follows:

[0139]

[0140] Where: π θ (a t |s t ) represents the output of the strategy network, which is a decision vector; including the optimal battery charge and discharge power P charge (t), optimal grid load dispatch P grid (t), as the basis for the system's next decision, focuses on peak load regulation and frequency regulation, and minimizes grid frequency fluctuations and load fluctuations by adjusting the power of batteries and grid loads, thereby balancing the supply and demand of the grid.

[0141] Furthermore, the distributed control architecture includes an energy storage system, a bidirectional PEM electrolyzer, and a grid connection point. The energy storage system includes a battery energy storage system, a hydrogen energy storage system, and a flywheel energy storage system. The grid connection point adjusts the grid load distribution in real time according to the optimal load scheduling plan. The bidirectional PEM electrolyzer uses excess electricity to produce hydrogen through water electrolysis during low-load periods and stores it in the hydrogen energy storage system. During high-load periods, the stored hydrogen is converted into electricity through a fuel cell to supplement the grid load. The battery energy storage system charges and discharges according to the optimal power. The flywheel energy storage system quickly adjusts the grid load to assist the battery energy storage system and the hydrogen energy storage system.

[0142] The executive control layer coordinates and controls the various energy storage systems and grid connection points to ensure stable system operation. The grid connection points adjust grid load distribution in real time based on the optimal load scheduling plan. During low-load periods, the bidirectional PEM electrolyzer converts excess electricity into hydrogen through water electrolysis and stores it. During high-load periods, the stored hydrogen is converted into electricity through fuel cells to supplement the grid load. The battery energy storage system charges and discharges at optimal power, optimizing battery efficiency and extending its service life. The flywheel energy storage system utilizes its rapid response characteristics to quickly adjust the grid load, assisting the battery and hydrogen energy storage systems and improving grid stability and response speed. Through the precise regulation of the executive control layer, the various components work together to achieve peak and frequency regulation, ensuring balanced and stable system operation under high and low loads, and improving grid stability and energy efficiency.

[0143] Furthermore, the encryption technology includes hash verification, and the authentication technology includes digital signature and multi-factor authentication MFA.

[0144] like Figure 1As shown, a hydrogen-electric hybrid scheduling optimization system includes a multi-source data acquisition layer, a data processing and analysis layer, an intelligent scheduling decision layer, an execution control layer, and a communication security layer;

[0145] The multi-source data acquisition layer collects power grid and load data, hydrogen energy storage system data, lithium battery system data, maintenance cost and system life data in real time through wireless sensor networks, constructs the collected data into a data matrix X, and uses deep autoencoders and isolation forest technology for anomaly detection;

[0146] The data processing and analysis layer performs principal component analysis on the data matrix X to reduce the dimension, and obtains the reduced dimension data matrix X PCA , smooth the data by processing time series features to reduce the impact of short-term fluctuations.

[0147] The intelligent scheduling decision layer establishes the objective function of hydrogen-electric hybrid scheduling optimization; uses the TS-SAC algorithm based on the Transformer architecture to perform load forecasting and comprehensive strategy calculation; the load forecast analyzes the historical and real-time data of the power grid to derive future load trends and provide a decision basis for scheduling; the comprehensive strategy calculation combines battery health assessment, monitors battery status in real time, and comprehensively considers peak load regulation, frequency regulation and economic environment factors to calculate the optimal battery charge and discharge power P charge (t) and optimal grid load dispatch P grid (t);

[0148] The execution control layer is based on the optimal battery charging and discharging power P charge (t) and optimal grid load dispatch P grid (t), incoming distributed control architecture, coordinated control of energy storage system and grid connection point;

[0149] The communication security layer utilizes encryption technology and authentication technology to ensure the security of data transmission.

[0150] During the communication process, all transmitted data is encrypted to ensure that only authorized recipients can access the content. The system uses hash value verification. After receiving the data, the hash value calculated during sending and receiving is compared to ensure data consistency. The formula can be expressed as:

[0151] Hash received =Hash sent

[0152] Where: Hash received and Hash sent If the data is tampered with during transmission, the hash values ​​will not match and the system will trigger a warning.

[0153] To prevent unauthorized access, the system authenticates each communication node, ensuring that the devices or users transmitting data and performing operations are legitimate and authorized. Common verification methods include digital signatures and multi-factor authentication (MFA), which strengthen access control for internal and external devices and ensure system security.

[0154] Furthermore, the multi-source data acquisition layer uses wireless sensor networks (WSN) for real-time transmission and introduces time division multiple access (TDMA) and frequency division multiple access (FDMA) communication protocols.

Claims

1. A hydrogen-electricity hybrid scheduling optimization method, characterized in that: The following steps are involved: (1) Using wireless sensor networks to collect real-time data on power grids and loads, hydrogen energy storage systems, lithium battery systems, maintenance costs, and system lifespan, the collected data are constructed into a data matrix X, and anomaly detection is performed using deep autoencoders and isolation forest techniques. (2) Perform principal component analysis on the data matrix X to reduce the dimension and obtain the reduced dimension data matrix X PCA , smoothing the data by time series feature processing; (3) Based on the data obtained in step (2), establish the objective function of hydrogen-electric hybrid scheduling optimization; (4) Based on the objective function established in step (3), the TS-SAC algorithm based on the Transformer architecture is used to perform load forecasting and comprehensive strategy calculation; the load forecasting analyzes the historical and real-time data of the power grid to obtain future load trends and provide a decision basis for scheduling; the comprehensive strategy calculation combines battery health assessment, monitors the battery status in real time, and comprehensively considers peak load regulation, frequency regulation and economic environment factors to calculate the optimal battery charge and discharge power P charge (t) and optimal grid load dispatch P grid (t); (5) The optimal battery charge and discharge power P calculated according to step (4) charge (t) and optimal grid load dispatch P grid (t), incoming distributed control architecture, coordinated control of energy storage system and grid connection point; (6) Use encryption and authentication technologies to ensure the security of data transmission.

2. A hydrogen-electricity composite scheduling optimization method according to claim 1, characterized in that: The specific method of using deep autoencoder and isolation forest technology for anomaly detection is as follows: Deep autoencoders are used for feature extraction and to detect and repair data loss. Isolation forests are used to detect abnormal data caused by sensor failures. When data loss occurs, deep autoencoders repair the lost data through feature learning and reconstruction. For abnormal data caused by sensor failures, isolation forest technology identifies and labels the abnormal data, and eliminates or corrects the abnormal data based on the labels.

3. The hydrogen-electricity composite scheduling optimization method according to claim 1, characterized in that: The method of smoothing the data by sliding average in step (2) is as follows: Where: is the smoothed data, PC i (j) is the value of the i-th principal component at time point j, t is the time variable, and w is the sliding window size, which indicates the number of time steps considered when calculating the average.

4. The hydrogen-electricity composite scheduling optimization method according to claim 1, characterized in that: The objective functions of hydrogen-electric hybrid scheduling optimization in step (3) include: a peak regulation objective function dominated by hydrogen energy storage, a frequency regulation objective function dominated by lithium batteries, a composite system life objective function, and an economic-environmental objective function; The hydrogen energy storage-dominated peak-shaving objective function minimizes the error between the grid load and the target load during the peak-shaving process: P target (t)=γP load (t)+(1-γ)P grid (t-1) Where: P grid (t) represents the grid load power, P target (t) represents the target load power after smoothing, P H2 (t) represents the power output / input of the hydrogen energy storage system, α and β represent the weight coefficients of the peak load regulation target, and γ represents the smoothing coefficient; The lithium battery-dominated frequency regulation objective function minimizes the deviation between the grid frequency and the reference frequency: P bat (t)=-K freq (f grid (t)-f ref ) DOD(t)=1-SOC(t) Where: f grid (t) represents the real-time frequency of the power grid, f ref Indicates the rated grid frequency, P bat (t) represents the charge and discharge power of the lithium battery, K freq represents the frequency modulation gain coefficient, SOC(t) represents the state of charge of the lithium battery, DOD(t) represents the depth of discharge of the lithium battery, and λ1, λ2, and λ3 represent the weight coefficients of the frequency modulation target; The composite system lifetime objective function maximizes the overall lifetime of the composite system: Where: L sys represents the overall life of the composite system, L H2 Indicates the life of the hydrogen energy storage system, L bat Indicates the life of the lithium battery system, SOC H2 (t) represents the state of charge of the hydrogen energy storage system, T run (t) represents the operating time of the hydrogen energy storage system, DOD(t) represents the depth of discharge of the lithium battery, ΔP bat (t) represents the battery power fluctuation, μ1, μ2, k H2 ,k bat ,β P represents the correlation coefficient of the lifespan model; The economic-environmental objective function minimizes the weighted sum of the operating cost, carbon emissions, and maintenance cost of the composite system: E carbon (t)=E grid (t)P grid (t)+E H2 (t)P H2 (t) Where: C op (t) represents the operating cost, E carbon (t) represents carbon emissions, C maint (t) represents the maintenance cost, E grid ,E H2 represents the unit carbon emissions of the power grid and hydrogen energy, and λ,θ represent the weight coefficients of economic-environmental goals.

5. The hydrogen-electricity composite scheduling optimization method according to claim 1, characterized in that: The step (4) comprises: (4.1) Input data and state representation: The input data is the data matrix X after dimensionality reduction. PCA , which has undergone data preprocessing and dimensionality reduction and contains the most important features extracted from the original data; (4.2) Introduction of embedding layer: e t =Embedding(S t ); Where, e t is the embedded vector, the dimension is Embedding(S t ); (4.3) Establishing a self-attention mechanism Among them, Q, K, V are query, key and value matrices, which are obtained by embedding the vector e t Obtained by linear transformation; (4.4) Position encoding to preserve the temporal information of the input data: The position encoding expression is as follows: Where s is the position in the sequence, d is the embedding dimension, i is the dimension index, and PE(s) is used to identify the order information of each position in the sequence; (4.5) Physical constraints and objective function. Physical constraints act on the parameters in the objective function. Physical constraints are added to the objective function in the form of penalty terms. The physical constraints are: P charge,min ≤P charge (t)≤P charge,max SOC min ≤SOC(t)≤SOC max DOD min ≤DOD(t)≤DOD max Ensure the battery charge and discharge power P charge (t), the battery's state of charge SOC(t), and the battery's depth of discharge DOD(t) are all controlled within a reasonable range. The penalty term of the physical constraint is combined with the objective function in the form of a penalty term to minimize the weighted error and the penalty term of the physical constraint: Where: α, β are weight coefficients, λ4, λ5, λ6 are penalty coefficients (4.6) Construction of Q-value network to evaluate the value of the current state-action pair, Q(s t ,a t )=E[r t +γQ(s t+1 ,a t+1 )] Where: r t is the immediate reward, γ is the discount factor, Q(s t+1 ,a t+1 ) is the expected return of the next state-action pair, E is the expected value function, which represents the weighted average of future rewards; s t Indicates status, a t Indicates action; (4.7) Construction of strategy network The policy network formula is as follows: Where: π θ (a t |s t ) represents the output of the strategy network, which is a decision vector; including the optimal battery charge and discharge power P charge (t), optimal grid load dispatch P grid (t), as the basis for the system's next decision, focuses on peak load regulation and frequency regulation, and minimizes grid frequency fluctuations and load fluctuations by adjusting the power of batteries and grid loads.

6. The hydrogen-electricity composite scheduling optimization method according to claim 1, characterized in that: The distributed control architecture includes an energy storage system, a bidirectional PEM electrolyzer, and a grid connection point. The energy storage system includes a battery energy storage system, a hydrogen energy storage system, and a flywheel energy storage system. The grid connection point adjusts the grid load distribution in real time based on the optimal load scheduling plan. The bidirectional PEM electrolyzer, based on the grid load distribution, produces hydrogen by electrolyzing water during low-load periods and stores it in the hydrogen energy storage system. During high-load periods, the stored hydrogen is converted into electricity through a fuel cell to supplement the grid load. The battery energy storage system charges and discharges according to the optimal power; The flywheel energy storage system quickly adjusts the grid load and assists the battery energy storage system and hydrogen energy storage system.

7. The hydrogen-electricity composite scheduling optimization method according to claim 1, characterized in that: The encryption technology includes hash verification, and the authentication technology includes digital signature and multi-factor authentication MFA.

8. A hydrogen-electricity composite scheduling optimization system, characterized in that: It includes multi-source data acquisition layer, data processing and analysis layer, intelligent scheduling decision layer, execution control layer and communication security layer; The multi-source data acquisition layer collects power grid and load data, hydrogen energy storage system data, lithium battery system data, maintenance cost and system life data in real time through wireless sensor networks, constructs the collected data into a data matrix X, and uses deep autoencoders and isolation forest technology for anomaly detection; The data processing and analysis layer performs principal component analysis on the data matrix X to reduce the dimension, and obtains the reduced dimension data matrix X PCA , smoothing the data by time series feature processing; The intelligent scheduling decision layer establishes the objective function of hydrogen-electric hybrid scheduling optimization; uses the TS-SAC algorithm based on the Transformer architecture to perform load forecasting and comprehensive strategy calculation; the load forecast analyzes the historical and real-time data of the power grid to derive future load trends and provide a decision basis for scheduling; the comprehensive strategy calculation combines battery health assessment, monitors battery status in real time, and comprehensively considers peak load regulation, frequency regulation and economic environment factors to calculate the optimal battery charge and discharge power P charge (t) and optimal grid load dispatch P grid (t); The execution control layer is based on the optimal battery charging and discharging power P charge (t) and optimal grid load dispatch P grid (t), incoming distributed control architecture, coordinated control of energy storage system and grid connection point; The communication security layer utilizes encryption technology and authentication technology to ensure the security of data transmission.

9. The hydrogen-electricity composite scheduling optimization system according to claim 8, characterized in that: The multi-source data acquisition layer uses a wireless sensor network (WSN) for real-time transmission and introduces time division multiple access (TDMA) and frequency division multiple access (FDMA) communication protocols.

10. The hydrogen-electricity composite scheduling optimization system according to claim 8, characterized in that: The distributed control architecture of the executive control layer includes an energy storage system, a bidirectional PEM electrolyzer, and a grid connection point. The energy storage system includes a battery energy storage system, a hydrogen energy storage system, and a flywheel energy storage system. The grid connection point adjusts the grid load distribution in real time based on the optimal load scheduling plan. The bidirectional PEM electrolyzer, based on the grid load distribution, produces hydrogen by electrolyzing water during low-load periods and stores it in the hydrogen energy storage system. During high-load periods, the stored hydrogen is converted into electricity through a fuel cell to supplement the grid load. The battery energy storage system charges and discharges according to the optimal power; The flywheel energy storage system quickly adjusts the grid load and assists the battery energy storage system and hydrogen energy storage system.