A Method of Full-Range Gas Concentration Detection Based on Multi-Frequency Ultrasonic Cross-Cycle Phase Difference Measurement

Ultrasonic technology is widely used in the field of gas detection due to its advantages of low power consumption, high speed and strong adaptability to the environment. The current ultrasonic time-of-flight (TOF) measurement method has the large measurement error caused by ringing effect, and the phase detection method can only detect the phase change within $2\pi $ of a single cycle. These problems cannot meet the requirements of certain high concentration gas detection. This paper proposes a method of multi-frequency ultrasonic phase difference measurement to solve the problem that the phase difference across multiple cycles cannot be detected, hereby realizing full range gas concentration detection, and the continuous wave detection of this method also eliminates ringing effect in TOF. The phase difference within $2\pi $ of a single period is obtained by loading a single frequency driving signal on two channels, and the phase difference of low-frequency envelope of the modulated signal is obtained by loading multi-frequency modulated signals. The total cross-cycle phase difference can be obtained by combining the two results, and the measured gas concentration can be obtained by the relationship model between gas concentration and phase difference. The experimental results show that the average absolute error of 4% hydrogen concentration measurement is 0.12%, and the relative error of 99% hydrogen measurement is less than 5%. This method also provides a solution for extracting cross-cycle phase difference in other fields.


