A heterofrequency dual-channel ultrasonic gas metering module and channel switching adaptive method

Through the heterofrequency dual ultrasonic gas metering module and channel switching adaptive method, the problem of difficult transducer status judging the ultrasonic gas meter under complex working conditions is solved, and higher metering accuracy and anti-interference ability are achieved. Reduces power consumption and simplifies fault maintenance.

CN118913386BActive Publication Date: 2024-12-27杭州先锋电子技术股份有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411402363.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2024-12-27
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

Ultrasonic gas meter cannot effectively judge the transducer status under complex operating conditions, resulting in noise and electromagnetic interference affecting the metering accuracy, resulting in measurement deviations and inconvenient maintenance.

Method used

Design a heterofrequency dual-channel ultrasonic gas metering module, adopting a microcontrol unit, a timing unit, a storage unit, an ultrasonic excitation module, a signal acquisition unit and a communication unit, and determine the threshold value through two pairs of ultrasonic transducers with different working frequencies and noise. , realize channel switching adaptability, select the most suitable working channel for flow measurement, and alarm in case of electromagnetic interference.

Benefits of technology

Improves measurement accuracy and anti-interference capability, reduces power consumption, and provides support for troubleshooting and maintenance, ensuring measurement accuracy under different operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118913386B_ABST
    Figure CN118913386B_ABST
Patent Text Reader

Abstract

The present invention relates to a hetero-frequency dual-path ultrasonic gas metering module and a channel switching adaptive method. Two pairs of ultrasonic transducers with different working frequencies are arranged on the flow path through which the fluid is to pass, and the two transducers of each pair of transducer groups mutually transmit and receive to form a channel, and the two pairs of ultrasonic transducers work independently to form the dual channels of the module; the signal acquisition unit adopts a voltage comparator and / or ADC, which can meet the measurement accuracy under different working conditions, especially when there is co-frequency interference or electromagnetic interference; the signal acquisition scheme formed by the voltage comparator and the ADC in parallel further reduces the power consumption under the premise of improving the time measurement accuracy; because the ADC sampling is to obtain an approximate value through step-by-step voltage estimation comparison, the power consumption is large and the response time is long; and the acquisition time accuracy of the voltage comparator is higher than that of the ADC, and the output result of the voltage comparator can be used to predict the starting point of the flight time when the next ADC starts sampling, which can greatly reduce the power consumption of the measurement process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of gas metering using ultrasound, and in particular to a hetero-frequency dual-path ultrasonic gas metering module and a channel switching adaptive method. Background Art

[0002] In the past two years, ultrasonic gas meters based on the time difference method have been increasingly used in the urban gas metering market. As the core metering sensor of the ultrasonic meter, the transducer does not effectively judge the sensor status in the gas application scenario. Once a sensor failure occurs, it will immediately affect the normal metering of the product. For example, the pipeline environment where the gas meter is installed may produce howling or vibration due to the passage of airflow, causing the ultrasonic transducer to vibrate and cause noise; for example, electromagnetic interference will affect the sampling measurement accuracy of the ADC, causing noise to superimpose on the gas metering signal, causing deviations in the measurement results, resulting in undercounting (or abnormally large numbers) or even no counting, and this problem will persist for a period of time until the meter abnormality is discovered on site or the background software issues an abnormal data alarm, and the meter replacement is initiated. The losses and disputes generated during this period bring great inconvenience to gas companies and end users. Summary of the invention

[0003] In view of the problem that the current ultrasonic gas meter cannot effectively judge the transducer status under complex working conditions, the present invention proposes a technical solution of a hetero-frequency dual-channel ultrasonic gas metering module and a channel switching adaptive method.

[0004] The hetero-frequency dual-path ultrasonic gas metering module is characterized by comprising a microcontroller unit, a timing unit, a storage unit, an ultrasonic excitation module, a signal acquisition unit, a communication unit, and two pairs of ultrasonic transducers with different working frequencies arranged in the flow channel, the two pairs of ultrasonic transducers with different working frequencies are arranged in the flow channel through which the fluid is to pass, the two transducers of each pair of transducer groups transmit and receive to each other to form a sound channel, and the two pairs of ultrasonic transducers work independently to form a dual sound channel of the module; the signal acquisition unit adopts a voltage comparator and / or an analog-to-digital converter ADC;

[0005] Timing unit: used to trigger and manage timing tasks and measure the propagation time of ultrasonic signals between a pair of transducers;

[0006] Storage unit: used to store laboratory experience noise voltage judgment threshold, laboratory experience acquisition time threshold, laboratory experience flight time group number;

[0007] Ultrasonic excitation module: gives driving voltage to the ultrasonic transducer according to the instruction of the microcontroller unit, so that the ultrasonic transducer is forced to vibrate;

[0008] Signal acquisition unit: open two channels to monitor the voltage output of two pairs of ultrasonic transducers respectively, convert the voltage signal output by the ultrasonic transducer into a digital signal, and transmit it to the micro control unit;

[0009] Microcontrol unit: compares the voltage data or time data obtained by the signal acquisition unit and the timing unit with the threshold value set by the storage unit, determines whether a certain channel has noise or working condition changes, selects the working channel that is most suitable for flow measurement under the current working condition, sends channel excitation instructions to the ultrasonic excitation module and counts, thereby realizing the switching of the working channel; in the case that the dual channels are not excited but electromagnetic interference occurs, the communication unit will alarm the background;

[0010] Communication unit: Communicates with the background according to the requirements of the microcontroller unit, and alarms and notifies the background when electromagnetic interference occurs in both channels without being stimulated, so that the background can send personnel to the site for repair.

[0011] The hetero-frequency dual-path ultrasonic gas metering module is characterized in that the signal acquisition unit adopts an acquisition unit group in which a voltage comparator and an analog-to-digital converter ADC are connected in parallel.

[0012] The channel switching adaptive method of the hetero-frequency dual-channel ultrasonic gas metering module is characterized in that: when the signal acquisition unit adopts a voltage comparator, the working steps are as follows:

[0013] The S101 voltage comparator has a preset laboratory experience noise voltage judgment threshold U ref1 To compare whether there is noise, the storage unit pre-sets the time period T during which the voltage comparator collects the dual-channel signal in the initial no-excitation state. z ;

[0014] In the initial state S102, the microcontroller does not send an excitation instruction to the ultrasonic excitation module, and the voltage comparator determines whether there is noise interference;

[0015] S103 voltage comparator starts to collect dual-channel signal according to the requirement of micro control unit for the duration T z and continuously output the results to the microcontroller unit;

[0016] S104 The micro control unit compares and selects a channel according to the noise determination result output by the voltage comparator;

[0017] S104.1 If neither of the two channels collects voltage signals or the voltage value collected by one channel is less than U ref1 , the voltage comparator determines that there is no noise at present, and the microcontroller sends an instruction to the timing unit and the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and the corresponding channel starts the flow measurement as the working channel, and executes step S105;

[0018] S104.2 If the transducer voltage value collected from a certain channel is greater than U ref1 , the voltage comparator determines that the current channel has noise, and the microcontroller instructs the ultrasonic excitation module to excite the transducer group of another channel, thereby determining the initial working channel and starting the flow measurement work, and executing step S105;

[0019] S104.3 If the transducer voltage values ​​collected from both channels are greater than U ref1 ,The voltage comparator determines that both channels have noise, and the microcontroller determines that the working environment has electromagnetic interference and notifies the background through the communication unit to send someone for repair;

