Gas temperature and humidity measurement control method, system and measurement device

By using ultrasonic signals outside the transmission pipeline to measure the sound velocity and sound attenuation coefficient of the gas, the problems of short life of contact sensors and low accuracy of non-contact sensors are solved. This enables high-precision temperature and humidity measurement of highly corrosive, highly toxic or radioactive gases, reducing maintenance frequency and safety risks.

CN122448299APending Publication Date: 2026-07-24SHENZHEN MANHILL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN MANHILL TECH CO LTD
Filing Date
2026-06-29
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, contact-type gas temperature and humidity sensors have short lifespans and low measurement accuracy in highly corrosive, highly toxic, or radioactive gas environments, while non-contact methods lack sufficient accuracy, resulting in frequent sensor maintenance and high safety risks.

Method used

By using ultrasonic signals to measure the sound velocity and sound attenuation coefficient of the gas outside the transmission pipeline, and by calculating the thermodynamic temperature and water vapor mole fraction of the gas, non-contact high-precision temperature and humidity measurement can be achieved.

Benefits of technology

It enables high-precision temperature and humidity measurement of highly corrosive, toxic, or radioactive gases, reducing sensor maintenance frequency and safety risks, and improving measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122448299A_ABST
    Figure CN122448299A_ABST
Patent Text Reader

Abstract

The application provides a kind of gas temperature and humidity measurement control method, system and measuring equipment, it is related to gas temperature and humidity measurement control field, the method utilizes the sound speed value and sound attenuation coefficient of ultrasonic signal to the gas to be measured in transmission pipeline accurate calculation, utilize the thermodynamic temperature value and water vapor molar fraction value of the gas to be measured that the acoustic characteristics obtained are accurately calculated, and finally realize the high-precision temperature and humidity measurement of the gas to be measured.The ultrasonic transmitter and receiver used in the method are all arranged outside the transmission pipeline, realizing the non-contact measurement of the gas to be measured, and the correlation between the acoustic characteristics and physical characteristics of the gas to be measured is fully considered in the measurement and calculation process, which greatly improves the temperature and humidity measurement accuracy of the gas to be measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas temperature and humidity measurement and control, and in particular to a gas temperature and humidity measurement and control method, system and measuring equipment. Background Technology

[0002] In industrial production, gas temperature and humidity are critical control parameters. For example, in the chlor-alkali industry, the wet chlorine drying section requires precise moisture control to prevent corrosion of downstream equipment; the flue gas desulfurization system in coal-fired power plants needs to monitor the acid dew point temperature of the flue gas in real time to avoid equipment failure caused by low-temperature corrosion; and nuclear fuel reprocessing plants require non-contact temperature and humidity monitoring of highly radioactive gases to ensure safe operation. The gas temperature and humidity measurement processes in these production fields mainly employ contact measurement methods, i.e., directly exposing the sensor to the gas environment for measurement. However, this method is prone to sensor contamination and damage.

[0003] Specifically, the gases to be measured in the above scenarios are often highly corrosive, highly toxic, or radioactive. Traditional contact temperature and humidity sensors have extremely short lifespans because the sensitive elements must be directly exposed to the gas environment. Moreover, the sensitive materials in the sensors are prone to chemical corrosion, which can cause signal drift. In addition, the probes in the sensors may contaminate high-purity gases due to catalytic effects, and the sensors themselves may release impurities into the gas or adsorb target components, causing measurement deviations.

[0004] The aforementioned issues lead to frequent sensor replacements, which not only increases maintenance costs but also poses a high safety risk as personnel must perform sensor replacements in an environment with toxic and corrosive gases.

[0005] Although there are non-contact measurement methods such as infrared thermometry or microwave humidity measurement in the existing technology, these methods have low accuracy and are easily affected by environmental interference, resulting in poor non-contact gas temperature and humidity measurement performance. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a gas temperature and humidity measurement and control method, system, and measuring device. This method utilizes ultrasonic signals to accurately calculate the sound velocity and attenuation coefficient of the gas to be measured within a transmission pipeline. Then, it uses the obtained acoustic characteristics to accurately calculate the thermodynamic temperature and water vapor mole fraction of the gas to be measured, ultimately achieving high-precision temperature and humidity measurement of the gas. The ultrasonic transmitter and receiver used in this method are both located outside the transmission pipeline, achieving non-contact measurement of the gas. Furthermore, the measurement and calculation process fully considers the correlation between the acoustic and physical characteristics of the gas to be measured, significantly improving the accuracy of temperature and humidity measurement.

[0007] In a first aspect, embodiments of the present invention provide a gas temperature and humidity measurement and control method, which is applied to a controller of a gas temperature and humidity measuring device; the gas temperature and humidity measuring device further includes: an ultrasonic transmitting transducer, a first receiving transducer, and a second receiving transducer; the method includes: After controlling the ultrasonic transmitting transducer to transmit ultrasonic signals to the transmission pipe of the gas to be tested, the first receiving transducer and the second receiving transducer are controlled to receive the first transmission signal and the second transmission signal after the ultrasonic signal passes through the gas to be tested, respectively. The sound velocity of the ultrasonic signal in the gas to be tested is calculated based on the time difference between the acquisition of the first and second transmitted signals, and the sound attenuation coefficients corresponding to the first and second transmitted signals are calculated based on the frequency values ​​of the ultrasonic signals. After calculating the thermodynamic temperature and water vapor mole fraction of the gas to be tested using the sound velocity and sound attenuation coefficient, the temperature and humidity of the gas to be tested are obtained through the thermodynamic temperature and water vapor mole fraction values.

[0008] Optionally, the step of calculating the sound velocity of the ultrasonic signal in the gas to be tested based on the acquisition time difference between the first and second transmitted signals includes: The transducer spacing between the first and second receiving transducers is calculated based on the propagation direction of the ultrasonic signal. The acquisition time difference between the first and second transmission signals is obtained by calculating the difference between the second acquisition time of the second transmission signal and the first acquisition time of the first transmission signal. The propagation time of the ultrasonic signal from the first receiving transducer to the second receiving transducer is calculated by collecting the time difference. The speed of sound of the ultrasonic signal in the gas under test is calculated based on the ratio of transducer spacing to propagation time.

[0009] Optionally, the step of obtaining the acquisition time difference between the first and second transmitted signals based on the difference between the second acquisition time of the second transmitted signal and the first acquisition time of the first transmitted signal includes: Acquire the second acquisition time of the second transmitted signal and the first acquisition time of the first transmitted signal; The signal acquisition advance of the second transmitted signal and the first transmitted signal is determined based on the calculation result of the difference between the second acquisition time and the first acquisition time. The first sampling point of the first transmitted signal is determined based on the first acquisition time, and the second sampling point of the second transmitted signal is determined based on the second acquisition time and the signal acquisition advance. The cross-correlation value between the first transmitted signal and the second transmitted signal is calculated using the first sampling point and the second sampling point. Obtain the signal acquisition advance when the cross-correlation value is at its maximum, and determine the acquisition time difference between the first and second transmitted signals based on the signal acquisition advance.

[0010] Optionally, the acoustic attenuation coefficients corresponding to the first and second transmitted signals are calculated based on the frequency values ​​of the ultrasonic signals, including: Based on the frequency value of the ultrasonic signal, the amplitude of the transmitted spectrum of the ultrasonic signal, the amplitude of the first received spectrum of the first transmitted signal, and the amplitude of the second received spectrum of the second transmitted signal are calculated respectively. The first gas acoustic path and the second gas acoustic path between the ultrasonic transmitting transducer and the first receiving transducer and the second receiving transducer are obtained respectively, and the frequency attenuation coefficient of the transmission pipe in the empty pipe state is obtained based on the frequency value. The first acoustic attenuation coefficient of the first transmitted signal at the specified frequency value is calculated using the frequency value, the amplitude of the transmitted spectrum, the amplitude of the first received spectrum, the first gas acoustic path, and the frequency attenuation coefficient. The second acoustic attenuation coefficient of the second transmitted signal at the specified frequency value is calculated using the frequency value, the amplitude of the transmitted spectrum, the amplitude of the second received spectrum, the second gas sound path, and the frequency attenuation coefficient.

