Feature vector automatic extraction method for ultrasonic binary gas sensor

By using an ultrasonic feature vector extraction system, the characteristic period amplitude threshold and time-of-flight compensation value are extracted in batches, which solves the problem of poor stability and consistency of ultrasonic gas sensors in the detection of different component gases, and achieves higher detection accuracy and efficiency.

CN119541676BActive Publication Date: 2026-07-14HENAN HANWEI ELECTRONICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HENAN HANWEI ELECTRONICS
Filing Date
2023-08-31
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing ultrasonic gas sensors are not suitable for adaptive threshold methods when detecting gases of different components, resulting in poor stability and consistency of detection results, and they also ignore the influence of factors such as environmental noise and sound wave reflection.

Method used

By building an ultrasonic feature vector extraction system, the characteristic period amplitude threshold and characteristic period flight time compensation value are extracted in batches to identify the ultrasonic characteristic period, reduce the influence of transducer performance differences and noise, and improve the accuracy of characteristic period identification.

Benefits of technology

This improves the detection stability and consistency of ultrasonic binary gas sensors, reduces the impact of environmental noise and transducer performance differences on detection, and enhances gas concentration identification accuracy and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119541676B_ABST
    Figure CN119541676B_ABST
Patent Text Reader

Abstract

The application provides a feature vector automatic extraction method for an ultrasonic binary gas sensor, and the steps are as follows: an ultrasonic feature vector extraction system is built, and sequentially connected ultrasonic binary gas sensors are connected to the ultrasonic feature vector extraction system; a gas with a known concentration is input into the ultrasonic feature vector extraction system to control the concentration of the gas in the ultrasonic binary gas sensor, and the feature cycle amplitude threshold value and the feature cycle flight time compensation value are extracted in batches; the ultrasonic flight time is calculated according to the extracted feature cycle amplitude threshold value, so that the target gas concentration is calculated. Through the extraction of the feature cycle amplitude threshold value and the feature cycle flight time compensation value of the ultrasonic feature vector, the transducer performance of each ultrasonic binary gas sensor can be matched, the effectiveness of the feature cycle in the detection gas concentration range is ensured, and the influence of the environmental noise and the noise in the ultrasonic binary gas sensor circuit is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of ultrasonic binary gas sensors, and more particularly to a method for automatic feature vector extraction of ultrasonic binary gas sensors. Background Technology

[0002] The applicant is Chengdu Qianjia Technology Co., Ltd., application number is 202210856618.2, and the patent title is "Threshold Value Adaptive Adjustment Method and Ultrasonic Measuring Device Adaptive Measuring Method," which relates to the field of ultrasonic technology. The threshold value adaptive adjustment method includes the following steps: after determining the gain of the signal amplifier, determining an initial optimal threshold value; determining whether long-term interference exists; if so, adaptively adjusting the initial optimal threshold value; otherwise, keeping the initial optimal threshold value unchanged; the long-term interference refers to a change in flow velocity within a continuous time interval T, and the step size of the increase in flow velocity is... Or the step size of the flow velocity decreases is Where N is a positive integer, N = 1 / 2 / 3..., Tc is the ultrasonic pulse period, L is the channel length, cf is the speed of ultrasonic wave propagation in the fluid, and φ is the channel angle. In the above invention, the threshold value is adaptively adjusted according to the situation, thereby improving the measurement accuracy of the ultrasonic metering device.

[0003] The invention with application number 2021103098849, filed by Chengdu Qianjia Technology Co., Ltd., discloses a method and system for measuring the time-of-flight of ultrasound in gases and liquids. It uses an ADC to sample the received signal, and determines the judgment value based on the signal envelope, the maximum signal value, or the envelope intersection point, to obtain a rough measurement time for the ultrasound to travel through the test medium. Further precision is achieved by calculating the ultrasound time of flight based on the location of significant waveform changes. Incorporating interference into the precise calculation of the flight time avoids interference errors during ultrasound flight, resulting in high measurement accuracy and a simple method. Furthermore, the calculated estimated flight time t is calibrated to obtain the absolute flight time T of the ultrasound traveling through the test medium. This not only overcomes the limitation of threshold methods requiring a fixed threshold but also considers the sampling interval and capture delay time, effectively improving measurement accuracy.

[0004] Existing patents primarily rely on ultrasonic detection of gases with fixed gas composition. However, the acoustic attenuation of ultrasound waves varies depending on the gas composition, making adaptive threshold methods unsuitable for detecting gases with changing concentrations. Furthermore, existing inventions neglect the actual position of the threshold on the ultrasonic waveform and the influence of environmental noise and sound wave reflection on the waveform. When the threshold is near the peak of the ultrasonic waveform under specific environmental conditions, the period or waveform identified based on the threshold is prone to shift, thus compromising the stability and consistency of the detection results. Summary of the Invention

