Flow parameter measuring device and ultrasonic flowmeter
By using the ultrasonic pulse timing module and logic operator to calculate the flow rate through the ultrasonic flow meter, the problems of low measurement accuracy and pressure loss at low flow rates of the mechanical flow meter are solved, and high-precision and high-repeatability flow measurement is achieved.
Patent Information
- Application Number
- CN202010656959.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-09
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2040-07-09
AI Technical Summary
Existing mechanical flow meters have low measurement accuracy and poor repeatability at low flow rates, and also suffer from pressure loss problems.
The ultrasonic flowmeter is used to measure the flow rate by emitting ultrasonic pulses, and the timing module and logic operator are used to calculate the flow rate, which avoids the influence of solid devices on the flow rate in the fluid pipeline and improves the measurement accuracy and repeatability.
It achieves accurate flow measurement at low flow rates, eliminates pressure loss, and improves measurement accuracy and repeatability.
Smart Images

Figure CN111664904B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flow measurement, and in particular to a flow parameter measuring device and an ultrasonic flowmeter. Background Art
[0002] In recent years, the technology for measuring the flow of fluids such as water and gas has developed rapidly. The flowmeter in the existing technology is usually a mechanical flowmeter, which includes a turntable or impeller arranged in the fluid pipeline. When the fluid flows, it drives the turntable or impeller to rotate. The flow velocity of the fluid can be obtained by the number of rotations of the turntable or impeller. Then, the flow rate of the fluid can be obtained based on the flow velocity of the fluid and the diameter of the fluid pipeline. However, on the one hand, when the flow velocity of the fluid in the fluid pipeline is low, it cannot drive the turntable or impeller to rotate well, resulting in low sensitivity of the mechanical flowmeter, reduced measurement accuracy of the mechanical flowmeter, and poor repeatability. On the other hand, the turntable or impeller will affect the flow velocity of the fluid in the fluid pipeline, resulting in pressure loss. Summary of the Invention
[0003] The purpose of the present invention is to provide a flow parameter measuring device and an ultrasonic flowmeter, which realizes the measurement of the flowmeter by emitting ultrasonic pulses to the fluid, avoiding the influence of the fluid flow velocity in the fluid pipeline caused by the installation of solid devices in the fluid pipeline, eliminating the pressure loss, and the ultrasonic wave can accurately measure and calculate the fluid flow rate when the fluid flow velocity is low, with high measurement accuracy and repeatability.
[0004] In order to solve the above technical problems, the present invention provides a flow parameter measuring device, comprising:
[0005] A clock generator for generating a system clock;
[0006] An ultrasonic pulse generator connected to the clock generator is used to send pulses to the fluid to be measured when receiving a measurement command, and send a pulse timing start signal to the timing module, wherein the pulses include downstream pulses and upstream pulses;
[0007] a timing module connected to the clock generator and the ultrasonic pulse generator, respectively, for starting timing upon receiving the pulse timing start signal, stopping timing upon receiving the echo of the pulse, and obtaining pulse timing information based on the start timing, the stop timing and the system clock;
[0008] a logic operator connected to the timing module, configured to obtain a pulse timing time based on the pulse timing information;
[0009] The communication module connected to the logic operator is used to transmit the pulse timing time so that an external processor can determine the flow rate of the fluid to be measured based on the time difference between the downstream pulse timing time and the upstream pulse timing time in the pulse timing time.
[0010] Preferably, the timing module is further used to measure the time of one system clock cycle;
[0011] The timing module includes:
[0012] a coarse timing module, configured to count the number of system time cycles between the rising edge of the first system clock after receiving the pulse timing start signal and the rising edge of the first system clock after receiving the echo of the pulse as the coarse timing time;
[0013] A first precision timing module, configured to count the time between receiving the pulse timing start signal and the rising edge of the first system clock thereafter as a first precision time;
[0014] a second precision timing module, configured to count the time between the receipt of the echo of the pulse and the rising edge of the first system clock thereafter as a second precision time;
[0015] the logic operator connected to the coarse timing module, the first precise timing module, and the second precise timing module, configured to obtain a pulse timing time based on the coarse timing time, the first precise time, the second precise time, the time of one system clock cycle, and a first time relationship;
[0016] The first time relationship formula = the coarse timing time + (the first precise time - the second precise time) / 1 system clock cycle.
[0017] Preferably, the number of the first precision timing module and the number of the second precision timing module are both N, where N is an integer not less than 2;
[0018] The logic operator is further used to determine the sum of the first precision times obtained by N first precision timing modules and the sum of the second precision times obtained by N second precision timing modules. Then, the first time relationship formula = the coarse timing time + (the sum of the first precision times - the sum of the second precision times) / (the time of N*1 system clock cycles).
[0019] Preferably, it also includes:
[0020] an adjustable threshold comparator connected to the timing module, configured to filter out the echo of the pulse with an amplitude lower than a preset value based on a reference voltage;
[0021] The timing module is further configured to receive an echo selection instruction and select, according to the echo selection instruction, whether to stop timing when the echo of the pulse or the echo of the pulse after filtering is received.
[0022] Preferably, it also includes:
[0023] A controller is respectively connected to the clock generator, the ultrasonic pulse generator, the timing module, the communication module, the logic operator, and the adjustable threshold comparator, and is used to receive configuration information sent by the external processor through the communication module, and configure the frequency of the system clock of the clock generator, the number and frequency of pulses sent by the ultrasonic pulse generator, the edge selection of the pulses received by the timing module, and the reference voltage of the adjustable threshold comparator according to the configuration information.
[0024] Preferably, it also includes:
[0025] The adjustable threshold comparator connected to the timing module is used to filter out the echo of the pulse whose amplitude is lower than a preset value based on the reference voltage, and output the comparison result between the echo of the pulse and 0 to the timing module after the reference voltage is adjusted to 0;
[0026] The first wave detection module connected to the adjustable threshold comparator is used to determine the width of the echo of the first pulse output by the adjustable threshold comparator after filtering processing, so that the external processor adjusts the reference voltage of the adjustable threshold comparator to 0 through the controller after receiving the width of the echo of the first pulse, and determines the intensity of the echo of the first pulse based on the width of the echo of the first pulse and the width of the first pulse.
[0027] Preferably, it also includes:
[0028] a raw data register connected to the timing module and the logic operator respectively, for storing the pulse timing information so that the logic operator can obtain the pulse timing information;
[0029] The result data register connected to the logic operator and the communication module respectively is used to store the pulse timing time so that the external memory can obtain the pulse timing time.
[0030] Preferably, the clock generator comprises:
[0031] A high-frequency clock generator, configured to generate the system clock;
[0032] A calibration clock connected to the high-frequency clock generator is used to calibrate the system clock.
[0033] Preferably, it also includes:
[0034] The temperature measurement module connected to the timing module is used to detect the temperature of the fluid to be measured after receiving a temperature detection command, so that the external processor can correct the flow rate of the fluid to be measured based on the temperature of the fluid to be measured.
[0035] Preferably, the temperature measurement module includes a first charge-discharge circuit based on a reference resistor and a second charge-discharge circuit based on a thermistor, wherein the resistance of the reference resistor is independent of temperature;
[0036] The timing module is further configured to perform a first timing on the charge and discharge time of the first charge and discharge circuit and a second timing on the second charge and discharge circuit, so that the external processor can determine the temperature of the fluid to be measured based on the time difference between the first timing and the second timing.
[0037] To solve the above problems, the present invention further provides an ultrasonic flowmeter, comprising the flow parameter measuring device as described above, and further comprising:
[0038] An external processor connected to the flow parameter measuring device is used to determine the flow rate of the fluid to be measured based on the time difference between the downstream pulse timing time and the upstream pulse timing time in the pulse timing time.
[0039] The present invention provides a flow parameter measurement device, which includes a clock generator, an ultrasonic pulse generator, a timing module, a logic operator, and a communication module. First, the clock generator generates a system clock. The ultrasonic pulse generator sends a pulse timing start signal to the fluid. When the timing module receives the pulse timing start signal, it starts timing. When the pulse signal encounters an obstacle when propagating in the fluid, it will reflect an echo. When the timing module receives the pulse echo, it stops timing. The timing module obtains pulse timing information based on the start and stop timings and the system clock, and sends the pulse timing information to the logic operator. The logic operator obtains the pulse timing time based on the pulse timing information, and sends the pulse timing time to an external processor through the communication module. The external processor determines the flow rate of the fluid to be measured based on the time difference between the downstream pulse timing time and the upstream pulse timing time in the pulse timing time. This solution measures flow parameters by emitting ultrasonic pulses to the fluid. On the one hand, it avoids the influence of solid devices on the fluid flow rate in the fluid pipeline and eliminates pressure loss. On the other hand, the ultrasonic wave can accurately measure flow parameters even at low fluid flow rates, with high measurement accuracy and repeatability.
[0040] The present invention also provides an ultrasonic flow meter having the same beneficial effects as the above flow parameter measuring device. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the prior art and the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A schematic structural diagram of a flow parameter measuring device provided by the present invention;
[0043] Figure 2 A working principle diagram of a flow parameter measuring device provided by the present invention;
[0044] Figure 3 A schematic structural diagram of another flow parameter measuring device provided by the present invention;
[0045] Figure 4 This is a structural schematic diagram of an ultrasonic flowmeter provided by the present invention. DETAILED DESCRIPTION
[0046] The core of the present invention is to provide a flow parameter measuring device and an ultrasonic flowmeter, which realizes the measurement of the flowmeter by emitting ultrasonic pulses to the fluid, avoiding the influence of the fluid flow rate in the fluid pipeline caused by the installation of solid devices in the fluid pipeline, eliminating the pressure loss, and the ultrasonic wave can accurately measure and calculate the fluid flow rate when the fluid flow rate is low, with high measurement accuracy and repeatability.
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0048] Please refer to Figure 1 , Figure 1 This is a structural schematic diagram of a flow parameter measuring device provided by the present invention.
[0049] include:
[0050] Clock generator 1, used to generate system clock;
[0051] The ultrasonic pulse generator 2 connected to the clock generator 1 is used to send pulses to the fluid to be measured when receiving a measurement command, and send a pulse timing start signal to the timing module 3. The pulses include downstream pulses and upstream pulses.
[0052] A timing module 3 connected to the clock generator 1 and the ultrasonic pulse generator 2, respectively, is used to start timing when a pulse timing start signal is received, stop timing when a pulse echo is received, and obtain pulse timing information based on the start timing, stop timing and the system clock;
[0053] A logic operator 4 connected to the timing module 3, for obtaining a pulse timing time based on the pulse timing information;
[0054] The communication module 5 connected to the logic operator 4 is used to transmit the pulse timing time so that the external processor can determine the flow rate of the fluid to be measured based on the time difference between the downstream pulse timing time and the upstream pulse timing time in the pulse timing time.
[0055] The applicant took into account that when ultrasonic waves propagate in a fluid, the propagation time of the ultrasonic waves is related to the propagation velocity of the fluid, and the downstream propagation time of the ultrasonic waves in the fluid is different from the upstream propagation time. Therefore, the flow rate of the fluid can be calculated by measuring the downstream propagation time and the upstream propagation time of the ultrasonic waves in the fluid, the flow velocity of the fluid and the diameter of the fluid pipeline, and then using a fixed time calculation formula.
[0056] Based on this, in the solution provided by the present application, first, the clock generator 1 generates a system clock, the ultrasonic pulse generator 2 sends a pulse to the fluid to be measured when it receives a measurement command, and the timing module 3 starts timing when it receives the pulse timing start signal sent by the ultrasonic pulse generator 2. When the pulse signal encounters an obstacle when propagating in the fluid, it will reflect the echo signal. When the timing module 3 receives the echo signal of the pulse, it stops timing. The timing module 3 obtains pulse timing information based on the start timing, stop timing and system clock, and sends the pulse timing information to the logic operator 4. The logic operator 4 obtains the pulse timing time based on the pulse timing information, and sends the pulse timing time to the external processor through the communication module 5. The external processor determines the flow rate of the fluid to be measured based on the time difference between the downstream pulse timing time and the upstream pulse timing time in the pulse timing time. Among them, the above-mentioned pulse timing information is the information used to calculate the pulse timing time between the start timing and the stop timing.
[0057] Among them, the downstream propagation of ultrasound in the fluid means that the ultrasound pulse sent by the ultrasonic pulse generator 2 to the fluid is in the same direction as the flow direction of the fluid, and the upstream propagation of ultrasound in the fluid means that the ultrasound pulse sent by the ultrasonic pulse generator 2 to the fluid is opposite to the flow direction of the fluid.
[0058] In addition, the communication module 5 can be a bidirectional serial communication module, for example, a standard 4-wire SPI (Serial Peripheral Interface) serial interface. The logic operator 4 is connected to the external processor through the 4-wire SPI serial interface, and the 4-wire SPI serial interface realizes data transmission between the logic operator 4 and the external processor.
[0059] Of course, the communication module 5 here is not limited to a bidirectional serial communication module, and other types of communication modules 5 can also be selected. This application does not make any special restrictions here.
[0060] In summary, the present invention provides a flow parameter measuring device. In this solution, the flow meter measures the fluid by emitting ultrasonic pulses, avoiding the influence of the fluid flow rate in the fluid pipeline caused by the installation of solid devices in the fluid pipeline, eliminating the pressure loss, and the ultrasonic wave can accurately measure and calculate the fluid flow rate when the fluid flow rate is low, with high measurement accuracy and repeatability.
[0061] Please refer to Figure 2 and Figure 3 ,in, Figure 2 This is a working principle diagram of a flow parameter measuring device provided by the present invention. Figure 3 This is a structural schematic diagram of another flow parameter measuring device provided by the present invention.
[0062] Based on the above embodiment:
[0063] As a preferred embodiment, the timing module 3 is further used to measure the time of one system clock cycle;
[0064] Timing module 3 includes:
[0065] a coarse timing module, configured to count the number of system time cycles between the first rising edge of the system clock after receiving the pulse timing start signal and the first rising edge of the system clock after receiving the echo of the pulse as the coarse timing time;
[0066] A first precision timing module, configured to count the time between receiving the pulse timing start signal and the rising edge of the first system clock thereafter as a first precision time;
[0067] a second precision timing module, configured to measure the time between the echo of the received pulse and the rising edge of the first system clock thereafter as a second precision time;
[0068] a logic operator 4 connected to the coarse timing module, the first precise timing module, and the second precise timing module, configured to obtain a pulse timing time based on the coarse timing time, the first precise time, the second precise time, the time of one system clock cycle, and the first time relationship;
[0069] The first time relationship formula=coarse timing time+(first precise time−second precise time) / 1 system clock cycle.
[0070] In order to obtain more precise pulse timing information through the timing module 3 and thus improve the measurement accuracy of the device, in this embodiment, a coarse timing module, a first precise timing module and a second precise timing module are provided in the timing module 3 .
[0071] The coarse timing module counts the number of system time cycles between the rising edge of the first system clock after receiving the pulse timing start signal and the rising edge of the first system clock after receiving the pulse echo as the coarse timing time, and the coarse timing time is an integer multiple of the system clock cycle.
[0072] The first precision timing module counts the time between receiving the pulse timing start signal and the rising edge of the first system clock thereafter as the first precision time, and the second precision timing module counts the time between receiving the pulse echo and the rising edge of the first system clock thereafter as the second precision time.
[0073] The logic operation module calculates the pulse timing information obtained by the coarse timing module, the first precise timing module, and the second precise timing module. The calculation of {coarse timing time + (first precise time - second precise time) / 1 system clock cycle} can be used to obtain the number of system clock cycles between the start and stop of timing, that is, the pulse timing time. Subsequently, the external processor can obtain the specific pulse timing time value between the start and stop of timing based on the number of cycles and the system clock time.
[0074] In practical applications, the timing module 3 can also convert the pulse timing time between the start timing and the stop timing into a binary complement. In this application, the logic operation module calculates the time value of the specific pulse timing time between the start timing and the stop timing based on the following formula: Time = RES_X × Tref × 2 ClkHSDiv , where Time is the pulse timing duration between the start and stop timing; RES_X is the pulse timing duration, Tref is the system clock of clock generator 1, and ClkHSDiv is the frequency division factor of the system clock. RES_X can be a 32-bit fixed floating-point number displayed in 2's complement format, with the upper 16 bits representing the integer portion and the lower 16 bits representing the fractional portion.
[0075] Specifically, the ultrasonic pulse generator 2 can send multiple downstream pulses and multiple upstream pulses in the upstream direction, respectively. Assuming that 16 calculation results are ultimately obtained, including 8 downstream pulse timing calculation results and 8 upstream pulse timing calculation results, then after calculating {coarse timing time + (first precision time - second precision time) / 1 system clock cycle time}, 16 pulse timing times can be obtained, including 8 downstream pulse timing times and 8 upstream pulse timing times. In this embodiment, by providing the coarse timing module, the first precision timing module, and the second precision timing module in the timing module 3, the timing accuracy of the timing module 3 can be improved, thereby correspondingly improving the measurement accuracy of the device.
[0076] In addition, considering that there will be a fixed deviation when collecting the time of the system clock cycle, in order to eliminate the fixed deviation and improve the measurement accuracy, the time of one system clock cycle in the above first time relationship formula can be obtained by the difference between the time of M system clock cycles and the time of (M-1) system clock cycles, where M is an integer not less than 2. Since the fixed deviation of the time of M system clock cycles and the fixed deviation of the time of (M-1) system clock cycles are the same, the time of one system clock cycle obtained in the above manner realizes the elimination of the fixed deviation.
[0077] It should be noted that the timing module 3 is not limited to being configured as a coarse timing module, a first precision timing module, and a second precision timing module. Other configurations of the timing module 3 may also be employed. For example, the first precision timing module and the second precision timing module may be combined to form a single precision timing module. This precision timing module may measure the time between the receipt of a pulse timing start signal and the rising edge of the first subsequent system clock as the first precision time, and the time between the receipt of a pulse echo and the rising edge of the first subsequent system clock as the second precision time. This application does not specifically limit the specific configuration of the timing module 3.
[0078] Furthermore, when the coarse timing module, the first precise timing module, and the second precise timing module perform timing operations, the start and stop marks of the timing are not limited to the rising edge of the system clock. The falling edge of the system clock may also be selected as the start and stop marks of the timing. This application does not impose any special limitation on this.
[0079] As a preferred embodiment, the number of the first precision timing module and the number of the second precision timing module are both N, where N is an integer not less than 2;
[0080] The logic operator 4 is further configured to determine the sum of the first precision times obtained by the N first precision timing modules and the sum of the second precision times obtained by the N second precision timing modules. The first time relationship is then: coarse timing time + (sum of the first precision times - sum of the second precision times) / (time of N*1 system clock cycles).
[0081] It should be noted that in this application, timing module 3 performs timing based on the minimum timing unit (i.e., the gate-level delay of timing module 3). Therefore, the first precision time is equal to the number of minimum timing units within the first precision time; the second precision time here is equal to the number of minimum timing units within the second precision time. The time of one system clock cycle is equal to the number of minimum timing units within one system clock cycle.
[0082] Considering that in logic operations, the timing information of a single measurement by the timing module 3 is accidental and the system clock has a fixed deviation, directly calculating based on the timing information of a single measurement will result in low measurement accuracy and poor repeatability.
[0083] To further obtain precise pulse timing information through timing module 3, thereby improving the measurement accuracy of the present device, in this embodiment, the number of both the first and second precision timing modules is N, where N is an integer not less than 2. Specifically, timing module 3 simultaneously inputs the same signal through N channels and internally accumulates the timing results of the first precision time, the timing results of the second precision time, and the time of one system clock cycle, thereby obtaining N times the first precision time, N times the second precision time, and N times the time of one system clock cycle. The accuracy of the result calculated by the improved first time relationship equation = coarse timing time + (sum of N first precision times - sum of N second precision times) / (N * 1 system clock cycle) is N times higher than the accuracy of the result calculated by the unimproved first time relationship equation = coarse timing time + (first precision time - second precision time) / (1 system clock cycle).
[0084] Taking N as 2 as an example, assuming the clock frequency is 4 MHz, the clock period is 250 ns. In single-precision mode, the gate-level delay of timing module 3 is 60 ps. The time of one system clock period (essentially the number of the minimum timing units of one system clock period) is 250 / 0.06=4166. The value of twice the time of one system clock period is 4166*2=8332. Since the period of 250 ns remains unchanged, the time of one system clock period is doubled, so 250 ns / 8332=30 ps, which is equivalent to the gate-level delay becoming 30 ps, that is, the minimum timing unit becomes 30 ps, which is 1 / 2 of the gate-level delay in the original single-precision mode.
[0085] This solution sets the first precision time, the second precision time and the time of one system clock cycle to N. By averaging the time of N system clock cycles and then calculating through the logic operator 4, the original accuracy can be increased by N times, thereby greatly improving the measurement accuracy and solving the problem of poor repeatability.
[0086] It should be noted that, in actual applications, in order to improve the precision by N times, only N / 2 first precision timing modules and second precision timing modules may be provided. In this case, N is a positive even number, and the subsequent first time relationship formula = coarse timing time + (sum of N / 2 first precision times * 2 - sum of N / 2 second precision times * 2) / (N / 2 * 1 system clock cycle time * 2). It can be seen that this method not only achieves N times the precision, i.e., the gate delay becomes 1 / N, but also saves costs.
[0087] As a preferred embodiment, the present invention further includes:
[0088] An adjustable threshold comparator 6 connected to the timing module 3 is used to filter out the echo of the pulse whose amplitude is lower than a preset value based on the reference voltage;
[0089] The timing module 3 is further configured to receive an echo selection instruction and select, according to the echo selection instruction, whether to stop timing when a pulse echo or a filtered pulse echo is received.
[0090] Considering that when measuring flow parameters, the amplitude of the echo of the ultrasonic pulse increases in an envelope shape, and the echo may be interfered by noise, the amplitude of the early echo may be almost the same as the amplitude of the noise, or even the amplitude of the noise may be larger than the amplitude of the early echo. This situation may cause timing errors in the timing module.
[0091] To improve measurement accuracy, this embodiment provides an adjustable threshold comparator 6 connected to the timing module 3. Specifically, the reference voltage of the adjustable threshold comparator 6 is first set above the noise. Since the pulse echo signal is an envelope signal, the amplitude of the pulse echo signal gradually increases over time. Therefore, the pulse echo signal below the preset reference voltage in the early stage of the measurement is filtered out. As the amplitude of the pulse echo increases, the adjustable threshold comparator 6 subsequently outputs the pulse echo with an amplitude greater than the reference voltage to the timing module 3.
[0092] In actual applications, the negative input terminal of the adjustable threshold comparator 6 can input a reference voltage, and the positive input terminal receives the echo of the pulse. The output of the adjustable threshold comparator 6 at the initial stage of measurement may be a low level. When the output of the adjustable threshold comparator 6 becomes a high level, it means that the amplitude of the echo of the pulse is greater than the reference voltage. At this time, the adjustable threshold comparator 6 will output a high level to the timing module 3. If the timing module 3 chooses to stop timing when receiving the echo of the filtered pulse according to the echo selection instruction, the timing module 3 stops timing after receiving the high level.
[0093] It should be noted that timing module 3 selects, based on the echo selection instruction, whether to stop timing upon receipt of a pulse echo signal or a filtered pulse echo signal. Specifically, each pulse start timing time refers to the time when ultrasonic pulse generator 2 receives each pulse timing start signal. However, pulse stop timing times include two types: one is the pulse stop timing time generated by timing module 3 upon receipt of a pulse echo signal, and the other is the pulse stop timing time generated by timing module 3 upon receipt of a filtered pulse echo signal. In the first case, the pulse timing information between the start timing and the stop timing obtained by the timing module 3 is the pulse stop timing time generated from the time when the ultrasonic pulse generator 2 receives each pulse timing start signal to the time when the timing module 3 receives the echo signal of each pulse; in the second case, the pulse timing information between the start timing and the stop timing obtained by the timing module 3 is the pulse stop timing time generated from the time when the ultrasonic pulse generator 2 receives each pulse timing start signal to the time when the timing module 3 receives the echo signal of the filtered pulse. For example, if the third echo signal of the pulse reaches the reference voltage of the adjustable threshold comparator 6, the first echo signal and the second echo signal of the pulse are filtered out, and the pulse timing information between the start timing and the stop timing is the pulse stop timing time generated from the time when the ultrasonic pulse generator 2 receives each pulse timing start signal to the time when the timing module 3 receives the third echo signal of the pulse.
[0094] By setting the adjustable threshold comparator 6, filtering processing of the pulse echo signal is achieved, the problem of noise interfering with the pulse echo signal is solved, and the accuracy of subsequent detection of the pulse echo signal is improved.
[0095] As a preferred embodiment, the present invention further includes:
[0096] The controller 8 is respectively connected to the clock generator 1, the ultrasonic pulse generator 2, the timing module 3, the communication module 5, the logic operator 4, and the adjustable threshold comparator 6, and is used to receive configuration information sent by the external processor through the communication module 5, and configure the frequency of the system clock of the clock generator 1, the number and frequency of the pulses sent by the ultrasonic pulse generator 2, the edge selection of the pulses received by the timing module 3, and the reference voltage of the adjustable threshold comparator 6 according to the configuration information.
[0097] Considering the need to decode the operation commands issued by the external processor and configure each module as needed, in this embodiment, a controller 8 is provided, which is respectively connected to the clock generator 1, ultrasonic pulse generator 2, timing module 3, communication module 5, logical operator 4, and adjustable threshold comparator 6. The controller 8 decodes and executes the operation commands issued by the external processor. The operation commands are mainly used for resetting, initializing, configuring the chip, measuring, reading measurement data, reading circuit status values, etc. The chip configuration command can set other modules as needed, including the frequency of the system clock of the clock generator 1, the number and frequency of pulses sent by the ultrasonic pulse generator 2, the edge selection of the pulses received by the timing module 3, the reference voltage of the adjustable threshold comparator 6, the overflow time setting, the interrupt selection, the internal system clock division coefficient, and whether to calibrate the measurement.
[0098] By setting up the controller 8 to decode the operation commands sent by the external processor and configure each module as needed, it is possible to direct and coordinate the work of each module, thereby improving the operating efficiency of the measuring device.
[0099] Of course, the controller 8 is not limited to configuring the clock generator 1 , the ultrasonic pulse generator 2 , the timing module 3 , the communication module 5 , the logic operator 4 and the adjustable threshold comparator 6 , and this application does not make any special limitation here.
[0100] As a preferred embodiment, the present invention further includes:
[0101] An adjustable threshold comparator 6 connected to the timing module 3 is used to filter out the echo of the pulse whose amplitude is lower than the preset value based on the reference voltage, and output the comparison result of the pulse echo with 0 to the timing module 3 after the reference voltage is adjusted to 0;
[0102] The first wave detection module 7 connected to the adjustable threshold comparator 6 is used to determine the width of the echo of the first pulse output by the adjustable threshold comparator 6 after filtering processing, so that the external processor adjusts the reference voltage of the adjustable threshold comparator 6 to 0 through the controller 8 after receiving the width of the echo of the first pulse, and determines the intensity of the echo of the first pulse based on the width of the echo of the first pulse and the width of the first pulse.
[0103] Specifically, the first wave detection module 7 measures the width of the echo signal of the first pulse output after filtering by the adjustable threshold comparator 6 and sends it to the external processor. The filtered echo signal of the pulse is also sent to the timing module 3. The external processor compares the width of the echo signal of the first pulse with the width of the first pulse emitted by the ultrasonic pulse generator 2 to determine the strength of the echo signal of the first pulse. The external processor adjusts the reference voltage of the adjustable threshold comparator 6 based on the strength of the echo signal of the first pulse to calibrate the filtering process of the echo signal of the next pulse.
[0104] In this embodiment, when the adjustable threshold comparator 6 captures the echo signal of the pulse that reaches the preset reference voltage and determines the width of the echo of the first pulse output by the adjustable threshold comparator 6 after filtering, the external processor will adjust the reference voltage to 0 through the controller 8 after receiving the width of the echo of the first pulse, and output the comparison result of the pulse echo with 0 to the timing module 3 after the reference voltage is adjusted to 0, that is, the timing module 3 receives the stop timing signal. In this way, the echo of the pulse with an amplitude greater than the amplitude of the reference voltage can be directly output to the timing module 3 through the adjustable threshold comparator 6, that is, the width of the pulse output by the adjustable threshold comparator 6 is the same as the width of the echo, thereby ensuring the timing accuracy.
[0105] In addition, the width of the echo signal can be measured by directly reading data through the communication module 5, or by calculating the duty cycle to obtain the width of the echo signal. This application does not specifically limit the specific method used to obtain the width of the echo signal.
[0106] As a preferred embodiment, the present invention further includes:
[0107] The raw data register 9 connected to the timing module 3 and the logic operator 4 respectively is used to store the pulse timing information so that the logic operator 4 can obtain the pulse timing information;
[0108] The result data register 10 connected to the logic operator 4 and the communication module 5 respectively is used to store the pulse timing time so that the external memory can obtain the pulse timing time.
[0109] To prevent the loss of pulse timing information and pulse timing time, this embodiment provides a raw data register 9, respectively connected to timing module 3 and logic operator 4, and a result data register 10, respectively connected to logic operator 4 and communication module 5. Raw data register 9 is used to store pulse timing time, pulse timing information, etc., while result data register 10 is used to store pulse timing time, temperature measurement results, and the measurement result of the pulse echo signal width by first wave detection module 7. By providing raw data register 9 and result data register 10 to store information such as timing results and calculation results, logic operator 4 can retrieve corresponding data from raw data register 9 and result data register 10 when needed, effectively preventing data loss.
[0110] It should be noted that after the result data register 10 stores the data after the measurement operation is completed, the logic operator 4 will generate an interrupt to notify the external processor that the measurement is completed and the data can be read. Among them, there are three situations in which an interrupt will be generated: the operation of the logic operator 4 is completed, the number of pulses received by the logic operator 4 reaches the preset value, and the timing module overflows.
[0111] As a preferred embodiment, the clock generator 1 includes:
[0112] High-frequency clock generator, used to generate system clock;
[0113] A calibration clock connected to a high-frequency clock generator, used to calibrate the system clock.
[0114] Considering that the processor completes instruction execution, state change and other actions under the drive of the system clock, and each module completes various tasks under the drive of the system clock, a clock generator with high stability must be selected.
[0115] In this embodiment, clock generator 1 generates a clock via an external crystal oscillator, and controller 8 performs switching and frequency division on clock generator 1. Clock generator 1 includes a high-frequency clock generator and a calibration clock. The high-frequency clock generator is used to generate the system clock, and the calibration clock is used to calibrate the system clock.
[0116] In addition, a 32.768Khz clock generator is usually selected for the calibration clock because the 32.768Khz clock has the advantage of good stability.
[0117] Of course, the calibration clock here is not limited to a 32.768Khz clock generator, and this application does not make any special restrictions on the specific type of calibration clock.
[0118] As a preferred embodiment, the present invention further includes:
[0119] The temperature measurement module 11 connected to the timing module 3 is used to detect the temperature of the fluid to be measured after receiving a temperature detection command, so that the external processor can correct the flow rate of the fluid to be measured based on the temperature of the fluid to be measured.
[0120] Considering the impact of temperature on the velocity of the fluid to be measured, and to make the flow parameter measurement of this solution more accurate, in this embodiment, a temperature measurement module 11 connected to the timing module 3 is provided. The controller 8 issues a temperature detection command to the temperature measurement module 11. After receiving the temperature detection command, the temperature measurement module 11 detects the temperature of the fluid to be measured and sends the detection result to the external processor. The external processor corrects the flow velocity of the fluid to be measured based on the temperature of the fluid to be measured. By providing the temperature measurement module 11 to detect the temperature of the fluid to be measured and correct the flow velocity of the fluid to be measured, the accuracy of the flow parameter measurement of this solution is improved.
[0121] As a preferred embodiment, the temperature measurement module 11 includes a first charge-discharge circuit based on a reference resistor and a second charge-discharge circuit based on a thermistor, wherein the resistance of the reference resistor is independent of temperature;
[0122] The timing module 3 is further configured to perform a first timing on the charge and discharge time of the first charge and discharge circuit and a second timing on the second charge and discharge circuit, so that the external processor can determine the temperature of the fluid to be measured based on the time difference between the first timing and the second timing.
[0123] In order to provide high-precision and low-power temperature measurement, in this embodiment, the temperature measurement module 11 determines the temperature of the fluid to be measured based on the discharge time of the reference resistor to the capacitor and the discharge time of the thermistor to the capacitor. Specifically, the temperature measurement module 11 includes a first charge and discharge circuit and a second charge and discharge circuit, wherein the first charge and discharge circuit includes a reference resistor and a capacitor, and the second charge and discharge circuit includes a thermistor and a capacitor. The timing module 3 performs a first timing on the charge and discharge time of the first charge and discharge circuit and a second timing on the second charge and discharge circuit, and sends the first timing and the second timing to an external processor. The external processor determines the temperature of the fluid to be measured based on the time difference between the first timing and the second timing, and then corrects the flow rate of the fluid to be measured according to the temperature.
[0124] This embodiment calculates the temperature of the fluid to be measured based on the discharge time of the capacitor by the resistor, thereby improving the accuracy of the temperature measurement module 11 and reducing power consumption.
[0125] In addition, the temperature measurement mode here is not limited to determining the temperature of the fluid to be measured by the discharge time of the reference resistor to the capacitor and the discharge time of the thermistor to the capacitor. This application does not make any special restrictions on which type of temperature measurement mode is specifically selected.
[0126] Please refer to Figure 4 , Figure 4 This is a structural schematic diagram of an ultrasonic flowmeter provided by the present invention.
[0127] The ultrasonic flowmeter includes the flow parameter measuring device as described above, and further includes:
[0128] The external processor 12 connected to the flow parameter measuring device is used to determine the flow rate of the fluid to be measured based on the time difference between the downstream pulse timing time and the upstream pulse timing time in the pulse timing time.
[0129] For an introduction to the ultrasonic flowmeter provided by the present invention, please refer to the above-mentioned device embodiment, and the present invention will not be described in detail here.
[0130] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0131] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A flow parameter measuring device, characterized in that: include: A clock generator for generating a system clock; The clock generator includes: a high-frequency clock generator for generating the system clock; a calibration clock connected to the high-frequency clock generator for calibrating the system clock; An ultrasonic pulse generator connected to the clock generator is used to send pulses to the fluid to be measured when receiving a measurement command, and send a pulse timing start signal to the timing module, wherein the pulses include downstream pulses and upstream pulses; a timing module connected to the clock generator and the ultrasonic pulse generator, respectively, for starting timing upon receiving the pulse timing start signal, stopping timing upon receiving the echo of the pulse, and obtaining pulse timing information based on the start timing, the stop timing and the system clock; a logic operator connected to the timing module, configured to obtain a pulse timing time based on the pulse timing information; A communication module connected to the logic operator is used to transmit the pulse timing time so that an external processor can determine the flow rate of the fluid to be measured based on the time difference between the downstream pulse timing time and the upstream pulse timing time in the pulse timing time; the communication module is a bidirectional serial communication module.
2. The flow parameter measuring device according to claim 1, characterized in that: The timing module is also used to measure the time of one system clock cycle; The timing module includes: a coarse timing module, configured to count the number of system time cycles between the rising edge of the first system clock after receiving the pulse timing start signal and the rising edge of the first system clock after receiving the echo of the pulse as the coarse timing time; A first precision timing module, configured to count the time between receiving the pulse timing start signal and the rising edge of the first system clock thereafter as a first precision time; a second precision timing module, configured to count the time between the receipt of the echo of the pulse and the rising edge of the first system clock thereafter as a second precision time; the logic operator connected to the coarse timing module, the first precise timing module, and the second precise timing module, configured to obtain a pulse timing time based on the coarse timing time, the first precise time, the second precise time, the time of one system clock cycle, and a first time relationship; The first time relationship equation=the coarse timing time+(the first precise time−the second precise time) / 1 system clock cycle.
3. The flow parameter measuring device according to claim 2, characterized in that: There are N first precision timing modules and N second precision timing modules, where N is an integer not less than 2; The logic operator is further configured to determine a sum of the first precision times obtained by the N first precision timing modules and a sum of the second precision times obtained by the N second precision timing modules; Then the first time relationship formula=the coarse timing time+(the sum of the first precise times−the sum of the second precise times) / (N*1 system clock cycle time).
4. The flow parameter measuring device according to claim 1, wherein: Also includes: an adjustable threshold comparator connected to the timing module, configured to filter out the echo of the pulse whose amplitude is lower than a preset value based on a reference voltage; The timing module is further configured to receive an echo selection instruction and select, according to the echo selection instruction, whether to stop timing when the echo of the pulse or the echo of the pulse after filtering is received.
5. The flow parameter measuring device according to claim 4, characterized in that: Also includes: A controller is respectively connected to the clock generator, the ultrasonic pulse generator, the timing module, the communication module, the logic operator, and the adjustable threshold comparator, and is used to receive configuration information sent by the external processor through the communication module, and configure the frequency of the system clock of the clock generator, the number and frequency of pulses sent by the ultrasonic pulse generator, the edge selection of the pulses received by the timing module, and the reference voltage of the adjustable threshold comparator according to the configuration information.
6. The flow parameter measuring device according to claim 5, characterized in that: Also includes: The adjustable threshold comparator connected to the timing module is used to filter out the echo of the pulse whose amplitude is lower than a preset value based on the reference voltage, and output the comparison result between the echo of the pulse and 0 to the timing module after the reference voltage is adjusted to 0; The first wave detection module connected to the adjustable threshold comparator is used to determine the width of the echo of the first pulse output by the adjustable threshold comparator after filtering processing, so that the external processor adjusts the reference voltage of the adjustable threshold comparator to 0 through the controller after receiving the width of the echo of the first pulse, and determines the intensity of the echo of the first pulse based on the width of the echo of the first pulse and the width of the first pulse.
7. The flow parameter measuring device according to claim 1, characterized in that: Also includes: a raw data register connected to the timing module and the logic operator respectively, for storing the pulse timing information so that the logic operator can obtain the pulse timing information; The result data registers connected to the logic operator and the communication module respectively are used to store the pulse timing time so that the external memory can obtain the pulse timing time.
8. The flow parameter measuring device according to any one of claims 1 to 7, characterized in that: Also includes: The temperature measurement module connected to the timing module is used to detect the temperature of the fluid to be measured after receiving a temperature detection command, so that the external processor can correct the flow rate of the fluid to be measured based on the temperature of the fluid to be measured.
9. The flow parameter measuring device according to claim 8, characterized in that: The temperature measurement module includes a first charge-discharge circuit based on a reference resistor and a second charge-discharge circuit based on a thermistor, wherein the resistance of the reference resistor is independent of temperature; The timing module is further configured to perform a first timing on the charge and discharge time of the first charge and discharge circuit and a second timing on the second charge and discharge circuit, so that the external processor can determine the temperature of the fluid to be measured based on the time difference between the first timing and the second timing.
10. An ultrasonic flow meter, characterized in that: The flow parameter measuring device according to any one of claims 1 to 9 further comprises: An external processor connected to the flow parameter measuring device is used to determine the flow rate of the fluid to be measured based on the time difference between the downstream pulse timing time and the upstream pulse timing time in the pulse timing time.
Citation Information
Patent Citations
Novel ultrasonic wave flow velocity and flow rate detector
CN202230100U
Flow parameter measuring device and ultrasonic flowmeter
CN212645798U
KR1017807800000B1