I. INTRODUCTION
Quantitative determination of specific gas components in a given background environment has important applications in many fields, such as detection of CO 2 and N 2 O in environmental monitoring [1], [2], leakage detection of dangerous gas H 2 S and CL 2 [3], [4], natural gas detection in production field [5], [6]. At present, the online detection methods of gas concentration mainly include optical, chemical, catalytic and acoustic methods. Among them, the optical method has high detection accuracy, but it requires higher environmental conditions and system is expensive. The chemical detector has good sensitivity to low concentration gas, but its service life is short. The catalytic detector is widely popular because The associate editor coordinating the review of this manuscript and approving it for publication was Anton Kos . of high accuracy, insensitive to temperature and humidity, and low cost, but its application is limited by its slow reaction speed, high-power consumption, and easy poisoning at high concentration [7]- [10].
Compared with the above detection technologies, the acoustic sensor based on ultrasonic technology has unique advantages, such as low cost, low-power consumption, long service life, and good environmental adaptability [11]. This type of sensor has no zero offset, and can complete data acquisition within one millisecond for its fast working speed [12]. These characteristics make the acoustic gas detection technology get attention and have special applications in many industries. Many literatures have introduced the application of acoustic gas sensor. Reference [13] shows, an ultrasonic measurement system can realize the gas concentration measurement accuracy of 0.05% in H 2 and H e , 0.1% in CO 2 .
Reference [14] and [15] show, ultrasonic can be applied to hydrogen detection and this method can theoretically realize the measurement of hydrogen concentration as low as 100ppm. Reference [16] shows, ultrasonic technology was applied to measurement of C 3 F 8 vapor concentration which demonstrated that the concentration of C 3 F 8 refrigerant leaking into nitrogen is less than 0.05% in 18 months. Because the reaction speed of other gas detection methods cannot meet the requirements of the task, ultrasonic technology is applied to real-time sampling of concentration of human respiratory gas to analyze many diseases in human respiratory process quickly and timely [17]. Reference [18] shows that the application of ultrasonic technology to X e was studied. X e is used as anesthetic gas in many countries, but the inert gas cannot be detected by conventional electrochemical or infrared methods, so using ultrasound is an ideal detection method.
The gas measurement methods in the above literature are all based on the measurement on the time-of-flight (TOF) of ultrasonic wave to obtain the gas concentration [19], [20]. Because the speed of acoustic wave in different gases is different, for example, the sound speed in pure air is nearly four times of that in air, it is completely feasible to realize the concentration detection by measuring the speed of ultrasonic wave in the measured gas [21]. TOF compares the received and extracted ultrasonic signal with the set threshold, and takes the rising edge of the detected signal as the arrival time of the ultrasonic signal [22]. We can also extract the envelope of the received ultrasonic signal through signal processing methods such as Hilbert transform, wavelet transform, short-time Fourier transform, and then set the arrival time to the time when the received signal reaches the maximum value or a certain value, so as to calculate the flight time of ultrasound in the measurement channel. In addition, we can calculate the cross-correlation function between the ultrasonic transmitted signal and the received signal, where the peak value of the cross-correlation function is the flight time of the ultrasonic signal [23].
However, there are some problems in TOF measurement. One is that the measurement accuracy of this method is limited by the blanking zone in practical application. The principle of ultrasonic technology is to use the resonance frequency of piezoelectric ceramics to generate vibration transmission [24]. Since the received signal always contains the echo signal generated by ringing effect, which leads to the formation of blanking area, the received signal cannot be accurately evaluated in this area [25], [26]. The other is that there will be energy attenuation during ultrasonic transmission. When the acoustic transmission distance is too long or the acoustic attenuation of the measured gas is too large, the sampling error of the received signal will increase. Therefore this method is not suitable for the measured gas with high concentration [27], [28].
Compared with TOF, the phase measurement method has the advantages of higher detection accuracy and lower power consumption, and has been widely used in other fields, such as temperature measurement, distance measurement, wind speed measurement, displacement measurement, and so on [29], [30]. The principle of this method is to measure the phase difference between the signals received by ultrasonic and a fixed signal to reflect the change of sound speed. Because the ultrasonic speed changes with the gas concentration, the received signal will have a phase shift. Therefore, the phase difference between the received signal and the fixed signal will change, which is a function of the gas concentration. Because the signal needs to be detected is phase relationship, and the received signal is continuous wave, there is no ringing effect and receiving signal blanking zone. Therefore, the phase difference measurement method will have higher measurement accuracy compared to TOF. Because the signal strength does not need to be detected, the measurement accuracy will not be affected, even if the output signal has a large attenuation, and there is no need to provide high-power excitation signal.
Reference [31] shows, the phase difference measurement method of ultrasonic is used to measure the wind speed, and the maximum error is less than 0.3m/s under the condition of 15m/s wind speed. Reference [32] shows, the improved ultrasonic phase measurement method is used to measure the low-speed air flow velocity. Under the experimental conditions, the average absolute error is 0.0542m/s, and sensitivity is higher than that of many current commercial products. Reference [33] shows, phase measurement technology is used to obtain the core temperature of the workpiece metal, and the maximum resolution can reach 0.1 • C. Reference [34] shows, the improved phase measurement method is used to realize the design of high accuracy air-coupled reflective ultrasonic rangefinder. The experimental results show that the 3σ accuracy of short distance (< 100mm) and long distance (100-300 mm) is 71.1 µm and 1.82mm respectively. Reference [35] shows, the absolute thickness of borosilicate glass is measured by ultrasonic phase measurement. The average error is 0.04 µm, and the standard deviation is 1.35 µm, which is close to 1.06 µm uncertainty of calibration micrometer.
Although the phase difference measurement method has many advantages, it is relatively less used in the field of gas concentration measurement because the phase ambiguity will occur if the change of sound speed exceeds a full wavelength, that is, the phase detection can only detect the phase difference within 2π of a single cycle of two received signals [36], [37]. When the change of gas concentration leads to a large change of ultrasonic speed, it will cause the phase difference to increase. When the phase difference is greater than 2π , there will be a cross-cycle phenomenon of phase difference. At this time, using the existing phase difference detection methods will have a large error. Therefore, this method is only suitable for the measurement of small variation, which limits the application in the field of gas detection. Meanwhile, the application of phase measurement in gas concentration measurement poses a great challenge to the optimization of the system structure. The structure of ultrasonic gas detection requires a measurement cavity. In the measurement process, the waveguide will have a superimposed effect on the ultrasonic signal transmission, and the second and multiple signal reflection between the transmitter and receiver of the transducer will cause interference phase shift of the received signal.
Through the analysis of the above-mentioned problems, a full-range gas concentration detection method based on multi-frequency ultrasonic cross-cycle phase difference measurement is proposed. It addresses the fact that gas concentration detection is achieved through low power consumption. The phase difference detection technology is used to improve the detection accuracy of gas concentration. The accurate extraction of cross-cycle phase difference in the ultrasonic phase detection technology is realized. Phase difference detection technology is used for high concentration gas detection.
The main contributions of this paper are as follows: 1. According to the prior acoustic theory, an accurate relationship model between ultrasonic phase difference and gas concentration is established, which provides a theoretical basis for gas concentration measurement based on phase difference method.
2. For the first time, a dual-channel multi-frequency driving method is proposed to extract the total inter-cycle phase difference of ultrasonic waves, which solves the problem that the ultrasonic phase difference cannot be detected when phase difference was greater than 2π , and a full range detection from low concentration to high concentration of gas is realized based on the phase difference technology.
3. The method proposed in this paper can achieve low power consumption and high-accuracy gas concentration detection. Through experimental analysis, power consumption of the system during continuous operation is 25mW. The average absolute error of 4% hydrogen concentration measurement is 0.12%, and the relative error of high-concentration hydrogen measurement is less than 5%. The minimum detectable hydrogen concentration is 40ppm. The power consumption is lower than other gas detection methods.

