Dynamic soft measurement method for hydrogen concentration in oxygen in alkaline electrolyzers under fluctuating operating conditions

By constructing a dynamic mechanism model of gas-liquid two-phase flow transmembrane mass transfer theory in an alkaline electrolyzer and fusing it with a time-series neural network, and combining it with an asymmetric weighted loss function and concept drift event updates, the accuracy and adaptability issues of soft measurement of hydrogen concentration in oxygen under fluctuating operating conditions were solved, and safe control of the alkaline electrolyzer was achieved.

CN123108649APending Publication Date: 2026-11-17TAIYUAN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611468428.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing soft measurement methods for hydrogen concentration in oxygen in alkaline electrolyzers under fluctuating operating conditions, single-mechanism models have poor dynamic adaptability, while pure data-driven models lack physical constraints, resulting in decreased prediction accuracy and insufficient generalization ability.

Method used

By establishing a dynamic mechanism model based on the transmembrane mass transfer theory of gas-liquid two-phase flow and embedding it as a physical constraint into a physical information neural network, and fusing it with a temporal neural network, a gray-box dynamic soft measurement model is constructed. By combining an asymmetric weighted loss function and a model update triggered by concept drift events, real-time prediction of hydrogen concentration in oxygen is achieved.

Benefits of technology

Under fluctuating operating conditions, the model can accurately predict the hydrogen concentration in oxygen, maintain measurement accuracy and reliability, improve the safety of equipment operation, reduce prediction errors when the hydrogen concentration is close to the dangerous limit, and provide reliable concentration data support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123108649A_ABST
    Figure CN123108649A_ABST
Patent Text Reader

Abstract

This invention relates to the field of hydrogen production via water electrolysis, and discloses a dynamic soft measurement method for hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions. The method includes acquiring electrolyzer operating parameter data; establishing a dynamic mechanism model based on the gas-liquid two-phase flow transmembrane mass transfer theory, and embedding this model as a physical constraint into the loss function of a physical information neural network; extracting the temporal and nonlinear characteristics of the operating data using a time-series neural network, and fusing it with the physical information neural network to construct a gray-box dynamic soft measurement model; training the model using an asymmetric weighted loss function; monitoring prediction errors through a dynamic sliding window, and triggering model updates when concept drift events are detected; finally, inputting real-time parameters into the model, and outputting the real-time predicted value of hydrogen concentration in oxygen and the prediction uncertainty result. This invention balances physical conservation laws and nonlinear dynamic characteristics, improving the accuracy of hydrogen concentration prediction under fluctuating operating conditions and the long-term adaptability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydrogen production technology through water electrolysis, specifically a dynamic soft measurement method for hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions. Background Technology

[0002] Alkaline water electrolysis for hydrogen production is currently the mainstream large-scale hydrogen production technology. During the operation of the electrolyzer, hydrogen and oxygen can permeate across the membrane due to factors such as diaphragm characteristics and operating pressure differentials, resulting in hydrogen mixing into the oxygen side. When the hydrogen concentration in the oxygen rises to near the explosion limit, it poses a serious safety threat to the system operation. Therefore, accurately obtaining the hydrogen concentration in the oxygen is fundamental to ensuring the safe control of the electrolyzer. Conventional hardware sensors are prone to probe aging and measurement hysteresis in strongly alkaline, high-temperature, and two-phase flow environments. Therefore, using soft measurement techniques to derive concentration data from easily measurable operating parameters has become a common method in this field.

[0003] Existing soft measurement methods for hydrogen concentration in oxygen mainly include physical mechanism-based modeling and data-driven modeling. Mechanism-based modeling establishes differential equations by analyzing the thermodynamics, fluid dynamics, and mass transfer processes inside the electrolyzer; data-driven modeling utilizes machine learning algorithms such as neural networks to establish mathematical mappings between input variables such as temperature, pressure, and current and the concentration output from a large amount of historical operating data.

[0004] Existing soft-sensor methods have significant limitations when matching the actual operating conditions of wide power fluctuations in renewable energy. Simple mechanistic models rely heavily on idealized assumptions and static empirical parameters, making it difficult to fit the nonlinear dynamic changes in the flow field caused by fluctuating conditions, and easily leading to model mismatch. While purely data-driven models possess strong nonlinear fitting capabilities, they lack the constraints of actual physical laws. When faced with abrupt changes in operating conditions exceeding the training set distribution or data shifts due to long-term equipment aging, they are prone to outputting predictions that violate physical principles such as mass conservation. Both methods struggle to maintain measurement accuracy and reliability over long periods in dynamically fluctuating environments. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a dynamic soft measurement method for hydrogen concentration in oxygen in alkaline electrolyzers under fluctuating operating conditions. This method solves the problems of poor dynamic adaptability of single-mechanism models and the lack of physical constraints and difficulty in coping with long-term data distribution shifts in existing technologies when performing soft measurement of hydrogen concentration in oxygen in alkaline electrolyzers under fluctuating operating conditions, which leads to decreased prediction accuracy and insufficient generalization ability.

[0006] To achieve the above objectives, the present invention provides the following technical solution: The first aspect of this invention provides a dynamic soft measurement method for hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions, comprising the following steps: Obtain operating parameter data of alkaline electrolyzers under fluctuating operating conditions; A dynamic mechanism model for hydrogen concentration in oxygen was established based on the transmembrane mass transfer theory of gas-liquid two-phase flow. A physical information neural network is constructed, and the dynamic mechanism model is embedded as a physical constraint into the loss function of the physical information neural network; A time-series neural network is used to capture the time-series dependence and nonlinear dynamic characteristics of the operating parameter data, and the physical information neural network is fused with the time-series neural network to construct a gray-box dynamic soft measurement model; The gray box dynamic soft measurement model is trained using an asymmetric weighted loss function; The prediction error of the gray box dynamic soft measurement model is monitored in real time, and the model is updated when a concept drift event is detected. The real-time collected operating parameter data is input into the trained gray box dynamic soft measurement model, which outputs the real-time predicted value of hydrogen concentration in oxygen and the quantification result of prediction uncertainty.

[0007] This invention addresses the challenge of a single mechanistic model or data model failing to simultaneously account for physical conservation and nonlinear dynamic characteristics by embedding a dynamic mechanism model as a physical constraint into a physical information neural network and fusing it with a temporal neural network to construct a gray-box dynamic soft measurement model. Furthermore, by incorporating an asymmetric weighted loss function with a penalty mechanism for safety threshold samples and a dynamic update operation triggered by concept drift events, the model can perform local or global calibration under fluctuating operating conditions and data distribution shifts, thereby maintaining the accuracy of hydrogen concentration prediction in oxygen.

