Feature vector automatic extraction method for ultrasonic binary gas sensor
Through the automatic extraction method of feature vectors, the characteristic period amplitude threshold and time-of-flight compensation value of ultrasonic binary gas sensors are extracted, which solves the problems of instability and consistency of detection results in the prior art, and improves recognition accuracy and production efficiency.
Patent Information
- Application Number
- CN202311114755.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-08-31
AI Technical Summary
When detecting gas concentration, existing ultrasonic binary gas sensors can identify characteristic periods with fixed thresholds or relative thresholds and calculate ultrasonic flight time, which cannot guarantee the stability and consistency of the detection results, especially under the influence of changes such as environmental noise and sound wave reflection.
The feature vector automatic extraction method is adopted to extract the characteristic period amplitude threshold and time-of-flight compensation value of the ultrasonic binary gas sensor by batch-based extraction, and identify the ultrasonic characteristic period, reducing the impact of acoustic attenuation changes and noise on detection stability.
The accuracy of ultrasonic binary gas sensor for feature period recognition is improved, the stability and consistency of detection results are enhanced, and production difficulty and noise impact are reduced.
Smart Images

Figure CN119541676A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of ultrasonic binary gas sensors, and in particular to an automatic feature vector extraction method for ultrasonic binary gas sensors. Background Art
[0002] The applicant is Chengdu Qianjia Technology Co., Ltd., the application number is 202210856618.2, and the patent name is threshold value adaptive adjustment method and ultrasonic metering device adaptive metering method, which involves the field of ultrasonic technology, wherein the threshold value adaptive adjustment method includes the steps of: after the gain of the signal amplifier is determined, determining the initial optimal threshold value; judging whether there is long-term interference, if so, adaptively adjusting the initial optimal threshold value, otherwise keeping the initial optimal threshold value unchanged; the long-term interference refers to the flow velocity changing within a continuous time interval T, and the step size of the flow velocity change is Or the flow rate reduction step size is Wherein, N is a positive integer, N=1 / 2 / 3..., Tc is the ultrasonic pulse period, L is the sound channel length, cf is the speed of ultrasonic wave propagation in the fluid, and φ is the sound channel angle. In the above invention scheme, the threshold value will be adaptively adjusted according to the situation, thereby improving the measurement accuracy of the ultrasonic metering device.
[0003] The invention with application number 2021103098849 and applicant Chengdu Qianjia Technology Co., Ltd. discloses an ultrasonic flight time measurement method and system suitable for gas and liquid. The received signal is sampled by using ADC to receive the envelope of the signal, and the judgment value is determined by the maximum value of the signal or the intersection of the envelope to obtain the rough measurement time of the ultrasonic wave passing through the medium to be measured. The rough measurement time of the ultrasonic wave passing through the medium to be measured is further refined on the basis of the rough measurement time of the ultrasonic wave passing through the medium to be measured, and the ultrasonic wave flight time is calculated at the position where the waveform changes significantly. Taking interference into account in the precise calculation process of the flight time can avoid interference errors during ultrasonic flight, with high measurement accuracy and simple method. The estimated flight time t calculated is also calibrated to obtain the absolute flight time T of the ultrasonic wave passing through the medium to be measured. It can not only get rid of the defect that the threshold method needs to set a fixed threshold, but also take into account the sampling interval and capture delay time, effectively improving the measurement accuracy.
[0004] Existing patents are mainly based on ultrasonic detection of gases with fixed gas composition. In gases of different components, the ultrasonic attenuation is affected by the gas composition, so the adaptive threshold method is not applicable when detecting gas components with changing concentrations. In addition, existing inventions ignore the actual position of the threshold on the ultrasonic waveform, and ignore the impact of changes in environmental noise and sound wave reflection on the ultrasonic waveform. When the threshold is near the vertex on the ultrasonic waveform under a specific environment, the period or waveform identified by the threshold is prone to deviation, so the stability and consistency of the detection results cannot be guaranteed. Summary of the invention
[0005] In order to solve the technical problem that the prior art uses fixed thresholds or relative thresholds to identify characteristic periods and calculate ultrasonic flight time, but cannot ensure the stability and consistency of detection results, the present invention proposes a method for automatically extracting feature vectors for ultrasonic binary gas sensors. Feature vectors are extracted from ultrasonic binary gas sensors in batches, and the ultrasonic characteristic period is identified by the feature vector to calculate the ultrasonic flight time. This reduces the influence of acoustic attenuation changes caused by performance differences of ultrasonic transducers on detection stability, reduces the influence of abnormal signals or noise on detection stability, reduces the difficulty of matching ultrasonic transducers, improves the accuracy of characteristic period recognition of ultrasonic binary gas sensors, and improves production efficiency.
[0006] In order to achieve the above object, the technical solution of the present invention is implemented as follows: a method for automatically extracting feature vectors for ultrasonic binary gas sensors, the steps of which are as follows:
[0007] Step 1: Build an ultrasonic feature vector extraction system, and connect the ultrasonic binary gas sensors connected in sequence to the ultrasonic feature vector extraction system;
[0008] Step 2: introducing a gas of known concentration into the ultrasonic feature vector extraction system to control the concentration of the gas in the ultrasonic binary gas sensor, and batch extracting the characteristic period amplitude threshold and the characteristic period flight time compensation value;
[0009] Step 3: Calculate the ultrasonic flight time based on the characteristic period 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 box and an exhaust gas collection and processing device. The constant temperature box is connected to the gas source and the exhaust gas collection and processing device respectively. The gas source is used to provide gas to the constant temperature box. The constant temperature box 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 box includes a flow controller, a buffer chamber and a valve, one end of the flow controller is connected to an external gas source, the other end of the flow controller is connected to the buffer chamber, the buffer chamber is connected to the valve through a number of ultrasonic binary gas sensors connected in sequence, and the valve is connected to the exhaust gas collection and treatment device; the flow controller is used to adjust and limit the flow through the ultrasonic binary gas sensor, the buffer chamber is used to stabilize the temperature, pressure and flow of the gas flowing into the ultrasonic binary gas sensor, and the valve is used to block the external gas from flowing back into the ultrasonic binary gas sensor.
[0012] Preferably, the implementation method of step 2 is:
[0013] Step 1) connecting a plurality of ultrasonic binary gas sensors in sequence to a constant temperature box of an ultrasonic feature vector extraction system whose temperature is set to T, and connecting the ultrasonic binary gas sensors to a power supply and a host computer;
[0014] Step 2) Pass a binary mixed gas with known concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 into a series of ultrasonic binary gas sensors to discharge the original gas in the ultrasonic binary gas sensors; when the tail 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 binary gas passed in, and the temperature is consistent with the set temperature T of the thermostat, close the air inlet and outlet of the series of ultrasonic binary gas sensors;
[0015] Step 3) The concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 of the current gas introduced are broadcasted in batches to the ultrasonic binary gas sensors connected in series through the host computer;
[0016] Step 4) The ultrasonic binary gas sensor emits ultrasonic waves by stimulating the ultrasonic transducer at the transmitting end 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 period 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 characteristic cycle amplitude threshold D is obtained based on the sampling data near the characteristic cycle. th1 ;
[0017] Step 5) Passing a binary mixed gas with a known concentration C2, adiabatic coefficient k2, gas constant R2, and molar mass M2 into a series of ultrasonic binary gas sensors to discharge the original gas in the ultrasonic binary gas sensors; when the tail gas collection and treatment device detects that the gas discharged by the ultrasonic binary gas sensor is consistent with the concentration C2 of the binary gas passed in, closing the air inlet and air outlet of the series of ultrasonic binary gas sensors;
[0018] Step 6) Repeat steps 3) and 4) to obtain the characteristic period amplitude threshold D th2 ;
[0019] Step 7) Calculate the recognition characteristic period amplitude threshold D th1 and D th2 The average value is used as the characteristic period amplitude threshold D of the ultrasonic binary gas sensor. th ;
[0020] Step 8) The distance between the ultrasonic transmitting end and the ultrasonic transducer receiving end of the ultrasonic binary gas sensor is known to be L, the binary mixed gas concentration C2, 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 the characteristic period amplitude threshold D th The characteristic period is identified and the flight time compensation value corresponding to the characteristic period 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 the digital sampling information D2 include the noise signal data and the complete sound wave signal data on the circuit before the sound wave is received, and the first m groups of sampling data are the first m groups of sampling data in which the data sampling information time of the noise signal data on the circuit before the sound wave is received by the ultrasonic binary gas sensor is much smaller than the theoretical ultrasonic wave arrival time.
[0022] Preferably, the characteristic period amplitude threshold D of the ultrasonic binary gas sensor is calculated according to the digital sampling information D1. τ1 The method is as follows: the ultrasonic signal received by the receiving end transducer of the ultrasonic binary gas sensor is equivalent to a first-order system, and the vibration amplitude corresponding to the ultrasonic signal generated by the first excitation pulse at the time constant τ is calculated as the characteristic period amplitude threshold of the ultrasonic binary gas sensor:
[0023]
[0024] Among them, N1 represents the period of ultrasound, D max1 is the maximum value of the digital sampling information D1, D b1=3× is 3 times the noise standard deviation, is the average value of the first m groups of sampling data, D 1i is the i-th group of sampling data.
[0025] Preferably, the characteristic period amplitude threshold D is obtained based on the sampled data near the characteristic period. th1 The method is as follows: the sampling sequence number and sampling value of the maximum value in the characteristic period sampling data and the k sampling points before the maximum value and the j sampling points after the maximum value are fitted with a second-order function according to the least squares method to obtain the second-order function D(p) of the settlement characteristic period peak value; the characteristic period peak value D is obtained according to the second-order function maximum value calculation formula pmax ;
[0026] According to the sampling sequence number and sampling value of the previous period of the characteristic period, the 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 characteristic period amplitude threshold D th1 .
[0028] Preferably, the sound velocity is calculated according to the sound velocity 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 implementation method of step three is:
[0030] Step 1) The ultrasonic binary gas sensor emits ultrasonic waves by stimulating the ultrasonic transducer at the transmitting end 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 greater than the characteristic periodic threshold D th The first cycle of the ultrasonic wave is obtained by a timing chip or an algorithm, etc., from the time when the ultrasonic wave transducer at the transmitting end is stimulated to the time when the ultrasonic wave transducer at the receiving end receives and samples the first cycle. The ultrasonic wave flight time ToF and the sound speed c are calculated according to the flight time compensation value formula.
[0032] Step 3) The constant pressure specific heat capacity C of the target gas is known Pa , constant volume specific heat capacity C Va and molar mass Ma , another mixed gas constant pressure specific heat capacity C Pb , constant volume specific heat capacity C Vb and the molar mass is M b , and the gas constant R; according to the calculation formula of the adiabatic coefficient of the mixed gas and the calculation formula of the speed of sound, a quadratic equation about the concentration is derived, and the quadratic equation is solved to calculate the target gas concentration C.
[0033] Preferably, the ultrasonic flight time ToF and the sound speed c are respectively:
[0034] ToF=t+t offset
[0035]
[0036] Where L is the distance between the ultrasonic transmitting end and the receiving end of the ultrasonic binary gas sensor, t offset is the flight time compensation value;
[0037] The method for solving the quadratic equation to calculate the concentration C is:
[0038] Construct a quadratic equation:
[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, M diff is the molar mass difference between the target gas and another mixed gas, C Pdiff is the constant pressure specific heat capacity difference between the target gas and another mixed gas, C Vdiff is the constant volume specific heat capacity difference between the target gas and another mixed gas;
[0046] Solve the quadratic equation for concentration and 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 according to the calculation formula of the average specific heat capacity ratio of the mixed gas. The average molar mass is obtained according to the average molar mass calculation formula of the mixed gas
[0054] Because the average molar mass of the binary mixed gas is between the molar masses of the two gases Ma and Mb, the target gas concentration C is screened and obtained.
[0055] Compared with the prior art, the beneficial effects of the present invention are as follows: the constructed ultrasonic feature vector extraction system is mainly used to complete the ultrasonic feature vector extraction of ultrasonic binary gas sensors in batches, and has the advantages of low construction difficulty, batch production, and high efficiency. The present invention can match the transducer performance of each ultrasonic binary gas sensor by extracting the characteristic period amplitude threshold and the characteristic period flight time compensation value of the ultrasonic feature vector, thereby ensuring the effectiveness of the characteristic period within the range of the detected gas concentration. At the same time, the ultrasonic feature vector extraction of the present invention can effectively reduce the influence of environmental noise and noise in the ultrasonic binary gas sensor circuit.
[0056] The characteristic period amplitude threshold D of the present invention th Located at the time constant τ of the equivalent first-order system, this amplitude has the characteristics of easy observation and large amplitude change between the previous and next cycles, which is conducive to the rapid identification and positioning of the characteristic period during the ADC sampling process, thereby reducing the influence of the amplitude change caused by the gas concentration on the identification of the characteristic period. At the same time, the ultrasonic wave received by the transducer at the receiving end is affected by factors such as the external gas state and reflection, and the frequency of the analog signal received and converted fluctuates. Therefore, the characteristic period located at the time constant τ of the equivalent first-order system is relatively close to the first observable wave, and the flight time compensation value corresponding to the characteristic value period is less affected by external factors, which is conducive to improving the timing accuracy. In addition, after the flight time compensation, in the case of gas with unknown concentration, when the gas adiabatic coefficient and gas constant are uncertain, the calculation result is gradually approached to the true value through the secondary concentration calculation, thereby improving the concentration calculation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 It is a flow chart of the present invention.
[0059] Figure 2 It is a structural schematic diagram of the ultrasonic feature vector extraction system of the present invention.
[0060] Figure 3 It is a schematic diagram of the ultrasonic characteristic vector and characteristic period of the present invention.
[0061] Figure 4 Flow chart of calculating the target gas concentration using ultrasonic eigenvectors of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] like Figure 1 As shown, a method for automatically extracting feature vectors for ultrasonic binary gas sensors describes a method for extracting and identifying ultrasonic feature vectors. By controlling the concentration of the ultrasonic propagation medium gas, an ADC is used to sample the received ultrasonic signal and calculate the ultrasonic feature vector, and the recognition accuracy and efficiency of the ultrasonic specific period are improved by identifying the feature vector, thereby improving the consistency and stability of ultrasonic binary gas sensors and other products based on ultrasonic detection technology. The present invention includes: building an ultrasonic feature vector extraction system, an ultrasonic feature vector extraction process and method, and an ultrasonic feature vector application method.
[0064] Step 1: Build an ultrasonic feature vector extraction system, and connect the ultrasonic binary gas sensors connected in sequence to the ultrasonic feature vector extraction system.
[0065] The schematic diagram of the ultrasonic feature vector extraction system is as follows: Figure 1, consisting of a gas source, a thermostat and an exhaust gas collection and processing device. The thermostat is connected to the gas source and the exhaust gas collection and processing device respectively. The gas source is used to provide gas to the thermostat. The thermostat 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 components and temperature of the exhaust gas and collect and process the exhaust gas. The thermostat 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 of the flow controller is connected to the buffer chamber. The buffer chamber is connected to the valve through a number of ultrasonic binary gas sensors connected in sequence, and the valve is connected to the exhaust gas collection and processing device. The gas source is used to provide binary gas of known components, the flow controller is used to adjust and limit the flow through the ultrasonic binary gas sensor, the buffer chamber is used to stabilize the temperature, pressure and flow of the gas flowing into the ultrasonic binary gas sensor, and the valve is used to block the external gas from flowing back into the ultrasonic binary gas sensor.
[0066] Step 2: Control the concentration of gas in the ultrasonic binary gas sensor by introducing gas of known concentration, and extract characteristic periodic amplitude threshold and characteristic periodic flight time compensation value in batches.
[0067] like Figure 2 The detailed steps are as follows:
[0068] Step 1) Connect several ultrasonic binary gas sensors in sequence to a constant temperature box with a temperature set to T of an ultrasonic feature vector extraction system, and connect the ultrasonic binary gas sensors to a power supply and a host computer through a serial port. The power supply provides power support for the ultrasonic binary gas sensor, and the host computer transmits data with the ultrasonic binary gas sensor through the serial port.
[0069] Step 2) Pass a binary mixed gas with known concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 into the series-connected ultrasonic binary gas sensor to discharge the original gas in the ultrasonic binary gas sensor; when the tail 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 binary gas passed in, and the temperature is consistent with the set temperature T of the thermostat, close the air inlet and outlet of the series-connected ultrasonic binary gas sensor. Concentration C1 is the minimum value of the concentration detection range of the ultrasonic binary gas sensor.
[0070] Step 3) The concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 of the current gas introduced are broadcasted in batches to the ultrasonic binary gas sensors in series through the host computer. The ultrasonic binary gas sensors will automatically complete the following calculation steps based on the parameters.
[0071] Step 4) The ultrasonic binary gas sensor emits ultrasonic waves by stimulating the ultrasonic transducer at the transmitting end 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, including the noise signal data on the circuit before receiving the sound wave and the complete sound wave signal data, such as Figure 3 As shown; the ultrasonic binary gas sensor receives the noise signal data on the sound wave front circuit, that is
[0072] ˉThe first m groups of sampling data whose data sampling time is far less than the theoretical ultrasonic wave arrival time are used to calculate the average value D 1m and 3 times the noise standard deviation as the reference value D b1 In addition, 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 is the i-th group of sampling data.
[0075] The ultrasonic signal received by the receiving end transducer of the ultrasonic binary gas sensor is equivalent to a first-order system. The vibration amplitude of the ultrasonic signal generated by the first excitation pulse at the time constant τ can be calculated as the characteristic period amplitude threshold D of this ultrasonic binary gas sensor. τ1 :
[0076]
[0077] Find the peak value greater than the characteristic period amplitude threshold D in the digital sampling information D1 τ1 The first cycle of is taken as the characteristic cycle of this ultrasonic binary gas sensor; the sequence number and the maximum value of the characteristic cycle sampling data are recorded as (p1, D 1p1 ) and the k sampling points before point p1 (p1-1, D 1(p1-1) )、(p1-2,D 1(p1-2) )...(p1-k,D 1(p1-k) ), and the j sampling points after point p1 (p1+1, D 1(p1+1) )、(p1+2,D 1(p1+2) )...(p1+j,D 1(p1+j) ), we can get matrix A and matrix B:
[0078]
[0079] According to the formula of fitting the second-order function by the least square method, the second-order function relationship matrix x about the sampling number p and the sampling value D can be obtained, and the second-order function D(p) of the peak value of the settlement characteristic cycle can be obtained. And:
[0080]
[0081] According to the second-order function maximum value calculation formula, the characteristic period peak value can be obtained:
[0082]
[0083] In the same way as above, the second-order function D'(p') can be fitted based on the sampling sequence number and sampling value of the previous period of the characteristic period, and the peak value D' can be calculated. pmax .
[0084] In order to ensure that the selected characteristic cycle recognition amplitude threshold is as close as possible to the peak value of the characteristic cycle and the cycle before the characteristic cycle, and reduce the risk of recognition error, the characteristic cycle peak value D is calculated. pmax and peak value D' pmax The average value is used as the characteristic period amplitude threshold D th1 , reducing the risk of peak changes due to noise or other factors, thereby identifying the previous or next cycle of the characteristic cycle, and improving the recognition of the characteristic cycle.
[0085]
[0086] Step 5) Pass a binary mixed gas with known concentration C2, adiabatic coefficient k2, gas constant R2, and molar mass M2 into the series-connected ultrasonic binary gas sensor to discharge the original gas in the ultrasonic binary gas sensor; when the tail gas collection and treatment device detects that the gas discharged by the ultrasonic binary gas sensor is consistent with the concentration C2 of the binary gas passed in, close the inlet and outlet of the series-connected ultrasonic binary gas sensor. Note: Concentration C2 is the maximum value of the concentration detection range of the ultrasonic binary gas sensor.
[0087] Step 6) Repeat the above steps 3) and 4) to obtain the identification characteristic period amplitude threshold D th2 , and save it.
[0088] Step 7) Calculate the recognition characteristic period amplitude threshold D th1 and D th2 The average value D th , as the characteristic period amplitude threshold of this ultrasonic binary gas sensor, it reduces the risk of identifying the previous or next period of the characteristic period due to the change of acoustic attenuation under different gas concentrations, and improves the recognition degree of the characteristic period.
[0089]
[0090] Step 8) The distance between the ultrasonic transmitting end and the ultrasonic transducer receiving end of the ultrasonic binary gas sensor is known to be L, the binary mixed gas concentration C2, 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 the noise signal data on the circuit before receiving the sound wave and the complete sound wave signal data. By comparing the characteristic period amplitude threshold D th , identify the characteristic period, and calculate the flight time t corresponding to the characteristic period. The method for obtaining the flight time corresponding to the characteristic period is not within the scope of the description of the present invention.
[0091] Since there is a delay in the process of ultrasonic transducer excitation to generate ultrasonic waves and ultrasonic transducer receiving ultrasonic waves and converting them into analog signals, and the delay time cannot be accurately measured. Therefore, according to the sound speed calculation formula and the flight time compensation value formula, the sound speed c2 and flight time compensation value t can be calculated. offset :
[0092]
[0093]
[0094] Step 3: Calculate the ultrasonic flight time based on the characteristic period amplitude threshold extracted in step 2, and thus calculate the target gas concentration.
[0095] Ultrasonic binary gas sensors can quickly and effectively identify characteristic cycles, compensate flight time and calculate gas concentration through characteristic vectors. The flow chart is as follows: Figure 4 , the detailed steps are as follows:
[0096] Step 1) The ultrasonic binary gas sensor emits ultrasonic waves by stimulating the ultrasonic transducer at the transmitting end 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, including complete sound wave signal data and noise signal data on the circuit before the sound wave is received.
[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 timing chip or algorithm is used to obtain the time t corresponding to the period from the ultrasonic transducer at the excitation transmitting end to the ultrasonic transducer at the receiving end receiving and sampling the period.
[0098] It is known that the ultrasonic binary gas sensor detects that the current temperature of the gas to be measured is T, and the distance between the ultrasonic transmitting end and the receiving end of the ultrasonic binary gas sensor is L. The ultrasonic flight time ToF and the sound speed c can be calculated according to the flight time compensation value formula:
[0099] ToF=t+t offset
[0100]
[0101] Step 3) The constant pressure specific heat capacity C of the target gas is known Pa , constant volume specific heat capacity C Va and molar mass M a , another mixed gas constant pressure specific heat capacity C Pb , constant volume specific heat capacity C Vb and the molar mass is M b , gas constant R; according to the calculation formula of the adiabatic coefficient of the mixed gas and the calculation formula of the speed of sound, the quadratic equation y(x) about the 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, M diff is the molar mass difference between the target gas and another mixed gas, C Pdiff is the constant pressure specific heat capacity difference between the target gas and another mixed gas, C Vdiff is the constant volume specific heat difference between the target gas and another mixed gas, k, M diff , C Pdiff , C Vdiff It serves as an intermediate variable in the above operations.
[0109] Solving the quadratic equation for 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 can be obtained from the average specific heat ratio calculation formula of the mixed gas, and the average molar masses M1 and M2 can be obtained from the average molar mass calculation formula of the mixed gas:
[0117]
[0118]
[0119] Because the average molar mass of the binary gas mixture should be between the molar masses Ma and Mb of the two gases, the target gas concentration C can be screened.
[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 principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for automatically extracting feature vectors for ultrasonic binary gas sensors, characterized in that: The steps are as follows: Step 1: Build an ultrasonic feature vector extraction system, and connect the ultrasonic binary gas sensors connected in sequence to the ultrasonic feature vector extraction system; Step 2: introducing a gas of known concentration into the ultrasonic feature vector extraction system to control the concentration of the gas in the ultrasonic binary gas sensor, and batch extracting the characteristic period amplitude threshold and the characteristic period flight time compensation value; Step 3: Calculate the ultrasonic flight time based on the characteristic period amplitude threshold extracted in step 2, and thus calculate the target gas concentration.
2. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to claim 1, characterized in that: The ultrasonic feature vector extraction system includes a gas source, a constant temperature box and an exhaust gas collection and processing device. The constant temperature box is connected to the gas source and the exhaust gas collection and processing device respectively. The gas source is used to provide gas to the constant temperature box. The constant temperature box 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.
3. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to claim 2, characterized in that: The constant temperature box 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 a plurality of ultrasonic binary gas sensors connected in sequence, and the valve is connected to an exhaust gas collection and treatment device. The flow controller is used to adjust and limit the flow through the ultrasonic binary gas sensor, the buffer chamber is used to stabilize the temperature, pressure and flow of the gas flowing into the ultrasonic binary gas sensor, and the valve is used to block the external gas from flowing back into the ultrasonic binary gas sensor.
4. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to claim 2 or 3, characterized in that: The implementation method of step 2 is: Step 1) connecting a plurality of ultrasonic binary gas sensors in sequence to a constant temperature box of an ultrasonic feature vector extraction system whose temperature is set to T, and connecting the ultrasonic binary gas sensors to a power supply and a host computer; Step 2) Pass a binary mixed gas with known concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 into a series of ultrasonic binary gas sensors to discharge the original gas in the ultrasonic binary gas sensors; when the tail 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 binary gas passed in, and the temperature is consistent with the set temperature T of the thermostat, close the air inlet and outlet of the series of ultrasonic binary gas sensors; Step 3) The concentration C1, adiabatic coefficient k1, gas constant R1, and gas molar mass M1 of the current gas introduced are broadcasted in batches to the ultrasonic binary gas sensors connected in series through the host computer; Step 4) The ultrasonic binary gas sensor emits ultrasonic waves by stimulating the ultrasonic transducer at the transmitting end 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 period 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 characteristic cycle amplitude threshold D is obtained based on the sampling data near the characteristic cycle. th1 ; Step 5) Passing a binary mixed gas with a known concentration C2, adiabatic coefficient k2, gas constant R2, and molar mass M2 into a series of ultrasonic binary gas sensors to discharge the original gas in the ultrasonic binary gas sensors; when the tail gas collection and treatment device detects that the gas discharged by the ultrasonic binary gas sensor is consistent with the concentration C2 of the binary gas passed in, closing the air inlet and air outlet of the series of ultrasonic binary gas sensors; Step 6) Repeat steps 3) and 4) to obtain the recognition characteristic period amplitude threshold D th2 ; Step 7) Calculate the recognition characteristic period amplitude threshold D th1 and D th2 The average value is used as the characteristic period amplitude threshold D of the ultrasonic binary gas sensor. th ; Step 8) The distance between the ultrasonic transmitting end and the ultrasonic transducer receiving end of the ultrasonic binary gas sensor is known to be L, the binary mixed gas concentration C2, 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 the characteristic period amplitude threshold D th The characteristic period is identified and the flight time compensation value corresponding to the characteristic period is calculated.
5. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to claim 4, 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 the digital sampling information D2 include the noise signal data on the circuit before receiving the sound wave and the complete sound wave signal data, and the first m groups of sampling data are the first m groups of sampling data in which the data sampling information time of the noise signal data on the circuit before receiving the sound wave of the ultrasonic binary gas sensor is much smaller than the theoretical ultrasonic wave arrival time.
6. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to claim 5, characterized in that: The characteristic period amplitude threshold D of the ultrasonic binary gas sensor is calculated according to the digital sampling information D1. τ1 The method is as follows: the ultrasonic signal received by the receiving end transducer of the ultrasonic binary gas sensor is equivalent to a first-order system, and the vibration amplitude corresponding to the ultrasonic signal generated by the first excitation pulse at the time constant τ is calculated as the characteristic period amplitude threshold of the ultrasonic binary gas sensor: Among them, N1 represents the period of ultrasound, D max1 is the maximum value of the digital sampling information D1, D B1 =3× is 3 times the noise standard deviation, is the average value of the first m groups of sampling data, D 1i is the i-th group of sampling data.
7. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to claim 5 or 6, 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 sequence number and sampling value of the maximum value in the characteristic period sampling data and the k sampling points before the maximum value and the j sampling points after the maximum value are fitted with a second-order function according to the least squares method to obtain the second-order function D(p) of the peak value of the settlement characteristic period; the characteristic period peak value D is obtained according to the second-order function maximum value calculation formula pmax ; According to the sampling sequence number and sampling value of the previous period of the characteristic period, the 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 characteristic period amplitude threshold D th1 .
8. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to claim 7, characterized in that: According to the sound speed calculation formula, the sound speed 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.
9. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to any one of claims 2, 3, 5, 6, and 8, characterized in that: The implementation method of step three is: Step 1) The ultrasonic binary gas sensor emits ultrasonic waves by stimulating the ultrasonic transducer at the transmitting end 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 greater than the characteristic periodic threshold D th The first cycle of the ultrasonic wave is obtained by a timing chip or an algorithm, etc., from the time when the ultrasonic wave transducer at the transmitting end is stimulated to the time when the ultrasonic wave transducer at the receiving end receives and samples the first cycle. The ultrasonic wave flight time ToF and the sound speed c are calculated according to the flight time compensation value formula. Step 3) The constant pressure specific heat capacity C of the target gas is known Pa , constant volume specific heat capacity C Va and molar mass M a , another mixed gas constant pressure specific heat capacity C Pb , constant volume specific heat capacity C Vb and the molar mass is M b , and the gas constant R; according to the calculation formula of the adiabatic coefficient of the mixed gas and the calculation formula of the speed of sound, a quadratic equation about the concentration is derived, and the quadratic equation is solved to calculate the target gas concentration C.
10. The method for automatically extracting feature vectors for ultrasonic binary gas sensors according to claim 9, characterized in that: The ultrasonic flight time ToF and the sound speed c are respectively: ToF=t+t offset Where L is the distance between the ultrasonic transmitting end and the receiving end of the ultrasonic binary gas sensor, t offset is the flight time compensation value; The method for solving the quadratic equation to calculate the concentration C is: Construct a quadratic equation: M diff =(M a -M b ) C Pdiff =(C Pa -C Pb ) C Vdiff =(C Va -C Vb ) Where k is the specific heat ratio of the binary gas mixture, M diff is the molar mass difference between the target gas and another mixed gas, C Pdiff is the constant pressure specific heat difference between the target gas and another mixed gas, C Vdiff is the constant volume specific heat capacity difference between the target gas and another mixed gas; Solve the quadratic equation for concentration and calculate the concentrations x1 and x2, and X2=M diff C Vdiff Among them, X0, X1, and X2 are intermediate variables; The specific heat capacity is obtained according to the calculation formula of the average specific heat capacity ratio of the mixed gas. The average molar mass is obtained according to the average molar mass calculation formula of the mixed gas According to the average molar mass of the binary mixed gas being between the molar masses Ma and Mb of the two gases, the target gas concentration C is screened and obtained.
Citation Information
Patent Citations
Threshold value self-adaptive adjustment method and ultrasonic metering device self-adaptive metering method
CN114923531A
Anti-fault wave detection device for gas ultrasonic flowmeter
CN109579950A
Wave error prevention method for ultrasonic flowmeter and ultrasonic flowmeter
CN114739469A
Ultrasonic echo measurement device suitable for pulsed high-intensity magnetic field
CN115876888A
Transit time peak shifting prevention detection method for ultrasonic flow velocity measurement
CN116500297A