II. ALGORITHM DESCRIPTION
As shown in Fig. 1, the method architecture framework proposed in this paper mainly includes three parts: multi-frequency driving signal modulation, ultrasonic dual channel data transmission, and acquisition and processing of the received signal.
1. Based on the dual channel structure, the phase difference of the signal is obtained and the system temperature compensation is realized to a certain extent. The gas to be measured is in the measurement channel, and background air is in the closed reference channel. Different gases in the two channels determine different ultrasonic velocities, which are reflected as phase difference between the two received signals at the receiving end, and the phase difference is related to the measured gas concentration. The ambient temperature will affect the ultrasonic speed, but the temperature changes of the two channels are the same, so the influence of the temperature on the signal phase difference will be weakened to a certain extent.
2. Based on the single high frequency excitation signal, the fine phase difference within 2π of a single period is extracted. The signal driving unit loads a same single high-frequency signal f at two input ends, and we can obtain the phase difference between two output signals at the output end. The total phase difference is ϕ = 2nπ + ϕ , where n is the number of cycles of total phase difference. ϕ is the fine phase difference within 2π of a single period that can be VOLUME 9, 2021 detected by the signal acquisition and processing unit, which reflects the fine concentration of the measured gas within a certain concentration range 3. Based on the dual-frequency modulation excitation signal, the number of cycles n of total phase difference is calculated. The signal driving unit loads two signals with small frequency shift from the original single high frequency signal f, which are f + f and f − f respectively, and performs differential frequency modulation, then sends them into two channels. After detection and processing by the signal acquisition and processing unit, the phase difference of the modulated low-frequency envelope signal is obtained. Based on the phase difference of low-frequency envelope signal, the number of cycles n of total phase difference can be obtained.
4. The gas concentration is calculated based on the relationship model between phase difference and gas concentration. The total phase difference ϕ of single high frequency signal can be obtained by combining the phase difference ϕ within 2π of a single period with the number of cycles n of total phase difference obtained by dual frequency. The measured gas concentration can be obtained by the algorithm model of gas concentration corresponding to the phase difference.

III. RELATIONSHIP MODEL BETWEEN GAS CONCENTRATION AND PHASE DIFFERENCE A. RELATIONSHIP BETWEEN GAS CONCENTRATION AND SOUND VELOCITY
Ultrasonic wave has definite speed in different gas. The formula of ultrasonic velocity in gas under normal pressure is as follows [21]: where R is the universal gas constant, and T is the absolute temperature of the environment. M is the molar molecular weight of the gas to be measured, and γ is the specific heat capacity ratio of the gas. Therefore, if the molecular weight and specific heat capacity ratio of the gas can be determined, the ultrasonic transmission speed can be obtained. When the air is mixed with the measured gas, M and γ in the ultrasonic velocity formula can be considered as the weighted average value of the mixed gas. Therefore, if the concentration u of the measured gas is determined, the molecular weight and specific heat capacity ratio of the mixed gas are determined, and the sound velocity is modified as follows: where u is the measured gas concentration, M 1 is the molecular weight of background air, M 2 is the molar molecular weight of the measured gas, γ 1 is the specific heat capacity ratio of air, γ 2 is the specific heat capacity ratio of the measured gas. Then the relationship between sound speed and gas concentration can be written as follows: where C air is the velocity of ultrasonic wave in air at temperature T. Table 1 shows the corresponding table of molecular weight and specific heat capacity ratio of hydrogen, methane and argon [38]. The molecular weight of hydrogen is quite different from that of air, so the concentration of hydrogen as the measured gas will have a great impact on the sound speed. The molecular weight difference between air and methane or argon is small, so the influence of methane or argon concentration on sound velocity should be relatively small. The specific heat capacity ratio of hydrogen is almost equal to that of the air, so the specific heat ratio of hydrogen has little effect on the sound velocity. The difference of the specific heat ratio between air and methane or argon is slightly larger, so the specific heat ratio of these two gases has a certain effect on the sound velocity.   2 shows the relationship between ultrasonic speed and gas concentration of hydrogen, methane and argon obtained by MATLAB simulation. The solid line is the corresponding relationship considering the change of specific heat capacity ratio, and the dotted line is the curve not considering the change of specific heat capacity ratio of the gas to be measured.
It can be seen that the difference between the molecular weight of hydrogen and that of air is the largest, which leads to the most significant change of sound speed when hydrogen is mixed in the air. With the increase of hydrogen concentration, the relationship between ultrasonic sound speed and gas concentration is approximately exponential. When the hydrogen concentration reaches 100%, the sound speed can approach 1400m/s which is four times of the sound speed in the air. Because the difference of the molecular weight of between air and methane or argon is small, the sound velocity changes slowly with the increase of the concentration of methane or argon, and the gas concentration is approximately linear with the sound velocity. Therefore, the resolution of hydrogen concentration measured by ultrasonic technology will be higher than that of methane and argon. It can be seen from the three gas curves that the specific heat capacity ratio has little effect on the gas sound.