[0008] Furthermore, the dynamic mechanism model for hydrogen concentration in oxygen established based on the gas-liquid two-phase flow transmembrane mass transfer theory specifically includes: Establish a mass conservation equation and characterize the dynamic rate of change of hydrogen concentration in oxygen; A hydrogen transmembrane permeation model considering the bubble shielding effect was constructed to characterize the concentration gradient diffusion process between the anode and cathode. A model of alkali circulation entrainment was constructed to calculate the entrainment mass transfer flux caused by the fluid motion of the liquid. The dynamic mechanism model is established based on the mass conservation equation, the hydrogen transmembrane permeation model, and the alkali circulation entrainment model.

[0009] Furthermore, the step of embedding the dynamic mechanism model as a physical constraint into the loss function of the physical information neural network specifically includes: The derivative of the neural network output prediction with respect to time is directly calculated using automatic differentiation techniques. The derivative is compared with the mechanistic model function, and the physical equation residual loss is constructed. The total loss function is obtained by combining the data fitting loss, the physical equation residual loss, and the safety threshold penalty term constructed based on the exponential penalty function and the preset safety threshold, and then summing them by weight.

[0010] Furthermore, the fusion of the physical information neural network and the temporal neural network to construct the gray-box dynamic soft measurement model specifically includes: Choose between serial fusion or parallel fusion based on actual computing resource requirements; Based on the selected fusion method, the physical information neural network and the temporal neural network are connected and combined at the network level to construct the gray box dynamic soft measurement model.

[0011] Furthermore, the serial fusion method specifically includes: The physical information neural network receives the operating parameter data and outputs preliminary predicted values ​​that follow the master equation of transmembrane mass transfer evolution. The preliminary predicted value and the original input features are concatenated and aggregated along the feature channel dimension, and then input into the temporal neural network for residual learning, outputting a numerical compensation amount. The preliminary predicted value is added to the numerical compensation amount to generate the final predicted result of hydrogen concentration in oxygen.

[0012] Furthermore, the parallel fusion method specifically includes: The physical information neural network and the temporal neural network are used as parallel computing branches, each receiving the operating parameter data independently. The physical information neural network outputs a mechanism-based prediction value, while the temporal neural network outputs a data-driven prediction value. A learnable fusion weight node is introduced to linearly weight and combine the mechanism prediction value and the data-driven prediction value to generate the final hydrogen concentration prediction result in oxygen.

[0013] Furthermore, the training of the gray-box dynamic soft measurement model using an asymmetric weighted loss function specifically includes: Construct the asymmetric weighted loss function such that samples near a preset safety threshold have a high-weighted error penalty gradient; Training samples are constructed based on real concentration data obtained under historical operating conditions and corresponding input operating features. The training samples are input into the gray-box dynamic soft measurement model, and the network connection weights are updated based on the asymmetric weighted loss function and backpropagation algorithm.

[0014] Furthermore, the determination of the concept drift event specifically includes: Maintain a dynamic sliding window to cache the prediction error sequence of the model at consecutive time steps; The dynamic sliding window is divided into two adjacent sub-windows, and the statistical mean of the prediction error sequence within each sub-window is calculated. When the difference between the statistical means of two sub-windows is greater than or equal to a preset judgment threshold, and the window capacity meets the preset window capacity constraint threshold, the concept drift event is determined to have occurred.

[0015] Furthermore, the step of triggering a model update when a concept drift event is detected specifically includes: Perform partial freeze and partial update operations on the gray box dynamic soft measurement model; For the connection weight parameters responsible for data feature fitting in the temporal neural network, high-frequency incremental updates are performed in combination with data from the core set sample library; For the physical constraint correlation coefficients involving fluid mass transfer laws in the physical information neural network, a low-frequency global calibration operation is performed to maintain the physical conservation characteristics.

[0016] Furthermore, the real-time predicted value of hydrogen concentration in the output oxygen and the quantification result of prediction uncertainty specifically include: The random discarding mechanism is kept active in the gray box dynamic soft measurement model. For the same input feature data, forward propagation calculations are performed multiple times to obtain a set of predicted values ​​with random perturbations; The mathematical mean of the predicted value set is calculated as the real-time predicted value at the current moment; The variance of the predicted value set is calculated as the quantification result of the prediction uncertainty at the current time.

[0017] A second aspect of the present invention provides a dynamic soft measurement system for hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions, comprising: The data acquisition module is used to acquire operating parameter data of the alkaline electrolyzer under fluctuating operating conditions; The mechanism model building module is used to establish a dynamic mechanism model of hydrogen concentration in oxygen based on the gas-liquid two-phase flow transmembrane mass transfer theory. The physical constraint embedding module is used to construct a physical information neural network, and embeds the dynamic mechanism model as a physical constraint into the loss function of the physical information neural network. The gray box model construction module is used to capture the temporal dependence and nonlinear dynamic characteristics of the running parameter data using a temporal neural network, and to fuse the physical information neural network with the temporal neural network to construct a gray box dynamic soft measurement model. The model training module is used to train the gray box dynamic soft measurement model using an asymmetric weighted loss function; The concept drift monitoring and update module is used to monitor the prediction error of the gray box dynamic soft measurement model in real time, and triggers model update when a concept drift event is detected. The real-time prediction output module is used to input the real-time collected operating parameter data into the trained gray box dynamic soft measurement model and output the real-time predicted value of hydrogen concentration in oxygen and the result of prediction uncertainty quantification.

[0018] This invention provides a dynamic soft measurement method for hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions. It offers the following advantages: 1. This invention embeds a dynamic mechanism model based on the transmembrane mass transfer theory of gas-liquid two-phase flow into the loss function of a neural network as a physical constraint, and integrates it with a temporal neural network to construct a gray-box dynamic soft-sensor model. This technical feature allows the soft-sensor process to both follow objective physical laws such as mass conservation and fluid mass transfer, and to fit the nonlinear dynamic characteristics of operating parameters. It effectively solves the problems of poor adaptability of single-mechanism models under fluctuating operating conditions and the lack of physical constraints in purely data-driven models, thus improving the accuracy and generalization ability of predicting hydrogen concentration in oxygen under fluctuating operating conditions.

[0019] 2. This invention employs an asymmetric weighted loss function to train the gray-box dynamic soft-sensing model, giving samples near a preset safety threshold a high-weighted error penalty gradient. Through this feature, the model prioritizes fitting critical safety concentration data during network parameter updates, effectively reducing prediction errors when hydrogen concentration approaches dangerous limits. This provides reliable concentration data support for the safety interlock control of alkaline electrolyzers, improving equipment operational safety.

