A natural gas hydrogen blending control method, device, equipment and medium
Patent Information
- Application Number
- CN202611180620.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本发明的目的在于:针对目前现有技术在天然气掺氢控制中因用气量波动大、流量计低流量测量偏差大以及在线分析仪测量滞后导致混合精度和控制稳定性不足的问题,提供了一种天然气掺氢控制方法、装置、设备及介质,其采用前置压控稳态结合随动流控、延时稳态条件监控、二维表存储补偿以及多传感器联合误差数据融合的综合控制策略,实现了大范围宽幅用气工况下的快速响应控制,并有效剔除了传感器延时与测量误差带来的干扰,实现了天然气掺氢比例的极高精度稳定控制
1、稳压流控结合,兼顾快速响应与控制精度:本发明打破了传统直接控流的思路,优先通过天然气管路调节阀稳定混合总管路压力,为氢气阀门提供不受压力波动干扰的稳定流通环境,随后通过天然气流量按比例主导氢气调节阀的PID随动控制,既保证了系统在大负荷变化下的极速响应,又夯实了物理调节精度。
Smart Images

Figure CN123006948A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural gas hydrogen blending technology, specifically to a method, apparatus, equipment, and medium for controlling natural gas hydrogen blending. Background Technology
[0002] The statements in this section are provided only as background information in connection with this disclosure and may not constitute prior art.
[0003] With the vigorous promotion of clean energy, blending hydrogen into natural gas pipelines in a certain proportion for transportation and utilization has become an important development direction in the current energy sector. Existing natural gas hydrogen blending control methods mainly rely on a simple combination of flow meters and regulating valves to achieve follow-up flow control, or use PLC systems to collect pressure and flow data for coarse feedforward control.
[0004] However, existing blending devices have poor adaptability when applied to scenarios with a wide range of gas consumption and large peak-to-valley differences (such as urban gas pipeline networks), and have the following serious drawbacks: 1. Commonly used follow-up flow control methods have poor accuracy when measuring small flow rates, and cannot meet the requirements for high-precision hydrogen doping ratio control. 2. The system fails to adequately consider the delay characteristics and measurement lag issues of the online analyzer. Online analyzers often have a measurement delay of more than 10 seconds. If the delayed analysis results are directly adopted for feedback adjustment under dynamic fluctuation conditions, it is very easy to cause the control system to oscillate, and the final mixing accuracy cannot be guaranteed. 3. Existing control systems mostly rely on a single sensor (either a flow meter or an analyzer), which cannot effectively eliminate the hydrogen doping ratio deviation caused by the inherent accuracy error of the sensor under different operating conditions, and lack the system's self-learning and deviation memory compensation capabilities. Summary of the Invention
[0005] The purpose of this invention is to address the problems of insufficient mixing accuracy and control stability in the current technology for controlling hydrogen blending in natural gas due to large fluctuations in gas consumption, large measurement deviations at low flow rates of flow meters, and measurement lags in online analyzers. This invention provides a method, device, equipment, and medium for controlling hydrogen blending in natural gas. It employs a comprehensive control strategy that combines pre-positioned pressure control with steady-state control, servo flow control, delayed steady-state condition monitoring, two-dimensional table storage compensation, and multi-sensor joint error data fusion. This achieves rapid response control under a wide range of gas consumption conditions and effectively eliminates interference caused by sensor delays and measurement errors, resulting in extremely high-precision and stable control of the hydrogen blending ratio in natural gas.
[0006] The technical solution of the present invention is as follows: A method for controlling hydrogen blending in natural gas is applied to a natural gas-hydrogen blending control system. The control system includes a natural gas pipeline, a hydrogen pipeline, and a main pipeline for mixing the two. The natural gas pipeline is equipped with a natural gas flow meter and a natural gas regulating valve. The hydrogen pipeline is equipped with a hydrogen flow meter and a hydrogen regulating valve. The main pipeline is equipped with a pressure sensor and an online analyzer for analyzing hydrogen concentration. The control method includes the following steps: The pressure sensor obtains the actual pressure value on the main pipeline, compares the actual pressure value with the target pressure value, and uses PID calculation to control the opening of the natural gas regulating valve so that the pressure in the main pipeline is stabilized at a fixed value. The natural gas flow rate measured by the natural gas flow meter is obtained, and the natural gas flow rate is multiplied by the flow rate ratio to obtain the target flow rate of the hydrogen pipeline. The opening of the hydrogen regulating valve is controlled by PID calculation so that the actual hydrogen flow rate measured by the hydrogen flow meter follows the target flow rate. In the initial state, the flow rate ratio is equal to the set hydrogen blending ratio. Monitor whether the natural gas hydrogen blending control system meets the preset stable value conditions; the stable value conditions are: the opening fluctuation of the hydrogen regulating valve is less than the first set threshold, the fluctuation of the actual hydrogen flow rate is less than the second set threshold, the measurement fluctuation of the online analyzer is less than the third set threshold, and the duration of the above fluctuation conditions is greater than the set multiple of the measurement lag time of the online analyzer. When the stable value condition is met, the actual hydrogen doping ratio measured by the online analyzer is obtained, and the flow rate ratio is corrected based on the actual hydrogen doping ratio to obtain the corrected flow rate ratio.
[0007] Furthermore, the method also includes creating a two-dimensional table for storing and querying the correction data: The two-dimensional table uses the flow rate of the mixture of natural gas and hydrogen and the hydrogen blending ratio as two coordinate axes, and divides the coordinate system into several storage units. Each storage unit records the flow rate ratio correction value under the corresponding operating conditions.
[0008] Furthermore, in controlling the opening of the hydrogen regulating valve to make the actual hydrogen flow rate follow the target flow rate: If the monitoring shows that the natural gas hydrogen blending control system does not meet the stable value condition, then the corresponding flow ratio correction value is obtained by querying the two-dimensional table based on the current flow rate of the natural gas and hydrogen mixture and the set hydrogen blending ratio, and used as the current flow ratio. If the monitoring shows that the natural gas hydrogen blending control system meets the stable value condition, then the step of obtaining the actual hydrogen blending ratio and performing a correction calculation is executed, and the value in the corresponding storage unit in the two-dimensional table is updated using the calculated corrected flow ratio.
[0009] Further, the flow rate ratio is corrected based on the actual hydrogen doping ratio to obtain the corrected flow rate ratio, including the following data fusion steps: Obtain the current traffic ratio as the first ratio value. The actual hydrogen doping ratio measured by the online analyzer is obtained as the second ratio value. ; The first measurement standard deviation at the current flow rate is obtained based on the accuracy characteristic curve of the natural gas flow meter. The second measurement standard deviation is obtained based on the accuracy characteristic curve of the online analyzer. ; Based on the first measurement standard deviation and the second measurement standard deviation Calculate the measurement weights of the online analyzer. ; According to the first ratio value The second ratio value and the measurement weights Perform joint correction calculations to obtain the fusion value. With the fusion value As the corrected flow rate ratio.
[0010] Furthermore, the measurement weights and the fusion value The calculation formulas are as follows:
[0011] .
[0012] Furthermore, after obtaining the fusion value Subsequently, the method further includes a step of verifying and updating the standard deviation of the calculation results: Calculate the fusion value Standard deviation The calculation formula is as follows:
[0013] Introducing a preset system process error The standard deviation of the final corrected value is calculated. The calculation formula is as follows:
[0014] The standard deviation of the final corrected value With the fusion value Storage updates are performed synchronously.
[0015] Furthermore, the parameters in the stable value condition are set as follows: The first set threshold is 0.5%, the second set threshold is 0.3%, and the third set threshold is 0.5%. The measurement lag time of the online analyzer is greater than 10 seconds, and the set multiplier is 5 times.
[0016] The present invention also proposes a natural gas hydrogen blending control device, comprising various virtual functional modules for performing the natural gas hydrogen blending control method described above, the device comprising: The pressure regulation module is used to obtain the actual pressure value on the main pipeline through the pressure sensor, compare the actual pressure value with the target pressure value, and control the opening of the natural gas regulating valve through PID calculation to stabilize the pressure in the main pipeline at a fixed value. The flow following module is used to acquire the natural gas flow rate measured by the natural gas flow meter, multiply the natural gas flow rate by the flow ratio to obtain the target flow rate of the hydrogen pipeline, and control the opening of the hydrogen regulating valve through PID calculation so that the actual hydrogen flow rate measured by the hydrogen flow meter follows the target flow rate. The status monitoring module is used to monitor whether the natural gas hydrogen blending control system meets the preset stable value conditions; The correction calculation module is used to obtain the actual hydrogen doping ratio measured by the online analyzer when the stable value condition is met, and to perform a correction calculation on the flow ratio based on the actual hydrogen doping ratio to obtain the corrected flow ratio.
[0017] The present invention also proposes an electronic device, comprising: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the instructions stored in the memory to perform the method described above.
[0018] The present invention also proposes a computer-readable storage medium for storing instructions that, when executed, cause the method described above to be implemented.
[0019] Compared with existing technologies, the advantages of this invention are: 1. Combining pressure stabilization and flow control, balancing rapid response and control precision: This invention breaks away from the traditional approach of direct flow control. It prioritizes stabilizing the pressure of the mixing pipeline through the natural gas pipeline regulating valve, providing a stable flow environment for the hydrogen valve that is not affected by pressure fluctuations. Subsequently, the PID follow-up control of the hydrogen regulating valve is proportionally controlled by the natural gas flow rate, which not only ensures the system's rapid response under heavy load changes but also solidifies the physical regulation precision.
[0020] 2. Innovative steady-state value selection strategy to completely eliminate analyzer lag interference: This invention sets stringent "stable value selection conditions" for the delay characteristics of online analyzers (requiring that fluctuations in valve opening, flow rate, and analyzer measurements are all less than a small threshold, and the duration is greater than 5 times the lag time). This strategy completely avoids system misadjustment and oscillation caused by using lagging data during dynamic transition periods, ensuring the absolute reliability of the corrected data.
[0021] 3. Multi-sensor dynamic data fusion to eliminate measurement errors across the entire range: This solution does not blindly rely on a single sensor, but rather calculates dynamic measurement weights based on probability theory, combining the accuracy characteristic curves of the natural gas flow meter and the online analyzer. When the flow meter error is large (such as at low flow rates), the analyzer weight is automatically increased, and the fused value is obtained through joint correction calculation, perfectly compensating for the physical shortcomings of each instrument at different ranges.
[0022] 4. Deviation Memory and Adaptive Iteration: This scheme constructs a two-dimensional table with mixing flow rate and hydrogen doping ratio as dimensions. In non-steady-state conditions, the system can quickly query historical correction values for accurate feedforward compensation. In steady-state conditions, it writes back and updates the new fusion results and standard deviation. This gives the control system a powerful self-learning capability, becoming more accurate with repeated operation, and greatly improving the system's intelligence and automation level. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0024] Figure 1 This is a schematic flowchart of the natural gas hydrogen blending control method provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the flowmeter measurement error curve in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the storage area division in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0025] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0026] The features and performance of the present invention will be further described in detail below with reference to embodiments.
[0027] Example 1 To address the technical problems in existing technologies, such as insufficient stability in controlling the hydrogen blending ratio of natural gas due to its wide range of gas usage and large peak-valley differences, and the failure to effectively handle the measurement errors and hysteresis of flow meters and online analyzers leading to low mixing accuracy, this embodiment provides a method for controlling the hydrogen blending of natural gas.
[0028] It should be noted that the method described in this embodiment is applied to a natural gas-hydrogen blending control system. This natural gas-hydrogen blending control system specifically includes a natural gas pipeline, a hydrogen pipeline, and a main pipeline after the two are mixed. A natural gas flow meter and a natural gas regulating valve are installed on the natural gas pipeline before mixing, and a hydrogen flow meter and a hydrogen regulating valve are installed on the hydrogen pipeline before mixing. A pressure sensor and an online analyzer for analyzing hydrogen concentration are installed on the main pipeline after mixing.
[0029] Combination Figure 1 The flowchart shown illustrates a method for controlling hydrogen blending in natural gas, which includes the following steps: Step S1: Voltage-controlled pre-steady-state adjustment.
[0030] The pressure sensor obtains the actual pressure value on the main pipeline, compares the actual pressure value with the target pressure value, and uses PID calculation to control the opening of the natural gas regulating valve so that the pressure in the main pipeline is stabilized at a fixed value.
[0031] In this embodiment, it should be noted that in scenarios with a wide gas consumption range, such as urban gas pipeline networks, random changes in downstream gas consumption will directly alter the pressure in the mixing main pipeline. Even slight changes in pipeline pressure will cause nonlinear changes in the flow characteristics of pneumatic components, thereby compromising the adjustment accuracy of the hydrogen regulating valve. This step stabilizes the total pressure of the mixing pipeline by prioritizing the control valve on the natural gas pipeline. Its core principle is to create an isobaric output environment for the hydrogen pipeline through active pressure regulation at the natural gas end, thus ensuring that the valve opening and the flow rate of the hydrogen regulating valve remain relatively stable during subsequent adjustment. This is the physical prerequisite for achieving subsequent high-precision hydrogen blending ratio control.
[0032] Step S2: Follow-up flow ratio control.
[0033] The natural gas flow rate measured by the natural gas flow meter is obtained, and the natural gas flow rate is multiplied by the flow rate ratio to obtain the target flow rate of the hydrogen pipeline. The opening of the hydrogen regulating valve is controlled by PID calculation so that the actual hydrogen flow rate measured by the hydrogen flow meter follows the target flow rate. In the initial state, the flow rate ratio is equal to the set hydrogen blending ratio.
[0034] In this embodiment, it should be noted that during the PID calculation and control process, the system prioritizes the natural gas flow rate, monitors the hydrogen flow meter on the hydrogen pipeline in real time, and uses its actual measured value as the real-time feedback value for PID calculation, continuously approaching the target flow rate. This flow meter-based servo control method can achieve rapid response under large-scale load changes, compensating for the slow system response caused by the measurement lag of the subsequent online analyzer.
[0035] Step S3: Monitoring stable value conditions under delay characteristics.
[0036] The system monitors whether the natural gas hydrogen blending control system meets preset stable value conditions. The stable value conditions are: the opening fluctuation of the hydrogen regulating valve is less than a first set threshold, the fluctuation of the actual hydrogen flow rate is less than a second set threshold, the measurement fluctuation of the online analyzer is less than a third set threshold, and the duration of the above fluctuation conditions is greater than a set multiple of the measurement lag time of the online analyzer.
[0037] As a specific implementation, the first set threshold is 0.5%, the second set threshold is 0.3%, and the third set threshold is 0.5%. Since the online analyzer has obvious time delay (its measurement lag time is usually greater than 10 seconds), its real-time measurement results lag behind the actual gas concentration in the pipeline. Therefore, the set multiple is set to 5 times (that is, it is required that all indicators are less than the threshold and remain stable for more than 5 times the lag time).
[0038] In this embodiment, it should be noted that existing hydrogen-doped systems often directly accept analyzer data, leading to oscillations in the control system due to interference from lagging data. This solution innovatively proposes the concept of "discontinuous data acquisition," meaning that analyzer data is only allowed to be acquired after the flow rate, valve opening, and analyzer results have all entered a relatively stable period and the delay period of the online analyzer has been fully absorbed. This fundamentally eliminates feedback errors caused by acquiring invalid lagging data under dynamic fluctuation conditions.
[0039] Step S4: Table lookup in unsteady state and update / correction in steady state.
[0040] In this scheme, to address the nonlinear shift in sensor error characteristics under different operating conditions (flow rate, hydrogen doping ratio), a two-dimensional table is established for storing and retrieving correction data. For example... Figure 3 (Diagram of storage area division) As shown, the two-dimensional table uses the flow rate of the mixture of natural gas and hydrogen and the hydrogen doping ratio as the two-dimensional coordinate axes, and divides the coordinate system into several storage units (for example, it can be divided into 10×10 storage units in total). Each storage unit records the flow rate ratio correction value under the corresponding operating conditions.
[0041] In controlling the opening of the hydrogen regulating valve to ensure that the actual hydrogen flow rate follows the target flow rate, the following dual-track logic is executed: (1) If the monitoring shows that the natural gas hydrogen blending control system does not meet the stable value condition (i.e., the system is in a transitional working condition of flow fluctuation or unstable regulating valve), then since the online analyzer data is unreliable at this time, the system queries the two-dimensional table according to the current flow and the set hydrogen blending ratio to obtain the corresponding flow ratio correction value as the current flow ratio, so as to realize rapid feedforward compensation based on historical experience (deviation memory strategy).
[0042] (2) When the stable value condition is met, the actual hydrogen doping ratio measured by the online analyzer is obtained, and the flow rate ratio is corrected according to the actual hydrogen doping ratio to obtain the corrected flow rate ratio. The calculated corrected flow rate ratio is used to update the value in the corresponding storage unit in the two-dimensional table, thereby realizing the system's self-learning and adaptive correction.
[0043] Step S5: Multi-sensor data fusion calculation based on probability theory.
[0044] Regarding the issue that "online analyzers also have certain errors, and relying solely on a single sensor to determine the final ratio can lead to significant deviations," this step details the specific data fusion process of "correcting the flow ratio based on the actual hydrogen doping ratio to obtain the corrected flow ratio": 1) Obtain the current traffic ratio as the first ratio value. The actual hydrogen doping ratio measured by the online analyzer is obtained as the second ratio value. ; 2) Combining such as Figure 2 As shown in the schematic diagram of the flow meter measurement error curve, the measurement error of the flow meter is relatively large at low flow rates. Therefore, the first measurement standard deviation at the current flow rate is obtained based on the accuracy characteristic curve of the natural gas flow meter. The second measurement standard deviation is obtained based on the accuracy characteristic curve of the online analyzer. ; 3) Based on the first measurement standard deviation and the second measurement standard deviation Calculate the measurement weights of the online analyzer. The calculation formula is:
[0045] 4) Based on the first ratio value The second ratio value and the measurement weights Perform joint correction calculations to obtain the fusion value. With the fusion value As the revised traffic ratio. Fusion value. The calculation formula for (i.e., the actual hydrogen doping ratio derived at this point) is:
[0046] In this embodiment, it should be noted that the data fusion algorithm perfectly combines the short-term high-frequency response characteristics of the flow meter with the long-term steady-state accuracy characteristics of the analyzer. When in the low flow range, the... Figure 3 The standard deviation of the flow meter can be known. As the weight increases, the measurement weight calculated using the above formula will also increase. It will automatically increase, meaning the system will trust the data from the online analyzer more; conversely, if analyzer drift causes... As the sensor's size increases, the system automatically reduces its weight. This completely solves the measurement deviation problem caused by differences in sensor accuracy across different measurement ranges.
[0047] 5) After obtaining the fusion value Finally, this method also includes a step of verifying and updating the standard deviation of the calculation results: Calculate the fusion value Standard deviation The calculation formula is as follows:
[0048] Considering the non-ideal state of the control process, a preset system process error, which is manually set during commissioning, is introduced. The standard deviation of the final corrected value is calculated. The calculation formula is as follows:
[0049] Finally, the standard deviation of the final corrected value is... With the fusion value The data is synchronously written to and updated in the aforementioned two-dimensional table, completing the data iteration of the current storage unit.
[0050] Example 2 Based on the same inventive concept as Embodiment 1, this embodiment provides a natural gas hydrogen blending control device. Since the device provided in this embodiment is used to execute the natural gas hydrogen blending control method described in Embodiment 1, its specific working principle, control logic, and achievable technical effects are the same as in Embodiment 1. For the sake of brevity, details not fully described in this embodiment can be referred to the corresponding descriptions in Embodiment 1.
[0051] Specifically, this embodiment provides a natural gas hydrogen blending control device, which includes various virtual functional modules for executing the natural gas hydrogen blending control method described in Embodiment 1. The device specifically includes: Pressure regulation module; The pressure regulation module is used to obtain the actual pressure value on the main pipeline through the pressure sensor, compare the actual pressure value with the target pressure value, and control the opening of the natural gas regulating valve through PID calculation to stabilize the pressure in the main pipeline at a fixed value.
[0052] The function of this module is to perform the "Pressure Control Pre-Steady-State Adjustment" step in Example 1, and to provide a stable physical environment that is not disturbed by pressure fluctuations for subsequent hydrogen ratio adjustment by actively adjusting the pressure at the natural gas end.
[0053] A flow following module is used to acquire the natural gas flow rate measured by the natural gas flow meter, multiply the natural gas flow rate by the flow ratio to obtain the target flow rate of the hydrogen pipeline, and control the opening of the hydrogen regulating valve through PID calculation so that the actual hydrogen flow rate measured by the hydrogen flow meter follows the target flow rate; wherein, the flow ratio in the initial state is equal to the set hydrogen blending ratio.
[0054] Furthermore, during the execution of follow-up control, if the subsequent status monitoring module determines that the system does not meet the stable value conditions, the module will also query a pre-established two-dimensional table based on the current flow rate and the set hydrogen doping ratio to obtain the corresponding flow rate ratio correction value as the current flow rate ratio, so as to achieve rapid feedforward control under dynamic fluctuation conditions.
[0055] Status monitoring module; the status monitoring module is used to monitor whether the natural gas hydrogen blending control system meets the preset stable value conditions.
[0056] Specifically, the module has built-in discrimination logic to determine in real time whether the opening fluctuation of the hydrogen regulating valve is less than a first set threshold (e.g., 0.5%), whether the fluctuation of the actual hydrogen flow rate is less than a second set threshold (e.g., 0.3%), whether the measurement fluctuation of the online analyzer is less than a third set threshold (e.g., 0.5%), and whether the duration for which the above indicators meet the conditions is greater than a set multiple of the measurement lag time of the online analyzer (e.g., greater than 5 times a 10-second lag time). Only when the above conditions are met simultaneously will the module send an allowable value instruction to the correction calculation module, thereby completely eliminating the interference caused by the delay and lag characteristics of the online analyzer.
[0057] The correction calculation module is used to obtain the actual hydrogen doping ratio measured by the online analyzer when it receives the permission instruction from the status monitoring module (i.e., the stable value condition is met), and to perform a correction calculation on the flow ratio based on the actual hydrogen doping ratio to obtain the corrected flow ratio.
[0058] Furthermore, this correction calculation module also includes a data fusion calculation unit and a data update unit. The data fusion calculation unit is responsible for calculating the measurement weights by combining the accuracy characteristic curves of the natural gas flow meter and the online analyzer. and fusion value And introduce a preset system process error. Derive the standard deviation of the final corrected value (The specific formula is the same as in Example 1). The data update unit is responsible for synchronously updating the calculated corrected flow ratio and standard deviation to the corresponding storage unit of the two-dimensional table, thereby realizing the adaptive iteration of system control accuracy.
[0059] It should be noted that each module in the above-mentioned natural gas hydrogen blending control device can be a virtual module implemented based on software programs, or hardware firmware embedded in a programmable logic controller (PLC), microcontroller (MCU), or application-specific integrated circuit (ASIC). As long as it can implement the logic described in Embodiment 1, it is within the protection scope of this invention.
[0060] Based on the same technical concept, embodiments of the present invention also provide an electronic device that can implement the natural gas hydrogen blending control method flow provided in the above embodiments of the present invention. In one embodiment, the electronic device may be a server, a terminal device, or other electronic equipment. Figure 4 As shown, the electronic device may include: At least one processor and a memory connected to the at least one processor. In this embodiment of the invention, the specific connection medium between the processor and the memory is not limited. Figure 4 The example used is the connection between the processor and memory via a bus. The bus... Figure 4 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Buses can be divided into address buses, data buses, control buses, etc., but for ease of representation, [the specific bus type is not shown here]. Figure 4 The processor is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, a processor can also be called a controller; there are no restrictions on the name.
[0061] In this embodiment of the invention, the memory stores instructions executable by at least one processor. By executing the instructions stored in the memory, the at least one processor can perform a natural gas hydrogen blending control method as described above. The processor can implement... Figure 4 The functions of each module in the device shown.
[0062] The processor is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory and calling data stored in memory, it can monitor the device's various functions and process data, thereby enabling overall monitoring of the device.
[0063] In an alternative design, the processor may include one or more processing units. The processor may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may also not be integrated into the processor. In some embodiments, the processor and memory may be implemented on the same chip; in some embodiments, they may also be implemented separately on separate chips.
[0064] The processor can be a general-purpose processor, such as a CPU, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the natural gas hydrogen blending control method disclosed in the embodiments of this invention can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0065] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia cards, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), and electrically erasable programmable read-only memory (EPROM). Only memory (EEPROM), magnetic storage, magnetic disks, optical disks, etc. A memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited thereto. The memory in embodiments of this invention can also be a circuit or any other device capable of performing storage functions for storing program instructions and / or data.
[0066] By designing and programming the processor, the code corresponding to the natural gas hydrogen blending control method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the steps of the method described in the foregoing embodiments during operation. How to design and program the processor is a technique well-known to those skilled in the art and will not be elaborated upon here.
[0067] Based on the same inventive concept, embodiments of the present invention also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a natural gas hydrogen blending control method described above.
[0068] In some alternative embodiments, the present invention also provides a natural gas hydrogen blending control method that can also be implemented as a program product including program code, which, when the program product is run on a device, causes the control device to perform the steps in a natural gas hydrogen blending control method according to various exemplary embodiments of the present invention as described above.
[0069] It should be noted that although several units or sub-units of the apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the invention, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units. Furthermore, although the operation of the method of the invention is described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0070] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can be implemented in one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs) containing computer-usable program code. The form of a computer program product implemented on ROM, optical memory, etc.
[0071] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a server, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0072] Program code for performing the operations of this invention can be written using any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0073] In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0076] Example 3 To further verify the feasibility and control accuracy of the natural gas hydrogen blending control method and device provided by the present invention in actual industrial sites, this embodiment provides a correction and deduction process for the hydrogen blending ratio under a specific industrial application scenario.
[0077] The operation of this embodiment is based on the logic of the method described in Embodiment 1. Specifically, taking a hydrogen-blending node in a city's gas pipeline network as an example, the specific control and data correction process is as follows: 1. Initial parameter setting and initial adjustment At the beginning of the control process, the target "hydrogen doping ratio" was set to 20%.
[0078] The current "natural gas flow rate" is measured by a natural gas flow meter on the natural gas pipeline. .
[0079] At this point, according to the flow-following logic in Example 1, the initial flow rate ratio is equal to the set hydrogen doping ratio (i.e., 20%). The system calculates that the target flow rate on the hydrogen pipeline should be:
[0080] The control system uses PID calculations to adjust the hydrogen regulating valve, ensuring the flow rate on the hydrogen pipeline reaches the specified level. .
[0081] 2. Steady-state determination and data acquisition After flow regulation, the system activates the status monitoring module to continuously monitor the valve opening, flow fluctuations, and measurement fluctuations of the online analyzer. When the amplitude of the above fluctuations is less than the set threshold (e.g., 0.5%, 0.3%), and the duration is greater than 5 times the measurement lag time of the online analyzer (i.e., the delay characteristics of the online analyzer are fully absorbed), the system is determined to have entered a stable value condition.
[0082] At this point, the system captures the measurement results from the online analyzer and obtains the true "actual hydrogen doping ratio" as 19.5%.
[0083] 3. Correction calculation and secondary adjustment The discrepancy between the actual measurement result (19.5%) and the target hydrogen doping ratio (20%) indicates that due to factors such as valve mechanical error, gas state changes, or flow meter deviation, the original 20% flow rate distribution could not achieve the true 20% mixing concentration.
[0084] The system calculations showed that the hydrogen ratio needed to be increased by another 0.5%.
[0085] Based on the system's built-in correction calculation rules, the traffic ratio correction value is calculated as follows:
[0086] The system uses this correction value to recalculate the initial traffic ratio, resulting in the updated target traffic ratio:
[0087] Subsequently, the system recalculates the target flow rate on the hydrogen pipeline based on the corrected flow rate ratio:
[0088] The control system is based on the new target flow rate ( The hydrogen regulating valve is activated again.
[0089] 4. Closed-loop iteration and storage After the above adjustments, the system re-enters the steady-state determination cycle. Through multiple closed-loop data acquisition and correction calculations (and combined with the data fusion calculations described in Example 1 to eliminate single sensor errors), the system ultimately stabilizes the measurement results of the online analyzer at a precise 20%.
[0090] Finally, the system will assign this operating condition (i.e., the total flow rate) to... The final convergence correction result and standard deviation at the target hydrogen doping level (20% hydrogen content) are updated and stored in the corresponding storage cell in the two-dimensional table. When the system operates under similar load conditions again in the future, and the regulating valve is not yet stable, the system can directly retrieve the correction value from the two-dimensional table, thereby achieving extremely fast and precise feedforward control.
[0091] In summary, as demonstrated by the specific deduction in this embodiment, this solution completely breaks away from the traditional coarse control mode of "open-loop proportional setpoint". It allows for objective physical errors in the underlying devices (flowmeters, regulating valves), but through the adaptive mechanism of "waiting for steady state delay -> obtaining actual deviation -> correcting flow ratio -> closed-loop iterative storage" in the upper-level control algorithm, it forcefully pulls the final mixing accuracy back to the absolutely accurate setpoint, greatly improving the fault tolerance and final output accuracy of the hydrogen-doped system.
[0092] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.
[0093] This background section is provided to generally present the context of the invention. The work of the currently named inventors, the work to the extent described in this background section, and aspects of this section that did not constitute prior art at the time of application are neither expressly nor impliedly acknowledged as prior art to the invention.
Claims
1. A method for controlling hydrogen blending in natural gas, characterized in that, An application is made in a natural gas hydrogen blending control system, which includes a natural gas pipeline, a hydrogen pipeline, and a main pipeline for mixing the two. The natural gas pipeline is equipped with a natural gas flow meter and a natural gas regulating valve; the hydrogen pipeline is equipped with a hydrogen flow meter and a hydrogen regulating valve; and the main pipeline is equipped with a pressure sensor and an online analyzer for analyzing hydrogen concentration. The control method includes the following steps: The pressure sensor obtains the actual pressure value on the main pipeline, compares the actual pressure value with the target pressure value, and uses PID calculation to control the opening of the natural gas regulating valve so that the pressure in the main pipeline is stabilized at a fixed value. The natural gas flow rate measured by the natural gas flow meter is obtained, and the natural gas flow rate is multiplied by the flow rate ratio to obtain the target flow rate of the hydrogen pipeline. The opening of the hydrogen regulating valve is controlled by PID calculation so that the actual hydrogen flow rate measured by the hydrogen flow meter follows the target flow rate. In the initial state, the flow rate ratio is equal to the set hydrogen blending ratio. Monitor whether the natural gas hydrogen blending control system meets the preset stable value conditions; the stable value conditions are: the opening fluctuation of the hydrogen regulating valve is less than the first set threshold, the fluctuation of the actual hydrogen flow rate is less than the second set threshold, the measurement fluctuation of the online analyzer is less than the third set threshold, and the duration of the above fluctuation conditions is greater than the set multiple of the measurement lag time of the online analyzer. When the stable value condition is met, the actual hydrogen doping ratio measured by the online analyzer is obtained, and the flow rate ratio is corrected based on the actual hydrogen doping ratio to obtain the corrected flow rate ratio.
2. The method for controlling hydrogen blending in natural gas according to claim 1, characterized in that, The method also includes creating a two-dimensional table for storing and querying the correction data: The two-dimensional table uses the flow rate of the mixture of natural gas and hydrogen and the hydrogen blending ratio as two coordinate axes, and divides the coordinate system into several storage units. Each storage unit records the flow rate ratio correction value under the corresponding operating conditions.
3. The method for controlling hydrogen blending in natural gas according to claim 2, characterized in that, In controlling the opening of the hydrogen regulating valve to make the actual hydrogen flow rate follow the target flow rate: If the monitoring shows that the natural gas hydrogen blending control system does not meet the stable value condition, then the corresponding flow ratio correction value is obtained by querying the two-dimensional table based on the current flow rate of the natural gas and hydrogen mixture and the set hydrogen blending ratio, and used as the current flow ratio. If the monitoring shows that the natural gas hydrogen blending control system meets the stable value condition, then the step of obtaining the actual hydrogen blending ratio and performing a correction calculation is executed, and the value in the corresponding storage unit in the two-dimensional table is updated using the calculated corrected flow ratio.
4. The method for controlling hydrogen blending in natural gas according to claim 1, characterized in that, The flow rate ratio is corrected based on the actual hydrogen doping ratio to obtain the corrected flow rate ratio, including the following data fusion steps: Obtain the current traffic ratio as the first ratio value. The actual hydrogen doping ratio measured by the online analyzer is obtained as the second ratio value. ; The first measurement standard deviation at the current flow rate is obtained based on the accuracy characteristic curve of the natural gas flow meter. The second measurement standard deviation is obtained based on the accuracy characteristic curve of the online analyzer. ; Based on the first measurement standard deviation and the second measurement standard deviation Calculate the measurement weights of the online analyzer. ; According to the first ratio value The second ratio value and the measurement weights Perform joint correction calculations to obtain the fusion value. With the fusion value As the corrected flow rate ratio.
5. The method for controlling hydrogen blending in natural gas according to claim 4, characterized in that, The measurement weight and the fusion value The calculation formulas are as follows: 。 6. The method for controlling hydrogen blending in natural gas according to claim 5, characterized in that, After obtaining the fusion value Subsequently, the method further includes a step of verifying and updating the standard deviation of the calculation results: Calculate the fusion value Standard deviation The calculation formula is as follows: Introducing a preset system process error The standard deviation of the final corrected value is calculated. The calculation formula is as follows: The standard deviation of the final corrected value With the fusion value Storage updates are performed synchronously.
7. The method for controlling hydrogen blending in natural gas according to claim 1, characterized in that, The parameters in the stable value condition are set as follows: The first set threshold is 0.5%, the second set threshold is 0.3%, and the third set threshold is 0.5%. The measurement lag time of the online analyzer is greater than 10 seconds, and the set multiplier is 5 times.
8. A natural gas hydrogen blending control device, characterized in that, The apparatus includes virtual functional modules for performing the natural gas hydrogen blending control method as described in any one of claims 1 to 7, the apparatus comprising: The pressure regulation module is used to obtain the actual pressure value on the main pipeline through the pressure sensor, compare the actual pressure value with the target pressure value, and control the opening of the natural gas regulating valve through PID calculation to stabilize the pressure in the main pipeline at a fixed value. The flow following module is used to acquire the natural gas flow rate measured by the natural gas flow meter, multiply the natural gas flow rate by the flow ratio to obtain the target flow rate of the hydrogen pipeline, and control the opening of the hydrogen regulating valve through PID calculation so that the actual hydrogen flow rate measured by the hydrogen flow meter follows the target flow rate. The status monitoring module is used to monitor whether the natural gas hydrogen blending control system meets the preset stable value conditions; The correction calculation module is used to obtain the actual hydrogen doping ratio measured by the online analyzer when the stable value condition is met, and to perform a correction calculation on the flow ratio based on the actual hydrogen doping ratio to obtain the corrected flow ratio.
9. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which executes the instructions stored in the memory to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store instructions that, when executed, cause the method as described in any one of claims 1-7 to be implemented.