B. RELATIONSHIP BETWEEN GAS CONCENTRATION AND ULTRASONIC PHASE DIFFERENCE
Define the measured gas concentration is u, the ultrasonic speed in gas to be measured is C u , the sound path between the measurement channel and the reference channel is L. The time of the ultrasonic wave to travel in the measurement channel is t 1 , and the time of the air in the reference channel to be t 2 , then, t 1 = L C u , t 2 = L C air , and the time difference of ultrasonic waves in two channels is T: Then, the relationship between the gas concentration u and the time difference T in two channels can be obtained. 16 (m/s), T is the absolute temperature of the environment.
We can get the corresponding phase difference ϕ of two received signals from the time difference T of ultrasonic transmission of two channels. Then, ϕ = 2π f T, f is the ultrasonic frequency, u can be obtained as follows: The measured gas concentration can be obtained by the total phase difference ϕ between dual channel and the ambient temperature T. Fig.3 shows the corresponding relationship between ultrasonic phase difference and different concentrations of hydrogen, methane, and argon at 23 • C. It can be seen that at a fixed temperature, different gas has its own corresponding relationship curve between concentration and phase difference. We can calculate the gas concentration by phase difference. Taking the hydrogen curve shown in Fig.3 as an example, when the total phase difference between the two channels is 40rad, the measured hydrogen concentration is 85.54%.

C. ANALYSIS OF ULTRASONIC CROSS-CYCLE PHASE DIFFERENCE
If the single high frequency ultrasonic oscillation signal loaded on the input end is sin2π ft, the response signal x = Asin2π f (t + t) can be obtained at the output end of the measurement channel after t, and the response signal x = A sin2π f t + t can be obtained at the output end of the reference channel after t . A and A are the signal amplitudes of the receiving end and the reference end respectively. The total phase difference between the two channels is ϕ = 2π f t − t . When t − t > n f (n = 1, 2, . . . .), there is a situation of ϕ = 2nπ + ϕ , ϕ is the phase difference in a single period.
At this time, the cross-cycle phase difference between the two channels will occur, and the number of cycles is n. If the measured sound path is 0.1m, the ambient temperature is 23 • , the sound speed in the reference channel is 344m/s, the relationship between the total phase difference and the sound speed of the two channels is shown in Fig. 4. It can be seen that if the ultrasonic flight speed in the measured gas reaches 376.4m/s, the cross-cycle phenomenon of phase difference begins to appear. If the measured gas is high concentration FIGURE 4. Relationship between total phase difference and the speed of sound at 23 • C. VOLUME 9, 2021 hydrogen, and the ultrasonic flight speed reaches 1200m/s, the total phase difference is greater than 16π , and the total cycles number of phase difference is 8.

IV. PHASE DIFFERENCE EXTRACTION A. EXTRACTION OF PHASE DIFFERENCE IN 2π OF SINGLE PERIOD BY SINGLE HIGH FREQUENCY
If the same single excitation signal sin2πft is loaded at two input ends of the dual channel, the received signal at two output ends has a detectable phase difference ϕ within 2π of single period. Many different methods have been proposed for phase difference measurement, including pulse width counting, discrete Fourier transform (DFT), digital correlation, Hilbert transform, least square method and so on [39]- [41]. For the 40KHz ultrasonic signal, the pulse width counting method can meet the accuracy requirements. The output signals of two channels are converted into pulse signals through zero crossing comparison. The pulse width of the phase difference between the two channel continuous pulse signals can be determined by counting. The relationship between the measured phase difference and the number of counting is as follows: where c n is the number of counting, f 0 is the counting frequency, f is the ultrasonic signal frequency.