[0005] To address the technical problem that existing technologies using fixed or relative thresholds to identify feature periods and calculate ultrasonic flight times cannot guarantee the stability and consistency of detection results, this invention proposes an automatic feature vector extraction method for ultrasonic binary gas sensors. By extracting feature vectors from ultrasonic binary gas sensors in batches and using these feature vectors to identify ultrasonic feature periods and calculate ultrasonic flight times, this method reduces the impact of acoustic attenuation variations caused by differences in ultrasonic transducer performance on detection stability, reduces the impact of abnormal signals or noise on detection stability, simplifies ultrasonic transducer matching, improves the accuracy of feature period identification in ultrasonic binary gas sensors, and increases production efficiency.

[0006] To achieve the above objectives, the technical solution of the present invention is implemented as follows: an automatic feature vector extraction method for an ultrasonic binary gas sensor, comprising the following steps:

[0007] Step 1: Build an ultrasonic feature vector extraction system and connect the sequentially connected ultrasonic binary gas sensors to the ultrasonic feature vector extraction system;

[0008] Step 2: Introduce a gas of known concentration into the ultrasonic feature vector extraction system to control the gas concentration inside the ultrasonic binary gas sensor, and extract the characteristic period amplitude threshold and characteristic period flight time compensation value in batches;

[0009] Step 3: Calculate the ultrasonic flight time based on the characteristic periodic amplitude threshold extracted in Step 2, and thus calculate the target gas concentration.

[0010] Preferably, the ultrasonic feature vector extraction system includes a gas source, a constant temperature chamber, and an exhaust gas collection and processing device. The constant temperature chamber is connected to the gas source and the exhaust gas collection and processing device respectively. The gas source is used to supply gas to the constant temperature chamber. The constant temperature chamber is used to adjust and maintain the temperature of the ultrasonic binary gas sensor and the internal gas temperature. The exhaust gas collection and processing device is used to detect the composition and temperature of the exhaust gas and collect and process the exhaust gas.

[0011] Preferably, the constant temperature chamber includes a flow controller, a buffer chamber, and a valve. One end of the flow controller is connected to an external gas source, and the other end of the flow controller is connected to the buffer chamber. The buffer chamber is connected to the valve through several sequentially connected ultrasonic binary gas sensors, and the valve is connected to an exhaust gas collection and treatment device. The flow controller is used to regulate and limit the flow rate through the ultrasonic binary gas sensors, the buffer chamber is used to stabilize the temperature, pressure, and flow rate of the gas flowing into the ultrasonic binary gas sensors, and the valve is used to prevent external gas from flowing back into the ultrasonic binary gas sensors.

[0012] Preferably, the second step is implemented as follows:

[0013] Step 1) Connect several ultrasonic binary gas sensors sequentially to a constant temperature chamber with a temperature set to T in the ultrasonic feature vector extraction system. Connect the ultrasonic binary gas sensors to the power supply and the host computer.

[0014] Step 2) A binary gas mixture with known concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 is introduced into a series-connected ultrasonic binary gas sensor to discharge the original gas inside the ultrasonic binary gas sensor; when the exhaust gas collection and treatment device detects that the concentration of the gas discharged from the ultrasonic binary gas sensor is consistent with the concentration C1 of the introduced binary gas, and the temperature is consistent with the set temperature T of the constant temperature chamber, the inlet and outlet of the series-connected ultrasonic binary gas sensor are closed.

[0015] Step 3) The host computer broadcasts the current gas concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 to the series-connected ultrasonic binary gas sensors in batches.

[0016] Step 4) The ultrasonic binary gas sensor excites the ultrasonic transducer at the transmitting end to emit ultrasonic waves for N1 cycles, and converts the ultrasonic waves into analog signals through the ultrasonic transducer at the receiving end. The analog signals are periodically sampled by the ADC of the ultrasonic binary gas sensor to obtain digital sampling information D1. The characteristic periodic amplitude threshold D of the ultrasonic binary gas sensor is calculated based on the digital sampling information D1. τ1 Find the peak value greater than the characteristic period amplitude threshold D in the digital sampling information D1. τ1 The first cycle is taken as the characteristic cycle of the ultrasonic binary gas sensor; the amplitude threshold D of the characteristic cycle is obtained based on the sampling data near the characteristic cycle. th1 ;

[0017] Step 5) A binary gas mixture with known concentration C2, adiabatic coefficient k2, gas constant R2, and molar mass M2 is introduced into a series-connected ultrasonic binary gas sensor to discharge the original gas inside the ultrasonic binary gas sensor; when the exhaust gas collection and treatment device detects that the gas discharged from the ultrasonic binary gas sensor has the same concentration C2 as the introduced binary gas, the inlet and outlet of the series-connected ultrasonic binary gas sensor are closed.

[0018] Step 6) Repeat steps 3) and 4) to obtain the identification feature periodic amplitude threshold D. th2 ;

[0019] Step 7) Calculate the characteristic periodic amplitude threshold D. th1 and D th2 The average value is used as the characteristic periodic amplitude threshold D for the ultrasonic binary gas sensor. th ;