[0020] S105 The micro control unit calculates the most recent window period time according to the gas meter working window period algorithm, and executes step S103 when the time reaches the window period time.

[0021] The channel switching adaptive method of the hetero-frequency dual-channel ultrasonic gas metering module is characterized in that: when the signal acquisition unit adopts an analog-to-digital converter ADC, the working steps are as follows:

[0022] S201 The storage unit presets the laboratory experience noise voltage judgment B threshold U ref2 It is used to compare whether noise occurs, and N is preset as the number of flight time groups experienced in the laboratory, which is used to determine the sampling time interval;

[0023] In the starting state S202, the microcontroller unit sends a collection instruction to the ADC without sending an excitation instruction to the ultrasonic excitation module, and the ADC collects the voltage signal of the dual-channel ultrasonic transducer and feeds it back to the microcontroller unit;

[0024] S203 ADC starts to collect the voltage signal of the dual-channel ultrasonic transducer according to the requirement of the micro control unit and feeds back to the micro control unit;

[0025] S204 microcontroller unit performs noise determination and channel selection based on ADC feedback voltage;

[0026] S204.1 If the ADC does not collect the voltage signal of the dual-channel ultrasonic transducer, or collects the voltage of the dual-channel ultrasonic transducer and feeds it back to the microcontroller unit, the microcontroller unit finds that the voltage signal is less than U ref2 , the microcontroller unit determines that the dual-channel ultrasonic transducer has no noise; during one measurement period, if both dual-channel ultrasonic transducers have no noise, the microcontroller unit instructs the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and the corresponding channel of the low-frequency ultrasonic transducer serves as the working channel to start flow measurement, and executes step S205;

[0027] S204.2 ADC collects the voltage signal in any channel and feeds it back to the microcontroller unit, which continuously compares the voltage signal with the preset U ref2 For comparison, during one measurement, when any channel voltage signal is greater than U ref2 When the voltage signal is not collected or the collected voltage signal is less than U ref2 The transducer of the sound channel is excited, and the sound channel starts flow measurement as the working sound channel, and executes step S205;

[0028] S204.3 If the voltage signals of the transducers of the two channels collected by ADC are both greater than U ref2 , the microcontroller unit determines that there is electromagnetic interference in the working environment, and sends an alarm to the backend through the communication unit, so that the backend can send someone to repair it;

[0029] S205 After the N groups of flight time measurements are completed, the microcontroller unit requires the ADC to sample the dual channels simultaneously, and the results are fed back to the microcontroller unit;

[0030] S206 microcontroller unit performs noise determination and channel selection based on the data collected from each channel;

[0031] S206.1 If the ADC voltage sampling result signals of both channels are less than the set noise B threshold U ref2 , it is determined that the gas flow window period is in progress and there is no noise, the working sound channel remains unchanged and the flow measurement work continues, and step S205 is executed;

[0032] S206.2 If the ADC voltage sampling result U of the working channel z Greater than the set B threshold U ref2 , the ADC sampling result of the auxiliary channel U z 'Less than the set B threshold U ref2 The microcontroller unit performs Fourier transform based on the collected voltage and the time recording parameters of the timing unit. F [f(t)]=F(ω), where f(t) is the time domain function and ω is the frequency. The single frequency is identified as the working frequency f of the ultrasonic transducer in the working channel. z , the microcontroller unit determines that the working channel is in working state and has no noise interference; the working channel remains unchanged and continues to perform flow measurement, and executes step S205;

[0033] S206.3 If the ADC voltage sampling result of the working channel U z Greater than the set B threshold U ref2 , the ADC sampling result of the auxiliary channel U z ' is also greater than the set B threshold U ref2,The microcontroller unit performs Fourier transform based on the collected voltage and the time record of the timing unit to identify the signal frequency of each of the two channels;

[0034] S206.31 If the frequency identified from the working channel is only the working frequency f of the ultrasonic transducer of the working channel z , the microcontroller unit determines that there is no noise interference in the working channel, and there is noise interference of the same frequency in the auxiliary channel, and the working channel remains unchanged and continues to perform flow measurement, and executes step S205;

[0035] S206.32 If the frequency identified from the working channel is other than the working frequency of the ultrasonic transducer of the working channel f z , and the noise frequency ω z , and the auxiliary channel also recognizes the same z If the frequency is close to that of the two channels, the microcontroller unit determines that there is electromagnetic interference in the two channels, calculates the signal-to-noise ratio of the two-channel signal based on the collected data, selects a channel with a high signal-to-noise ratio as the working channel for flow measurement, and filters the signal collection result of the working channel for accurate measurement, and executes step S205;

[0036] S206.4 If the ADC voltage sampling result of the working channel U z Less than the set B threshold U ref2 , the ADC sampling result of the auxiliary channel U z 'Greater than the set noise B threshold U ref2 The micro control unit determines that there is co-frequency noise interference in the auxiliary channel, and there is no noise interference in the working channel; the working channel remains unchanged and the flow measurement work continues, and step S205 is executed.

[0037] The channel switching adaptive method of the hetero-frequency dual-channel ultrasonic gas metering module is characterized in that: when the signal acquisition unit adopts an acquisition unit group in which a voltage comparator and an analog-to-digital converter ADC are connected in parallel, the working steps are as follows:

[0038] The S301 voltage comparator has a preset laboratory experience noise voltage judgment C threshold U ref3 To compare whether there is noise, the storage unit pre-sets the time period T during which the voltage comparator collects the dual-channel signal in the initial no-excitation state. z , the storage unit pre-sets M as the number of laboratory experience flight time groups, which is used to determine the sampling time interval;

[0039] S302 is the starting state, in which the microcontroller sends a collection instruction to the voltage comparator without sending an excitation instruction to the ultrasonic excitation module, and the voltage comparator determines whether there is interference;

[0040] S303 The voltage comparator starts to collect the dual-channel signal according to the microcontroller unit's request for the duration T z and continuously output the results to the microcontroller unit;

[0041] S304 The micro control unit selects a channel according to the noise comparison result output by the voltage comparator;

[0042] S304.1 If the voltage comparator dual channel does not collect the ultrasonic transducer voltage signal or the collected voltage values ​​are both less than U ref3 , the voltage comparator determines that there is no noise, the micro control unit instructs the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and its corresponding channel is used as the working channel to start flow measurement, and execute step S305;

[0043] S304.2 If the voltage comparator collects the ultrasonic transducer voltage value of any channel greater than U ref3 , the voltage comparator determines that there is interference in the channel, and the micro control unit further determines that there is co-frequency noise interference in the channel; the micro control unit instructs the ultrasonic excitation module to excite the transducer group of another channel, thereby determining the initial working channel and starting the flow measurement work, and executing step S305;

[0044] S304.3 If the voltage comparator detects that the voltage of the ultrasonic transducers of both channels is greater than U ref3 , the voltage comparator determines that there is noise interference in both channels; the microcontroller instructs the ADC to collect the dual-channel signals for Fourier transform F [f(t)]=F(ω), where f(t) is the time domain function and ω is the frequency, identifying the signal frequency ω common to both channels z , it is determined that there is electromagnetic interference of this frequency at this time; the micro control unit sends an alarm to the background through the communication unit, so that the background can send people to repair;

[0045] S305 After the flight time measurement of group M is completed, considering that the ADC may have entered the dormant state during the gas flow window period, in order to monitor the noise and reduce energy consumption, the microcontroller instructs the voltage comparator to collect the dual channels and perform voltage comparison;