B. EXTRACTION OF CROSS-CYCLE TOTAL PHASE DIFFERENCE BY DUAL-FREQUENCY MODULATED SIGNALS
When ϕ > 2π , the cross-cycle phase difference occurs. When we load two signals with small frequency shift from the original single high frequency signal as the modulated input signal, the phase difference of the low-frequency envelope signal of the modulated signal can be obtained. The total cross-cycle phase difference can be obtained by means of combining the phase difference of the low-frequency envelope signal with the phase difference of the original single high frequency signal. The algorithm flowchart is shown in Fig. 5. We load two signals, sin2π (f + f) t and sin2π (f − f) t, where f is the small frequency shift from signal f( f f), then the difference between the two signals We load the signal difference as input signal into the measurement channel and the reference channel. When the length of measurement channel is L, the output signal Z can be obtained in the measurement channel.
After transformation, Z can be obtained as follows: The equation indicates that the received ultrasonic signal can be regarded as cos2π f (t − t) modulated by sin2π f (t − t), and sin2π f (t − t) is the envelope function of cos2π f (t − t), where A is the amplitude of the received signal.
Let Z and sin2π ft enter the multiplier to get the output signal Y: Since sin2π f t is constant, after filtering out the high frequency component, we can get the output Y .
Y is the signal of low frequency envelope, which is obtained at the output end of measurement channel after detection by multiplier, whose amplitude is Asin2π f t. Similarly, another signal Y of low frequency envelope is obtained at the output end of the reference channel, whose amplitude is Discuss the influence of sin2π f t and sin2πf t on the phase difference of envelope function as follows.
1. When both sin2πf t and sin2π f t are not zero, the amplitudes of Y and Y can be measured.
If both sin2πf t and sin2π f t are positive constants or negative constants, the phase difference between Y and Y is the same as that between the two low-frequency envelope signals sin2π f (t − t) and sin2π f t − t . If sin2π f t and sin2π f t are two constants in the opposite direction, one of Y and Y will be a new signal obtained by 180 • phase shift and amplitude modulation of the original low frequency envelope signal. This phase shift will lead to errors in calculating the phase difference of low frequency envelope signals.
Take the square value of Y to obtain the new function signal X.
After low frequency components are filtered by high pass filter, we can get X In the same way, a new signal is obtained by taking the square value of Y and through high pass filtering.
Both X and X are the new signals obtained from the original low-frequency envelope signal after frequency doubling, phase shifting 180 • and amplitude modulation. The phase difference between X and X is φ Refer to (9) and (11), the high frequency component of the output signal is cos2π f (t − t), so there is total phase difference ϕ of the high frequency between two channel, and ϕ is also the phase difference of original single high frequency excitation signal.
Refer to (17) and (18), we can get the relationship between ϕ and φ 2. When sin2π f t or sin2π f t is zero, the amplitudes of Y and Y cannot be measured.
In this case, let Z and the cos2πft enter the multiplier, then after filtering the high-frequency components, the amplitudes of signal Y and Y become Acos2π f t and Acos2π f t , that is After squaring Y and Y , and filtering the low frequency components, two new signals X and X are obtained, and phase difference between X and X is still 4π f t − t , so the total phase difference ϕ is not changed.

C. TOTAL PHASE DIFFERENCE CORRECTION
Refer to equation (18), although the total phase difference ϕ of single high frequency signal can be calculated from the phase difference φ of low-frequency envelope signal, the phase difference error of low-frequency envelope signal will increase the total phase difference ϕ error. In order to improve the detection accuracy of the system and reduce the total phase difference error, the total phase difference can be corrected by calculating the number of circles of cross-cycle phase difference and combining with the phase difference in a single period 2π of single high frequency signal. The effectiveness of this method is also verified by subsequent experiments.
If the total phase difference calculated by low frequency envelope signal is ϕ, the phase difference in a single period 2π of single high frequency signal is ϕ , and the number of cycles of cross-cycle phase difference is n, then where n is the approximate integer, and Int[ ] is the integer operation, then the final total phase difference is corrected to θ:

D. SIMULATION VERIFICATION OF THE PROPOSED METHOD
In the following simulation process, 0.1m sound path was used as the measurement channel for verification analysis. Fig.6 shows the output signal at two outputs when 40KHz single high frequency sinusoidal signal was used as ultrasonic driving signal of dual channel. The ambient temperature is set at 23 • C, and the speed of ultrasonic signal in the air of reference channel is 344m/s. When the ultrasonic speed in the measured gas is set to 700m/s, there is a phase difference between the received signals of two channels, and the phase difference cross some cycles. However, only the phase difference within 2π of a single period can be observed in Fig.6, and number of cycles n of cross-cycle phase difference cannot be identified. After selecting 41KHz and 39KHz signals and performing differential frequency processing, the modulated signal is sent to the two channels as the input signal, and we get the two output signals waveform in Fig.7. The red curve is the output signal of the measurement channel, and the blue curve is the output signal of the reference channel. The output signal is a 40KHz cosine curve with 1KHz frequency sinusoidal envelope. The phase difference of single high frequency 40 KHz signal is 40 times of that of 1KHz low frequency envelope signal.