[0020] Step 8) Given the distance L between the ultrasonic transmitter and receiver transducers of the ultrasonic binary gas sensor, the concentration C2 of the binary gas mixture, the adiabatic coefficient k2, the gas constant R2, the molar mass M2, and the temperature T; the ADC of the ultrasonic binary gas sensor periodically samples to obtain digital sampling information D2, and compares it with the characteristic period amplitude threshold D. th The characteristic period is identified, and the corresponding flight time compensation value is calculated.

[0021] Preferably, the concentration C1 is the minimum value of the concentration detection range of the ultrasonic binary gas sensor; the concentration C2 is the maximum value of the concentration detection range of the ultrasonic binary gas sensor; the digital sampling information D1 and digital sampling information D2 include noise signal data and complete sound wave signal data received from the sound wave pre-circuit, and the first m sets of sampling data are the first m sets of sampling data in the noise signal data received by the ultrasonic binary gas sensor from the sound wave pre-circuit, whose data sampling time is much shorter than the theoretical ultrasonic wave arrival time.

[0022] Preferably, the characteristic periodic amplitude threshold D of the ultrasonic binary gas sensor is calculated based on the digital sampling information D1. τ1 The method is as follows: the ultrasonic transducer receiving the ultrasonic signal is equivalent to a first-order system, and the vibration amplitude of the ultrasonic signal generated by the first excitation pulse at time constant τ is calculated as the characteristic period amplitude threshold of the ultrasonic binary gas sensor.

[0023]

[0024] Where N1 represents the period of the ultrasound, and D max1 D represents the maximum value in the digital sampled information D1. b1=3× Three times the noise standard deviation, D is the average of the first m groups of sampled data. 1i This represents the i-th set of sampled data.

[0025] Preferably, the step of obtaining the characteristic period amplitude threshold D based on the sampling data near the characteristic period is... th1 The method is as follows: The sampling indices and values ​​of the maximum value, the k sampling points before the maximum value, and the j sampling points after the maximum value in the characteristic period sampling data are used to fit a second-order function using the least squares method to obtain the second-order function D(p) for calculating the characteristic period peak value; the characteristic period peak value D is obtained according to the formula for calculating the maximum and minimum values ​​of the second-order function. pmax ;

[0026] Based on the sampling sequence number and sampling value of the previous period, a second-order function D'(p') can be fitted, and the peak value D' can be calculated. pmax ;

[0027] Calculate the characteristic periodic peak value D pmax and peak value D' pmax The average value is used as the threshold D for identifying the periodic amplitude of the characteristic. th1 .

[0028] Preferably, the speed of sound is calculated according to the sound speed calculation formula. Calculate the flight time compensation value according to the flight time compensation value formula. Where t is the flight time corresponding to the characteristic period.

[0029] Preferably, the method for implementing step three is as follows:

[0030] Step 1) The ultrasonic binary gas sensor excites the ultrasonic transducer at the transmitting end to emit ultrasonic waves for N cycles, and converts the ultrasonic waves into analog signals through the ultrasonic transducer at the receiving end. The analog signals are periodically sampled by the ADC of the ultrasonic binary gas sensor to obtain digital sampling information D.

[0031] Step 2) The ultrasonic binary gas sensor compares the digital sampling information D with the characteristic period amplitude threshold D. th And find the amplitude D greater than the characteristic periodic threshold. th In the first cycle, the time t corresponding to the first cycle is obtained from the ultrasonic transducer at the excitation end to the ultrasonic transducer at the receiving end through timing chip or algorithm; the ultrasonic flight time ToF and the speed of sound c are calculated according to the flight time compensation value formula.

[0032] Step 3) Given the specific heat capacity C of the target gas at constant pressure Pa Specific heat capacity at constant volume C Va and molar mass Ma Another type of gas mixture has a specific heat capacity at constant pressure C. Pb Specific heat capacity at constant volume C Vb And molar mass M b Given the gas constant R, and the formulas for calculating the adiabatic coefficient and sound velocity of a mixed gas, a quadratic equation in terms of concentration is derived. Solving the quadratic equation yields the target gas concentration C.

[0033] Preferably, the ultrasonic time of flight (ToF) and the speed of sound (c) are respectively:

[0034] ToF = t + t offset

[0035]

[0036] Where L is the distance between the ultrasonic transmitter and receiver of the ultrasonic binary gas sensor, and t offset This is the flight time compensation value;

[0037] The method for solving the quadratic equation in one variable and calculating the concentration C is as follows:

[0038] Construct a quadratic equation in one variable:

[0039]

[0040]

[0041] M diff =(M a -M b )

[0042] C Pdiff =(C Pa -C Pb )

[0043] C Vdiff =(C Va -C Vb )

[0044]

