Flow velocity compensation method and device, electronic equipment and medium

By predicting the flow rate and average flow rate ratio of the faulty channel in the ultrasonic flowmeter to compensate, the problem of inaccurate average flow rate during the duct failure is solved, and higher flow metering accuracy and system stability are achieved.

CN119394383AInactive Publication Date: 2025-02-07HANGZHOU GUKA INTELLIGENT SYST

Patent Information

Application Number
CN202411983644.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-02-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the sound channel failure of the existing ultrasonic flowmeters lack effective flow rate compensation methods, resulting in inaccurate average flow rate calculated.

Method used

By calculating the flow velocity of each channel, identifying the faulty channel, and using the historical ratio of the flow velocity of the faulty channel to the average flow velocity predicts its current ratio as compensation data, the compensated average flow velocity is calculated based on the flow velocity of the normal channel.

Benefits of technology

It realizes effective compensation for the faulty channel, improves the accuracy of flow metering, reduces system cost and complexity, and extends the service life of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119394383A_ABST
    Figure CN119394383A_ABST
Patent Text Reader

Abstract

The invention provides a flow velocity compensation method and device, electronic equipment and a medium. The method comprises the following steps: calculating the flow velocity of each current sound channel, taking the sound channel with a flow velocity result as a normal sound channel, and taking the sound channel without the flow velocity result as a fault sound channel; acquiring compensation data corresponding to the fault sound channel; wherein the compensation data of the sound channel comprises a predicted ratio of the current flow rate of the sound channel to the average flow rate, and the compensation data of the sound channel is obtained based on a historical ratio of the flow rate of the sound channel to the average flow rate; and calculating the average flow velocity of the compensated current fluid according to the flow velocity of the normal sound channel and the compensation data of the fault sound channel. According to the method provided by the invention, the fault sound channel can be accurately compensated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to flow measurement technology, and in particular to a flow rate compensation method, device, electronic equipment and medium. Background Art

[0002] Ultrasonic flowmeters have the advantages of non-contact measurement, high accuracy, good stability, and high reliability, and are widely used in the measurement of various fluids. Ultrasonic flowmeters include multiple channels, and the average flow velocity of the fluid is calculated based on the flow velocity of each channel, thereby converting the flow rate. When one or some channels fail, the ultrasonic flowmeter will be unable to obtain measurement results.

[0003] In the prior art, when a channel failure occurs, the data of other normal channels are often used to replace the data of the faulty channel to ensure the normal operation of the ultrasonic flow meter. However, the above solution does not consider the impact of the faulty channel on the entire system, resulting in poor compensation effect and inaccurate average flow rate calculated. Summary of the invention

[0004] The present application provides a flow rate compensation method, device, electronic device and medium for accurately compensating a faulty sound channel.

[0005] In one aspect, the present application provides a flow rate compensation method, which is applied to an ultrasonic flow meter, wherein the ultrasonic flow meter includes multiple sound channels; the method includes:

[0006] Calculate the current flow velocity of each channel, take the channel with flow velocity result as the normal channel, and take the channel without flow velocity result as the fault channel;

[0007] Acquire compensation data corresponding to the faulty sound channel; wherein the compensation data of the sound channel includes a predicted ratio of the current flow velocity of the sound channel to the average flow velocity, the compensation data of the sound channel is obtained based on a historical ratio of the flow velocity of the sound channel to the average flow velocity, and the average flow velocity is an average value of the flow velocities of each sound channel;

[0008] The compensated average flow rate of the current fluid is calculated based on the flow rate of the normal sound channel and the compensation data of the fault sound channel.

[0009] Optionally, the method further includes:

[0010] If each channel has a flow rate result, then the current average flow rate of each channel is calculated according to the current flow rate of each channel as the average flow rate of the current fluid;

[0011] And, according to the current flow velocity of each channel and the current average flow velocity of each channel, a ratio of the current flow velocity of each channel to the current average flow velocity of each channel is calculated;

[0012] The compensation data of the channels are updated according to the current average flow rate of each channel and the ratio of the current flow rate of each channel to the current average flow rate of each channel.

[0013] Optionally, the obtaining compensation data corresponding to the faulty sound channel includes:

[0014] According to the latest average flow velocity of the ultrasonic flowmeter, a first compensation data group corresponding to the flow velocity interval in which the latest average flow velocity is located is determined from multiple compensation data groups corresponding to the fault channel, and the compensation data corresponding to the fault channel is obtained from the first compensation data group; wherein the compensation data group corresponding to the flow velocity interval includes the compensation data of the fault channel in the flow velocity interval.

[0015] Optionally, the compensation array includes multiple compensation data groups corresponding to multiple flow intervals, each of the compensation data groups includes compensation data of each channel in the corresponding flow rate interval; or, the compensation array includes compensation data groups corresponding to multiple channels, each channel corresponds to at least two compensation data groups, and the at least two compensation data groups correspond to at least two flow rate intervals respectively.