[0046] S306 The voltage comparator feeds back the comparison result to the micro control unit, and the micro control unit performs noise comparison and selects a channel according to its output result;

[0047] S306.1 If the voltage comparator does not collect voltage signals in the dual channels or the voltage values ​​collected from the ultrasonic transducers are both less than U ref3 , the voltage comparator determines that there is no noise interference, and the micro control unit further determines that the current is a gas flow window period, the working channel remains unchanged and continues to measure the flow, and executes step S307;

[0048] S306.2 If the voltage comparator collects the ultrasonic transducer voltage value U of the auxiliary channel z '> U ref3 , the voltage value of the working channel is U z < U ref3 , the voltage comparator determines that there is noise interference in the auxiliary channel, and the micro control unit further determines that there is same-frequency noise interference in the auxiliary channel, and the current is the gas flow window period; the working channel remains unchanged and continues to measure the flow, and executes step S307;

[0049] S306.3 If the voltage comparator collects the ultrasonic transducer voltage value U of the working channel z > U ref3 , the voltage value of the auxiliary channel is U z '>U ref3 , the voltage comparator determines that there is noise interference in both channels, and the microcontroller instructs the ADC to collect the dual-channel signal and perform Fourier transform on the sampled value. F [f(t)]=F(ω), identifying the frequency characteristics of the two channels;

[0050] S306.31 If the frequency identified from the working channel is only the working frequency f of the ultrasonic transducer of the working channel z , the auxiliary channel identifies the noise frequency ω z , the microcontroller unit determines that there is no noise interference in the working channel, and there is noise interference of the same frequency in the auxiliary channel, and the working channel remains unchanged and continues to perform flow measurement, and executes step S307;

[0051] S306.32 If the frequency identified from the working channel is other than the working frequency f z , and the noise frequency ω z , and the auxiliary channel also recognizes the same z If the frequency is close to that of the two channels, the microcontroller unit determines that there is electromagnetic interference in the two channels, calculates the signal-to-noise ratio of the two-channel signal according to the existing technology based on the collected data, selects a channel with a high signal-to-noise ratio as the working channel for flow measurement, and filters the signal collection result of the working channel for accurate measurement, and executes step S307;

[0052] S306.4 If the voltage value U of the working channel is collected z > U ref3 , the voltage value of the auxiliary channel is U z '< U ref3 , the voltage comparator determines that there is noise interference in the working channel and no noise interference in the auxiliary channel. The microcontroller instructs the ADC to collect the working channel signal for Fourier transform. F [f(t)]=F(ω), identify its signal frequency characteristics;

[0053] S306.41 If the frequency identified from the working channel is only the working frequency f z , the microcontroller unit determines that there is no noise interference in both the working channel and the auxiliary channel, and the flow measurement is continued without changing the working channel, and step S307 is executed;

[0054] S306.42 If the frequency identified from the working channel is other than the working frequency f z , there is also a noise frequency ω z , the microcontroller unit determines that there is co-frequency noise interference in the working channel, and instructs the ultrasonic excitation module to excite the auxiliary channel transducer group, so that the auxiliary channel becomes the new working channel and starts flow measurement, and executes step S307;

[0055] S307 Since the acquisition time accuracy of the voltage comparator is higher than that of the ADC, in order to improve the timing accuracy and reduce power consumption, after the microcontroller obtains the working channel ultrasonic transducer voltage signal collected by the voltage comparator, after determining that the working channel has no noise interference or can filter out the noise interference and continue to work, the time point of the voltage comparator output signal obtained by the timing unit is used as the starting point of the flight time for predicting the next ADC to start sampling to calculate the propagation time difference And calculate the flow rate, and execute step S305.

[0056] The channel switching adaptive method of the heterofrequency dual-channel ultrasonic gas metering module is characterized in that: the laboratory experience threshold value pre-stored in the storage unit or the signal acquisition unit is extracted from the test data of the metering instrument for hundreds of thousands of times in the laboratory, including but not limited to temperature, pressure, transducer acquisition voltage, noise amplitude, flight time, and gas sound speed. The optimal threshold value under a certain simulated standard working condition is obtained by using the minimum mean square error as the optimal criterion through the Wiener filter, and a matrix table of multiple working conditions is formed and stored in the micro control unit; when the micro control unit receives the working condition data measured by various sensors of the instrument, the optimal threshold value is selected by looking up the table for later comparison and judgment.

[0057] Compared with the prior art, the present invention has the following advantages:

[0058] 1) The product is installed once and can meet the measurement accuracy under different working conditions, especially when there is co-frequency interference or electromagnetic interference. The present invention collects the noise signals of the two channels based on a variety of signal collection schemes, thereby judging the difference in the degree of interference of the ultrasonic transducer, and selecting the flow channel with the least noise interference as the working channel, thereby improving the anti-interference ability of the system. This judgment method not only improves the accuracy of measurement, but also provides strong support for troubleshooting and daily maintenance.

[0059] 2) The signal acquisition scheme formed by the voltage comparator and ADC in parallel in the present invention further reduces power consumption while improving time measurement accuracy. Since ADC sampling obtains approximate values ​​through step-by-step voltage estimation and comparison, it consumes a lot of power and has a long response time. The acquisition time accuracy of the voltage comparator is higher than that of the ADC. Therefore, the output result of the voltage comparator can be used to predict the starting point of the flight time for the next ADC sampling, which can greatly reduce the power consumption of the measurement process. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a logic block diagram of the heterofrequency dual-path ultrasonic gas metering module of the present invention;

[0061] Figure 2 It is a flow chart of the channel switching adaptive method when the signal acquisition unit of the present invention is a voltage comparator;

[0062] Figure 3 It is a flow chart of the channel switching adaptive method when the signal acquisition unit of the present invention is an analog-to-digital converter ADC;

[0063] Figure 4 The signal acquisition unit of the present invention is a flow chart of the channel switching adaptive method when the acquisition unit group is a voltage comparator and an analog-to-digital converter ADC connected in parallel;

[0064] In the figure: 1- micro control unit, 2- signal acquisition unit, 3- storage unit, 4- timing unit, 5- ultrasonic excitation module, 6- working channel ultrasonic transducer group, 7- auxiliary channel ultrasonic transducer group, 8- communication unit. DETAILED DESCRIPTION

[0065] The present invention will be further described below in conjunction with the accompanying drawings:

[0066] In view of the problem that the current ultrasonic gas meter cannot effectively judge the status of the sensor (ultrasonic transducer) under complex working conditions, the present invention proposes a hetero-frequency dual-channel ultrasonic gas metering module solution and an adaptive method for switching the working channel based on noise judgment.

[0067] A hetero-frequency dual-channel ultrasonic gas metering module includes a microcontroller unit 1, a timing unit 4, a storage unit 3, an ultrasonic excitation module 5, a signal acquisition unit 2, a communication unit 8, and two pairs of ultrasonic transducers with different working frequencies arranged in a flow channel (i.e., a working channel ultrasonic transducer group 6 and an auxiliary channel ultrasonic transducer group 7). The two pairs of ultrasonic transducers with different working frequencies are arranged in the flow channel through which the fluid is to pass, each of which sends and receives ultrasonic signals. The two transducers of each pair of transducer groups send and receive signals to each other to form a channel, and the two pairs of ultrasonic transducers work independently to form a dual channel of the module. The signal acquisition unit of the present invention can be used in three different ways, namely, using a voltage comparator, using an analog-to-digital converter ADC, and using a signal acquisition unit combination formed by connecting a voltage comparator and an analog-to-digital converter ADC in parallel.