[0045] Where k is the specific heat ratio of the binary gas mixture, and M diff C represents the molar mass difference between the target gas and another gas mixture. Pdiff C represents the difference in specific heat capacity at constant pressure between the target gas and another gas mixture. Vdiff The difference in specific heat capacity at constant volume between the target gas and another mixed gas;

[0046] Solve the quadratic equation in terms of concentration to calculate the concentrations x1 and x2, and

[0047]

[0048]

[0049] X2 = M diff C Vdiff

[0050]

[0051]

[0052] Among them, X0, X1, and X2 are intermediate variables;

[0053] The specific heat capacity is obtained from the formula for calculating the average specific heat capacity ratio of the mixed gas. The average molar mass is obtained from the formula for calculating the average molar mass of a gas mixture.

[0054] Since the average molar mass of the binary gas mixture is between the molar masses Ma and Mb of the two gases, the target gas concentration C is obtained through screening.

[0055] Compared with existing technologies, the beneficial effects of this invention are as follows: The constructed ultrasonic feature vector extraction system is mainly used for batch extraction of ultrasonic feature vectors from ultrasonic binary gas sensors. It features low construction difficulty, batch processing capability, and high efficiency. By extracting the characteristic period amplitude threshold and the characteristic period time-of-flight compensation value of the ultrasonic feature vector, this invention can match the transducer performance of each ultrasonic binary gas sensor, ensuring the effectiveness of the characteristic period within the detection gas concentration range. Simultaneously, the ultrasonic feature vector extraction of this invention can effectively reduce the influence of environmental noise and noise in the ultrasonic binary gas sensor circuitry.

[0056] The characteristic period amplitude threshold D of the present invention th Located at the equivalent first-order system time constant τ, this amplitude is easily observable and exhibits significant amplitude variations before and after the cycle. This facilitates rapid identification and localization of the characteristic period during ADC sampling, thereby reducing the impact of amplitude variations caused by gas concentration on characteristic period identification. Simultaneously, the ultrasonic waves received by the transducer at the receiving end are affected by external gas conditions and reflections, resulting in fluctuations in the frequency of the received and converted analog signal. Therefore, the characteristic period located at the equivalent first-order system time constant τ is relatively close to the first observable wave, and the time-of-flight compensation value corresponding to the characteristic period is less affected by external factors, thus improving timing accuracy. Furthermore, after time-of-flight compensation, in gases of unknown concentration where the gas adiabatic coefficient and gas constant are uncertain, secondary concentration calculations gradually approximate the true values, thereby improving the accuracy of concentration calculations. Attached Figure Description

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

[0058] Figure 1 This is a flowchart of the present invention.

[0059] Figure 2 This is a schematic diagram of the ultrasonic feature vector extraction system of the present invention.

[0060] Figure 3 This is a schematic diagram of the ultrasonic feature vector and feature period of the present invention.

[0061] Figure 4 This is a flowchart illustrating the calculation of target gas concentration using ultrasonic feature vectors according to the present invention. Detailed Implementation

[0062] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0063] like Figure 1 As shown, an automatic feature vector extraction method for ultrasonic binary gas sensors is described. The method involves extracting and identifying ultrasonic feature vectors by controlling the concentration of the gas in the ultrasonic propagation medium, using an ADC to sample the received ultrasonic signal and calculate the ultrasonic feature vector, and improving the accuracy and efficiency of identifying specific ultrasonic cycles by recognizing the feature vector. This enhances the consistency and stability of ultrasonic binary gas sensors and other products based on ultrasonic detection technology. The invention includes: establishing an ultrasonic feature vector extraction system, an ultrasonic feature vector extraction process and method, and application methods for ultrasonic feature vectors.

[0064] Step 1: Build an ultrasonic feature vector extraction system and connect the sequentially connected ultrasonic binary gas sensors to the ultrasonic feature vector extraction system.

[0065] The simplified structure of the ultrasonic feature vector extraction system is shown below. Figure 1The system comprises a gas source, a constant temperature chamber, and an exhaust gas collection and treatment device. The constant temperature chamber is connected to both the gas source and the exhaust gas collection and treatment device. The gas source supplies gas to the constant temperature chamber, which regulates and maintains the temperature of the ultrasonic binary gas sensor and the internal gas temperature. The exhaust gas collection and treatment device detects the composition and temperature of the exhaust gas and collects and treats the exhaust gas. The constant temperature chamber includes a flow controller, a buffer chamber, and a valve. One end of the flow controller is connected to the external gas source, and the other end is connected to the buffer chamber. The buffer chamber is connected to the valve via several sequentially connected ultrasonic binary gas sensors, and the valve is connected to the exhaust gas collection and treatment device. The gas source provides binary gas of known composition, the flow controller regulates and limits the flow rate through the ultrasonic binary gas sensor, the buffer chamber stabilizes the temperature, pressure, and flow rate of the gas flowing into the ultrasonic binary gas sensor, and the valve prevents external gas from flowing back into the ultrasonic binary gas sensor.