[0020] 3. This invention uses a dynamic sliding window mechanism to monitor prediction errors in real time to identify concept drift events, and performs high-frequency incremental updates for the time-series network and low-frequency global calibration for the correlation coefficients of the physical network when an update is triggered. This technical feature can promptly capture changes in data distribution caused by equipment aging or changes in operating conditions during the long-term operation of the electrolyzer, maintaining the measurement accuracy and physical conservation characteristics of the model during long-term service without consuming a large amount of computing resources by retraining the model. Attached Figure Description

[0021] Figure 1 This is a system module architecture diagram of the present invention; Figure 2 This is a flowchart of the method steps of the present invention; Figure 3 This is the fusion logic diagram of the gray box dynamic soft measurement model of the present invention; Figure 4 The following is a logic diagram for updating the online adaptive model of this invention. Detailed Implementation

[0022] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and 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.

[0023] Please see the appendix Figure 1 A dynamic soft measurement system for hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions is proposed, comprising a data acquisition module, a mechanism modeling module, a hybrid drive modeling module, an error compensation module, an adaptive update module, and an output module.

[0024] The data acquisition module is used to collect operating parameter data of the alkaline electrolyzer under fluctuating operating conditions. These operating parameters include current density, cell voltage, operating temperature, system pressure, alkali circulation flow rate, and voltage ripple. The sampling frequency of the data acquisition module is no less than 1Hz, and the sampling period covers multiple time scales from milliseconds to minutes. Fluctuating operating conditions include power step change conditions, power ramp change conditions, periodic test fluctuation conditions, random fluctuation conditions, and start-up and shutdown conditions.

[0025] The mechanism modeling module is used to establish a dynamic mechanism model of hydrogen concentration in oxygen based on the transmembrane mass transfer theory of gas-liquid two-phase flow. The module includes a mass conservation equation, a dynamic equation for bubble coverage, and an equation for alkali circulation entrainment.

[0026] The hybrid-driven modeling module is used to construct gray-box dynamic soft measurement models that fuse physical information neural networks and temporal neural networks. The module supports both serial and parallel fusion architectures, embedding dynamic mechanism models as physical constraints into the neural network structure.

[0027] The error compensation module uses Kalman filtering to preprocess the input signal in real time, eliminating the interference of high-frequency measurement noise on model prediction. The error compensation module also employs an asymmetric weighted loss function to optimize the model training process.

[0028] The adaptive update module is used to detect concept drift based on the ADWIN algorithm and trigger selective incremental updates. The adaptive update module implements a partial freeze and partial update strategy and maintains a core set sample library to prevent catastrophic forgetting.

[0029] The output module receives operating parameter data and outputs the real-time predicted value of hydrogen concentration in oxygen and the quantification result of prediction uncertainty. The response time of the output module's calculation is less than 5 seconds.

[0030] Please see the appendix Figure 2This invention provides a dynamic soft measurement method for hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions, comprising the following steps: S1, Acquisition of operating parameter data under fluctuating conditions. This involves collecting operating parameter data for the alkaline electrolyzer under fluctuating conditions, including current density, cell voltage, operating temperature, system pressure, alkali circulation flow rate, and voltage ripple. S2. A dynamic mechanism model for hydrogen concentration in oxygen was established. A dynamic mechanism model for hydrogen concentration in oxygen was established based on the transmembrane mass transfer theory of gas-liquid two-phase flow. S3, Construction of Physical Information Neural Network and Embedding of Physical Constraints. A physical information neural network is constructed, and a dynamic mechanism model is embedded as a physical constraint into the loss function of the physical information neural network. S4, Construction of the gray-box dynamic soft measurement model. A temporal neural network is used to capture the temporal dependence and nonlinear dynamic characteristics of the operating parameter data. The physical information neural network and the temporal neural network are fused in a serial or parallel manner to construct the gray-box dynamic soft measurement model. S5, Asymmetric Weighted Loss Function Training. An asymmetric weighted loss function is used to train the gray-box dynamic soft-sensor model, assigning high weights to samples near the safe threshold for hydrogen concentration in oxygen. S6, Online Adaptive Model Update. The ADWIN algorithm is used to monitor the prediction error of the gray-box dynamic soft measurement model in real time, triggering a model update when a concept drift event is detected. S7, Real-time prediction output of hydrogen concentration in oxygen. The system inputs real-time collected operational parameter data into the trained gray-box dynamic soft-sensing model, outputting the real-time predicted value of hydrogen concentration in oxygen and the quantification result of prediction uncertainty.

[0031] The following section will provide a more detailed explanation of the internal logic and steps of each of the above modules, taking into account the specific operating characteristics of the alkaline electrolyzer.

[0032] The specific implementation process of acquiring operating parameter data under fluctuating conditions in step S1 can be further broken down into the following sub-steps for detailed explanation: S101, multi-timescale fluctuation data acquisition. The data acquisition module communicates with the field sensors and control system of the alkaline electrolyzer to acquire operating parameter data in real time. The acquired operating parameter data includes current density, cell voltage, operating temperature, system pressure, alkali circulation flow rate, and voltage ripple.

[0033] To characterize the general laws of gas-liquid two-phase mass transfer in the electrolyzer, the operating temperature change mainly affects the diffusion coefficient of hydrogen in the alkaline solution, the system pressure is directly related to the transmembrane solubility of the gas, and the alkaline solution circulation flow rate determines the entrainment rate of the gas in the liquid phase.

[0034] Based on the physical influence of the above process variables on gas cross-diffusion, and due to the dynamic inertia and delay characteristics of the reaction inside the electrolyzer under fluctuating conditions, the sampling frequency of the data acquisition module is set to be no less than 1Hz, so that the sampling period can cover a multi-timescale range from milliseconds to minutes.

[0035] The fluctuation conditions in actual operation include power step change conditions, power ramp change conditions, sinusoidal fluctuation conditions, random fluctuation conditions, and start-up and shutdown conditions.

[0036] Under fluctuating conditions of low load or increased system pressure, hydrogen solubility and transmembrane diffusion increase, causing the hydrogen volume fraction in oxygen to approach the safety boundary. The data acquisition in this step provides the raw input for subsequent dynamic evolution analysis.

[0037] S102, high-frequency noise reduction preprocessing based on Kalman filtering. The industrial alkaline electrolyzer operating environment contains electromagnetic interference and measurement noise generated by the high-frequency operation of the converter. The data acquisition module transmits the acquired raw operating parameter data to the error compensation module.

[0038] The error compensation module employs a Kalman filter algorithm to preprocess the input signal in real time, mitigating the interference of high-frequency measurement noise on subsequent model predictions. Based on a discrete state-space model, the Kalman filter combines the state estimate from the previous time step with the measured value at the current time step, and updates the optimal state estimate at the current time step by calculating the Kalman gain.