[0068] Timing unit 4: used for triggering and managing timing tasks and measuring the propagation time of ultrasonic signals between a pair of transducers.

[0069] Storage unit 3: used to store laboratory experience noise voltage judgment threshold, laboratory experience acquisition time threshold, laboratory experience flight time group number.

[0070] Ultrasonic excitation module 5: provides driving voltage to the ultrasonic transducer according to the instruction of the microcontroller unit, so that the ultrasonic transducer is forced to vibrate.

[0071] Signal acquisition unit 2: Open two channels to monitor the voltage output of two pairs of ultrasonic transducers respectively, convert the voltage signal output by the ultrasonic transducer into a digital signal, and transmit it to the micro control unit 1.

[0072] Microcontrol unit 1: compares the voltage data or time data obtained by signal acquisition unit 2 and timing unit 4 with the threshold value set by storage unit, determines whether noise or working condition change occurs in a certain channel, selects the working channel most suitable for flow measurement under the current working condition according to the method of the present invention, sends channel excitation instruction to ultrasonic excitation module 5 and starts timing, so as to realize the switching of working channel; when dual channels are not excited but electromagnetic interference occurs, alarms are sent to the background through communication unit 8.

[0073] Communication unit 8: communicates with the background according to the requirements of the micro control unit 1, and alarms and notifies the background when the dual channels are not excited but electromagnetic interference occurs, so that the background can send people to the site for repair.

[0074] Here’s how it works:

[0075] As the core metering sensor of ultrasonic meters, ultrasonic transducers are easily interfered by noise caused by various reasons in gas application scenarios, resulting in abnormal situations such as signal superposition, making it impossible to accurately measure the flight time.

[0076] According to the propagation characteristics of ultrasonic waves in the flow channel, the propagation time under forward and reverse flow is expressed as follows (refer to patent CN106461437B extended range ADC flowmeter):

[0077] in, t up is the downstream flight time of the transducer group (e.g. ultrasonic transducer A transmits, ultrasonic transducer B receives), t down is the countercurrent flight time (e.g. ultrasonic transducer B transmits, ultrasonic transducer A receives), L is the distance between the ultrasonic transducer groups, C is the speed of sound, v is the fluid velocity, is the installation angle of the transducer; the propagation time difference is obtained from the downstream and upstream time , as follows:

[0078] Formula (1)

[0079] The angle and distance L is known, and the goal is to measure the fluid velocity v ; The sound velocity of the ultrasonic signal of the known fluid medium composition C is a known constant, then only the propagation time t up and propagation time t down The difference between the two; however, the speed of ultrasound passing through a fixed medium C It will change with temperature and is a function of temperature. At the same time, the speed of sound of ultrasonic waves passing through media with different components C will also change, so the speed of sound C It is variable; usually ultrasonic measurement requires measuring the flight time of a set of ultrasonic transducers sending and receiving signals. t up and t down , to eliminate C variability of fluid velocity v The specific calculation formula is as follows:

[0080] Formula (2)

[0081] It can be seen that the accuracy of flight time measurement is crucial to the measurement accuracy of flow. There are two types of noise that are easily induced in the current common working environment:

[0082] 1) The pipeline environment where the gas meter is installed may produce whistling or vibration due to the airflow passing through, which induces the ultrasonic transducer with a similar working frequency to vibrate (recorded as co-frequency interference noise in this scheme), and the signal obtained by the microcontroller unit instructing the ultrasonic excitation module to excite the ultrasonic transducer to vibrate is superimposed, which is extremely difficult to filter out;

[0083] 2) The electromagnetic waves of malicious interference from the outside world have strong penetration and are easy to cause electromagnetic interference to electronic devices. At the same time, the electromagnetic interference caused by the energy release of the metering circuit or communication circuit composed of many components on the metering circuit board will also cause noise signal superposition, etc., affecting the sampling measurement accuracy of the interference signal acquisition unit, causing deviations in the measurement results. The above two types of noise are recorded as electromagnetic interference noise in this scheme.

[0084] The above two reasons will cause the ultrasonic gas meter to produce undercounts (or abnormally large numbers) or even no counting, and this problem will persist for a period of time until the meter abnormality is discovered on site or the background software issues an abnormal data alarm, and then the meter replacement is initiated. The losses and disputes generated during this period bring great inconvenience to gas companies and end users.

[0085] Based on the oscillation characteristics of ultrasonic transducers at different working frequencies, the applicant designed a high- and low-frequency dual-channel metering module that can judge the working state of the ultrasonic transducer based on different signal acquisition results, thereby selecting the channel corresponding to the better ultrasonic transducer as the working channel to improve the metering accuracy. Considering the cost and metering accuracy level requirements, an adaptive method for switching the working channel based on noise judgment is designed under the operation of three different signal acquisition units.

[0086] It is particularly noteworthy that this solution uses two sets of ultrasonic transducers with different operating frequencies. Therefore, the same-frequency interference noise will only interfere with the signal acquisition of one channel under the same working conditions. If the working channel is interfered with by the same frequency at this time, the auxiliary channel can be converted into the working channel for excitation and flow measurement can be started without other noise interference.

[0087] When electromagnetic interference noise occurs, it will affect the signal acquisition of both channels. According to the difference in the operating frequency of the ultrasonic transducer, the superposition of electromagnetic interference noise and the working signals of different channels will produce different effects. Therefore, it is possible to consider measuring the frequency of electromagnetic interference noise through Fourier transform of the collected signal, select the channel with high signal-to-noise ratio obtained by ADC sampling as the working channel, and select a common filtering algorithm to filter the channel data with high signal-to-noise ratio to ensure the accuracy of the measurement results.

[0088] When the ultrasonic gas meter has just been installed and has not yet been ventilated, when the noise of the same frequency is collected without exciting the two pairs of ultrasonic transducers, it is determined that electromagnetic interference exists. At this time, in order to ensure accurate measurement, the microcontroller unit needs to directly notify the background through the communication unit to come for maintenance and eliminate hidden dangers on site.

[0089] At the current technological level, the frequency transducers used in this solution are preferably 200kHz and 500kHz to ensure stable transmission and reception of signals in different gas environments. The selection of these two frequencies is intended to maximize the performance of the transducer and adapt to the possible attenuation of the signal caused by various possible gas environments. With the continuous advancement and development of future manufacturing processes, transducers with more frequency combinations can also be explored and adopted to meet more extensive and complex application requirements.

[0090] Definitions and explanations of some parameters in the adaptive method:

[0091] 1) U ref The threshold value for the noise voltage determined by laboratory experience is:

[0092] Where A threshold U ref1 A laboratory empirical noise voltage judgment threshold stored in a voltage comparator representing a first method using a voltage comparator as a signal acquisition unit;

[0093] B threshold U ref2 A laboratory experience noise voltage judgment threshold stored in a storage unit representing a second method using an ADC as a signal acquisition unit;

[0094] C threshold U ref3 The laboratory empirical noise voltage judgment threshold stored in the voltage comparator represents the third method of using the voltage comparator in parallel with the ADC as the signal acquisition unit.

[0095] 2) T z Refers to the time period during which the voltage comparator collects dual-channel signals in the initial no-excitation state in the method.

[0096] 3) N and M are the number of laboratory experience flight time groups.