[0066] Step 2: Control the gas concentration inside the ultrasonic binary gas sensor by introducing gas of known concentration, and extract the characteristic period amplitude threshold and characteristic period flight time compensation value in batches.

[0067] like Figure 2 As shown, the detailed steps are as follows:

[0068] Step 1) Connect several ultrasonic binary gas sensors sequentially into a constant temperature chamber set to temperature T in the ultrasonic feature vector extraction system. Connect the ultrasonic binary gas sensors to the power supply and the host computer via serial ports. The power supply provides power to the ultrasonic binary gas sensors, and the host computer transmits data to the ultrasonic binary gas sensors via serial ports.

[0069] Step 2) A binary gas mixture with known concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 is introduced into a series-connected ultrasonic binary gas sensor to expel the existing gas inside the sensor. When the exhaust gas collection and treatment device detects that the concentration of the gas discharged from the ultrasonic binary gas sensor matches the concentration C1 of the introduced binary gas, and the temperature matches the set temperature T of the constant temperature chamber, the inlet and outlet of the series-connected ultrasonic binary gas sensor are closed. Concentration C1 is the minimum value of the concentration detection range of the ultrasonic binary gas sensor.

[0070] Step 3) The host computer broadcasts the current gas concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 to the series-connected ultrasonic binary gas sensors in batches. The ultrasonic binary gas sensors will automatically complete the following calculations based on the parameters.

[0071] Step 4) The ultrasonic binary gas sensor excites the ultrasonic transducer at the transmitting end to emit ultrasonic waves for N1 cycles, and converts the ultrasonic waves into analog signals through the ultrasonic transducer at the receiving end. The analog signals are periodically sampled by the ADC of the ultrasonic binary gas sensor to obtain digital sampling information D1, which includes noise signal data and complete acoustic signal data received from the pre-sound wave circuit, such as... Figure 3 As shown; the ultrasonic binary gas sensor acquires the noise signal data received from the circuit before the sound wave, i.e.

[0072] The average value D was calculated from the first m sets of sampled data whose sampling time was much shorter than the theoretical ultrasound arrival time. 1m And 3 times the noise standard deviation as the benchmark value D b1 Additionally, the ultrasonic binary gas sensor obtains the maximum value D by comparing the values ​​in the digital sampling information D1. max1 .and

[0073]

[0074] Among them, D 1i This represents the i-th set of sampled data.

[0075] By treating the ultrasonic transducer receiving the ultrasonic signal as a first-order system, the vibration amplitude of the ultrasonic signal generated by the first excitation pulse at time constant τ can be calculated and used as the characteristic periodic amplitude threshold D of this ultrasonic binary gas sensor. τ1 :

[0076]

[0077] Find the wave peak that is greater than the characteristic period amplitude threshold D in the digital sampling information D1. τ1 The first period is taken as the characteristic period of this ultrasonic binary gas sensor; the index and maximum value of the maximum value in the characteristic period sampling data are denoted as (p1, D). 1p1 ) and the k sampling points (p1-1, D) before point p1. 1(p1-1) (p1-2, D) 1(p1-2) ...(p1-k, D) 1(p1-k) ), and the j sampling points (p1+1, D) after point p1. 1(p1+1) (p1+2, D) 1(p1+2) ...(p1+j, D) 1(p1+j) From this, we can obtain matrices A and B:

[0078]

[0079] Based on the formula for fitting a second-order function using the least squares method, we can obtain the second-order function relationship matrix x between the sampling index p and the sampling value D, and thus obtain the second-order function D(p) of the settlement characteristic period peak. Furthermore:

[0080]

[0081] The value of the characteristic periodic peak can be obtained using the formula for calculating the maximum and minimum values ​​of a second-order function:

[0082]

[0083] Similarly, based on the sampling sequence number and sampling value of the previous period, a second-order function D'(p') can be fitted, and the peak value D' can be calculated. pmax .

[0084] To ensure that the selected characteristic period identification amplitude threshold is as close as possible to the peak value of the characteristic period and the previous period, and to reduce the risk of identification errors, the characteristic period peak value D is calculated. pmax and peak value D' pmax The average value is used as the threshold D for identifying the periodic amplitude of the characteristic. th1 This reduces the risk of identifying the previous or next period of the characteristic period due to changes in the peak caused by noise or other factors, and improves the recognition accuracy of the characteristic period.

[0085]

[0086] Step 5) A binary gas mixture with known concentration C2, adiabatic coefficient k2, gas constant R2, and molar mass M2 is introduced into a series-connected ultrasonic binary gas sensor to expel the existing gas inside the sensor. When the exhaust gas collection and treatment device detects that the concentration of the gas expelled from the ultrasonic binary gas sensor is the same as the concentration C2 of the introduced binary gas, the inlet and outlet of the series-connected ultrasonic binary gas sensor are closed. Note: Concentration C2 is the maximum value of the ultrasonic binary gas sensor's concentration detection range.