[0016] Optionally, the method further includes:

[0017] The current average flow rate and the ratio of the current flow rate of each channel to the current average flow rate are taken as a historical data group, and updated into a historical array, wherein the historical array includes a plurality of historical data groups;

[0018] The compensation data set is updated according to the history array.

[0019] Optionally, updating the compensation array according to the historical array includes:

[0020] If the history array is full, selecting a second history data group in the middle of the time order in the history array, and determining a second compensation data group corresponding to the flow rate interval where the second average flow rate in the second history data group is located;

[0021] The compensation data of the channels in the second compensation data group are updated according to the historical ratios of the channels in the second historical data group.

[0022] Optionally, updating the compensation data of the channels in the second compensation data group according to the historical ratio of each channel in the second historical data group includes:

[0023]

[0024] Among them, a is the filter coefficient, The updated compensation data for the channel; is the historical ratio of the channel in the second historical data group, This is the compensation data of the channel before updating.

[0025] Optionally, after taking the channel without flow velocity result as the fault channel, the method further includes:

[0026] Clears the history array.

[0027] Optionally, taking the current average flow rate and the ratio of the current flow rate of each channel to the current average flow rate as a historical data group and updating the historical array includes:

[0028] If the history array is not full, then adding the history data set to the history array;

[0029] If the history array is full, the history data set is used to replace the oldest history data set in the history array.

[0030] Optionally, the calculating, according to the flow velocity of the normal sound channel and the compensation data of the fault sound channel, an average flow velocity of the current fluid after compensation includes:

[0031]

[0032] in: is the average flow rate of the current fluid after compensation, is the flow velocity of normal channel i, is the weight of normal channel i, is the compensation data of fault channel j, is the weight of fault channel j.

[0033] Optionally, the calculating an average flow rate according to the flow rates of the current channels includes:

[0034] The flow rates of the current channels are weighted and summed to obtain the average flow rate.

[0035] Optionally, the calculating an average flow rate according to the flow rates of the current channels includes:

[0036] The flow rates of the current channels are weighted and summed to obtain the average flow rate.

[0037] On the other hand, the present application provides a flow rate compensation device, which is applied to an ultrasonic flow meter, wherein the ultrasonic flow meter includes a plurality of sound channels; the device includes:

[0038] A calculation module, used to calculate the current flow velocity of each channel, and regard the channel with flow velocity results as a normal channel, and regard the channel without flow velocity results as a fault channel;

[0039] An acquisition module, configured to acquire compensation data corresponding to the faulty sound channel; wherein the compensation data of the sound channel includes a predicted ratio of the current flow velocity of the sound channel to the average flow velocity, the compensation data of the sound channel is obtained based on a historical ratio of the flow velocity of the sound channel to the average flow velocity, and the average flow velocity is an average value of the flow velocities of each sound channel;

[0040] The compensation module is used to calculate the compensated average flow rate of the current fluid according to the flow rate of the normal sound channel and the compensation data of the fault sound channel.

[0041] On the other hand, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described above.

[0042] On the other hand, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described above.

[0043] On the other hand, the present application provides a computer program product, comprising a computer program, wherein the computer program is used to implement the above-mentioned method when executed by a processor.

[0044] In the flow rate compensation method, device, electronic device and medium provided by the present application, the ratio of the current flow rate of the fault channel to the average flow rate is predicted based on the historical ratio of the flow rate of the fault channel to the average flow rate, and the fault channel is compensated by the ratio of the current flow rate of the fault channel to the average flow rate, effectively taking into account the current impact of the fault channel on the entire system, so that according to the flow rate of the normal channel and the compensation data of the fault channel, the average flow rate of the current compensated fluid can be accurately calculated, and effective compensation of the fault channel and accurate measurement of the flow rate are achieved without adding additional sensors or equipment, which effectively reduces the cost and complexity of the system, avoids frequent replacement and maintenance due to hardware redundant design, and improves the service life of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0046] Figure 1 The structure diagram of an ultrasonic flow meter in the related art is shown as an example;

[0047] Figure 2 A schematic diagram of a scenario of calculating the flow velocity of a sound channel in the related art is shown as an example;

[0048] Figure 3 A schematic diagram of a flow rate compensation method provided by an embodiment of the present application is exemplarily shown in FIG.

[0049] Figure 4 exemplarily shows a schematic diagram of the structure of the compensation data group provided in an embodiment of the present application;

[0050] Figure 5 exemplarily shows a schematic diagram of the structure of the history array provided in an embodiment of the present application;

[0051] Figure 6 The structural schematic diagram of the flow rate compensation electronic device provided in an embodiment of the present application is exemplarily shown in FIG.

[0052] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0054] The module in this application refers to a functional module or a logical module. It can be in software form, and its functions are realized by executing program code by a processor; it can also be in hardware form. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects before and after are in an "or" relationship.