[0039] For the specific calculation of the state transition matrix and observation matrix and the state covariance update process in Kalman filtering, those skilled in the art can make conventional configurations based on the noise characteristics of the actual measurement sensor. The basic state estimation principle is a well-known technology in this field and will not be elaborated here.

[0040] Kalman filtering helps remove high-frequency measurement noise superimposed on real measurement signals such as current density or slot voltage, reducing the risk of misinterpreting noise fluctuations as sudden changes in operating conditions.

[0041] S103, Feature Importance Assessment and Screening Integrating Physical Priors. After data preprocessing, the error compensation module uses mutual information and SHAP value methods to assess the feature importance of the filtered operating parameter data.

[0042] In practice, the mutual information method is first used to calculate the nonlinear correlation score between each operating parameter and historical data on hydrogen concentration in oxygen. Simultaneously, a benchmark regression model for feature evaluation is trained offline based on historical operating data, and this model is used to calculate the SHAP value of each feature to quantify the specific marginal contribution of input features such as operating temperature and alkali circulation flow rate to the prediction of hydrogen concentration in oxygen.

[0043] In the feature selection stage, the mutual information correlation score and the contribution of the SHAP value are normalized and then weighted and summed to calculate the comprehensive importance index of each operating parameter. An importance cutoff threshold is set based on engineering experience, or several features with the highest comprehensive importance index are selected, and auxiliary variables with scores below the threshold are removed.

[0044] The aforementioned screening mechanism extracts key auxiliary variables that significantly influence gas cross-diffusion, ultimately constructing a soft-sensor initial feature set that integrates physical priors. This initial feature set is then passed as a data input tensor with specific data dimensions to the backend mechanistic modeling module and hybrid-driven modeling module.

[0045] The mechanism modeling module receives the operational parameter data processed by the error compensation module and executes step S2 to construct a dynamic mechanism model of hydrogen concentration in oxygen. This step can be broken down into the following sub-steps: S201, construct the master equation for the dynamic evolution of gas-liquid two-phase mass transfer based on mass conservation. During the operation of the alkaline electrolyzer, the accumulation of hydrogen on the oxygen side mainly comes from the physical permeation of hydrogen through the diaphragm and the dissolved hydrogen brought in by the alkaline solution circulation pipeline. At the same time, the oxygen continuously generated at the anode will dilute the mixed hydrogen.

[0046] Based on the aforementioned physical process of gas cross-diffusion, the mechanism modeling module establishes a mass conservation equation to characterize the dynamic rate of change of hydrogen concentration in oxygen. This dynamic evolution process is expressed as: ; In the formula, This refers to the oxygen side volume of the electrolyzer; This represents the hydrogen concentration in oxygen. For time; This is the derivative of the hydrogen concentration in oxygen with respect to time. This represents the hydrogen transmembrane permeation flux; For the entrainment flux of the alkali solution circulation; Dilute flux for oxygen production.

[0047] Among them, oxygen production dilution flux Directly related to the oxygen yield at the anode, those skilled in the art can calculate the theoretical oxygen production based on Faraday's law of electrolysis using real-time measured current density, and then convert the dilution flux value by combining the electrolysis efficiency and the current hydrogen concentration in the oxygen. The calculation principle is a well-known technology in the field and will not be elaborated here.

[0048] S202, Construct a hydrogen transmembrane permeation model considering the bubble shielding effect. The generation and attachment of bubbles on the electrode surfaces inside the electrolyzer alter the effective mass transfer area. The mechanism modeling module introduces bubble coverage to correct the traditional concentration gradient diffusion process. The hydrogen transmembrane permeation flux is jointly affected by current density, pressure difference, and bubble coverage, expressed as: ; In the formula, This represents the hydrogen transmembrane permeation flux; For time; This is the proportionality coefficient; Operating temperature; This is the diffusion coefficient of hydrogen in the electrolyte, and its value varies with operating temperature. The changes can be determined based on the Arrhenius empirical formula or by consulting a physical property handbook; The effective thickness of the diaphragm is denoted as , and is a known physical parameter of the equipment. This refers to the dissolved hydrogen concentration on the cathode side. This refers to the dissolved hydrogen concentration on the anode side. This represents the bubble coverage rate.

[0049] System pressure and the pressure difference between the anode and cathode The dissolved hydrogen concentration on the cathode side is directly determined by Henry's Law. and the concentration of dissolved hydrogen on the anode side The greater the magnitude of the pressure difference, the more pronounced the concentration gradient on both sides, which in turn exacerbates the transmembrane diffusion of hydrogen.

[0050] Industrial alkaline electrolyzers exhibit reaction inertia delay under fluctuating operating conditions. This delay is related to the dynamic process of bubble desorption and dissipation on the gas electrode surface. To characterize the transient process of bubbles reaching a new equilibrium state during a step change in load, the mechanism modeling module uses a first-order hysteresis model to approximate the dynamic characteristics of bubble coverage, expressed as: ; In the formula, It is a time constant; Bubble coverage; For time; This is the derivative of bubble coverage with respect to time. Current density; This represents the steady-state bubble coverage as a function of current density.

[0051] S203, Construct an alkaline solution circulation entrainment model. In the electrolyzer's liquid circulation system, trace amounts of dissolved hydrogen that are not completely separated from the gas at the cathode will flow back to the anode with the alkaline solution. The mechanism modeling module, combined with real-time acquired alkaline solution circulation flow data, calculates the entrainment mass transfer flux caused by the liquid fluid motion in this part, expressed as: ; In the formula, For the entrainment flux of the alkali solution circulation; For time; This refers to the alkali solution circulation flow rate; The concentration of entrained hydrogen gas.

[0052] S204, Offline Parameter Identification for Dynamic Mechanism Model. The dynamic mechanism model built into the mechanism modeling module contains undetermined parameters related to the physical characteristics of a specific electrolyzer. Parameter identification needs to be performed before the dynamic soft-sensor system can be used for online prediction.

[0053] Based on historical experimental data from electrolyzer operation, nonlinear least squares method or particle swarm optimization algorithm was used to identify model parameters. Model parameters include the time constant in the dynamic equation for bubble coverage. Proportioning coefficient in transmembrane osmosis model and the concentration of entrained hydrogen in the alkali circulation model .

[0054] For the specific numerical solution process of calculating the minimum value of the sum of squared residuals of measured data and model output using the nonlinear least squares method, those skilled in the art can use standard mathematical optimization algorithms. The principle of parameter iterative optimization is a well-known technology in this field and will not be elaborated here.

[0055] The dynamic mechanism model, which has been identified by parameters, establishes the physical evolution rules of gas cross-diffusion. The output of this model will serve as the physical constraints for subsequent neural network training.

