Method and device for adjusting the noise shielding window of an ultrasonic flow meter
By adjusting the noise shielding window of the ultrasonic flow meter in real time according to the difference in the distance between echo signals, the metering error caused by noise interference is solved, and the accuracy of flow measurement is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GOLDEN CARD WATER TECH CO LTD
- Filing Date
- 2021-12-30
- Publication Date
- 2026-05-26
AI Technical Summary
Existing ultrasonic flow meters are affected by noise interference, and setting the noise shielding window to a fixed value leads to measurement errors. Changes in operating conditions, such as temperature changes, affect the flight time of ultrasonic waves, resulting in measurement errors.
By adjusting the noise shielding window in real time, the opening time of the noise shielding window is adjusted according to the difference in the echo signal spacing between the current measurement and the previous measurement, so as to avoid the influence of noise interference on the echo signal.
This reduces the error in fluid flow detection caused by noise and improves the accuracy of flow measurement.
Smart Images

Figure CN116412865B_ABST
Abstract
Description
Technical Field
[0001] This application relates to detection technology, and more particularly to a method and apparatus for adjusting the noise shielding window of an ultrasonic flow meter. Background Technology
[0002] Ultrasonic flow meters typically detect flow rate using the time-of-flight method. The time-of-flight method generally employs a zero-crossing comparison mechanism, and the accuracy of the propagation time detection directly impacts the flow rate measurement precision. External factors such as electromagnetic interference and vibration can introduce random interference, causing the threshold level to be falsely triggered. This results in the actual threshold detection time point shifting forward or backward, leading to waveform errors and ultimately, deviations in flow measurement accuracy.
[0003] Currently, most metrology chips used in the market and laboratories offer a noise shielding window setting function. This noise shielding window adjusts the opening time of the echo signal measurement window, eliminating the influence of noise interference at the echo signal's front end on the measurement. During program design, the value of this noise shielding window is generally set to a fixed value. However, changes in operating conditions, such as temperature variations, can cause changes in the ultrasonic wave's time of flight. When the propagation time of flight increases, the distance between the echo signal and the excitation signal also increases. If noise interference occurs at this time, misaligned waves will appear, leading to measurement errors. Conversely, when the propagation time of flight decreases, the distance between the echo signal and the excitation signal decreases. If the noise shielding window value is set too large, the effective echo signal may not be received, also resulting in measurement errors.
[0004] Therefore, it is necessary to adjust the value of the noise shielding window in real time to avoid measurement errors caused by the influence of noise on the front end of the echo signal. Summary of the Invention
[0005] This application provides a method and apparatus for adjusting the noise shielding window of an ultrasonic flow meter to reduce the error caused by noise in fluid flow detection.
[0006] In a first aspect, this application provides a method for adjusting the noise shielding window of an ultrasonic flow meter, comprising:
[0007] Based on the echo signal from this measurement, the spacing under this measurement is obtained; wherein, the spacing is the distance between the sampling start point and the characteristic position of the sampling signal;
[0008] If there is a difference between the spacing measured this time and the spacing measured in the previous time, then based on the difference, the noise shielding window of the previous measurement is adjusted to obtain the noise shielding window of the current measurement; and if there is no difference between the spacing measured this time and the spacing measured in the previous time, then the noise shielding window of the previous measurement is used as the noise shielding window of the current measurement.
[0009] Based on the noise shielding window used in this measurement, the ultrasonic flow measurement was performed.
[0010] Optionally, if there is a difference between the spacing measured in this measurement and the spacing measured in the previous measurement, then based on the difference, the noise shielding window for this measurement is obtained by adjusting the noise shielding window of the previous measurement, including:
[0011] If the spacing in this measurement is greater than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted backward by the absolute value of the difference to obtain the noise shielding window for this measurement.
[0012] If the spacing in this measurement is less than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted forward by the absolute value of the difference to obtain the noise shielding window for this measurement.
[0013] Optionally, obtaining the spacing based on the echo signal from this measurement includes:
[0014] Starting from the sampling start point, the echo signal of this measurement is sampled based on ADC sampling technology;
[0015] Determine the location of the sampling signal features in the echo signal of this measurement;
[0016] Calculate the distance between the sampling start point and the characteristic position of the sampling signal to obtain the distance under this measurement.
[0017] Optionally, the sampling signal characteristic location includes the echo signal peak position or the echo signal zero-crossing point position; the method further includes:
[0018] The excitation signal is used to excite the transmitting transducer set in the fluid channel to emit an ultrasonic signal;
[0019] The echo signal corresponding to the ultrasonic signal is received by a receiving transducer installed in the fluid channel, and used as the echo signal for this measurement.
[0020] Secondly, this application provides a noise shielding window adjustment device for an ultrasonic flow meter, comprising:
[0021] The spacing acquisition module is used to obtain the spacing under this measurement based on the echo signal of this measurement; wherein, the spacing is the spacing between the sampling start point and the characteristic position of the sampling signal;
[0022] The noise shielding window adjustment module is used to adjust the noise shielding window of the previous measurement to obtain the noise shielding window of the current measurement if there is a difference between the distance measured in the current measurement and the distance measured in the previous measurement; and to use the noise shielding window of the previous measurement as the noise shielding window of the current measurement if there is no difference between the distance measured in the current measurement and the distance measured in the previous measurement.
[0023] The flow measurement module is used to perform the ultrasonic flow measurement based on the noise shielding window of this measurement.
[0024] Optionally, the shielding window adjustment module is specifically used for:
[0025] If the spacing in this measurement is greater than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted backward by the absolute value of the difference to obtain the noise shielding window for this measurement.
[0026] If the spacing in this measurement is less than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted forward by the absolute value of the difference to obtain the noise shielding window for this measurement.
[0027] Optionally, the spacing acquisition module is specifically used for:
[0028] Starting from the sampling start point, the echo signal of this measurement is sampled based on ADC sampling technology;
[0029] Determine the location of the sampling signal features in the echo signal of this measurement;
[0030] Calculate the distance between the sampling start point and the characteristic position of the sampling signal to obtain the distance under this measurement.
[0031] Optionally, the sampling signal characteristic position includes the echo signal peak position or the echo signal zero-crossing point position; the device further includes:
[0032] The signal generation module is used to excite the transmitting transducer set in the fluid channel to emit ultrasonic signals through the excitation signal;
[0033] The echo receiving module is used to receive the echo signal corresponding to the ultrasonic signal through a receiving transducer installed in the fluid channel, and use it as the echo signal for this measurement.
[0034] Thirdly, this application provides an electronic device, comprising:
[0035] At least one processor; and
[0036] A memory communicatively connected to the at least one processor; wherein,
[0037] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.
[0038] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0039] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0040] This application provides a method and apparatus for adjusting the noise shielding window of an ultrasonic flow meter. The method includes: obtaining the spacing for the current measurement based on the echo signal of the current measurement; wherein the spacing is the distance between the sampling start point and the characteristic position of the sampling signal; if there is a difference between the spacing in the current measurement and the spacing in the previous measurement, then based on the difference, adjusting the noise shielding window of the previous measurement to obtain the noise shielding window for the current measurement; and if there is no difference between the spacing in the current measurement and the spacing in the previous measurement, then using the noise shielding window of the previous measurement as the noise shielding window for the current measurement; and performing the current ultrasonic flow measurement according to the noise shielding window of the current measurement. By adjusting the noise shielding window in real time, the time period of the effective signal is limited, avoiding the erroneous waves caused by noise interference at the front end of the effective signal, and reducing the error caused by noise in fluid flow detection. Attached Figure Description
[0041] 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.
[0042] Figure 1 This application provides an example of an application scenario diagram;
[0043] Figure 2 This is another application scenario illustration provided as an example in this application;
[0044] Figure 3 A schematic flowchart illustrating a method for adjusting the noise shielding window of an ultrasonic flow meter, provided in Embodiment 1 of this application;
[0045] Figure 4 A schematic flowchart illustrating another method for adjusting the noise shielding window of an ultrasonic flow meter provided in Embodiment 1 of this application;
[0046] Figure 5 This is a schematic flowchart of a noise shielding window adjustment method for an ultrasonic flow meter provided in Embodiment 2 of this application;
[0047] Figure 6 This is a schematic flowchart of a noise shielding window adjustment method for an ultrasonic flow meter provided in Embodiment 3 of this application;
[0048] Figure 7 This is a schematic diagram of the structure of a noise shielding window adjustment device for an ultrasonic flow meter provided in Embodiment 4 of this application;
[0049] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of this application.
[0050] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0051] 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 consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0052] Figure 1 The application scenario diagram provided in this application is as follows: Figure 1 As shown, Figure 1 This paper presents a time-of-flight (TOF) measurement principle for ultrasonic flow meters. Two ultrasonic transducers are installed in the fluid channel. By detecting the downstream and upstream times of the echoes, the fluid velocity can be obtained, and thus the instantaneous flow rate can be calculated. The downstream and upstream times are typically detected using a zero-crossing comparison method. By detecting the time it takes for the echo to first exceed a threshold level, the fluid propagation time can be obtained. Therefore, the accuracy of the zero-crossing comparison method in time detection directly affects the flow rate calculation.
[0053] Figure 2 This application provides another example of an application scenario diagram, such as... Figure 2 As shown, in the application of the zero-crossing comparison method, noise interference will lead to severe signal misalignment. When there is no noise interference, the set threshold level intersects with the first echo signal reaching that amplitude, with an intersection point of 2, and the resulting flight time is t2. However, when noise interference occurs at the leading edge of the echo signal, the noise signal will intersect with the threshold level, with an intersection point of 1, and the resulting flight time is t1, where t1 < t2. It can be seen that a very serious signal misalignment occurs at this point, which will lead to a large error in flow detection.
[0054] In some embodiments, the metering chip provides a noise shielding window setting function. This noise shielding window adjusts the opening time of the echo signal measurement window, eliminating the influence of noise interference at the echo signal front end on the measurement. During programming, the value of this noise shielding window is generally set to a fixed value. However, changes in operating conditions, such as temperature variations, can cause changes in the ultrasonic wave's time of flight. When the propagation time of flight increases, the distance between the echo signal and the excitation signal also increases. If noise interference occurs at this time, misaligned echoes will appear, leading to measurement errors. Conversely, when the propagation time of flight decreases, the distance between the echo signal and the excitation signal decreases. If the noise shielding window value is set too large, the effective echo signal may not be received, also resulting in measurement errors. Therefore, it is necessary to adjust the value of the noise shielding window in real time to avoid measurement errors during ultrasonic flow meter detection. The value of the ultrasonic shielding window typically refers to the opening time of the ultrasonic shielding window. Before the opening time, the signal amplitude received by the chip is all set to 0, and all inputs are shielded, thereby suppressing misaligned echoes that may be caused by noise at the echo front end.
[0055] The technical solutions of this application will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. In the description of this application, unless otherwise expressly specified and limited, the terms should be broadly understood within the art. The embodiments of this application will now be described with reference to the accompanying drawings.
[0056] Example 1
[0057] Figure 3 This is a schematic flowchart of a method for adjusting the noise shielding window of an ultrasonic flowmeter according to Embodiment 1 of this application, as shown below. Figure 3 As shown, the method includes:
[0058] S101: Based on the echo signal of this measurement, obtain the spacing under this measurement; wherein, the spacing is the spacing between the sampling start point and the characteristic position of the sampling signal;
[0059] S110: If there is a difference between the spacing measured this time and the spacing measured in the previous time, then based on the difference, the noise shielding window of the previous measurement is adjusted to obtain the noise shielding window of the current measurement.
[0060] S111: If there is no difference between the spacing measured this time and the spacing measured in the previous time, then the noise shielding window of the previous measurement shall be used as the noise shielding window for this measurement.
[0061] S102: Perform this ultrasonic flow measurement based on the noise shielding window used in this measurement.
[0062] The following is an illustrative example of this embodiment in conjunction with a specific application scenario: First, based on a segment of echo signal between the sampling start point and the sampling end point during this measurement, the spacing under this measurement is obtained; wherein, the spacing is the spacing between the sampling start point and the characteristic position of the sampling signal, and the spacing is calculated by some special sampling signal characteristic positions in the echo signal.
[0063] If the spacing measured this time differs from the spacing measured in the previous time, the noise shielding window of the previous measurement is adjusted based on the difference to obtain the noise shielding window of the current measurement. If the spacing measured this time is exactly the same as the spacing measured in the previous time, or if the difference is within an acceptable error range, the noise shielding window of the previous measurement is used as the noise shielding window of the current measurement. Then, the ultrasonic flow measurement is performed according to the noise shielding window of the current measurement.
[0064] For example, the characteristic position of the sampled signal includes the peak position of the echo signal or the zero-crossing position of the echo signal. The characteristic position of the sampled signal is usually selected based on the characteristics of the waveform, and some universal characteristic moments are selected as a reference and compared with the time of the sampling start point, rather than being limited to the two mentioned above.
[0065] The peak position of the echo signal can be obtained by detecting the time corresponding to the point of maximum signal amplitude in the sampled signal. The zero-crossing position of the echo signal can be obtained by the zero-crossing comparison method or the slope detection. The time corresponding to the time when the derivative of the slope with respect to time in the sampled signal is 0 is taken as the zero-crossing position of the echo signal. At this time, the first time when the derivative of the slope with respect to time is 0 is defined as the zero-crossing position of the echo signal used when detecting the interval.
[0066] One example, Figure 4 This is a schematic flowchart of another method for adjusting the noise shielding window of an ultrasonic flowmeter provided in Embodiment 1 of this application, as shown below. Figure 4 As shown, prior to S101, the method further includes:
[0067] S10: The excitation signal excites the transmitting transducer installed in the fluid channel to emit an ultrasonic signal;
[0068] S11: The echo signal corresponding to the ultrasonic signal is received by the receiving transducer installed in the fluid channel, and used as the echo signal for this measurement.
[0069] Specifically, the method provided in this example is directly related to the principle of flow detection by an ultrasonic flow meter. First, an excitation signal is used to excite the transmitting transducer set in the fluid channel to emit an ultrasonic signal. Then, the receiving transducer set in the fluid channel receives the echo signal corresponding to the ultrasonic signal as the echo signal for this measurement. Finally, the echo signal is processed and calculated.
[0070] This embodiment provides a method for adjusting the noise shielding window of an ultrasonic flow meter, including: obtaining the spacing under the current measurement based on the echo signal of the current measurement; wherein the spacing is the distance between the sampling start point and the characteristic position of the sampling signal; if there is a difference between the spacing under the current measurement and the spacing under the previous measurement, then based on the difference, the noise shielding window of the previous measurement is adjusted to obtain the noise shielding window for the current measurement; and if there is no difference between the spacing under the current measurement and the spacing under the previous measurement, then the noise shielding window of the previous measurement is used as the noise shielding window for the current measurement; and performing the current ultrasonic flow measurement according to the noise shielding window of the current measurement. By adjusting the noise shielding window in real time, the time period of the effective signal is limited, avoiding the erroneous waves caused by noise interference at the front end of the effective signal, and reducing the error caused by noise in fluid flow detection.
[0071] Example 2
[0072] Figure 5 This is a schematic flowchart of a noise shielding window adjustment method for an ultrasonic flowmeter provided in Embodiment 2 of this application, as shown below. Figure 5 As shown, based on any other embodiment, S101 specifically includes:
[0073] S201: Starting from the sampling start point, the echo signal of this measurement is sampled based on ADC sampling technology;
[0074] S202: Determine the characteristic location of the sampled signal in the echo signal of this measurement;
[0075] S203: Calculate the distance between the sampling start point and the characteristic position of the sampling signal to obtain the distance under this measurement.
[0076] The following is an illustrative example of this embodiment, illustrated in a specific application scenario: The sampling process described in this application is performed using an ADC, and its sampling start point and sampling end point are typically fixed. However, the position of the echo signal within the sampling area is variable. When the temperature decreases, the speed of sound decreases, and the propagation time increases, resulting in the echo signal shifting backward within the sampling interval; when the temperature increases, the speed of sound increases, and the propagation time decreases, resulting in the echo signal shifting forward. As the sound wave signal moves, its characteristic position will also shift forward or backward accordingly. Based on the time corresponding to the characteristic position of the sampled signal, the distance between the sampling start point and the characteristic position of the sampled signal can be calculated, and the distance under this measurement can be obtained, providing a basis for adjusting the noise shielding window.
[0077] This embodiment provides a method for adjusting the noise shielding window of an ultrasonic flowmeter. Starting from the sampling start point, the echo signal of the current measurement is sampled using ADC sampling technology; the characteristic positions of the sampled signal in the current measurement echo signal are determined; the distance between the sampling start point and the characteristic positions of the sampled signal is calculated to obtain the distance under the current measurement. The echo signal is sampled using an ADC, its sampling start point is fixed, the distance is calculated using the characteristic positions of the sampled signal, and this is used to adjust the noise shielding window.
[0078] Example 3
[0079] Figure 6 This is a schematic flowchart of a noise shielding window adjustment method for an ultrasonic flowmeter provided in Embodiment 3 of this application, as shown below. Figure 6 As shown, based on any other embodiment, S110 can specifically be:
[0080] S301: If the spacing in this measurement is greater than the spacing in the previous measurement, then shift the noise shielding window of the previous measurement backward by the absolute value of the difference to obtain the noise shielding window for this measurement.
[0081] S302: If the spacing in this measurement is less than the spacing in the previous measurement, then shift the noise shielding window of the previous measurement forward by the absolute value of the difference to obtain the noise shielding window for this measurement.
[0082] This embodiment is illustrated with an example in the context of a specific application scenario: If the current measurement interval is the same as the previous interval, or the difference is within the error range, no adjustment is made to the noise shielding window; however, if there is a significant difference between the current measurement interval and the previous interval, the noise shielding window needs to be adjusted according to the magnitude of the difference. Specifically, if the current measurement interval is greater than the previous measurement interval, the noise shielding window of the previous measurement is shifted backward by the absolute value of the difference to obtain the noise shielding window for the current measurement; if the current measurement interval is less than the previous measurement interval, the noise shielding window of the previous measurement is shifted forward by the absolute value of the difference to obtain the noise shielding window for the current measurement.
[0083] Taking the effect of temperature change on the echo signal as an example, when the temperature is normal, calculate the distance t between the initial peak point and the sampling start point. normal As the temperature decreases, the echo signal shifts backward; calculate the distance t between the peak point and the sampling start point at this time. low When the temperature rises, the echo signal shifts forward. Calculate the distance thigh between the peak point and the sampling start point at this time. Calculate the change Δt between the peak point and the sampling start point before and after the temperature change. If Δt > 0, add |Δt| to the value of the previous noise shielding window, that is, move the noise shielding window used in the previous measurement backward. If Δt < 0, subtract |Δt| from the value of the previous noise shielding window, that is, move the noise shielding window used in the previous measurement forward. If Δt = 0, directly use the noise shielding window from the previous measurement.
[0084] This embodiment provides a method for adjusting the noise shielding window of an ultrasonic flow meter. If the distance measured in the current measurement is greater than the distance measured in the previous measurement, the noise shielding window of the previous measurement is shifted backward by the absolute value of the difference to obtain the noise shielding window for the current measurement. If the distance measured in the current measurement is less than the distance measured in the previous measurement, the noise shielding window of the previous measurement is shifted forward by the absolute value of the difference to obtain the noise shielding window for the current measurement. By adjusting the action time of the noise shielding window based on the difference between the distance measured in the current and previous measurements, the distortion caused by noise interference at the effective signal front end is avoided, reducing the error caused by noise in fluid flow detection.
[0085] Example 4
[0086] Embodiment 4 of this application also provides a noise shielding window adjustment device for an ultrasonic flow meter to achieve the aforementioned method. Figure 7 This is a schematic diagram of the structure of a noise shielding window adjustment device for an ultrasonic flowmeter provided in Embodiment 4 of this application, as shown below. Figure 7 As shown, based on any other embodiment, the apparatus includes:
[0087] The spacing acquisition module 41 is used to obtain the spacing under the current measurement based on the echo signal of the current measurement; wherein, the spacing is the spacing between the sampling start point and the characteristic position of the sampling signal;
[0088] The noise shielding window adjustment module 42 is used to adjust the noise shielding window of the previous measurement to obtain the noise shielding window of the current measurement if there is a difference between the distance measured in the current measurement and the distance measured in the previous measurement; and to use the noise shielding window of the previous measurement as the noise shielding window of the current measurement if there is no difference between the distance measured in the current measurement and the distance measured in the previous measurement.
[0089] The flow measurement module 43 is used to perform the ultrasonic flow measurement based on the noise shielding window of this measurement.
[0090] The illustrated structure combines all the implementation methods in this embodiment. In actual applications, it should be determined according to the situation, but at least the spacing acquisition module 41, the shielding window adjustment module 42, and the flow measurement module 43 should be retained.
[0091] For example, the characteristic position of the sampled signal includes the peak position of the echo signal or the zero-crossing position of the echo signal. The characteristic position of the sampled signal is usually selected based on the characteristics of the waveform, and some universal characteristic moments are selected as a reference and compared with the time of the sampling start point, rather than being limited to the two mentioned above.
[0092] In one example, the device further includes:
[0093] Signal generation module 44 is used to excite the transmitting transducer installed in the fluid channel to emit ultrasonic signals through excitation signals;
[0094] The echo receiving module 45 is used to receive the echo signal corresponding to the ultrasonic signal through a receiving transducer disposed in the fluid channel, and use it as the echo signal for this measurement.
[0095] This example is directly related to the principle of flow detection by an ultrasonic flow meter. First, the signal generation module 44 generates an excitation signal to excite the transmitting transducer set in the fluid channel to emit an ultrasonic signal. Then, the echo receiving module 45 enables the receiving transducer set in the fluid channel to receive the echo signal corresponding to the ultrasonic signal, which is used as the echo signal for this measurement. Finally, the echo signal is processed and calculated.
[0096] One example is the spacing acquisition module 41, which is specifically used for:
[0097] Starting from the sampling start point, the echo signal of this measurement is sampled based on ADC sampling technology;
[0098] Determine the location of the sampling signal features in the echo signal of this measurement;
[0099] Calculate the distance between the sampling start point and the characteristic position of the sampling signal to obtain the distance under this measurement.
[0100] The echo signal is sampled by an ADC, the sampling start point is fixed, the spacing is calculated based on the characteristic positions of the sampled signal, and the noise shielding window is adjusted accordingly.
[0101] One example is the shielding window adjustment module 42, which is specifically used for:
[0102] If the spacing in this measurement is greater than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted backward by the absolute value of the difference to obtain the noise shielding window for this measurement.
[0103] If the spacing in this measurement is less than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted forward by the absolute value of the difference to obtain the noise shielding window for this measurement.
[0104] By adjusting the duration of the noise shielding window based on the difference between the spacing measured in this study and the spacing measured in the previous study, the error wave caused by noise interference at the effective signal front end is avoided, and the error caused by noise in fluid flow detection is reduced.
[0105] This embodiment provides a noise shielding window adjustment device for an ultrasonic flow meter, including: a spacing acquisition module, used to obtain the spacing under the current measurement based on the echo signal of the current measurement; wherein, the spacing is the spacing between the sampling start point and the characteristic position of the sampling signal; a shielding window adjustment module, used to obtain the noise shielding window of the current measurement by adjusting the noise shielding window of the previous measurement based on the difference if there is a difference between the spacing under the current measurement and the spacing under the previous measurement; and if there is no difference between the spacing under the current measurement and the spacing under the previous measurement, the noise shielding window of the previous measurement is used as the noise shielding window of the current measurement; and a flow measurement module, used to perform the current ultrasonic flow measurement according to the noise shielding window of the current measurement. By setting thresholds based on parameters such as the highest open-circuit voltage of the battery, the lowest open-circuit voltage of the battery, the battery capacity, and sensor error, the battery status can be identified, improving the accuracy of battery operating status identification. Real-time adjustment of the noise shielding window limits the time period of the effective signal, avoiding erroneous waves caused by noise interference at the front end of the effective signal, and reducing the error caused by noise in fluid flow detection.
[0106] Example 5
[0107] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of this application, as shown below. Figure 8As shown, the electronic device includes:
[0108] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logical instructions stored in the memory 294 to execute the methods of the above embodiments.
[0109] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0110] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, thereby implementing the methods in the above-described method embodiments.
[0111] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0112] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in any of the embodiments.
[0113] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method provided in the above embodiments.
[0114] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0115] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for adjusting the noise shielding window of an ultrasonic flow meter, characterized in that, include: Based on the echo signal from this measurement, the spacing under this measurement is obtained; wherein, the spacing is the distance between the sampling start point and the characteristic position of the sampling signal, the sampling start point is a fixed time point, and the characteristic position of the sampling signal moves forward or backward within the sampling interval as the ultrasonic wave changes; If there is a difference between the spacing measured this time and the spacing measured in the previous time, then based on the difference, the noise shielding window of the previous measurement is adjusted to obtain the noise shielding window of the current measurement; and if there is no difference between the spacing measured this time and the spacing measured in the previous time, then the noise shielding window of the previous measurement is used as the noise shielding window of the current measurement. The method of obtaining the noise shielding window for the current measurement by adjusting the noise shielding window of the previous measurement includes: if the spacing in the current measurement is greater than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted backward by the absolute value of the difference to obtain the noise shielding window for the current measurement; if the spacing in the current measurement is less than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted forward by the absolute value of the difference to obtain the noise shielding window for the current measurement. Based on the noise shielding window used in this measurement, the ultrasonic flow measurement was performed.
2. The method according to claim 1, characterized in that, The process of obtaining the spacing based on the echo signal from this measurement includes: Starting from the sampling start point, the echo signal of this measurement is sampled based on ADC sampling technology; Determine the location of the sampling signal features in the echo signal of this measurement; Calculate the distance between the sampling start point and the characteristic position of the sampling signal to obtain the distance under this measurement.
3. The method according to claim 1 or 2, characterized in that, The characteristic location of the sampled signal includes the peak position of the echo signal or the zero-crossing point position of the echo signal; the method further includes: The excitation signal is used to excite the transmitting transducer set in the fluid channel to emit an ultrasonic signal; The echo signal corresponding to the ultrasonic signal is received by a receiving transducer installed in the fluid channel, and used as the echo signal for this measurement.
4. A noise shielding window adjustment device for an ultrasonic flow meter, characterized in that, include: The spacing acquisition module is used to obtain the spacing under this measurement based on the echo signal of this measurement; wherein, the spacing is the spacing between the sampling start point and the characteristic position of the sampling signal; The noise shielding window adjustment module is used to adjust the noise shielding window of the previous measurement to obtain the noise shielding window of the current measurement if there is a difference between the distance measured in the current measurement and the distance measured in the previous measurement; and to use the noise shielding window of the previous measurement as the noise shielding window of the current measurement if there is no difference between the distance measured in the current measurement and the distance measured in the previous measurement. The flow measurement module is used to perform the ultrasonic flow measurement based on the noise shielding window of this measurement. The shielding window adjustment module is specifically used for: If the spacing in this measurement is greater than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted backward by the absolute value of the difference to obtain the noise shielding window for this measurement. If the spacing in this measurement is less than the spacing in the previous measurement, then the noise shielding window of the previous measurement is shifted forward by the absolute value of the difference to obtain the noise shielding window for this measurement.
5. The apparatus according to claim 4, characterized in that, The spacing acquisition module is specifically used for: Starting from the sampling start point, the echo signal of this measurement is sampled based on ADC sampling technology; Determine the location of the sampling signal features in the echo signal of this measurement; Calculate the distance between the sampling start point and the characteristic position of the sampling signal to obtain the distance under this measurement.
6. The apparatus according to claim 4 or 5, characterized in that, The characteristic location of the sampled signal includes the peak position of the echo signal or the zero-crossing point position of the echo signal; the device further includes: The signal generation module is used to excite the transmitting transducer set in the fluid channel to emit ultrasonic signals through the excitation signal; The echo receiving module is used to receive the echo signal corresponding to the ultrasonic signal through a receiving transducer installed in the fluid channel, and use it as the echo signal for this measurement.
7. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-3.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-3.
9. A computer program product comprising a computer program that, when executed by a processor, implements the method as described in any one of claims 1-3.