FIGURE 7.
Output signals with low-frequency envelope from dual-frequency modulation signal as an input. VOLUME 9, 2021 When the phase difference of 1KHz low-frequency envelope signal is obtained, the total phase difference of 40KHz signal at two channel outputs can be measured. In order to get the low frequency envelope phase difference, it is necessary to extract the envelope curve function by detection technology. After the two output signals( in Fig.7) were multiplied with 40KHz sinusoidal signal to realize phase detection, we get the signals shown in Fig.8. The red curve is the output signal extracted from measurement channel. The blue curve is the output signal extracted from the reference channel. Although there are still high-frequency components in the waveform, the envelope curve signal can be extracted by filtering out the high-frequency components. The signal waveform in Fig. 9 is the final output signal waveform after the envelope signal is squared to a positive value and the high-frequency component is filtered out. There is only a clean and complete low-frequency curve, which is derived from the detection and processing of the original low-frequency envelope signal. The total phase difference of the single high frequency signal can be obtained according to the phase difference of the two low-frequency signals.   10 shows the relationships between the phase difference extracted by single high frequency signal and that of the low-frequency signal obtained by detecting and processing dual-frequency modulation signal. The single frequency of high frequency signal is 40KHz. When ultrasonic velocity is 700m/s, sound path 0.1m, the phase difference of single high frequency signal spans 5 cycles, but the detectable phase difference is only 5.529rad. The frequency of the lowfrequency signal obtained by dual-frequency modulation signal is 2KHz, and the detectable phase difference is 1.847rad. Fig.10 shows that the phase difference of the single high frequency signal is 20 times of the phase difference of the low frequency signal, which is equal to that calculated by equation (18). Therefore, through the phase difference of the low-frequency signal, the total phase difference of the single high frequency signal can be calculated to be 36.945rad, which is equal to that of the single high frequency signal calculated by equation (18) and (22). According to the total phase difference, we can calculate the gas concentration.

V. EXPERIMENTAL RESULTS AND ANALYSIS A. THE PHYSICAL DIAGRAM OF THE EXPERIMENTAL SYSTEM
The ultrasonic phase difference gas concentration detection system was built for the experiment. The signal driving unit outputs 40.5Khz and 39.5Khz signals and sends the difference of the two signals to the ultrasonic measurement channel and the reference channel, and the output signal is sent to the signal processing unit for detection processing. We can obtain the phase difference of the two channel low-frequency envelope signals of difference frequency. The 40KHz signal is output by the signal driving unit and sent to the ultrasonic dual channel again. We can detect the phase difference ϕ in single period 2π of the single high frequency in the two channels after the output signal is sent to the signal processing unit. The total phase difference is calculated by combining the two phase differences φ and ϕ , and the measured gas concentration is calculated and the output result is output. The 32MHz working frequency is used in detection of the phase difference.
The physical diagram of the experimental system is shown in Fig.11. The system consists of two channels in the same path, namely the measurement channel and the reference channel. The same ultrasonic driving signal is loaded on the input terminals of two channels.
In the two channels, it is closed air in the reference channel and the gas to be measured in the other measurement channel. The ultrasonic transmitting probe and receiving probe are closely attached to both ends of the channel. The measuring cavity has an air inlet and air outlets. When the measured gas is injected from the air inlet of the measuring cavity, the original gas in the channel is evacuated from the air outlets at the same time. The two channel cavities are close to each other to ensure the same temperature, so as to reduce the system experimental error caused by temperature. The length of the two cavities is 0.1m, and the cavity is made of brass tube to ensure the uniform temperature transmission of the system. The air inlet is made of a thin copper tube, which is easy to be connected with the air supply pipe. The air outlet is composed of transparent pores. The data cable of the ultrasonic receiving probe is sent back to the input end inside the cavities, and connected to the signal acquisition board, so as to ensure the regularity of the online work of the system.
Hydrogen, methane and argon were used as the tested gases to verify the method. Hydrogen and methane are flammable  and explosive gases, which have high demand in industry and mining. Argon is an inert gas, and many gas detection methods are ineffective for argon. Hydrogen is the gas with the smallest molecular weight and the fastest sound speed. The sound speed in methane is slightly higher than that in air, and the sound speed in argon is slightly lower than that in air, so as to verify the unity of the system for different gases. 99.99% of the measured gas and background air are sent into the gas bag respectively. The measured gas comes from Wuhan New Reed Trading Co., Ltd., and the gas concentration meets the national standard of China.
The gas concentration is adjusted by the syringe, and the measured gas and background air are fully mixed in the gas bag to keep uniform and stable. The measured gas with adjusted concentration is sent into the measuring cavity through the air inlet of the measuring channel. The injection time lasts for 10s, so as to ensure that the original gas in the measuring cavity is fully evacuated from the air outlet. In order to verify the effectiveness of this method for the detection of ultrasonic cross-cycle phase difference of high concentration gas, the gas concentrations of 1%, 2%, 4%, 8%, 10%, 20%, 30%, up to 100% were selected as the experimental gas concentrations.
The signal driving unit generates three frequency signals of 40 KHz, 40.5 KHz and 39.5 KHz, in which the 40.5 KHz and 39.5 KHz signals are sent to the ultrasonic transmitting probe as differential frequency drive signals, and 40KHz signal are sent to the ultrasonic transmitting probe as single frequency drive signal. The differential frequency drive signals and single frequency drive signal work alternately. Because the speed of sound is greatly affected by temperature, the experiment was carried out in a constant temperature box with the temperature set at 23 • C in order to verify the accuracy of gas concentration measurement at a fixed temperature. Fig.12 shows the relationship between the total phase difference measured in each gas concentration experiment and the ideal phase difference of ultrasonic. The results show that in the low concentration hydrogen range with concentration less than 10%, the measured phase difference is almost consistent with the ideal phase difference, which indicates that the method described in this paper has high accuracy for the detection of low concentration hydrogen.