[0097] When the signal acquisition unit is ADC, after sampling the dual channels without exciting the two pairs of ultrasonic transducers and selecting the working channel, before the next channel determination begins, the number of measurement cycle groups of the working channel is N groups, with one pair of ultrasonic transducers flying upstream and downstream at a time.

[0098] When the signal acquisition unit is a combination of a voltage comparator and an ADC in parallel, after the two pairs of ultrasonic transducers are sampled without being excited and the dual channels are selected and the working channel is selected, before the next channel determination begins, the number of measurement cycle groups of the working channel is a group in which one pair of ultrasonic transducers flies upstream and downstream at a time, and the working channel needs to work in M ​​groups.

[0099] 4) U z is the voltage value of the ultrasonic transducer of the working channel collected by the signal acquisition unit, U z ' is the voltage value of the auxiliary channel ultrasonic transducer collected by the signal acquisition unit. Please note that the two are reference symbols, which does not mean that the values ​​appearing every time are the same, because the channel may switch and the working conditions may change.

[0100] 5) f z is the working frequency of the ultrasonic transducer in the working channel. Pay special attention to f z It is a reference symbol, and does not mean that the value is the same every time it appears, because the working channel may switch.

[0101] 6) ω z is the noise frequency found after Fourier transform of the collected signal of a certain channel. Pay special attention to ω z It is a reference symbol and does not mean that the value is the same every time it appears, because the operating conditions may change.

[0102] Example 1

[0103] When the signal acquisition unit is a voltage comparator, the steps of the channel switching adaptive method of the present invention are as follows:

[0104] The S101 voltage comparator has a preset laboratory experience noise voltage judgment threshold U ref1 To compare whether there is noise, the storage unit pre-sets the time period T during which the voltage comparator collects the dual-channel signal in the initial no-excitation state. z ;

[0105] In the initial state S102, the microcontroller does not send an excitation instruction to the ultrasonic excitation module, and the voltage comparator determines whether there is noise interference;

[0106] S103 voltage comparator starts to collect dual-channel signal according to the requirement of micro control unit for the duration T z And continuously output the results to the microcontroller unit:

[0107] S104 The micro control unit compares and selects a channel according to the noise determination result output by the voltage comparator;

[0108] S104.1 If the dual channels do not collect voltage signals or the voltage value collected by one channel is less than Uref1 , the voltage comparator determines that there is no noise at present, and the microcontroller sends an instruction to the timing unit and the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and the corresponding channel starts the flow measurement as the working channel, and executes step S105;

[0109] S104.2 If the transducer voltage value collected from a certain channel is greater than U ref1 , the voltage comparator determines that the current channel has noise, and the microcontroller instructs the ultrasonic excitation module to excite the transducer group of another channel, thereby determining the initial working channel and starting the flow measurement work, and executing step S105;

[0110] S104.3 If the transducer voltage values ​​collected from both channels are greater than U ref1 , the voltage comparator determines that both channels have noise, and the microcontroller unit determines that the working environment has electromagnetic interference and notifies the background through the communication unit to send someone for repair;

[0111] The S105 microcontroller unit calculates the most recent window period time according to the window period calculation method for a gas meter without gas flowing therethrough published in CN 202410676740.0, and executes step S103 when the time reaches the window period time.

[0112] Example 2

[0113] When the signal acquisition unit is an analog-to-digital converter (ADC), the steps of the channel switching adaptive method of the present invention are as follows:

[0114] S201 The storage unit presets the laboratory experience noise voltage judgment B threshold U ref2 It is used to compare whether noise occurs, and N is preset as the number of flight time groups experienced in the laboratory, which is used to determine the sampling time interval;

[0115] In the starting state S202, the microcontroller unit sends a collection instruction to the ADC without sending an excitation instruction to the ultrasonic excitation module, and the ADC collects the voltage signal of the dual-channel ultrasonic transducer and feeds it back to the microcontroller unit;

[0116] S203 ADC starts to collect the voltage signal of the dual-channel ultrasonic transducer according to the requirement of the micro control unit, and feeds back to the micro control unit;

[0117] S204 microcontroller unit performs noise determination and channel selection based on ADC feedback voltage;

[0118] S204.1 If the ADC does not collect the voltage signal of the dual-channel ultrasonic transducer, or collects the voltage of the dual-channel ultrasonic transducer and feeds it back to the microcontroller unit, the microcontroller unit finds that the voltage signal is less than U ref2, the microcontroller unit determines that the dual-channel ultrasonic transducer has no noise; during one measurement period, if both dual-channel ultrasonic transducers have no noise, the microcontroller unit instructs the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and the corresponding channel of the low-frequency ultrasonic transducer serves as the working channel to start flow measurement, and executes step S205;

[0119] S204.2 ADC collects voltage signals in any channel and feeds them back to the microcontroller unit, which continuously compares the voltage signal value with the preset U ref2 For comparison, during one measurement, when any channel meets the voltage signal greater than U ref2 When the voltage signal is not collected or the collected voltage value is less than U ref2 The transducer of the sound channel is excited, and the sound channel starts flow measurement as the working sound channel, and executes step S205;

[0120] S204.3 If the voltage signals of the transducers of the two channels collected by ADC are both greater than U ref2 , the microcontroller unit determines that there is electromagnetic interference in the working environment, and sends an alarm to the backend through the communication unit, so that the backend can send someone to repair it;

[0121] S205 After the N groups of flight time measurements are completed, the microcontroller unit requires the ADC to sample the dual channels simultaneously, and the results are fed back to the microcontroller unit;

[0122] S206 microcontroller unit performs noise determination and channel selection based on the data collected from each channel;

[0123] S206.1 If the ADC voltage sampling result signals of both channels are less than the set noise B threshold U ref2 , it is determined that the gas flow window period is in progress and there is no noise, the working sound channel remains unchanged and the flow measurement work continues, and step S205 is executed;

[0124] S206.2 If the ADC voltage sampling result U of the working channel z Greater than the set noise B threshold U ref2 , the ADC sampling result of the auxiliary channel U z ' is less than the set noise B threshold U ref2 The microcontroller unit performs Fourier transform based on the collected voltage and the time recording parameters of the timing unit. F [f(t)]=F(ω), where f(t) is the time domain function and ω is the frequency. The single frequency is identified as the working frequency f of the ultrasonic transducer in the working channel. z, the micro control unit determines that the working channel is in working condition and there is no noise interference; the working channel remains unchanged to continue the flow measurement work, and executes step S205;

[0125] S206.3 If the ADC voltage sampling result of the working channel U z Greater than the set B threshold U ref2 , the ADC sampling result of the auxiliary channel U z ' is also greater than the set B threshold U ref2 The microcontroller unit performs Fourier transform based on the collected voltage and the time record of the timing unit to identify the signal frequency of each of the two channels:

[0126] S206.31 If the frequency identified from the working channel is only the working frequency f of the ultrasonic transducer of the working channel z , the micro control unit determines that there is no noise interference in the working channel, the auxiliary channel appears the same frequency noise interference, the working channel remains unchanged to continue the flow measurement work, and executes step S205;

[0127] S206.32 If the frequency identified from the working channel is other than the working frequency of the ultrasonic transducer of the working channel f z , and the noise frequency ω z , and the auxiliary channel also recognizes the same z If the frequency is close, the microcontroller unit determines that there is electromagnetic interference in the dual-channel, and the microcontroller unit calculates the signal-to-noise ratio of the dual-channel signal according to the existing technology based on the collected data, selects a channel with a high signal-to-noise ratio as the working channel for flow measurement, and filters the signal collection result of the working channel for accurate measurement, and executes step S205;