[0011] Optionally, the thermodynamic temperature and water vapor mole fraction of the gas to be measured can be calculated using the sound velocity and sound attenuation coefficient, including: Acoustic characteristic data of the gas under test are constructed using the sound velocity value, the first sound attenuation coefficient, and the second sound attenuation coefficient. The physical characteristic data of the gas to be tested are constructed based on the pressure, molar mass, and specific heat ratio of the gas in the transmission pipeline. Obtain the relaxation frequency positions of the first and second sound attenuation coefficients in the acoustic feature data. The temperature and humidity correlation parameters of the gas under test are calculated at the relaxation frequency position using physical characteristic data, and the thermodynamic temperature and water vapor mole fraction of the gas under test are calculated using the temperature and humidity correlation parameters.

[0012] Optionally, the steps of calculating the temperature and humidity correlation parameters of the gas under test at the relaxation frequency position using physical characteristic data, and calculating the thermodynamic temperature and water vapor mole fraction of the gas under test using the temperature and humidity correlation parameters, include: After performing dilated convolution calculations on the acoustic feature data using multiple preset dilation rates, convolution maps corresponding to each dilation rate are obtained. Then, the convolution maps are connected with the acoustic feature data using global residuals to obtain the fused feature data of the gas to be tested. The temperature and humidity correlation parameters corresponding to the fused feature data at the relaxation frequency position are obtained by using physical feature data. The first projection weight matrix of acoustic feature data and the second projection weight matrix of physical feature data are determined by the temperature and humidity correlation parameters. The query matrix and key matrix of the gas to be tested are obtained based on the first projection weight matrix and the second projection weight matrix, respectively. After obtaining the value matrix of the gas to be tested based on the first projection weight matrix, the multi-head attention calculation results corresponding to the query matrix, key matrix and value matrix are calculated by the softmax activation function. The global context feature data of the gas to be tested is obtained based on the multi-head attention calculation results and the normalized connection results of the fused feature data, and the global context feature data and physical feature data are input into the trained physical constraint model. After concatenating the global context feature data with the physical feature data, the physical constraint data of the gas to be tested is obtained. The physical prior weights and physical prior biases in the physical constraint model are used to calculate the physical fusion feature data of the physical constraint data. The thermodynamic temperature and water vapor mole fraction values ​​corresponding to the physical fusion feature data are calculated using the fully connected weight values ​​in the physical constraint model and the output weight values.

[0013] Optionally, the loss function used during the training of the physical constraint model is: ; in, The loss function; For data fitting loss of the physical constraint model; For physical feature loss; This is the time-series smoothing loss; This is the first weight value for the physical feature loss; This is the second weight value for the temporal smoothing loss; ; ; ; This represents the number of training samples for the physical constraint model. and These are the true values ​​of temperature and water vapor mole fraction corresponding to the i-th training sample, respectively; The third weighting coefficient corresponds to the data fitting loss. and These are the predicted values ​​of temperature and water vapor mole fraction for the i-th training sample, respectively. Let be the actual measured speed of sound value corresponding to the i-th training sample; Let be the equivalent specific heat ratio of the mixed gas corresponding to the i-th training sample; This is the universal gas constant; Let be the equivalent molar mass of the mixed gas corresponding to the i-th training sample; ; The original input specific heat ratio of the i-th training sample is the true specific heat ratio of the carrier gas. Let be the specific heat capacity of the carrier gas at constant volume corresponding to the i-th training sample; The specific heat ratio of water vapor; The specific heat capacity of water vapor at constant volume; ; The original input molar mass of the carrier gas corresponding to the i-th training sample; This represents the molar mass of water vapor.

[0014] Optionally, the temperature and humidity values ​​of the gas to be measured can be obtained through thermodynamic temperature and water vapor mole fraction values, including: The temperature measurement value of the gas to be tested is obtained by using thermodynamic temperature value; The humidity measurement value of the gas under test at the thermodynamic temperature is obtained based on the water vapor mole fraction value; the humidity measurement value is calculated using the following formula: ; in, This is a humidity measurement value. This represents the mole fraction of water vapor. The molar mass of water vapor. The pressure value of the gas to be measured in the transmission pipeline. This is the universal gas constant. This is the thermodynamic temperature value.

[0015] Secondly, the present invention provides a gas temperature and humidity measurement and control system, which is applied to the controller of a gas temperature and humidity measuring device; the gas temperature and humidity measuring device further includes: an ultrasonic transmitting transducer, a first receiving transducer, and a second receiving transducer; the system includes: Ultrasonic control module: After controlling the ultrasonic transmitting transducer to transmit ultrasonic signals to the transmission pipeline of the gas to be tested, it controls the first receiving transducer and the second receiving transducer to receive the first transmitted signal and the second transmitted signal after the ultrasonic signal passes through the gas to be tested, respectively. Acoustic data calculation module: used to calculate the sound velocity value of the ultrasonic signal in the gas to be tested based on the acquisition time difference between the first transmitted signal and the second transmitted signal, and to calculate the sound attenuation coefficients corresponding to the first transmitted signal and the second transmitted signal based on the frequency value of the ultrasonic signal. Temperature and humidity measurement and calculation module: This module is used to calculate the thermodynamic temperature and water vapor mole fraction of the gas to be measured using the sound velocity and sound attenuation coefficient, and then obtain the temperature and humidity measurements of the gas to be measured using the thermodynamic temperature and water vapor mole fraction.

[0016] Thirdly, embodiments of the present invention also provide a gas temperature and humidity measuring device, which includes: an ultrasonic transmitting transducer, a first receiving transducer and a second receiving transducer, and a controller; the controller is connected to the ultrasonic transmitting transducer, the first receiving transducer and the second receiving transducer respectively. The controller includes a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor. The processor executes the computer-executable instructions to implement the gas temperature and humidity measurement and control method provided in the first aspect.

[0017] This invention provides a gas temperature and humidity measurement and control method, system, and measuring device, applied in the controller of a gas temperature and humidity measuring device. The gas temperature and humidity measuring device further includes an ultrasonic transmitting transducer, a first receiving transducer, and a second receiving transducer. During the measurement of the temperature and humidity of the gas to be measured in a transmission pipeline, the method controls the ultrasonic transmitting transducer to emit an ultrasonic signal into the transmission pipeline of the gas to be measured. Then, it controls the first and second receiving transducers to receive the first and second transmitted signals of the ultrasonic signal after it has passed through the gas to be measured, respectively. Next, it calculates the sound velocity of the ultrasonic signal in the gas to be measured based on the time difference between the acquisition of the first and second transmitted signals, and calculates the sound attenuation coefficients corresponding to the first and second transmitted signals based on the frequency value of the ultrasonic signal. After calculating the thermodynamic temperature and water vapor mole fraction of the gas to be measured using the sound velocity and sound attenuation coefficients, it finally obtains the temperature and humidity measurements of the gas to be measured using the thermodynamic temperature and water vapor mole fraction values. This method utilizes ultrasonic signals to accurately calculate the sound velocity and attenuation coefficient of the gas under test within a transmission pipe. Then, it uses the obtained acoustic characteristics to precisely calculate the thermodynamic temperature and water vapor mole fraction of the gas, ultimately achieving high-precision temperature and humidity measurement. The ultrasonic transmitter and receiver used in this method are both located outside the transmission pipe, enabling non-contact measurement of the gas. Furthermore, the measurement and calculation process fully considers the correlation between the acoustic and physical characteristics of the gas under test, significantly improving the accuracy of temperature and humidity measurement.

[0018] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.

[0019] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0020] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 A flowchart of a gas temperature and humidity measurement and control method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the components of a gas temperature and humidity measuring device in a gas temperature and humidity measurement and control method provided in an embodiment of the present invention; Figure 3 A flowchart illustrating the process of obtaining thermodynamic temperature and water vapor mole fraction values ​​using a deep learning model in a gas temperature and humidity measurement and control method provided in this embodiment of the invention. Figure 4 A flowchart of another gas temperature and humidity measurement and control method provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a gas temperature and humidity measurement and control system provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a gas temperature and humidity measuring device provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the controller in a gas temperature and humidity measuring device provided in an embodiment of the present invention.