[0055] An ultrasonic flow meter is an instrument that uses the propagation characteristics of ultrasonic signals in a flowing medium to measure flow. Its working principle is to transmit and receive ultrasonic signals, calculate the velocity of the fluid based on the change in the propagation time of the ultrasonic signals in the fluid, and then obtain the flow rate.

[0056] Combine the following Figure 1 and Figure 2 , and specifically explains how to calculate the measurement results of the ultrasonic flow meter.

[0057] Figure 1FIG. 1 is a schematic diagram of the structure of an ultrasonic flow meter in the related art. Figure 1 As shown, taking 4 channels as an example, the meter body 10 of the ultrasonic flowmeter is equipped with 8 transducers 40, 41, 42, 43, 44, 45, 46, and 47, wherein transducers 40 and 41 form channel 20, transducers 42 and 43 form channel 21, transducers 44 and 45 form channel 22, and transducers 46 and 47 form channel 23. The two transducers in each channel can send ultrasonic waves to each other, and the line connecting the two transducers forms an angle with the meter body 10. The flow velocity of each channel can be calculated according to the change in the propagation time of the ultrasonic signal in the fluid. According to the flow velocity of each channel, the average flow velocity of the fluid is calculated; the flow rate can be obtained by multiplying the average flow velocity by the cross-sectional area of ​​the pipeline.

[0058] Figure 2 FIG. 1 is a schematic diagram of a scenario for calculating the velocity of a sound channel in the related art. Figure 2 As shown, when the fluid 11 flows through a pair of ultrasonic transducers 40 and 41 in the direction 14, the flow velocity of the acoustic channel 20 is calculated as follows:

[0059]

[0060] in: is the flow velocity of the sound channel 20, L is the length of the sound channel 20, is the angle between the sound channel 20 and the axial direction of the meter body 10, is the time for the ultrasonic wave to propagate from the transducer 41 to the transducer 40 (also called the countercurrent propagation time), It is the time for the ultrasonic wave to propagate from the transducer 40 to the transducer 41 (also called the downstream propagation time).

[0061] If the diameter of the ultrasonic flowmeter pipe is D, then the average flow velocity and the cross-sectional area of ​​the ultrasonic flowmeter pipe πD 2 / 4 to get the flow rate of the fluid.

[0062] However, one or some of the sound channels of the ultrasonic flowmeter may fail, and the flow velocity of the failed sound channel cannot be calculated, resulting in the ultrasonic flowmeter being unable to obtain measurement results.

[0063] In some technologies, when a channel fails, other normal channels are often used to simply replace the failed channel to ensure the normal operation of the system, but the impact of the failed channel on the entire system is not taken into account, resulting in inaccurate data after compensation.

[0064] Based on the above technical problems, the embodiments of the present application provide a flow rate compensation method, device, electronic device and medium, which use the ratio of the predicted channel flow rate to the average flow rate as the compensation data of the faulty channel, so that the average flow rate can be calculated using the flow rates of other normal channels according to the impact of the faulty channel on the average flow rate, thereby accurately compensating for the faulty channel and effectively improving the accuracy of flow measurement.

[0065] The technical solution of the present application is illustrated below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0066] Figure 3 The flow diagram of the flow rate compensation method provided in one embodiment of the present application is shown in FIG. The execution subject of the method may be a flow meter or a flow compensation device. Figure 3 As shown, the flow rate compensation method provided in this embodiment may include:

[0067] S301, calculating the current flow velocity of each channel, taking the channel with the flow velocity result as the normal channel, and taking the channel without the flow velocity result as the fault channel;

[0068] S302, obtaining compensation data corresponding to the faulty sound channel; wherein the compensation data of the sound channel includes a predicted ratio of the current flow velocity of the sound channel to the average flow velocity, and the compensation data of the sound channel is obtained based on a historical ratio of the flow velocity of the sound channel to the average flow velocity, and the average flow velocity is an average value of the flow velocities of each sound channel;

[0069] S303, calculating the compensated average flow rate of the current fluid according to the flow rate of the normal sound channel and the compensation data of the fault sound channel.

[0070] In practical applications, the execution subject of the method embodiment of the present application may be an ultrasonic flow meter.

[0071] Specifically, the current flow rate of each channel is calculated regularly. If there is a channel without a flow rate result, it can be determined that a channel failure has occurred, and the channel with a flow rate result is regarded as a normal channel, and the channel without a flow rate result is regarded as a faulty channel. Since there is no flow rate result for the faulty channel, the average flow rate of the fluid cannot be directly calculated based on the flow rate of each channel. Therefore, the current normalized flow rate of the faulty channel can be predicted, where the normalized flow rate of the channel is the ratio of the flow rate of the channel to the average flow rate of each channel. Using the current normalized flow rate of the faulty channel as compensation data to compensate the faulty channel can effectively predict the current impact of the faulty channel on the entire system, so that the average flow rate of the current fluid after compensation can be accurately calculated based on the flow rate of the normal channel and the compensation data of the faulty channel. Among them, the current normalized flow rate of the faulty channel can be predicted based on the historical ratio of the flow rate of the faulty channel to the average flow rate.