[0128] S206.4 If the ADC voltage sampling result of the working channel U z Less than the set B threshold U ref2 , the ADC sampling result of the auxiliary channel U z 'Greater than the set B threshold U ref2 The micro control unit determines that there is co-frequency noise interference in the auxiliary channel, and there is no noise interference in the working channel; the working channel remains unchanged and the flow measurement work continues, and step S205 is executed.

[0129] Example 3

[0130] When the signal acquisition unit is an acquisition unit group in which a voltage comparator and an analog-to-digital converter (ADC) are connected in parallel, the steps of the channel switching adaptive method of the present invention are as follows:

[0131] The S301 voltage comparator has a preset laboratory experience noise voltage judgment C threshold U ref3To compare whether there is noise, the storage unit pre-sets the time period T during which the voltage comparator collects the dual-channel signal in the initial no-excitation state. z , the storage unit pre-sets M as the number of laboratory experience flight time groups, which is used to determine the sampling time interval;

[0132] S302 is the starting state, in which the microcontroller sends a collection instruction to the voltage comparator without sending an excitation instruction to the ultrasonic excitation module, and the voltage comparator determines whether there is interference;

[0133] S303 The voltage comparator starts to collect the dual-channel signal for a duration of T according to the microcontroller unit's request. z and continuously output the results to the microcontroller unit;

[0134] S304 The micro control unit selects a channel according to the noise comparison result output by the voltage comparator;

[0135] S304.1 If the voltage comparator dual channel does not collect the ultrasonic transducer voltage signal or the collected voltage values ​​are both less than U ref3 , the voltage comparator determines that there is no noise, the micro control unit instructs the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and its corresponding channel is used as the working channel to start flow measurement, and execute step S305;

[0136] S304.2 If the voltage comparator collects the ultrasonic transducer voltage value of any channel greater than U ref3 , the voltage comparator determines that there is interference in the channel, and the micro control unit further determines that there is co-frequency noise interference in the channel. The micro control unit instructs the ultrasonic excitation module to excite the transducer group of another channel, thereby determining the initial working channel and starting the flow measurement work, and executing step S305;

[0137] S304.3 If the voltage comparator detects that the voltage of the ultrasonic transducers of both channels is greater than U ref3 , the voltage comparator determines that there is noise interference in both channels; the microcontroller instructs the ADC to collect the dual-channel signals for Fourier transform F [f(t)]=F(ω), identify the signal frequency ω shared by both channels z , it is determined that there is electromagnetic interference of this frequency at this time; the micro control unit sends an alarm to the background through the communication unit, so that the background can send people to repair;

[0138] S305 After the flight time measurement of group M is completed, considering that the ADC may have entered the dormant state during the gas flow window period, in order to monitor the noise and reduce energy consumption, the microcontroller instructs the voltage comparator to collect the dual-channel sound and perform voltage comparison;

[0139] S306 The voltage comparator feeds back the comparison result to the microcontroller, and the microcontroller performs noise comparison and selects the sound channel according to its output result:

[0140] S306.1 If the voltage comparator does not collect voltage signals in the dual channels or the voltage values ​​collected from the ultrasonic transducers are both less than U ref3 , the voltage comparator determines that there is no noise interference, and the micro control unit further determines that the current is a gas flow window period, the working channel remains unchanged and continues to measure the flow, and executes step S307;

[0141] S306.2 If the voltage comparator collects the ultrasonic transducer voltage value U of the auxiliary channel z '> U ref3 , the voltage value of the working channel is U z < U ref3 , the voltage comparator determines that there is noise interference in the auxiliary channel, and the micro control unit further determines that there is same-frequency noise interference in the auxiliary channel, and the current is the gas flow window period; the working channel remains unchanged and continues to measure the flow, and executes step S307;

[0142] S306.3 If the voltage comparator collects the ultrasonic transducer voltage value U of the working channel z > U ref3 , the voltage value of the auxiliary channel is U z '>U ref3 , the voltage comparator determines that there is noise interference in both channels, and the microcontroller instructs the ADC to collect the dual-channel signal and perform Fourier transform on the sampled value. F [f(t)]=F(ω), identifying the frequency characteristics of the two channels:

[0143] S306.31 If the frequency identified from the working channel is only the working frequency f of the ultrasonic transducer of the working channel z , the auxiliary channel identifies the noise frequency ω z , the microcontroller unit determines that there is no noise interference in the working channel, and there is noise interference of the same frequency in the auxiliary channel, and the working channel remains unchanged and continues to perform flow measurement, and executes step S307;

[0144] S306.32 If the frequency identified from the working channel is other than the working frequency f z , and the noise frequency ω z , and the auxiliary channel also recognizes the same zIf the frequency is close to that of the two channels, the microcontroller unit determines that there is electromagnetic interference in the two channels, calculates the signal-to-noise ratio of the two-channel signal according to the existing technology based on the collected data, selects a channel with a high signal-to-noise ratio as the working channel for flow measurement, and filters the signal collection result of the working channel for accurate measurement, and executes step S307;

[0145] S306.4 If the voltage value U of the working channel is collected z > U ref3 , the voltage value of the auxiliary channel is U z '< U ref3 , the voltage comparator determines that there is noise interference in the working channel and no noise interference in the auxiliary channel. The microcontroller instructs the ADC to collect the working channel signal for Fourier transform. F [f(t)]=F(ω), identify its signal frequency characteristics;

[0146] S306.41 If the frequency identified from the working channel is only the working frequency f z , the microcontroller unit determines that there is no noise interference in both the working channel and the auxiliary channel, and the flow measurement is continued without changing the working channel, and step S307 is executed;

[0147] S306.42 If the frequency identified from the working channel is other than the working frequency f z , there is also a noise frequency ω z , the microcontroller unit determines that there is co-frequency noise interference in the working channel, and instructs the ultrasonic excitation module to excite the auxiliary channel transducer group, so that the auxiliary channel becomes the new working channel and starts flow measurement, and executes step S307;

[0148] S307 Since the acquisition time accuracy of the voltage comparator is higher than that of the ADC, in order to improve the timing accuracy and reduce power consumption, after the microcontroller obtains the working channel ultrasonic transducer voltage signal collected by the voltage comparator, after determining that the working channel has no noise interference or can filter out the noise interference and continue to work, the time point of the voltage comparator output signal obtained by the timing unit is used as the starting point of the flight time for predicting the next ADC to start sampling to calculate the propagation time difference And calculate the flow rate, and execute step S305.

[0149] In the above multiple schemes of the adaptive method for switching the sound channels of the hetero-frequency dual-channel ultrasonic gas metering module, the laboratory experience threshold value pre-stored in the storage unit or the signal acquisition unit is extracted from the test data of the metering instrument in the laboratory for hundreds of thousands of times, including but not limited to temperature, pressure, transducer acquisition voltage, noise amplitude, flight time, gas sound speed, etc., and filtered with a Wiener filter, with the minimum mean square error as the optimal criterion, to obtain the optimal threshold value under a certain simulated standard working condition, and form a matrix table of multiple working conditions and store it in the micro control unit. When the micro control unit receives the working condition data measured by various sensors of the instrument, it looks up the table to select the optimal threshold value for later comparison and judgment.

[0150] The specific examples described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific examples described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.