[0056] The hybrid-driven modeling module executes step S3, constructing a physical information neural network, and embedding the dynamic mechanism model of hydrogen concentration in oxygen established in step S2 as a rigid physical boundary constraint into the network's loss function. The specific implementation process of this step can be further broken down into the following sub-steps for detailed explanation: S301 forms the foundational computational architecture for building a physical information neural network. The hybrid-driven modeling module constructs a deep neural network as the backbone model of the physical information neural network. This network is configured with an input layer, a nonlinear hidden layer, and an output layer. The input layer receives time variables and acquired operating parameter data, including current density, cell voltage, operating temperature, system pressure, alkali circulation flow rate, and voltage ripple. The output layer outputs the predicted hydrogen concentration in oxygen at the current moment.

[0057] The specific configuration of the hidden layer structure of this neural network can be set by those skilled in the art according to the dimensions of the actual feature data. The network construction method is a well-known technology in this field and will not be described in detail here.

[0058] S302, dynamic mechanism derivative solution based on automatic differentiation technology. To integrate the physical mechanism of transmembrane mass transfer in gas-liquid two-phase flow into the data-driven training process, the hybrid-driven modeling module uses the automatic differentiation function of the deep learning framework to directly calculate the gradient of the predictor variable.

[0059] After generating the predicted hydrogen concentration in oxygen through forward propagation of the network, the derivative of the predicted hydrogen concentration in oxygen output by the neural network with respect to time is calculated in the underlying computational graph using automatic differentiation technology and the chain rule. The automatic differentiation technique eliminates the need for discretization, avoiding the numerical truncation error caused by explicitly solving differential equations, thus providing a high-precision derivative term for subsequently constructing residual constraints.

[0060] S303, Construct a joint loss for data fitting that includes physical constraints. The hybrid-driven modeling module establishes physical constraints based on the gas-liquid two-phase flow transmembrane mass transfer dynamic mechanism model constructed in step S2. The derivative obtained by automatic differentiation is compared with the mechanism model function to constrain network training in the form of residuals. The hybrid-driven modeling module combines the data fitting loss with the physical equation residual loss. The expression for the data fitting loss is: ; In the formula, For data fitting loss; This represents the number of samples with labeled measurement data. The measurement sample number; For the first The actual measurement value of each sample; For the first The model prediction value for each sample.

[0061] The expression for the residual loss of the physical equation is: ; In the formula, This represents the residual loss in the physical equations. The number of unlabeled spatiotemporal configuration points; Assign a spatiotemporal configuration point number; The time derivative of the neural network output obtained using automatic differentiation techniques; The dynamic mechanism model function established for step S2; The predicted value of hydrogen concentration in oxygen is output by the neural network. Enter variables for runtime parameters; These are parameters related to physical constraints.

[0062] S304, Design the safety boundary penalty term and construct the total loss function. The hydrogen concentration in oxygen within an industrial alkaline electrolyzer poses an extremely high safety risk when approaching the lower explosive limit. The hybrid-driven modeling module further introduces an exponential penalty function as the safety threshold penalty term, based on the aforementioned joint loss. The expression for this safety threshold penalty term is: ; In the formula, This is a penalty item for the safety threshold. This represents the number of samples used to calculate the boundary penalty; The sample number is the boundary penalty sample number; For the first The model prediction value for each sample; The preset safety threshold; A scaling parameter for controlling the rate of increase of penalties; For indicator functions, when the condition The value is 1 if the condition is met, and 0 otherwise. Those skilled in the art can pre-calibrate the values ​​of the above safety thresholds and dimensional parameters based on the explosion-proof safety standards of the actual electrolytic cell.

[0063] The hybrid-driven modeling module weights and sums the data fitting loss, physical equation residual loss, and safety threshold penalty term to construct the total loss function for parameter optimization of the physical information neural network. The expression for the total loss function is as follows: ; In the formula, This is the total loss function; For data fitting loss; This represents the residual loss in the physical equations. This is a penalty item for the safety threshold. The weighting coefficients for the residual loss of the physical equations; This is the weighting coefficient for the safety threshold penalty term.

[0064] The hybrid-driven modeling module executes the backpropagation algorithm based on the total loss function to update the connection weights inside the physical information neural network. This allows the model to fit historical operating data while strictly adhering to the physical law of mass conservation and having safety warning and penalty constraints in dangerous concentration ranges.

[0065] Please see the appendix Figure 3 The hybrid-driven modeling module, based on the physical information neural network established in step S3, executes step S4 to construct the gray-box dynamic soft measurement model. The specific implementation process of this step can be further broken down into the following sub-steps for detailed explanation: S401, Construct a temporal neural network for feature extraction. Since the changes in hydrogen concentration in oxygen within an alkaline electrolyzer under fluctuating operating conditions exhibit significant physical inertia and time delay, the hybrid drive modeling module introduces a temporal neural network to capture the temporal dependencies and nonlinear dynamic characteristics inherent in the operating parameter data sequence.

[0066] For the preprocessing logic of the input data, the system constructs a sliding time window sequence with a specific time step from the operating parameter data of multiple consecutive sampling periods, forming an input data tensor with time step as the data dimension and feature dimension as the feature dimension, where the feature dimension covers parameters such as current density, cell voltage, and operating temperature. The temporal neural network specifically adopts a long short-term memory network or a temporal convolutional network.

[0067] In a preferred embodiment, the temporal neural network employs a long short-term memory network, whose internal hierarchical structure along the data flow direction includes, in sequence, an input layer, a long short-term memory network layer, a dropout layer, a fully connected layer, and an output layer.

[0068] The input layer is configured to receive sequence feature data preprocessed through the sliding time window described above. The number of hidden units in the Long Short-Term Memory (LSTM) network layer is preferably set between 64 and 256 to extract the temporal correlation information of the input features. The node dropout rate of the dropout layer is preferably configured to 0.2 to block some neuron connections and prevent overfitting. The fully connected layer reconstructs the dimensions of the extracted temporal features, and the output layer outputs feature representation values ​​corresponding to the business requirements.

[0069] The specific state update process for the retention of control information of the forget gate, input gate, and output gate in long short-term memory networks can be implemented by those skilled in the art based on standard deep learning algorithm libraries. The principle of its temporal feature processing is a well-known technology in this field and will not be elaborated here.

[0070] S402, gray-box model construction based on serial fusion. The hybrid-driven modeling module supports serial and parallel fusion architectures of physical information neural networks and temporal neural networks. In the serial fusion mode, the hybrid-driven modeling module configures the physical information neural network as a pre-built module.

[0071] The physical information neural network receives operational parameter data from the current and historical time windows and outputs preliminary predictions that follow the master equation for transmembrane mass transfer evolution. These preliminary predictions reflect the dominant role of physical mechanisms in concentration changes.