[0072] In this example, the ratio of the current flow velocity of the fault channel to the average flow velocity is predicted based on the historical ratio of the flow velocity of the fault channel to the average flow velocity, and the fault channel is compensated by the ratio of the current flow velocity of the fault channel to the average flow velocity, effectively taking into account the current impact of the fault channel on the entire system. Therefore, based on the flow velocity of the normal channel and the compensation data of the fault channel, the average flow velocity of the current compensated fluid can be accurately calculated, achieving effective compensation of the fault channel and accurate measurement of the flow rate without adding additional sensors or equipment, effectively reducing the cost and complexity of the system, avoiding frequent replacement and maintenance due to hardware redundant design, and increasing the service life of the equipment.

[0073] In one example, the method further includes:

[0074] If each channel has a flow rate result, then the average flow rate of each channel is calculated according to the current flow rate of each channel as the average flow rate of the current fluid;

[0075] And, according to the current flow velocity of each channel and the current average flow velocity of each channel, a ratio of the current flow velocity of each channel to the current average flow velocity of each channel is calculated;

[0076] The compensation data of the channels are updated according to the current average flow velocity of each channel and the ratio of the current flow velocity of each channel to the current average flow velocity of each channel.

[0077] Specifically, if each channel has a flow rate result, it means that each channel is normal, and the average flow rate can be directly calculated based on the current flow rate of each channel as the average flow rate of the current fluid. Furthermore, the compensation data of the channel can be updated based on the current average flow rate of each channel and the ratio of the current flow rate of each channel to the current average flow rate of each channel, effectively improving the reliability of the compensation data.

[0078] In one example, obtaining compensation data corresponding to a faulty sound channel includes:

[0079] Acquire a compensation array, wherein the compensation array includes a plurality of compensation data groups;

[0080] According to the latest average flow velocity of the ultrasonic flowmeter, a first compensation data group corresponding to the flow velocity interval in which the latest average flow velocity is located is determined from at least the compensation data group corresponding to the fault channel, and the compensation data corresponding to the fault channel is obtained from the first compensation data group; wherein the compensation data group corresponding to the flow velocity interval includes the compensation data of the fault channel in the flow velocity interval.

[0081] Specifically, the compensation array can be in various forms. For example, the compensation array includes multiple compensation data groups corresponding to multiple flow intervals, and each compensation data group includes compensation data of each channel in the corresponding flow velocity interval; or, the compensation array includes compensation data groups corresponding to multiple channels, and each channel corresponds to at least two compensation data groups, and the at least two compensation data groups correspond to at least two flow velocity intervals. Since the flow state of the fluid will show large differences due to the change of flow velocity (especially at low flow rates), the normalized flow velocity relationship between the channels will also change with the change of flow state. Therefore, according to different flow velocity intervals, the compensation data groups are set respectively, which can more accurately consider the impact of flow field changes on the channel flow velocity.

[0082] Figure 4 A schematic diagram of the structure of the compensation data set provided in the embodiment of the present application is shown in FIG. Figure 4 As shown, it is assumed that the ultrasonic flow meter includes Figure 1 The four channels 20, 21, 22, and 23 shown in the figure are used, and five compensation data groups are set as segmented compensation data. Different compensation data groups correspond to different flow rate intervals of the average flow rate, which are respectively , , , , The compensation data group corresponding to each flow rate interval includes the compensation data of each channel in the flow rate interval , , , . When a sound channel failure occurs, first determine the flow rate interval of the latest average flow rate based on the latest average flow rate, so as to determine the first compensation data group corresponding to the latest average flow rate from the five compensation data groups; further, obtain compensation data of the faulty sound channel from the first compensation data group. The flow rate intervals can be divided according to the flow state changes of different flow rate segments, or according to the actual production needs, which are not limited here.

[0083] In this example, the flow velocity is divided based on the impact of flow velocity changes on the flow field, and different compensation data groups are set in different flow velocity intervals. When compensating for the faulty channel, the impact of the flow velocity on the normalized flow velocity relationship between channels can be effectively considered, thereby ensuring the accuracy of the entire flow section and enhancing the comprehensiveness and accuracy of the system.

[0084] In some examples, the compensation data can be segmented by flow rate to obtain compensation data groups corresponding to each flow rate interval. In other examples, the compensation data can also be segmented by Reynolds number to obtain compensation data groups corresponding to each Reynolds number interval, which can also achieve the effect of flow field adaptation.

[0085] In one example, the compensation data of the channel is updated according to the current average flow rate and the ratio of the current flow rate of each channel to the current average flow rate, including:

[0086] The current average flow rate and the ratio of the current flow rate of each channel to the current average flow rate are taken as a historical data group, and updated into a historical array, wherein the historical array includes a plurality of historical data groups;

[0087] Based on the history array, the compensation array is updated.

[0088] Specifically, based on the historical array, multiple sets of flow rate historical data can be used to update the compensation array, which can effectively improve the reliability of the compensation array.

[0089] In a possible implementation, the average flow rate is calculated according to the current flow rates of each channel, including:

[0090] The flow rates of the current channels are weighted and summed to obtain the average flow rate.

[0091] by Figure 1 Take the 4-channel ultrasonic flow meter shown as an example to calculate the average flow rate as follows:

[0092]

[0093] in: , , and are the weights of channels 20, 21, 22, and 23, respectively. , , and are the flow rates of channels 20, 21, 22 and 23 respectively.

[0094] Furthermore, the normalized flow velocity of each channel is calculated as follows:

[0095]

[0096]

[0097]

[0098]

[0099] in: , , and are the normalized flow velocities of channels 20, 21, 22, and 23, respectively.

[0100] The current average flow velocity and the normalized flow velocity of each channel are taken as a historical data group and updated into a historical array (also called a normalized flow velocity cache array).

[0101] Figure 5 This is a schematic diagram of the structure of the history array provided in the embodiment of the present application. Figure 5 As shown, the history array includes multiple history data groups. Here, 256 history data groups are taken as an example. Each history data group includes the historical average speed and the normalized flow rate of each channel. , , and Based on the history array, the compensation array can be updated.

[0102] In this example, when the channel is normal, the current average flow rate and the ratio of the flow rate of each channel to the average flow rate are saved in the history array, so that the compensation array can be continuously updated according to the history array, which can effectively improve the accuracy of fault channel compensation.

[0103] In some examples, multiple groups of segment compensation data are updated based on the history array, including:

[0104] If the historical array is full, then selecting the second historical data group in the middle of the time order in the historical array, and determining the second compensation data group corresponding to the flow rate interval where the second average flow rate in the second historical data group is located;

[0105] The compensation data of the channels in the second compensation data group are updated according to the historical ratios of the channels in the second historical data group.

[0106] Specifically, assuming that the historical array includes at most N historical data groups, if the historical array already has N historical data groups, then the historical data group with the middle time order is selected among the N historical data groups as the second historical data group, and the second historical data group is used to update the compensation array. This can ensure that the ultrasonic flowmeter has been working stably for a period of time before and after the second historical data group, thereby improving the reliability of the second historical data group.

[0107] Exemplarily, when N is an odd number, the (N-1) / 2th or (N+1) / 2th historical data group can be selected as the second historical data group; when N is an even number, the N / 2th historical data group can be selected as the second historical data group.

[0108] According to the second average flow velocity in the second historical data group, the second compensation data group corresponding to the flow velocity interval in which the second average flow velocity is located is determined as the compensation data group to be updated, and according to the historical ratio of the flow velocity of each channel in the second historical data group to the average velocity, the compensation data of the channel in the second compensation data group is updated.

[0109] Exemplarily, when the compensation data group includes compensation data for each channel, updating the compensation data for the channels in the second compensation data group according to the second ratio of the flow velocity to the average velocity of each channel in the second historical data group may include updating the compensation data for each channel in the second compensation data group according to the second ratio of the flow velocity to the average velocity of each channel in the second historical data group. When the compensation data group includes compensation data for only one channel, there are multiple second compensation data groups, and updating the compensation data for the channels in the second compensation data group according to the second ratio of the flow velocity to the average velocity of each channel in the second historical data group may include updating the compensation data for the channels in each second compensation data group according to the second ratio of the flow velocity to the average velocity of each channel in the second historical data group.

[0110] In this example, when the historical array is full, the second historical data group with the middle time order in the historical array is selected as a reference to update the compensation data group. This can ensure that the flow meter has been working stably for a period of time before and after the second historical data group, and use the second historical data group to accurately update the second compensation data group at a similar average flow rate, which can effectively improve the reliability and accuracy of the compensation data group update.

[0111] Accordingly, in some examples, after the channel without flow rate result is used as the fault channel, the method further includes:

[0112] Clear the history array.

[0113] Specifically, if there is a channel fault, each historical data group in the historical array is cleared to ensure that the multiple historical data groups stored in the historical array are multiple continuous and valid historical data groups, which can effectively improve the accuracy of the historical array.

[0114] In some examples, the compensation data of each channel in the second compensation data group is updated according to the second ratio corresponding to each channel in the second historical data group, including:

[0115] For each channel, the sum of the product of the filter coefficient and the second ratio corresponding to the channel and the product of the compensation data of the channel and one minus the filter coefficient is calculated to obtain updated compensation data of the channel.

[0116] Specifically, the formula for updating the compensation data of each channel is as follows:

[0117]