B. EXPERIMENTAL RESULTS
When the hydrogen concentration is more than 40%, the total phase difference begins to deviate from the ideal curve, and the measurement accuracy of high concentration hydrogen system decreases. For methane and argon, the total phase difference of the two gases at high concentration is FIGURE 12. Comparison between ideal phase difference and measured phase difference of ultrasonic under different gas concentrations. VOLUME 9, 2021 far less than that of hydrogen at the same concentration. The total phase difference of ultrasonic in methane can cross two cycles at most, and the phase difference can cross one cycle in argon when the concentration of argon reaches 100%, so the measurement deviation of total phase difference of methane and argon is less than that of hydrogen at the same gas concentration. However, the ultrasonic velocity in the two gases is much lower than that in hydrogen, so the measurement accuracy is lower than that in hydrogen. Subsequent experiments show that the absolute error of methane and argon is significantly greater than that of hydrogen under the same concentration.   13 shows the detection results of the number of cycles n of cross-cycle ultrasonic phase difference and the measured gas concentration. It can be seen from the figure that when the measured hydrogen concentration is 20%, the total phase difference is detected to cross one cycle. When the hydrogen concentration is 100%, the total phase difference is detected to cross seven cycles. Because the sound velocity in methane is slightly higher than that in air, the total phase difference is detected to cross two cycles at most. Because the difference between the sound velocity in argon and that in air is smaller, the phase difference changes smaller with the increase of concentration. When the concentration of argon is 100%, the total phase difference is detected to cross one cycle. If the measurement path is increased, the detection accuracy of low concentration gas will be improved, and more cross-cycle phenomenon will appear.
According to the comparison with the real value, the number of cycles of cross-cycle phase difference obtained by our method is accurate, and it cannot be obtained from the traditional single period phase difference detection of single frequency. The above measurement process accurately reflects the effectiveness of the method in this paper.

C. EXPERIMENTAL DATA COMPARISON 1) COMPARISON OF THE MEASURABLE CONCENTRATION RANGE WITH TRADITIONAL SINGLE HIGH FREQUENCY METHODS
During the experiment, when the hydrogen concentration is 20%, the methane concentration is 50%, and the argon concentration is 100%, the multi-frequency phase difference detection method described in this paper can extract the entire cross-cycle phase difference, and the traditional single frequency method cannot work effectively anymore. According to the experimental results, the average absolute error of hydrogen concentration at 4% is 0.12%, and the average absolute error at concentration of 90% is 4.2%. When the methane concentration is 4%, the average absolute error is 0.16%, and when the concentration is 90%, the average absolute error is 5.8%. The average absolute error of argon concentration at 4% is 0.21%, and the average absolute error at 90% concentration is 6.7%. The results of the three gases prove the effectiveness of the multi-frequency phase difference method, and the results fully meet the requirements of high-precision gas concentration detection