[0072] Subsequently, the hybrid-driven modeling module concatenates and aggregates the preliminary predicted values ​​with the original input features along the feature channel dimension, using them together as input data for the subsequent temporal neural network. The temporal neural network learns the residual features of the input sequence and outputs a numerical compensation amount for the mechanistic prediction error.

[0073] The hybrid-driven modeling module ultimately adds the preliminary predictions from the front-end module to the numerical compensation from the back-end module, generating the final hydrogen concentration prediction in oxygen under the serial fusion architecture. This architecture utilizes data-driven nonlinear fitting capabilities to compensate for and correct unknown disturbances that are difficult for physical models to fully characterize.

[0074] S403, a gray-box model construction based on a parallel fusion approach. In this parallel fusion approach, the hybrid-driven modeling module configures the physical information neural network and the temporal neural network as parallel computational branches. The physical information neural network branch and the temporal neural network branch receive runtime parameter data independently and synchronously, and perform forward propagation computations separately.

[0075] The physical information neural network branch outputs mechanistic predictions with high physical consistency, while the temporal neural network branch outputs data-driven predictions with high fitting accuracy. The hybrid-driven modeling module introduces learnable fusion weight nodes at the ends of the two branches to linearly weight and combine the mechanistic and data-driven predictions to generate the final hydrogen concentration prediction result in oxygen.

[0076] The initial value of the fusion weights can be configured as an equally distributed constant, such as 0.5, and adaptive iterative optimization based on gradient descent algorithm is performed during subsequent end-to-end model training to dynamically adjust the contribution ratio of physical mechanism and data-driven factors under the current specific working condition.

[0077] S404, gray-box dynamic soft measurement model structure encapsulation and service mapping. The hybrid-driven modeling module selects either the serial or parallel fusion method mentioned above, based on actual computing resource configuration requirements, to complete the network-level connection combination.

[0078] The combined network constitutes the gray box dynamic soft measurement model, and its final output corresponds to the specific physical state of the actual oxygen-hydrogen volume concentration percentage inside the electrolyzer at the current time step.

[0079] This model combines the extrapolation reliability of the physical mechanism model with the dynamic response capability of the pure data-driven model, laying the network structure foundation for subsequent joint parameter optimization using an asymmetric weighted loss function.

[0080] The error compensation module, in conjunction with the hybrid-driven modeling module, executes step S5, using an asymmetric weighted loss function to train the network parameters of the gray-box dynamic soft measurement model, and combining the Monte Carlo Dropout method to quantify the model's prediction uncertainty. The specific implementation process of this step can be broken down into the following sub-steps: S501, Constructing an Asymmetric Weighted Loss Function. In the actual operation of an alkaline electrolyzer, when the hydrogen concentration in oxygen approaches the system's lower explosion limit, the engineering cost of missed alarms due to model prediction errors is far higher than the cost of false alarms under normal low-concentration conditions. To improve the prediction accuracy of the soft sensor model when approaching dangerous conditions, the error compensation module constructs an asymmetric weighted loss function, assigning higher gradient weight penalties to samples near the safety threshold. The expression for this asymmetric weighted loss function is: ; ; In the formula, It is an asymmetric weighted loss function; This represents the total number of training samples; The sample number; For the first The weight coefficients corresponding to each sample; For the first The model prediction value for each sample; For the first The actual measurement value of each sample; High-weight coefficients; Low-weight coefficients; This is a safety threshold; For safety margin.

[0081] Regarding the specific values ​​of the above parameters, the safety threshold The preferred setting is 1.5% volume fraction to ensure a sufficient control response window before reaching the 2.0% lower physical explosion limit; safety margin The preferred volume fraction is 0.3%. When the actual measured value of a sample is greater than or equal to 1.2% of the volume fraction, the sample is determined to have entered the danger warning zone and a high-weight penalty is triggered. High-weight coefficient. The value range is set to 5 to 10, with a low weighting coefficient. The value is set to 1.

[0082] S502, backpropagation training of the gray-box dynamic soft measurement model. The error compensation module constructs a training dataset containing input running features and ground truth labels. For the real measurement values... The source of the data is the high-precision real concentration data obtained by offline analysis of a high-precision gas chromatograph under historical operating conditions. Based on the timestamp and the input operating characteristics at the corresponding time, the data is time-series aligned to form supervised learning sample pairs.

[0083] The error compensation module inputs training samples into the gray-box dynamic soft measurement model to perform forward propagation, and calculates the error gradient of the current network weights based on the aforementioned asymmetric weighted loss function. It then uses the backpropagation algorithm to calculate the gradient values ​​of the network parameters in each layer and updates the connection weights within the model.

[0084] For the selection of optimizer algorithm and the setting of dynamic learning rate decay rules during training, those skilled in the art can use the Adam optimizer for standard configuration. Its parameter iterative optimization mechanism is a well-known technology in this field and will not be elaborated here.

[0085] S503, a forward sampling test based on the Monte Carlo Dropout mechanism. Industrial environments are characterized by high-frequency electromagnetic interference and sensor measurement noise, making the model's single deterministic output susceptible to perturbations by local features. The error compensation module forcibly activates the dropout layer configured within the temporal neural network when the gray-box dynamic soft measurement model completes training and is put into the testing and verification phase.

[0086] In practice, for each frame of real-time running parameter tensor, the error compensation module keeps the random drop-off mechanism active during the network's forward propagation. For input feature data at the same time, the error compensation module controls the gray-box dynamic soft measurement model to repeatedly perform forward propagation calculations multiple times. The number of repeated forward propagations within a single data sampling period is configured to be no less than 100 times, thereby obtaining a set of predicted values ​​with random perturbations generated from a single input.

[0087] S504, Quantification of Prediction Uncertainty and Mapping to Business Status. The error compensation module performs statistical calculations on the set of predicted values ​​generated by the multiple forward propagations, solving for the mathematical mean and variance of the data set. The calculated mean is output as the final predicted value of hydrogen concentration in oxygen at the current time step. Simultaneously, the calculated variance is output as a quantification index of the current model's prediction uncertainty.

[0088] The variance value constitutes the confidence interval of the prediction result. When the variance exceeds the preset safe confidence threshold, it indicates that the model's current prediction has a high-risk blind zone, and the reliability of the single concentration prediction mean decreases. The system uses this uncertainty quantification result as an auxiliary decision-making basis to trigger conservative power reduction operation of the electrolyzer or prompt the operator to make manual intervention, thereby making up for the lack of risk prediction capability of traditional point estimation models under extreme unsteady conditions.

