Metering method and device for flow of ultrasonic water meter, equipment and storage medium
By identifying the impact of air bubbles in the ultrasonic water meter, obtaining the number of ultrasonic waves transmitted and received, and calculating the target transmission time, the metering accuracy problem caused by air bubbles is solved, ensuring the accuracy of water meter measurement.
Patent Information
- Application Number
- CN202511104213.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-11
Smart Images

Figure CN120927077A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of ultrasonic metering technology, and more specifically, to a method, apparatus, equipment, and storage medium for measuring the flow rate of an ultrasonic water meter. Background Technology
[0002] Currently, with the widespread application of ultrasonic water meters, more and more users are installing them to monitor their water consumption. Ultrasonic water meters use ultrasonic signals transmitted in water, measuring the transmission time of the ultrasound waves upstream and downstream to calculate water consumption. However, because water is the transmission medium for ultrasonic signals, the presence of air bubbles in the water can obstruct the transmission path, affecting the transmission speed and signal amplitude attenuation, thus impacting the accuracy of the ultrasonic water meter.
[0003] In related technologies, since the ultrasonic signal transmission medium is water, although exhaust equipment is installed in the water supply network, there are still problems such as untimely exhaust and large temperature differences that cause oxygen to be released from the water, resulting in the formation of bubbles. These bubbles may be in the transmission path of the ultrasonic signal, thus affecting the ultrasonic transmission speed and the attenuation of the signal amplitude. This leads to detection errors in the transmission time of the ultrasonic signal, which in turn affects the metering accuracy of the ultrasonic water meter, or even causes the meter to fail to measure. Summary of the Invention
[0004] To address the aforementioned technical problems, embodiments of this application provide a method, apparatus, device, and storage medium for measuring the flow rate of an ultrasonic water meter, thereby resolving the technical issue of air bubbles generated within the water meter pipeline affecting the measurement accuracy of the ultrasonic water meter.
[0005] According to one aspect of the embodiments of this application, a method for measuring the flow rate of an ultrasonic water meter is provided, comprising:
[0006] In another exemplary embodiment, it is determined whether there are air bubbles affecting the water meter pipe; if there are air bubbles affecting the water meter pipe, the number of ultrasonic waves emitted and received in the water meter pipe within a preset sampling period is obtained; the target transmission time of the ultrasonic signal is determined based on the number of ultrasonic waves emitted and received; and the water consumption per unit time flowing through the water meter is determined based on the target transmission time of the ultrasonic signal.
[0007] In another exemplary embodiment, ultrasonic transceivers are provided at both ends of the water meter. The ultrasonic signal is emitted by the ultrasonic transceiver at one end of the water meter, transmitted through the water meter pipe to the other end of the water meter, and received by the ultrasonic transceiver at the other end of the water meter. Determining whether there are air bubbles affecting the water meter pipe includes: detecting the ultrasonic signal in the water meter pipe to obtain ultrasonic signal parameters; and determining whether there are air bubbles affecting the water meter pipe based on the ultrasonic signal parameters.
[0008] In another exemplary embodiment, the ultrasonic signal parameters include at least one of ultrasonic signal transmission time, signal amplitude, and half-wave ratio; determining whether there is an air bubble effect in the water meter pipeline based on the ultrasonic signal parameters includes: if the ultrasonic signal parameters show abnormal fluctuations, obtaining the difference between the maximum and minimum signal amplitudes within a preset detection period, and the median of the half-wave ratio; if the deviation between the difference between the maximum and minimum signal amplitudes and a first normal threshold is greater than a first preset amplitude, and the deviation between the median of the half-wave ratio and a second normal threshold is greater than a second preset amplitude, then it is determined that there is an air bubble effect in the water meter pipeline.
[0009] In another exemplary embodiment, determining the target transmission time of the ultrasonic signal based on the number of ultrasonic waves emitted and the number of ultrasonic waves received includes: determining whether the number of ultrasonic waves emitted and the number of ultrasonic waves received are the same; if the number of ultrasonic waves emitted and the number of ultrasonic waves received are not the same, and the number of ultrasonic waves received is greater than a first preset threshold, obtaining the number of first transmission times with the same value among the first transmission times of the received ultrasonic signals; comparing the number of first transmission times with the same value with a second preset threshold to obtain a comparison result; and determining the target transmission time of the ultrasonic signal based on the comparison result.
[0010] In another exemplary embodiment, determining the target transmission time of the ultrasonic signal based on the comparison result includes: if the comparison result indicates that the number of first transmission times with the same value is greater than the second preset threshold, then averaging the first transmission times with the same value to obtain the target transmission time of the ultrasonic signal.
[0011] In another exemplary embodiment, determining the target transmission time of the ultrasonic signal based on the comparison result includes: if the comparison result indicates that the number of first transmission times with the same value is less than or equal to the second preset threshold, then determining the minimum transmission time from the first transmission times of the received ultrasonic signal, and estimating the effective transmission time of the ultrasonic signal based on the minimum transmission time; and determining the effective transmission time as the target transmission time of the ultrasonic signal.
[0012] In another exemplary embodiment, estimating the effective transmission time of the ultrasonic signal based on the minimum transmission time includes: if the ultrasonic signals interfered with within a preset sampling period are multiple consecutive ultrasonic signals, then the minimum transmission time is determined as the effective transmission time of the ultrasonic signal; or, if the ultrasonic signals interfered with within the preset sampling period are multiple discontinuous ultrasonic signals, then the difference between the minimum transmission time and the period of one of the ultrasonic signals is determined as the effective transmission time of the ultrasonic signal.
[0013] In another exemplary embodiment, the method further includes: if the number of ultrasonic waves emitted and the number of ultrasonic waves received are not the same, and the number of ultrasonic waves received is less than or equal to the first preset threshold, then determining that the target transmission time of the ultrasonic signal is zero.
[0014] In another exemplary embodiment, determining the water consumption flowing through the water meter per unit time based on the target transmission time of the ultrasonic signal includes: determining the total water consumption flowing through the water meter within the target transmission time based on the target transmission time of the ultrasonic signal; obtaining the attenuation of the ultrasonic signal and determining the bubble volume flowing through the water meter within the target transmission time based on the attenuation of the ultrasonic signal; and determining the difference between the total water consumption and the bubble volume as the water consumption flowing through the water meter per unit time.
[0015] According to one aspect of the embodiments of this application, an ultrasonic water meter flow metering device is provided, comprising: a first determining module configured to determine whether air bubbles affect the water meter pipeline; an acquiring module configured to, in the case that air bubbles affect the water meter pipeline, acquire the number of ultrasonic waves emitted and received within a preset sampling period; an estimating module configured to estimate the transmission time of the ultrasonic signal based on the number of ultrasonic waves emitted and received to obtain a target transmission time of the ultrasonic signal; and a second determining module configured to determine the amount of water flowing through the water meter per unit time based on the target transmission time of the ultrasonic signal.
[0016] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the ultrasonic water meter flow measurement method as described above.
[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the ultrasonic water meter flow measurement method as described above.
[0018] In the technical solution provided by the embodiments of this application, the presence of air bubbles in the water meter pipeline is determined. If air bubbles are present in the water meter pipeline, the number of ultrasonic waves emitted and received within a preset sampling period is obtained. Based on the number of ultrasonic waves emitted and received, the target transmission time of the ultrasonic signal is determined. The water consumption per unit time flowing through the water meter is determined based on the target transmission time of the ultrasonic signal. By measuring the number of ultrasonic waves emitted and received, the interference of air bubbles with the ultrasonic waves can be clearly understood, i.e., how many ultrasonic waves are interfered with by air bubbles in the water meter pipeline. This allows for the estimation of transmission time for different interference scenarios, resulting in a more accurate target transmission time. Therefore, even when air bubbles are present in the water meter pipeline, the metering accuracy of the water meter can be guaranteed.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0021] Figure 1 This is a schematic diagram illustrating an exemplary embodiment of the ultrasonic signal transmission path of this application;
[0022] Figure 2 This is a schematic diagram of an implementation environment related to an exemplary embodiment of the ultrasonic water meter flow measurement method of this application;
[0023] Figure 3 This is a flowchart illustrating an exemplary embodiment of the present application of a method for measuring the flow rate of an ultrasonic water meter;
[0024] Figure 4 yes Figure 3 Step S310 in the illustrated embodiment is a flowchart of a method for determining whether air bubbles affect the water meter pipe in an exemplary embodiment;
[0025] Figure 5 This is a schematic diagram illustrating the application of acquired ultrasonic signal parameters in an exemplary embodiment of this application;
[0026] Figure 6 yes Figure 3 Step S330 in the illustrated embodiment is a flowchart of a method for determining the target transmission time of an ultrasonic signal in an exemplary embodiment;
[0027] Figure 7 This is an exemplary embodiment of the present application illustrating the normal state of the ultrasonic signal transmission waveform within a preset sampling period;
[0028] Figure 8 This is an exemplary embodiment of the present application illustrating the interference of ultrasonic signal transmission waveform within a preset sampling period;
[0029] Figure 9 This is an exemplary embodiment of the present application illustrating the application of any one of the ultrasonic signals whose waveform is interfered with within a preset sampling period.
[0030] Figure 10 This is an exemplary embodiment of the present application illustrating the application of two consecutive ultrasonic signals whose ultrasonic signal transmission waveforms are interfered with within a preset sampling period.
[0031] Figure 11 This is an exemplary embodiment of the present application illustrating the application of three consecutive ultrasonic signals whose ultrasonic signal transmission waveforms are interfered with within a preset sampling period.
[0032] Figure 12 This is an exemplary embodiment of the present application illustrating the application of any two discontinuous ultrasonic signals whose ultrasonic signal transmission waveform is interfered with within a preset sampling period.
[0033] Figure 13 This is an exemplary embodiment of the present application illustrating the application of two consecutive and one independent ultrasonic signals whose ultrasonic signal transmission waveforms are interfered with within a preset sampling period.
[0034] Figure 14 This is an exemplary embodiment of the present application illustrating the application of any three discontinuous ultrasonic signals whose ultrasonic signal transmission waveform is interfered with within a preset sampling period.
[0035] Figure 15 yes Figure 3 The flowchart of step S340 in the illustrated embodiment, which describes a method for determining the target transmission time of an ultrasonic signal in an exemplary embodiment, is shown.
[0036] Figure 16 This is a flowchart illustrating a method for measuring the flow rate of an ultrasonic water meter, as shown in another exemplary embodiment of this application.
[0037] Figure 17 This is a flowchart illustrating a method for measuring the flow rate of an ultrasonic water meter, which is another exemplary embodiment of this application.
[0038] Figure 18 This is a schematic diagram of the structure of an ultrasonic water meter flow meter measuring device, as shown in an exemplary embodiment of this application.
[0039] Figure 19 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments identical to those described in this application. Rather, they are merely examples of apparatuses and methods identical to some aspects of this application as detailed in the appended claims.
[0041] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented as application programs, in one or more hardware modules or integrated circuits, or in different models and / or processor devices and / or microcontroller devices.
[0042] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0043] It should be noted that "multiple" as mentioned in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0044] To facilitate understanding of the ultrasonic water meter flow measurement method provided in the embodiments of this application, the following is combined with... Figure 1 The schematic diagram of the ultrasonic signal transmission path is shown below. The water meter in this embodiment can be an ultrasonic water meter.
[0045] Bubble effect refers to the presence of air in the water meter pipes at the beginning of water supply. The air is broken up by the water flow and pressure, forming round bubbles. These bubbles are dispersed randomly along the ultrasonic signal transmission path in the water meter pipes as the water flows, thus attenuating or blocking the ultrasonic signal transmission.
[0046] like Figure 1 As shown, drinking water in the water meter pipe 120 flows from the water meter inlet 110 to the water meter outlet 140. A first ultrasonic transceiver is installed above the water meter pipe 120 at the water meter inlet 110, and a second ultrasonic transceiver is installed above the water meter pipe 120 at the water meter inlet 140. The first ultrasonic transceiver emits ultrasonic signals, which are refracted by the ultrasonic signal reflector 130 and received by the second ultrasonic transceiver. Then, the second ultrasonic transceiver emits ultrasonic signals, which are refracted by the ultrasonic signal reflector 130 and received by the first ultrasonic transceiver. Because air bubbles disperse with the water flow into the water meter pipe, they are randomly dispersed in the transmission path of the ultrasonic signals, thus attenuating or blocking the transmission of ultrasonic signals.
[0047] In some embodiments, both the first ultrasonic signal transceiver and the second ultrasonic signal transceiver are ultrasonic transducers.
[0048] Understandably, the attenuation rate of ultrasound is usually related to the characteristics of the medium. The attenuation rate of a 1MHz ultrasound signal is about 0.2dB / m in water and about 2000dB / m in air.
[0049] As shown in Formula 1: X = A / α; where A is the attenuation in decibels and α is the attenuation rate; the transmission distance X is determined by the allowable attenuation in decibels A and the attenuation rate α.
[0050] From Formula 2, we know that: A = 20log10(V0 / Vmin), the minimum detection voltage received by the digital clock chip is Vmin = 0.075V, and the signal amplitude V0 transmitted by the digital clock chip under normal 3V power supply is 1V.
[0051] A = 20log10(1 / 0.075) ≈ 22.49dB, therefore, an ultrasonic signal of 1V and 1MHz can be transmitted in water.
[0052] From Formula 1, we can calculate that: X_water = A / α = 22.49 / 0.2 = 112.45m, which can be transported in water and air.
[0053] Calculated using Formula 1, we get: X_air = A / α = 22.49 / 2000 = 11.24 mm. It can be seen that a 1 MHz ultrasonic signal cannot travel a sufficient distance in the air. Therefore, air bubbles in drinking water will rapidly attenuate the ultrasonic signal, causing it to fail to transmit normally, thus preventing the water meter from measuring properly.
[0054] Based on this, this application proposes a method, device, system, and storage medium for measuring the flow rate of an ultrasonic water meter. The ultrasonic water meter flow rate measurement method of this application determines whether air bubbles are present in the water meter pipeline; if air bubbles are present, it acquires the number of ultrasonic waves emitted and received within a preset sampling period; based on the number of emitted and received ultrasonic waves, it determines the target transmission time of the ultrasonic signal; and based on the target transmission time of the ultrasonic signal, it determines the amount of water flowing through the water meter per unit time. By measuring the number of emitted and received ultrasonic waves, the interference of air bubbles with the ultrasonic waves can be clearly understood, i.e., how many ultrasonic waves are interfered with by air bubbles in the water meter pipeline. This allows for the estimation of transmission time for different interference scenarios, resulting in a more accurate target transmission time. Therefore, even when air bubbles are present in the water meter pipeline, the measurement accuracy of the water meter can be guaranteed.
[0055] To facilitate understanding of the ultrasonic water meter flow measurement method provided in the embodiments of this application, the following is combined with... Figure 2 The implementation environment shown illustrates a flow metering scenario for ultrasonic water meters; specifically, this implementation environment is an ultrasonic water meter flow metering system, such as... Figure 2 As shown, the ultrasonic water meter flow measurement system includes a terminal device 210 and an ultrasonic water meter 220. The terminal device 210 and the ultrasonic water meter 220 can be directly or indirectly connected via wired or wireless means. This application embodiment does not limit the connection method between the terminal device and the ultrasonic water meter.
[0056] Among them, terminal device 210 refers to the electronic device used by the user, which may include, but is not limited to: smartphones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, mobile Internet devices (MIDs), smart TVs, in-vehicle devices, head-mounted devices, and other smart devices that can be touched.
[0057] Terminal device 210 can refer to one of multiple terminals; this embodiment uses terminal device 210 as an example. Those skilled in the art will understand that the number of terminal devices can be more or less. For example, there may be only one terminal device, or there may be multiple terminal devices. In this case, the implementation environment of the ultrasonic water meter flow measurement method may also include other terminal devices. This application embodiment does not limit the number or type of terminal devices. Terminal device 210 can be used to execute the ultrasonic water meter flow measurement method of this application.
[0058] Depending on the implementation requirements, the technical solution of this application can be applied to the ultrasonic water meter 220, the terminal device 210, or jointly implemented by the ultrasonic water meter 220 and the terminal device 210. This application does not impose any special limitations on this. For example, the terminal device 210 can receive the ultrasonic signal collected by the ultrasonic water meter 220 according to the technical solution of this application, and determine whether there are air bubbles affecting the water meter pipeline based on the received ultrasonic signal; if air bubbles are present in the water meter pipeline, the number of ultrasonic waves emitted and received in the water meter pipeline within a preset sampling period is obtained; the target transmission time of the ultrasonic signal is determined based on the number of ultrasonic waves emitted and received; and the water consumption per unit time flowing through the water meter is determined based on the target transmission time of the ultrasonic signal.
[0059] Alternatively, the controller inside the ultrasonic water meter 220 can collect ultrasonic signals according to the technical solution of this application, and determine whether there are air bubbles affecting the water meter pipeline based on the collected ultrasonic signals; if air bubbles are present in the water meter pipeline, the number of ultrasonic waves emitted and received in the water meter pipeline within a preset sampling period can be obtained; the target transmission time of the ultrasonic signal can be determined based on the number of ultrasonic waves emitted and received; and the water consumption per unit time flowing through the water meter can be determined based on the target transmission time of the ultrasonic signal.
[0060] The ultrasonic transducer in the ultrasonic water meter 220 can periodically emit ultrasonic signals, for example, emitting a preset number of ultrasonic signals within one cycle. In some embodiments, the preset number can range from 5 to 15, and one cycle can be 10 seconds.
[0061] The following is a detailed description of the ultrasonic water meter flow measurement method provided in the embodiments of this application.
[0062] Please continue reading. Figure 3 , Figure 3 This is a flowchart illustrating an exemplary embodiment of an ultrasonic water meter flow measurement method. This method can be applied to... Figure 2The implementation environment is shown, and the terminal device 210 in this implementation environment specifically executes the method. The following describes in detail the ultrasonic water meter flow measurement method proposed in this application embodiment, using the terminal device as the specific execution subject. The ultrasonic water meter, as the execution subject, is similar and will not be described in detail.
[0063] like Figure 3 As shown, in an exemplary embodiment, the ultrasonic water meter flow measurement method includes at least steps S310 to S340, which are described in detail below:
[0064] Step S310: Determine whether there are air bubbles affecting the water meter pipe.
[0065] In this embodiment of the application, by determining whether there are air bubbles in the water meter pipe, it is possible to detect and determine when the drinking water passing through the water meter has air bubbles and affects the metering accuracy, and then users can take measures to reduce the impact of air bubbles.
[0066] For example, if it is determined that there are no air bubbles in the water meter pipes, water consumption can be measured using the default normal metering method. However, if it is determined that there are air bubbles in the water meter pipes, relevant measures can be taken to reduce the impact of the air bubbles before water consumption is measured.
[0067] Combination Figure 4 As shown, Figure 4 yes Figure 3 The illustrated embodiment shows a flowchart of a method for determining whether air bubbles affect the water meter pipe in an exemplary embodiment, step S310; it includes at least steps S410 to S420, which are described in detail below:
[0068] Step S410: Detect the ultrasonic signal inside the water meter pipe to obtain ultrasonic signal parameters.
[0069] In this embodiment, ultrasonic transceivers are installed at both ends of the water meter. Ultrasonic signals are emitted by the transceiver at one end of the water meter, transmitted through the water meter pipe to the other end, and received by the transceiver at the other end. The ultrasonic transceiver can periodically emit ultrasonic signals, for example, emitting a preset number of ultrasonic signals within one cycle. Ultrasonic signal parameters are obtained by detecting the ultrasonic signals within the water meter pipe over a preset time period.
[0070] Step S420: Determine whether there are air bubbles affecting the water meter pipe based on the ultrasonic signal parameters.
[0071] The ultrasonic signal parameters in this application embodiment include at least one of the ultrasonic signal transmission time, signal amplitude, and half-wave ratio. Under normal circumstances, the ultrasonic signal transmission time, signal amplitude, and half-wave ratio do not change. However, if air bubbles are present, they will cause signal attenuation, and the measured signal will decrease due to attenuation. Therefore, the presence of air bubbles in the water meter pipe can be more accurately determined by the above ultrasonic signal parameters.
[0072] In some embodiments, the presence of air bubbles in the water meter pipe can be determined based on ultrasonic signal parameters using the following process:
[0073] Step S421: If there are abnormal fluctuations in the ultrasonic signal parameters, obtain the difference between the maximum and minimum signal amplitudes within the preset detection period, as well as the median of the half-wave ratio.
[0074] Step S422: If the deviation between the difference between the maximum signal amplitude and the minimum signal amplitude and the first normal threshold is greater than the first preset amplitude, and the deviation between the median of the half-wave ratio and the second normal threshold is greater than the second preset amplitude, then it is determined that there is an air bubble effect in the water meter pipeline.
[0075] In some embodiments, the first normal threshold is a signal amplitude detection threshold, the second normal threshold is a signal half-wave ratio calculation threshold; the first preset amplitude is 20%, and the second preset amplitude is 10%.
[0076] In other embodiments, if the deviation between the difference between the maximum signal amplitude and the minimum signal amplitude and the first normal threshold is less than the first preset amplitude, and the deviation between the median of the half-wave ratio and the second normal threshold is less than the second preset amplitude, then it is determined that there is no air bubble effect in the water meter pipeline.
[0077] For example, combining Figure 5 As shown, Figure 5 This is an exemplary embodiment of the present application illustrating the application of acquired ultrasonic signal parameters. It is understood that, through continuous 10-second testing, if the signal amplitude and half-wave ratio fluctuate wildly, or if relevant parameters are suddenly undetectable and then suddenly detectable again, it can be assumed that the water flow is interfering with the ultrasonic signal through air bubbles. The difference between the maximum and minimum signal amplitude within 10 seconds is then calculated. This is because, based on the above description of ultrasonic signal transmission in water, when the ultrasonic signal passes through drinking water, the total length of the air bubbles is less than 11.24 mm, and we can still measure the signal. However, the ultrasonic signal amplitude is attenuated after passing through the air bubbles, and the measured signal amplitude will decrease due to this attenuation.
[0078] from Figure 5 It can be seen that, Figure 5The waveform diagrams of the ultrasonic signal parameters acquired during two signal cycles are shown. Figure 5 The horizontal axis represents time, and the vertical axis represents the signal amplitude. In the first signal cycle, before bubbles are formed in the water meter pipe, the collected ultrasonic signal amplitude is within the normal range. When bubbles are present, the difference between the maximum and minimum amplitude values is 0.1V, and the first normal threshold (signal amplitude detection threshold) is 0.3, deviating from the normal value by more than 20%. Calculating the half-wave ratio shows that the median half-wave ratio when bubbles are present is 0.2, and the second normal threshold (signal half-wave ratio calculation threshold) is 0.5, deviating from the normal value by more than 10%. Therefore, it can be determined that bubbles are present in the drinking water. The second signal cycle is an interval from the first signal cycle.
[0079] In some embodiments, after determining that there is an effect of air bubbles in the water meter pipe, the method further includes: reducing the transmission interval of the ultrasonic signal; and / or amplifying and adjusting the signal amplitude of the ultrasonic signal.
[0080] It is understandable that, in this embodiment of the application, after determining that there are air bubbles in the water meter pipe, the ultrasonic transmission interval is shortened, thereby increasing the number of ultrasonic signal transmissions and receptions within one cycle. This reduces the interference from air bubbles in the ultrasonic signal and increases the amount of effective data. At the same time, the signal amplitude can be amplified, so that the ultrasonic signal can be received through more or larger air bubbles, thereby improving the anti-interference capability of the ultrasonic signal.
[0081] For example, when ultrasonic wave transmission is interfered with by air bubbles (which exist randomly in the water flow), the interval between ultrasonic wave transmissions can be shortened to transmit ultrasonic waves more frequently, reducing the probability of the ultrasonic waves colliding with the bubbles and thus increasing the amount of effective data. Simultaneously, instead of the usual 5 to 10 ultrasonic waves transmitted per cycle, the number of transmissions and receptions per cycle can be increased to 15, again improving the amount of effective data.
[0082] Based on this, analog amplifiers and operational amplifiers can be further controlled to amplify the ultrasonic signal amplitude to 28V. At this point, according to the formula mentioned above, X_air = 25.7mm, which is more than double the original 11.24mm. This means that ultrasonic signals can be received through more or larger bubbles.
[0083] Step S320: In the case of air bubbles in the water meter pipe, obtain the number of ultrasonic waves emitted and received in the water meter pipe within a preset sampling period.
[0084] Understandably, if air bubbles are present in the water meter pipe, the number of ultrasonic waves emitted and received within the water meter pipe can be measured within a preset sampling period. By measuring the number of emitted and received ultrasonic waves, the interference of air bubbles with ultrasonic waves can be clearly understood, i.e., how many ultrasonic waves are interfered with by air bubbles in the water meter pipe. In this way, the transmission time can be estimated separately for different interference situations, thereby obtaining a more accurate target transmission time.
[0085] Furthermore, if there are no air bubbles affecting the water meter pipes, it indicates that the ultrasonic signal can be received normally. In this case, the average transmission time of all received ultrasonic signals is calculated to obtain the target transmission time of the ultrasonic signal measured in this instance. If the number of ultrasonic waves emitted and received differs, the target transmission time of the ultrasonic signal can be further determined using the method described in step S330 below.
[0086] Step S330: Determine the target transmission time of the ultrasonic signal based on the number of ultrasonic waves emitted and received.
[0087] Understandably, by measuring the number of ultrasonic waves emitted and received, we can clearly understand the interference of air bubbles with the ultrasonic waves, i.e., how many ultrasonic waves are interfered with by air bubbles in the water meter pipe. This allows us to estimate the transmission time for different interference scenarios, thus obtaining a more accurate target transmission time.
[0088] In some embodiments, combined with Figure 6 As shown, Figure 6 yes Figure 3 The flowchart of step S330 in the illustrated embodiment, which describes a method for determining the target transmission time of an ultrasonic signal in an exemplary embodiment, includes at least steps S610 to S640, as detailed below:
[0089] Step S610: Determine whether the number of ultrasonic waves emitted and the number of ultrasonic waves received are the same.
[0090] In this embodiment, the presence of air bubbles in the water meter pipe can be determined by whether the number of ultrasonic waves emitted and received are the same. For example, if the number of ultrasonic waves emitted and received in the water meter pipe are the same within a preset sampling period, it indicates that there are no air bubbles in the water meter pipe at this time. Therefore, the average transmission time of all received ultrasonic signals can be directly calculated to obtain the target transmission time of the ultrasonic signal measured in this instance.
[0091] If the number of ultrasonic waves emitted and the number of ultrasonic waves received are not the same, it indicates that there is an influence of air bubbles. The difference between the two is the number of ultrasonic signals that have been interfered with.
[0092] Step S620: When the number of ultrasonic waves emitted and the number of ultrasonic waves received are different, and the number of ultrasonic waves received is greater than a first preset threshold, the number of first transmission times with the same value in the first transmission time of the received ultrasonic signals is obtained.
[0093] It is understood that, in this embodiment, if the number of ultrasonic waves emitted and received are not the same, the difference between the two is the number of interfered ultrasonic signals. By introducing a first preset threshold, it is easier to determine whether the number of received ultrasonic signals is sufficient. Calculating the target transmission time of the ultrasonic signals only when the sample size is sufficient ensures measurement accuracy and improves reliability. This embodiment does not limit the specific value of the first preset threshold. In some embodiments, the first preset threshold can be 1 or other positive integers greater than 1. The first preset threshold is less than or equal to the number of ultrasonic waves emitted within a preset sampling period.
[0094] For example, after determining that the number of ultrasonic waves emitted and received are different, and that the number of ultrasonic waves received is greater than a first preset threshold, the number of first transmission times with the same value can be determined as follows: The first transmission times of the received ultrasonic signals are sorted according to a preset order to obtain a transmission time array; then, the first transmission times in the transmission time array are compared pairwise to obtain the number of first transmission times with the same value. In some embodiments, the preset order is from largest to smallest. This sorting facilitates numerical filtering and improves the efficiency of determining the target transmission time.
[0095] For example, when the number of ultrasonic waves emitted and received are not the same, all cases can be divided into the following categories based on the number of ultrasonic waves emitted within a preset sampling period, taking five ultrasonic signals emitted within a preset sampling period as an example:
[0096] Scenario 1: In the presence of air bubbles, the air bubbles interfere with the transmission of any ultrasonic signal;
[0097] Scenario 2: In the presence of air bubbles, the air bubbles interfere with the transmission of two consecutive ultrasonic signals;
[0098] Case 3: In the presence of air bubbles, the air bubbles interfere with the transmission of any two discontinuous ultrasonic signals.
[0099] Case 4: In the presence of air bubbles, the air bubbles interfere with the transmission of two consecutive ultrasonic signals and one independent ultrasonic signal.
[0100] Case 5: In the presence of air bubbles, the air bubbles interfere with the transmission of three consecutive ultrasonic signals.
[0101] Case 6: In the presence of air bubbles, the air bubbles interfere with the transmission of any three discontinuous ultrasonic signals.
[0102] Case 7: In the presence of air bubbles, the air bubbles interfered with the transmission of four discontinuous ultrasonic signals.
[0103] Case 8: In the presence of air bubbles, the air bubbles interfere with the transmission of all ultrasonic signals.
[0104] As described above, in the presence of air bubbles, there are various interference scenarios, and the methods for determining the target transmission time of the ultrasonic signal differ depending on the interference scenario. In some embodiments, the first preset threshold is 1. If the number of received ultrasonic waves is greater than the first preset threshold, it can be considered that a sufficient number of ultrasonic signals have been received, and further processing can be performed. Conversely, if the number of received ultrasonic waves is less than or equal to the first preset threshold, it is considered that the number of interfered signals is too large and the number of received signals is too small.
[0105] For example, assuming the number of ultrasonic waves emitted and received is the same, and taking five ultrasonic signals emitted within a preset sampling period as an example: it can be assumed that there is currently no bubble influence. Combined with... Figure 7 As shown, Figure 7 This is an exemplary embodiment of the present application illustrating a normal application of the ultrasonic signal transmission waveform within a preset sampling period.
[0106] Figure 7 In waveform diagram A7, waveforms A7_1, A7_2, A7_3, A7_4, and A7_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A7_1 is the first ultrasonic signal emitted within a preset sampling period, A7_2 is the second, A7_3 is the third, A7_4 is the fourth, and A7_5 is the fifth. A7_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0107] The ultrasonic signal received waveforms A7_7, A7_8, A7_9, A7_10, and A7_11 are the first to fifth ultrasonic signal received waveforms within the ultrasonic wave reception cycle, respectively.
[0108] T7_1, T7_2, T7_3, T7_4, and T7_5 represent the transmission times in water for the first to fifth ultrasonic transmission signals (A7_1, A7_2, A7_3, A7_4, and A7_5), respectively, i.e., the first transmission times.
[0109] As shown in waveform A7, the number of ultrasonic waves emitted is 5, and the number of ultrasonic waves received is 5. Therefore, the first transmission time of all emitted ultrasonic signals can be collected. By averaging the first transmission times of all ultrasonic signals, the target transmission time of the ultrasonic signal can be obtained.
[0110] In some embodiments, if the number of ultrasonic waves emitted and the number of ultrasonic waves received are not the same, and the number of ultrasonic waves received is less than or equal to a first preset threshold, then the target transmission time of the ultrasonic signal is determined to be zero.
[0111] In this embodiment, the first preset threshold is 1. When the number of received ultrasonic waves is less than or equal to the first preset threshold, by directly setting the target transmission time of the ultrasonic signal to zero, misjudgments due to insufficient sample size can be avoided, improving the accuracy of the target transmission time of the ultrasonic signal. This facilitates the user's next round of testing and greatly improves the system's reliability and robustness. For example, combined with... Figure 8 As shown, Figure 8 This is an exemplary embodiment of the present application illustrating an application scenario where the ultrasonic signal transmission waveform is interfered with within a preset sampling period. Figure 8 Waveform diagram A14 corresponds to situation 7 above, that is, in the presence of bubble influence, the bubble interferes with the transmission of four discontinuous ultrasonic signals. Figure 8 Waveform diagram A15 corresponds to situation 8 above, that is, in the presence of bubbles, the bubbles interfere with the transmission of all ultrasonic signals.
[0112] Figure 8 In waveform diagram A14, waveforms A14_1, A14_2, A14_3, A14_4, and A14_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A14_1 is the first ultrasonic signal emitted within a preset sampling period, A14_2 is the second, A14_3 is the third, A14_4 is the fourth, and A14_5 is the fifth. A14_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0113] The ultrasonic signal received waveforms A14_7, A14_8, A14_9, A14_10, and A14_11 are the first to fifth ultrasonic signal received waveforms within the ultrasonic wave receiving cycle, respectively.
[0114] T14_1, T14_2, T14_3, T14_4, and T14_5 represent the transmission times in water for the first to fifth ultrasonic transmission signals (A14_1, A14_2, A14_3, A14_4, and A14_5), respectively, i.e., the first transmission times.
[0115] T14_1_1 is the time difference between the first received ultrasonic signal waveform A14_7 and the second ultrasonic signal waveform A14_8; T14_2_1 is the time difference between the second received ultrasonic signal waveform A14_8 and the third ultrasonic signal waveform A14_9; T14_3_1 is the time difference between the third received ultrasonic signal waveform A14_9 and the fourth ultrasonic signal waveform A14_10; T14_4_1 is the time difference between the fourth received ultrasonic signal waveform A14_10 and the fifth ultrasonic signal waveform A14_11.
[0116] As shown in waveform A14, the number of ultrasonic waves emitted is 5, and the number of ultrasonic waves received is 1. Only one complete ultrasonic signal reception waveform, A14_8, was received. Therefore, only the first transmission time of the second ultrasonic signal will be collected at present. The normal first transmission time of other ultrasonic signals under normal conditions can be derived from the time difference between the ultrasonic signal reception waveforms mentioned above. For example, the first transmission time of A14_7 under normal conditions is (T14-1) = (T14-2) - (T14-1-1), and so on. The rest are similar and will not be elaborated here.
[0117] In other words, of the five 1MHz ultrasonic signals emitted within a preset sampling period, four are interfered with by bubbles, and only one ultrasonic signal is received. Therefore, the first preset threshold is 1. When the number of received ultrasonic signals is less than or equal to the first preset threshold, by directly setting the target transmission time of the ultrasonic signal to zero, misjudgments due to insufficient sample size can be avoided, improving the accuracy of the target transmission time of the ultrasonic signal. This facilitates the user in conducting the next round of testing and greatly improves the reliability and robustness of the system.
[0118] Figure 8In waveform diagram A15, waveforms A15_1, A15_2, A15_3, A15_4, and A15_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A15_1 is the first ultrasonic signal emitted within a preset sampling period, A15_2 is the second, A15_3 is the third, A15_4 is the fourth, and A15_5 is the fifth. A15_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0119] The ultrasonic signal reception waveforms A15_7, A15_8, A15_9, A15_10, and A15_11 are the first to fifth ultrasonic signal reception waveforms within the ultrasonic wave reception cycle, respectively.
[0120] T15_1, T15_2, T15_3, T15_4, and T15_5 represent the transmission times in water for the first to fifth ultrasonic transmission signals (A15_1, A15_2, A15_3, A15_4, and A15_5), respectively.
[0121] T15_1_1 is the time difference between the first received ultrasonic signal waveform A15_7 and the second ultrasonic signal waveform A15_8; T15_2_1 is the time difference between the second received ultrasonic signal waveform A15_8 and the third ultrasonic signal waveform A15_9; T15_3_1 is the time difference between the third received ultrasonic signal waveform A15_9 and the fourth ultrasonic signal waveform A15_10; T15_4_1 is the time difference between the fourth received ultrasonic signal waveform A15_10 and the fifth ultrasonic signal waveform A15_11.
[0122] As shown in waveform A15, only A15_8 represents a complete ultrasonic signal reception waveform, with 5 ultrasonic waves transmitted and 0 ultrasonic waves received. This means that all five 1MHz ultrasonic signals transmitted within a preset sampling period are interfered with by air bubbles. Therefore, the first preset threshold is set to 1. When the number of ultrasonic waves received is less than or equal to the first preset threshold, directly setting the target transmission time of the ultrasonic signal to zero avoids misjudgments due to insufficient sample size, improves the accuracy of the target transmission time of the ultrasonic signal, facilitates subsequent testing, and greatly enhances the reliability and robustness of the system.
[0123] Step S630: Compare the number of first transmission times with the same value with the second preset threshold to obtain the comparison result.
[0124] In this embodiment of the application, the second preset threshold is 2. By setting the second preset threshold to compare with the number of first transmission times with the same value, it is possible to determine whether there are multiple first transmission times with the same value. Then, different methods can be selected to determine the target transmission time based on different comparison results.
[0125] In this embodiment, the specific value of the second preset threshold is not limited; it can vary according to the number of ultrasonic waves emitted within each preset sampling period. For example, the second preset threshold = Q / 2 + 1; where Q is the number of ultrasonic waves emitted within one preset sampling period.
[0126] Step S640: Determine the target transmission time of the ultrasonic signal based on the comparison results.
[0127] In this embodiment of the application, before determining the target transmission time of the ultrasonic signal, the influence of the number of ultrasonic receivers on the target transmission time under different interference conditions is considered. This ensures that the target transmission time is calculated when the number of collected samples is sufficient, reducing the probability of misjudgment and improving reliability. At the same time, the influence of the same number of first transmission times of the received ultrasonic signals on the target transmission time is also considered, which facilitates more flexible selection of different methods to determine the target transmission time, thereby obtaining a more accurate target transmission time.
[0128] For example, determining the target transmission time of the ultrasonic signal based on the comparison result includes: if the number of first transmission times with the same value represented by the comparison result is greater than a second preset threshold, then averaging the first transmission times with the same value to obtain the target transmission time of the ultrasonic signal.
[0129] In this embodiment of the application, if the number of first transmission times with the same numerical value is greater than the second preset threshold, it can be considered that there are multiple identical first transmission times. At this time, the target transmission time of the ultrasonic signal can be calculated directly by averaging, which is convenient, accurate and fast.
[0130] For example, combining Figure 9 As shown, Figure 9 This is an exemplary embodiment of the present application illustrating an application scenario where the ultrasonic signal transmission waveform is interfered with within a preset sampling period. Figure 9 Waveform diagram A8 corresponds to case 1 above, that is, in the presence of bubbles, the bubbles interfere with the transmission of any ultrasonic signal.
[0131] Figure 9In waveform diagram A8, waveforms A8_1, A8_2, A8_3, A8_4, and A8_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A8_1 is the first ultrasonic signal emitted within a preset sampling period, A8_2 is the second, A8_3 is the third, A8_4 is the fourth, and A8_5 is the fifth. A8_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0132] The ultrasonic signal received waveforms A8_7, A8_8, A8_9, A8_10, and A8_11 are the first to fifth ultrasonic signal received waveforms within the ultrasonic wave reception cycle, respectively.
[0133] T8_1, T8_2, T8_3, T8_4, and T8_5 represent the transmission times in water for the first to fifth ultrasonic transmission signals (A8_1, A8_2, A8_3, A8_4, and A8_5), respectively, i.e., the first transmission times.
[0134] T8_1_1 is the time difference between the first received ultrasonic signal waveform A8_7 and the second ultrasonic signal waveform A8_8; T8_2_1 is the time difference between the second received ultrasonic signal waveform A8_8 and the third ultrasonic signal waveform A8_9; T8_3_1 is the time difference between the third received ultrasonic signal waveform A8_9 and the fourth ultrasonic signal waveform A8_10; T8_4_1 is the time difference between the fourth received ultrasonic signal waveform A8_10 and the fifth ultrasonic signal waveform A8_11.
[0135] The normal first transmission time of other ultrasonic signals under normal conditions can be derived from the time difference between the received waveforms of the aforementioned ultrasonic signals; for example, A8_8 Under normal circumstances, the first transmission time is (T8-8) = (T8-9) - (T8-2-1), and the rest are similar, so they will not be repeated here.
[0136] As shown in waveform A8, the number of ultrasonic waves emitted is 5, and the number of ultrasonic waves received is 4. Four complete ultrasonic signal reception waveforms (A8_7, A8_9, A8_10, and A8_11) were received. Therefore, the first transmission time of these four ultrasonic signals can be acquired. The first transmission times of these four ultrasonic signals are then sorted in descending order to obtain a transmission time array. The first transmission times in the transmission time array are compared pairwise to obtain the comparison results. If the number of first transmission times with the same value is greater than a second preset threshold (e.g., 2), the average value of the first transmission times with the same value is directly calculated to obtain the target transmission time of the ultrasonic signal.
[0137] For example, determining the target transmission time of the ultrasonic signal based on the comparison result includes: if the number of first transmission times with the same numerical value in the comparison result is less than or equal to a second preset threshold, then determining the minimum transmission time from the first transmission times of the received ultrasonic signal, and estimating the effective transmission time of the ultrasonic signal based on the minimum transmission time; and determining the effective transmission time as the target transmission time of the ultrasonic signal.
[0138] Understandably, when the number of first transmission times with the same numerical value in the comparison results is less than or equal to the second preset threshold, it can be assumed that the first transmission time of the received ultrasonic signal is affected by a large number of ultrasonic signals that are interfered with by bubbles. Therefore, the target transmission time cannot be calculated directly by averaging, as this would lead to calculation errors. On the other hand, the ultrasonic signal corresponding to the minimum transmission time can be regarded as the ultrasonic signal with the least interference from bubbles. Therefore, estimating the effective transmission time by using the minimum transmission time of the received ultrasonic signal can improve the accuracy of the target transmission time.
[0139] In some embodiments, estimating the effective transmission time of an ultrasonic signal based on a minimum transmission time includes: if the ultrasonic signals that are interfered with within a preset sampling period are multiple consecutive ultrasonic signals, then the minimum transmission time is determined as the effective transmission time of the ultrasonic signal.
[0140] In this embodiment, the determination of the effective transmission time is divided into two cases based on whether the interfered ultrasonic signal is a series of consecutive ultrasonic signals. If the interfered ultrasonic signal is a series of consecutive ultrasonic signals, the minimum transmission time in the first transmission time of the received ultrasonic signal can be considered to be the closest to the transmission time under normal conditions. Therefore, the minimum transmission time can be directly determined as the effective transmission time of the ultrasonic signal, which can improve the accuracy of the target transmission time at the determination point.
[0141] In other embodiments, the effective transmission time of the ultrasonic signal can be estimated based on the minimum transmission time in the following manner: subtracting the minimum transmission time from other transmission times in the first transmission time of the received ultrasonic signal, and then dividing by the period of the ultrasonic signal to obtain a first estimated value of the interfered signal; comparing the first estimated value of the interfered signal with the actual value of the interfered signal; if they are the same, the minimum transmission time is determined as the effective transmission time of the ultrasonic signal. If they are different, the effective transmission time of the ultrasonic signal is estimated a second time based on the minimum transmission time. For example, other transmission times in the first transmission time of the received ultrasonic signal refer to other first transmission times besides the minimum transmission time.
[0142] Furthermore, a second estimation of the effective transmission time of the ultrasonic signal is performed based on the minimum transmission time. This includes: subtracting one cycle of the ultrasonic signal from the minimum transmission time to obtain a first preset value; then subtracting the first preset value from the other transmission times in the first transmission time of the received ultrasonic signal, and then dividing by one cycle of the ultrasonic signal to obtain a second estimated value of the interfered signal; comparing the second estimated value of the interfered signal with the actual value of the interfered signal; if they are the same, the difference between the minimum transmission time and one cycle of the ultrasonic signal is determined as the effective transmission time of the ultrasonic signal; if they are different, a third estimation of the effective transmission time of the ultrasonic signal is performed based on the minimum transmission time.
[0143] Furthermore, the effective transmission time of the ultrasonic signal is estimated three times based on the minimum transmission time, including: subtracting one period of the ultrasonic signal from the minimum transmission time to obtain a first preset value; adding one period of the ultrasonic signal to the maximum transmission time to obtain a second preset value; then dividing the difference between the second preset value and the first preset value by one period of the ultrasonic signal to obtain a third preset value of the interfered signal; comparing the third preset value of the interfered signal with the actual value of the interfered signal; if the two are the same, then the difference between the minimum transmission time and one period of the ultrasonic signal is determined as the effective transmission time of the ultrasonic signal.
[0144] For example, combining Figure 10 As shown, Figure 10 This is an exemplary embodiment of the present application illustrating an application scenario where the ultrasonic signal transmission waveform is interfered with within a preset sampling period. Figure 10 Waveform diagram A9 corresponds to situation 2 above, that is, in the presence of bubbles, the bubbles interfere with the transmission of two consecutive ultrasonic signals.
[0145] Figure 10In waveform diagram A9, waveforms A9_1, A9_2, A9_3, A9_4, and A9_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A9_1 is the first ultrasonic signal emitted within a preset sampling period, A9_2 is the second, A9_3 is the third, A9_4 is the fourth, and A9_5 is the fifth. A9_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0146] The ultrasonic signal received waveforms A9_7, A9_8, A9_9, A9_10, and A9_11 are the first to fifth ultrasonic signal received waveforms within the ultrasonic wave receiving cycle, respectively.
[0147] T9_1, T9_2, T9_3, T9_4, and T9_5 represent the transmission times in water for the first to fifth ultrasonic transmission signals (A9_1, A9_2, A9_3, A9_4, and A9_5), respectively, i.e., the first transmission times.
[0148] T9_2_1 is the time difference between the received second ultrasonic signal waveform A9_8 and the third ultrasonic signal waveform A9_9; T9_3_1 is the time difference between the received third ultrasonic signal waveform A9_9 and the fourth ultrasonic signal waveform A9_10; T9_4_1 is the time difference between the received fourth ultrasonic signal waveform A9_10 and the fifth ultrasonic signal waveform A9_11.
[0149] However, T9_1, T9_4, and T9_5 are actually the three first transmission times when the ultrasonic signal is successfully received. T9_4 = T9_2 + T9_2_1 + T9_3_1, T9_5 = T9_3 + T9_3_1 + T9_4_1.
[0150] As shown in waveform A9, the number of ultrasonic waves transmitted is 5, and the number of ultrasonic waves received is 3. Three complete ultrasonic signal reception waveforms, A9_7, A9_10, and A9_11, were received. Two consecutive ultrasonic signals were interfered with; therefore, the first transmission time of these three ultrasonic signals can be acquired. The target transmission time of the ultrasonic signal can then be determined as follows:
[0151] The first transmission times of the three ultrasonic signals are sorted in descending order to obtain a transmission time array.
[0152] The transmission time array is, for example, [T9_2+T9_2_1+T9_3_1, T9_3+T9_3_1+T9_4_1, T9_1]; where T9_1 is the transmission time of the first received ultrasonic signal, T9_2+T9_2_1+T9_3_1 is the transmission time of the second received ultrasonic signal, and T9_3+T9_3_1+T9_4_1 is the transmission time of the third received ultrasonic signal.
[0153] The first transmission time in the transmission time array is compared pairwise to obtain the comparison result;
[0154] Two data points are identical: T9_2+T9_2_1+T9_3_1 and T9_3+T9_3_1+T9_4_1 are the same.
[0155] The comparison result indicates that the number of first transmission times with the same value is less than or equal to a second preset threshold (e.g., 2). Therefore, the other transmission times in the first transmission times of the received ultrasonic signal, namely T9_2+T9_2_1+T9_3_1 and T9_3+T9_3_1+T9_4_1, are subtracted from the minimum transmission time, and then divided by the period T of an ultrasonic signal to obtain the first estimated value of the interfered signal. The first estimated value of the interfered signal is compared with the actual value of the interfered signal. If they are the same, the minimum transmission time is determined as the effective transmission time of the ultrasonic signal. For example, in this embodiment, the actual value of the interfered signal is 2.
[0156] Depend on Figure 10 As can be seen from waveform diagram A9,
[0157] T9_2+T9_2_1+T9_3_1=T9_3+T9_3_1+T9_4_1=T9_1+2T,
[0158] And T9_2_1=T9_3_1=T9_4_1=T,
[0159] Therefore, after subtracting the minimum transmission time from T9_2+T9_2_1+T9_3_1 and T9_3+T9_3_1+T9_4_1 respectively, and then dividing by one period of the ultrasonic signal, the first estimated value of the interfered signal is 2, which is the same as the actual value of the interfered signal. Therefore, the minimum transmission time is directly determined as the effective transmission time of the ultrasonic signal.
[0160] For example, combining Figure 11 As shown, Figure 11 This is an exemplary embodiment of the present application illustrating an application scenario where the ultrasonic signal transmission waveform is interfered with within a preset sampling period. Figure 11The waveform diagram A12 in the figure corresponds to situation 5 above, that is, in the presence of bubbles, the bubbles interfere with the transmission of three consecutive ultrasonic signals.
[0161] Figure 11 In waveform diagram A12, waveforms A12_1, A12_2, A12_3, A12_4, and A12_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A12_1 is the first ultrasonic signal emitted within a preset sampling period, A12_2 is the second, A12_3 is the third, A12_4 is the fourth, and A12_5 is the fifth. A12_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0162] The ultrasonic signal received waveforms A12_7, A12_8, A12_9, A12_10, and A12_11 are the first to fifth ultrasonic signal received waveforms within the ultrasonic wave receiving cycle, respectively.
[0163] T12_1, T12_2, T12_3, T12_4, and T12_5 represent the theoretical transmission times in water for the first to fifth ultrasonic transmission signals (A12_1, A12_2, A12_3, A12_4, and A12_5), respectively, i.e., the first transmission time.
[0164] T12_1_1 is the time difference between the first received ultrasonic signal waveform A12_7 and the second ultrasonic signal waveform A12_8; T12_2_1 is the time difference between the second received ultrasonic signal waveform A12_8 and the third ultrasonic signal waveform A12_9; T12_3_1 is the time difference between the third received ultrasonic signal waveform A12_9 and the fourth ultrasonic signal waveform A12_10; T12_4_1 is the time difference between the fourth received ultrasonic signal waveform A12_10 and the fifth ultrasonic signal waveform A12_11.
[0165] However, T12_1 and T12_5 (T12_5 = T12_2 + T12_2_1 + T12_3_1 + T12_4_1) are actually the two first transmission times when the ultrasonic signal is successfully received.
[0166] As shown in waveform A12, there are 5 ultrasonic waves emitted and 2 ultrasonic waves received. Only the two complete ultrasonic signal reception waveforms, A12_7 and A12_11, were received; therefore, only the first transmission time of these two ultrasonic signals will be collected at this stage. The target transmission time of the ultrasonic signal can then be determined as follows:
[0167] Sort the first transmission times of the two ultrasonic signals from largest to smallest to obtain the transmission time array;
[0168] Transmission time arrays are, for example, [T12_2+T12_2_1+T12_3_1+T12_4_1, T12_1];
[0169] Where T12_1 is the transmission time of the first received ultrasonic signal.
[0170] T12_2+T12_2_1+T12_3_1+T12_4_1 is the transmission time of the second received ultrasonic signal;
[0171] The first transmission time in the transmission time array is compared pairwise to obtain the comparison result;
[0172] If no identical data is found, the comparison result indicates that the number of first transmission times with the same value is less than or equal to a second preset threshold (e.g., 2). Therefore, the other transmission times in the first transmission times of the received ultrasonic signal, i.e., T12_2 + T12_2_1 + T12_3_1 + T12_4_1, are subtracted from the minimum transmission time T12_1, and then divided by the period T of an ultrasonic signal to obtain the first estimated value of the interfered signal. The first estimated value of the interfered signal is compared with the actual value of the interfered signal. If they are the same, the minimum transmission time is determined as the effective transmission time of the ultrasonic signal. For example, in this embodiment, the actual value of the interfered signal is 3.
[0173] Depend on Figure 11 As can be seen from waveform diagram A12,
[0174] T12_2+T12_2_1+T12_3_1+T12_4_1=T12_1+3T,
[0175] And T12_2_1=T12_3_1=T12_4_1=T,
[0176] Therefore, after subtracting the minimum transmission time from T12_2+T12_2_1+T12_3_1+T12_4_1 and dividing by the period of an ultrasonic signal, the first estimated value of the interfered signal is 3, which is the same as the actual value of the interfered signal. Therefore, the minimum transmission time is directly determined as the effective transmission time of the ultrasonic signal.
[0177] In some embodiments, estimating the effective transmission time of an ultrasonic signal based on a minimum transmission time includes: if the ultrasonic signals interfered with within a preset sampling period are multiple discontinuous ultrasonic signals, then the difference between the minimum transmission time and the period of one ultrasonic signal is determined as the effective transmission time of the ultrasonic signal.
[0178] If the interfered ultrasonic signal consists of multiple discontinuous ultrasonic signals, then the difference between the minimum transmission time and the period of one ultrasonic signal can be considered the closest to the normal transmission time. Therefore, the difference between the minimum transmission time and the period of one ultrasonic signal is determined as the effective transmission time of the ultrasonic signal. This further improves the accuracy of the target transmission time at the determined location.
[0179] For example, combining Figure 12 As shown, Figure 12 This is an exemplary embodiment of the present application illustrating an application scenario where the ultrasonic signal transmission waveform is interfered with within a preset sampling period. Figure 12 Waveform A10 in the diagram corresponds to situation 3 above, that is, in the presence of bubble influence, the bubble interferes with the transmission of any two discontinuous ultrasonic signals.
[0180] Figure 12 In waveform diagram A10, waveforms A10_1, A10_2, A10_3, A10_4, and A10_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A10_1 is the first ultrasonic signal emitted within a preset sampling period, A10_2 is the second, A10_3 is the third, A10_4 is the fourth, and A10_5 is the fifth. A10_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0181] The ultrasonic signal received waveforms A10_7, A10_8, A10_9, A10_10, and A10_11 are the first to fifth ultrasonic signal received waveforms within the ultrasonic wave receiving cycle, respectively.
[0182] T10_1, T10_2, T10_3, T10_4, and T10_5 represent the theoretical transmission times in water for the first to fifth ultrasonic transmission signals (A10_1, A10_2, A10_3, A10_4, and A10_5), respectively, i.e., the first transmission time.
[0183] T10_1_1 is the time difference between the first received ultrasonic signal waveform A10_7 and the second ultrasonic signal waveform A10_8; T10_2_1 is the time difference between the second received ultrasonic signal waveform A10_8 and the third ultrasonic signal waveform A10_9; T10_3_1 is the time difference between the third received ultrasonic signal waveform A10_9 and the fourth ultrasonic signal waveform A10_10; T10_4_1 is the time difference between the fourth received ultrasonic signal waveform A10_10 and the fifth ultrasonic signal waveform A10_11.
[0184] However, in reality, T10_1+T10_1_1, T10_2+T10_2_1+T10_3_1 and T10_3+T10_3_1+T10_4_1 are the three first transmission times when the ultrasonic signal is successfully received.
[0185] As shown in waveform A10, the number of ultrasonic waves emitted is 5, and the number of ultrasonic waves received is 3. Only three discontinuous ultrasonic signal waveforms (A10_8, A10_10, and A10_11) were received; therefore, only the first transmission time of these three ultrasonic signals will be collected at this stage. The target transmission time of the ultrasonic signal can then be determined as follows:
[0186] The first transmission times of the three ultrasonic signals are sorted in descending order to obtain a transmission time array.
[0187] Transmission time arrays are, for example, [T10_2+T10_2_1+T10_3_1, T10_3+T10_3_1+T10_4_1, T10_1+T10_1_1];
[0188] Where T10_1+T10_1_1 is the transmission time of the first received ultrasonic signal.
[0189] T10_2+T10_2_1+T10_3_1 is the transmission time of the second received ultrasonic signal;
[0190] T10_3+T10_3_1+T10_4_1 is the transmission time of the third received ultrasonic signal;
[0191] The first transmission time in the transmission time array is compared pairwise to obtain the comparison result;
[0192] There are only two identical data points, namely T10_2+T10_2_1+T10_3_1 and T10_3+T10_3_1+T10_4_1;
[0193] The comparison result indicates that the number of first transmission times with the same value is less than or equal to a second preset threshold (e.g., 2). Therefore, the other transmission times in the first transmission times of the received ultrasonic signal, namely T10_2+T10_2_1+T10_3_1 and T10_3+T10_3_1+T10_4_1, are subtracted from the minimum transmission time T10_1+T10_1_1, and then divided by the period T of the ultrasonic signal to obtain the first estimated value of the interfered signal. The first estimated value of the interfered signal is compared with the actual value of the interfered signal. If they are the same, the minimum transmission time is determined as the effective transmission time of the ultrasonic signal. Then, the effective transmission time of the ultrasonic signal is estimated a second time based on the minimum transmission time.
[0194] For example, in this embodiment of the application, the actual value of the interfered signal is 2.
[0195] Depend on Figure 12 As can be seen from waveform diagram A10,
[0196] T10_2+T10_2_1+T10_3_1=T10_3+T10_3_1+T10_4_1=T10_1+T10_1_1+T,
[0197] And T10_2_1=T10_3_1=T10_4_1=T,
[0198] Therefore, after subtracting the minimum transmission time T10_1+T10_1_1 from T10_2+T10_2_1+T10_3_1 and T10_3+T10_3_1+T10_4_1, and then dividing by one period of the ultrasonic signal, the first estimated value of the interfered signal is 1, which is different from the actual value of 2 of the interfered signal. Therefore, the effective transmission time of the ultrasonic signal is estimated a second time based on the minimum transmission time.
[0199] For example, the minimum transmission time T10_1+T10_1_1 is subtracted from the period T of an ultrasonic signal to obtain a first preset value T101 = T10_1+T10_1_1-T = T10_1. Then, the other transmission times T10_2+T10_2_1+T10_3_1 and T10_3+T10_3_1+T10_4_1 in the first transmission time of the received ultrasonic signal are subtracted from the first preset value T101 = T10_1 respectively, and then divided by the period T of an ultrasonic signal to obtain a second estimated value of the interfered signal, which is 2. The second estimated value of the interfered signal is compared with the actual value 2 of the interfered signal. If they are the same, the difference between the minimum transmission time and the period T10_1+T10_1_1-T = T10_1 is determined as the effective transmission time of the ultrasonic signal.
[0200] For example, combining Figure 13 As shown, Figure 13 This is an exemplary embodiment of the present application illustrating an application scenario where the ultrasonic signal transmission waveform is interfered with within a preset sampling period. Figure 13 Waveform diagram A11 corresponds to situation 4 above, that is, in the presence of bubble influence, the bubble interferes with the transmission of two consecutive and one independent ultrasonic signals.
[0201] Figure 13 In waveform diagram A11, waveforms A11_1, A11_2, A11_3, A11_4, and A11_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A11_1 is the first ultrasonic signal emitted within a preset sampling period, A11_2 is the second, A11_3 is the third, A11_4 is the fourth, and A11_5 is the fifth. A11_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0202] The ultrasonic signal received waveforms A11_7, A11_8, A11_9, A11_10, and A11_11 are the first to fifth ultrasonic signal received waveforms within the ultrasonic wave receiving cycle, respectively.
[0203] T11_1, T11_2, T11_3, T11_4, and T11_5 represent the theoretical transmission times in water for the first to fifth ultrasonic transmission signals (A11_1, A11_2, A11_3, A11_4, and A11_5), respectively, i.e., the first transmission time.
[0204] T11_1_1 is the time difference between the first received ultrasonic signal waveform A11_7 and the second ultrasonic signal waveform A11_8; T11_2_1 is the time difference between the second received ultrasonic signal waveform A11_8 and the third ultrasonic signal waveform A11_9; T11_3_1 is the time difference between the third received ultrasonic signal waveform A11_9 and the fourth ultrasonic signal waveform A11_10; T11_4_1 is the time difference between the fourth received ultrasonic signal waveform A11_10 and the fifth ultrasonic signal waveform A11_11.
[0205] However, in reality, T11_1+T11_1_1 and T11_2+T11_2_1+T11_3_1+T11_4_1 are the two first transmission times when the ultrasonic signal is successfully received.
[0206] As shown in waveform A11, the number of ultrasonic waves emitted is 5, and the number of ultrasonic waves received is 2. Only two discontinuous ultrasonic signal received waveforms, A11_8 and A11_11, were received. Therefore, only the first transmission time of these two ultrasonic signals will be collected at present. The target transmission time of the ultrasonic signal can then be determined as follows:
[0207] Sort the first transmission times of the two ultrasonic signals from largest to smallest to obtain the transmission time array;
[0208] For example, the transmission time array is [T11_2+T11_2_1+T11_3_1+T11_4_1, T11_1+T11_1_1];
[0209] Where T11_1+T11_1_1 is the transmission time of the first received ultrasonic signal.
[0210] T11_2+T11_2_1+T11_3_1+T11_4_1 is the transmission time of the second received ultrasonic signal;
[0211] The first transmission time in the transmission time array is compared pairwise to obtain the comparison result;
[0212] If no identical data exists, the comparison result indicates that the number of first transmission times with identical values is less than or equal to a second preset threshold (e.g., 2). Therefore, the other transmission times in the first transmission time of the received ultrasonic signal, i.e., T11_2 + T11_2_1 + T11_3_1 + T11_4_1, are subtracted from the minimum transmission time T11_1 + T11_1_1, and then divided by the period T of the ultrasonic signal to obtain the first estimated value of the interfered signal. The first estimated value of the interfered signal is compared with the actual value of the interfered signal. If they are the same, the minimum transmission time is determined as the effective transmission time of the ultrasonic signal. Then, the effective transmission time of the ultrasonic signal is estimated a second time based on the minimum transmission time.
[0213] For example, in this embodiment of the application, the actual value of the interfered signal is 3.
[0214] Depend on Figure 13 As can be seen from waveform diagram A11,
[0215] T11_2+T11_2_1+T11_3_1+T11_4_1=T11_1+T11_1_1+2T,
[0216] And T11_2_1=T11_3_1=T11_4_1=T,
[0217] Therefore, after subtracting the minimum transmission time T11_1+T11_1_1 from T11_2+T11_2_1+T11_3_1+T11_4_1, and then dividing by one period of the ultrasonic signal, the first estimated value of the interfered signal is 2, which is different from the actual value of the interfered signal 3. Therefore, the effective transmission time of the ultrasonic signal is estimated a second time based on the minimum transmission time.
[0218] For example, the minimum transmission time T11_1+T11_1_1 is subtracted from the period T of an ultrasonic signal to obtain a first preset value T111=T11_1+T11_1_1-T=T11_1. Then, the other transmission times T11_2+T11_2_1+T11_3_1+T11_4_1 in the first transmission time of the received ultrasonic signal are subtracted from the first preset value T111=T11_1 respectively, and then divided by the period T of an ultrasonic signal to obtain a second estimated value of the interfered signal, which is 3. The second estimated value of the interfered signal is compared with the actual value 3 of the interfered signal. If they are the same, the difference between the minimum transmission time and the period T11_1+T11_1_1-T=T11_1 is determined as the effective transmission time of the ultrasonic signal.
[0219] For example, combining Figure 14 As shown, Figure 14 This is an exemplary embodiment of the present application illustrating an application scenario where the ultrasonic signal transmission waveform is interfered with within a preset sampling period. Figure 14 Waveform diagram A13 corresponds to case 6 above, that is, in the presence of bubble influence, the bubble interferes with the transmission of any three discontinuous ultrasonic signals.
[0220] Figure 14 In waveform diagram A13, waveforms A13_1, A13_2, A13_3, A13_4, and A13_5 represent the waveforms corresponding to five 1MHz ultrasonic signals emitted within a preset sampling period. Specifically, A13_1 is the first ultrasonic signal emitted within a preset sampling period, A13_2 is the second, A13_3 is the third, A13_4 is the fourth, and A13_5 is the fifth. A13_6 represents the transmission delay of the ultrasonic signal in the water flow.
[0221] The ultrasonic signal received waveforms A13_7, A13_8, A13_9, A13_10, and A13_11 are the first to fifth ultrasonic signal received waveforms within the ultrasonic wave receiving cycle, respectively.
[0222] T13_1, T13_2, T13_3, T13_4, and T13_5 represent the theoretical transmission times in water for the first to fifth ultrasonic transmission signals (A13_1, A13_2, A13_3, A13_4, and A13_5), respectively, i.e., the first transmission time.
[0223] T13_1_1 is the time difference between the first received ultrasonic signal waveform A13_7 and the second ultrasonic signal waveform A13_8; T13_2_1 is the time difference between the second received ultrasonic signal waveform A13_8 and the third ultrasonic signal waveform A13_9; T13_3_1 is the time difference between the third received ultrasonic signal waveform A13_9 and the fourth ultrasonic signal waveform A13_10; T13_4_1 is the time difference between the fourth received ultrasonic signal waveform A13_10 and the fifth ultrasonic signal waveform A13_11.
[0224] However, in reality, T13_1+T13_1_1 and T13_2+T13_2_1+T13_3_1 are the two first transmission times when the ultrasonic signal is successfully received.
[0225] As shown in waveform A13, the number of ultrasonic waves emitted is 5, and the number of ultrasonic waves received is 2. Only two discontinuous ultrasonic signal received waveforms, A13_8 and A13_10, were received. Therefore, only the first transmission time of these two ultrasonic signals will be collected at present. The target transmission time of the ultrasonic signal can then be determined as follows:
[0226] Sort the first transmission times of the two ultrasonic signals from largest to smallest to obtain the transmission time array;
[0227] Transmission time arrays are, for example, [T13_2+T13_2_1+T13_3_1, T13_1+T13_1_1];
[0228] Where T13_1+T13_1_1 is the transmission time of the first received ultrasonic signal.
[0229] T13_2+T13_2_1+T13_3_1 is the transmission time of the second received ultrasonic signal;
[0230] The first transmission time in the transmission time array is compared pairwise to obtain the comparison result;
[0231] If no identical data exists, the comparison result indicates that the number of first transmission times with identical values is less than or equal to a second preset threshold (e.g., 2). Therefore, the other transmission times in the first transmission time of the received ultrasonic signal, i.e., T13_2 + T13_2_1 + T13_3_1, are subtracted from the minimum transmission time T13_1 + T13_1_1, and then divided by the period T of the ultrasonic signal to obtain the first estimated value of the interfered signal. The first estimated value of the interfered signal is compared with the actual value of the interfered signal. If they are the same, the minimum transmission time is determined as the effective transmission time of the ultrasonic signal. Then, the effective transmission time of the ultrasonic signal is estimated a second time based on the minimum transmission time.
[0232] For example, in this embodiment of the application, the actual value of the interfered signal is 3.
[0233] Depend on Figure 14 As can be seen from waveform diagram A13,
[0234] T13_2+T13_2_1+T13_3_1=T13_1+T13_1_1+1T,
[0235] And T13_1_1=T13_2_1=T13_3_1=T,
[0236] Therefore, after subtracting the minimum transmission time T13_1+T13_1_1 from T13_2+T13_2_1+T13_3_1, and then dividing by one period of the ultrasonic signal, the first estimated value of the interfered signal is 1, which is different from the actual value of 3 of the interfered signal. Therefore, the effective transmission time of the ultrasonic signal is estimated a second time based on the minimum transmission time.
[0237] For example, the minimum transmission time T13_1+T13_1_1 is subtracted from the period T of an ultrasonic signal to obtain the first preset value T131=T13_1+T13_1_1-T=T13_1. Then, the other transmission times T13_2+T13_2_1+T13_3_1 in the first transmission time of the received ultrasonic signal are subtracted from the first preset value T131=T13_1 respectively, and then divided by the period T of an ultrasonic signal to obtain the second estimated value of the interfered signal as 2. The second estimated value of the interfered signal is compared with the actual value 3 of the interfered signal. If it is different from the actual value 3 of the interfered signal, the effective transmission time of the ultrasonic signal is estimated three times according to the minimum transmission time.
[0238] For example, subtracting the period T of an ultrasonic signal from the minimum transmission time T13_1+T13_1_1 yields a first preset value T131 = T13_1+T13_1_1-T = T13_1; adding the period T of an ultrasonic signal to the maximum transmission time T13_2+T13_2_1+T13_3_1 yields a second preset value T132 = T13_2+T13_2_1+T13_3_1+T; then dividing the difference T132-T131 = 3T between the second preset value T132 and the first preset value T131 by the period T of an ultrasonic signal yields a third estimated value 3 of the interfered signal; comparing the third estimated value 3 of the interfered signal with the actual value 3 of the interfered signal, if they are the same, then the difference T13_1+T13_1_1-T = T13_1 between the minimum transmission time and the period T of an ultrasonic signal is determined as the effective transmission time of the ultrasonic signal.
[0239] Step S340: Determine the amount of water flowing through the water meter per unit time based on the target transmission time of the ultrasonic signal.
[0240] In this embodiment of the application, after obtaining the target transmission time of the ultrasonic signal, the amount of water flowing through the water meter per unit time can be obtained more accurately through the target transmission time.
[0241] In some embodiments, combined with Figure 15 As shown, Figure 15 yes Figure 3 The flowchart of step S340 in the illustrated embodiment, which describes a method for determining the target transmission time of an ultrasonic signal in an exemplary embodiment, includes at least steps S1510 to S1530, as detailed below:
[0242] Step S1510: Determine the total water consumption flowing through the water meter within the target transmission time based on the target transmission time of the ultrasonic signal.
[0243] Understandably, after obtaining the target transmission time of the ultrasonic signal, the total water consumption flowing through the water meter within the target transmission time can be directly measured using the target transmission time.
[0244] Step S1520: Obtain the attenuation of the ultrasonic signal, and determine the volume of the bubble flowing through the water meter within the target transmission time based on the attenuation of the ultrasonic signal.
[0245] In this embodiment of the application, the received amplitude of the ultrasonic signal can be compared with the transmitted amplitude to obtain the attenuation of the ultrasonic signal, and then the volume of bubbles in the water passing through the water meter can be directly calculated based on the attenuation.
[0246] Step S1530: The difference between the total water consumption and the bubble volume is determined as the water consumption flowing through the water meter per unit time.
[0247] By subtracting the volume of air bubbles flowing through the water meter during the target transmission time from the total water consumption measured using the ultrasonic signal's target transmission time, the water consumption per unit time can be obtained. Using this water consumption as the meter's measurement data improves the accuracy of water consumption measurement.
[0248] In some embodiments, combined with Figure 16 As shown, Figure 16 This is a flowchart illustrating a method for measuring the flow rate of an ultrasonic water meter, as shown in another exemplary embodiment of this application; it includes at least steps S1601 to S1620, which are described in detail below:
[0249] Step S1601: Determine whether the number of ultrasonic waves emitted and the number of ultrasonic waves received are the same; if yes, proceed to step S1602; if no, proceed to step S1603.
[0250] Step S1602: Average the first transmission time of the received ultrasonic signal to obtain the target transmission time of the ultrasonic signal. Then the process ends.
[0251] Step S1603: Determine whether the number of received ultrasonic waves is greater than the first preset threshold; if not, proceed to step S1604; if yes, proceed to step S1605.
[0252] Step S1604: Determine that the target transmission time of the ultrasonic signal is zero. Then end.
[0253] Step S1605: Sort the first transmission times of the received ultrasonic signals in descending order to obtain a transmission time array.
[0254] Step S1606: Compare the first transmission times in the transmission time array pairwise to obtain the number of first transmission times with the same value.
[0255] Step S1607: Determine whether the number of first transmission times with the same value in the transmission time array is greater than or equal to the second preset threshold; if yes, proceed to step S1608; if no, proceed to step S1609.
[0256] Step S1608: Average the first transmission times with the same value to obtain the target transmission time of the ultrasonic signal. Then end.
[0257] Step S1609: Determine the minimum transmission time from the first transmission time of the received ultrasonic signal, and make an estimate of the effective transmission time of the ultrasonic signal based on the minimum transmission time to obtain the first estimated value of the interfered signal.
[0258] Step S1610: Determine whether the first estimated value of the interfered signal is the same as the actual value of the interfered signal; if yes, proceed to step S1611; if no, proceed to step S1612. In some embodiments, the actual value of the interfered signal is the number of ultrasonic signals interfered with within a preset detection period.
[0259] Step S1611: Determine the minimum transmission time as the effective transmission time of the ultrasonic signal. Then end.
[0260] Step S1612: Based on the minimum transmission time, the effective transmission time of the ultrasonic signal is estimated a second time to obtain the second estimated value of the interfered signal.
[0261] Step S1613: Determine whether the second estimated value of the interfered signal is the same as the actual value of the interfered signal; if yes, proceed to step S1614; if no, proceed to step S1615.
[0262] Step S1614: The difference between the minimum transmission time and the period of an ultrasonic signal is determined as the effective transmission time of the ultrasonic signal. Then the process ends.
[0263] Step S1615: Based on the minimum transmission time, the effective transmission time of the ultrasonic signal is estimated three times to obtain the third estimated value of the interfered signal.
[0264] Step S1616: Determine whether the third estimated value of the interfered signal is the same as the actual value of the interfered signal; if so, proceed to step S1617.
[0265] Step S1617: The difference between the minimum transmission time and the period of an ultrasonic signal is determined as the effective transmission time of the ultrasonic signal.
[0266] In this embodiment of the application, by obtaining the number of ultrasonic waves emitted and received, it is possible to clearly understand the interference of bubbles with ultrasonic waves, that is, how many ultrasonic waves are interfered with by bubbles in the water meter pipe. Then, the transmission time is estimated for different interference situations, thereby obtaining a more accurate target transmission time.
[0267] It should be noted that the steps in this embodiment are consistent with the corresponding steps in the foregoing embodiments. Therefore, for a detailed description of these steps, please refer to the description in the foregoing embodiments. This embodiment will not repeat them here.
[0268] Combination Figure 17 As shown, Figure 17 This is a flowchart illustrating a method for measuring the flow rate of an ultrasonic water meter, as shown in another exemplary embodiment of this application; Figure 6 Following step S640, at least steps S1710 to S1740 are also included, detailed below:
[0269] Step S1710: Determine whether there is a target transmission time of zero ultrasonic signal within the preset time period; if yes, proceed to step S1720; if no, proceed to step S1730.
[0270] Step S1720: Filter out the target transmission time of the ultrasonic signal that is zero.
[0271] Step S1730: Filter out the maximum and minimum values of the non-zero valid transmission times within the preset time period.
[0272] Step S1740: Average the remaining values to obtain the target transmission time of the ultrasonic signal within the preset time period.
[0273] In this embodiment, a preset detection period is 125ms, so 8 detections can be completed in 1 second. These 8 detections correspond to the detections in the above embodiments. Figures 8 to 14 The waveform diagram shows eight possible results; therefore, the preset time period in this embodiment can be 1 second.
[0274] For example, if the target transmission time of the ultrasonic signal detected within 1 second is zero, then the zero target transmission time can be filtered out. Next, the maximum and minimum values of the non-zero effective transmission times can be filtered out, and the average value of the remaining non-zero target transmission times can be calculated to obtain the target transmission time of the ultrasonic signal within 1 second. In this way, since the potential for zero target transmission time due to significant bubble-like influencing factors can be addressed by filtering out zero target transmission times before averaging, thus improving the accuracy of obtaining the target transmission time, effectively avoiding false positives, and thereby enhancing the reliability and robustness of the system.
[0275] For example, if the target transmission time of the ultrasonic signal detected within 1 second is not zero, the maximum and minimum values of the target transmission time within 1 second can be directly filtered out, and the average value of the remaining target transmission time can be calculated to obtain the effective transmission time of the ultrasonic signal within 1 second.
[0276] It should be noted that the steps in this embodiment are consistent with the corresponding steps in the foregoing embodiments. Therefore, for a detailed description of these steps, please refer to the description in the foregoing embodiments. This embodiment will not repeat them here.
[0277] Combination Figure 18 As shown, Figure 18 This is a structural diagram illustrating an exemplary embodiment of an ultrasonic water meter flow metering device. This ultrasonic water meter flow metering device can be applied to... Figure 2 The implementation environment shown, for example, the ultrasonic water meter flow metering device can be specifically configured in... Figure 2 The ultrasonic water meter 220 is shown in the illustrated implementation environment. Of course, this ultrasonic water meter flow metering device can also be applied to other exemplary implementation environments and specifically configured in the ultrasonic water meter. This embodiment does not limit the implementation environment to which the device is applicable.
[0278] like Figure 18 As shown, the exemplary ultrasonic water meter flow measurement device includes: a first determining module 1810, an acquiring module 1820, an estimating module 1830, and a second determining module 1840. The first determining module 1810 is configured to determine whether air bubbles affect the water meter pipe; the acquiring module 1820 is configured to, in the case of air bubbles affecting the water meter pipe, acquire the number of ultrasonic waves emitted and received within a preset sampling period in the water meter pipe; the estimating module 1830 is configured to estimate the transmission time of the ultrasonic signal based on the number of ultrasonic waves emitted and received to obtain the target transmission time of the ultrasonic signal; and the second determining module 1840 is configured to determine the amount of water flowing through the water meter per unit time based on the target transmission time of the ultrasonic signal.
[0279] In this embodiment, by measuring the number of ultrasonic waves emitted and received, the interference of air bubbles with ultrasonic waves can be clearly understood, i.e., how many ultrasonic waves are interfered with by air bubbles in the water meter pipe. This allows for the estimation of transmission time for different interference scenarios, resulting in a more accurate target transmission time. Consequently, even when air bubbles are present in the water meter pipe, the metering accuracy of the water meter can still be guaranteed.
[0280] It should be noted that the ultrasonic water meter flow metering device and the ultrasonic water meter flow metering method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the ultrasonic water meter flow metering device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation.
[0281] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the ultrasonic water meter flow measurement method provided in the above embodiments.
[0282] Figure 19 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 19 The computer system 1900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0283] like Figure 19 As shown, the computer system 1900 includes a Central Processing Unit (CPU) 1901, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1902 or programs loaded from storage portion 1908 into Random Access Memory (RAM) 1903, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1903. The CPU 1901, ROM 1902, and RAM 1903 are interconnected via bus 1904. An Input / Output (I / O) interface 1905 is also connected to bus 1904.
[0284] The following components are connected to I / O interface 1905: an input section 1906 including a keyboard, mouse, etc.; an output section 1907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1908 including a hard disk, etc.; and a communication section 1909 including a model interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 1909 performs communication processing via a model such as the Internet. Drive 1910 is also connected to I / O interface 1905 as needed. Removable media 1911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1910 as needed so that computer programs read from them can be installed into storage section 1908 as needed.
[0285] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from the model via communication section 1909, and / or installed from removable medium 1911. When the computer program is executed by central processing unit (CPU) 1901, it performs various functions defined in the system of this application.
[0286] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0287] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the ultrasonic water meter flow measurement method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0288] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the ultrasonic water meter flow measurement method provided in the various embodiments described above.
[0289] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.
[0290] It should be noted that when the embodiments of this application are applied to specific products or technologies, such as when obtaining ultrasonic signal parameters, it is unavoidable to obtain user-related information. Therefore, it is necessary to obtain the user's permission or consent, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
Claims
1. A method for measuring the flow rate of an ultrasonic water meter, characterized in that, include: Determine if air bubbles are present in the water meter pipes. In the presence of air bubbles in the water meter pipe, the number of ultrasonic waves emitted and received in the water meter pipe within a preset sampling period is obtained. The target transmission time of the ultrasonic signal is determined based on the number of ultrasonic waves emitted and the number of ultrasonic waves received. The amount of water flowing through the water meter per unit time is determined based on the target transmission time of the ultrasonic signal.
2. The method according to claim 1, characterized in that, Both ends of the water meter are equipped with ultrasonic signal transceivers. Ultrasonic signals are emitted from the transceiver at one end of the water meter, transmitted through the water meter pipe to the other end, and received by the transceiver at the other end. Determining whether air bubbles affect the water meter pipe includes: The ultrasonic signal inside the water meter pipe is detected to obtain the ultrasonic signal parameters; The presence of air bubbles in the water meter pipe is determined based on the ultrasonic signal parameters.
3. The method according to claim 2, characterized in that, The ultrasonic signal parameters include at least one of the ultrasonic signal transmission time, signal amplitude, and half-wave ratio; determining whether there are air bubbles affecting the water meter pipe based on the ultrasonic signal parameters includes: If the ultrasonic signal parameters exhibit abnormal fluctuations, the difference between the maximum and minimum signal amplitudes within the preset detection period, as well as the median of the half-wave ratio, are obtained. If the deviation between the difference between the maximum and minimum signal amplitudes and the first normal threshold is greater than the first preset amplitude, and the deviation between the median of the half-wave ratio and the second normal threshold is greater than the second preset amplitude, then it is determined that there is an air bubble effect in the water meter pipeline.
4. The method according to claim 1, characterized in that, Determining the target transmission time of the ultrasonic signal based on the number of ultrasonic waves emitted and the number of ultrasonic waves received includes: Determine whether the number of ultrasonic waves emitted and the number of ultrasonic waves received are the same; When the number of ultrasonic waves emitted and the number of ultrasonic waves received are not the same, and the number of ultrasonic waves received is greater than a first preset threshold, the number of first transmission times with the same value is obtained in the first transmission time of the received ultrasonic signals. The number of first transmission times with the same value is compared with a second preset threshold to obtain a comparison result; The target transmission time of the ultrasonic signal is determined based on the comparison results.
5. The method according to claim 4, characterized in that, Determining the target transmission time of the ultrasonic signal based on the comparison result includes: If the comparison result indicates that the number of first transmission times with the same value is greater than the second preset threshold, then the average value of the first transmission times with the same value is calculated to obtain the target transmission time of the ultrasonic signal.
6. The method according to claim 4, characterized in that, Determining the target transmission time of the ultrasonic signal based on the comparison result includes: If the comparison result indicates that the number of first transmission times with the same value is less than or equal to the second preset threshold, then the minimum transmission time is determined from the first transmission times of the received ultrasonic signal, and the effective transmission time of the ultrasonic signal is estimated based on the minimum transmission time. The effective transmission time is determined as the target transmission time of the ultrasonic signal.
7. The method according to claim 6, characterized in that, The step of estimating the effective transmission time of the ultrasonic signal based on the minimum transmission time includes: If the ultrasonic signals interfered with within the preset sampling period are multiple consecutive ultrasonic signals, then the minimum transmission time is determined as the effective transmission time of the ultrasonic signals; or, If the ultrasonic signals that are interfered with within the preset sampling period are multiple discontinuous ultrasonic signals, then the difference between the minimum transmission time and the period of one of the ultrasonic signals is determined as the effective transmission time of the ultrasonic signal.
8. The method according to claim 4, characterized in that, The method further includes: If the number of ultrasonic waves emitted and the number of ultrasonic waves received are not the same, and the number of ultrasonic waves received is less than or equal to the first preset threshold, then the target transmission time of the ultrasonic signal is determined to be zero.
9. The method according to claim 1, wherein determining the water consumption per unit time flowing through the water meter based on the target transmission time of the ultrasonic signal, comprises: The total water consumption flowing through the water meter within the target transmission time is determined based on the target transmission time of the ultrasonic signal. The attenuation of the ultrasonic signal is obtained, and the volume of the bubble flowing through the water meter during the target transmission time is determined based on the attenuation of the ultrasonic signal. The difference between the total water consumption and the bubble volume is determined as the water consumption flowing through the water meter per unit time.
10. A flow metering device for ultrasonic water meters, characterized in that, include: The first determining module is configured to determine whether there are air bubbles affecting the water meter pipes; The acquisition module is configured to acquire the number of ultrasonic waves emitted and received in the water meter pipe within a preset sampling period, when the presence of air bubbles in the water meter pipe is present. The estimation module is configured to estimate the transmission time of the ultrasonic signal based on the number of ultrasonic waves emitted and the number of ultrasonic waves received, so as to obtain the target transmission time of the ultrasonic signal. The second determining module is configured to determine the amount of water flowing through the water meter per unit time based on the target transmission time of the ultrasonic signal.
11. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the ultrasonic water meter flow measurement method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, It stores computer-readable instructions, which, when executed by a computer's processor, cause the computer to perform the ultrasonic water meter flow measurement method according to any one of claims 1 to 9.