2) COMPARISON OF CONCENTRATION MEASUREMENT ACCURACY WITH TOF
In this experiment, the central oscillation frequency of ultrasonic wave is 40KHz, the oscillation period is 25 µs, and the working frequency of the processor is 32MHz. The phase difference is measured by oversampling technology to obtain the average value of multiple measurements. A phase difference of 0.001rad can be detected. The resolution of 40ppm for Hydrogen, 80ppm for methane and 140ppm for argon can be achieved at low concentrations. For high concentration gas, although the received signal intensity is greatly reduced due to acoustic attenuation, the amplitude intensity has little effect on phase difference detection. Due to the use of dual channel measurement, the system has a better compensation effect on the temperature.
Since the ultrasonic TOF method needs to detect the amplitude strength of the received signal, the signal is easy to be affected by environmental interference thereby increasing the detection error. In order to ensure the detection accuracy, the detection threshold must be improved. The attenuation of the received signal will be severe with the increase of gas concentration. Individual vibration signal may be submerged in the noise during the process of receiving ultrasonic oscillation signal. If 40KHz is still used as the driving signal, detection error of one or more oscillation periods of 25µs may occur. The error is equivalent to 10% hydrogen concentration and 35% methane concentration, which is intolerable. In order to compare with the method described in this paper, we have conducted experiments on gas concentration measurement by ultrasonic TOF method. In order to increase the accuracy of high concentration measurement of the system, we have increased the ultrasonic transmitting power, increased the input voltage from 5V to 50V, increased the driving signal frequency to 320KHz, and increased the sampling frequency to 100MHz. The overall power consumption of the system has increased by 10 times. Fig. 14 shows the error comparison curves of different methods. The experimental results show that the multi-frequency phase difference method can accurately measure various concentrations of three gases under the condition of temperature 23 • and sound path 0.1m.
When the hydrogen concentration is less than 4%, the relative error obtained by multi-frequency phase difference method is less than 3%. When the hydrogen concentration is 90%, the relative error is less than 5%. When the concentration is less than 4%, the relative error of methane measurement is less than 4%, and when the concentration is 90%, the relative error is less than 6.5%. Below 4% concentration, the relative error of argon is less than 5.3%, and at 90% concentration, the relative error of argon is less than 7.5%.
By TOF measurement method, the relative error is less than 5% at low concentration of hydrogen, and the maximum relative error is 23% at high concentration. The maximum relative error is less than 7% at low concentration of methane, and the maximum relative error is 24% at high concentration. The relative error is less than 10% at low concentration of argon, the maximum relative error is 27% at high concentration. The experimental results show that the detection accuracy of TOF measurement method in high and low concentration gas is lower than that of multi-frequency phase difference method. Especially in high concentration gas, TOF measurement method cannot accurately detect the concentration of the measured gas due to the large error.
Although the detection error of multi-frequency phase difference method increases in the high concentration measured gas, the detection results still meet the requirements of high-accuracy gas concentration detection requirements. If the detection accuracy of low concentration gas is required to be further improved, the sound path length of the measurement channel can be appropriately increased, but the long distance of the measurement channel will cause the weakness of the received signal due to the gas attenuation. Therefore, in the future work, the appropriate sound path length of the measurement channel can be determined according to different measured gases. For example, a longer measurement channel can be selected for low concentration gas measurement or gas detection with small ultrasonic speed difference from air. While a shorter measurement channel can be selected for high concentration gas detection or gas detection with larger ultrasonic speed difference from air.

3) COMPARISON OF SYSTEM POWER CONSUMPTION
The experimental system in this paper works in continuous wave mode, the working voltage is 5V, the working current of the detection unit is 3mA, the total working current of the system is 5mA, and the system power is 25mW. According to the power consumption characteristics of the system, it can be powered by battery. If 20A·H DC power supply is used, the system can work continuously for 160 days under uninterrupted condition, and can work more than 5 years under intermittent mode. Because of low power consumption, small system volume and no preheating, the system is suitable for portable or wireless sensor system. In TOF method, the instantaneous pulse driving voltage of the transducer is 50V and the average power consumption is 250mW. For other types of sensors, such as catalytic gas sensor, the working current is more than 120mA under 5V working voltage, the power consumption is 600mW, and the preheating time is 120-600s. For infrared optical gas measurement sensor, the working current is about 80mA, the power consumption is 400mW, and the preheating time is 90-120s. The specific comparison parameters are shown in Table 2.

VI. CONCLUSION
This paper introduces a method of multi-frequency ultrasonic to achieve the detection of cross-cycle phase difference, which solves the detection problem of various gas concentrations. We propose a method of using multi-frequency driving signal as ultrasonic input signal. The phase difference of the low-frequency envelope signal is extracted through the detection technology, and then the total cross-cycle phase difference of the high-frequency ultrasonic is extracted, and finally the measured gas concentration is calculated according to the total phase difference.
The method solves the problem that the traditional singlefrequency ultrasonic phase detection method can only detect the phase difference within 2π of an ultrasonic oscillation period. It provides a solution for gas detection with large changes in concentration and high concentration. It also provides a solution to the problem of cross-cycle phase difference extraction in other areas. The experimental results show that the multi-frequency phase difference method can accurately measure concentrations of various gas.
When the concentration of measured gases is 100%, the average absolute error of hydrogen measurement is less than 5.5%, the average absolute error of methane measurement is less than 7%, and the average absolute error of argon measurement is less than 8%. The results of three gases prove the effectiveness of the multi-frequency phase difference method, and meet the requirements of high accuracy gas concentration detection. The power consumption of the experimental system is about 25mW, which has the advantage of low power consumption.