A method and device for measuring water flow based on ultrasonic wave
By dynamically adjusting the voltage value and determining the data weight in ultrasonic flow measurement, the problem of reducing accuracy under changes in environmental noise and flow velocity is solved, and higher measurement accuracy and data quality are achieved.
Patent Information
- Application Number
- CN202411563678.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Traditional ultrasonic flow measurement methods are interfered with factors such as environmental noise and flow rate changes, and it is difficult to accurately capture pulse peaks at fixed thresholds, resulting in a reduced measurement accuracy.
By controlling the first and second ultrasonic receivers to alternately transmit and receive pulse wave signals in a preset period within the target time period, the acquisition data is obtained according to the preset voltage value, and the difference between the forward and countercurrent acquisition times is calculated to adjust the voltage. Value, determine the data validity and weight, and finally calculate the water flow.
Improve the quality of the measurement data and the accuracy of water flow metering, reducing measurement errors due to environmental changes and flow velocity fluctuations.
Smart Images

Figure CN119063803B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of flow measurement, and in particular relates to a water flow measurement method and device based on ultrasonic wave. Background Art
[0002] With the acceleration of urbanization, the improvement of industrialization level and the enhancement of environmental awareness, ultrasonic water meters have been widely used in water resource management due to their high precision and non-contact advantages; the working principle of ultrasonic flow meters is based on the propagation characteristics of ultrasound in fluids. When the ultrasonic transmitter emits sound wave signals, the speed at which these sound waves propagate in the fluid will be affected by the flow rate of the fluid. By comparing the time difference between downstream and upstream propagation, the flow rate of the fluid can be calculated, realizing real-time monitoring of the fluid flow.
[0003] However, traditional ultrasonic flow measurement methods usually use the ultrasonic time difference principle, relying on a fixed threshold to detect the pulse peak and calculate the time difference. This method works well under ideal conditions, but is easily interfered by a variety of factors in actual use. For example, environmental noise, flow rate changes, etc. may cause signal attenuation and waveform distortion, making it difficult for the fixed threshold to accurately capture the pulse peak, resulting in reduced measurement accuracy.
[0004] Patent CN105784032B discloses an ultrasonic water meter dripping metering method, which collects water flow and compares the collected water flow with the starting flow and the minimum flow during measurement, thereby eliminating the error during dripping and improving the metering accuracy of the water meter. However, this method uses the ultrasonic time difference principle when calculating the water flow. When a fixed threshold value appears, it is difficult to accurately capture the pulse peak, and the metering accuracy is low. Summary of the invention
[0005] The purpose of the present invention is to solve the problem of low measurement accuracy when a fixed threshold value is difficult to accurately capture the pulse peak, and to propose a water flow measurement method and device based on ultrasonic wave.
[0006] In a first aspect of the present invention, a method for measuring water flow based on ultrasound is first proposed, wherein a first ultrasonic receiver is installed upstream of a target pipe, and a second ultrasonic receiver is installed downstream of the target pipe, wherein the method comprises:
[0007] Controlling the first ultrasonic receiver and the second ultrasonic receiver to alternately transmit and receive pulse wave signals according to a preset cycle within a target time period, and obtaining collection data of each cycle according to a preset voltage value; the collection data includes downstream collection time and upstream collection time;
[0008] Calculate the difference between the downstream collection time and the upstream collection time in the target cycle to obtain a target difference value, and if the target difference value is greater than or equal to a preset difference value, adjust the preset voltage value, and record the target collection data of the target cycle as an invalid cycle; the target cycle is any preset cycle within the target time period;
[0009] If the target difference is less than the preset difference, the target acquisition data of the target period is recorded as a valid period, and a target change amount is obtained according to the target acquisition data and the acquisition data of a preset period before the target period, and a weight corresponding to the target acquisition data is determined according to the target change amount to obtain a target weight;
[0010] The target water flow corresponding to the target period is obtained according to the target collection data and the target weight, the sum of all target water flows within the target time is recorded as the average water flow, and the total water flow value is obtained according to the average water flow and the number of preset cycles in the target time period.
[0011] Optionally, controlling the first ultrasonic receiver and the second ultrasonic receiver to alternately transmit and receive pulse wave signals according to a preset cycle within the target time period, and obtaining the collected data of each cycle according to a preset voltage value includes:
[0012] For each preset period within the target time period, the transmitter transmits a pulse wave to the receiver, and records the pulse wave transmission time as a first transmission time;
[0013] Determine the peak in the pulse wave that exceeds the preset voltage value for the first time as the first target peak, obtain the number of peaks in the pulse wave before the first target peak to obtain the number of delayed peaks, and determine the delay time according to the number of delayed peaks;
[0014] After the receiver receives the pulse wave, the first peak in the pulse wave whose peak value exceeds the preset voltage value in the time series is recorded as the second target peak, and the time when the receiver receives the second target peak is obtained and recorded as the first theoretical time;
[0015] Obtaining a collection time according to the first theoretical time, the first emission time, and the delay time;
[0016] When the transmitter is the first ultrasonic receiver and the receiver is the second ultrasonic receiver, the collection time is the downstream collection time; when the transmitter is the second ultrasonic receiver and the receiver is the first ultrasonic receiver, the collection time is the upstream collection time.
[0017] Optionally, calculating the difference between the downstream collection time and the upstream collection time in the target period to obtain a target difference value, and if the target difference value is greater than a preset difference value, adjusting the preset voltage value further includes:
[0018] Determine the peak value before the second target peak in the pulse wave to obtain a first peak value, determine the peak value after the second target peak to obtain a second peak value, and calculate the difference between the first peak value and the second peak value to obtain a target peak value difference;
[0019] Obtain the average value of the target peak number differences corresponding to a preset number of preset periods before the current target period to obtain the target mean;
[0020] If the absolute value of the target peak number difference is less than or equal to the target mean value, the preset voltage value is not adjusted;
[0021] If the target peak number difference is greater than the target mean value, reducing the preset voltage value;
[0022] If the target peak number difference is less than the negative number of the target mean value, the preset voltage value is increased.
[0023] Optionally, obtaining a target change amount according to the target collected data and collected data of a preset period before the target period, and determining a weight corresponding to the target collected data according to the target change amount to obtain a target weight includes:
[0024] By formula Get the target change amount;
[0025] Then through the formula Get the target weight;
[0026] in, is the downstream acquisition time in the target acquisition data, is the countercurrent acquisition time in the target acquisition data, is the downstream collection time collected in a preset period before the target period, is the countercurrent collection time collected in a preset period before the target period, is the preset difference, is the target difference, is the maximum target change, is the target change amount.
[0027] Optionally, obtaining the target water flow corresponding to the target period according to the target collection data and the target weight includes:
[0028] Acquire the installation distance and angle between the first ultrasonic receiver and the second ultrasonic receiver to obtain a target distance and a target angle, and acquire the radius of the target pipe to obtain a target radius;
[0029] By formula Obtaining a target water flow rate corresponding to the target cycle;
[0030] in, is the target water flow rate, is the target weight, is the countercurrent acquisition time in the target acquisition data, is the downstream acquisition time in the target acquisition data, is the speed of ultrasound in water, is a natural constant, is the target radius, is the target distance, is the target angle, and N is the total number of valid cycles.
[0031] In a second aspect of the present invention, an ultrasonic water flow measurement device is provided, wherein a first ultrasonic receiver is installed upstream of a target pipe, and a second ultrasonic receiver is installed downstream of the target pipe, wherein the device comprises:
[0032] A data collection module is used to control the first ultrasonic receiver and the second ultrasonic receiver to alternately transmit and receive pulse wave signals according to a preset cycle within a target time period, and obtain the collection data of each cycle according to a preset voltage value; the collection data includes a downstream collection time and a reverse collection time;
[0033] A voltage value adjustment module is used to calculate the difference between the downstream collection time and the upstream collection time in the target period to obtain a target difference value, and if the target difference value is greater than or equal to a preset difference value, adjust the preset voltage value, and record the target collection data of the target period as an invalid period; the target period is any preset period within the target time period;
[0034] A target weight determination module is used for recording the target acquisition data of the target period as a valid period if the target difference is less than a preset difference, and obtaining a target change amount according to the target acquisition data and the acquisition data of a preset period before the target period, and determining the weight corresponding to the target acquisition data according to the target change amount to obtain a target weight;
[0035] The water flow calculation module is used to obtain the target water flow corresponding to the target period according to the target collection data and the target weight, record the sum of all target water flows within the target time as the average water flow, and obtain the total water flow value according to the average water flow and the number of preset cycles in the target time period.
[0036] Optionally, the data collection module includes:
[0037] A pulse wave transmission time determination module, configured to transmit a pulse wave from a transmitter to a receiver for each preset period within the target time period, and record the pulse wave transmission time as a first transmission time;
[0038] A delay time determination module, used for determining the first peak in the pulse wave that exceeds the preset voltage value as the first target peak, obtaining the number of peaks in the pulse wave before the first target peak to obtain the number of delayed peaks, and determining the delay time according to the number of delayed peaks;
[0039] The theoretical time determination module is used for, after the receiver receives the pulse wave, recording the first peak in the pulse wave in the time series that exceeds the preset voltage value as the second target peak, and obtaining the time when the receiver receives the second target peak as the first theoretical time;
[0040] An acquisition time determination module, configured to obtain an acquisition time according to the first theoretical time, the first emission time and the delay time;
[0041] When the transmitter is the first ultrasonic receiver and the receiver is the second ultrasonic receiver, the collection time is the downstream collection time; when the transmitter is the second ultrasonic receiver and the receiver is the first ultrasonic receiver, the collection time is the upstream collection time.
[0042] Optionally, the voltage value adjustment module includes:
[0043] a target peak number difference calculation module, used for determining the peak value before the second target peak in the pulse wave to obtain a first peak number, the peak value after the second target peak to obtain a second peak number, and calculating the difference between the first peak number and the second peak number to obtain a target peak number difference;
[0044] A target mean value determination module is used to obtain the average value of the target peak number differences corresponding to a preset number of preset periods before the current target period to obtain the target mean value;
[0045] A first voltage adjustment module, configured to not adjust the preset voltage value if the absolute value of the target peak number difference is less than or equal to the target mean value;
[0046] A second voltage adjustment module, configured to reduce the preset voltage value if the target peak number difference is greater than the target mean value;
[0047] The third voltage adjustment module is used to increase the preset voltage value if the target peak number difference is less than the negative number of the target mean value.
[0048] Optionally, the target weight determination module includes:
[0049] By formula Get the target change amount;
[0050] Then through the formula Get the target weight;
[0051] in, is the downstream acquisition time in the target acquisition data, is the countercurrent acquisition time in the target acquisition data, is the downstream collection time collected in a preset period before the target period, is the countercurrent collection time collected in a preset period before the target period, is the preset difference, is the target difference, is the maximum target change, is the target change amount.
[0052] Optionally, the water flow calculation module includes:
[0053] A parameter acquisition module, used to acquire the installation distance and angle between the first ultrasonic receiver and the second ultrasonic receiver to obtain a target distance and a target angle, and to acquire the radius of the target pipe to obtain a target radius;
[0054] By formula Obtaining a target water flow rate corresponding to the target cycle;
[0055] in, is the target water flow rate, is the target weight, is the countercurrent acquisition time in the target acquisition data, is the downstream acquisition time in the target acquisition data, is the speed of ultrasound in water, is a natural constant, is the target radius, is the target distance, is the target angle, and N is the total number of valid cycles.
[0056] Beneficial effects of the present invention:
[0057] The present invention proposes a water flow measurement method based on ultrasound, which controls a first ultrasonic receiver and a second ultrasonic receiver to alternately transmit and receive pulse wave signals according to a preset cycle within a target time period, and obtains collection data of each cycle according to a preset voltage value; calculates the difference between the downstream collection time and the upstream collection time in the target cycle to obtain a target difference, and if the target difference is greater than or equal to the preset difference, adjusts the preset voltage value, and records the target collection data of the target cycle as an invalid cycle; if the target difference is less than the preset difference, records the target collection data of the target cycle as a valid cycle, and obtains a target change amount according to the target collection data and the collection data of a preset cycle before the target cycle, and determines the weight corresponding to the target collection data according to the target change amount to obtain the target weight; obtains the target water flow corresponding to the target cycle according to the target collection data and the target weight, and obtains the target water flow corresponding to all preset cycles in the target time period to obtain the total water flow value. By calculating the target difference, if the target difference is greater than or equal to the preset difference, it is considered that the collected data of the current cycle is disturbed, and the voltage value is adjusted, and the cycle of the current collected data is recorded as an invalid cycle, thereby avoiding unreliable data from being included in the calculation, improving the quality of the measurement data, and determining its weight for the collected data of the valid cycle according to the target change amount, so that the final calculated water flow is more accurate and the measurement accuracy of the water flow is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The present invention will be further described below in conjunction with the accompanying drawings.
[0059] Figure 1 A flow chart of a method for measuring water flow based on ultrasound is provided for an embodiment of the present invention;
[0060] Figure 2 A schematic structural diagram of a water flow measurement device based on ultrasound is provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the present invention, the description of "first", "second", etc. is only used for descriptive purposes, and cannot be understood as indicating or implying its relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0062] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.
[0063] The embodiment of the present invention provides a method for measuring water flow based on ultrasound. Figure 1 , Figure 1 A flow chart of a water flow measurement method based on ultrasound provided by an embodiment of the present invention. A first ultrasonic receiver is installed upstream of a target pipeline, and a second ultrasonic receiver is installed downstream of the target pipeline, wherein the method comprises:
[0064] S101, controlling the first ultrasonic receiver and the second ultrasonic receiver to alternately transmit and receive pulse wave signals according to a preset cycle within a target time period, and obtaining collection data of each cycle according to a preset voltage value;
[0065] S102, calculating the difference between the downstream collection time and the upstream collection time in the target cycle to obtain a target difference value, and if the target difference value is greater than or equal to a preset difference value, adjusting the preset voltage value, and recording the target collection data of the target cycle as an invalid cycle;
[0066] S103, if the target difference is less than the preset difference, the target collection data of the target period is recorded as a valid period, and a target change amount is obtained according to the target collection data and the collection data of a preset period before the target period, and a weight corresponding to the target collection data is determined according to the target change amount to obtain a target weight;
[0067] S104, obtaining the target water flow corresponding to the target period according to the target collection data and the target weight, recording the sum of all target water flows within the target time as the average water flow, and obtaining the total water flow value according to the average water flow and the number of preset cycles within the target time period.
[0068] The collected data includes downstream collection time and upstream collection time; the target period is any preset period within the target time period.
[0069] An ultrasonic water flow measurement method provided by an embodiment of the present invention calculates a target difference. If the target difference is greater than or equal to a preset difference, it is considered that the collected data of the current period is disturbed, and the voltage value is adjusted, and the period of the current collected data is recorded as an invalid period, thereby avoiding incorporating unreliable data into the calculation, improving the quality of the measurement data, and determining the weight of the collected data of the valid period according to the target change amount, so that the finally calculated water flow is more accurate, thereby improving the measurement accuracy of the water flow.
[0070] In one implementation, the target pipe is a pipe for measuring water flow through a water meter, the first ultrasonic receiver is installed above the water pipe, and the second ultrasonic receiver is installed below the water pipe. The relative positions of the first ultrasonic receiver and the second ultrasonic receiver are such that a straight line connecting the two installation positions on the circular cross-section of the pipe passes through the center of the circle; the first ultrasonic receiver and the second ultrasonic receiver are of the same model, and the model used is a commonly used model on the market.
[0071] In one implementation, the collected data of each cycle is obtained according to a preset voltage value, where each cycle is a preset cycle within a target time period; the preset cycle, preset voltage value and preset difference are determined by a technician.
[0072] In one implementation, the total water flow value is obtained based on the average water flow and the number of preset cycles in the target time period. Specifically, the total water flow is obtained by multiplying the average water flow by the preset number of cycles. The water flow in the effective period is calculated as the average value, and then the water flow in the entire target time period is calculated, thereby improving the accuracy of water flow measurement.
[0073] In one implementation, based on the target difference between the downstream and upstream collection times, when the detected difference is greater than the preset difference, the voltage value of the ultrasonic emission can be automatically adjusted, which can effectively reduce the measurement error caused by environmental changes, flow velocity fluctuations or noise interference; by judging whether the collected data within the target period is valid, the quality of the data can be monitored in real time, avoiding the inclusion of unreliable data in the total water flow calculation, and ensuring the accuracy of the final result.
[0074] In one implementation, by calculating the difference between the downstream collection time and the upstream collection time, the actual flow situation can be reflected more accurately, avoiding the erroneous interpretation caused by the fixed threshold, and effectively eliminating the deviation caused by the unidirectional flow; the target change amount is calculated by the target collection data and the collection data of the previous cycle, which can reflect the changing trend of the flow, and the weight calculation makes each valid data in the calculation of the total water flow, which improves the overall measurement accuracy.
[0075] In one implementation, the data of the target cycle is divided into valid cycles and invalid cycles based on the judgment of the target difference, which helps to eliminate unreliable data and reduce the impact of noise on the overall results; by summarizing the valid cycles, the final total water flow value is based on the data of multiple valid cycles. This data processing method helps to improve the accuracy of the measurement results.
[0076] In one embodiment, the first ultrasonic receiver and the second ultrasonic receiver are controlled to alternately transmit and receive pulse wave signals according to a preset cycle within a target time period, and the collected data of each cycle is obtained according to a preset voltage value, including:
[0077] For each preset period within the target time period, the transmitter transmits a pulse wave to the receiver, and records the pulse wave transmission time as the first transmission time;
[0078] Determine the first peak in the pulse wave that exceeds the preset voltage value as the first target peak, obtain the number of peaks in the pulse wave before the first target peak to obtain the number of delayed peaks, and determine the delay time according to the number of delayed peaks;
[0079] After the receiver receives the pulse wave, the first peak in the pulse wave in the time series that exceeds the preset voltage value is recorded as the second target peak, and the time when the receiver receives the second target peak is obtained and recorded as the first theoretical time;
[0080] Obtaining the acquisition time according to the first theoretical time, the first emission time and the delay time;
[0081] When the transmitter is the first ultrasonic receiver and the receiver is the second ultrasonic receiver, the collection time is the downstream collection time; when the transmitter is the second ultrasonic receiver and the receiver is the first ultrasonic receiver, the collection time is the upstream collection time.
[0082] In one implementation, the acquisition time is obtained according to the first theoretical time, the first emission time and the delay time by subtracting the first emission time from the first theoretical time and then subtracting the delay time.
[0083] In one implementation, by setting a preset voltage value, the solution can accurately identify the target peak in the pulse wave, and use the number of peaks before the target peak, that is, the number of delayed peaks, to determine the delay time. This can effectively reduce measurement errors caused by signal attenuation or interference, and improve the accuracy of flow measurement. By dynamically monitoring the changes in peaks within each cycle, the solution can adapt to measurement requirements under different flow rates and fluid conditions. When the flow rate changes, the system can still accurately capture the peak signal, thereby improving the accuracy of flow measurement.
[0084] In one implementation, setting a standard for a peak value exceeding a preset voltage value helps eliminate the influence of noise signals. Only peaks that meet this standard are considered valid data, thereby ensuring the quality and reliability of the data.
[0085] In one embodiment, the difference between the downstream collection time and the upstream collection time in the target cycle is calculated to obtain a target difference value. If the target difference value is greater than a preset difference value, adjusting the preset voltage value further includes:
[0086] Determine the peak value before the second target peak in the pulse wave to obtain a first peak value, determine the peak value after the second target peak to obtain a second peak value, and calculate the difference between the first peak value and the second peak value to obtain a target peak value difference;
[0087] Obtain the average value of the target peak number differences corresponding to a preset number of preset periods before the current target period to obtain the target mean;
[0088] If the absolute value of the target peak number difference is less than or equal to the target mean value, the preset voltage value is not adjusted;
[0089] If the target peak number difference is greater than the target mean, the preset voltage value is reduced;
[0090] If the target peak number difference is less than the negative of the target mean value, the preset voltage value is increased.
[0091] In one implementation, by calculating the number of peaks before and after the second target peak, the change in fluid state can be reflected more accurately, the signal characteristics can be effectively captured, and the measurement error can be reduced; by dynamically adjusting the preset voltage value by comparing the relationship between the target peak number difference and the target mean, the measurement conditions can be adaptively optimized according to the change in fluid state, thereby reducing the impact of interference factors on the measurement results.
[0092] In one implementation, a preset number of preset cycles are determined by a technician; when the target peak number difference is greater than the target mean, the current threshold mainly captures the peak after the second target peak, and the voltage value corresponding to the peak on the left of the second target peak is the preset voltage value; when the target peak number difference is less than the negative number of the target mean, the current threshold mainly captures the peak before the second target peak, and the voltage value corresponding to the peak on the right of the second target peak is the preset voltage value; if the absolute value of the target peak number difference is less than or equal to the target mean, it indicates that the current threshold setting is normal and the second target peak can be captured normally. At this time, the second target peak is the first target peak.
[0093] In one implementation, by calculating the average of the target peak number differences of several preset periods before the target period, the overall performance of the system can be evaluated more comprehensively and the calculation accuracy can be improved.
[0094] In one embodiment, obtaining a target change amount according to the target collected data and collected data of a preset period before the target period, and determining a weight corresponding to the target collected data according to the target change amount to obtain a target weight includes:
[0095] By formula Get the target change amount;
[0096] Then through the formula Get the target weight;
[0097] in, is the downstream acquisition time in the target acquisition data, is the countercurrent acquisition time in the target acquisition data, The downstream collection time collected in the previous preset period of the target period, The countercurrent collection time collected in the previous preset cycle of the target cycle, is the preset difference, is the target difference, is the maximum target change, is the target change amount, and N is the total number of effective cycles.
[0098] In one implementation, the maximum target change is determined by a technician, and the downstream and upstream times in the collected data are differentially reflected in the measurement to ensure more accurate flow calculation. The target weight is determined by combining the data of the current cycle with the data of the previous cycle. This method effectively utilizes historical data to make flow measurement more stable and reliable.
[0099] In one implementation, w1+w2+w3+…+wn=1, and w1, w2, w3+…+wn are greater than zero.
[0100] In one embodiment, obtaining the target water flow corresponding to the target period according to the target collection data and the target weight includes:
[0101] The installation distance and angle between the first ultrasonic receiver and the second ultrasonic receiver are obtained to obtain the target distance and target angle, and the radius of the target pipe is obtained to obtain the target radius;
[0102] By formula Obtain the target water flow corresponding to the target cycle;
[0103] in, is the target water flow rate, is the target weight, is the countercurrent acquisition time in the target acquisition data, is the downstream acquisition time in the target acquisition data, is the speed of ultrasound in water, is a natural constant, is the target radius, is the target distance, is the target angle.
[0104] In one implementation, the target weight is combined with the collected data to effectively balance the impact of data under different conditions, ensure dynamic adjustment during the measurement process, improve the stability of flow calculation, and improve the accuracy of ultrasonic water flow measurement by comprehensively considering multiple factors such as distance, angle, radius, etc.
[0105] Based on the same inventive concept, the present invention also provides an ultrasonic water flow measurement device. Figure 2 , Figure 2 A schematic structural diagram of an ultrasonic water flow measurement device provided in an embodiment of the present invention, wherein a first ultrasonic receiver is installed upstream of a target pipe, and a second ultrasonic receiver is installed downstream of the target pipe, wherein the device comprises:
[0106] The data collection module is used to control the first ultrasonic receiver and the second ultrasonic receiver to alternately transmit and receive pulse wave signals according to a preset cycle within a target time period, and obtain the collection data of each cycle according to a preset voltage value; the collection data includes the downstream collection time and the upstream collection time;
[0107] The voltage value adjustment module is used to calculate the difference between the downstream collection time and the upstream collection time in the target period to obtain a target difference. If the target difference is greater than or equal to a preset difference, the preset voltage value is adjusted, and the target collection data of the target period is recorded as an invalid period; the target period is any preset period within the target time period;
[0108] A target weight determination module is used to record the target collection data of the target period as a valid period if the target difference is less than a preset difference, and obtain a target change amount according to the target collection data and the collection data of a preset period before the target period, and determine the weight corresponding to the target collection data according to the target change amount to obtain the target weight;
[0109] The water flow calculation module is used to obtain the target water flow corresponding to the target period according to the target collection data and the target weight, record the sum of all target water flows within the target time as the average water flow, and obtain the total water flow value according to the average water flow and the number of preset cycles within the target time period.
[0110] An ultrasonic water flow measurement device provided by an embodiment of the present invention calculates a target difference. If the target difference is greater than or equal to a preset difference, it is considered that the collected data of the current period is disturbed, and the voltage value is adjusted, and the period of the current collected data is recorded as an invalid period, thereby avoiding incorporating unreliable data into the calculation, improving the quality of the measurement data, and determining the weight of the collected data of the valid period according to the target change amount, so that the finally calculated water flow is more accurate, thereby improving the measurement accuracy of the water flow.
[0111] In one implementation, the data collection module includes:
[0112] A pulse wave transmission time determination module is used for transmitting a pulse wave from the transmitter to the receiver for each preset period within the target time period, and recording the pulse wave transmission time as a first transmission time;
[0113] A delay time determination module, used to determine the first peak in the pulse wave that exceeds the preset voltage value as the first target peak, obtain the number of peaks in the pulse wave before the first target peak to obtain the number of delayed peaks, and determine the delay time according to the number of delayed peaks;
[0114] The theoretical time determination module is used for recording the first peak of the pulse wave in the time sequence exceeding the preset voltage value as the second target peak after the receiver receives the pulse wave, and obtaining the time when the receiver receives the second target peak as the first theoretical time;
[0115] A collection time determination module, used to obtain the collection time according to the first theoretical time, the first emission time and the delay time;
[0116] When the transmitter is the first ultrasonic receiver and the receiver is the second ultrasonic receiver, the collection time is the downstream collection time; when the transmitter is the second ultrasonic receiver and the receiver is the first ultrasonic receiver, the collection time is the upstream collection time.
[0117] In one implementation, the voltage value adjustment module includes:
[0118] A target peak number difference calculation module is used to determine the peak value before the second target peak in the pulse wave to obtain a first peak number, the peak value after the second target peak to obtain a second peak number, and calculate the difference between the first peak number and the second peak number to obtain a target peak number difference;
[0119] A target mean value determination module is used to obtain the average value of the target peak number differences corresponding to a preset number of preset periods before the current target period to obtain the target mean value;
[0120] A first voltage adjustment module, configured not to adjust the preset voltage value if the absolute value of the target peak number difference is less than or equal to the target mean value;
[0121] A second voltage adjustment module, configured to reduce a preset voltage value if the target peak number difference is greater than the target mean value;
[0122] The third voltage adjustment module is used to increase the preset voltage value if the target peak number difference is less than the negative number of the target mean value.
[0123] In one implementation, the target weight determination module includes:
[0124] By formula Get the target change amount;
[0125] Then through the formula Get the target weight;
[0126] in, is the downstream acquisition time in the target acquisition data, is the countercurrent acquisition time in the target acquisition data, The downstream collection time collected in the previous preset period of the target period, The countercurrent collection time collected in the previous preset cycle of the target cycle, is the preset difference, is the target difference, is the maximum target change, is the target change amount, and N is the total number of effective cycles.
[0127] In one implementation, the water flow calculation module includes:
[0128] A parameter acquisition module, used to acquire the installation distance and angle between the first ultrasonic receiver and the second ultrasonic receiver to obtain a target distance and a target angle, and to acquire the radius of the target pipe to obtain a target radius;
[0129] By formula Obtain the target water flow corresponding to the target cycle;
[0130] in, is the target water flow rate, is the target weight, is the countercurrent acquisition time in the target acquisition data, is the downstream acquisition time in the target acquisition data, is the speed of ultrasound in water, is a natural constant, is the target radius, is the target distance, is the target angle.
[0131] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A water flow measurement method based on ultrasound, wherein a first ultrasonic receiver is installed upstream of a target pipe, and a second ultrasonic receiver is installed downstream of the target pipe, characterized in that: The method comprises: Controlling the first ultrasonic receiver and the second ultrasonic receiver to alternately transmit and receive pulse wave signals according to a preset cycle within a target time period, and obtaining collection data of each cycle according to a preset voltage value; the collection data includes downstream collection time and upstream collection time; Calculate the difference between the downstream collection time and the upstream collection time in the target cycle to obtain a target difference value, and if the target difference value is greater than or equal to a preset difference value, adjust the preset voltage value, and record the target collection data of the target cycle as an invalid cycle; the target cycle is any preset cycle within the target time period; If the target difference is less than the preset difference, the target acquisition data of the target period is recorded as a valid period, and a target change amount is obtained according to the target acquisition data and the acquisition data of a preset period before the target period, and a weight corresponding to the target acquisition data is determined according to the target change amount to obtain a target weight; The target water flow corresponding to the target period is obtained according to the target collection data and the target weight, the sum of all target water flows within the target time is recorded as the average water flow, and the total water flow value is obtained according to the average water flow and the number of preset cycles within the target time period; The first ultrasonic receiver and the second ultrasonic receiver are controlled to alternately transmit and receive pulse wave signals according to a preset cycle within the target time period, and the collected data of each cycle is obtained according to the preset voltage value, including: For each preset period within the target time period, the transmitter transmits a pulse wave to the receiver, and records the pulse wave transmission time as a first transmission time; Determine the peak in the pulse wave that exceeds the preset voltage value for the first time as the first target peak, obtain the number of peaks in the pulse wave before the first target peak to obtain the number of delayed peaks, and determine the delay time according to the number of delayed peaks; After the receiver receives the pulse wave, the first peak in the pulse wave whose peak value exceeds the preset voltage value in the time series is recorded as the second target peak, and the time when the receiver receives the second target peak is obtained and recorded as the first theoretical time; Obtaining a collection time according to the first theoretical time, the first emission time, and the delay time; When the transmitter is the first ultrasonic receiver and the receiver is the second ultrasonic receiver, the collection time is the downstream collection time; when the transmitter is the second ultrasonic receiver and the receiver is the first ultrasonic receiver, the collection time is the upstream collection time; Obtaining a target change amount according to the target collected data and collected data of a preset period before the target period, and determining a weight corresponding to the target collected data according to the target change amount to obtain a target weight includes: By formula Get the target change amount; Then through the formula Get the target weight; in, is the downstream acquisition time in the target acquisition data, is the countercurrent acquisition time in the target acquisition data, is the downstream collection time collected in a preset period before the target period, is the countercurrent collection time collected in a preset period before the target period, is the preset difference, is the target difference, is the maximum target change, is the target change amount, and N is the total number of effective cycles.
2. The method for measuring water flow based on ultrasound according to claim 1, characterized in that: Calculating the difference between the downstream collection time and the upstream collection time in the target cycle to obtain a target difference value, and if the target difference value is greater than a preset difference value, adjusting the preset voltage value further includes: Determine the peak value before the second target peak in the pulse wave to obtain a first peak value, determine the peak value after the second target peak to obtain a second peak value, and calculate the difference between the first peak value and the second peak value to obtain a target peak value difference; Obtain the average value of the target peak number differences corresponding to a preset number of preset periods before the current target period to obtain the target mean; If the absolute value of the target peak number difference is less than or equal to the target mean value, the preset voltage value is not adjusted; If the target peak number difference is greater than the target mean value, reducing the preset voltage value; If the target peak number difference is less than the negative number of the target mean value, the preset voltage value is increased.
3. The method for measuring water flow based on ultrasound according to claim 1, characterized in that: Obtaining the target water flow corresponding to the target period according to the target collection data and the target weight includes: Acquire the installation distance and angle between the first ultrasonic receiver and the second ultrasonic receiver to obtain a target distance and a target angle, and acquire the radius of the target pipe to obtain a target radius; By formula Obtaining a target water flow rate corresponding to the target cycle; in, is the target water flow rate, is the target weight, is the countercurrent acquisition time in the target acquisition data, is the downstream acquisition time in the target acquisition data, is the speed of ultrasound in water, is a natural constant, is the target radius, is the target distance, is the target angle.
4. A water flow measurement device based on ultrasonic wave, wherein a first ultrasonic receiver is installed upstream of a target pipe, and a second ultrasonic receiver is installed downstream of the target pipe, characterized in that: The device comprises: A data collection module is used to control the first ultrasonic receiver and the second ultrasonic receiver to alternately transmit and receive pulse wave signals according to a preset cycle within a target time period, and obtain the collection data of each cycle according to a preset voltage value; the collection data includes a downstream collection time and a reverse collection time; A voltage value adjustment module is used to calculate the difference between the downstream collection time and the upstream collection time in the target period to obtain a target difference value, and if the target difference value is greater than or equal to a preset difference value, adjust the preset voltage value, and record the target collection data of the target period as an invalid period; the target period is any preset period within the target time period; A target weight determination module is used for recording the target acquisition data of the target period as a valid period if the target difference is less than a preset difference, and obtaining a target change amount according to the target acquisition data and the acquisition data of a preset period before the target period, and determining the weight corresponding to the target acquisition data according to the target change amount to obtain a target weight; A water flow calculation module is used to obtain the target water flow corresponding to the target period according to the target collection data and the target weight, record the sum of all target water flows within the target time as the average water flow, and obtain the total water flow value according to the average water flow and the number of preset cycles within the target time period; The data collection module includes: A pulse wave transmission time determination module, configured to transmit a pulse wave from a transmitter to a receiver for each preset period within the target time period, and record the pulse wave transmission time as a first transmission time; A delay time determination module, used for determining the first peak in the pulse wave that exceeds the preset voltage value as the first target peak, obtaining the number of peaks in the pulse wave before the first target peak to obtain the number of delayed peaks, and determining the delay time according to the number of delayed peaks; The theoretical time determination module is used for, after the receiver receives the pulse wave, recording the first peak in the pulse wave in the time series that exceeds the preset voltage value as the second target peak, and obtaining the time when the receiver receives the second target peak as the first theoretical time; An acquisition time determination module, configured to obtain an acquisition time according to the first theoretical time, the first emission time and the delay time; When the transmitter is the first ultrasonic receiver and the receiver is the second ultrasonic receiver, the collection time is the downstream collection time; when the transmitter is the second ultrasonic receiver and the receiver is the first ultrasonic receiver, the collection time is the upstream collection time; The target weight determination module comprises: By formula Get the target change amount; Then through the formula Get the target weight; in, is the downstream acquisition time in the target acquisition data, is the countercurrent acquisition time in the target acquisition data, is the downstream collection time collected in a preset period before the target period, is the countercurrent collection time collected in a preset period before the target period, is the preset difference, is the target difference, is the maximum target change, is the target change amount, and N is the total number of effective cycles.
5. The ultrasonic water flow measurement device according to claim 4, characterized in that: The voltage value adjustment module comprises: a target peak number difference calculation module, used for determining the peak value before the second target peak in the pulse wave to obtain a first peak number, the peak value after the second target peak to obtain a second peak number, and calculating the difference between the first peak number and the second peak number to obtain a target peak number difference; A target mean value determination module is used to obtain the average value of the target peak number differences corresponding to a preset number of preset periods before the current target period to obtain the target mean value; A first voltage adjustment module, configured to not adjust the preset voltage value if the absolute value of the target peak number difference is less than or equal to the target mean value; A second voltage adjustment module, configured to reduce the preset voltage value if the target peak number difference is greater than the target mean value; The third voltage adjustment module is used to increase the preset voltage value if the target peak number difference is less than the negative number of the target mean value.
6. The ultrasonic water flow measurement device according to claim 4, characterized in that: The water flow calculation module comprises: A parameter acquisition module, used to acquire the installation distance and angle between the first ultrasonic receiver and the second ultrasonic receiver to obtain a target distance and a target angle, and to acquire the radius of the target pipe to obtain a target radius; By formula Obtaining a target water flow rate corresponding to the target cycle; in, is the target water flow rate, is the target weight, is the countercurrent acquisition time in the target acquisition data, is the downstream acquisition time in the target acquisition data, is the speed of ultrasound in water, is a natural constant, is the target radius, is the target distance, is the target angle.
Citation Information
Patent Citations
Ultrasonic water meter drip measurement method
CN105784032B
Metering method of fluid meter
CN112665666A
Flow measuring device for fluid
JP2005257359A