[0022] icon: 510 - Ultrasonic control module; 520 - Acoustic wave data calculation module; 530 - Temperature and humidity measurement and calculation module; 610 - Ultrasonic transmitting transducer; 620 - First receiving transducer; 630 - Second receiving transducer; 640 - Controller; 101 - Processor; 102 - Memory; 103 - Bus; 104 - Communication interface. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] To facilitate understanding of this embodiment, a detailed description of the gas temperature and humidity measurement and control method disclosed in this invention will be provided first. Specifically, this method is applied to the controller of a gas temperature and humidity measuring device, which further includes an ultrasonic transmitting transducer, a first receiving transducer, and a second receiving transducer connected to the controller. The ultrasonic transmitting transducer is disposed on one side of the transmission pipeline, and the first and second receiving transducers are disposed on the other side of the transmission pipeline. All transducers do not contact the gas to be measured inside the pipeline, achieving non-contact detection throughout the process. Based on this, as... Figure 1 As shown, the method includes: Step S101: After controlling the ultrasonic transmitting transducer to transmit ultrasonic signals to the transmission pipe of the gas to be tested, control the first receiving transducer and the second receiving transducer to receive the first transmission signal and the second transmission signal after the ultrasonic signal passes through the gas to be tested, respectively.

[0025] The controller outputs a drive command to control the ultrasonic transducer on the outside of the pipe to emit a fixed frequency ultrasonic detection signal. After penetrating the pipe wall, the ultrasonic wave enters the gas medium to be tested inside the pipe. After penetrating the gas, the ultrasonic wave travels along the propagation path to the first and second receiving transducers on the opposite side.

[0026] The controller then controls the two receiving transducers to synchronously acquire signals, obtaining the first transmission signal and the second transmission signal after penetrating the gas medium under test, and simultaneously storing the acquisition timing and waveform amplitude raw data of the two sets of signals, providing raw data support for subsequent acoustic parameter calculations.

[0027] Step S102: Calculate the sound velocity value of the ultrasonic signal in the gas to be tested based on the acquisition time difference between the first and second transmitted signals, and calculate the sound attenuation coefficients corresponding to the first and second transmitted signals based on the frequency value of the ultrasonic signal.

[0028] Retrieve the original acquisition data of the first and second transmission signals stored in step S101, compare the reception start time of the two sets of transmission signals, and accurately calculate the acquisition time difference between the two sets of signals; combine the preset fixed propagation distance between the two receiving transducers, and calculate the real-time sound velocity value of the ultrasonic wave in the current gas medium to be measured based on the time difference and propagation distance.

[0029] Meanwhile, based on the fixed frequency parameters of the ultrasonic waves emitted this time, the waveform loss amplitude of the first and second transmitted signals were compared, and the sound attenuation coefficients corresponding to the two sets of transmitted signals were calculated in combination with the gas propagation distance. Finally, two core acoustic parameters that can characterize the physical properties of the gas were obtained: real-time sound velocity value and real-time sound attenuation coefficient.

[0030] Step S103: After calculating the thermodynamic temperature and water vapor mole fraction of the gas to be tested using the sound velocity and sound attenuation coefficient, obtain the temperature and humidity measurements of the gas to be tested using the thermodynamic temperature and water vapor mole fraction.

[0031] The controller can retrieve a pre-stored gas acoustic-physical property coupling calculation model, substitute the obtained sound velocity and sound attenuation coefficient into the coupling model, and solve for two core physical property parameters of the gas under test in the pipeline: thermodynamic temperature and water vapor mole fraction. After parameter conversion, the thermodynamic temperature is converted into a normal operating condition temperature measurement value, and then combined with the water vapor mole fraction to obtain the gas relative humidity. Finally, it accurately outputs the real-time temperature and humidity measurement values ​​of the gas under test, completing high-precision non-contact temperature and humidity detection of corrosive, radioactive, and highly toxic industrial gases in pipelines.

[0032] In the aforementioned gas temperature and humidity measuring device, the correspondence between the ultrasonic transmitting transducer, the first receiving transducer, the second receiving transducer, the gas to be measured, and the pipeline is as follows: Figure 2 As shown, the ultrasonic transmitting transducer and two receiving transducers are externally clamped and fixed to the outer wall of the pipeline or container that transports or stores toxic or corrosive gases, thus completely physically isolating the piezoelectric elements of the transducers from the gas being measured. The entire installation and fixing process does not require drilling through holes in the pipeline or container, installing insertion rods, or exposing any wires to the gas being measured, fundamentally ensuring the airtight integrity of the gas system.

[0033] Optionally, step S102, which calculates the sound velocity of the ultrasonic signal in the gas to be tested based on the acquisition time difference between the first and second transmitted signals, includes the following steps: Step S201: Calculate the transducer spacing between the first receiving transducer and the second receiving transducer based on the propagation direction of the ultrasonic signal.

[0034] This step provides an accurate distance reference for sound velocity calculation, and its core is to calibrate the effective sound path difference based on the layout characteristics of the external clamp installation. The ultrasonic transmitting transducer and two receiving transducers adopt a coaxial through-type external clamp layout, wherein the first receiving transducer and the second receiving transducer are fixed sequentially to the outer wall of the same side of the pipe along the straight propagation axis of the ultrasonic wave, and the line connecting their centers is completely coincident with the direction of ultrasonic wave propagation.

[0035] After installation, a laser rangefinder was used to perform high-precision calibration of the physical distance between the centers of the two receiving transducers. The propagation path of the ultrasonic waves in the solid medium was then compensated and corrected based on the pipe wall thickness and the thickness of the acoustic window, ultimately yielding the effective transducer spacing only for the gas propagation segment. The spacing is a fixed constant, and since the two receiving transducers share the same side of the pipe wall and the sound transmission window path, the propagation error of the solid medium can be completely offset in subsequent calculations.

[0036] Step S202: Obtain the acquisition time difference between the first transmission signal and the second transmission signal based on the calculation result of the difference between the second acquisition time of the second transmission signal and the first acquisition time of the first transmission signal.

[0037] This step eliminates the inherent system delay through high-precision timing matching, obtaining a pure gas propagation time difference. Simultaneously with triggering ultrasonic wave transmission, the controller activates a dual-channel synchronous acquisition circuit to synchronously acquire the output signals of the first and second receiving transducers at the same sampling rate.

[0038] After acquisition, a cross-correlation algorithm can be used to analyze the digitized first transmission signal. With the second transmitted signal Perform matching calculations: By solving for the peak positions of the cross-correlation functions of the two signals, we obtain... Compared to The time-domain offset, which is the difference in acquisition time between the two transmitted signals. Since the two receiving transducers share the same transmitter source, the same pipe wall propagation path, and the same clock reference for the acquisition circuit, system errors such as transmission trigger delay, pipe wall propagation time, and inherent circuit delay are completely consistent in the two signals. Therefore, the acquisition time difference only reflects the propagation time difference of the ultrasonic wave in the gas segment between the two transducers, thus eliminating the influence of system delay calibration error in the traditional single-transmitter scheme in principle.

[0039] Step S203: Calculate the propagation time of the ultrasonic signal from the first receiving transducer to the second receiving transducer by collecting the time difference.

[0040] This step completes the mapping from time difference to effective propagation time, providing interference-free time parameters for sound speed calculation: The first receiving transducer is closer to the transmitting transducer, while the second receiving transducer is farther away. After the ultrasonic signal passes through the gas being tested, it will first reach the first receiving transducer and then continue propagating to the second receiving transducer. Combining this with the conclusion of step S202, the propagation delay of all non-gas segments of the two signals is exactly the same; therefore, the acquisition time difference is... The time is exactly equal to the actual time it takes for the ultrasonic wave to propagate in the gas medium between the two receiving transducers, eliminating the need for additional system delay compensation. This time parameter reflects only the acoustic propagation characteristics of the gas under test, completely avoiding the sound velocity calculation deviation caused by inaccurate system delay calibration in traditional methods.

[0041] Step S204: Calculate the speed of sound of the ultrasonic signal in the gas to be tested based on the ratio of transducer spacing to propagation time.

[0042] This step obtains a high-precision ultrasonic velocity value in the gas being tested by using the ratio of distance to time. Specifically, the effective transducer spacing obtained in step S201... Divide by the gas propagation time obtained in step S203 The speed of sound propagating in the gas being tested can then be calculated. The calculation formula is: = / The calculation process is based entirely on the differential results of the two received signals. It does not require additional calibration of system delay parameters and is not affected by factors such as fluctuations in transmit power, differences in transducer conversion efficiency, or changes in pipe wall attenuation. Compared with the traditional single-transmitter sound velocity measurement scheme, the measurement accuracy can be improved by an order of magnitude, providing reliable acoustic basis data for the subsequent calculation of temperature and humidity parameters.

[0043] Optionally, step S202, which calculates the acquisition time difference between the first and second transmission signals based on the difference between the second acquisition time of the second transmission signal and the first acquisition time of the first transmission signal, includes the following steps: Step S301: Obtain the second acquisition time of the second transmission signal and the first acquisition time of the first transmission signal.

