A gas ultrasonic flowmeter and its wave jump identification and correction method
By using microprocessors and multiple circuit components in gas ultrasonic flowmeters to identify and correct wave jumps, the problem of inaccurate flow metering under complex operating conditions is solved, and the accuracy and reliability of measurement are improved.
Patent Information
- Application Number
- CN202210237375.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-10
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-03-10
AI Technical Summary
Under complex operating conditions, gas ultrasonic flowmeters are prone to trigger zero crossing detection due to unstable signal amplitude and noise interference, resulting in errors in zero crossing detection, resulting in wave jumps, which in turn affects the accuracy of flowmetering.
A gas ultrasonic flowmeter is designed, using a microprocessor, amplifier, comparator, timer, sampling and switching circuit, logic control circuit and counter. By identifying wave jumps and correcting the ultrasonic transmission time, the accurate measurement of the time difference is ensured.
Effectively identify and correct the jump wave, improve the accuracy and reliability of flow metering, and enhance the adaptability of gas ultrasonic flow meter under complex working conditions.
Smart Images

Figure CN114623890B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of gas ultrasonic flowmeters, and in particular to a gas ultrasonic flowmeter and a wave jump identification and correction method thereof. Background Art
[0002] The medium type, pressure, and temperature measured by the gas ultrasonic flowmeter are ever-changing, and the working conditions are very complex. When measuring, the signal received by the transducer at the receiving end of the gas ultrasonic flowmeter is only below the millivolt level and is very unstable. After being amplified by the amplifier, the output signal is not only difficult to stabilize within the target range, but is often mixed with various noise signals. At present, battery-powered gas ultrasonic flowmeters generally adopt the time difference measurement principle, forming a zero-crossing detection method that basically measures the forward and reverse duration of ultrasonic transmission in a closed pipeline. After the received wave signal is amplified, it is very easy to cause the zero-crossing detection circuit to be falsely triggered due to unstable signal amplitude or noise interference. For example, due to the complex measurement working conditions, disturbed flow, pipeline noise, surrounding electromagnetic radiation, etc., the signal amplitude of the received wave after amplification will be very unstable. The conventional zero-crossing detection method is easy to produce wave jumps, resulting in inaccurate average period of the received wave, which in turn leads to mismeasurement or even measurement failure, which will cause the gas ultrasonic flowmeter to measure the flow inaccurately or even fail to operate normally. Summary of the invention
[0003] In view of the above problems, the present invention innovatively proposes an embodiment of a gas ultrasonic flowmeter and its wave jump identification and correction method to solve the technical problem that the existing gas ultrasonic flowmeter is prone to wave jumps during zero-crossing detection, which affects the measurement accuracy of the flowmeter. The method can effectively identify the wave jumps and correct the forward and reverse transmission time of the ultrasonic wave after determining the front and rear wave jumps and the number of wave jumps, thereby ensuring the accurate measurement of the time difference value and improving the accuracy and reliability of the flow measurement.
[0004] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0005] In a first aspect, the present invention provides a gas ultrasonic flow meter, characterized in that it includes a microprocessor and an amplifier, a first comparator, a timer, a sampling switching circuit, a second comparator, a logic control circuit and a counter respectively connected to the microprocessor,
[0006] The amplifier amplifies the received signal of the receiving transducer and outputs a received amplified signal;
[0007] The non-inverting input terminal of the first comparator is electrically connected to the output terminal of the amplifier, and the first comparator performs a zero-crossing comparison on the received amplified signal and outputs a square wave signal;
[0008] The timer is electrically connected to the output end of the first comparator, and the timer calculates the time difference between the square wave signal and the time when the excitation wave is emitted to obtain the ultrasonic transmission time t0 and the average period T of the receiving wave;
[0009] The sampling switching circuit includes two peak sampling and holding circuits, one of which is connected to the output end of the amplifier, and the other is connected to the inverting input end of the second comparator. The peak sampling and holding circuits are used to collect the signal peak value in each cycle of the received amplified signal;
[0010] The logic control circuit is connected to the sampling switching circuit and the second comparator respectively, and the logic control circuit controls the two peak sampling and holding circuits of the sampling switching circuit to swap according to the square wave signal;
[0011] The counter is connected to the output end of the second comparator, and the counter collects the pulse number N of the pulse signal output by the second comparator;
[0012] After the microprocessor is initialized, the number M of incremental waves of the received amplified signal is collected and stored in a fixed manner under the condition of no wave hopping;
[0013] The microprocessor identifies the wave jump according to the increasing wave number M and the pulse number N, and corrects the ultrasonic transmission time length t0 to obtain the corrected ultrasonic transmission time length t.
[0014] In a second aspect, the present invention provides a wave jump identification and correction method for a gas ultrasonic flow meter, which is applied to a gas ultrasonic flow meter and comprises the following steps:
[0015] Step 1, initialization;
[0016] Step 2, amplifying the receiving signal from the receiving transducer of the measurement channel through an amplifier to obtain a receiving amplified signal, and adjusting the amplifier gain so that the receiving amplified signal is within the required amplitude range;
[0017] Step 3, collecting the number of incremental waves M of the received amplified signal under the condition of no wave hopping and storing it fixedly;
[0018] Step 4, using the first comparator to perform zero-crossing comparison on the received amplified signal and output a square wave signal;
[0019] Step 5, the timer calculates the time difference between the square wave signal and the time when the excitation wave is emitted, and obtains the ultrasonic transmission time t0 and the average period T of the receiving wave;
[0020] Step 6, the logic control circuit controls the two peak sampling and holding circuits of the sampling switching circuit to swap according to the square wave signal, and outputs a pulse signal after comparison by the second comparator;
[0021] Step 7, the microprocessor reads the number of pulses of the pulse signal, and counts the value of the number of pulses as N;
[0022] Step 8: The microprocessor identifies the wave jump according to the increasing wave number M and the pulse number N, and corrects the ultrasonic transmission time length t0 to obtain the corrected ultrasonic transmission time length t.
[0023] Furthermore, in step 6, the logic control circuit controls the first sample-and-hold circuit and the second sample-and-hold circuit of the sampling switching circuit to swap according to the square wave signal, including the following steps:
[0024] Step 6.1, when the logic control circuit receives the rising edge of the first periodic square wave of the square wave signal output by the first comparator, the peak sampling and holding circuit of the sampling switching circuit is connected to the output end of the amplifier to collect the signal peak of the first periodic waveform of the received amplified signal, and the other peak sampling and holding circuit of the sampling switching circuit is connected to the inverting end of the second comparator;
[0025] Step 6.2, when the logic control circuit receives the rising edge of the second periodic square wave of the square wave signal output by the first comparator, the peak sampling and holding circuit originally connected to the output end of the amplifier is switched to the inverting end of the second comparator, and the peak sampling and holding circuit originally connected to the inverting end of the second comparator is switched to the output end of the amplifier to collect the signal peak of the second periodic waveform of the received amplified signal;
[0026] Step 6.3, after that, when the logic control circuit receives the rising edge of the next periodic square wave of the square wave signal output by the first comparator each time, the peak sampling and holding circuit of the switching circuit originally connected to the output end of the amplifier is switched to the inverting end of the second comparator, and the peak sampling and holding circuit of the sampling switching circuit originally connected to the inverting end of the second comparator is switched to the output end of the amplifier, and the signal peak value corresponding to the subsequent periodic waveform of the received amplified signal is collected.
[0027] Further, in step 6,
[0028] If the signal peak value of the next cycle waveform of the received amplified signal is higher than the signal peak value of the previous cycle waveform collected, the second comparator outputs a pulse signal;
[0029] If the signal peak value of the waveform of the received amplified signal in the next cycle is lower than the signal peak value of the received amplified signal in the previous cycle, the second comparator does not output a pulse signal.
[0030] Further, in step 8, the wave hopping identification method is:
[0031] If N=M, it is determined that there is no wave skipping and the ultrasonic transmission time t0 is measured correctly;
[0032] If N>M, it is determined to jump forward, and the number of jump waves is NM;
[0033] If N<M, it is determined to jump backwards, and the number of jumps is MN.
[0034] Further, in step 8, the wave hopping correction method is:
[0035] If it is determined to jump forward, let t = t0 + (NM) × T;
[0036] If it is determined to be a backward wave jump, let t = t0-(MN)×T;
[0037] Where t represents the corrected ultrasonic transmission time, t0 represents the ultrasonic transmission time detected by the timer, and T is the average period of the received wave.
[0038] Furthermore, it also includes:
[0039] During each high level period of the square wave signal output by the first comparator, determining whether the second pair of comparators outputs a pulse signal;
[0040] If the second comparator has no pulse output, the control logic control circuit turns off the enable terminal of the second comparator, uses the microprocessor to put the sampling switching circuit in a discharge state, and turns off the amplifier, the first comparator and the second comparator;
[0041] When the measuring channel receiving transducer sends a receiving signal next time, return to step 1.
[0042] Further, in step 1, the initialization step includes:
[0043] Step 1.1, using a microprocessor to initialize the sampling switching circuit and the logic control circuit;
[0044] Step 1.2, using a microprocessor to enable the amplifier and adjust its gain;
[0045] Step 1.3, using a microprocessor to enable the first comparator after delaying the first time interval;
[0046] Step 1.4, use the microprocessor to clear the counter and then enable it.
[0047] Furthermore, in step 2, the method for adjusting the amplitude of the received amplified signal is:
[0048] The microprocessor is used to read the signal peak value and determine whether the signal peak value is within the required amplitude range;
[0049] If the signal peak is within the required amplitude range, no adjustment is performed;
[0050] If the signal peak is not within the required amplitude range, the gain is adjusted.
[0051] Furthermore, the gain adjustment method is:
[0052] Let the required amplitude be V0, the amplifier gain be G1, and the amplitude after amplification by the amplifier be V1;
[0053] The gain is required to be adjusted to
[0054] The required amplitude range is 800-1000mV.
[0055] From the above description, it can be known that the present invention uses a timer to calculate the time difference between the square wave signal and the time when the excitation wave is emitted, and obtains the ultrasonic transmission time and the average period of the receiving wave; uses a counter to collect the number of pulses N of the pulse signal output by the second comparator; uses a microprocessor to identify the wave jump according to the number of incremental waves M and the number of pulses N, and corrects the ultrasonic transmission time to obtain the corrected ultrasonic transmission time. It can effectively identify the wave jump, and correct the ultrasonic forward and reverse transmission time after judging the front and rear wave jumps and the number of wave jumps, so as to ensure the accurate measurement of the time difference value, so as to improve the accuracy and reliability of the flow measurement. The medium and environmental adaptability of the battery-powered gas ultrasonic flowmeter is enhanced, the measurement accuracy and reliability can be greatly improved, and the promotion and application of the gas ultrasonic flowmeter can be further broadened, while effectively reducing measurement disputes. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 The figure is a schematic diagram of the structure of a gas ultrasonic flowmeter provided by one embodiment of the present invention;
[0057] Figure 2 FIG. 1 is a flow chart of a method for wave jump identification and correction of a gas ultrasonic flow meter provided by an embodiment of the present invention;
[0058] Figure 3 It is a schematic diagram showing the relationship between the received amplified signal, the square wave signal output by the first comparator and the pulse signal output by the second comparator according to the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present invention clearer and more understandable, the present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] Based on the shortcomings of the prior art, the present invention provides a specific implementation of a gas ultrasonic flow meter, such as Figure 1 As shown, the gas ultrasonic flow meter specifically includes a microprocessor 1 and an amplifier 2, a first comparator 6, a timer 8, a sampling switching circuit 9, a second comparator 10, a logic control circuit 12 and a counter 13 respectively connected to the microprocessor 1. Among them,
[0061] The amplifier 2 amplifies the receiving signal 4 of the receiving transducer 3 and outputs the receiving amplified signal 5, so that the peak sampling and holding circuit of the sampling switching circuit 9 can collect the peak value of the waveform of the receiving amplified signal in each cycle;
[0062] The non-inverting input terminal of the first comparator 6 is electrically connected to the output terminal of the amplifier 2. The first comparator 6 performs a zero-crossing comparison on the received amplified signal 5 and outputs a square wave signal 7.
[0063] The timer 8 is electrically connected to the output end of the first comparator 6. The timer 8 calculates the ultrasonic transmission time t0 and the average period T of the receiving wave according to the square wave signal; then the timer 8 is used to obtain the forward time and the reverse time according to the square wave signal; the flow rate is calculated according to the forward time and the reverse time using the time difference method to realize the metering function of the gas ultrasonic flowmeter;
[0064] The sampling switching circuit 9 includes two peak sampling and holding circuits. One peak sampling and holding circuit of the sampling switching circuit 9 is connected to the output end of the amplifier 2. The peak sampling and holding circuit connected to the output end of the amplifier 2 is used to collect the signal peak value in each cycle of the receiving amplified signal 5 output by the amplifier 2; the other peak sampling and holding circuit of the sampling switching circuit 9 is connected to the inverting input end of the second comparator 10. The second comparator 10 is used to compare the signal peak value in each cycle of the receiving amplified signal 5;
[0065] The logic control circuit 12 is connected to the sampling switching circuit 9 and the second comparator 10 respectively. The logic control circuit 12 controls the two peak sampling and holding circuits of the sampling switching circuit 9 to swap according to the square wave signal 7, and then repeatedly uses the second comparator 10 to compare the signal peak value of the next cycle of the received amplified signal 5 with the signal peak value of the previous cycle of the received amplified signal 5;
[0066] The counter 13 is connected to the output end of the second comparator 10, and the counter 13 collects the pulse number N of the pulse signal 11 output by the second comparator 10;
[0067] After initialization, the microprocessor 1 collects the number M of incremental waves of the received amplified signal 5 under the condition of no wave hopping and stores it fixedly;
[0068] The microprocessor 1 collects the number of increasing waves M of the received amplified signal 5 and reads the number of pulses N collected by the counter 13. The microprocessor identifies the wave jump according to the number of increasing waves M and the number of pulses N, and corrects the ultrasonic transmission time t0 to obtain the corrected ultrasonic transmission time t. Generally, the number of front and rear wave jumps is no more than 3, so M-3≤N≤M+3. If N=M, it is determined that there is no wave jump, and the ultrasonic transmission time t0 is measured correctly.
[0069] If N>M, it is determined to jump forward, and the number of jumps is NM, then let t=t0+(NM)×T;
[0070] If N<M, it is determined to be a backward wave jump, and the number of wave jumps is MN, then let t=t0-(MN)×T;
[0071] Where t represents the corrected ultrasonic transmission time, t0 represents the ultrasonic transmission time detected by the timer, and T is the average period of the received wave.
[0072] In this embodiment, the ultrasonic transmission time t0 and the average period T of the receiving wave are obtained by calculating the square wave signal using the timer 8; the pulse number N of the pulse signal 11 output by the second comparator 10 is collected using the counter 13; the increasing wave number M of the receiving amplified signal 5 is collected using the microprocessor 1 and the pulse number N collected by the counter 13 is read. The microprocessor identifies the wave jump according to the increasing wave number M and the pulse number N, and corrects the ultrasonic transmission time t0 to obtain the corrected ultrasonic transmission time t. The wave jump can be effectively identified, and the ultrasonic forward and reverse transmission time can be corrected after determining the front and rear wave jumps and the number of wave jumps, thereby ensuring the accurate measurement of the time difference value to improve the accuracy and reliability of the flow measurement. The medium and environmental adaptability of the battery-powered gas ultrasonic flowmeter is enhanced, the measurement accuracy and reliability can be greatly improved, and the promotion and application of the gas ultrasonic flowmeter can be further broadened, while effectively reducing measurement disputes.
[0073] The present invention also provides a wave jump identification and correction method for a gas ultrasonic flow meter, which is applied to the above-mentioned gas ultrasonic flow meter, such as Figure 2 Combined with Figure 3 As shown, the method specifically comprises the following steps:
[0074] Step 1, initialization;
[0075] Specifically, in step 1, initialization includes the following steps:
[0076] Step 1.1, using a microprocessor to initialize the sampling switching circuit and the logic control circuit;
[0077] Step 1.2, using a microprocessor to enable the amplifier and adjust its gain;
[0078] Step 1.3, using a microprocessor to delay a first time interval and then enable the first comparator; the first time interval is generally slightly shorter than the forward time at the maximum gas flow rate to ensure a more accurate zero-crossing comparison after the first comparator is enabled;
[0079] Step 1.4, use the microprocessor to clear the counter and then enable it.
[0080] An initialization step is required before each test to ensure that each component is in a state to be tested and is not disturbed by the original settings, thereby improving the accuracy of the test.
[0081] Step 2, amplifying the receiving signal from the receiving transducer of the measurement channel through an amplifier to obtain a receiving amplified signal, and adjusting the amplifier gain so that the receiving amplified signal is within the required amplitude range;
[0082] Specifically, in step 2, the method for adjusting the amplitude of the received amplified signal is:
[0083] The microprocessor is used to read the signal peak value and determine whether the signal peak value is within the required amplitude range;
[0084] If the signal peak is within the required amplitude range, no adjustment is performed;
[0085] If the signal peak value is not within the required amplitude range, the gain is adjusted;
[0086] If the peak value of the received amplified signal does not reach the required amplitude range, make the following adjustments:
[0087] Let the required amplitude be V0, the amplifier gain be G1, and the amplitude after amplification by the amplifier be V1;
[0088] The gain is required to be adjusted to The required amplitude range is 800-1000mV.
[0089] By setting a reasonable amplitude range, the response speed of the second comparator is effectively guaranteed, and reasonable control under various error conditions is met.
[0090] Step 3, collecting the number of incremental waves M of the received amplified signal under the condition of no wave hopping and storing it fixedly;
[0091] Increasing wave: If the signal peak of the next cycle waveform is greater than the signal peak of the previous cycle waveform, the next cycle waveform is considered to be an increasing wave;
[0092] Step 4, using the first comparator to perform zero-crossing comparison on the received amplified signal and output a square wave signal;
[0093] Step 5, the timer calculates the time difference between the square wave signal and the time when the excitation wave is emitted, and obtains the ultrasonic transmission time t0 and the average period T of the receiving wave;
[0094] Specifically, a timer is used to obtain the forward duration and the reverse duration according to the square wave signal; the flow rate is calculated using the time difference method according to the forward duration and the reverse duration, thereby realizing the metering function of the gas ultrasonic flow meter;
[0095] Step 6, the logic control circuit controls the two peak sampling and holding circuits of the sampling switching circuit to swap according to the square wave signal, and outputs a pulse signal after comparison by the second comparator;
[0096] In step 6, specifically, the following steps are included:
[0097] Step 6.1, when the logic control circuit receives the rising edge of the first periodic square wave of the square wave signal output by the first comparator, it connects one peak sampling and holding circuit of the sampling switching circuit to the output end of the amplifier to collect the signal peak value Vp1 of the first periodic waveform of the received amplified signal, and connects another peak sampling and holding circuit of the sampling switching circuit to the inverting end of the second comparator. At this time, the second comparator is not enabled and does not output a pulse signal;
[0098] Step 6.2, when the logic control circuit receives the rising edge of the second periodic square wave of the square wave signal output by the first comparator, the peak sampling and holding circuit originally connected to the output end of the amplifier is switched to the inverting end of the second comparator, and the peak sampling and holding circuit originally connected to the inverting end of the second comparator is switched to the output end of the amplifier, so as to collect the signal peak value Vp2 of the second periodic waveform of the received amplified signal. At this time, the second comparator is enabled, and the signal peak value Vp1 of the first periodic waveform and the signal peak value Vp2 of the second periodic waveform are respectively input into the two ports of the input end of the second comparator, so as to compare Vp1 with Vp2 by using the second comparator;
[0099] Step 6.3, after that, when the logic control circuit receives the rising edge of the next cycle square wave of the square wave signal output by the first comparator each time, the peak sampling and holding circuit of the switching circuit originally connected to the output end of the amplifier is switched to the inverting end of the second comparator, and the peak sampling and holding circuit of the sampling switching circuit originally connected to the inverting end of the second comparator is switched to the output end of the amplifier, and the signal peak value corresponding to the subsequent cycle waveform of the received amplified signal is collected for comparison with the signal peak value of the next cycle waveform.
[0100] by Figure 3 For example, the comparison process of the second comparator is shown in the following table:
[0101]
[0102] More specifically, in step 6, the pulse signal output by the second comparator is generated according to the following rule:
[0103] If the signal peak value of the next cycle waveform of the received amplified signal is higher than the signal peak value of the previous cycle waveform collected, the second comparator outputs a pulse signal;
[0104] If the signal peak value of the waveform of the received amplified signal in the next cycle is lower than the signal peak value of the received amplified signal in the previous cycle, the second comparator does not output a pulse signal.
[0105] Step 7, the microprocessor reads the number of pulses of the pulse signal, and counts the value of the number of pulses as N;
[0106] like Figure 3 As shown, it can be seen that the number of increasing waves should correspond to the number of pulses output by the second comparator one by one;
[0107] Step 8: The microprocessor identifies the wave jump according to the increasing wave number M and the pulse number N, and corrects the ultrasonic transmission time length t0 to obtain the corrected ultrasonic transmission time length t.
[0108] Specifically, in step 8, the wave hopping identification method is:
[0109] If N=M, it is determined that there is no wave skipping and the ultrasonic transmission time t0 is measured correctly;
[0110] If N>M, it is determined to jump forward, and the number of jump waves is NM;
[0111] If N<M, it is determined to jump backwards, and the number of jumps is MN;
[0112] If a wave jump is identified, correction is performed as follows:
[0113] If it is determined to jump forward, let t = t0 + (NM) × T;
[0114] If it is determined to be a backward wave jump, let t = t0-(MN)×T;
[0115] Where t represents the corrected ultrasonic transmission time, t0 represents the ultrasonic transmission time detected by the timer, and T is the average period of the received wave.
[0116] On the basis of the above steps, the step of ending the detection is also included, namely step 9:
[0117] During each high level period of the square wave signal output by the first comparator, determining whether the second pair of comparators outputs a pulse signal;
[0118] If the second comparator has no pulse output, the control logic control circuit turns off the enable terminal of the second comparator, uses the microprocessor to put the sampling switching circuit in a discharge state, and turns off the amplifier, the first comparator and the second comparator;
[0119] When the measuring channel receiving transducer sends out a receiving signal next time, the process returns to step 1 to wait for the start of the next detection.
[0120] In this embodiment, the wave jump can be effectively identified, and the ultrasonic forward and reverse transmission time can be corrected after the front and rear wave jumps and the number of wave jumps are determined, so as to ensure the accurate measurement of the time difference value, so as to improve the accuracy and reliability of flow measurement. The medium and environmental adaptability of the battery-powered gas ultrasonic flowmeter is enhanced, the measurement accuracy and reliability can be greatly improved, and the promotion and application of gas ultrasonic flowmeters can be further broadened, while effectively reducing measurement disputes.
[0121] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A gas ultrasonic flow meter, characterized in that: The device comprises a microprocessor and an amplifier, a first comparator, a timer, a sampling switching circuit, a second comparator, a logic control circuit and a counter respectively connected to the microprocessor. The amplifier amplifies the received signal of the receiving transducer and outputs a received amplified signal; The non-inverting input terminal of the first comparator is electrically connected to the output terminal of the amplifier, and the first comparator performs a zero-crossing comparison on the received amplified signal and outputs a square wave signal; The timer is electrically connected to the output end of the first comparator, and the timer calculates the time difference between the square wave signal and the time when the excitation wave is emitted to obtain the ultrasonic transmission time t0 and the average period T of the receiving wave; The sampling switching circuit includes two peak sampling and holding circuits, one of which is connected to the output end of the amplifier, and the other is connected to the inverting input end of the second comparator. The peak sampling and holding circuits are used to collect the signal peak value in each cycle of the received amplified signal; The logic control circuit is connected to the sampling switching circuit and the second comparator respectively, and the logic control circuit controls the two peak sampling and holding circuits of the sampling switching circuit to swap according to the square wave signal; The counter is connected to the output end of the second comparator, and the counter collects the pulse number N of the pulse signal output by the second comparator; After the microprocessor is initialized, the number M of incremental waves of the received amplified signal is collected and stored in a fixed manner under the condition of no wave hopping; The microprocessor identifies the wave jump according to the increasing wave number M and the pulse number N, and corrects the ultrasonic transmission time length t0 to obtain the corrected ultrasonic transmission time length t.
2. A wave jump identification and correction method for a gas ultrasonic flowmeter, applied to the gas ultrasonic flowmeter according to claim 1, characterized in that: The steps include: Step 1, initialization; Step 2, amplifying the receiving signal from the receiving transducer of the measurement channel through an amplifier to obtain a receiving amplified signal, and adjusting the amplifier gain so that the receiving amplified signal is within the required amplitude range; Step 3, collecting the number of incremental waves M of the received amplified signal under the condition of no wave hopping and storing it fixedly; Step 4, using the first comparator to perform zero-crossing comparison on the received amplified signal and output a square wave signal; Step 5, the timer calculates the time difference between the square wave signal and the time when the excitation wave is emitted, and obtains the ultrasonic transmission time t0 and the average period T of the receiving wave; Step 6, the logic control circuit controls the two peak sampling and holding circuits of the sampling switching circuit to swap according to the square wave signal, and outputs a pulse signal after comparison by the second comparator; Step 7, the microprocessor reads the number of pulses of the pulse signal, and counts the value of the number of pulses as N; Step 8: The microprocessor identifies the wave jump according to the increasing wave number M and the pulse number N, and corrects the ultrasonic transmission time length t0 to obtain the corrected ultrasonic transmission time length t.
3. The wave jump identification and correction method of a gas ultrasonic flowmeter according to claim 2, characterized in that: In step 6, the logic control circuit controls the first sample-and-hold circuit and the second sample-and-hold circuit of the sampling switching circuit to swap according to the square wave signal, including the following steps: Step 6.1, when the logic control circuit receives the rising edge of the first periodic square wave of the square wave signal output by the first comparator, the peak sampling and holding circuit of the sampling switching circuit is connected to the output end of the amplifier to collect the signal peak of the first periodic waveform of the received amplified signal, and the other peak sampling and holding circuit of the sampling switching circuit is connected to the inverting end of the second comparator; Step 6.2, when the logic control circuit receives the rising edge of the second periodic square wave of the square wave signal output by the first comparator, the peak sampling and holding circuit originally connected to the output end of the amplifier is switched to the inverting end of the second comparator, and the peak sampling and holding circuit originally connected to the inverting end of the second comparator is switched to the output end of the amplifier to collect the signal peak of the second periodic waveform of the received amplified signal; Step 6.3, after that, when the logic control circuit receives the rising edge of the next periodic square wave of the square wave signal output by the first comparator each time, the peak sampling and holding circuit of the switching circuit originally connected to the output end of the amplifier is switched to the inverting end of the second comparator, and the peak sampling and holding circuit of the sampling switching circuit originally connected to the inverting end of the second comparator is switched to the output end of the amplifier, and the signal peak value corresponding to the subsequent periodic waveform of the received amplified signal is collected.
4. The wave jump identification and correction method of a gas ultrasonic flowmeter according to claim 2, characterized in that: In step 6, If the signal peak value of the next cycle waveform of the received amplified signal is higher than the signal peak value of the previous cycle waveform collected, the second comparator outputs a pulse signal; If the signal peak value of the waveform of the received amplified signal in the next cycle is lower than the signal peak value of the received amplified signal in the previous cycle, the second comparator does not output a pulse signal.
5. The wave jump identification and correction method of a gas ultrasonic flow meter according to claim 2, characterized in that: In step 8, the wave hopping identification method is: If N=M, it is determined that there is no wave skipping and the ultrasonic transmission time t0 is measured correctly; If N>M, it is determined to jump forward, and the number of jump waves is NM; If N<M, it is determined to jump backwards, and the number of jumps is MN.
6. The wave jump identification and correction method of a gas ultrasonic flow meter according to claim 5, characterized in that: In step 8, the wave hopping correction method is: If it is determined to jump forward, let t = t0 + (NM) × T; If it is determined to be a backward wave jump, let t = t0-(MN)×T; Where t represents the corrected ultrasonic transmission time, t0 represents the ultrasonic transmission time detected by the timer, and T is the average period of the received wave.
7. The wave jump identification and correction method of a gas ultrasonic flow meter according to claim 2, characterized in that: Also includes: During each high level period of the square wave signal output by the first comparator, determining whether the second pair of comparators outputs a pulse signal; If the second comparator has no pulse output, the control logic control circuit turns off the enable terminal of the second comparator, uses the microprocessor to put the sampling switching circuit in a discharge state, and turns off the amplifier, the first comparator and the second comparator; When the measuring channel receiving transducer sends a receiving signal next time, return to step 1.
8. The wave jump identification and correction method of a gas ultrasonic flowmeter according to claim 2, characterized in that: In step 1, the initialization step includes: Step 1.1, using a microprocessor to initialize the sampling switching circuit and the logic control circuit; Step 1.2, using a microprocessor to enable the amplifier and adjust its gain; Step 1.3, using a microprocessor to enable the first comparator after delaying the first time interval; Step 1.4, use the microprocessor to clear the counter and then enable it.
9. The wave jump identification and correction method of a gas ultrasonic flowmeter according to claim 2, characterized in that: In step 2, the amplitude of the received amplified signal is adjusted as follows: The microprocessor is used to read the signal peak value and determine whether the signal peak value is within the required amplitude range; If the signal peak is within the required amplitude range, no adjustment is performed; If the signal peak is not within the required amplitude range, the gain is adjusted.
10. The wave jump identification and correction method of a gas ultrasonic flow meter according to claim 9, characterized in that: The gain adjustment method is: Let the required amplitude be V0, the amplifier gain be G1, and the amplitude after amplification by the amplifier be V1; The gain is required to be adjusted to The required amplitude range is 800-1000mV.
Citation Information
Patent Citations
Inhibition model and inhibition method for static drift of time difference ultrasonic flowmeter
CN101886939A
Echo signal detection circuit of adaptive ultrasonic wave
CN109186693A