[0151] Although the terms such as ultrasonic wave, transducer, and time difference of upstream and downstream transmission are used more frequently in this article, the possibility of using other terms is not excluded. These terms are used only to more conveniently describe and explain the essence of the present invention. It is contrary to the spirit of the present invention to interpret them as any additional restrictions.

Claims

1. A dual-path ultrasonic gas metering module with different frequencies, characterized in that: It includes a microcontroller unit, a timing unit, a storage unit, an ultrasonic excitation module, a signal acquisition unit, a communication unit, and two pairs of ultrasonic transducers with different working frequencies arranged in the flow channel. The two pairs of ultrasonic transducers with different working frequencies are arranged in the flow channel through which the fluid is to pass. The two transducers of each pair of transducer groups transmit and receive to each other to form a sound channel. The two pairs of ultrasonic transducers work independently to form a dual-channel module. The signal acquisition unit uses a voltage comparator and / or an analog-to-digital converter ADC. Timing unit: used to trigger and manage timing tasks and measure the propagation time of ultrasonic signals between a pair of transducers; Storage unit: used to store laboratory experience noise voltage judgment threshold, laboratory experience acquisition time threshold, laboratory experience flight time group number; Ultrasonic excitation module: gives driving voltage to the ultrasonic transducer according to the instruction of the microcontroller unit, so that the ultrasonic transducer is forced to vibrate; Signal acquisition unit: open two channels to monitor the voltage output of two pairs of ultrasonic transducers respectively, convert the voltage signal output by the ultrasonic transducer into a digital signal, and transmit it to the micro control unit; Microcontrol unit: compares the voltage data or time data obtained by the signal acquisition unit and the timing unit with the threshold value set by the storage unit, determines whether a certain channel has noise or working condition changes, selects the working channel that is most suitable for flow measurement under the current working condition, sends channel excitation instructions to the ultrasonic excitation module and counts, thereby realizing the switching of the working channel; in the case that the dual channels are not excited but electromagnetic interference occurs, the communication unit will alarm the background; Communication unit: communicates with the background according to the requirements of the microcontroller unit, and alarms and notifies the background when electromagnetic interference occurs in both channels without being stimulated, so that the background can send personnel to the site for repair; When the signal acquisition unit uses a voltage comparator, the working steps are as follows: The S101 voltage comparator has a preset laboratory experience noise voltage judgment threshold U ref1 To compare whether there is noise, the storage unit pre-sets the time period T during which the voltage comparator collects the dual-channel signal in the initial no-excitation state. z ; In the initial state S102, the microcontroller does not send an excitation instruction to the ultrasonic excitation module, and the voltage comparator determines whether there is noise interference; S103 voltage comparator starts to collect dual-channel signal according to the requirement of micro control unit for the duration T z and continuously output the results to the microcontroller unit; S104 The micro control unit compares and selects a channel according to the noise determination result output by the voltage comparator; S104.1 If neither of the two channels collects voltage signals or the voltage value collected by one channel is less than U ref1 , the voltage comparator determines that there is no noise at present, and the microcontroller sends an instruction to the timing unit and the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and the corresponding channel starts the flow measurement as the working channel, and executes step S105; S104.2 If the transducer voltage value collected from a certain channel is greater than U ref1 , the voltage comparator determines that the current channel has noise, and the microcontroller instructs the ultrasonic excitation module to excite the transducer group of another channel, thereby determining the initial working channel and starting the flow measurement work, and executing step S105; S104.3 If the transducer voltage values ​​collected from both channels are greater than U ref1 ,The voltage comparator determines that both channels have noise, and the microcontroller determines that the working environment has electromagnetic interference and notifies the background through the communication unit to send someone for repair; S105 The micro control unit calculates the most recent window period time according to the gas meter working window period algorithm, and executes step S103 when the time reaches the window period time.

2. The hetero-frequency dual-path ultrasonic gas metering module according to claim 1 is characterized in that The signal acquisition unit adopts an acquisition unit group in which a voltage comparator and an analog-to-digital converter ADC are connected in parallel.

3. A channel switching adaptive method for the hetero-frequency dual-channel ultrasonic gas metering module according to claim 1, characterized in that: When the signal acquisition unit uses an analog-to-digital converter ADC, the working steps are as follows: S201 The storage unit presets the laboratory experience noise voltage judgment B threshold U ref2 It is used to compare whether noise occurs, and N is preset as the number of flight time groups experienced in the laboratory, which is used to determine the sampling time interval; In the starting state S202, the microcontroller unit sends a collection instruction to the ADC without sending an excitation instruction to the ultrasonic excitation module, and the ADC collects the voltage signal of the dual-channel ultrasonic transducer and feeds it back to the microcontroller unit; S203 ADC starts to collect the voltage signal of the dual-channel ultrasonic transducer according to the requirement of the micro control unit and feeds back to the micro control unit; S204 microcontroller unit performs noise determination and channel selection based on ADC feedback voltage; S204.1 If the ADC does not collect the voltage signal of the dual-channel ultrasonic transducer, or collects the voltage of the dual-channel ultrasonic transducer and feeds it back to the microcontroller unit, the microcontroller unit finds that the voltage signal is less than U ref2 , the microcontroller unit determines that the dual-channel ultrasonic transducer has no noise; during one measurement period, if both dual-channel ultrasonic transducers have no noise, the microcontroller unit instructs the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and the corresponding channel of the low-frequency ultrasonic transducer starts the flow measurement as the working channel, and executes step S205; S204.2 ADC collects the voltage signal in any channel and feeds it back to the microcontroller unit, which continuously compares the voltage signal with the preset U ref2 For comparison, during one measurement, when any channel voltage signal is greater than U ref2 When the voltage signal is not collected or the collected voltage signal is less than U ref2 The transducer of the sound channel is excited, and the sound channel starts flow measurement as the working sound channel, and executes step S205; S204.3 If the voltage signals of the transducers of the two channels collected by ADC are both greater than U ref2 , the microcontroller unit determines that there is electromagnetic interference in the working environment, and sends an alarm to the backend through the communication unit, so that the backend can send someone to repair it; S205 After the N groups of flight time measurements are completed, the microcontroller unit requires the ADC to sample the dual channels simultaneously, and the results are fed back to the microcontroller unit; S206 microcontroller unit performs noise determination and channel selection based on the data collected from each channel; S206.1 If the ADC voltage sampling result signals of both channels are less than the set noise B threshold U ref2 , it is determined that the gas flow window period is in progress and there is no noise, the working sound channel remains unchanged and the flow measurement work continues, and step S205 is executed; S206.2 If the ADC voltage sampling result U of the working channel z Greater than the set B threshold U ref2 , the ADC sampling result of the auxiliary channel U z 'Less than the set B threshold U ref2 The microcontroller unit performs Fourier transform based on the collected voltage and the time recording parameters of the timing unit. F [f(t)]=F(ω), where f(t) is the time domain function and ω is the frequency. The single frequency is identified as the working frequency f of the ultrasonic transducer in the working channel. z , the microcontroller unit determines that the working channel is in working state and has no noise interference; the working channel remains unchanged and continues to perform flow measurement, and executes step S205; S206.3 If the ADC voltage sampling result of the working channel U z Greater than the set B threshold U ref2 , the ADC sampling result of the auxiliary channel U z ' is also greater than the set B threshold U ref2 ,The microcontroller unit performs Fourier transform based on the collected voltage and the time record of the timing unit to identify the signal frequency of each of the two channels; S206.31 If the frequency identified from the working channel is only the working frequency f of the ultrasonic transducer of the working channel z , the microcontroller unit determines that there is no noise interference in the working channel, and there is noise interference of the same frequency in the auxiliary channel, and the working channel remains unchanged and continues to perform flow measurement, and executes step S205; S206.32 If the frequency identified from the working channel is other than the working frequency of the ultrasonic transducer of the working channel f z , and the noise frequency ω z , and the auxiliary channel also recognizes the same z If the frequency is close to that of the two channels, the microcontroller unit determines that there is electromagnetic interference in the two channels, calculates the signal-to-noise ratio of the two-channel signal based on the collected data, selects a channel with a high signal-to-noise ratio as the working channel for flow measurement, and filters the signal collection result of the working channel for accurate measurement, and executes step S205; S206.4 If the ADC voltage sampling result of the working channel U z Less than the set B threshold U ref2 , the ADC sampling result of the auxiliary channel U z 'Greater than the set noise B threshold U ref2 The micro control unit determines that there is co-frequency noise interference in the auxiliary channel, and there is no noise interference in the working channel; the working channel remains unchanged and the flow measurement work continues, and step S205 is executed.