[0044] This step provides an initial time-domain reference for cross-correlation calculations, ensuring the consistency of the timing reference through a synchronous acquisition mechanism. The controller, driven by a dual-channel synchronous acquisition circuit with the same source clock, acquires the output signals of the first and second receiving transducers in parallel at a sampling rate of no less than 10 times the ultrasonic center frequency. After preprocessing the acquired raw signals through programmable amplification and bandpass filtering, the effective signal start time of the two transmitted signals is initially located using a threshold detection method. Specifically, the moment when the signal amplitude first exceeds three times the preset noise threshold is marked as the first acquisition moment of the first transmitted signal. The second acquisition time of the second transmitted signal This serves as the initial time-domain anchor point for subsequent cross-correlation scans. During this process, the acquisition clocks of the two channels are completely from the same source, eliminating the inherent offset of the acquisition timing at the hardware level and ensuring the consistency of the reference at the two moments.

[0045] Step S302: Determine the signal acquisition advance of the second transmitted signal and the first transmitted signal based on the calculation result of the difference between the second acquisition time and the first acquisition time.

[0046] This step defines the scanning range for cross-correlation calculations, reducing unnecessary computations and improving matching efficiency. Since the second receiving transducer is located downstream of the first receiving transducer along the ultrasonic wave propagation direction, the ultrasonic wave must first pass through the gas path corresponding to the first receiving transducer before propagating to the second receiving transducer. Therefore, the second acquisition time... It must be later than the first collection time. ; Calculate the difference between the two initial acquisition times. Based on this, the signal acquisition lead time for cross-correlation scanning is defined. The range of values ​​for: ,in This lead is the preset scan margin. Candidate values ​​representing the time-domain offset of the second transmitted signal relative to the first transmitted signal will be used to search for the true time-domain offset within this range through cross-correlation matching.

[0047] Step S303: Determine the first sampling point of the first transmitted signal based on the first acquisition time, and determine the second sampling point of the second transmitted signal based on the second acquisition time and the signal acquisition advance.

[0048] This step aligns and truncates the two transmitted signals in the time domain, ensuring the effectiveness of the cross-correlation calculation. Specifically, taking the first acquisition time... Starting from the first point, extract an effective signal segment of length N from the first transmitted signal, which is then used as the first sampling point sequence. (n=0,1,...,N-1); for each candidate signal acquisition advance... Convert it to the corresponding sampling point offset k=round(τ×fs) (fs is the sampling rate, round is the rounding operation), with the second acquisition time as the reference. Starting from the first point, extract an effective signal segment of length N from the second transmitted signal, which is then used as the second sampling point sequence. .

[0049] During the truncation process, the length N of the effective signal segment covers 3 to 5 complete ultrasonic pulse cycles, ensuring that sufficient signal features are included while avoiding the introduction of excessive background noise. At the same time, the lengths of the two sampling point sequences are completely consistent, eliminating the interference of signal truncation on cross-correlation calculations from the data level.

[0050] Step S304: Calculate the cross-correlation value between the first transmission signal and the second transmission signal using the first sampling point and the second sampling point.

[0051] This step quantifies the temporal similarity of two signals through cross-correlation operations, achieving high-precision matching under noise suppression. For each candidate advance... The corresponding first sampling point sequence With the second sampling point sequence Calculate the discrete cross-correlation value The calculation formula is: ; The physical meaning of cross-correlation value is the degree of similarity between two signals at that time-domain offset: when the offset... The closer the waveforms are to the true propagation time difference of the two signals, the higher the overlap between their waveforms and the higher the cross-correlation value. The larger the value, the better. This algorithm inherently possesses noise suppression capabilities, effectively filtering out the impact of random noise such as pipeline vibration and electromagnetic interference on signal waveforms. Compared to schemes that directly extract signal peaks to calculate time differences, its anti-interference capability and measurement accuracy are significantly improved.

[0052] Step S305: Obtain the signal acquisition advance when the cross-correlation value is at its maximum, and determine the acquisition time difference between the first transmitted signal and the second transmitted signal based on the signal acquisition advance.

[0053] This step obtains a high-precision acquisition time difference through peak positioning, completing the final calculation of the timing parameters. It then iterates through all candidate lead values ​​defined in step S302. Find the cross-correlation value The optimal lead time corresponding to the maximum value The optimal lead time This represents the actual acquisition time difference between the first and second transmitted signals. To further improve time resolution, subsampling processing using parabolic or sinusoidal interpolation is employed near the cross-correlation peak, raising the time measurement accuracy to the nanosecond level and overcoming the limitation of sampling rate on time resolution.

[0054] The final acquisition time difference only reflects the propagation time difference of ultrasound in the gas segment between the two receiving transducers. System errors such as transmission trigger delay, pipe wall propagation time, and inherent circuit delay are completely canceled out in the two signals, requiring no additional calibration. This provides a reliable timing basis for subsequent high-precision calculations of sound velocity and temperature and humidity.

[0055] Optionally, the acoustic attenuation coefficients corresponding to the first and second transmitted signals are calculated based on the frequency values ​​of the ultrasonic signals, including the following steps: Step S401: Based on the frequency value of the ultrasonic signal, calculate the transmission spectrum amplitude of the ultrasonic signal, the first received spectrum amplitude of the first transmitted signal, and the second received spectrum amplitude of the second transmitted signal.

[0056] This step extracts stable amplitude characteristics through frequency domain analysis, providing fundamental data for anti-interference calculations: The original ultrasonic transmission excitation signal output by the controller, the acquired first transmission signal, and the second transmission signal are preprocessed respectively: a Hanning window is applied to the time-domain signal to suppress spectral leakage, and then it is converted into a frequency-domain signal by Fast Fourier Transform (FFT); for the preset ultrasonic operating frequency (such as 200kHz and 500kHz dual frequency points), the amplitude of the transmission signal spectrum corresponding to the frequency point is extracted respectively. The first received spectrum amplitude of the first transmitted signal The second received spectrum amplitude of the second transmitted signal .

[0057] Compared to the peak amplitude in the time domain, the frequency domain-extracted spectral amplitude can effectively filter out the influence of random noise such as pipeline vibration and electromagnetic interference, significantly improving amplitude stability and providing a reliable basis for the accurate calculation of the subsequent sound attenuation coefficient.

[0058] Step S402: Obtain the first gas acoustic path and the second gas acoustic path between the ultrasonic transmitting transducer and the first receiving transducer and the second receiving transducer respectively, and obtain the frequency attenuation coefficient of the transmission pipe in the empty pipe state based on the frequency value.

[0059] This step calibrates the system's inherent attenuation and sets the sound path parameters, eliminating attenuation interference from non-gaseous media. The first gas sound path from the ultrasonic transmitting transducer to the first receiving transducer is pre-calibrated. The second gas acoustic path to the second receiving transducer During calibration, the solid propagation path corresponding to the pipe wall thickness and acoustic window thickness is deducted, and only the actual propagation distance of the ultrasonic wave in the gas under test is retained. At the same time, after the equipment is installed and before the formal measurement, the pipe in an empty pipe state is calibrated and tested to determine the frequency attenuation coefficient jointly generated by the pipe wall, acoustic window, and coupling agent at this working frequency. This coefficient characterizes the inherent attenuation of ultrasound by the solid medium and is independent of the gas being measured. It is used to eliminate the attenuation contribution of the solid medium in subsequent calculations.

[0060] Step S403: Calculate the first acoustic attenuation coefficient corresponding to the first transmitted signal at the frequency value using the frequency value, the amplitude of the transmitted spectrum, the amplitude of the first received spectrum, the first gas sound path, and the frequency attenuation coefficient.

[0061] This step calculates the pure acoustic attenuation coefficient of the gas under test in the first receiving path to eliminate systematic errors: Substituting the above parameters into the sound attenuation calculation formula, we obtain the operating frequency. (e.g., at 200kHz) the first acoustic attenuation coefficient corresponding to the first receiving path The calculation formula is: ; This calculation process offsets the effects of transmission power fluctuations and solid-state dielectric attenuation, ultimately yielding... It only reflects the acoustic attenuation characteristics of the gas under test at this frequency, including the classical viscous attenuation, thermal conduction attenuation and molecular relaxation attenuation related to water vapor, providing characteristic parameters for subsequent humidity calculation.