[0089] Please see the appendix Figure 4 The adaptive update module executes step S6, which uses the ADWIN algorithm to monitor prediction errors in real time to detect concept drift and performs adaptive updates to the gray-box dynamic soft measurement model when necessary. The specific implementation process of this step can be broken down into the following sub-steps: S601, prediction error monitoring based on a dynamic sliding window. With long-term service in alkaline electrolyzers, physical evolution phenomena such as diaphragm performance degradation and catalyst activity decline often occur within the equipment. These hardware-level changes lead to a conceptual shift in the system's input-output mapping relationship. The adaptive update module introduces the ADWIN algorithm to perform closed-loop monitoring of the prediction performance of the gray-box dynamic soft-sensor model. In specific implementation, the adaptive update module maintains a dynamically sliding window of variable length in memory to cache the model prediction error sequence for consecutive time steps.

[0090] The prediction error here specifically refers to the absolute error between the model's predicted value and the actual measured value. This dynamic sliding window is logically divided into two adjacent sub-windows. The adaptive update module continuously calculates the statistical mean of the error sequences within the two sub-windows. When the difference between the means of the two sub-windows is greater than or equal to a set threshold, and the window capacity meets the constraints, it is determined that the current system's operating data distribution has experienced concept drift. The logical condition expression for concept drift is: ; In the formula, This is the first child window after the dynamic sliding window is divided. This is the second child window after the dynamic sliding window is divided. The number of samples contained in the first sub-window; The number of samples contained in the second sub-window; This represents the mean prediction error within the first sub-window. This represents the mean prediction error within the second sub-window. This is the threshold for determining the difference in the mean error. This is the constraint threshold for window capacity.

[0091] Regarding the judgment threshold The specific method for determining the value can be dynamically derived and calculated by those skilled in the art based on the conventional Hoeffding inequality principle and the user-preset statistical confidence parameters, so as to achieve a balance between false alarm rate and detection sensitivity. The relevant calculation process is a well-known technology in the field and will not be described in detail here.

[0092] S602 performs selective online updates for the hierarchical architecture. When a concept drift event is triggered, the adaptive update module initiates partial freezing and partial updating operations for the gray-box dynamic soft measurement model. This strategy configures update logic at different time scales based on the physical properties corresponding to different parameters in the model.

[0093] On one hand, the adaptive update module performs high-frequency incremental updates on the connection weight parameters responsible for fitting data features in the temporal neural network. Utilizing the runtime parameter data collected within the latest time window after concept drift, and combining it with core set samples, joint fine-tuning training is performed, enabling the network to quickly capture recent local time-varying features. To prevent frequent updates from overloading system computing resources or causing model oscillations, a trigger cooling-off period for this high-frequency incremental update is set, preferably configured so that the interval between two adjacent updates is no less than 10 minutes.

[0094] On the other hand, for the physical constraint correlation coefficients in the physical information neural network layer, the adaptive update module performs low-frequency global calibration. Due to the long-period sluggish characteristics of the evolution of physical laws such as fluid and mass transfer, this low-frequency global calibration is triggered when the ADWIN algorithm detects concept drift and more than 24 hours have passed since the last global calibration, or it is forcibly executed after the electrolytic cell is detected to have stopped and restarted.

[0095] This strategy helps to maintain the underlying physical conservation properties of the model while adapting to the characteristics of the latest fluctuations.

[0096] S603, Construction and Dynamic Maintenance of a Representative Core Set Sample Library. To mitigate the catastrophic forgetting phenomenon that easily occurs during continuous incremental learning of neural networks, the adaptive update module constructs a core set sample library to preserve historical features.

[0097] In a specific embodiment, the adaptive update module uses the K-center algorithm to filter out representative samples with high feature differences from the continuously generated data stream and store them in the core sample library. The maximum capacity of this sample library is preferably set to 2000 samples.

[0098] For the long-term maintenance mechanism of this core set, when the number of newly selected representative samples causes the total number of samples in the database to reach the preset upper limit of 2000, the adaptive update module initiates a dynamic replacement logic based on feature space distance. The system calculates the Euclidean distance between the newly added sample and the existing samples in the database in the multidimensional feature space, and removes redundant historical old samples with the smallest distance, i.e., the highest feature overlap.

[0099] This replacement logic maintains optimal feature coverage of the core sample library for the global operating conditions with a fixed computational memory overhead, avoiding the algorithmic dead zone of sample overflow in the update mechanism. The model after parameter update will be directly deployed to overwrite the original model for real-time prediction calculation of hydrogen concentration in oxygen at subsequent time steps.

[0100] The output module, in conjunction with the data acquisition module and the error compensation module, executes step S7 to achieve real-time prediction results of hydrogen concentration in oxygen and an industrial-grade closed-loop output of prediction uncertainty assessment. The specific implementation process of this step can be broken down into the following sub-steps: S701, Real-time Operating Parameter Reception and Tensor Quantization Preprocessing. During the continuous production process of the alkaline electrolyzer, the data acquisition module continuously acquires operating parameter data such as current density, cell voltage, and operating temperature at a sampling frequency of not less than 1Hz.

[0101] Since sensor measurement signals in industrial environments are often inevitably mixed with high-frequency electromagnetic interference and process fluctuation noise, the output module prioritizes transmitting the received raw data stream to the error compensation module. The error compensation module performs real-time denoising preprocessing on the input signal using a built-in Kalman filter algorithm, thereby eliminating the interference of high-frequency measurement noise on subsequent model prediction calculations.

[0102] Subsequently, based on a pre-set time step, the system buffers and splices the pre-processed single-frame scalar data along the time axis to construct a temporal feature tensor that matches the input interface requirements of the gray-box dynamic soft measurement model.

[0103] S702, Forward Inference of the Gray-Box Dynamic Soft Measurement Model. The output module continuously feeds the constructed real-time temporal feature tensor into the gray-box dynamic soft measurement model in the deployment and running state. Inside the model computation graph, the system performs network forward propagation calculations according to the previously configured serial fusion or parallel fusion architecture. In the serial architecture, the physical information neural network module generates preliminary prediction values ​​and feeds them into the temporal neural network for error compensation inference; in the parallel architecture, the two network branches synchronously perform forward inference and perform weighted combination of the results.

[0104] After forward inference through the network, the model's final output node directly calculates the predicted mean of the actual hydrogen volume concentration in oxygen on the oxygen side of the electrolyzer at the current moment. Simultaneously, the model, combined with the aforementioned Monte Carlo Dropout mechanism, synchronously outputs the corresponding prediction uncertainty variance index. Since this forward inference process essentially relies on matrix multiplication and addition operations within the deep network, it completely avoids the extremely time-consuming iterative solution process at the micro-grid scale of traditional mechanistic computational fluid dynamics models, resulting in extremely low inference time per node.