[0087] Step 6) Repeat steps 3) and 4) above to obtain the identification feature periodic amplitude threshold D. th2 , and save.

[0088] Step 7) Calculate the characteristic periodic amplitude threshold D. th1 and D th2 The average value D th This serves as the amplitude threshold for identifying characteristic cycles in this ultrasonic binary gas sensor, reducing the risk of identifying the previous or next cycle of the characteristic cycle due to changes in acoustic attenuation under different gas concentrations, and improving the recognition accuracy of characteristic cycles.

[0089]

[0090] Step 8) Given the distance L between the ultrasonic transmitter and receiver transducers of the ultrasonic binary gas sensor, the concentration C2 of the binary gas mixture, the adiabatic coefficient k2, the gas constant R2, the molar mass M2, and the temperature T; the ADC of the ultrasonic binary gas sensor periodically samples to obtain digital sampling information D2, including noise signal data received from the pre-sound wave circuit and complete sound wave signal data. By comparing the characteristic periodic amplitude threshold D... th The characteristic period is identified, and the flight time t corresponding to the characteristic period is calculated. The method for obtaining the flight time corresponding to the characteristic period is not within the scope of this invention.

[0091] Because there is a delay in the process of ultrasonic transducer generating ultrasonic waves and the ultrasonic transducer receiving and converting ultrasonic waves into analog signals, and this delay time cannot be accurately measured, the speed of sound c² and the time-of-flight compensation value t can be calculated using the formulas for calculating the speed of sound and the time-of-flight compensation value. offset :

[0092]

[0093]

[0094] Step 3: Calculate the ultrasonic flight time based on the characteristic periodic amplitude threshold extracted in Step 2, and thus calculate the target gas concentration.

[0095] Ultrasonic binary gas sensors can quickly and effectively identify characteristic periods, compensate for flight time, and calculate gas concentration using feature vectors. The flowchart is shown below. Figure 4 The detailed steps are as follows:

[0096] Step 1) The ultrasonic binary gas sensor excites the ultrasonic transducer at the transmitting end to emit ultrasonic waves for N cycles, and converts the ultrasonic waves into analog signals through the ultrasonic transducer at the receiving end. The analog signals are periodically sampled by the ADC of the ultrasonic binary gas sensor to obtain digital sampling information D, which includes complete acoustic wave signal data and noise signal data received on the circuit before the acoustic wave.

[0097] Step 2) The ultrasonic binary gas sensor compares the digital sampling information D with the characteristic period amplitude threshold Dth, and finds the first period that is greater than the characteristic period amplitude threshold Dth. The time t corresponding to this period is obtained from the time the ultrasonic transducer at the excitation end is excited to the time the ultrasonic transducer at the receiving end receives and samples it through a timing chip or algorithm.

[0098] Given that the temperature of the gas being measured by the ultrasonic binary gas sensor is T, and the distance between the ultrasonic transmitter and receiver of the sensor is L, the ultrasonic time of flight (ToF) and the speed of sound (c) can be calculated using the time-of-flight compensation formula.

[0099] ToF = t + t offset

[0100]

[0101] Step 3) Given the specific heat capacity C of the target gas at constant pressure Pa Specific heat capacity at constant volume C Va and molar mass M a Another type of gas mixture has a specific heat capacity at constant pressure C. Pb Specific heat capacity at constant volume C Vb And molar mass M b The gas constant R; based on the formulas for calculating the adiabatic coefficient and the velocity of sound of a mixed gas, a quadratic equation y(x) with respect to concentration C can be derived:

[0102]

[0103]

[0104] M diff =(M a -M b )

[0105] C Pdiff =(C Pa -C Pb )

[0106] C Vdiff =(C Va -C Vb )

[0107]

[0108] Where k is the specific heat ratio of the binary gas mixture, and M diff C represents the molar mass difference between the target gas and another gas mixture. Pdiff C represents the difference in specific heat capacity at constant pressure between the target gas and another gas mixture. Vdiff Let k and M be the difference in specific heat capacity at constant volume between the target gas and another gas mixture. diff C Pdiff C Vdiff It serves as an intermediate variable in the above operations.

[0109] By solving the quadratic equation in terms of concentration, we can calculate the concentration C:

[0110]

[0111]

[0112] X2 = M diff C Vdiff

[0113]

[0114]

[0115] Among them, X0, X1, and X2 are intermediate variables.

[0116] The specific heat capacities k1 and k2 are obtained from the formula for calculating the average specific heat capacity ratio of the mixed gas, and the average molar masses M1 and M2 are obtained from the formula for calculating the average molar mass of the mixed gas.

[0117]

[0118]

[0119] Since the average molar mass of the binary gas mixture should be between the molar masses Ma and Mb of the two gases, the concentration C of the target gas can be obtained by screening.