[0062] Step S404: Calculate the second acoustic attenuation coefficient corresponding to the second transmitted signal at the frequency value using the frequency value, the amplitude of the transmitted spectrum, the amplitude of the second received spectrum, the second gas sound path, and the frequency attenuation coefficient.

[0063] This step calculates the pure acoustic attenuation coefficient of the gas under test in the second receiving path, forming the multipath attenuation characteristics: Using the same calculation logic as in step S403, the corresponding parameters of the second receiving path are substituted to obtain the operating frequency. (e.g., at 500kHz) the second acoustic attenuation coefficient corresponding to the second receiving path The calculation formula is: ; Since the two receiving transducers share the same emission source, the same pipe wall, and the same sound transmission window path, the systematic errors of the two sound attenuation coefficients are completely from the same source. Random interference can be further reduced through differential or simultaneous calculations. The combination of the sound attenuation coefficients of the dual paths and the dual-frequency measurement can provide multi-dimensional acoustic characteristics, which can significantly improve the robustness and accuracy of subsequent calculations of water vapor mole fraction and temperature.

[0064] Optionally, the thermodynamic temperature and water vapor mole fraction of the gas to be measured can be calculated using the sound velocity and sound attenuation coefficient, including the following steps: Step S501: Construct acoustic characteristic data of the gas to be tested using the sound velocity value, the first sound attenuation coefficient, and the second sound attenuation coefficient.

[0065] The sound velocity value of the ultrasound in the gas to be tested calculated in step S102. And the first acoustic attenuation coefficient at the corresponding operating frequency obtained in steps S403 and S404. Second sound attenuation coefficient These are combined to form the acoustic characteristic data of the gas being tested. Among them, the sound velocity value... It mainly reflects the average thermodynamic properties of the gas and is directly related to the gas temperature and average molar mass; two sound attenuation coefficients and This covers the attenuation characteristics of gases at different frequencies, especially the frequency-dependent attenuation characteristics brought about by the relaxation process of water vapor molecules. Together, they constitute a complete acoustic feature vector reflecting the temperature and humidity characteristics of the gas under test.

[0066] Step S502: Construct physical characteristic data of the gas to be tested based on the pressure value, molar mass and specific heat ratio of the gas in the transmission pipeline.

[0067] The absolute pressure value of the gas to be measured is collected by a pressure sensor connected to the pipeline. Combined with the inherent thermodynamic parameters of the background carrier gas (such as dry air, chlorine, flue gas, etc.) in the gas to be tested: carrier gas molar mass The ratio of the specific heat of a carrier gas at constant pressure to its specific heat at constant volume (specific heat ratio). Together, they construct the physical characteristic data of the gas to be measured. This set of parameters provides the basic physical constraints for temperature and humidity calculation, and can correct the mapping relationship between acoustic characteristics and temperature and humidity under different carrier gas compositions and different operating pressures, avoiding system measurement deviations caused by carrier gas differences.

[0068] Step S503: Obtain the relaxation frequency positions of the first and second sound attenuation coefficients in the acoustic feature data.

[0069] Based on the first sound attenuation coefficient under dual frequency points Second sound attenuation coefficient By combining a gas molecule relaxation attenuation model, the relaxation frequency positions corresponding to the vibrational relaxation process of water vapor molecules in the gas under test are obtained through fitting. The relaxation frequency is the frequency corresponding to the peak value of the gas acoustic attenuation curve, and its value has a strict physical correspondence with the thermodynamic temperature and water vapor mole fraction of the gas under test: the increase in temperature and the change in water vapor concentration will directly change the rate of molecular relaxation, thus causing the relaxation frequency to shift regularly. It is a key intermediate quantity connecting acoustic measurement characteristics and temperature and humidity parameters.

[0070] Step S504: Calculate the temperature and humidity correlation parameters of the gas under test at the relaxation frequency position using physical characteristic data, and calculate the thermodynamic temperature value and water vapor mole fraction value of the gas under test using the temperature and humidity correlation parameters.

[0071] Substitute the physical characteristic data from step S502 into the gas molecule relaxation dynamics model to calculate the temperature and humidity related parameters (including molecular relaxation time, vibrational heat capacity ratio, average specific heat ratio of the mixed gas, etc.) corresponding to the current relaxation frequency position; then, combine this with the thermodynamic propagation formula for the speed of sound to simultaneously construct a thermodynamic temperature... Mole fraction of water vapor The nonlinear equations are solved. Alternatively, acoustic feature data, physical feature data, and relaxation frequency features can be input into a pre-trained deep learning model with a fusion attention mechanism. Through end-to-end inference, it can directly output high-precision thermodynamic temperature values ​​and water vapor mole fraction values ​​without relying on complex physical formula derivations. It can still maintain stable solution accuracy in industrial scenarios with complex composition and strong interference.

[0072] The process of obtaining thermodynamic temperature and water vapor mole fraction values ​​using deep learning models is as follows: Figure 3 As shown. Optionally, step S504, which calculates the temperature and humidity correlation parameters of the gas under test at the relaxation frequency position using physical characteristic data, and calculates the thermodynamic temperature value and water vapor mole fraction value of the gas under test using the temperature and humidity correlation parameters, includes the following steps: Step S601: After performing dilated convolution calculation on the acoustic feature data using multiple preset dilation rates, the convolution map corresponding to each dilation rate is obtained. The convolution map is then connected with the acoustic feature data via global residual connection to obtain the fused feature data of the gas to be tested.

[0073] First, the input acoustic feature data: sound speed First sound attenuation coefficient Second sound attenuation coefficient Z-score standardization is performed to eliminate differences in feature dimensions; specifically, acoustic feature data... The result after Z-score standardization is: ,in, and Here are the mean and standard deviation of the acoustic feature data. After standardization preprocessing, the standardized 3D acoustic features are upscaled to 128-dimensional acoustic feature vectors using a linear layer.

[0074] The vector is input into four parallel dilated convolution branches with dilation rates of d=1, d=2, d=4, and d=8, respectively. Each branch outputs convolutional feature maps h1, h2, h4, and h8 corresponding to the receptive field. The purpose of this design is to fully exploit the potential physical relationships between components in the acoustic features. The acoustic feature vector z, after domain-specific normalization and learnable dimensionality upscaling, is used as input. The parallel dilated convolution has four branches with dilation rates of 1, 2, 4, and 8. Each branch contains four depthwise separable convolutions with a kernel size of 3 and GELU activation. To avoid gradient vanishing, residual connections are used in each branch. This multi-scale design is sufficient to capture the relationships between input features across different receptive fields, taking into account both local and global features. The output of a single dilated convolution branch is: ;in This represents a depthwise separable convolution operation with an expansion rate of d, where z is the input acoustic feature of the branch, and residual connections ensure the complete transmission of the original feature information.

[0075] Four sets of convolutional feature maps are concatenated along their feature dimensions to obtain a 512-dimensional concatenated feature. This concatenated feature is then compressed back to 128 dimensions using a 1×1 convolution. Finally, the compressed feature is residually added to the original 128-dimensional acoustic feature vector to obtain the 128-dimensional multi-scale fused feature data of the gas under test. .

[0076] Specifically, ;in This represents a one-dimensional convolution operation with a kernel size of 1, used to compress the concatenated high-dimensional features to the same 128 dimensions as the input, ensuring dimension matching of the residual connections.

[0077] Step S602: Use physical feature data to obtain the temperature and humidity correlation parameters corresponding to the fused feature data at the relaxation frequency position, and use the temperature and humidity correlation parameters to determine the first projection weight matrix of the acoustic feature data and the second projection weight matrix of the physical feature data respectively.

[0078] For the input physical characteristic data (gas pressure) Carrier gas molar mass Carrier gas specific heat Z-score standardization is performed on the physical feature data; specifically, the physical feature data... The result after Z-score standardization is: ,in, and Here are the mean and standard deviation of the acoustic feature data. After standardization preprocessing, the standardized 3D acoustic features are upscaled to 128-dimensional acoustic feature vectors using a linear layer.

[0079] By combining the physical characteristics of the relaxation frequency position, the temperature and humidity correlation parameters under the current operating conditions are calculated. Using these correlation parameters as physical priors, the first projection weight matrix corresponding to the 128-dimensional acoustic features and the second projection weight matrix corresponding to the 3-dimensional standardized physical features are learned respectively, providing a projection benchmark under physical constraints for subsequent attention calculation.