[0118] Where a is the digital filter coefficient, The updated compensation data for a certain channel; is the historical ratio of the flow velocity to the average velocity of the channel (normalized flow velocity), This is the compensation data of the channel before updating.

[0119] In this example, the compensation data is updated using a first-order digital filtering method, which plays a smoothing role and can filter out some sudden changes and fluctuations in the flow rate signal, making the updated compensation data more stable and reliable.

[0120] In some examples, the current average flow rate and the ratio of the current flow rate of each channel to the current average flow rate are taken as a historical data group and updated to the historical array, specifically including:

[0121] If the history array is not full, add the history data group to the history array;

[0122] If the history array is full, the history data group is used to replace the oldest history data group in the history array.

[0123] Specifically, when the latest historical data group is updated to the historical array, if the historical array is not full, the historical data group is directly added to the historical array; if the historical array is full, the historical data group is used to replace the oldest historical data group in the historical array to ensure the validity of each historical data group in the historical array.

[0124] In some examples, the average flow rate of the current fluid after compensation is calculated based on the flow rate of the normal sound channel and the compensation data of the fault sound channel, including:

[0125] Get the weight of each channel;

[0126] According to the weight of each channel, the ratio of the weighted sum of the flow rates of each normal channel to one minus the weighted sum of the compensation data of each fault channel is calculated as the average flow rate of the current fluid after compensation.

[0127] Specifically, the compensation formula for the average speed is derived as follows:

[0128] When all channels are normal, the average flow rate can be calculated based on the current flow rate of each channel as the average flow rate of the current fluid. The calculation formula is as follows:

[0129]

[0130] in, is the average flow velocity, n is the total number of channels, is the flow velocity of the ith channel, is the weight of the ith channel.

[0131] Accordingly, when there is a channel fault, the channels can be divided into two groups A and B. Group A includes normal channels and group B includes faulty channels. The average speed The formula is:

[0132]

[0133] However, due to the failure of the sound channel of group B, the flow velocity Vj cannot be obtained. Combined with the normalized flow velocity Divide both sides of the equation by ,get:

[0134]

[0135]

[0136]

[0137] Multiply both sides of the equation by ,get:

[0138]

[0139] The average speed formula of the fault channel is as follows:

[0140]

[0141] When a sound channel failure occurs, the corresponding segment compensation data is selected as the normalized flow rate according to the latest average velocity to obtain the compensated average velocity at the current flow rate. for:

[0142]

[0143] in: is the compensated average flow rate, is the flow velocity of normal channel i, is the compensation data of fault channel j (normalized flow velocity after filtering algorithm).

[0144] In this example, by calculating the ratio of the weighted sum of the flow rates of each normal channel and the weighted sum of the compensation data of each faulty channel minus one, the average flow rate of the current fluid after compensation can be accurately calculated, and the compensation of the faulty channel can be effectively realized.

[0145] The embodiment of the present application further provides a flow compensation device, which is applied to an ultrasonic flow meter, wherein the ultrasonic flow meter includes multiple sound channels; the device includes:

[0146] A calculation module, used to calculate the current flow velocity of each channel, and regard the channel with flow velocity results as a normal channel, and regard the channel without flow velocity results as a fault channel;

[0147] An acquisition module, configured to acquire compensation data corresponding to the faulty sound channel; wherein the compensation data of the sound channel includes a predicted ratio of the current flow velocity of the sound channel to the average flow velocity, the compensation data of the sound channel is obtained based on a historical ratio of the flow velocity of the sound channel to the average flow velocity, and the average flow velocity is an average value of the flow velocities of each sound channel;

[0148] The compensation module is used to calculate the compensated average flow rate of the current fluid according to the flow rate of the normal sound channel and the compensation data of the fault sound channel.

[0149] Optionally, the device further comprises:

[0150] A metering module, for calculating the current average flow rate of each channel according to the current flow rate of each channel if each channel has a flow rate result, as the average flow rate of the current fluid;

[0151] An updating module, configured to calculate a ratio of a current flow velocity of each channel to the current average flow velocity of each channel according to the current flow velocity of each channel and the current average flow velocity of each channel;

[0152] The compensation data of the channels are updated according to the current average flow rate of each channel and the ratio of the current flow rate of each channel to the current average flow rate of each channel.

[0153] Optionally, the acquisition module is specifically used to:

[0154] Acquire a compensation array, wherein the compensation array includes a plurality of compensation data groups;

[0155] According to the latest average flow velocity of the ultrasonic flowmeter, determine the first compensation data group corresponding to the flow velocity interval where the latest average flow velocity is located from at least two compensation data groups corresponding to the fault channel, and obtain the compensation data corresponding to the fault channel from the first compensation data group; wherein, the compensation data group corresponding to the flow velocity interval includes the compensation data of the fault channel in the flow velocity interval.