[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for automatic feature vector extraction in an ultrasonic binary gas sensor, characterized in that, The steps are as follows: Step 1: Build an ultrasonic feature vector extraction system and connect the sequentially connected ultrasonic binary gas sensors to the ultrasonic feature vector extraction system; Step 2: Introduce a gas of known concentration into the ultrasonic feature vector extraction system to control the gas concentration inside the ultrasonic binary gas sensor, and extract the characteristic period amplitude threshold and characteristic period flight time compensation value in batches; Step 3: Calculate the ultrasonic flight time based on the characteristic periodic amplitude threshold extracted in Step 2, and thus calculate the target gas concentration; The implementation method of step two is as follows: Step 1) Connect several ultrasonic binary gas sensors sequentially into a constant temperature chamber with a temperature set to T in the ultrasonic feature vector extraction system. Connect the ultrasonic binary gas sensors to the power supply and the host computer. Step 2) A binary gas mixture with known concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 is introduced into a series-connected ultrasonic binary gas sensor to discharge the original gas inside the ultrasonic binary gas sensor; when the exhaust gas collection and treatment device detects that the concentration of the gas discharged from the ultrasonic binary gas sensor is consistent with the concentration C1 of the introduced binary gas, and the temperature is consistent with the set temperature T of the constant temperature chamber, the inlet and outlet of the series-connected ultrasonic binary gas sensor are closed. Step 3) The host computer broadcasts the current gas concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 to the series-connected ultrasonic binary gas sensors in batches. Step 4) The ultrasonic binary gas sensor excites the ultrasonic transducer at the transmitting end to emit ultrasonic waves for N1 cycles, and converts the ultrasonic waves into analog signals through the ultrasonic transducer at the receiving end. The analog signals are periodically sampled by the ADC of the ultrasonic binary gas sensor to obtain digital sampling information D1. The characteristic periodic amplitude threshold D of the ultrasonic binary gas sensor is calculated based on the digital sampling information D1. τ1 Find the peak value greater than the characteristic period amplitude threshold D in the digital sampling information D1. τ1 The first cycle is taken as the characteristic cycle of the ultrasonic binary gas sensor; the amplitude threshold D of the characteristic cycle is obtained based on the sampling data near the characteristic cycle. th1 ; Step 5) A binary gas mixture with known concentration C2, adiabatic coefficient k2, gas constant R2, and molar mass M2 is introduced into a series-connected ultrasonic binary gas sensor to discharge the original gas inside the ultrasonic binary gas sensor; when the exhaust gas collection and treatment device detects that the gas discharged from the ultrasonic binary gas sensor has the same concentration C2 as the introduced binary gas, the inlet and outlet of the series-connected ultrasonic binary gas sensor are closed. Step 6) Repeat steps 3) and 4) to obtain the identification feature periodic amplitude threshold D. th2 ; Step 7) Calculate the characteristic periodic amplitude threshold D. th1 and D th2 The average value is used as the characteristic periodic amplitude threshold D for the ultrasonic binary gas sensor. th ; Step 8) Given the distance L between the ultrasonic transmitter and receiver transducers of the ultrasonic binary gas sensor, the concentration C2 of the binary gas mixture, the adiabatic coefficient k2, the gas constant R2, the molar mass M2, and the temperature T; the ADC of the ultrasonic binary gas sensor periodically samples to obtain digital sampling information D2, and compares it with the characteristic period amplitude threshold D. th The characteristic period is identified, and the corresponding flight time compensation value is calculated.

2. The method for automatic feature vector extraction for an ultrasonic binary gas sensor according to claim 1, characterized in that, The ultrasonic feature vector extraction system includes a gas source, a constant temperature chamber, and an exhaust gas collection and processing device. The constant temperature chamber is connected to both the gas source and the exhaust gas collection and processing device. The gas source is used to supply gas to the constant temperature chamber, and the constant temperature chamber is used to regulate and maintain the temperature of the ultrasonic binary gas sensor and the internal gas temperature. The exhaust gas collection and processing device is used to detect the composition and temperature of the exhaust gas and to collect and process the exhaust gas.

3. The method for automatic feature vector extraction for an ultrasonic binary gas sensor according to claim 2, characterized in that, The constant temperature chamber includes a flow controller, a buffer chamber, and a valve. One end of the flow controller is connected to an external gas source, and the other end is connected to the buffer chamber. The buffer chamber is connected to the valve via several sequentially connected ultrasonic binary gas sensors, and the valve is connected to an exhaust gas collection and treatment device. The flow controller is used to regulate and limit the flow rate through the ultrasonic binary gas sensors, the buffer chamber is used to stabilize the temperature, pressure, and flow rate of the gas flowing into the ultrasonic binary gas sensors, and the valve is used to prevent external gas from flowing back into the ultrasonic binary gas sensors.

4. The method for automatic feature vector extraction for an ultrasonic binary gas sensor according to any one of claims 1-3, characterized in that, The concentration C1 is the minimum value of the concentration detection range of the ultrasonic binary gas sensor; the concentration C2 is the maximum value of the concentration detection range of the ultrasonic binary gas sensor; the digital sampling information D1 and digital sampling information D2 include noise signal data and complete sound wave signal data received from the acoustic wave pre-circuit; the first m sets of sampling data are the first m sets of sampling data in the noise signal data received by the ultrasonic binary gas sensor from the acoustic wave pre-circuit, whose sampling time is much shorter than the theoretical ultrasonic wave arrival time.