[0105] Under this architecture, the output module achieves a full-link response speed of less than 5 seconds from underlying data acquisition and signal filtering to the final generation of predicted values, which completely overcomes the physical measurement lag defects of traditional thermal conductivity sensors or gas chromatographs that are often tens of seconds or even minutes.

[0106] S703, the prediction results are distributed and linked with industrial control. To achieve a physical closed loop between safety monitoring and equipment operation, the output module encapsulates the calculated real-time prediction values ​​and the quantification results of prediction uncertainties into standard industrial communication protocol messages. These messages are transmitted in real time via fieldbus to the distributed control system of the electrolytic cell system or the host computer monitoring interface.

[0107] The distributed control system performs explosion-proof safety logic judgments based on this predicted signal: When the real-time predicted value of hydrogen concentration in oxygen approaches the safety threshold, or when the model characterizing the prediction uncertainty enters the prediction blind zone, the distributed control system automatically triggers audible and visual warning signals, and, if necessary, issues control commands to reduce the current operating power or urgently cut off the system power supply. Through this data link output, the soft measurement algorithm is transformed into a practical industrial safety barrier.

[0108] For the specific data framing method and hardware interface transmission network configuration of standard industrial communication protocols, those skilled in the art can carry out conventional deployment and development based on the architecture of the actual control system on site. The signal transmission and communication protocol parsing principles are well-known technologies in this field and will not be elaborated here.

[0109] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A dynamic soft measurement method for hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions, characterized in that, Includes the following steps: Obtain operating parameter data of alkaline electrolyzers under fluctuating operating conditions; A dynamic mechanism model for hydrogen concentration in oxygen was established based on the transmembrane mass transfer theory of gas-liquid two-phase flow. A physical information neural network is constructed, and the dynamic mechanism model is embedded as a physical constraint into the loss function of the physical information neural network; A time-series neural network is used to capture the time-series dependence and nonlinear dynamic characteristics of the operating parameter data, and the physical information neural network is fused with the time-series neural network to construct a gray-box dynamic soft measurement model; The gray box dynamic soft measurement model is trained using an asymmetric weighted loss function; The prediction error of the gray box dynamic soft measurement model is monitored in real time, and the model is updated when a concept drift event is detected. The real-time collected operating parameter data is input into the trained gray box dynamic soft measurement model, which outputs the real-time predicted value of hydrogen concentration in oxygen and the quantification result of prediction uncertainty.

2. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 1, characterized in that, The dynamic mechanism model for hydrogen concentration in oxygen, established based on the transmembrane mass transfer theory of gas-liquid two-phase flow, specifically includes: Establish a mass conservation equation and characterize the dynamic rate of change of hydrogen concentration in oxygen; A hydrogen transmembrane permeation model considering the bubble shielding effect was constructed to characterize the concentration gradient diffusion process between the anode and cathode. A model of alkali circulation entrainment was constructed to calculate the entrainment mass transfer flux caused by the fluid motion of the liquid. The dynamic mechanism model is established based on the mass conservation equation, the hydrogen transmembrane permeation model, and the alkali circulation entrainment model.

3. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 1, characterized in that, The step of embedding the dynamic mechanism model as a physical constraint into the loss function of the physical information neural network specifically includes: The derivative of the neural network output prediction with respect to time is directly calculated using automatic differentiation techniques. The derivative is compared with the mechanistic model function, and the physical equation residual loss is constructed. The total loss function is obtained by combining the data fitting loss, the physical equation residual loss, and the safety threshold penalty term constructed based on the exponential penalty function and the preset safety threshold, and then summing them by weight.

4. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 1, characterized in that, The step of fusing the physical information neural network with the temporal neural network to construct a gray-box dynamic soft measurement model specifically includes: Choose between serial fusion or parallel fusion based on actual computing resource requirements; Based on the selected fusion method, the physical information neural network and the temporal neural network are connected and combined at the network level to construct the gray box dynamic soft measurement model.

5. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 4, characterized in that, The implementation of the serial fusion method specifically includes: The physical information neural network receives the operating parameter data and outputs preliminary predicted values ​​that follow the master equation of transmembrane mass transfer evolution. The preliminary predicted value and the original input features are concatenated and aggregated along the feature channel dimension, and then input into the temporal neural network for residual learning, outputting a numerical compensation amount. The preliminary predicted value is added to the numerical compensation amount to generate the final predicted result of hydrogen concentration in oxygen.

6. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 4, characterized in that, The implementation of the parallel fusion method specifically includes: The physical information neural network and the temporal neural network are used as parallel computing branches, each receiving the operating parameter data independently. The physical information neural network outputs a mechanism-based prediction value, while the temporal neural network outputs a data-driven prediction value. A learnable fusion weight node is introduced to linearly weight and combine the mechanism prediction value and the data-driven prediction value to generate the final hydrogen concentration prediction result in oxygen.

7. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 1, characterized in that, The training of the gray-box dynamic soft measurement model using an asymmetric weighted loss function specifically includes: Construct the asymmetric weighted loss function such that samples near a preset safety threshold have a high-weighted error penalty gradient; Training samples are constructed based on real concentration data obtained under historical operating conditions and corresponding input operating features. The training samples are input into the gray-box dynamic soft measurement model, and the network connection weights are updated based on the asymmetric weighted loss function and backpropagation algorithm.

8. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 1, characterized in that, The determination of the concept drift event specifically includes: Maintain a dynamic sliding window to cache the prediction error sequence of the model at consecutive time steps; The dynamic sliding window is divided into two adjacent sub-windows, and the statistical mean of the prediction error sequence within each sub-window is calculated. When the difference between the statistical means of two sub-windows is greater than or equal to a preset judgment threshold, and the window capacity meets the preset window capacity constraint threshold, the concept drift event is determined to have occurred.

9. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 1, characterized in that, The step of triggering a model update when a concept drift event is detected specifically includes: Perform partial freeze and partial update operations on the gray box dynamic soft measurement model; For the connection weight parameters responsible for data feature fitting in the temporal neural network, high-frequency incremental updates are performed in combination with data from the core set sample library; For the physical constraint correlation coefficients involving fluid mass transfer laws in the physical information neural network, a low-frequency global calibration operation is performed to maintain the physical conservation characteristics.

10. The method for dynamic soft measurement of hydrogen concentration in oxygen in an alkaline electrolyzer under fluctuating operating conditions according to claim 1, characterized in that, The real-time predicted value of hydrogen concentration in the output oxygen and the quantification result of prediction uncertainty specifically include: The random discarding mechanism is kept active in the gray box dynamic soft measurement model. For the same input feature data, forward propagation calculations are performed multiple times to obtain a set of predicted values ​​with random perturbations; The mathematical mean of the predicted value set is used as the real-time predicted value at the current moment. The variance of the predicted value set is calculated as the quantification result of the prediction uncertainty at the current time.