[0156] Optionally, the compensation array includes multiple compensation data groups corresponding to multiple flow intervals, each of the compensation data groups includes compensation data of each channel in the corresponding flow rate interval; or, the compensation array includes compensation data groups corresponding to multiple channels, each channel corresponds to at least two compensation data groups, and the at least two compensation data groups correspond to at least two flow rate intervals respectively.

[0157] Optionally, the update module is specifically used to:

[0158] The current average flow rate and the ratio of the current flow rate of each channel to the current average flow rate are taken as a historical data group, and updated into a historical array, wherein the historical array includes a plurality of historical data groups;

[0159] The compensation array is updated according to the history array.

[0160] Optionally, the update module is further specifically used for:

[0161] If the history array is full, selecting a second history data group in the middle of the time order in the history array, and determining a second compensation data group corresponding to the flow rate interval where the second average flow rate in the second history data group is located;

[0162] The compensation data of the channels in the second compensation data group are updated according to the historical ratios of the channels in the second historical data group.

[0163] Optionally, according to the historical ratio of each channel in the second historical data group, the formula for updating the compensation data of the channel in the second compensation data group is as follows:

[0164]

[0165] Among them, a is the filter coefficient, The updated compensation data for the channel; is the historical ratio of the channel in the second historical data group, This is the compensation data of the channel before updating.

[0166] Optionally, the update module is further used to:

[0167] After the channel without flow rate result is regarded as a fault channel, the history array is cleared.

[0168] Optionally, the update module is further specifically used for:

[0169] If the history array is not full, then adding the history data set to the history array;

[0170] If the history array is full, the history data set is used to replace the oldest history data set in the history array.

[0171] Optionally, the formula for calculating the average flow rate of the current fluid after compensation based on the flow rate of the normal sound channel and the compensation data of the fault sound channel is as follows:

[0172]

[0173] in: is the average flow rate of the current fluid after compensation, is the flow velocity of normal channel i, is the weight of normal channel i, is the compensation data of fault channel j, is the weight of fault channel j.

[0174] Optionally, the calculating an average flow rate according to the flow rates of the current channels includes:

[0175] The flow rates of the current channels are weighted and summed to obtain the average flow rate.

[0176] In practical applications, the flow rate compensation device can be implemented by a computer program, such as application software, etc.; or, it can also be implemented as a medium storing relevant computer programs, such as a USB disk, a cloud disk, etc.; or, it can also be implemented by a physical device integrated or installed with relevant computer programs, such as a chip, a server, etc. The device is used to execute the flow rate compensation method described in the above method embodiment, and its specific implementation method is as described above, which will not be repeated here.

[0177] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device includes:

[0178] 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, the memory 292, and the communication interface 293 may communicate with each other through the bus 294. The communication interface 293 may be used for information transmission. The processor 291 may call the logic instructions in the memory 292 to execute the method of the above embodiment.

[0179] In addition, the logic instructions in the above-mentioned memory 292 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0180] The memory 292 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, implementing the methods in the above method embodiments.

[0181] The memory 292 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 292 may include a high-speed random access memory and may also include a non-volatile memory.

[0182] An embodiment of the present application also provides a non-temporary computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the above embodiment.

[0183] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method provided in any embodiment of the present application when the computer program is executed by a processor.

[0184] The embodiment of the present application further provides an ultrasonic flow meter, which includes multiple sound channels; the ultrasonic flow meter is used for:

[0185] Calculate the current flow velocity of each channel, take the channel with flow velocity result as the normal channel, and take the channel without flow velocity result as the fault channel;

[0186] Acquire compensation data corresponding to the faulty sound channel; wherein the compensation data of the sound channel includes a predicted ratio of the current flow velocity of the sound channel to the average flow velocity, and the compensation data of the sound channel is obtained based on a historical ratio of the flow velocity of the sound channel to the average flow velocity;

[0187] According to the flow velocity of the normal sound channel and the compensation data of the fault sound channel, the average flow velocity of the current fluid after compensation is calculated, and the average flow velocity is the average value of the flow velocity of each sound channel;

[0188] The current flow rate is calculated based on the compensated average flow rate of the current fluid.

[0189] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0190] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A flow rate compensation method, characterized in that: Applied to an ultrasonic flow meter, the ultrasonic flow meter includes multiple sound channels; the method includes: Calculate the current flow velocity of each channel, take the channel with flow velocity result as the normal channel, and take the channel without flow velocity result as the fault channel; Acquire compensation data corresponding to the faulty sound channel; wherein the compensation data of the sound channel includes a predicted ratio of the current flow velocity of the sound channel to the average flow velocity, the compensation data of the sound channel is obtained based on a historical ratio of the flow velocity of the sound channel to the average flow velocity, and the average flow velocity is an average value of the flow velocities of each sound channel; The compensated average flow rate of the current fluid is calculated based on the flow rate of the normal sound channel and the compensation data of the fault sound channel.