[0080] Step S603: Obtain the query matrix and key matrix of the gas to be tested based on the first projection weight matrix and the second projection weight matrix respectively, and obtain the value matrix of the gas to be tested based on the first projection weight matrix. Then, calculate the multi-head attention calculation results corresponding to the query matrix, key matrix and value matrix through the softmax activation function.

[0081] The 128-dimensional fused features are projected through the first projection weight matrix to obtain the attention value matrix V; the fused features and the normalized physical features are projected through the first projection weight matrix and the second projection weight matrix respectively and then concatenated to generate the attention query matrix Q and the key matrix K; Q, K, and V are input into the 8-head multi-head attention module, and the attention weights between features are calculated through the softmax activation function. The value matrix is ​​then weighted and summed to finally obtain the multi-head attention calculation result.

[0082] In the multi-head attention computation process, the acoustic features obtained by multi-scale fusion of the feature extraction layer are... The input is fed into a module consisting of six stacked Transformer encoder layers. Each encoder layer has eight attention heads, and the fully connected layers in the middle have a dimension of 512. To address the limitation of standard self-attention mechanisms relying solely on input acoustic features, a physics-guided multi-head self-attention mechanism is proposed to allow the model to incorporate prior physics knowledge and adaptively focus on acoustic features that contribute more to temperature and humidity measurements. In standard self-attention, the query (Q), key (K), and value (V) matrices are all generated from the input acoustic features through linear transformations. However, in our designed mechanism, the physics parameter vectors, after domain-normalization, are... This is integrated into the query and key generation process to globally guide the attention weights of acoustic features based on physical parameters: ; ; ; in The projection weight matrix of the acoustic features. This represents the dimension of single-head attention. is the projection weight matrix of the physical parameters, where 3 corresponds to the dimensions of the physical parameters, namely pressure, carrier gas molar mass, and carrier gas specific heat ratio. This represents the domain-standardized physical parameter vector. The purpose of this design is to dynamically adjust the distribution of attention weights on the physical parameters. When the carrier gas molar mass is large, the model automatically increases the attention weight to the high-frequency sound attenuation coefficient. When pressure fluctuations are large, the model increases its attention to sound velocity characteristics, thereby improving the model's anti-interference capability. The calculation method for attention weights is the same as that for standard self-attention. This is a scaling factor to prevent gradient vanishing. ; Multi-head self-attention mechanisms can automatically learn the global dependencies between components in the input vector. The network can automatically discover the strong correlation between the relaxation frequency position of the sound attenuation coefficient and humidity, without requiring manual design of this feature. Multi-head attention maps the input features to multiple different subspaces, calculates the attention for each subspace, and then concatenates the outputs. ; in, , This is for outputting the projection matrix.

[0083] Step S604: Obtain the global context feature data of the gas to be tested based on the multi-head attention calculation results and the normalized connection results of the fused feature data, and input the global context feature data and physical feature data into the trained physical constraint model.

[0084] This step corresponds to the input stage of the single-layer Transformer encoder and the 6-layer Transformer encoder in the attached diagram. Specifically, it is implemented as follows: the multi-head attention calculation result and the 128-dimensional fused feature data are subjected to residual addition, and then processed by layer normalization; after passing through the feedforward network (dimensional transformation 128-512-128), residual addition, and layer normalization, 128-dimensional global context feature data containing global context association is obtained; the global context feature data and the standardized 3-dimensional physical feature data are jointly input into the pre-trained 6-layer Transformer structure physical constraint model.

[0085] Specifically, to map the concatenated features back to 128 dimensions, each Transformer encoder layer contains a multi-head self-attention sublayer and a feedforward neural network sublayer, with residual connections and layer normalization added after each sublayer: ; ; The feedforward neural network employs a two-layer fully connected structure with a middle dimension of 512 and uses GELU as the activation function. After passing through a six-layer Transformer encoder, it yields globally contextual features guided by physical priors. .

[0086] Step S605: After connecting the global context feature data and the physical feature data, the physical constraint data of the gas to be tested is obtained. The physical fusion feature data of the physical constraint data is calculated using the physical prior weight value and physical prior bias value in the physical constraint model.

[0087] The 128-dimensional global features output by the 6-layer Transformer encoder are concatenated with the 3-dimensional standardized physical features along the dimensions to obtain 131-dimensional physical constraint data. By embedding thermodynamic prior physical prior weights and biases in the physical constraint model, affine transformation and feature fusion are performed on the physical constraint data. The data is first mapped to 256 dimensions through a fully connected layer to obtain 256-dimensional physical fusion feature data of the gas to be tested.

[0088] Physical fusion feature data ;in , This represents the weights and biases of the physical prior layer, and 131 is the dimension of the concatenated 128-dimensional global features and 3-dimensional physical parameters.

[0089] Step S606: Calculate the thermodynamic temperature value and water vapor mole fraction value corresponding to the physical fusion feature data using the fully connected weight value and the output weight value in the physical constraint model.

[0090] The 256-dimensional physical fusion feature data is input into the subsequent fully connected layer, where it is mapped to 128 dimensions through the fully connected weights and then subjected to a nonlinear transformation using the GELU activation function. Finally, the 128-dimensional features are mapped to a 2-dimensional output vector through the output weights, yielding the predicted thermodynamic temperature of the gas under test. and predicted values ​​of water vapor mole fraction .

[0091] Specifically, ;in This is a predicted value for the gas thermodynamic temperature. This is the predicted value for the mole fraction of water vapor. , The weights and biases of the intermediate fully connected layers. , These are the weights and biases for the output layer.

[0092] Optionally, during the training process, the physical constraint model uses classical thermodynamic constraints as physical regularization terms to construct the loss function, so that the model can maintain thermodynamic consistency even under data scarcity conditions, fundamentally solving the problem that pure data-driven models may produce prediction results that do not conform to physical laws.

[0093] The loss function is: ; in, The loss function; The data fitting loss of the physical constraint model aims to measure the deviation between the model's predicted values ​​and the actual values. Different weighting coefficients are set according to the accuracy requirements of temperature and humidity measurements. For physical feature loss; This is the time-series smoothing loss; This is the first weight value for the physical feature loss; This is the second weight value for the temporal smoothing loss; ; ; ; This represents the number of training samples for the physical constraint model. and These are the true values ​​of temperature and water vapor mole fraction corresponding to the i-th training sample, respectively; The third weighting coefficient corresponds to the data fitting loss. and These are the predicted values ​​of temperature and water vapor mole fraction for the i-th training sample, respectively. Let be the actual measured speed of sound value corresponding to the i-th training sample; The equivalent specific heat ratio of the mixed gas corresponding to the i-th training sample is obtained by weighting the specific heat ratios of the carrier gas and water vapor. This is the universal gas constant; Let be the equivalent molar mass of the mixed gas corresponding to the i-th training sample; ; The original input specific heat ratio of the i-th training sample is the true specific heat ratio of the carrier gas. Let be the specific heat capacity of the carrier gas at constant volume corresponding to the i-th training sample; The specific heat ratio of water vapor; The specific heat capacity of water vapor at constant volume; ; The original input molar mass of the carrier gas corresponding to the i-th training sample; This represents the molar mass of water vapor.

[0094] During the training process of the physical constraint model, the construction of its dataset includes: 1. Data Acquisition: With the carrier gas type and pressure fixed, the target temperature and water vapor mole fraction are adjusted using a temperature and humidity generator and stabilized for 30 minutes to ensure uniform operating conditions. A dual-frequency ultrasonic pulse is emitted by the transmitting transducer, and signals are collected by two receiving transducers. The carrier gas type, pressure, temperature, and humidity are changed sequentially to cover all preset operating conditions, superimposed with vibrations and electromagnetic interference of varying intensities. At least 50 sets of waveform data are collected for each operating condition, with a sampling rate of 10MHz and 256 sampling points per set. Acoustic characteristics, physical parameters, and actual temperature values ​​are recorded. and water vapor mole fraction ; 2. Data preprocessing: Outliers and waveform data with low signal-to-noise ratios are removed using the 3σ criterion. The ultrasonic receiving time difference is calculated using a cross-correlation algorithm to obtain the ultrasonic velocity c. The features are divided into acoustic features and physical parameters using domain standardization, and Z-score standardization is performed on each. The mean and standard deviation of the standardized data are saved for use in the inference stage.

[0095] 3. Data augmentation: Gaussian white noise is added to the acoustic features, the sound attenuation coefficient is randomly scaled, and the sampling points of continuously acquired samples are shifted.

