Threshold adaptive method for ultrasonic metering instruments and ultrasonic metering instruments
By adopting the threshold adaptive method and remaining working time calculation in the ultrasonic flowmeter, the problem of reduced measurement accuracy caused by the degradation of transducer performance and contamination is solved, and higher detection accuracy and longer service life are achieved.
Patent Information
- Application Number
- CN202410971279.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-19
AI Technical Summary
When ultrasonic flowmeters are used under different pressures, temperatures, and for a long time, the performance of the transducer decreases and surface contamination causes changes in waveform characteristics, resulting in a decrease in measurement accuracy. It is difficult for the fixed threshold to adapt to this change, resulting in measurement errors.
The threshold adaptive method is used to obtain the waveform of the transducer, calculate the actual threshold and threshold drift trend, dynamically update the threshold to adapt it to the current working state, improve detection accuracy, and provide early warning of failure by calculating the remaining working time.
It improves the detection accuracy of ultrasonic measuring instruments, avoids measurement deviations caused by changes in waveform characteristics, and promptly reminds maintenance personnel to replace failed transducers, extending the service life.
Smart Images

Figure CN118500489B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of ultrasonic metering, and in particular to a threshold self-adaptation method of an ultrasonic metering instrument and an ultrasonic metering instrument. Background Art
[0002] Ultrasonic flow meters work based on the relationship between the propagation speed of ultrasonic signals in the medium and the flow rate of the medium. When the medium flows, the propagation speed of the sound waves in the downstream direction will increase, while the propagation speed in the upstream direction will slow down. This speed difference is used to calculate the flow rate and flow of the medium.
[0003] At present, the transducer of ultrasonic flowmeter is prone to performance changes under different pressures and temperatures, the most obvious of which is the change in waveform characteristics. At the same time, the performance of the transducer itself deteriorates after long-term use and the surface pollution of the transducer increases, which will also cause its waveform characteristics to change. In this case, there will be deviations when calculating the flight time of the ultrasonic wave between the two transducers. Moreover, due to the change in waveform characteristics, if the target point detection threshold is fixed, it may cause errors in measurement or even think that the waveform is wrong, resulting in the measurement accuracy of the ultrasonic flowmeter failing to meet the requirements. Summary of the invention
[0004] In order to solve the deficiencies of the prior art, the purpose of the present application is to provide a threshold self-adaptation method of an ultrasonic metering instrument and an ultrasonic metering instrument capable of dynamically adjusting the threshold.
[0005] To achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a threshold adaptive method for an ultrasonic meter, wherein the ultrasonic meter includes at least two transducers, the two transducers can send and receive ultrasonic signals to each other, and any transducer is provided with a preset threshold for finding a target point, the preset threshold includes a preset high threshold and a preset low threshold, and the threshold adaptive method includes the following steps:
[0007] Obtaining waveforms of two transducers, and obtaining target points on corresponding waveforms based on a preset threshold;
[0008] Based on any target point, obtaining an actual threshold of a corresponding transducer, where the actual threshold includes an actual high threshold and an actual low threshold;
[0009] Based on the actual threshold value and the preset threshold value of any transducer, obtaining the threshold drift trend of the corresponding transducer, the threshold drift trend including the high threshold drift trend and the low threshold drift trend;
[0010] It is analyzed whether the high threshold drift trend and the low threshold drift trend between the two transducers are the same. In response to any threshold drift trend being the same, the threshold with the same drift trend between the two transducers is updated according to the actual threshold of the transducer.
[0011] Furthermore, the threshold adaptive method also includes: evaluating the stability of the sampling waveform of the transducer within a preset sampling cycle number, and in response to the sampling waveform within the preset sampling cycle number satisfying a preset stability evaluation rule, determining that the sampling waveform within the preset sampling cycle number is stable; in response to the sampling waveforms of the two transducers within the preset sampling cycle number being stable, obtaining the actual threshold of the transducer in the corresponding preset sampling cycle based on the sampling waveform of any transducer within the preset sampling cycle number, and obtaining the threshold drift trend of the corresponding transducer based on the actual threshold in each preset sampling cycle.
[0012] Furthermore, evaluating the stability of the sampling waveform of the transducer within the preset sampling period number includes: taking each actual high threshold and actual low threshold of any transducer within the preset sampling period number as samples, calculating the sample variance; the preset stability evaluation rules include:
[0013] In response to the sample variances of the two transducers being less than or equal to a preset stability critical value, it is determined that the sampled waveforms of the transducers within a preset number of sampling cycles are stable.
[0014] Furthermore, the threshold adaptation method also includes: obtaining a comprehensive threshold, the comprehensive threshold includes a comprehensive high threshold and a comprehensive low threshold; the comprehensive high threshold is obtained by calculating the average of each actual high threshold within a preset number of sampling cycles; the comprehensive low threshold is obtained by calculating the average of each actual low threshold within a preset number of sampling cycles; the comprehensive threshold is compared with the preset threshold to obtain the threshold drift trend of the transducer.
[0015] Furthermore, the threshold adaptive method also includes judging the accuracy of the comprehensive threshold, including the following steps: obtaining a preset number of comprehensive high thresholds and comprehensive low thresholds for any transducer, the preset number being greater than or equal to 1 and less than or equal to 10; calculating the comprehensive high threshold variance and the comprehensive low threshold variance of the corresponding transducer according to the preset number of comprehensive high thresholds and comprehensive low thresholds; in response to the comprehensive high threshold variances of the two transducers being less than or equal to the preset high-level stability critical value, judging that the preset number of comprehensive high thresholds are correct; in response to the comprehensive low threshold variances of the two transducers being less than or equal to the preset low-level stability critical value, judging that the preset number of comprehensive low thresholds are correct; based on the correct comprehensive threshold, updating the corresponding preset threshold of the transducer.
[0016] Further, the threshold adaptive method further includes: calculating the mean value of a correct preset number of comprehensive high thresholds, and updating the preset high threshold of the transducer based on the mean value of the comprehensive high thresholds; calculating the mean value of a correct preset number of comprehensive low thresholds, and updating the preset low threshold of the transducer based on the mean value of the comprehensive low thresholds.
[0017] Further, the updated preset low threshold and the updated preset high threshold are obtained through the following formula:
[0018] THL’_C = THL_C + (THL1 - THL_C)*0.9;
[0019] THH’_C = THH_C + (THH1 - THH_C)*0.9;
[0020] In the formula, THL1 represents the mean value of the comprehensive low thresholds, THH1 represents the mean value of the comprehensive high thresholds, THL_C represents the preset low threshold before update, THH_C represents the preset high threshold before update, THL’_C represents the preset low threshold after update, and THH’_C represents the preset high threshold after update.
[0021] Further, the threshold adaptive method further includes calculating the remaining working time of the transducer, including the following steps: setting the limit high threshold and the limit low threshold of the transducer; obtaining the time when the transducer first configures the preset threshold, and the preset high threshold and preset low threshold configured for the first time; obtaining the time when the transducer most recently configures the preset threshold, and the preset high threshold and preset low threshold configured most recently; the remaining working time of the transducer is represented by the following formula:
[0022] T_L = (THL_L - THL’_C)*(T2 - T1) / (THL’_C - THL);
[0023] T_H = (THH_L - THH’_C)*(T2 - T1) / (THH’_C - THH);
[0024] When T_L < T_H, the remaining working time is T_L; when T_L >= T_H, the remaining working time of the transducer is T_H;
[0025] In the formula, T1 represents the time when the preset threshold is first configured, THL and THH respectively represent the preset low threshold and preset high threshold configured for the first time, T2 represents the internal system time of the ultrasonic meter, THL’_C and THH’_C respectively represent the preset low threshold and preset high threshold configured most recently, and THL_L and THH_L respectively represent the limit low threshold and limit high threshold of the transducer.
[0026] Furthermore, the threshold adaptive method further includes: in response to the remaining working time of any transducer being less than or equal to a preset time threshold, issuing a failure warning to the transducer.
[0027] In a second aspect, the present application provides an ultrasonic meter, which includes at least two transducers, and the two transducers can send and receive ultrasonic signals to each other. The ultrasonic meter uses the threshold adaptive method of the ultrasonic meter provided in the first aspect.
[0028] The threshold adaptive method of the ultrasonic meter and the ultrasonic meter achieve dynamic adjustment of the preset threshold of the transducer, so that the acquired target point can adapt to the current working state of the transducer, thereby improving the detection accuracy of the ultrasonic meter. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a flowchart of a threshold adaptive method in the first embodiment of the present application;
[0030] Figure 2 A waveform diagram before a waveform characteristic changes in an embodiment of the present application;
[0031] Figure 3 A waveform diagram after a waveform characteristic is changed in an embodiment of the present application;
[0032] Figure 4 This is a flowchart of a threshold adaptive method in a second embodiment of the present application;
[0033] Figure 5 This is a flowchart of a threshold adaptive method in a third embodiment of the present application;
[0034] Figure 6 This is a flowchart of a threshold adaptive method in a fourth embodiment of the present application;
[0035] Figure 7 This is a flowchart of a threshold adaptive method in a fifth embodiment of the present application;
[0036] Figure 8 This is a flowchart of a threshold adaptive method in a sixth embodiment of the present application;
[0037] Fig. 9 It is a schematic diagram of the structure of an ultrasonic measuring instrument in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the specific implementation manner of the present application will be clearly and completely described below in conjunction with the drawings in the implementation manner of the present application.
[0039] The purpose of this application is to provide a technical solution to solve the problem of wave loss or error caused by a fixed threshold when the waveform characteristics of an ultrasonic meter in the related art change. Based on this purpose, the application provides a threshold adaptive method for an ultrasonic meter, which can realize dynamic adjustment of the threshold of a transducer, so that the threshold can adapt to the current working state of the transducer to obtain a more accurate target point, thereby improving the detection accuracy of the ultrasonic meter.
[0040] It should be noted that the serial numbers of the steps in the embodiments of the present application do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0041] like Figure 1 As shown, an embodiment of the present application provides a threshold adaptive method for an ultrasonic meter, wherein the ultrasonic meter includes at least two transducers, the two transducers can send and receive ultrasonic signals to each other, and any transducer is provided with a preset threshold for finding a target point, wherein the preset threshold includes a preset high threshold and a preset low threshold. The threshold adaptive method specifically includes the following steps:
[0042] Step S101 , obtaining waveforms of two transducers, and obtaining target points on corresponding waveforms based on a preset threshold.
[0043] Step S102: based on any target point, obtaining an actual threshold of the corresponding transducer, where the actual threshold includes an actual high threshold and an actual low threshold.
[0044] Step S103: based on the actual threshold value and the preset threshold value of any transducer, a threshold drift trend of the corresponding transducer is obtained, where the threshold drift trend includes a high threshold drift trend and a low threshold drift trend.
[0045] Step S104, analyzing whether the high threshold drift trend and the low threshold drift trend between the two transducers are the same, in response to any threshold drift trend being the same, updating the threshold with the same drift trend between the two transducers according to the actual threshold of the transducer.
[0046] The following is a detailed description of the steps of the threshold adaptive method. Ultrasonic measuring instruments generally calculate the flow rate of the measured gas or liquid by selecting a target point on the waveform to calculate the flight time of the ultrasonic wave from emission to reception. Therefore, any transducer can be set with a preset threshold for finding the target point to ensure that the target point can be accurately found. Among them, the preset threshold includes a high threshold and a low threshold. The target point is greater than the preset low threshold and less than the preset high threshold. Based on the preset threshold, the target point on the corresponding waveform can be obtained.
[0047] It should be noted that the target point may be a waveform characteristic value, such as peak-to-peak value, zero-crossing rate, signal-to-noise ratio, etc., which is not limited here.
[0048] It should be noted that the threshold adaptive method provided in the embodiment of the present application can be adapted to a variety of ultrasonic meters, such as ultrasonic meters with a mono-channel transducer, a dual-channel transducer, a quad-channel transducer, a hexa-channel transducer, etc. Among them, the arrangement of the multi-channel transducer can be parallel, cross, or grid, and the channel form can be direct, single reflection, or double reflection, etc. For ultrasonic meters containing multiple channels, the processing method for each channel can be the same as that for a mono-channel ultrasonic meter. Below, the threshold adaptive method provided in the embodiment of the present application is described by taking an ultrasonic meter applied to a mono-channel as an example.
[0049] In this embodiment, the actual threshold of the transducer corresponding to the target point can be obtained based on any target point. The actual threshold includes an actual high threshold and an actual low threshold. For example, the actual high threshold = target point * 1.1, the actual low threshold = target point * 0.9 algorithm can be used to obtain the actual high and low thresholds. It can be understood that in actual applications, the algorithm for obtaining the actual pre-threshold value can be selected according to specific needs.
[0050] During the use of ultrasonic measuring instruments, changes in temperature, pressure, aging and pollution may affect the waveform of the ultrasonic wave. Although the preset threshold of the original configuration can find the target point, the target point may deviate. In other words, the actual threshold corresponding to the target point deviates from the preset threshold. In the long run, it may cause the target point to be found inaccurately. Therefore, based on any target point, the actual threshold of the corresponding transducer is obtained, so that the threshold of the corresponding transducer can be updated according to the actual threshold later, thereby ensuring the accuracy of the target point search.
[0051] In this embodiment, it is necessary to obtain the threshold drift trend of each of the two transducers. The processing method for obtaining the threshold drift trend of each transducer is the same. For the sake of convenience, the processing process of obtaining the threshold drift trend of one of the transducers is taken as an example for explanation, which is as follows: by comparing the actual high threshold of the transducer with the preset high threshold of the transducer, the drift trend of the actual high threshold relative to the preset high threshold can be obtained, and by comparing the actual low threshold of the transducer with the preset low threshold of the transducer, the drift trend of the actual low threshold relative to the preset low threshold can be obtained.
[0052] The threshold drift trends of the two transducers are judged as follows: if the high thresholds of the actual thresholds of the two transducers are both greater than or less than the high thresholds of the preset thresholds of their respective transducers, it can be judged that the high threshold drift trends of the transducers are the same, and the high thresholds of the transducers can be updated.
[0053] Alternatively, if the lower thresholds of the actual thresholds of the two transducers are both greater than or less than the lower thresholds of the preset thresholds of their respective transducers, it can be determined that the drift trends of the lower thresholds of the transducers are the same, and the lower thresholds of the transducers can be updated.
[0054] It should be noted that, when updating the high and low thresholds of the transducer, only the preset high threshold may be updated, only the preset low threshold may be updated, or both the preset high and low thresholds may be updated simultaneously.
[0055] The above settings can avoid the problem of waveform loss or error caused by fixed thresholds when the waveform characteristics of ultrasonic measuring instruments change, and realize dynamic adjustment of the threshold of the transducer so that the threshold can adapt to the current working state of the transducer to obtain more accurate target points, thereby improving the detection accuracy of ultrasonic measuring instruments.
[0056] For example, Figure 2 As shown, the present embodiment provides a waveform diagram before the waveform characteristics change, such as Figure 3 As shown, the present embodiment provides a waveform diagram after the waveform characteristics are changed, wherein the waveform sampling window starts at Tstart, ends at Tend, starts at Vmin at the bottom, and ends at Vmax at the top, THH_C and THL_C represent the preset high threshold and the preset low threshold before the update, and THH_R and THL_R represent the actual high threshold and the actual low threshold.
[0057] Depend on Figure 2 and Figure 3 By comparison, it can be seen that the actual threshold is relative to the preset threshold before the update, and the drift trend of the high and low thresholds of the transducer both drift upward. It is understandable that in actual applications, the drift trends of the high and low thresholds may also drift downward, or drift in different directions. It may be that the overall waveform characteristics drift, or it may be that part of the waveform characteristics drift. The threshold adaptive method provided by the present application can be used to dynamically adjust the preset threshold of the transducer, thereby improving the detection accuracy of the ultrasonic metering instrument.
[0058] As an optional implementation, in order to obtain a more stable sampling waveform to avoid the adverse effect of abnormal sampling waveform on the judgment of threshold drift trend, such as Figure 4 As shown, the threshold adaptive method of this embodiment may also include the following steps:
[0059] Step S201 , evaluating the stability of the sampling waveform of the transducer within a preset sampling period number, and in response to the sampling waveform within the preset sampling period number meeting a preset stability evaluation rule, determining that the sampling waveform within the preset sampling period number is stable.
[0060] Step S202, in response to the sampling waveforms of the two transducers being stable within the preset sampling cycle number, based on the sampling waveform of any transducer within the preset sampling cycle number, the actual threshold of the transducer in the corresponding preset sampling cycle is obtained, and the threshold drift trend of the corresponding transducer is obtained based on the actual threshold in each preset sampling cycle.
[0061] More specifically, the preset sampling cycle number can be set according to actual application requirements, and the waveform of the transducer within the preset sampling cycle number can be continuously sampled. It is understandable that the preset sampling cycle number is not the larger the better. Generally speaking, the shorter the preset sampling cycle number, the stronger the adaptability to waveform changes, and the longer the preset sampling cycle number, the lower the error rate of the stability evaluation result. Specifically, a balance value can be obtained through multiple experiments according to the actual working state of the transducer to improve the accuracy of the stability evaluation.
[0062] Optionally, the stability evaluation takes each actual high threshold value and actual low threshold value of any transducer within a preset number of sampling cycles as samples, and calculates the sample variance.
[0063] The preset stability evaluation rule includes: in response to the sample variances of the two transducers being less than or equal to the preset stability critical value, judging that the sampling waveforms of the transducers are stable within a preset number of sampling cycles.
[0064] By presetting the number of sampling cycles and evaluating the stability of the sampling waveform, the aim is to obtain stable waveforms multiple times to avoid excessive deviation in the actual threshold value obtained due to unstable signals or large waveform differences, thereby improving the accuracy of dynamic adjustment of the preset threshold.
[0065] Furthermore, in order to more accurately obtain the threshold drift trend of the transducer, such as Figure 5 As shown, the threshold adaptive method of this embodiment also includes the following steps:
[0066] Step S301, obtaining a comprehensive threshold, where the comprehensive threshold includes a comprehensive high threshold and a comprehensive low threshold.
[0067] Step S302: Compare the comprehensive threshold with the preset threshold to obtain the threshold drift trend of the transducer.
[0068] Optionally, the comprehensive high threshold value may be obtained by calculating the average of each actual high threshold value within a preset number of sampling cycles, and the comprehensive low threshold value may be obtained by calculating the average of each actual low threshold value within a preset number of sampling cycles.
[0069] It can be understood that based on the actual thresholds of the stable waveform within a preset number of sampling cycles, a comprehensive threshold is obtained, and the high and low threshold drift trends of the transducer are obtained by comparing the comprehensive threshold. In this way, the obtained high and low threshold drift trends of the transducer are more accurate.
[0070] Furthermore, if Figure 6 As shown, the threshold adaptive method of this embodiment also includes judging the accuracy of the comprehensive threshold, including the following steps:
[0071] Step S401 : obtaining a preset number of comprehensive high thresholds and comprehensive low thresholds for any transducer, where the preset number is greater than or equal to 1 and less than or equal to 10.
[0072] Step S402: Calculate the comprehensive high threshold variance and the comprehensive low threshold variance of the corresponding transducer according to a preset number of comprehensive high thresholds and comprehensive low thresholds.
[0073] Step S403, in response to the fact that the comprehensive high threshold variances of the two transducers are both less than or equal to the preset high-level stability critical value, it is determined that the preset number of comprehensive high thresholds are correct; in response to the fact that the comprehensive low threshold variances of the two transducers are both less than or equal to the preset low-level stability critical value, it is determined that the preset number of comprehensive low thresholds are correct.
[0074] Step S404: Based on the correct comprehensive threshold, the corresponding preset threshold of the transducer is updated.
[0075] It is understandable that the preset number can be set according to actual needs and is not limited here. The higher the setting accuracy of the high-order stability critical value and the low-order stability critical value, the higher the accuracy of obtaining the preset number of comprehensive thresholds. In the embodiment of the present application. Based on the comprehensive threshold for obtaining the "correct" evaluation, the preset threshold of the transducer is updated to ensure the accuracy of the threshold configured by the updated transducer.
[0076] As an optional implementation, the threshold adaptive method provided in the embodiment of the present application further includes:
[0077] Calculate the correct average of the preset number of comprehensive high thresholds, and update the preset high threshold of the transducer based on the average of the comprehensive high threshold; calculate the correct average of the preset number of comprehensive low thresholds, and update the preset low threshold of the transducer based on the average of the comprehensive low threshold.
[0078] The updated preset low threshold and the updated preset high threshold are obtained by the following formula:
[0079] THL'_C = THL_C + (THL1-THL_C)*0.9;
[0080] THH'_C = THH_C + (THH1-THH_C)*0.9;
[0081] Wherein, THL1 represents the mean value of the comprehensive low threshold, THH1 represents the mean value of the comprehensive high threshold, THL_C represents the preset low threshold before update, THH_C represents the preset high threshold before update, THL’_C represents the preset low threshold after update, and THH’_C represents the preset high threshold after update.
[0082] As an optional implementation manner, as Figure 7 shown, the threshold adaptive method of this embodiment further includes calculating the remaining working time of the transducer, specifically including the following steps:
[0083] Step S501, set the limit high threshold and limit low threshold of the transducer.
[0084] Step S502, obtain the time when the transducer first configures the preset threshold, and the preset high threshold and preset low threshold configured for the first time.
[0085] Step S503, obtain the time when the transducer most recently configures the preset threshold, and the preset high threshold and preset low threshold configured most recently.
[0086] Step S504, calculate the remaining working time of the transducer. The remaining working time of the transducer is obtained through the following formula:
[0087] T_L = (THL_L - THL’_C)*(T2 - T1) / (THL’_C - THL).
[0088] T_H = (THH_L - THH’_C)*(T2 - T1) / (THH’_C - THH).
[0089] When T_L < T_H, the remaining working time is T_L; when T_L >= T_H, the remaining working time of the transducer is T_H;
[0090] Wherein, T1 represents the time when the preset threshold is first configured, THL and THH respectively represent the preset low threshold and preset high threshold configured for the first time, T2 represents the internal system time of the ultrasonic metering instrument, THL’_C and THH’_C respectively represent the preset low threshold and preset high threshold configured most recently, and THL_L and THH_L respectively represent the limit low threshold and limit high threshold of the transducer.
[0091] By calculating the remaining working time of the transducer, a more accurate judgment of the current working state of the transducer can be obtained, so as to remind the maintenance personnel to check whether the transducer fails.
[0092] Furthermore, the threshold adaptive method of this embodiment may also include: in response to the remaining working time of any transducer being less than or equal to a preset time threshold, issuing a failure warning to the transducer. In this way, it is convenient for maintenance personnel to know whether the transducer has failed in a timely manner.
[0093] Exemplarily, the preset time threshold is 10 days. If the remaining working time of the transducer is ≤ 10 days, a failure warning is issued for the transducer so that maintenance personnel can replace and repair the failed transducer in time.
[0094] In order to more clearly illustrate the specific implementation process of the threshold adaptive method, the present application also provides a specific embodiment, defining two transducers of the same channel as UP and DN, respectively, defining the preset low threshold of the original configuration of the two transducers of the channel as THL_C and the preset high threshold as THH_C. Figure 8 As shown, the specific execution steps of this embodiment are as follows:
[0095] Step S601 , sampling the waveforms of two transducers according to a preset period, and obtaining the target point of the waveform according to a preset threshold.
[0096] Here, the waveform of the transducer with preset period timing sampling is taken as an example for explanation, but it is not limited to this in practical applications, and it can also be a triggered sampling or other forms of sampling waveform.
[0097] Specifically, the preset period of sampling the transducer waveform is defined as 10 seconds, the preset sampling period of the transducer is defined as 60 times, and the two transducers each obtain a waveform as one sampling. That is, the waveforms of the two transducers are sampled regularly every 10 seconds, and the sampling is 60 times. Each transducer obtains 60 waveforms, and the target point on each waveform is obtained according to the preset threshold of each transducer. The two transducers can obtain a total of 120 target points.
[0098] Step S602, determining whether the sampling waveforms of the two transducers within the preset sampling period are both stable, if the determination result is yes, executing step S603, if the determination result is no, executing step S601.
[0099] Specifically, according to any target point, the actual high and low thresholds of the transducer corresponding to the target point are obtained.
[0100] Define the actual lower threshold and actual upper threshold of the transducer UP as: THL_UP_RN to THH_UP_RN respectively;
[0101] The actual lower threshold and the actual upper threshold of the transducer DN are defined as: THL_DN_RN to THH_DN_RN, where N represents the number of waveform sequences, which is a positive integer from 1 to 60.
[0102] Stability evaluation of the sampled waveforms obtained by the two transducers:
[0103] Taking the actual low threshold THL_UP_RN and the actual high threshold THH_UP_RN of the UP transducer as samples, the sample variance V_UP is obtained.
[0104] Taking the actual low threshold THL_DN_RN and the actual high threshold THH_DN_RN of the DN transducer as samples, the sample variance V_DN is obtained.
[0105] The preset stability threshold is defined as VTH. If V_UP≤VTH and V_DN≤VTH, it can be determined that the sampling waveforms of the two transducers are stable and the subsequent threshold adaptive processing flow can be performed. Otherwise, return to step S601 to re-sample.
[0106] Step S603, in response to the sampling waveforms of the two transducers being stable within the preset sampling period, obtain a comprehensive threshold and record it as a successful record, repeat steps S601 to S603 until 5 successful records are made, and obtain a preset number (5 in the embodiment of the present application) of comprehensive high thresholds and comprehensive low thresholds.
[0107] Among them, the comprehensive threshold includes a comprehensive high threshold and a comprehensive low threshold. For the transducer UP, the average of the actual high threshold THH_UP_RN of the 60 sampling waveforms is calculated to obtain the comprehensive high threshold of the transducer UP, which is recorded as THH_UP_An; by calculating the average of the actual low threshold THL_UP_RN of the 60 sampling waveforms of the transducer UP, the comprehensive low threshold of the transducer UP is obtained, which is recorded as THL_UP_An.
[0108] Similarly, by calculating the average of the actual high threshold THH_DN_RN of the 60 sampling waveforms of the transducer DN, the comprehensive high threshold of the transducer DN is obtained, which is recorded as THH_DN_An; by calculating the average of the actual low threshold THL_DN_RN of the 60 sampling waveforms of the transducer DN, the comprehensive low threshold of the transducer DN is obtained, which is recorded as THL_DN_An. n represents the sequence of successful recording.
[0109] Step S604: Compare the comprehensive threshold with the currently configured preset threshold to obtain the threshold drift trend of the transducer.
[0110] Specifically, by comparing THH_UP_An and THH_C, the high threshold drift trend of transducer UP can be obtained. By comparing THL_UP_An and THL_C, the low threshold drift trend of transducer UP can be obtained. By comparing THH_DN_An and THH_C, the high threshold drift trend of transducer DN can be obtained. By comparing THL_DN_An and THL_C, the low threshold drift trend of transducer DN can be obtained.
[0111] It should be noted that when the transducer preset threshold has not been updated, the threshold drift trend is determined by comparing the comprehensive threshold with the preset threshold of the original configuration. When the transducer preset threshold has been updated, the threshold drift trend is determined by comparing the comprehensive threshold with the preset threshold of the current configuration.
[0112] Step S605, determining whether the high threshold drift trends of the two transducers are the same, if the determination result is yes, executing step S606, if the determination result is no, executing step S601;
[0113] It is determined whether the low threshold drift trends of the two transducers are the same. If the determination result is yes, step S607 is executed; if the determination result is no, step S601 is executed.
[0114] In the embodiment of the present application, five comparisons are performed to ensure that the obtained high threshold drift trend and low threshold drift trend are accurate.
[0115] Specifically, according to the sequence of successful recordings, the high threshold drift trends of the two transducers in each successful recording are compared to see if they are the same. If the high threshold drift trends of the UP and DN transducers are the same in each of the five recordings, it can be considered that the high threshold drift trends of the two transducers are the same.
[0116] Similarly, the low threshold drift trends of the two transducers in each successful recording are compared to see if they are the same. If the low threshold drift trends of the UP and DN transducers are the same in each of the five recordings, it can be considered that the low threshold drift trends of the two transducers are the same.
[0117] Step S606, determining whether the preset number (5) of comprehensive high thresholds obtained by the two transducers are correct, if the determination result is yes, executing step S608, if the determination result is no, executing step S601.
[0118] Specifically, in step S606, according to the five comprehensive high thresholds of the transducer UP, the comprehensive high threshold variance of the transducer UP is obtained, which is recorded as THH_UP_V. According to the five comprehensive high thresholds of the transducer DN, the comprehensive high threshold variance of the transducer DN is obtained, which is recorded as THH_DN_V.
[0119] If the comprehensive high threshold variances of the two transducers are less than or equal to the preset high-level stability critical value, the 5 comprehensive high thresholds of the two transducers UP and DN are determined to be correct. Specifically, the preset high-level stability critical value is defined as VTH_H. If THH_UP_V≤VTH_H and THH_DN_V≤VTH_H, it means that the comprehensive high thresholds of the two transducers are correct and can be used for subsequent preset high threshold updates. Otherwise, the 5 comprehensive high thresholds need to be re-acquired.
[0120] Step S607, determining whether the preset number (5) of comprehensive low thresholds obtained by the two transducers are correct, if the determination result is yes, executing step S609, if the determination result is no, executing step S601.
[0121] Specifically, in step S607, according to the five comprehensive low thresholds of the transducer UP, the comprehensive low threshold variance of the transducer UP is obtained, which is recorded as THL_UP_V. According to the five comprehensive low thresholds of the transducer DN, the comprehensive low threshold variance of the transducer DN is obtained, which is recorded as THL_DN_V.
[0122] If the comprehensive low threshold variances of the two transducers are less than or equal to the preset low-level stability critical value, the 5 comprehensive low thresholds of the two transducers UP and DN are determined to be correct. Specifically, the preset low-level stability critical value is defined as VTL_H. If THL_UP_V≤VTL_H and THL_DN_V≤VTL_H, it means that the comprehensive low thresholds of the two transducers are correct and can be used for subsequent preset low threshold updates. Otherwise, the 5 comprehensive low thresholds need to be re-acquired.
[0123] Step S608: in response to the comprehensive high threshold being correct, the preset high thresholds of the two transducers are updated.
[0124] Specifically, in step S608, the average of the integrated high thresholds of the two transducers is calculated, and the preset high thresholds of the two transducers are updated based on the average of the integrated high thresholds.
[0125] That is, the average of THH_UP_An and THH_DN_An (n=1…5) is calculated, recorded as THH1, and the preset high thresholds of the two transducers are updated based on the average THH1 of the comprehensive high threshold. The updated threshold is obtained by the following formula:
[0126] THH'_C = THH_C + (THH1-THH_C)*0.9;
[0127] Wherein, THH1 represents the average value of the comprehensive high threshold, THH_C represents the preset high threshold before updating, and THH'_C represents the preset high threshold after updating.
[0128] Step S609: in response to the comprehensive low threshold being correct, the preset low thresholds of the two transducers are updated.
[0129] Specifically, in step S609, the average of the integrated low thresholds of the two transducers is calculated, and the preset low thresholds of the two transducers are updated based on the average of the integrated low thresholds.
[0130] That is, calculate the mean values of THL_UP_An and THL_DN_An (n = 1…5), denoted as THL1, and update the preset low thresholds of the two transducers based on the mean value THL1 of the comprehensive low threshold. The updated threshold is obtained through the following formula:
[0131] THL’_C = THL_C + (THL1 - THL_C)*0.9;
[0132] THL1 represents the mean value of the comprehensive low threshold, THL_C represents the preset low threshold before update, and THL’_C represents the preset low threshold after update.
[0133] Step S610: Calculate the remaining working time of the transducer, and perform a failure warning on the transducer based on the remaining working time of the transducer.
[0134] Set the limit high threshold and limit low threshold of the transducer. The formula for calculating the remaining working time of the transducer is as follows:
[0135] T_L = (THL_L - THL’_C)*(T2 - T1) / (THL’_C - THL);
[0136] T_H = (THH_L - THH’_C)*(T2 - T1) / (THH’_C - THH);
[0137] When T_L < T_H, the remaining working time is T_L; when T_L >= T_H, the remaining working time of the transducer is T_H;
[0138] In the formula, T1 represents the time of first configuring the preset threshold, THL and THH respectively represent the low threshold and high threshold of the first-configured preset threshold, T2 represents the internal system time of the ultrasonic metering instrument, THL’_C and THH’_C respectively represent the low threshold and high threshold of the most recently configured preset threshold, and THL_L and THH_L respectively represent the limit low threshold and limit high threshold of the transducer.
[0139] If the remaining working time of the transducer is less than or equal to the preset time threshold, perform a failure warning on the transducer. Set the preset time threshold to 10 days. If the remaining working time of the transducer ≤ 10 days, then perform a failure warning on the transducer so that maintenance personnel can replace and repair the failed transducer.
[0140] An embodiment of the present application also provides an ultrasonic metering instrument 100, as Fig. 9 shown. The ultrasonic metering instrument 100 includes at least two transducers 11. The two transducers 11 can mutually transmit and receive ultrasonic signals, and the ultrasonic metering instrument 100 can use the threshold self-adaptive method of the above ultrasonic metering instrument.
[0141] In summary, the threshold adaptive method of ultrasonic metering instrument and ultrasonic metering instrument provided in the embodiment of the present application realize the dynamic adjustment of the preset threshold of the transducer, avoid the problem of target point deviation caused by the change of waveform characteristics, so that the acquired target point can adapt to the current working state of the transducer, thereby improving the detection accuracy of the ultrasonic metering instrument. Moreover, the threshold adaptive method of ultrasonic metering instrument provided in the present application can calculate the remaining working time of the transducer, and give a failure warning to the transducer, which is convenient for maintenance personnel to replace and repair the failed transducer, thereby improving the service life of the ultrasonic metering instrument.
[0142] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the claims attached to this application.
Claims
1. A threshold adaptive method for an ultrasonic meter, wherein the ultrasonic meter comprises at least two transducers, the two transducers are capable of mutually transmitting and receiving ultrasonic signals, any of the transducers is provided with a preset threshold for finding a target point, the preset threshold comprises a preset high threshold and a preset low threshold, and is characterized in that: The threshold adaptive method comprises the following steps: Acquire the waveforms of the two transducers, and acquire the target point corresponding to the waveform based on the preset threshold; Based on any of the target points, obtaining an actual threshold corresponding to the transducer, the actual threshold comprising an actual high threshold and an actual low threshold; Based on the actual threshold value and the preset threshold value of any transducer, acquiring a threshold drift trend corresponding to the transducer, wherein the threshold drift trend includes a high threshold drift trend and a low threshold drift trend; Analyzing whether the high threshold drift trend and the low threshold drift trend between the two transducers are the same, and in response to any of the threshold drift trends being the same, updating the thresholds with the same drift trend between the two transducers according to the actual thresholds of the transducers; The threshold adaptive method further comprises calculating the remaining working time of the transducer, comprising the following steps: Setting a high threshold and a low threshold of the transducer; Obtaining the time when the transducer is configured with the preset threshold for the first time, and the preset high threshold and the preset low threshold configured for the first time; Obtaining the time when the transducer was most recently configured with the preset threshold, and the most recently configured preset high threshold and preset low threshold; The remaining working time of the transducer is expressed by the following formula: T_L = (THL_L-THL'_C)*(T2-T1) / (THL'_C-THL); T_H = (THH_L-THH'_C)*(T2-T1) / (THH'_C-THH); When T_L < T_H, the remaining working time is T_L, and when T_L>= T_H, the remaining working time of the transducer is T_H; Wherein, T1 represents the time when the preset threshold is configured for the first time, THL and THH represent the preset low threshold and preset high threshold configured for the first time, respectively, T2 represents the system time in the meter of the ultrasonic meter, THL'_C and THH'_C represent the preset low threshold and preset high threshold configured most recently, respectively, and THL_L and THH_L represent the extreme low threshold and extreme high threshold of the transducer, respectively.
2. The threshold self-adaptation method of ultrasonic measuring instrument according to claim 1, characterized in that: The threshold adaptive method further comprises: Evaluating the stability of the sampling waveform of the transducer within a preset number of sampling cycles, and in response to the sampling waveform within the preset number of sampling cycles meeting a preset stability evaluation rule, determining that the sampling waveform within the preset number of sampling cycles is stable; In response to the sampling waveforms of the two transducers within the preset number of sampling cycles being stable, the actual threshold of the transducer in the corresponding preset sampling cycle is obtained based on the sampling waveform of any one of the transducers within the preset number of sampling cycles, and the threshold drift trend of the corresponding transducer is obtained based on the actual threshold in each preset sampling cycle.
3. The threshold self-adaptation method of ultrasonic measuring instrument according to claim 2, characterized in that: The evaluation of the stability of the sampling waveform of the transducer within a preset number of sampling cycles includes: Taking each actual high threshold and actual low threshold of any of the transducers within the preset number of sampling cycles as samples, calculating the sample variance; The preset stability evaluation rules include: In response to the sample variances of the two transducers being less than or equal to a preset stability critical value, it is determined that the sampling waveforms of the transducers within a preset number of sampling cycles are stable.
4. The threshold self-adaptation method of ultrasonic measuring instrument according to claim 3, characterized in that: The threshold adaptive method further comprises: Obtaining a comprehensive threshold, wherein the comprehensive threshold includes a comprehensive high threshold and a comprehensive low threshold; The comprehensive high threshold is obtained by calculating the average of each actual high threshold within the preset number of sampling cycles; The comprehensive low threshold is obtained by calculating the average of each actual low threshold within the preset number of sampling cycles; The comprehensive threshold is compared with the preset threshold to obtain the threshold drift trend of the transducer.
5. The threshold self-adaptation method of ultrasonic measuring instrument according to claim 4, characterized in that: The threshold adaptive method further includes determining the accuracy of the comprehensive threshold, including the following steps: Obtaining a preset number of the integrated high threshold and the integrated low threshold for any transducer, where the preset number is greater than or equal to 1 and less than or equal to 10; According to a preset number of the comprehensive high thresholds and the comprehensive low thresholds, calculating the comprehensive high threshold variance and the comprehensive low threshold variance corresponding to the transducer; In response to the fact that the comprehensive high threshold variances of the two transducers are both less than or equal to a preset high-level stability critical value, determining that the preset number of the comprehensive high thresholds are correct; In response to the fact that the comprehensive low threshold variances of the two transducers are both less than or equal to a preset low-level stability critical value, determining that the preset number of the comprehensive low thresholds are correct; Based on the correct comprehensive threshold, the corresponding preset threshold of the transducer is updated.
6. The threshold self-adaptation method of ultrasonic measuring instrument according to claim 5, characterized in that: The threshold adaptive method further comprises: Calculating the correct average of the preset number of the comprehensive high thresholds, and updating the preset high threshold of the transducer based on the average of the comprehensive high threshold; The correct average of the preset number of integrated low thresholds is calculated, and the preset low threshold of the transducer is updated based on the average of the integrated low threshold.
7. The threshold self-adaptation method of ultrasonic measuring instrument according to claim 5, characterized in that: The updated preset low threshold and the updated preset high threshold are obtained by the following formula: THL'_C = THL_C + (THL1-THL_C)*0.9; THH'_C = THH_C + (THH1-THH_C)*0.9; In the formula, THL1 represents the mean of the comprehensive low threshold, THH1 represents the mean of the comprehensive high threshold, THL_C represents the preset low threshold before updating, THH_C represents the preset high threshold before updating, THL'_C represents the preset low threshold after updating, and THH'_C represents the preset high threshold after updating.
8. The threshold self-adaptation method of ultrasonic measuring instrument according to claim 1, characterized in that: The threshold adaptive method further comprises: In response to the remaining working time of any of the transducers being less than or equal to a preset time threshold, a failure warning is issued for the transducer.
9. An ultrasonic meter, comprising at least two transducers, wherein the two transducers can mutually transmit and receive ultrasonic signals, wherein: The ultrasonic meter uses the threshold adaptive method of the ultrasonic meter according to any one of claims 1 to 8.
Citation Information
Patent Citations
Ultrasonic clutter elimination method and system and flowmeter
CN117740090A
Ultrasonic water meter echo characteristic peak searching method, device, equipment and medium
CN118089869A
Flow metering method, feature library establishment method and flow metering device
CN118149914A
A fluidic flowmeter
GB9323178D0
Method for determining the characteristic time reference wave of the acoustic signal of an ultrasonic flow meter
JP7175365B1