2. The method according to claim 1, characterized in that The method further comprises: If each channel has a flow rate result, then the current average flow rate is calculated according to the current flow rates of each channel as the average flow rate of the current fluid; And, according to the current flow velocity of each channel and the current average flow velocity, a ratio of the current flow velocity of each channel to the current average flow velocity is calculated; The compensation data of the sound channel is updated according to the current average flow rate and the ratio of the current flow rate of each sound channel to the current average flow rate.

3. The method according to claim 2, characterized in that The obtaining of compensation data corresponding to the faulty sound channel includes: Acquire a compensation array, wherein the compensation array includes a plurality of compensation data groups; According to the latest average flow velocity of the ultrasonic flowmeter, determine the first compensation data group corresponding to the flow velocity interval where the latest average flow velocity is located from at least two compensation data groups corresponding to the fault channel, and obtain the compensation data corresponding to the fault channel from the first compensation data group; wherein, the compensation data group corresponding to the flow velocity interval includes the compensation data of the fault channel in the flow velocity interval.

4. The method according to claim 3, characterized in that The compensation array includes multiple compensation data groups corresponding to multiple flow intervals, each of the compensation data groups includes compensation data of each channel in the corresponding flow rate interval; or, the compensation array includes compensation data groups corresponding to multiple channels, each channel corresponds to at least two compensation data groups, and the at least two compensation data groups correspond to at least two flow rate intervals respectively.

5. The method according to claim 4, characterized in that The updating of the compensation data of the sound channel according to the current average flow rate and the ratio of the current flow rate of each sound channel to the current average flow rate comprises: The current average flow rate and the ratio of the current flow rate of each channel to the current average flow rate are taken as a historical data group, and updated into a historical array, wherein the historical array includes a plurality of historical data groups; The compensation array is updated according to the history array.

6. The method according to claim 5, characterized in that The updating of the compensation array according to the history array includes: If the history array is full, selecting a second history data group in the middle of the time order in the history array, and determining a second compensation data group corresponding to the flow rate interval where the second average flow rate in the second history data group is located; The compensation data of the channels in the second compensation data group are updated according to the historical ratios of the channels in the second historical data group.

7. The method according to claim 6, characterized in that The updating of the compensation data of the channels in the second compensation data group according to the historical ratio of each channel in the second historical data group includes: Among them, a is the filter coefficient, The updated compensation data for the channel; is the historical ratio of the channel in the second historical data group, This is the compensation data of the channel before updating.

8. The method according to claim 6, characterized in that After the channel without flow rate result is used as the fault channel, the method further includes: Clears the history array.

9. The method according to claim 6, characterized in that The current average flow rate and the ratio of the current flow rate of each channel to the current average flow rate are taken as a historical data group and updated into the historical array, including: If the history array is not full, then adding the history data set to the history array; If the history array is full, the history data set is used to replace the oldest history data set in the history array.

10. The method according to claim 1, characterized in that The step of calculating the compensated average flow rate of the current fluid according to the flow rate of the normal sound channel and the compensation data of the fault sound channel comprises: in: is the average flow rate of the current fluid after compensation, is the flow velocity of normal channel i, is the weight of normal channel i, is the compensation data of fault channel j, is the weight of fault channel j.

11. The method according to any one of claims 2 to 10, characterized in that: The calculating the average flow rate according to the current flow rates of each channel includes: The flow rates of the current channels are weighted and summed to obtain the average flow rate.

12. An ultrasonic flow meter, characterized in that: Including multiple channels and compensation modules; The compensation module is used to calculate the current flow rate of each channel, and regard the channel with flow rate results as a normal channel, and regard the channel without flow rate results as a fault channel; Acquire compensation data corresponding to the faulty sound channel; wherein the compensation data of the sound channel includes a predicted ratio of the current flow velocity of the sound channel to the average flow velocity, the compensation data of the sound channel is obtained based on a historical ratio of the flow velocity of the sound channel to the average flow velocity, and the average flow velocity is an average value of the flow velocities of each sound channel; The compensated average flow rate of the current fluid is calculated based on the flow rate of the normal sound channel and the compensation data of the fault sound channel.

13. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 11 when executed by a processor.

Citation Information

Patent Citations

  • Instrument replacing system for flowmeters specific to collaborative arrangement

    CN103383277A

  • Fault sound channel compensation method based on crossed four-sound-channel ultrasonic flowmeter

    CN116952316A

  • System and method for meter substitution for co-located flowmeters

    US20130291649A1

  • Enhanced velocity estimation in ultrasonic flow meters

    US6837113B1

Cited By

  • Pipeline flow measurement method and device, computer equipment and storage medium

    CN119826911A

  • Flow compensation method of multichannel ultrasonic water meter, ultrasonic water meter, equipment and medium

    CN121113210A

  • A flow compensation method of a multi-channel ultrasonic water meter, an ultrasonic water meter, a device and a medium

    CN121113210B