4. A channel switching adaptive method for the hetero-frequency dual-channel ultrasonic gas metering module as claimed in claim 2, characterized in that: When the signal acquisition unit adopts an acquisition unit group in which a voltage comparator and an analog-to-digital converter ADC are connected in parallel, the working steps are as follows: The S301 voltage comparator has a preset laboratory experience noise voltage judgment C threshold U ref3 To compare whether there is noise, the storage unit pre-sets the time period T during which the voltage comparator collects the dual-channel signal in the initial no-excitation state. z , the storage unit pre-sets M as the number of laboratory experience flight time groups, which is used to determine the sampling time interval; S302 is the starting state, in which the microcontroller sends a collection instruction to the voltage comparator without sending an excitation instruction to the ultrasonic excitation module, and the voltage comparator determines whether there is interference; S303 The voltage comparator starts to collect the dual-channel signal according to the microcontroller unit's request for the duration T z and continuously output the results to the microcontroller unit; S304 The micro control unit selects a channel according to the noise comparison result output by the voltage comparator; S304.1 If the voltage comparator dual channel does not collect the ultrasonic transducer voltage signal or the collected voltage values ​​are both less than U ref3 , the voltage comparator determines that there is no noise, the micro control unit instructs the ultrasonic excitation module to excite the low-frequency ultrasonic transducer, and its corresponding channel is used as the working channel to start flow measurement, and execute step S305; S304.2 If the voltage comparator collects the ultrasonic transducer voltage value of any channel greater than U ref3 , the voltage comparator determines that there is interference in the channel, and the micro control unit further determines that there is co-frequency noise interference in the channel; the micro control unit instructs the ultrasonic excitation module to excite the transducer group of another channel, thereby determining the initial working channel and starting the flow measurement work, and executing step S305; S304.3 If the voltage comparator detects that the voltage of the ultrasonic transducers of both channels is greater than U ref3 , the voltage comparator determines that there is noise interference in both channels; the microcontroller instructs the ADC to collect the dual-channel signals for Fourier transform F [f(t)]=F(ω), where f(t) is the time domain function and ω is the frequency, identifying the signal frequency ω common to both channels z , it is determined that there is electromagnetic interference of this frequency at this time; the micro control unit sends an alarm to the background through the communication unit, so that the background can send people to repair; S305 After the flight time measurement of group M is completed, considering that the ADC may have entered the dormant state during the gas flow window period, in order to monitor the noise and reduce energy consumption, the microcontroller instructs the voltage comparator to collect the dual channels and perform voltage comparison; S306 The voltage comparator feeds back the comparison result to the micro control unit, and the micro control unit performs noise comparison and selects a channel according to its output result; S306.1 If the voltage comparator does not collect voltage signals in the dual channels or the voltage values ​​collected from the ultrasonic transducers are both less than U ref3 , the voltage comparator determines that there is no noise interference, and the micro control unit further determines that the current is a gas flow window period, the working channel remains unchanged and continues to measure the flow, and executes step S307; S306.2 If the voltage comparator collects the ultrasonic transducer voltage value U of the auxiliary channel z '> U ref3 , the voltage value of the working channel is U z < U ref3 , the voltage comparator determines that there is noise interference in the auxiliary channel, and the micro control unit further determines that there is same-frequency noise interference in the auxiliary channel, and the current is the gas flow window period; the working channel remains unchanged and continues to measure the flow, and executes step S307; S306.3 If the voltage comparator collects the ultrasonic transducer voltage value U of the working channel z > U ref3 , the voltage value of the auxiliary channel is U z '>U ref3 , the voltage comparator determines that there is noise interference in both channels, and the microcontroller instructs the ADC to collect the dual-channel signal and perform Fourier transform on the sampled value. F [f(t)]=F(ω), identifying the frequency characteristics of the two channels; S306.31 If the frequency identified from the working channel is only the working frequency f of the ultrasonic transducer of the working channel z , the auxiliary channel identifies the noise frequency ω z , the microcontroller unit determines that there is no noise interference in the working channel, and there is noise interference of the same frequency in the auxiliary channel, and the working channel remains unchanged and continues to perform flow measurement, and executes step S307; S306.32 If the frequency identified from the working channel is other than the working frequency f z , and the noise frequency ω z , and the auxiliary channel also recognizes the same z If the frequency is close to that of the two channels, the microcontroller unit determines that there is electromagnetic interference in the two channels, calculates the signal-to-noise ratio of the two-channel signal according to the existing technology based on the collected data, selects a channel with a high signal-to-noise ratio as the working channel for flow measurement, and filters the signal collection result of the working channel for accurate measurement, and executes step S307; S306.4 If the voltage value U of the working channel is collected z > U ref3 , the voltage value of the auxiliary channel is U z '< U ref3 , the voltage comparator determines that there is noise interference in the working channel and no noise interference in the auxiliary channel. The microcontroller instructs the ADC to collect the working channel signal for Fourier transform. F [f(t)]=F(ω), identify its signal frequency characteristics; S306.41 If the frequency identified from the working channel is only the working frequency f z , the microcontroller unit determines that there is no noise interference in both the working channel and the auxiliary channel, and the flow measurement is continued without changing the working channel, and step S307 is executed; S306.42 If the frequency identified from the working channel is other than the working frequency f z , there is also a noise frequency ω z , the microcontroller unit determines that there is co-frequency noise interference in the working channel, and instructs the ultrasonic excitation module to excite the auxiliary channel transducer group, so that the auxiliary channel becomes the new working channel and starts flow measurement, and executes step S307; S307 Since the acquisition time accuracy of the voltage comparator is higher than that of the ADC, in order to improve the timing accuracy and reduce power consumption, after the microcontroller obtains the working channel ultrasonic transducer voltage signal collected by the voltage comparator, it is determined that the working channel has no noise interference or the noise interference is filtered out and continues to work, and the time point of the voltage comparator output signal obtained by the timing unit is used as the starting point of the flight time for predicting the next ADC to start sampling to calculate the propagation time difference And calculate the flow rate, and execute step S305.

Citation Information

Patent Citations

  • Extended Range ADC Flow Meter

    CN106461437B

  • Dynamic leakage monitoring and grading early warning system based on Internet of Things intelligent gas meter

    CN118247927A

  • Measurement method and measurement device for flow velocity, and gas meter

    JP2003302416A