[0096] 4. Dataset partitioning: The dataset is randomly divided into training, validation, and test sets in a ratio of 7:2:1 to ensure that samples with the same carrier gas and pressure range are evenly distributed across the three sets, and that the temperature and humidity ranges of the three sets are completely consistent.

[0097] Optionally, the temperature and humidity values ​​of the gas to be measured can be obtained using thermodynamic temperature and water vapor mole fraction values, including the following steps: Step S701: Obtain the temperature measurement value of the gas to be tested through thermodynamic temperature value.

[0098] The thermodynamic temperature value T (unit: Kelvin K) obtained in step S504 is converted into a Celsius temperature value t commonly used in industrial scenarios using the internationally recognized thermodynamic temperature to Celsius temperature conversion formula, and used as the temperature measurement value of the gas to be measured.

[0099] Step S702: Obtain the humidity measurement value of the gas under test at the thermodynamic temperature based on the water vapor mole fraction value. The humidity measurement value is calculated using the following formula: ; in, This is a humidity measurement value. This represents the mole fraction of water vapor. The molar mass of water vapor. The pressure value of the gas to be measured in the transmission pipeline. This is the universal gas constant. This is the thermodynamic temperature value.

[0100] For a detailed implementation process of the above embodiments, please refer to Figure 4 The flowchart in the document will not be repeated here.

[0101] The gas temperature and humidity measurement and control method in this embodiment can find the potential correlation between sound velocity, sound attenuation coefficient, and temperature and humidity from a large amount of measured data, directly ignoring the interference effects of different operating conditions. Based on multi-feature fusion, it automatically adjusts the weight parameters to ensure the stability and accuracy of the measurement. The deep learning model itself has strong nonlinear fitting capabilities and can accurately describe the complex nonlinear relationship between sound velocity, sound attenuation, and temperature, humidity, and pressure, meeting the needs of real-time fluctuations under complex operating conditions. At the same time, physical constraints are introduced to ensure that the measurement results are always based on physical laws, avoiding possible predictions that do not conform to physical laws. The relevant model in this embodiment only needs to be trained on data driven by typical operating conditions to adapt to various operating condition changes, avoiding multiple calibrations and increased maintenance costs.

[0102] As can be seen from the gas temperature and humidity measurement and control method mentioned in the above embodiments, this method uses ultrasonic signals to accurately calculate the sound velocity and sound attenuation coefficient of the gas to be measured in the transmission pipeline, and then uses the obtained acoustic characteristics to accurately calculate the thermodynamic temperature and water vapor mole fraction of the gas to be measured, ultimately achieving high-precision temperature and humidity measurement of the gas to be measured. The ultrasonic transmitter and receiver used in this method are both located outside the transmission pipeline, realizing non-contact measurement of the gas to be measured. Furthermore, the measurement and calculation process fully considers the correlation between the acoustic and physical characteristics of the gas to be measured, significantly improving the accuracy of temperature and humidity measurement.

[0103] Corresponding to the gas temperature and humidity measurement and control method provided in the foregoing embodiments, this invention provides a gas temperature and humidity measurement and control system, applied to the controller of a gas temperature and humidity measuring device; the gas temperature and humidity measuring device further includes: an ultrasonic transmitting transducer, a first receiving transducer, and a second receiving transducer. Based on this, as... Figure 5 As shown, the system includes: Ultrasonic control module 510: After controlling the ultrasonic transmitting transducer to transmit ultrasonic signals to the transmission pipeline of the gas to be tested, it controls the first receiving transducer and the second receiving transducer to receive the first transmission signal and the second transmission signal after the ultrasonic signal passes through the gas to be tested, respectively. Acoustic data calculation module 520: used to calculate the sound velocity value of the ultrasonic signal in the gas to be tested based on the acquisition time difference between the first transmitted signal and the second transmitted signal, and to calculate the sound attenuation coefficients corresponding to the first transmitted signal and the second transmitted signal based on the frequency value of the ultrasonic signal. Temperature and humidity measurement and calculation module 530: It is used to calculate the thermodynamic temperature value and water vapor mole fraction value of the gas to be measured using the sound velocity value and sound attenuation coefficient, and then obtain the temperature measurement value and humidity measurement value of the gas to be measured through the thermodynamic temperature value and water vapor mole fraction value.

[0104] As can be seen from the gas temperature and humidity measurement and control system mentioned in the above embodiments, this system uses ultrasonic signals to accurately calculate the sound velocity and sound attenuation coefficient of the gas to be measured in the transmission pipeline. Then, it uses the obtained acoustic characteristics to accurately calculate the thermodynamic temperature and water vapor mole fraction of the gas to be measured, ultimately achieving high-precision temperature and humidity measurement of the gas. The ultrasonic transmitter and receiver used in this system are both located outside the transmission pipeline, realizing non-contact measurement of the gas to be measured. Furthermore, the measurement and calculation process fully considers the correlation between the acoustic and physical characteristics of the gas to be measured, significantly improving the accuracy of temperature and humidity measurement.

[0105] The gas temperature and humidity measurement and control system provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned gas temperature and humidity measurement and control method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned gas temperature and humidity measurement and control method embodiment.

[0106] This embodiment also provides a gas temperature and humidity measuring device, such as... Figure 6 As shown, the gas temperature and humidity measuring device includes: an ultrasonic transmitting transducer 610, a first receiving transducer 620 and a second receiving transducer 630, and a controller 640; the controller 640 is connected to the ultrasonic transmitting transducer 610, the first receiving transducer 620 and the second receiving transducer 630 respectively.

[0107] The controller 640 serves as the control center of the gas temperature and humidity measurement device, enabling the coordinated operation of various modules through control signals. The controller 640 uses ultrasonic signals to accurately calculate the sound velocity and attenuation coefficient of the gas to be measured within the transmission pipeline. Then, it uses the obtained acoustic characteristics to accurately calculate the thermodynamic temperature and water vapor mole fraction of the gas to be measured, ultimately achieving high-precision temperature and humidity measurement of the gas.

[0108] Specifically, controller 640, such as Figure 7 As shown, it includes a processor 101 and a memory 102; wherein, the memory 102 is used to store one or more computer instructions, which are executed by the processor to implement the steps of the above-described gas temperature and humidity measurement and control method.

[0109] Figure 7 The controller 640 shown also includes a bus 103 and a communication interface 104, with the processor 101, communication interface 104 and memory 102 connected via the bus 103.

[0110] The memory 102 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. The bus 103 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0111] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and to send encapsulated IPv4 packets or IPv4 packets to the user terminal through the network interface.

[0112] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. The processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 102. The processor 101 reads the information in memory 102 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0113] This invention also provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of the gas temperature and humidity measurement and control method described in the foregoing embodiments.

[0114] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, devices, and methods can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0115] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0116] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0117] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0118] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for measuring and controlling gas temperature and humidity, characterized in that, The method is applied to the controller of a gas temperature and humidity measuring device; The gas temperature and humidity measuring device further includes: an ultrasonic transmitting transducer, a first receiving transducer, and a second receiving transducer; the method includes: After controlling the ultrasonic transmitting transducer to emit an ultrasonic signal into the transmission pipe of the gas to be tested, the first receiving transducer and the second receiving transducer are controlled to receive the first transmission signal and the second transmission signal of the ultrasonic signal after passing through the gas to be tested, respectively. The sound velocity of the ultrasonic signal in the gas to be tested is calculated based on the acquisition time difference between the first transmitted signal and the second transmitted signal, and the sound attenuation coefficients corresponding to the first transmitted signal and the second transmitted signal are calculated based on the frequency value of the ultrasonic signal. After calculating the thermodynamic temperature and water vapor mole fraction of the gas to be tested using the sound velocity and the sound attenuation coefficient, the temperature and humidity measurements of the gas to be tested are obtained using the thermodynamic temperature and water vapor mole fraction.

2. The gas temperature and humidity measurement and control method according to claim 1, characterized in that, The step of calculating the sound velocity value of the ultrasonic signal in the gas to be tested based on the acquisition time difference between the first transmitted signal and the second transmitted signal includes: The transducer spacing between the first receiving transducer and the second receiving transducer is calculated based on the propagation direction of the ultrasonic signal. The acquisition time difference between the first transmission signal and the second transmission signal is obtained by calculating the difference between the second acquisition time of the second transmission signal and the first acquisition time of the first transmission signal. The propagation time of the ultrasonic signal from the first receiving transducer to the second receiving transducer is calculated using the acquisition time difference. The speed of sound of the ultrasonic signal in the gas under test is calculated based on the ratio of the transducer spacing to the propagation time.

