A simulated gas mass flow controller for hydrogen energy preparation gas preparation
Patent Information
- Application Number
- CN202611190517.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-09-15
Smart Images

Figure CN122756293A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of gas flow control technology, specifically relating to a simulated gas mass flow controller for hydrogen energy production and distribution. Background Technology
[0002] Hydrogen energy, as a key energy carrier for achieving the strategic goals of "carbon peaking and carbon neutrality," encompasses four major segments in its industrial chain: hydrogen production, storage, transportation, and utilization. Gas mass flow controllers are core instruments used in hydrogen production and distribution processes to ensure production safety, improve process efficiency, and enhance product quality. They are widely applied in precise hydrogen flow control scenarios. However, hydrogen's unique physical properties, such as its small molecular weight, low density, and flammability and explosiveness, present numerous technical challenges to flow measurement and control. Existing gas mass flow controllers have the following main shortcomings in hydrogen distribution applications:
[0003] Firstly, the measurement accuracy and long-term stability under hydrogen medium are insufficient. Traditional turbine flow meters, ultrasonic flow meters, thermal mass flow controllers, and Coriolis mass flow meters all suffer from varying degrees of decreased measurement accuracy, low signal-to-noise ratio, thermal equilibrium drift, or excessive pressure loss under the special physical properties of hydrogen, such as low density, low pressure, and high sound velocity. This makes it difficult for existing products to meet the stringent requirements for long-term measurement accuracy and stability in hydrogen production and gas mixing.
[0004] Secondly, the dynamic response capability is difficult to adapt to fluctuating operating conditions. Green hydrogen production is highly dependent on fluctuating renewable energy sources such as photovoltaics and wind power. The output fluctuations are translated into dynamic setpoint changes in the gas distribution flow through the upstream energy management system. Existing controllers mostly adopt traditional control strategies such as PID, which have limited adaptability to step changes in setpoints and operating condition disturbances. In scenarios where the target flow rate changes frequently, it is difficult to achieve fast and stable tracking and adjustment.
[0005] Third, it lacks real-time sensing and adaptive compensation capabilities for resistance characteristics. Hydrogen exhibits significant compressibility and the Joule-Thomson effect under high-pressure conditions, causing the internal resistance characteristics of the controller to change significantly with variations in operating parameters such as pressure, temperature, and flow rate. Existing controllers typically lack online sensing and compensation capabilities for their own resistance characteristics. When operating conditions change, it is difficult to determine whether the source of measurement and control deviations is external disturbance or internal characteristic drift, resulting in a lack of specificity in the control strategy and insufficient accuracy and robustness.
[0006] Fourth, there is a lack of operational situation awareness and adaptive collaborative optimization capabilities. The operating conditions in the hydrogen energy gas distribution process, such as inlet pressure, medium temperature, and flow setpoint, vary greatly over a wide time scale. Traditional controllers are usually designed based on the assumption that the operating conditions are constant or change slowly, lacking the ability to continuously sense their own operating status, such as valve opening, upstream / downstream pressure, and real-time resistance coefficient. They cannot adaptively adjust control parameters according to changes in operating conditions, and it is also difficult to achieve collaborative optimization between flow control, resistance compensation, and system energy efficiency. As a result, it is difficult to guarantee control quality and energy efficiency levels over a wide range of operating conditions.
[0007] Fifth, the fixed control parameters and the conflict between multiple objectives are prominent issues. Traditional controllers have fixed control parameters once tuned, making dynamic adjustment impossible based on changing operating conditions. However, in hydrogen fuel cell distribution scenarios, there is an inherent trade-off between flow control accuracy, resistance compensation, and power regulation smoothness—excessive pursuit of control accuracy leads to frequent actuator movements, increasing energy consumption and shortening equipment lifespan; excessive pursuit of smoothness sacrifices response speed and control accuracy. Existing controllers lack effective mechanisms to coordinate these conflicting objectives, making it difficult to maintain optimal control quality across the entire operating range.
[0008] In summary, there is an urgent need for a new type of gas mass flow controller that can comprehensively solve the above problems and possesses high-precision measurement, rapid dynamic response, adaptive compensation for resistance characteristics, panoramic perception of operating status, and collaborative optimization capabilities for multiple conflicting targets. Summary of the Invention
[0009] This application provides a simulated gas mass flow controller for hydrogen production and distribution, aiming to solve the problems of insufficient measurement accuracy and stability in hydrogen medium, difficulty in adapting dynamic response capability to fluctuating operating conditions, lack of real-time perception and adaptive compensation of resistance characteristics, lack of operational situation perception and collaborative optimization capability, and the inability to coordinate and unify multiple conflicting objectives due to fixed control parameters in existing technologies.
[0010] A simulated gas mass flow controller for hydrogen production gas distribution includes: a flow detection module, a resistance characteristic simulation module, a multi-objective game optimization module, a model predictive control core calculation module, an execution drive module, a data fusion and state perception module, and a steady-state determination and convergence constraint module.
[0011] The flow detection module is installed in the hydrogen distribution main pipeline and is used to collect the measured value of hydrogen mass flow rate, inlet pressure signal, outlet pressure signal and hydrogen temperature signal in real time as they flow through the controller. The collected signals are then transmitted to the data fusion and state perception module. The data fusion and state perception module forwards the hydrogen temperature signal to the resistance characteristic simulation module and transmits the measured mass flow rate, inlet pressure signal and outlet pressure signal to the resistance characteristic simulation module and the model predictive control core calculation module, respectively.
[0012] The resistance characteristic simulation module is communicatively connected to the data fusion and state perception module. It is used to calculate the real-time resistance coefficient under the current operating condition based on the inlet pressure signal, the outlet pressure signal and the hydrogen temperature signal received from the data fusion and state perception module, compare the real-time resistance coefficient with the pre-stored benchmark resistance coefficient, generate a resistance deviation signal, and transmit the resistance deviation signal to the multi-objective game optimization module.
[0013] The multi-objective game optimization module is communicatively connected to the resistance characteristic simulation module. It is used to receive the resistance deviation signal and the externally input gas distribution target flow value. At the same time, it obtains the measured mass flow value through the data fusion and state perception module. Using flow control accuracy, resistance compensation amount and power adjustment smoothness as three objective functions with game relationship, it solves the optimal compromise solution of the multi-objective optimization problem and outputs the optimal weight coefficient vector to the model predictive control core calculation module.
[0014] The model predictive control core computing module is communicatively connected to the multi-objective game optimization module. It is used to receive the optimal weight coefficient vector and obtain the current system state quantity through the data fusion and state perception module. Based on the discrete dynamic model of the flow controller, it performs rolling time-domain optimization calculation, taking the tracking accuracy of the measured mass flow rate value to the gas distribution target flow rate value and the smoothness of the control action as the optimization objectives, and outputs the optimal control increment signal to the execution drive module.
[0015] The execution drive module is communicatively connected to the model predictive control core computing module and is used to convert the received optimal control increment signal into an analog drive signal that can drive the flow regulating valve.
[0016] The data fusion and state awareness module is communicatively connected to the flow detection module, the resistance characteristic simulation module, the multi-objective game optimization module, the model predictive control core operation module, and the execution drive module, respectively. It receives the measured mass flow rate, inlet pressure signal, outlet pressure signal, and hydrogen temperature signal output by the flow detection module; forwards the hydrogen temperature signal to the resistance characteristic simulation module; transmits the measured mass flow rate, inlet pressure signal, and outlet pressure signal to the resistance characteristic simulation module and the model predictive control core operation module, respectively; and collects the operating state data of each module and performs multi-source heterogeneous data fusion processing to generate a unified state vector, which is then transmitted to the model predictive control core operation module and the steady-state determination and convergence constraint module. The unified state vector includes the measured mass flow rate, inlet pressure, outlet pressure, valve opening feedback value, real-time resistance coefficient, and fluctuation characteristics of each parameter.
[0017] The steady-state determination and convergence constraint module is communicatively connected to the data fusion and state perception module. It is used to receive the unified state vector, determine whether the current operating condition of the system has entered a steady state, and apply convergence constraints during the determination process. When the system is determined to have entered a steady state and the convergence constraints are met, it sends a frequency reduction scheduling instruction to the model prediction control core operation module and an optimization freeze instruction to the multi-objective game optimization module.
[0018] Optionally, the flow detection module realizes direct measurement of mass flow based on the Coriolis effect principle, and includes: a sensor unit and a signal conditioning and processing unit;
[0019] The sensor unit adopts a double-tube bent tube structure, including a pair of identical measuring tubes, an electromagnetic oscillator set at the central axis of the two measuring tubes, and a pair of electromagnetic detectors set at the inlet and outlet sides of the measuring tubes; the electromagnetic oscillator drives the two measuring tubes to continuously reciprocate at their natural frequencies of the same frequency but opposite phase; the pair of electromagnetic detectors set at the inlet and outlet sides respectively detect the vibration signals at the inlet and outlet sides, and output the two vibration signals as a first vibration signal with a first vibration signal phase and a second vibration signal with a second vibration signal phase to the signal conditioning and processing unit;
[0020] The signal conditioning and processing unit is electrically connected to the electromagnetic detector. It is used to receive two vibration signals and then perform amplification, filtering, and analog-to-digital conversion processing in sequence. It extracts the phase difference between the two vibration signals and calculates the measured mass flow rate based on the detected phase difference and the pre-stored calibration parameters.
[0021] The flow detection module also integrates an inlet pressure sensor and an outlet pressure sensor at the inlet and outlet ends of the measuring tube, respectively, for real-time acquisition of inlet pressure signals and outlet pressure signals.
[0022] A temperature sensor is also integrated at the inlet end of the measuring tube to collect hydrogen temperature signals in real time; the measured mass flow rate, the inlet pressure signal, the outlet pressure signal, and the hydrogen temperature signal serve as the four output signals of the flow detection module.
[0023] Optionally, the resistance characteristic simulation module incorporates a high-pressure hydrogen real gas equation of state model, used to obtain the hydrogen density at the inlet based on the received inlet pressure signal and the hydrogen temperature signal obtained from the data fusion and state perception module; the resistance characteristic simulation module calculates the inlet velocity based on the measured mass flow rate and the hydrogen density at the inlet, and calculates the real-time resistance coefficient based on the pressure difference between the inlet pressure signal and the outlet pressure signal and the inlet velocity;
[0024] The resistance characteristic simulation module also pre-stores the resistance characteristic reference curves of the flow controller under different operating conditions, which are used to read the corresponding reference resistance coefficient based on the currently detected inlet pressure and mass flow rate measured values; the resistance characteristic simulation module compares the real-time resistance coefficient with the reference resistance coefficient to generate the resistance deviation signal.
[0025] Optionally, the resistance characteristic simulation module also has a baseline curve adaptive update function: when the controller runs continuously and stably at a certain operating point, the resistance characteristic simulation module filters and averages the real-time resistance coefficients measured multiple times, and then uses this average to correct the baseline value corresponding to that operating point.
[0026] Optionally, the multi-objective game optimization module has a pre-stored optimal weight coefficient surface database and an online adaptive compensation unit.
[0027] The optimal weight coefficient surface database is generated during the factory calibration stage using an adaptive multi-objective particle swarm optimization algorithm. The adaptive multi-objective particle swarm optimization algorithm uses flow control accuracy, resistance compensation amount, and power adjustment smoothness as three objective functions with a game-like relationship to solve the Pareto optimal solution set of the multi-objective optimization problem. Based on the congestion distance sorting method, the optimal compromise solution is selected from the Pareto optimal solution set, and the weight coefficient corresponding to the optimal compromise solution is used as the pre-stored weight value for each calibration working point.
[0028] The optimal weight coefficient surface database uses inlet pressure and gas distribution target flow rate as index dimensions to store the pre-stored weight coefficient vector corresponding to each calibration working point.
[0029] The online adaptive compensation unit is used during the controller's on-site operation phase to read the corresponding pre-stored weight coefficient vector from the optimal weight coefficient surface database based on the currently detected inlet pressure and gas distribution target flow value, and to perform lightweight adaptive fine-tuning of the pre-stored weight coefficient vector in conjunction with the current resistance deviation signal, and output the optimal weight coefficient vector to the model predictive control core calculation module.
[0030] Optionally, the calculation cycle of the online adaptive compensation unit is independent of the control cycle of the model predictive control core operation module;
[0031] The online adaptive compensation unit only reads the pre-stored weight coefficient vector of the corresponding operating point from the optimal weight coefficient surface database and performs lightweight adaptive fine-tuning when the target gas flow rate value changes abruptly, the system operating conditions change significantly, or the resistance deviation signal continues to exceed the preset range.
[0032] Under steady-state operating conditions, the online adaptive compensation unit does not perform table lookup and fine-tuning operations, but directly outputs the currently effective optimal weight coefficient vector.
[0033] Optionally, the model predictive control core computing module has a built-in discrete dynamic model of the flow controller. The discrete dynamic model uses the valve opening command as the input variable and the measured mass flow rate as the output variable to describe the dynamic response characteristics of the valve opening change to the mass flow rate.
[0034] The model predictive control core computing module performs rolling time-domain optimization calculations based on the current state estimate in each control cycle. The optimization objectives are the tracking accuracy of the measured mass flow rate to the gas distribution target flow rate and the smoothness of the control action. During the optimization solution process, valve opening change rate constraints and valve opening upper and lower limit constraints are applied.
[0035] The model predictive control core computation module extracts the first control increment from the optimal control sequence obtained by optimization and uses it as the output of the current control cycle, which is then transmitted to the execution drive module.
[0036] Optionally, the optimal weight coefficient vector includes three weight coefficients, wherein the first weight coefficient is used to adjust the penalty weight of the mass flow tracking error term in the model predictive control cost function, the second weight coefficient is used to determine the scalar value of the control increment weight, and the third weight coefficient serves as a common scaling factor to uniformly adjust the overall scaling ratio of the tracking error penalty weight and the control increment scalar weight.
[0037] The control increment weight is a one-dimensional scalar that matches the dimension of the single valve opening control input.
[0038] Optionally, the data fusion and state awareness module includes a multi-source data acquisition subunit, a situation identification subunit, and a data fusion subunit;
[0039] The multi-source data acquisition subunit synchronously collects the operating status data of each module according to a unified sampling period, and performs data validity verification after adding a unified timestamp to the collected channel data.
[0040] The situation identification subunit receives the timestamped valid data output by the multi-source data acquisition subunit, extracts the fluctuation characteristics of each operating parameter based on the sliding window statistical method, and calculates the relative offset between each parallel branch when the multi-units are running in parallel.
[0041] The data fusion subunit receives the statistical features and relative offsets of each parameter output by the situation identification subunit, integrates the multi-source heterogeneous data into a unified state vector, and transmits it to the model prediction and control core computing module and the steady-state determination and convergence constraint module.
[0042] Optionally, the steady-state determination and convergence constraint module includes a steady-state determination subunit, a convergence constraint subunit, and a scheduling instruction generation subunit;
[0043] The steady-state determination subunit is used to extract core state parameters directly related to steady-state determination from the unified state vector, and to establish a steady-state determination interval for each core state parameter. When all core state parameters are always within their respective steady-state determination intervals within multiple consecutive sampling windows, the determination system as a whole enters a steady-state operating state.
[0044] The convergence constraint subunit is used to receive the sliding window standard deviation of each parameter output by the data fusion and state awareness module, calculate the overall convergence index of the system, and determine that the system meets the convergence constraint conditions when the convergence index continuously decreases or remains below the preset convergence threshold in multiple consecutive sampling windows.
[0045] The scheduling instruction generation subunit is communicatively connected to the steady-state determination subunit and the convergence constraint subunit. The scheduling instruction generation subunit sends a frequency reduction scheduling instruction to the model prediction control core operation module and an optimization freeze instruction to the multi-objective game optimization module when the steady-state determination subunit determines that the system has entered a steady-state operation state and the convergence constraint subunit determines that the system meets the convergence constraint conditions.
[0046] Compared with the prior art, this application has at least the following beneficial effects:
[0047] This application breaks through the limitation of traditional controllers that focus only on a single flow control objective. It treats flow control accuracy, drag compensation, and power regulation smoothness as three objective functions with inherent game-like relationships. An adaptive multi-objective particle swarm optimization algorithm is used to solve for the Pareto optimal solution set and select the optimal compromise solution, achieving a dynamic balance of these three conflicting optimization objectives across the entire operating range. This strategy prevents the controller from unilaterally pursuing the optimal of a single indicator, instead seeking a globally optimal compromise based on the overall system performance, thus avoiding the "at the expense of other aspects" dilemma of traditional solutions.
[0048] This application abandons the traditional passive control mode of PID controllers that "compensate after deviation" and adopts a rolling time-domain predictive control strategy based on the discrete dynamic model of the system, enabling the controller to have the ability to "predict in advance and actively regulate". This strategy can complete the optimized calculation and output of control commands in a very short time after a step change in the target gas flow or the occurrence of operating condition disturbances. While ensuring the smoothness of control actions, it achieves rapid and accurate tracking of the target flow, fundamentally solving the problems of slow response and easy overshoot oscillation of traditional controllers in variable operating conditions.
[0049] This application transforms the controller's inherent resistance characteristics, traditionally considered "fixed parameters," into an active control variable that is "measurable online and dynamically compensated." By calculating the resistance coefficient under the current operating condition in real time and comparing it with a reference value to generate a resistance deviation signal, the controller can accurately determine whether the deviation originates from external disturbances or its own characteristic drift, and adjust the control strategy accordingly. Simultaneously, the reference curve possesses an adaptive update capability that gradually approaches the actual characteristics over time, ensuring the controller maintains a precise understanding of its own characteristics throughout long-term operation, effectively overcoming the influence of the compressibility of high-pressure hydrogen and the Joule-Thomson effect on control accuracy.
[0050] This application endows the controller with the ability to continuously perceive its own operating status, integrating multi-source heterogeneous data scattered across various stages into a unified state vector. This provides a complete system situational information foundation for control decisions, enabling synergistic optimization between flow control, resistance compensation, and system energy efficiency. Furthermore, through steady-state determination and convergence constraint mechanisms, the controller can automatically reduce the control frequency and freeze optimization calculations after the system enters steady state. This effectively reduces computational load and energy consumption without affecting control quality, achieving adaptive switching between "high-performance control" and "low-power operation," and extending the service life of the controller and its actuators.
[0051] A unified information hub, constructed through data fusion and a state-aware module, forms a deep coupling: the perception results of resistance characteristics provide decision-making basis for multi-objective game optimization; the output of multi-objective game optimization directly drives the parameter update of model predictive control; the execution effect of model predictive control forms a closed-loop feedback through state awareness; and the steady-state determination mechanism dynamically schedules the computing resources of each module according to the real-time state of the system. This complete closed loop of "perception-decision-execution-evaluation-optimization" enables the controller to adaptively adjust the control strategy according to changes in operating conditions, achieving a triple leap from "static tuning" to "dynamic game," from "passive response" to "active regulation," and from "single-point optimization" to "global coordination," comprehensively improving the accuracy, response speed, robustness, and energy efficiency of gas mass flow control in hydrogen production and distribution scenarios. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the module connection of a simulated gas mass flow controller for hydrogen production and distribution, provided as an embodiment of this application. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments.
[0054] This application provides a simulated gas mass flow controller for hydrogen production gas distribution, such as... Figure 1 As shown, it includes: a flow detection module, a resistance characteristic simulation module, a multi-objective game optimization module, a model predictive control (MPC) core computing module, an execution drive module, a data fusion and state perception module, and a steady-state determination and convergence constraint module.
[0055] The flow detection module is installed in the main hydrogen distribution pipeline to collect the hydrogen mass flow rate signal, inlet pressure signal, outlet pressure signal and hydrogen temperature signal in real time as they pass through the controller.
[0056] This module achieves direct measurement of mass flow rate based on the Coriolis effect. Its sensor section employs a dual-tube bent-tube structure, comprising a pair of identical measuring tubes, an electromagnetic oscillator (driver), and a pair of electromagnetic detectors (vibration pickup sensors) positioned upstream and downstream of the measuring tubes. The two measuring tubes are arranged in parallel, with the electromagnetic oscillator positioned at the central axis of the two measuring tubes.
[0057] An electromagnetic oscillator drives two measuring tubes to continuously reciprocate at their natural frequencies, which are in the same frequency but out of phase; that is, the two tubes simultaneously approach or simultaneously open. When high-pressure hydrogen gas flows through the vibrating measuring tubes, the fluid undergoes torsional deformation under the action of the Coriolis force, resulting in a phase difference between the vibrations at the inlet and outlet sides of the measuring tubes. This phase difference is proportional to the mass flow rate through the measuring tubes. A pair of electromagnetic detectors located at the inlet and outlet sides of the measuring tubes detect the vibration signals at the inlet and outlet sides, respectively, and output the two vibration signals as a first vibration signal with a first vibration signal phase and a second vibration signal with a second vibration signal phase.
[0058] Electromagnetic detectors typically consist of a coil and a magnet. They generate an induced electromotive force by detecting the relative motion between the coil and the magnet when the measuring tube vibrates, thereby converting the vibration signal into an electrical signal output.
[0059] The flow detection module also includes a signal conditioning and processing unit, which is electrically connected to the electromagnetic detector. After receiving two vibration signals, this unit sequentially amplifies, filters, and performs analog-to-digital conversion. The processed digital signal is then processed by a phase detection circuit to extract the phase difference between the two vibration signals. The correspondence between this phase difference and the mass flow rate is calibrated and stored in the module's calibration parameter memory.
[0060] The signal conditioning and processing unit, based on the detected phase difference and calibration parameters, according to... Relationship calculation of measured mass flow rate Where K is the instrument constant, The detected phase difference is f, where f is the vibration frequency of the measuring tube.
[0061] In addition, the flow detection module integrates pressure sensors at both the inlet and outlet ends of the measuring tube. Both pressure sensors employ high-frequency response piezoresistive or strain gauge pressure-sensitive elements, with a range adapted to the operating pressure range of the hydrogen distribution system (typically 0–100 MPa), and an accuracy class of no less than 0.1. The inlet pressure sensor acquires the inlet pressure signal in real time. The outlet pressure sensor collects the outlet pressure signal in real time. ;
[0062] A temperature sensor is also integrated at the inlet end of the measuring tube. This temperature sensor uses a platinum resistance thermometer or thermocouple as its sensing element, and its range is adapted to the medium temperature range of the hydrogen distribution system (typically -40℃ to +85℃). It is used to acquire the hydrogen temperature signal T in real time. The two pressure and temperature signals are amplified and filtered by their respective signal conditioning circuits, and then compared with the measured mass flow rate. Together, these four signals serve as the four output signals of this module and are transmitted to the data fusion and state perception module. The data fusion and state perception module forwards the hydrogen temperature signal to the resistance characteristic simulation module, and transmits the measured mass flow rate, the inlet pressure signal, and the outlet pressure signal to the resistance characteristic simulation module and the model predictive control core calculation module, respectively. The data fusion and state perception module forwards the hydrogen temperature signal to the resistance characteristic simulation module.
[0063] The two pressure and temperature signals, after being amplified and filtered by their respective signal conditioning circuits, are compared with the measured mass flow rate. Together, they serve as the four output signals of this module and are transmitted to the data fusion and state perception module; the data fusion and state perception module forwards the hydrogen temperature signal to the resistance characteristic simulation module, and transmits the measured mass flow rate, the inlet pressure signal, and the outlet pressure signal to the resistance characteristic simulation module and the model prediction control core calculation module, respectively;
[0064] It is worth noting that the geometry of the measuring tube directly affects the measurement sensitivity and resistance characteristics of the flow detection module. As a preferred embodiment, the measuring tube can adopt an Ω-shaped or U-shaped bend structure;
[0065] To address the low density of hydrogen, the inner diameter of the measuring tube is reduced to improve flow rate and sensitivity at low flow rates, while also preventing blockages at high flow rates. The ratio of the distance from the actuator along the measuring tube to the detector to the distance from the detector along the measuring tube to the fixed block is preferably 0.6 to 1.4 to ensure that the measuring tube can operate stably in the target vibration mode even if the stiffness changes under high-pressure hydrogen conditions.
[0066] The angle between the horizontal inlet pipe section and the inclined inlet pipe section of the measuring tube, as well as the angle between the inclined inlet pipe section and the intermediate horizontal pipe section, are preferably internal offset angles, ranging from 90° to 150°. All pipe sections are connected by arc segments to improve the overall system elasticity of the measuring tube, increase the amount of deformation under the same Coriolis force, and thus improve the signal-to-noise ratio and measurement sensitivity.
[0067] The resistance characteristic simulation module is communicatively connected to the flow detection module, receiving the inlet pressure signal output by the flow detection module. and export pressure signals Meanwhile, the hydrogen temperature signal T under the current operating conditions is obtained through the data fusion and state perception module, which is used to calculate the real-time drag coefficient under the current operating conditions.
[0068] This module incorporates a real gas law model for high-pressure hydrogen and utilizes a hydrogen property database to account for the compressibility and Joule-Thomson effect of hydrogen under high pressure. The preferred property database is NIST Standard Reference Database 23 (REFPROP), which provides accurate data on hydrogen's density, compressibility factor, isobaric specific heat, isochoric specific heat, Joule-Thomson coefficient, and other thermodynamic and transport parameters over a wide temperature range (173K–393K) and high pressure range (up to 100MPa). The module includes pre-defined property call functions compatible with the REFPROP database interface, based on the input inlet pressure. Given temperature T, retrieve the hydrogen density at the inlet from the database. ;
[0069] As an alternative, when real-time access to an external database is not possible, the module can switch to its built-in simplified real gas equation of state for calculations. This simplified equation adopts the Redlich-Kwong equation of state form, which... As the fundamental equation, where a and b are the physical property constants of hydrogen, a compressibility factor is introduced. The ideal gas law is modified to account for the effects of intermolecular forces and molecular volume of hydrogen.
[0070] Inlet flow rate The acquisition method is as follows: The resistance characteristic simulation module receives the measured mass flow rate output by the flow detection module. The inlet density obtained by combining the above methods According to the continuity equation Calculate the inlet flow velocity, where A is the flow cross-sectional area at the inlet of the measuring tube. This cross-sectional area is pre-stored in the module's internal parameter register based on the geometric parameters of the measuring tube in the flow detection module. Obtain the inlet density... and inlet flow rate Then, the module calculates the real-time drag coefficient based on Bernoulli's equation for incompressible steady flow. ,in The pressure difference between the inlet and outlet;
[0071] It should be noted that although hydrogen is significantly compressible under high pressure, the drag coefficient is calculated using the Bernoulli equation for incompressible steady flow here. This is due to the engineering convention of defining the drag coefficient as the ratio of pressure difference to dynamic head, which characterizes flow resistance. The effect of hydrogen compressibility on density and velocity has already been verified using the actual density at the inlet. Precise calculations should be taken into account;
[0072] Furthermore, the module incorporates a Joule-Thomson effect compensation term when calculating the drag coefficient: the reversal temperature of hydrogen is approximately 200K (-73℃). Under typical operating conditions for hydrogen production and gas distribution (medium temperature 273K~393K, i.e., 0℃~120℃), the Joule-Thomson coefficient of hydrogen is... It is a negative value;
[0073] Therefore, after high-pressure hydrogen gas undergoes throttling and expansion through the flow meter, the outlet temperature may rise by several Kelvin to more than ten Kelvin compared to the inlet temperature. This temperature rise causes a decrease in density at the outlet, which in turn affects the accuracy of the drag coefficient calculated based on the pressure difference between the inlet and outlet. To address this, the module estimates the throttling temperature rise and corrects for the density at the outlet side based on the inlet pressure, temperature, and pressure difference data, combined with the hydrogen Joule-Thomson coefficient, in order to reduce the calculation deviation introduced by thermodynamic effects.
[0074] The resistance characteristic simulation module also pre-stores the resistance characteristic reference curves (i.e., flow rate-resistance coefficient mapping relationship) of the flow controller under different operating conditions. The reference curves are generated as follows: During the factory calibration stage of the flow controller, for the working pressure range (typically 20-70 MPa) and mass flow rate range (typically 1-9 kg / min) of the hydrogen gas distribution system adapted to the controller, a two-dimensional operating condition grid is constructed with pressure level and flow rate level. At each grid node, the corresponding resistance coefficient is determined through standard experiments or experimentally verified numerical simulation methods, forming the unique resistance characteristic reference surface of the controller;
[0075] The baseline data is stored in the module's internal non-volatile memory as a two-dimensional interpolation table, indexed by inlet pressure and mass flow rate. During real-time operation, the module adjusts the interpolation based on the currently detected inlet pressure. and mass flow The corresponding reference drag coefficient is read from the reference surface using bilinear interpolation. ;
[0076] To further improve the applicability of the reference curve, the module also has an adaptive update function for the reference curve: when the controller runs stably at a certain operating point for a long time, the module will update the real-time resistance coefficient measured multiple times. After filtering and averaging, the reference value corresponding to the operating point is corrected so that the reference curve gradually approaches the actual resistance characteristics of the controller as the running time accumulates.
[0077] Real-time resistance coefficient Compared with the reference drag coefficient By comparing the results, a resistance deviation signal is generated. The sign of the deviation signal reflects the direction of the deviation of the actual resistance of the flow controller from the reference value under the current operating conditions: Δμ>0 indicates that the actual resistance is higher than the reference value, which may indicate that there is contaminant deposition on the inner wall of the measuring tube, abnormal changes in the properties of the medium, or slight deformation of the measuring tube;
[0078] Δμ < 0 indicates that the actual resistance is lower than the benchmark value, which may indicate a change in the purity of the medium or an abnormal increase in the flow capacity of the measuring tube. The resistance deviation signal Δμ, as the core output of this module, is transmitted to the multi-objective game optimization module as an input variable for the resistance compensation in objective function two, participating in the solution of the optimal weight coefficient of the MPC controller. At the same time, this deviation signal is also transmitted to the data fusion and state awareness module as one of the characteristic parameters for evaluating the system's operational status, used to determine the flow distribution offset trend between parallel branches and the changes in the state of the inner wall of the measuring tube.
[0079] The multi-objective game optimization module communicates with the resistance characteristic simulation module, receiving the resistance deviation signal Δμ output by the resistance characteristic simulation module, and simultaneously receiving the current target gas flow rate value input from an external host computer or gas distribution scheduling system. ;
[0080] In addition, this module also obtains the measured mass flow rate from the flow detection module through the data fusion and state awareness module. The corresponding reference drag coefficient is read from the reference surface using bilinear interpolation. The control increment sequence output by the MPC core computing module in the previous control cycle is used for real-time calculation of the objective function.
[0081] This module consists of two parts: an optimal weight coefficient surface database and an online adaptive compensation unit. The optimal weight coefficient surface database is generated offline during the controller's factory calibration phase using an Adaptive Multi-Objective Particle Swarm Optimization (AMOPSO) algorithm. The online adaptive compensation unit is used during the controller's field operation phase to quickly look up tables based on real-time operating conditions and perform lightweight adaptive fine-tuning. The three objective functions are defined as follows:
[0082] Objective function 1 is flow control accuracy This value characterizes the actual control deviation of the mass flow rate. The smaller the value, the closer the current controller's flow rate regulation is to the target demand of the gas distribution system;
[0083] Objective function two is the resistance compensation amount. This value characterizes the degree to which the actual resistance of the flow controller deviates from the reference curve under current operating conditions. The smaller this value, the closer the flow meter's resistance characteristics are to the factory calibration state, requiring no additional resistance compensation intervention.
[0084] Objective function three is the smoothness of power regulation. ,in The objective function represents the change in control commands between the current control cycle and the previous cycle for the core computing module of the MPC. It characterizes the rate of change and fluctuation of the control commands and is used to avoid frequent operation of the flow control valve actuator and pressure fluctuations in the gas distribution system.
[0085] There is a typical game-theoretic relationship among the three objective functions mentioned above: excessive pursuit of flow control precision ( Minimizing power regulation may lead to frequent adjustments in control commands, worsening the smoothness of power regulation. Increase); excessive pursuit of resistance compensation ( Minimizing the flow rate may limit the controller's adjustment range and affect the accuracy of flow control. (Increase). Therefore, the optimization of the three objectives is essentially a non-zero-sum game problem, requiring the use of multi-objective optimization algorithms to find the Pareto optimal trade-off solution among the objectives;
[0086] The specific implementation steps of the AMOPSO algorithm are as follows:
[0087] The first step is offline pre-calculation. During the factory calibration phase of the flow controller, a two-dimensional operating condition grid is constructed using pressure levels and flow levels for the working pressure range (typically 20–70 MPa) and mass flow rate range (typically 1–9 kg / min) of the hydrogen gas distribution system adapted to the controller. The AMOPSO algorithm is run at each grid node to perform complete iterative optimization. The particle population size N (preferably 50–100) is set, and the decision variable dimension D=3, corresponding to the weight coefficients of the three objective functions. , , The search space for each dimension is limited to [0,1];
[0088] Randomly initialize the position vectors of each particle in the three-dimensional decision space. and velocity vector , where i = 1, 2, ..., N. The external archive is initialized as an empty set to store non-dominated solutions discovered during algorithm iterations;
[0089] The optimal weight coefficient vector corresponding to each operating point is stored as a pre-stored value in the optimal weight coefficient surface database. The database is stored in the non-volatile memory inside the module in the form of a bilinear interpolation table, with inlet pressure and gas distribution target flow rate as index dimensions.
[0090] The second step is fitness assessment, which involves setting the position vector of each particle in the population. As the weight coefficient of the control increment weight scalar r in the cost function of the MPC core computing module, it drives the MPC core computing module to perform a complete predictive control calculation and obtain the corresponding three objective function values. , , ;
[0091] It should be noted that the mass flow tracking error penalty weight q in the MPC cost function is related to the control increment weight r and the AMOPSO decision variable. , , The mapping relationship between them is as follows: , ,in The overall scaling ratio of the above weights is uniformly adjusted as a common scaling factor; the control increment weight r is a one-dimensional scalar that matches the dimension of the single valve opening control input. The fitness of each particle is determined by its corresponding three-dimensional objective function vector. Characterization;
[0092] The third step is non-dominated sorting and Pareto optimal solution set update. Based on the Pareto dominance relation, all particles in the current population are non-dominated sorted. For any two particles... and ,like Non-inferior in all objectives And superior to at least one objective Then it is called Dominate All particles not dominated by any other particle are classified into the first non-dominated layer (Pareto optimal front), and the particles that are not dominated among the remaining particles after removing the first layer are classified into the second non-dominated layer, and so on.
[0093] Store all particles in the first non-dominated layer into the external archive and remove old particles in the external archive that are dominated by new particles, ensuring that the external archive always stores all currently discovered non-dominated solutions.
[0094] The fourth step is to update the global and individual optimal values. For each particle, its current fitness is compared with its historical best position. The fitness of the solution is compared using Pareto; if the current solution dominates... Then update with the current solution. If neither can control the other, then one will be randomly retained.
[0095] For the global optimal position The solution is selected from the external archives based on its crowding distance: The crowding distance (i.e., the Manhattan distance between the solution and its nearest neighbor in the target space) is calculated for each non-dominated solution in the external archives. A larger crowding distance indicates a sparser surrounding environment. The non-dominated solution with the largest crowding distance is selected as the target solution. This guides the population to search for sparsely distributed regions in the Pareto front, ensuring the diversity of the solution set;
[0096] The fifth step involves updating particle velocity and position. Each particle is iteratively evolved according to the velocity-position update formula of the standard particle swarm optimization algorithm.
[0097]
[0098]
[0099] in As inertia weights, a linear decreasing strategy is adopted. , 0.9 is preferred. 0.4 is preferred; , As an acceleration factor, all are set to 2.0; , t represents a random number uniformly distributed within [0,1]; t is the current iteration number. The maximum number of iterations is set (ideally 100-200 iterations). Speed in all dimensions needs to be limited. Within the range, To prevent particles from flying out of the search space, the search range width for each dimension is set to 10% to 20%. If a particle exceeds the [0,1] boundary after updating its position in any dimension, it is truncated to the nearest boundary value.
[0100] Step 6, mutation operation: To prevent the algorithm from converging to a local optimum prematurely, Gaussian mutation is applied to some particles with a certain probability (preferably 5%–10%) after each generation update. ,in With a mean of 0 and a variance of (Preferably 0.05 to 0.1) Gaussian random perturbation, and the mutated position also needs to be truncated to the [0,1] boundary;
[0101] Step 7: Terminate the judgment and output, and repeat steps 2 through 6 until the preset maximum number of iterations is reached. Alternatively, the non-dominated solution set in the external archive may remain unchanged for several consecutive generations (preferably 10-20 generations). After termination, all non-dominated solutions stored in the external archive constitute the Pareto optimal solution set in the three-dimensional target space.
[0102] The module selects the optimal compromise solution from the Pareto optimal solution set based on the congestion distance sorting method: calculate the congestion distance of each non-dominated solution, select the solution with the smallest congestion distance as the optimal compromise solution, and store the three-dimensional position vector corresponding to the optimal compromise solution as the pre-stored weight coefficient vector of the calibration working point into the optimal weight coefficient surface database.
[0103] The workflow of the online adaptive compensation unit is as follows:
[0104] The first step is operating condition matching. The online adaptive compensation unit obtains the current inlet pressure from the data fusion and state awareness module in each control cycle. and target flow rate of gas distribution The position of the vector in the two-dimensional index grid of the optimal weight coefficient surface database is calculated, and the corresponding pre-stored weight coefficient vector is read by bilinear interpolation. ;
[0105] The second step is lightweight adaptive fine-tuning. When the resistance deviation signal Δμ continuously exceeds the preset fine-tuning threshold (preferably ±3%), the online adaptive compensation unit initiates the lightweight fine-tuning procedure: using the pre-stored weight coefficient vector... Using the initial values, the weight coefficients are optimized through a local search using gradient descent or incremental update rules, with the upper limit of the number of fine-tuning iterations set to [value missing]. (Preferably 5-10 times), each fine-tuning only requires driving MPC to perform a single prediction calculation; after fine-tuning is completed, the fine-tuned weight coefficient vector is output. When Δμ does not exceed the fine-tuning threshold, output directly. As ;
[0106] The third step is to trigger a table lookup. When the target gas flow rate changes abruptly, the inlet pressure fluctuation exceeds the preset threshold (preferably 5%), or Δμ continues to exceed the allowable range (preferably ±5%), the online adaptive compensation unit re-executes the first step of operating condition matching and interpolation, obtains the pre-stored weight coefficient vector corresponding to the new operating condition point, and performs the second step of lightweight fine-tuning.
[0107] The fourth step is steady-state maintenance. Under steady-state operating conditions, the online adaptive compensation unit does not perform table lookup and fine-tuning operations, but directly outputs the currently effective optimal weight coefficient vector to reduce the computational load of the controller.
[0108] Under steady-state operation, the online adaptive compensation unit does not perform table lookup and fine-tuning operations, but directly outputs the currently effective optimal weight coefficient vector to reduce the computational load on the controller. The optimal weight coefficient vector... The acquisition methods include: when the operating conditions do not change significantly and the resistance deviation signal is within the normal range, directly using the weight values pre-stored in the optimal weight coefficient surface database; when the resistance deviation signal exceeds the fine-tuning threshold, using the weight values after lightweight adaptive fine-tuning. The optimal weight coefficient vector output by this module... On one hand, it is transmitted to the MPC core computing module to update the values of the tracking error penalty weight q and the control increment weight scalar r in the cost function; on the other hand, it is transmitted to the data fusion and state awareness module as historical parameters for system operation status assessment, which are then called by the subsequent steady-state determination and convergence constraint modules.
[0109] The MPC core computing module is communicatively connected to the multi-objective game optimization module, and receives the optimal weight coefficient vector output by the multi-objective game optimization module. Simultaneously, the current system state variables are obtained through the data fusion and state awareness module. This module contains a discrete dynamic model of the flow controller, which uses the valve opening command as the input variable and the measured mass flow rate as the output variable to describe the dynamic response characteristics of valve opening changes to mass flow rate.
[0110] The discrete dynamic model adopts either an autoregressive moving average exogenous input model (ARMAX model) or a state-space model. As a preferred embodiment, the valve opening command is described using the following second-order discrete transfer function model. Compared with the measured mass flow rate The dynamic relationship between them:
[0111]
[0112] in , , , The model parameters are determined based on step response experimental data during the controller's factory calibration stage using a system identification method, and are corrected online by the data fusion and state perception module based on measured data during controller operation.
[0113] The MPC core computing module performs rolling time-domain optimization calculations based on the aforementioned discrete dynamic model within each control cycle. Let the current sampling time be k, and the prediction time domain be... (Preferably 5-10 control cycles), control time domain is The module estimates the future based on the current state. Predict the system output at each time point;
[0114] The optimization objective of the module is characterized by the following cost function:
[0115]
[0116] in The target flow rate value for gas distribution is issued by the higher-level system. q is the increment of the valve opening command, r is the weight of the mass flow tracking error penalty, and r is the scalar of the control increment weight. Both are determined by the optimal weight coefficient vector output by the multi-objective game optimization module.
[0117] During the optimization process, the module must satisfy the following device-level constraints:
[0118] Valve opening upper and lower limit constraints:
[0119] Valve opening change rate constraint:
[0120] in and These represent the minimum and maximum opening degrees of the valve, respectively. The maximum permissible rate of change of valve opening is defined by the constraint parameters, which are pre-stored in the module's internal registers based on the physical characteristics of the selected flow control valve.
[0121] In each control cycle, the module calls an optimization algorithm to obtain the optimal control sequence in the control time domain, extracts the first control increment as the output of the current control cycle, and transmits it to the execution drive module.
[0122] Sampling period The optimal sampling period is 0.05 to 0.2 seconds to ensure sufficient control accuracy and response speed even in scenarios with rapidly changing target gas flow rates. Once the steady-state determination and convergence constraint module determines that the system has entered steady-state operation, it sends a frequency reduction scheduling command to the MPC core computing module. Based on this, the module switches the control frequency from normal mode to low-power maintenance mode, extending the sampling period to 0.5 to 1.0 seconds, thereby reducing computational load and energy consumption while ensuring the system's steady-state performance.
[0123] The execution driver module communicates with the MPC core computing module and receives the optimal control increment signal output by the MPC core computing module. This signal is converted into an analog drive signal that can drive the flow control valve. The module consists of a digital-to-analog converter, a power amplifier, and a valve drive unit connected in series.
[0124] The digital-to-analog converter (DAC) receives the optimal control increment signal output in digital form from the MPC core processing module. This signal represents the adjustment amount of the target opening of the flow control valve. The DAC incorporates a high-precision digital-to-analog converter (DAC) with a resolution of at least 12 bits, converting the digital control increment into a corresponding analog voltage command signal (typically 0–5V or 0–10V). The analog voltage output of the DAC is connected to the input of the power amplifier unit.
[0125] The power amplifier unit receives the analog voltage command signal output from the digital-to-analog converter unit and amplifies it to enhance its voltage and current drive capabilities. The power amplifier unit employs a differential power amplifier circuit structure, consisting of a preamplifier stage and a power output stage.
[0126] The preamplifier stage uses a high-precision operational amplifier to amplify the analog voltage command signal at the primary stage and complete impedance matching;
[0127] The power output stage uses power transistors or MOSFETs to form a push-pull amplifier circuit, which further amplifies the signal output from the preamplifier stage to a current level sufficient to drive the solenoid valve coil.
[0128] The output of the power amplifier unit also integrates overcurrent protection circuit and short-circuit protection circuit. When the drive current exceeds the preset threshold (preferably 1.5 times the rated drive current), the output is automatically cut off to prevent the solenoid valve coil from burning out.
[0129] The valve drive unit is connected to the output of the power amplifier unit, receives the amplified drive signal, and applies it to the electromagnetic drive coil of the flow control valve. The flow control valve is preferably a normally closed electromagnetic proportional valve, whose valve core position is proportional to the magnitude of the drive current applied to the coil.
[0130] After receiving the analog drive signal from the power amplifier unit, the valve drive unit converts it into a pulse width modulation (PWM) signal. By adjusting the duty cycle of the PWM signal, it controls the average drive current of the solenoid valve coil, thereby precisely adjusting the stroke of the valve core and the valve opening.
[0131] The valve drive unit also integrates a valve position feedback detection subunit, which detects the actual displacement of the valve core in real time through a linear variable differential transformer (LVDT) or a Hall effect position sensor set on the valve stem, forming a valve position closed loop.
[0132] The valve position feedback signal is used by the PID controller inside the valve drive unit to correct the valve position control deviation in real time.
[0133] On the other hand, after analog-to-digital conversion, the data is transmitted to the data fusion and state awareness module as one of the input parameters for system operation status assessment;
[0134] The overall response time of the drive module (from receiving the incremental control signal to the valve opening reaching the target value) shall not exceed 50ms to ensure that the execution action is completed within the 0.05 to 0.2-second control cycle of the MPC core computing module. The frequency of the PWM signal output by the valve drive unit is preferably 20kHz to 50kHz, which is higher than the range of frequencies audible to the human ear, to avoid generating audible noise during the operation of the solenoid valve.
[0135] The data fusion and status awareness module is communicatively connected to the flow detection module, resistance characteristic simulation module, multi-objective game optimization module, and MPC core computing module, respectively, and is used to collect the operating status data of each module and perform multi-source heterogeneous data fusion processing. This module consists of three sub-units: a multi-source data acquisition sub-unit, a situation identification sub-unit, and a data fusion sub-unit.
[0136] The multi-source data acquisition subunit synchronously acquires the operating parameters of each component of the system at a unified sampling period (consistent with the sampling period of the MPC core computing module, preferably 0.05 to 0.2 seconds). The data sources acquired include: (1) the measured mass flow rate obtained from the flow detection module. Inlet pressure Export pressure The hydrogen temperature signal T and the vibration frequency f of the measuring tube;
[0137] (2) Obtain the real-time drag coefficient from the drag characteristic simulation module. Reference drag coefficient and resistance deviation signal Δμ;
[0138] (3) Obtain the current optimal weight coefficient vector from the multi-objective game optimization module. and the values of each objective function , , ;
[0139] (4) Obtain the current state variable from the MPC core operation module Control variables and predict the control sequence in the time domain;
[0140] (5) Obtain the actual displacement of the valve core and the valve opening from the valve position feedback detection subunit of the execution drive module;
[0141] The multi-source data acquisition subunit adds a unified timestamp to the acquired data from each channel and performs data validity verification, eliminating outliers that clearly exceed the physical range and invalid data generated by sensor malfunctions, ensuring the quality of data entering subsequent processing stages.
[0142] The situational awareness subunit receives timestamped valid data output from the multi-source data acquisition subunit and extracts the fluctuation characteristics of each operating parameter based on the sliding window statistical method. The length of the sliding window is set to... One sampling period (preferred) The corresponding time window length is 0.5 to 4 seconds, and the step size is one sampling period. That is, when each new sampled data arrives, the window slides forward by one step, discarding the oldest data point in the window and incorporating the latest data point. For each set of data sequences within the window, the situation identification subunit calculates the following statistical features: (a) mean This reflects the central trend of the parameters;
[0143] (b) Standard deviation This reflects the degree of dispersion and fluctuation of the parameters;
[0144] (c) Rate of change This reflects the dynamic rate of change of the parameters;
[0145] (d) Extreme value difference This reflects the extreme fluctuation range of the parameters;
[0146] For a gas distribution system with multiple flow controllers operating in parallel, the situation identification subunit also calculates the relative offset between each parallel branch. Taking the measured mass flow rate as an example, the relative offset of the jj-th parallel branch is defined as... When the relative offset of a branch continuously exceeds a preset threshold (preferably ±10%), the situation identification subunit determines that the branch is showing a trend of unbalanced traffic distribution.
[0147] The data fusion subunit receives the statistical features and relative offsets of various parameters output by the situation identification subunit, and integrates the multi-source heterogeneous data into a unified state vector. This is used by the MPC core computing module. The unified state vector is composed as follows:
[0148]
[0149] in This is the valve opening feedback value. , , These are the sliding window standard deviations of mass flow rate, inlet pressure, and real-time drag coefficient, respectively. The data fusion subunit adopts a time alignment strategy during the integration process to ensure that data from different data sources with the same timestamp maintain temporal consistency during fusion.
[0150] To address the time misalignment issue caused by communication delays or slight differences in sampling time, the data fusion subunit uses a linear interpolation method to interpolate each data source to a unified time reference point.
[0151] Unified state vector after fusion On the one hand, it is transmitted to the MPC core computing module as the initial value for the state estimation and prediction calculation of the next control cycle; on the other hand, it is transmitted to the steady-state determination and convergence constraint module as the input basis for the system steady-state determination.
[0152] In addition, the data fusion subunit also has a data storage function, storing the state vectors after each fusion in a time sequence into the circular buffer inside the module. The buffer capacity is preferably used to store the data of the most recent 1000 moments (corresponding to a historical window of 50 to 200 seconds) for subsequent fault diagnosis and trend analysis.
[0153] The steady-state determination and convergence constraint module is communicatively connected to the data fusion and state awareness module, and receives the unified state vector output by the data fusion subunit. This module is used to determine whether the current operating condition of the hydrogen production gas distribution system has entered a steady state, and applies convergence constraints during the determination process to avoid control misjudgments caused by short-term disturbances. The module consists of a steady-state determination subunit, a convergence constraint subunit, and a scheduling instruction generation subunit connected in series.
[0154] The steady-state determination subunit receives a unified state vector. Next, dimensionality reduction was performed to extract the core state parameters directly related to steady-state determination, including: measured mass flow rate values. Inlet pressure Export pressure Valve opening feedback value Real-time drag coefficient ;
[0155] The steady-state determination subunit establishes a steady-state determination interval for each of the aforementioned core state parameters, using interval constraints to limit the magnitude and duration of changes in each state variable. Specifically, for the j-th core state parameter... Its steady-state determination interval is defined as ,in This is the mean of the parameter within the current sliding window. This is a preset steady-state allowable deviation threshold;
[0156] The steady-state allowable deviation thresholds for each parameter are set according to the actual operating requirements of the hydrogen production gas distribution system: the steady-state allowable deviation threshold for mass flow rate is ±2% of the target flow rate; the steady-state allowable deviation thresholds for inlet and outlet pressures are ±1% of their respective ranges; the steady-state allowable deviation threshold for valve opening feedback value is ±2% of the full range; the steady-state allowable deviation threshold for real-time resistance coefficient is ±5% of the reference resistance coefficient; and the steady-state allowable deviation threshold for the relative offset of mass flow rate in each parallel branch is ±5%.
[0157] The steady-state determination subunit employs a time accumulation condition to avoid misjudgments caused by short-term disturbances. Specifically, for each core state parameter, it is required that it continuously accumulates time. Within each sampling window (preferred) The corresponding time length is A parameter can be considered to meet the steady-state condition only if it remains within its respective steady-state determination interval for each second. Only when all core state parameters simultaneously meet the above time accumulation condition can the steady-state determination subunit determine that the entire system has entered a steady-state operating state.
[0158] If any core state parameter exceeds its steady-state determination range at a certain moment during the time accumulation process, the time accumulation counter is immediately cleared and restarted to ensure the rigor and reliability of the steady-state determination.
[0159] The convergence constraint subunit and the steady-state determination subunit operate in parallel, continuously applying convergence constraints during the steady-state determination process. The convergence constraint subunit receives the sliding window standard deviations of each parameter output by the data fusion and state awareness module. , Using statistical characteristics, calculate the overall convergence index of the system. The convergence index is defined as the weighted sum of squares of the sliding window standard deviations of each core state parameter:
[0160]
[0161] Where M is the total number of core state parameters. The convergence weighting coefficient for the j-th parameter is given (the sum of all weighting coefficients is 1, and the coefficients can be allocated according to the influence of each parameter on the steady-state performance of the system; preferably, the weighting coefficient for the measured mass flow rate is 0.30, the weighting coefficients for the inlet and outlet pressures are each 0.15, the weighting coefficient for the valve opening feedback value is 0.20, and the weighting coefficient for the real-time resistance coefficient is 0.10). Let j be the standard deviation of the j-th parameter within the current sliding window;
[0162] Convergence constraint sub-cells require convergence indices In continuous Within each sampling window (preferred) )Continuously decrease or remain below the preset convergence threshold (This threshold is determined based on the steady-state convergence index during the system's factory calibration, and is usually taken as 1.2 times the calibration value), only then can the system be considered to meet the convergence constraint conditions;
[0163] Furthermore, the convergence constraint subunit also sets up an adaptive constraint switching mechanism for unsteady-state scenarios such as sudden changes in wind and solar power output or abrupt changes in hydrogen production load. When the data fusion and state awareness module detects that the rate of change of the target gas flow rate exceeds a preset threshold (preferably 10% / second of the target flow rate range) or the inlet pressure fluctuation rate exceeds a preset threshold (preferably 5% / second of the inlet pressure range), the convergence constraint subunit automatically relaxes the convergence threshold Γ_th to 1.5 to 2.0 times the normal value and adjusts the number of consecutive windows in the time accumulation condition. The number of convergence thresholds is reduced to 2-3 to avoid preventing the system from entering the steady-state determination process due to overly stringent convergence constraints during active system adjustment. Once the system state stabilizes, the convergence threshold and time accumulation condition automatically return to normal values.
[0164] The scheduling instruction generation subunit is communicatively connected to both the steady-state determination subunit and the convergence constraint subunit, receiving the steady-state determination result and the convergence constraint determination result. The scheduling instruction generation subunit sends a frequency reduction scheduling instruction to the MPC core computing module only when the steady-state determination subunit determines that the entire system has entered a steady-state operating state and the convergence constraint subunit determines that the system meets the convergence constraint conditions.
[0165] The frequency reduction scheduling instruction contains the following information: (a) the target control frequency, which reduces the sampling period of the MPC core computing module from the normal mode. (Preferably 0.05–0.2 seconds) Extend to low-power sustain mode times (i.e., 0.25 to 2.0 seconds);
[0166] (b) Adjusting the prediction time-domain parameters, adjusting the prediction time-domain parameters. The normal range of 5-10 has been shortened to 3-5.
[0167] (c) Convergence hold flag, indicating that the MPC core computing module still needs to continuously monitor whether the system state deviates from the steady state range in low power mode;
[0168] The scheduling instruction generation subunit simultaneously sends an optimization freeze instruction to the multi-objective game optimization module, causing the multi-objective game optimization module to pause the iterative calculation of the AMOPSO algorithm during steady-state operation and directly output the optimal weight coefficient vector obtained from the previous optimization, so as to further reduce the computational load of the controller.
[0169] When any of the following triggering conditions occur during system operation, the scheduling instruction generation subunit immediately sends a wake-up instruction to the MPC core computing module and the multi-objective game optimization module, causing the controller to exit the low-power maintenance mode and return to the normal control mode: (a) Any core state parameter exceeds its steady-state determination interval and the duration exceeds One sampling window (preferred) );
[0170] (b) The absolute value of the resistance deviation signal Δμ exceeds a preset threshold (preferably ±8%);
[0171] (c) Externally input target gas flow rate A step change occurs;
[0172] (d) The data fusion and state awareness module detects a sudden change in the target gas flow rate or a significant fluctuation in the inlet pressure;
[0173] After the wake-up command is executed, the sampling period of the MPC core computing module is restored to [previous state]. Predicting time-domain recovery to The multi-objective game optimization module restarts the iterative optimization calculation of the AMOPSO algorithm.
[0174] The scheduling instruction generation subunit also transmits the steady-state determination results, convergence constraint determination results, and execution records of frequency reduction / wake-up instructions to the data fusion and state awareness module, and stores them in the circular buffer as a historical record of the system's operating status for subsequent fault diagnosis and energy efficiency analysis.
[0175] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A hydrogen energy production simulation type gas mass flow controller for gas preparation, characterized by, include: The module includes a flow detection module, a resistance characteristic simulation module, a multi-objective game optimization module, a model predictive control core operation module, an execution drive module, a data fusion and state perception module, and a steady-state determination and convergence constraint module. The flow detection module is installed in the hydrogen distribution main pipeline and is used to collect the measured value of hydrogen mass flow rate, inlet pressure signal, outlet pressure signal and hydrogen temperature signal in real time as they flow through the controller. The collected signals are then transmitted to the data fusion and state perception module. The data fusion and state perception module forwards the hydrogen temperature signal to the resistance characteristic simulation module and transmits the measured mass flow rate, inlet pressure signal and outlet pressure signal to the resistance characteristic simulation module and the model predictive control core calculation module, respectively. The resistance characteristic simulation module is communicatively connected to the data fusion and state perception module. It is used to calculate the real-time resistance coefficient under the current operating condition based on the inlet pressure signal, the outlet pressure signal and the hydrogen temperature signal received from the data fusion and state perception module, compare the real-time resistance coefficient with the pre-stored benchmark resistance coefficient, generate a resistance deviation signal, and transmit the resistance deviation signal to the multi-objective game optimization module. The multi-objective game optimization module is communicatively connected to the resistance characteristic simulation module. It is used to receive the resistance deviation signal and the externally input gas distribution target flow value. At the same time, it obtains the measured mass flow value through the data fusion and state perception module. Using flow control accuracy, resistance compensation amount and power adjustment smoothness as three objective functions with game relationship, it solves the optimal compromise solution of the multi-objective optimization problem and outputs the optimal weight coefficient vector to the model predictive control core calculation module. The model predictive control core computing module is communicatively connected to the multi-objective game optimization module. It is used to receive the optimal weight coefficient vector and obtain the current system state quantity through the data fusion and state perception module. Based on the discrete dynamic model of the flow controller, it performs rolling time-domain optimization calculation, taking the tracking accuracy of the measured mass flow rate value to the gas distribution target flow rate value and the smoothness of the control action as the optimization objectives, and outputs the optimal control increment signal to the execution drive module. The execution drive module is communicatively connected to the model predictive control core computing module and is used to convert the received optimal control increment signal into an analog drive signal that can drive the flow regulating valve. The data fusion and state awareness module is communicatively connected to the flow detection module, the resistance characteristic simulation module, the multi-objective game optimization module, the model predictive control core operation module, and the execution drive module, respectively. It receives the measured mass flow rate, inlet pressure signal, outlet pressure signal, and hydrogen temperature signal output by the flow detection module; forwards the hydrogen temperature signal to the resistance characteristic simulation module; transmits the measured mass flow rate, inlet pressure signal, and outlet pressure signal to the resistance characteristic simulation module and the model predictive control core operation module, respectively; and collects the operating state data of each module and performs multi-source heterogeneous data fusion processing to generate a unified state vector, which is then transmitted to the model predictive control core operation module and the steady-state determination and convergence constraint module. The unified state vector includes the measured mass flow rate, inlet pressure, outlet pressure, valve opening feedback value, real-time resistance coefficient, and fluctuation characteristics of each parameter. The steady-state determination and convergence constraint module is communicatively connected to the data fusion and state perception module. It is used to receive the unified state vector, determine whether the current operating condition of the system has entered a steady state, and apply convergence constraints during the determination process. When the system is determined to have entered a steady state and the convergence constraints are met, it sends a frequency reduction scheduling instruction to the model prediction control core operation module and an optimization freeze instruction to the multi-objective game optimization module.
2. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 1, characterized in that, The flow detection module realizes direct measurement of mass flow rate based on the Coriolis effect principle, and includes: a sensor unit and a signal conditioning and processing unit; The sensor unit adopts a double-tube bent tube structure, including a pair of identical measuring tubes, an electromagnetic oscillator set at the central axis of the two measuring tubes, and a pair of electromagnetic detectors set at the inlet and outlet sides of the measuring tubes; the electromagnetic oscillator drives the two measuring tubes to continuously reciprocate at their natural frequencies of the same frequency but opposite phase; the pair of electromagnetic detectors set at the inlet and outlet sides respectively detect the vibration signals at the inlet and outlet sides, and output the two vibration signals as a first vibration signal with a first vibration signal phase and a second vibration signal with a second vibration signal phase to the signal conditioning and processing unit; The signal conditioning and processing unit is electrically connected to the electromagnetic detector. It is used to receive two vibration signals and then perform amplification, filtering, and analog-to-digital conversion processing in sequence. It extracts the phase difference between the two vibration signals and calculates the measured mass flow rate based on the detected phase difference and the pre-stored calibration parameters. The flow detection module also integrates an inlet pressure sensor and an outlet pressure sensor at the inlet and outlet ends of the measuring tube, respectively, for real-time acquisition of inlet pressure signals and outlet pressure signals. A temperature sensor is also integrated at the inlet end of the measuring tube to collect hydrogen temperature signals in real time; the measured mass flow rate, the inlet pressure signal, the outlet pressure signal, and the hydrogen temperature signal serve as the four output signals of the flow detection module.
3. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 2, characterized in that, The resistance characteristic simulation module incorporates a high-pressure hydrogen real gas equation of state model, which is used to obtain the hydrogen density at the inlet based on the received inlet pressure signal and the hydrogen temperature signal obtained from the data fusion and state perception module; the resistance characteristic simulation module calculates the inlet velocity based on the measured mass flow rate and the hydrogen density at the inlet, and calculates the real-time resistance coefficient based on the pressure difference between the inlet pressure signal and the outlet pressure signal and the inlet velocity; The resistance characteristic simulation module also pre-stores the resistance characteristic reference curves of the flow controller under different operating conditions, which are used to read the corresponding reference resistance coefficient based on the currently detected inlet pressure and mass flow rate measured values; the resistance characteristic simulation module compares the real-time resistance coefficient with the reference resistance coefficient to generate the resistance deviation signal.
4. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 3, characterized in that, The resistance characteristic simulation module also has a baseline curve adaptive update function: when the controller runs continuously and stably at a certain operating point, the resistance characteristic simulation module will filter and average the real-time resistance coefficients measured multiple times, and then use the average to correct the baseline value corresponding to that operating point.
5. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 1, characterized in that, The multi-objective game optimization module has a built-in database of pre-stored optimal weight coefficient surfaces and an online adaptive compensation unit. The optimal weight coefficient surface database is generated during the factory calibration stage using an adaptive multi-objective particle swarm optimization algorithm. The adaptive multi-objective particle swarm optimization algorithm uses flow control accuracy, resistance compensation amount, and power adjustment smoothness as three objective functions with a game-like relationship to solve the Pareto optimal solution set of the multi-objective optimization problem. Based on the congestion distance sorting method, the optimal compromise solution is selected from the Pareto optimal solution set, and the weight coefficient corresponding to the optimal compromise solution is used as the pre-stored weight value for each calibration working point. The optimal weight coefficient surface database uses inlet pressure and gas distribution target flow rate as index dimensions to store the pre-stored weight coefficient vector corresponding to each calibration working point. The online adaptive compensation unit is used during the controller's on-site operation phase to read the corresponding pre-stored weight coefficient vector from the optimal weight coefficient surface database based on the currently detected inlet pressure and gas distribution target flow value, and to perform lightweight adaptive fine-tuning of the pre-stored weight coefficient vector in conjunction with the current resistance deviation signal, and output the optimal weight coefficient vector to the model predictive control core calculation module.
6. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 5, characterized in that, The calculation cycle of the online adaptive compensation unit is independent of the control cycle of the model predictive control core operation module; The online adaptive compensation unit only reads the pre-stored weight coefficient vector of the corresponding operating point from the optimal weight coefficient surface database and performs lightweight adaptive fine-tuning when the target gas flow rate value changes abruptly, the system operating conditions change significantly, or the resistance deviation signal continues to exceed the preset range. Under steady-state operating conditions, the online adaptive compensation unit does not perform table lookup and fine-tuning operations, but directly outputs the currently effective optimal weight coefficient vector.
7. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 1, characterized in that, The model predictive control core computing module has a built-in discrete dynamic model of the flow controller. The discrete dynamic model uses the valve opening command as the input variable and the measured mass flow rate as the output variable to describe the dynamic response characteristics of the valve opening change to the mass flow rate. The model predictive control core computing module performs rolling time-domain optimization calculations based on the current state estimate in each control cycle. The optimization objectives are the tracking accuracy of the measured mass flow rate to the gas distribution target flow rate and the smoothness of the control action. During the optimization solution process, valve opening change rate constraints and valve opening upper and lower limit constraints are applied. The model predictive control core computation module extracts the first control increment from the optimal control sequence obtained by optimization and uses it as the output of the current control cycle, which is then transmitted to the execution drive module.
8. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 7, characterized in that, The optimal weight coefficient vector contains three weight coefficients, wherein the first weight coefficient is used to adjust the penalty weight of the mass flow tracking error term in the model predictive control cost function, the second weight coefficient is used to determine the scalar value of the control increment weight, and the third weight coefficient serves as a common scaling factor to uniformly adjust the overall scaling ratio of the tracking error penalty weight and the control increment scalar weight. The control increment weight is a one-dimensional scalar that matches the dimension of the single valve opening control input.
9. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 1, characterized in that, The data fusion and state awareness module includes a multi-source data acquisition subunit, a situation identification subunit, and a data fusion subunit. The multi-source data acquisition subunit synchronously collects the operating status data of each module according to a unified sampling period, and performs data validity verification after adding a unified timestamp to the collected channel data. The situation identification subunit receives the timestamped valid data output by the multi-source data acquisition subunit, extracts the fluctuation characteristics of each operating parameter based on the sliding window statistical method, and calculates the relative offset between each parallel branch when the multi-units are running in parallel. The data fusion subunit receives the statistical features and relative offsets of each parameter output by the situation identification subunit, integrates the multi-source heterogeneous data into a unified state vector, and transmits it to the model prediction and control core computing module and the steady-state determination and convergence constraint module.
10. The simulated gas mass flow controller for hydrogen production gas distribution according to claim 1, characterized in that, The steady-state determination and convergence constraint module includes a steady-state determination subunit, a convergence constraint subunit, and a scheduling instruction generation subunit; The steady-state determination subunit is used to extract core state parameters directly related to steady-state determination from the unified state vector, and to establish a steady-state determination interval for each core state parameter. When all core state parameters are always within their respective steady-state determination intervals within multiple consecutive sampling windows, the determination system as a whole enters a steady-state operating state. The convergence constraint subunit is used to receive the sliding window standard deviation of each parameter output by the data fusion and state awareness module, calculate the overall convergence index of the system, and determine that the system meets the convergence constraint conditions when the convergence index continuously decreases or remains below the preset convergence threshold in multiple consecutive sampling windows. The scheduling instruction generation subunit is communicatively connected to the steady-state determination subunit and the convergence constraint subunit. The scheduling instruction generation subunit sends a frequency reduction scheduling instruction to the model prediction control core operation module and an optimization freeze instruction to the multi-objective game optimization module when and only when the steady-state determination subunit determines that the system has entered a steady-state operation state and the convergence constraint subunit determines that the system meets the convergence constraint conditions.