5. The method for automatic feature vector extraction for an ultrasonic binary gas sensor according to claim 4, characterized in that, The characteristic period amplitude threshold D of the ultrasonic binary gas sensor is calculated based on the digital sampling information D1. τ1 The method is as follows: the ultrasonic transducer receiving the ultrasonic signal is equivalent to a first-order system, and the vibration amplitude of the ultrasonic signal generated by the first excitation pulse at time constant τ is calculated as the characteristic period amplitude threshold of the ultrasonic binary gas sensor. ; Where N1 represents the period of the ultrasound, and D max1 The maximum value in the digital sample information D1. Three times the noise standard deviation, This represents the average value of the first m groups of sampled data. This represents the i-th set of sampled data.

6. The method for automatic feature vector extraction for an ultrasonic binary gas sensor according to claim 5, characterized in that, The characteristic period amplitude threshold D is obtained based on the sampling data near the characteristic period. th1 The method is as follows: The sampling indices and values ​​of the maximum value, the k sampling points before the maximum value, and the j sampling points after the maximum value in the characteristic period sampling data are used to fit a second-order function using the least squares method to obtain the second-order function D(p) for calculating the characteristic period peak value; the peak value of the characteristic period is obtained according to the formula for calculating the maximum and minimum values ​​of the second-order function. ; Based on the sampling sequence number and sampling value of the previous period, a second-order function D'(p') can be fitted, and the peak value D' can be calculated. pmax ; Calculate the characteristic periodic peak value D pmax and peak value D' pmax The average value is used as the threshold D for identifying the periodic amplitude of the characteristic. th1 .

7. The method for automatic feature vector extraction for an ultrasonic binary gas sensor according to claim 6, characterized in that, The speed of sound is calculated using the formula for calculating the speed of sound. Calculate the flight time compensation value according to the flight time compensation value formula. Where t is the flight time corresponding to the characteristic period.

8. The method for automatic feature vector extraction for an ultrasonic binary gas sensor according to any one of claims 1-3, 6, and 7, characterized in that, The implementation method of step three is as follows: Step 1) The ultrasonic binary gas sensor excites the ultrasonic transducer at the transmitting end to emit ultrasonic waves for N cycles, and converts the ultrasonic waves into analog signals through the ultrasonic transducer at the receiving end. The analog signals are periodically sampled by the ADC of the ultrasonic binary gas sensor to obtain digital sampling information D. Step 2) The ultrasonic binary gas sensor compares the digital sampling information D with the characteristic period amplitude threshold D. th And find the amplitude D greater than the characteristic periodic threshold. th In the first cycle, the time t corresponding to the first cycle is obtained from the ultrasonic transducer at the excitation end to the ultrasonic transducer at the receiving end receiving and sampling the first cycle through a timing chip or algorithm; the ultrasonic flight time ToF and the speed of sound c are calculated according to the flight time compensation value formula. Step 3) The specific heat capacity C of the target gas at constant pressure is known. Pa Specific heat capacity at constant volume C Va and molar mass M a Another type of gas mixture has a specific heat capacity at constant pressure C. Pb Specific heat capacity at constant volume C Vb And molar mass M b Given the gas constant R, and the formulas for calculating the adiabatic coefficient and sound velocity of a mixed gas, a quadratic equation in terms of concentration is derived. Solving the quadratic equation yields the target gas concentration C.

9. The method for automatic feature vector extraction for an ultrasonic binary gas sensor according to claim 8, characterized in that, The ultrasonic time of flight (ToF) and the speed of sound (c) are respectively: ; Where L is the distance between the ultrasonic transmitter and receiver of the ultrasonic binary gas sensor, and t offset This represents the flight time compensation value; t is the flight time corresponding to the characteristic period, and T is the temperature. The method for solving the quadratic equation in one variable and calculating the concentration C is as follows: Construct a quadratic equation in one variable: ; ; ; ; ; ; Where k is the specific heat ratio of the binary gas mixture. The molar mass difference between the target gas and another gas mixture. The difference in specific heat capacity at constant pressure between the target gas and another gas mixture is given. The difference in specific heat capacity at constant volume between the target gas and another mixed gas; Solve the quadratic equation in terms of concentration to calculate the concentration. and ,and ; ; ; ; ; in, , , As an intermediate variable; The specific heat capacity is obtained from the formula for calculating the average specific heat capacity ratio of the mixed gas. The average molar mass is obtained according to the formula for calculating the average molar mass of a gas mixture. ; The target gas concentration C is obtained by screening based on the fact that the average molar mass of the binary gas mixture is between the molar masses Ma and Mb of the two gases.