3. The gas temperature and humidity measurement and control method according to claim 2, characterized in that, The step of obtaining the acquisition time difference between the first transmitted signal and the second transmitted signal based on the difference between the second acquisition time of the second transmitted signal and the first acquisition time of the first transmitted signal includes: Acquire the second acquisition time of the second transmitted signal and the first acquisition time of the first transmitted signal; The signal acquisition advance of the second transmitted signal and the first transmitted signal is determined based on the calculation result of the difference between the second acquisition time and the first acquisition time; The first sampling point of the first transmitted signal is determined based on the first acquisition time, and the second sampling point of the second transmitted signal is determined based on the second acquisition time and the signal acquisition advance. The cross-correlation value between the first transmitted signal and the second transmitted signal is calculated using the first sampling point and the second sampling point; Obtain the signal acquisition advance when the cross-correlation value is at its maximum value, and determine the acquisition time difference between the first transmitted signal and the second transmitted signal based on the signal acquisition advance.

4. The gas temperature and humidity measurement and control method according to claim 1, characterized in that, Based on the frequency value of the ultrasonic signal, calculate the acoustic attenuation coefficients corresponding to the first transmitted signal and the second transmitted signal, respectively, including: Based on the frequency value of the ultrasonic signal, the transmitted spectrum amplitude of the ultrasonic signal, the first received spectrum amplitude of the first transmitted signal, and the second received spectrum amplitude of the second transmitted signal are calculated respectively. The first gas acoustic path and the second gas acoustic path between the ultrasonic transmitting transducer and the first receiving transducer and the second receiving transducer are obtained respectively, and the frequency attenuation coefficient of the transmission pipe in the empty pipe state is obtained based on the frequency value. The first acoustic attenuation coefficient corresponding to the first transmitted signal at the specified frequency value is calculated using the frequency value, the transmitted spectrum amplitude, the first received spectrum amplitude, the first gas sound path, and the frequency attenuation coefficient. The second acoustic attenuation coefficient corresponding to the second transmitted signal at the specified frequency value is calculated using the frequency value, the transmitted spectrum amplitude, the second received spectrum amplitude, the second gas path length, and the frequency attenuation coefficient.

5. The gas temperature and humidity measurement and control method according to claim 4, characterized in that, The calculation of the thermodynamic temperature and water vapor mole fraction of the gas under test using the sound velocity value and the sound attenuation coefficient includes: The acoustic characteristic data of the gas under test are constructed using the sound velocity value, the first sound attenuation coefficient, and the second sound attenuation coefficient. The physical characteristic data of the gas to be tested are constructed based on the pressure value, molar mass, and specific heat ratio of the gas to be tested in the transmission pipeline; Obtain the relaxation frequency positions of the first sound attenuation coefficient and the second sound attenuation coefficient in the acoustic feature data; The temperature and humidity correlation parameters of the gas under test at the relaxation frequency position are calculated using the physical characteristic data, and the thermodynamic temperature and water vapor mole fraction of the gas under test are calculated using the temperature and humidity correlation parameters.

6. The gas temperature and humidity measurement and control method according to claim 5, characterized in that, The steps of calculating the temperature and humidity correlation parameters of the gas under test at the relaxation frequency position using the physical characteristic data, and calculating the thermodynamic temperature and water vapor mole fraction of the gas under test using the temperature and humidity correlation parameters, include: After performing dilated convolution calculations on the acoustic feature data using multiple preset dilation rates, convolution maps corresponding to each dilation rate are obtained. Then, the convolution maps are connected with the acoustic feature data using global residual concatenation to obtain the fused feature data of the gas to be tested. The temperature and humidity correlation parameters corresponding to the fused feature data at the relaxation frequency position are obtained using the physical feature data. The first projection weight matrix of the acoustic feature data and the second projection weight matrix of the physical feature data are determined by the temperature and humidity correlation parameters. The query matrix and key matrix of the gas to be tested are obtained based on the first projection weight matrix and the second projection weight matrix, respectively. After obtaining the value matrix of the gas to be tested based on the first projection weight matrix, the multi-head attention calculation results corresponding to the query matrix, the key matrix and the value matrix are calculated by the softmax activation function. The global context feature data of the gas to be tested is obtained based on the multi-head attention calculation result and the normalized connection result of the fused feature data, and the global context feature data and the physical feature data are input into the trained physical constraint model. The physical constraint data of the gas to be tested is obtained by concatenating the global context feature data with the physical feature data. The physical fusion feature data of the physical constraint data is calculated using the physical prior weight value and physical prior bias value in the physical constraint model. The thermodynamic temperature and water vapor mole fraction corresponding to the physical fusion feature data are calculated using the fully connected weight values ​​and output weight values ​​in the physical constraint model.

7. The gas temperature and humidity measurement and control method according to claim 6, characterized in that, The loss function used during the training of the physical constraint model is: ; in, The loss function is... The data fitting loss for the physical constraint model; For physical feature loss; This is the time-series smoothing loss; This is the first weight value for the physical feature loss; This is the second weight value of the temporal smoothing loss; ; ; ; The number of training samples for the physical constraint model; and These are the true values ​​of temperature and water vapor mole fraction corresponding to the i-th training sample, respectively; The third weighting coefficient is the one corresponding to the data fitting loss. and These are the predicted values ​​of temperature and water vapor mole fraction for the i-th training sample, respectively. Let be the actual measured speed of sound value corresponding to the i-th training sample; Let be the equivalent specific heat ratio of the mixed gas corresponding to the i-th training sample; This is the universal gas constant; Let be the equivalent molar mass of the mixed gas corresponding to the i-th training sample; ; The original input specific heat ratio of the i-th training sample is the true specific heat ratio of the carrier gas. Let be the specific heat capacity of the carrier gas at constant volume corresponding to the i-th training sample; The specific heat ratio of water vapor; The specific heat capacity of water vapor at constant volume; ; The original input molar mass of the carrier gas corresponding to the i-th training sample; This represents the molar mass of water vapor.

8. The gas temperature and humidity measurement and control method according to claim 1, characterized in that, The temperature and humidity values ​​of the gas to be tested are obtained by using the thermodynamic temperature value and the water vapor mole fraction value, including: The temperature measurement value of the gas to be tested is obtained by using the thermodynamic temperature value; The humidity measurement value of the gas to be tested at the thermodynamic temperature is obtained based on the water vapor mole fraction value; wherein, the humidity measurement value is calculated by the following formula: ; in, The humidity measurement value is... The mole fraction of water vapor is the numerical value. The molar mass of water vapor. The pressure value of the gas to be measured in the transmission pipeline. This is the universal gas constant. The thermodynamic temperature value is given.

9. A gas temperature and humidity measurement and control system, characterized in that, The system is used as a controller for gas temperature and humidity measuring equipment; The gas temperature and humidity measuring device further includes: an ultrasonic transmitting transducer, a first receiving transducer, and a second receiving transducer; the system includes: Ultrasonic control module: After controlling the ultrasonic transmitting transducer to transmit ultrasonic signals to the transmission pipeline of the gas to be tested, it controls the first receiving transducer and the second receiving transducer to receive the first transmission signal and the second transmission signal of the ultrasonic signal after passing through the gas to be tested, respectively. Acoustic data calculation module: used to calculate the sound velocity value of the ultrasonic signal in the gas to be tested based on the acquisition time difference between the first transmitted signal and the second transmitted signal, and to calculate the sound attenuation coefficients corresponding to the first transmitted signal and the second transmitted signal based on the frequency value of the ultrasonic signal; Temperature and humidity measurement and calculation module: used to calculate the thermodynamic temperature value and water vapor mole fraction value of the gas to be tested using the sound velocity value and the sound attenuation coefficient, and then obtain the temperature measurement value and humidity measurement value of the gas to be tested using the thermodynamic temperature value and the water vapor mole fraction value.

10. A gas temperature and humidity measuring device, characterized in that, The gas temperature and humidity measuring device includes: an ultrasonic transmitting transducer, a first receiving transducer, a second receiving transducer, and a controller; the controller is connected to the ultrasonic transmitting transducer, the first receiving transducer, and the second receiving transducer respectively. The controller includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, and the processor executing the computer-executable instructions to implement the gas temperature and humidity measurement and control method mentioned in any one of claims 1 to 8.