A method, apparatus, computer equipment, and storage medium for measuring the flow rate of a pipeline.
By analyzing and updating the measurement data of abnormal channels, and combining the multi-channel time difference method and flow velocity threshold, the problem of insufficient measurement accuracy of single channels was solved, and high-precision flow measurement was achieved in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2026-04-03
AI Technical Summary
Single-channel ultrasonic flow metering is susceptible to uneven flow field, channel malfunction, or external interference, which can lead to a decrease in metering accuracy. Multi-channel designs may seriously affect the overall metering results when abnormal channels are present.
By acquiring historical and current measurement data from multiple channels, abnormal channels are analyzed and their measurement data are updated. Combined with the multi-channel time difference method, the velocity set and flow regime are determined, and the flow rate calculation is adjusted using correction coefficients and weighting coefficients.
It improves the accuracy and reliability of flow measurement, ensuring the accuracy of flow measurement in complex environments and under fault conditions, and is suitable for various pipeline flow monitoring scenarios.
Smart Images

Figure CN119826911B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultrasonic flow metering device technology, specifically to a method, device, computer equipment, and storage medium for measuring the flow of a pipeline. Background Technology
[0002] Currently, the multichannel time-of-flight method is based on the difference in propagation speed of ultrasonic waves in the upstream and downstream directions. By measuring the time difference in these two directions, the flow velocity can be calculated, and the flow rate can then be estimated. However, the measurement results of a single channel can be affected by factors such as non-uniform flow field, channel malfunction, or external interference (such as air bubbles), leading to a decrease in measurement accuracy. While multichannel design can improve this problem to some extent, abnormalities in some channels can seriously affect the overall measurement results. Summary of the Invention
[0003] In view of this, the present invention provides a method, apparatus, computer equipment, and storage medium for measuring the flow rate of a pipeline, in order to solve the problem of how to measure the flow rate of a pipeline.
[0004] In a first aspect, the present invention provides a method for measuring the flow rate of a pipeline, the method comprising:
[0005] The historical measurement datasets and current measurement data of multiple channels located on both sides of the horizontal plane at the center of the pipe are obtained, as well as the analysis results of the historical measurement datasets of each of the aforementioned channels. The historical measurement datasets of the aforementioned multiple channels include multiple measurement data of each of the aforementioned channels at different historical times. The aforementioned analysis results are determined based on the aforementioned measurement data. The aforementioned analysis results include the existence of at least one abnormal channel and / or at least one normal channel among the multiple channels.
[0006] If the above analysis results indicate that there is at least one abnormal channel and at least one normal channel, then based on the historical measurement dataset of the at least one abnormal channel, update the current measurement data of the at least one abnormal channel to obtain the updated current measurement data of the at least one abnormal channel.
[0007] Based on the historical measurement dataset of at least one abnormal channel and the updated current measurement data, a first historical flow rate set and a first current flow rate of the at least one abnormal channel are determined; and based on the historical measurement dataset of at least one normal channel and the current measurement data, a second historical flow rate set and a second current flow rate of the at least one normal channel are determined.
[0008] Each historical velocity in the first historical velocity set and the second historical velocity set is processed and compared with the first velocity threshold to determine the current flow state.
[0009] Based on the multi-channel time difference method, the first current flow rate, the second current flow rate, and the current flow state, the current flow rate of the pipeline is determined.
[0010] In an optional implementation, the above-mentioned processing of each historical flow velocity in the first historical flow velocity set and the second historical flow velocity set, followed by comparison with a first flow velocity threshold, to determine the flow state at the current moment includes:
[0011] From the first historical velocity set and the second historical velocity set, select the historical velocity of the target number at consecutive moments corresponding to each of the above-mentioned channels;
[0012] By fusing the historical flow rates of the above-mentioned target quantity for each of the above-mentioned channels at consecutive times, the fused historical flow rate of the above-mentioned target quantity at consecutive times is obtained;
[0013] If all the channels located on the same side of the horizontal plane at the center of the above-mentioned pipe are abnormal channels, then compare whether the historical flow rate of the above-mentioned fusion at each moment is less than the first flow rate threshold.
[0014] If both are true, then the laminar flow state is determined to be the flow state at the current moment as described above.
[0015] In an optional implementation, the above-mentioned processing of each historical flow velocity in the first historical flow velocity set and the second historical flow velocity set, followed by comparison with a first flow velocity threshold, to determine the flow state at the current moment includes:
[0016] From the first historical velocity set and the second historical velocity set, select the historical velocity of the target number at consecutive moments corresponding to each of the above-mentioned channels;
[0017] By fusing the historical flow rates of the above-mentioned target quantity for each of the above-mentioned channels at consecutive times, the fused historical flow rate of the above-mentioned target quantity at consecutive times is obtained;
[0018] If the sound channels located on both sides of the horizontal plane of the center of the above-mentioned pipe include at least one normal sound channel, then the maximum and minimum values of the flow velocity on one side of the horizontal plane of the center of the above-mentioned pipe, and the maximum and minimum values of the flow velocity on the other side of the horizontal plane of the center of the above-mentioned pipe are selected.
[0019] Compare whether the historical flow velocity of the above fusion at each moment is less than the first flow velocity threshold, and compare whether the minimum flow velocity on one side of the horizontal plane of the center of the above pipe is greater than the maximum flow velocity on the other side of the horizontal plane of the center of the above pipe.
[0020] If both are true, then the laminar flow state is determined to be the flow state at the current moment as described above.
[0021] In one optional implementation, determining the current flow rate of the pipe based on the multi-channel time difference method, the first current flow rate, the second current flow rate, and the current flow state includes:
[0022] Based on the correspondence between flow regime and correction coefficient, the target correction coefficient corresponding to the current flow regime is selected from multiple preset correction coefficients.
[0023] Based on preset rules and the number of abnormal channels, determine the weighting coefficient for each of the above channels;
[0024] The current flow rate at the fusion time is determined based on each of the above-mentioned first current flow rates, each of the above-mentioned second current flow rates, and each of the above-mentioned weighting coefficients;
[0025] Based on the multi-channel time difference method, the current flow rate obtained by the above fusion, and each of the above weighting coefficients, the current flow rate of the above pipeline is determined.
[0026] In one optional implementation, historical measurement datasets and current measurement data for multiple sound channels located on both sides of the horizontal plane at the center of the pipe are acquired, along with analysis results of the historical measurement datasets for each of the aforementioned sound channels, including:
[0027] Obtain historical measurement datasets and current measurement data for multiple of the aforementioned vocal channels;
[0028] From the multiple current time measurement data mentioned above, search for whether there is a current time measurement data that is less than or equal to the first measurement threshold, and whether there is a current time measurement data that is greater than the first measurement threshold;
[0029] If so, then all current-time measurement data that are less than or equal to the first measurement threshold are counted to obtain the first target data, and all current-time measurement data that are greater than the first measurement threshold are counted to obtain the second target data;
[0030] If the first target data and the second target data are found, then the channel corresponding to the first current time measurement data is determined to be the abnormal channel.
[0031] In one alternative implementation, it further includes:
[0032] If the first target data is not found, then the difference between the mean of the historical measurement data of the multiple channels and the measurement data at the current time corresponding to the second target data is determined based on the historical measurement dataset of the multiple channels.
[0033] If at least one target difference greater than the second measurement threshold is found among the multiple differences mentioned above, then at least one channel corresponding to the at least one target difference is determined to be the abnormal channel.
[0034] In one alternative implementation, it further includes:
[0035] If not, compare whether the historical flow rate of each of the above fusions is greater than the second flow rate threshold;
[0036] If both are true, then the turbulent state is determined to be the flow state at the current moment as described above;
[0037] Alternatively, if not, the transition flow state is determined to be the flow state at the current moment as described above.
[0038] Secondly, the present invention provides a flow measurement device for a pipeline, the device comprising:
[0039] The acquisition module is used to acquire historical measurement datasets and current measurement data of multiple channels located on both sides of the horizontal plane at the center of the pipe, as well as the analysis results of the historical measurement datasets of each of the aforementioned channels. The historical measurement datasets of the aforementioned multiple channels include multiple measurement data of each of the aforementioned channels at different historical times. The aforementioned analysis results are determined based on the aforementioned measurement data. The aforementioned analysis results include the existence of at least one abnormal channel and / or at least one normal channel among the multiple channels.
[0040] The update module is used to update the current measurement data of the at least one abnormal channel based on the historical measurement dataset of the at least one abnormal channel if the above analysis results indicate that there is at least one abnormal channel and at least one normal channel, so as to obtain the updated current measurement data of the at least one abnormal channel.
[0041] The first determining module is configured to determine a first historical flow rate set and a first current flow rate of the at least one abnormal channel based on the historical measurement dataset of the at least one abnormal channel and the updated current time measurement data, and to determine a second historical flow rate set and a second current time flow rate of the at least one normal channel based on the historical measurement dataset of the at least one normal channel and the current time measurement data.
[0042] The second determining module is used to process each historical flow velocity of the first historical flow velocity set and the second historical flow velocity set and compare it with the first flow velocity threshold to determine the flow state at the current moment.
[0043] The third determining module is used to determine the current flow rate of the pipeline based on the multi-channel time difference method, the first current flow rate, the second current flow rate, and the current flow state.
[0044] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the pipeline flow measurement method of the first aspect or any corresponding embodiment described above.
[0045] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the flow measurement method for a pipeline according to the first aspect or any corresponding embodiment thereof.
[0046] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the pipeline flow measurement method of the first aspect or any corresponding embodiment described above.
[0047] This invention provides a method for measuring pipeline flow rate. When analysis results indicate the simultaneous presence of abnormal and normal sound channels, the current-time measurement data of the abnormal sound channel is updated based on the historical measurement dataset of the abnormal sound channel. A first historical velocity set and a first current-time velocity for the abnormal sound channel are determined based on the historical measurement dataset and the updated current-time measurement data. Similarly, a second historical velocity set and a second current-time velocity for the normal sound channel are determined based on the historical measurement dataset and the current-time measurement data, thereby determining the current-time flow state. The current-time flow rate of the pipeline is then determined using a multi-channel time difference method, the first current-time velocity, the second current-time velocity, and the current-time flow state. This method considers the influencing factors of abnormal sound channels and the current flow state when measuring pipeline flow rate, significantly improving the accuracy and reliability of pipeline flow rate measurement. It is applicable to various pipeline flow monitoring scenarios, especially ensuring accuracy in complex environments, unstable data, or faulty conditions. Attached Figure Description
[0048] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0049] Figure 1 This is a front view of a schematic diagram of the installation of a transducer in a pipeline according to an embodiment of the present invention;
[0050] Figure 2 This is a left view of a schematic diagram of the installation of a transducer in a pipeline according to an embodiment of the present invention;
[0051] Figure 3 This is a top view of a schematic diagram of the installation of a transducer in a pipeline according to an embodiment of the present invention;
[0052] Figure 4 This is a schematic diagram illustrating the measurement principle of the ultrasonic time difference method according to an embodiment of the present invention;
[0053] Figure 5 This is one of the flowcharts of a pipeline flow measurement method according to an embodiment of the present invention;
[0054] Figure 6 This is a second flowchart of a pipeline flow measurement method according to an embodiment of the present invention;
[0055] Figure 7 This is the third flowchart of a pipeline flow measurement method according to an embodiment of the present invention;
[0056] Figure 8 This is a schematic diagram of a pipeline flow measurement method apparatus according to an embodiment of the present invention;
[0057] Figure 9 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] According to an embodiment of the present invention, a method for measuring the flow rate of a pipeline is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0060] Figure 1 This is a front view of a schematic diagram of the installation of a transducer in a pipeline according to an embodiment of the present invention. Figure 2 This is a left view of a schematic diagram of the installation of a transducer in a pipeline according to an embodiment of the present invention. Figure 3 This is a top view of a schematic diagram of the installation of a transducer in a pipeline according to an embodiment of the present invention.
[0061] like Figures 1 to 3As shown, multiple transducers for receiving or transmitting ultrasonic waves are deployed on both sides of the central horizontal plane of the pipe. Examples include A1, A2, B1, B2, C1, C2 (not shown in the figure), D1, and D2. Each pair of transducers forms a channel; for example, A1 and A2 form one channel, B1 and B2 form another, C1 and C2 form another, and D1 and D2 form another. Each channel is not perpendicular to the flow direction of the liquid or gas within the pipe. These transducers are ultrasonic flow metering devices; specifically, they can be ultrasonic water meters, ultrasonic gas meters, etc.
[0062] This embodiment provides a method for measuring the flow rate of a pipeline, which can be used with the aforementioned computer. Figure 5 This is a flowchart of a pipeline flow measurement method according to an embodiment of the present invention, such as... Figure 5 As shown.
[0063] In a first aspect, the present invention provides a method for measuring the flow rate of a pipeline, the method comprising:
[0064] Step S501: Obtain the historical measurement datasets and current measurement data of multiple channels located on both sides of the horizontal plane at the center of the pipe, as well as the analysis results of the historical measurement datasets of each channel.
[0065] The historical measurement dataset for multiple channels includes multiple measurement data for each channel at different historical moments. The analysis results are determined based on the measurement data and include the presence of at least one abnormal channel and / or at least one normal channel among the multiple channels.
[0066] Abnormal channels can be caused by damage to the channel, which prevents it from transmitting and receiving ultrasonic signals normally, resulting in a zero calculation result. Alternatively, a channel may experience "wave skipping" due to air bubbles or external interference, where the measured ultrasonic signal value differs by an integer multiple of the signal period. An error of one cycle time can cause the calculated value of that channel to differ from the actual value by tens of cubic meters of flow per hour.
[0067] The historical measurement datasets for multiple channels can be one for each channel, with each dataset including measurement data for that channel at multiple historical moments, i.e., time of flight or time difference of flight. The current measurement data for multiple channels can be the measurement data for each channel at the same latest measurement moment.
[0068] One method involves the processor storing historical measurement datasets and current measurement data in a designated location for subsequent analysis. Specifically, this could involve analyzing the corresponding acoustic channels based on multiple historical measurement data points within the historical dataset to determine if they are functioning correctly. Normal acoustic channels can stably transmit and receive ultrasonic signals, while abnormal channels may cause measurement data anomalies due to equipment malfunction, air bubbles, or external interference.
[0069] Step S502: If the analysis result indicates that there is at least one abnormal channel and at least one normal channel, then based on the historical measurement dataset of at least one abnormal channel, update the current time measurement data of at least one abnormal channel to obtain the updated current time measurement data of at least one abnormal channel.
[0070] That is, if the analysis results indicate that both abnormal and normal channels exist simultaneously, the current measurement data of the abnormal channel is updated using multiple historical measurement data of the abnormal channel.
[0071] One way to update it is to replace the current measurement data of the abnormal channel with the average of multiple historical measurement datasets of the abnormal channel.
[0072] Step S503: Based on the historical measurement dataset of at least one abnormal channel and the updated current time measurement data, determine the first historical flow rate set and the first current time flow rate of at least one abnormal channel; and based on the historical measurement dataset of at least one normal channel and the current time measurement data, determine the second historical flow rate set and the second current time flow rate of at least one normal channel.
[0073] Figure 4 This is a schematic diagram illustrating the measurement principle of the ultrasonic time-of-flight method according to an embodiment of the present invention. Figure 4 In the example of transducers A1 and A2 forming a single channel, Let be the length of the sound channel, c be the speed of ultrasound propagation in the channel, and θ be the angle between the sound channel and the channel axis. For downstream flight time, For the time of the reverse flight, Time difference of flight This represents the current flow rate for that channel.
[0074] The relationships between the above parameters include:
[0075]
[0076]
[0077]
[0078]
[0079] The current flow rate for each channel can be determined using the above formula. , . This refers to the number of audio channels.
[0080] Further based on the weight of each channel The current flow rate corresponding to each channel Calculate the flow rate of multi-channel fusion in real time :
[0081]
[0082] Furthermore, the current flow rate can be determined based on the following relationship. :
[0083]
[0084] Where K is the correction parameter and D is the pipe diameter.
[0085] The first historical flow rate set can be formed by using the relationship between the above parameters and the measurement data of the abnormal channel at each historical moment to determine the flow rate of the abnormal channel at each historical moment. The first current flow rate can be formed by using the relationship between the above parameters and the measurement data of the abnormal channel at the current moment to determine the flow rate of the abnormal channel at the current moment. The second historical flow rate set can be formed by using the relationship between the above parameters and the measurement data of the normal channel at each historical moment to determine the flow rate of the normal channel at each historical moment. The second current flow rate can be formed by using the relationship between the above parameters and the measurement data of the normal channel at the current moment to determine the flow rate of the normal channel at the current moment.
[0086] Step S504: Process each historical velocity of the first historical velocity set and the second historical velocity set and compare it with the first velocity threshold to determine the current flow state.
[0087] The current flow state can be laminar, turbulent, or transitional (i.e., between laminar and turbulent). The first velocity threshold can be a preset velocity threshold used to distinguish between laminar and transitional flow states. In laminar flow, the fluid velocity is generally lower, i.e., below the first velocity threshold.
[0088] One way to determine the flow state at the current moment is to compare the average of each historical flow velocity in the first historical flow velocity set and the second historical flow velocity set with a first flow velocity threshold. If all of them are less than the first flow velocity threshold, then the flow state at the current moment is determined to be laminar.
[0089] Step S505: Determine the current flow rate of the pipeline based on the multi-channel time difference method, the first current flow rate, the second current flow rate, and the current flow state.
[0090] Among them, the multi-channel time difference method can calculate the current flow rate based on the relationship of the above parameters, where the current flow state can be used to select the above correction coefficient K.
[0091] The current flow rate, current flow state, and current measurement data for each channel are all from the same time.
[0092] This invention provides a method for measuring pipeline flow rate. When analysis results indicate the simultaneous presence of abnormal and normal sound channels, the current-time measurement data of the abnormal sound channel is updated based on the historical measurement dataset of the abnormal sound channel. A first historical velocity set and a first current-time velocity for the abnormal sound channel are determined based on the historical measurement dataset and the updated current-time measurement data. Similarly, a second historical velocity set and a second current-time velocity for the normal sound channel are determined based on the historical measurement dataset and the current-time measurement data, thereby determining the current-time flow state. The current-time flow rate of the pipeline is then determined using a multi-channel time difference method, the first current-time velocity, the second current-time velocity, and the current-time flow state. This method considers the influencing factors of abnormal sound channels and the current flow state when measuring pipeline flow rate, significantly improving the accuracy and reliability of pipeline flow rate measurement. It is applicable to various pipeline flow monitoring scenarios, especially ensuring accuracy in complex environments, unstable data, or faulty conditions.
[0093] In one alternative implementation, to further accurately determine the flow state at the current moment, Figure 6 This is a second flowchart of a pipeline flow measurement method according to an embodiment of the present invention, step S504, including:
[0094] Step S601: Select the historical flow rate of the target number of consecutive moments from the first historical flow rate set and the second historical flow rate set.
[0095] The continuous time of the target quantity can be a preset judgment period, indicating that the historical flow velocity within this period must meet the judgment condition of the same flow state.
[0096] One selection method is to continuously extract M historical velocities starting from the historical velocities corresponding to time t1 in the first and second historical velocities sets respectively.
[0097] Step S602: Fuse the historical flow rate of the target number of consecutive moments for each channel to obtain the fused historical flow rate of the target number of consecutive moments.
[0098] Here, the historical flow rate of fusion refers to the flow rate of fusion of multiple channels in the above relationship. .
[0099] One fusion method is as follows: taking four channels as an example, each weight coefficient in the relation is set to 0.25, that is, the weight coefficient of each channel is set to be the same, and then the average historical flow rate of the four channels is used as the historical flow rate of fusion.
[0100] Step S603: If all channels on the same side of the horizontal plane at the center of the pipe are abnormal channels, then compare whether the historical flow rate of fusion at each moment is less than the first flow rate threshold.
[0101] That is, taking a four-channel system as an example, two channels are above the horizontal plane of the center of the pipe, and two channels are below the horizontal plane of the center of the pipe. There may be three abnormal channels and one normal channel, or the two channels above or below the horizontal plane of the center of the pipe may both be abnormal channels.
[0102] Step S604: If all are yes, then determine the laminar flow state as the current flow state.
[0103] If all are true, that is, the historical flow rate of the fusion at each time in the consecutive time of the target number is less than the first flow rate threshold.
[0104] The method provided in this embodiment improves the accuracy of flow state judgment by selecting and fusing historical flow velocity data, reducing the impact of instantaneous fluctuations or noise. Through multi-channel data fusion and the elimination of abnormal channels, the flow state can be reflected more accurately, avoiding misjudgments caused by single-channel anomalies. Based on flow velocity data from multiple moments, different flow states such as laminar flow and turbulent flow can be effectively distinguished; confirmation of laminar flow is crucial for judging the operating status of the flow meter. Through data fusion and flow velocity threshold comparison, the flow meter or similar device can make more reliable flow state judgments in complex fluid flow environments.
[0105] In one alternative implementation, to further accurately determine the flow state at the current moment, Figure 7 This is a flowchart of the flow measurement method for a pipeline according to an embodiment of the present invention, step S504, which includes:
[0106] Step S701: Select the historical flow rate of the target number of consecutive moments from the first historical flow rate set and the second historical flow rate set.
[0107] The selection method for this step can be the same as that for step S601 above.
[0108] Step S702: Fuse the historical flow rate of the target number of consecutive moments for each channel to obtain the fused historical flow rate of the target number of consecutive moments.
[0109] The fusion method for this step can be the same as step S602 described above.
[0110] Step S703: If the sound channels on both sides of the horizontal plane at the center of the pipe include at least one normal sound channel, then select the maximum and minimum values of the flow velocity on one side of the horizontal plane at the center of the pipe, and the maximum and minimum values of the flow velocity on the other side of the horizontal plane at the center of the pipe.
[0111] That is, taking a four-channel system as an example, two channels are above the horizontal plane of the center of the pipe, and two channels are below the horizontal plane of the center of the pipe. It is possible for only one channel to exist above or below the horizontal plane of the center of the pipe, or for each channel to exist only once. This is considered an abnormal channel.
[0112] One selection method is to first sort the flow velocities on each side, and then select the maximum and minimum flow velocities on both sides of the pipe.
[0113] Step S704: Compare whether the fused historical flow velocity at each moment is less than the first flow velocity threshold, and compare whether the minimum flow velocity on one side of the horizontal plane at the center of the pipe is greater than the maximum flow velocity on the other side of the horizontal plane at the center of the pipe.
[0114] Specifically, whether the minimum flow velocity on one side of the horizontal plane at the center of the pipe is greater than the maximum flow velocity on the other side indicates whether the flow velocity in the pipe has been stratified. Simultaneously, it is also necessary to compare whether the merged historical flow velocity at each moment is less than a first flow velocity threshold to determine whether the flow velocity in the pipe conforms to the laminar flow state.
[0115] Step S705: If all are yes, then determine the laminar flow state as the current flow state.
[0116] If both are true, meaning the flow velocity in the pipe has been stratified and meets the flow velocity requirements of laminar flow, then the fluid in the current pipe can be determined to be in a laminar flow state.
[0117] The method provided in this embodiment, by fusing flow velocity data and comparing the extreme values of different channels, can effectively eliminate noise and abnormal data, ensuring accurate identification of flow status.
[0118] Effectively distinguishes fluid flow states: By comparing the flow velocities on both sides of the pipe, it determines whether the flow is in a laminar state. By selecting a normal channel and fusing its historical flow velocity data, it effectively avoids erroneous judgments caused by abnormal channels or sensor malfunctions, thereby improving the reliability of the flow measurement equipment. It is applicable to complex flow environments with large flow velocity fluctuations or rapid changes in the flow state within the pipe, especially in multi-channel flow meters, providing stable and reliable flow state judgment. Through fine processing of flow velocity data and detailed comparison of flow velocity distribution, the flow state can be determined more accurately.
[0119] In an optional implementation, to further accurately determine the current flow rate, step S505 includes:
[0120] Based on the correspondence between flow regime and correction coefficient, the target correction coefficient corresponding to the current flow regime is selected from multiple preset correction coefficients; based on preset rules and the number of abnormal channels, the weight coefficient of each channel is determined; based on each first current flow velocity, each second current flow velocity, and each weight coefficient, the fused current flow velocity is determined; based on the multi-channel time difference method, the fused current flow velocity, and each weight coefficient, the current flow rate of the pipeline is determined.
[0121] In this embodiment, the correspondence between the flow regime and the correction coefficient can be preset. Taking a four-channel system as an example, if there are three abnormal channels, the weight coefficients of the three abnormal channels at the current moment are adjusted to 0, and the weight coefficient of the other normal channel is adjusted to 1; if there are two abnormal channels, the weight coefficients of the two abnormal channels at the current moment are adjusted to 0, and the weight coefficients of the other two normal channels are adjusted to 0.5; if there is one abnormal channel, the weight coefficient of the abnormal channel at the current moment is adjusted to 0, and the weight coefficient of the normal channel on the same side as the abnormal channel is adjusted to 0.5. The current flow rate and the current flow volume of the pipe at the current moment can be determined based on the above relationship.
[0122] Before establishing the correspondence between flow regime and correction factor, the Reynolds number of the fluid can be determined using the following formula. The corresponding correction factor K is set by referring to the Reynolds number.
[0123]
[0124] in, For fluid density, For fluid velocity, For pipe diameter, This represents the fluid viscosity.
[0125] The method provided in this embodiment significantly improves the accuracy of flow measurement by comprehensively considering multiple factors such as flow regime, correction coefficients, channel weights, velocity fusion, and time-of-flight (TOF) methods. Even in the presence of abnormal channels, the system can effectively adjust the weights and correction coefficients to ensure the reliability of the measurement results. The correction coefficients and multi-channel TOF methods enable the flow measurement system to adapt to various complex flow environments and changing flow conditions, thereby improving the system's versatility and adaptability. This method can dynamically adjust the calculation process in real time based on the current flow regime and measurement data, ensuring that the flow measurement results closely match the actual flow state.
[0126] In an optional implementation, to further accurately determine the historical measurement datasets and current measurement data for multiple channels, as well as the analysis results of the historical measurement datasets for each channel, step S501 includes:
[0127] Acquire historical measurement datasets and current measurement data for multiple channels; from the multiple current measurement data, search for current measurement data that are less than or equal to a first measurement threshold, and for current measurement data that are greater than the first measurement threshold; if so, count all current measurement data that are less than or equal to the first measurement threshold to obtain first target data, and count all current measurement data that are greater than the first measurement threshold to obtain second target data; if the first target data and the second target data are found, determine that the channel corresponding to the first current measurement data is the abnormal channel.
[0128] In this embodiment, the first measurement threshold can be the error value of the transducer. If the current measurement data of a channel is less than or equal to the first measurement threshold, and the current measurement data of other channels is greater than the first measurement threshold, it indicates that the fluid in the pipe is not still, but the measurement data of this channel is abnormal, that is, the channel is an abnormal channel.
[0129] The method provided in this embodiment divides the measurement data at the current moment by a first measurement threshold and performs statistical analysis in combination with historical data to accurately identify abnormal audio channels. It can efficiently and automatically detect potentially problematic audio channels and provide clear data support, helping to improve the accuracy and reliability of anomaly identification, and is particularly suitable for multi-channel monitoring environments.
[0130] In an optional implementation, to further accurately identify the abnormal vocal tract, the method further includes:
[0131] If the first target data is not found, the difference between the mean of the historical measurement data of the multiple channels and the measurement data at the current time corresponding to the second target data is determined based on the historical measurement dataset of the multiple channels. If at least one target difference greater than the second measurement threshold is found from the multiple differences, at least one channel corresponding to the at least one target difference is determined to be the abnormal channel.
[0132] In this embodiment, the second measurement threshold can be a preset threshold that is proportional to the signal period, used to filter skipping signals. By comparing the difference with the second threshold, it is determined whether the current measurement data corresponding to the second target data deviates from the average of historical measurement data. If so, at least one channel corresponding to the target difference can be identified as an abnormal channel.
[0133] The method provided in this embodiment improves the accuracy and sensitivity of anomaly detection by introducing the difference between historical data and current data to determine abnormal channels. It is particularly effective in accurately capturing wave skipping anomalies, especially in cases where there are significant discrepancies with historical data. This allows for a more comprehensive identification of abnormal channels, enhancing adaptability to dynamic system changes and the ability to monitor long-term trends.
[0134] In an optional implementation, to further accurately determine the flow state at the current moment, the method further includes:
[0135] If not, compare whether the historical flow velocity of each of the above fusions is greater than the second flow velocity threshold; if both are, determine the turbulent state as the current flow state; or, if not, determine the transitional flow state as the current flow state.
[0136] In this embodiment, the fluid velocity in a turbulent state is generally high, meaning it needs to be greater than the second velocity threshold. This second velocity threshold can be a preset value set based on experience; that is, if it is determined that the current flow state is not laminar, it is further determined whether it is a turbulent state. If it is neither a turbulent nor a laminar state, then the current flow state can be determined to be a transitional flow state.
[0137] The method provided in this embodiment, through multi-level and multi-condition judgment, not only enhances the accurate identification of flow regimes but also improves the adaptability to complex flow environments. By introducing comparisons with historical flow velocity data, the flow regime determination becomes more stable and reliable, reducing the impact of external disturbances on the results.
[0138] This invention provides a flow measurement device for pipelines. Figure 8 This is a schematic diagram of a pipeline flow measurement method apparatus according to an embodiment of the present invention, the apparatus comprising:
[0139] The acquisition module 801 is used to acquire historical measurement datasets and current measurement data of multiple channels located on both sides of the horizontal plane at the center of the pipe, as well as the analysis results of the historical measurement datasets of each of the aforementioned channels. The historical measurement datasets of the aforementioned multiple channels include multiple measurement data of each of the aforementioned channels at different historical times. The aforementioned analysis results are determined based on the aforementioned measurement data. The aforementioned analysis results include the existence of at least one abnormal channel and / or at least one normal channel among the multiple channels.
[0140] The update module 802 is used to update the current measurement data of the at least one abnormal channel based on the historical measurement dataset of the at least one abnormal channel if the above analysis results indicate that there is at least one abnormal channel and at least one normal channel, so as to obtain the updated current measurement data of the at least one abnormal channel.
[0141] The first determining module 803 is configured to determine a first historical flow rate set and a first current flow rate of the at least one abnormal channel based on the historical measurement dataset of the at least one abnormal channel and the updated current time measurement data, and to determine a second historical flow rate set and a second current time flow rate of the at least one normal channel based on the historical measurement dataset of the at least one normal channel and the current time measurement data.
[0142] The second determining module 804 is used to process each historical flow velocity of the first historical flow velocity set and the second historical flow velocity set and compare them with the first flow velocity threshold to determine the flow state at the current moment.
[0143] The third determining module 805 is used to determine the current flow rate of the pipeline based on the multi-channel time difference method, the first current flow rate, the second current flow rate, and the current flow state.
[0144] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0145] The pipeline flow measurement method device in this embodiment is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0146] This invention also provides a computer device having the above-described features. Figure 8 The diagram shows a flow measurement method and apparatus for a pipeline.
[0147] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 9 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processor can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations. Figure 9 Take a processor 10 as an example.
[0148] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include an integrated circuit. The integrated circuit may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPRS), or any combination thereof.
[0149] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiment.
[0150] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0151] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0152] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0153] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0154] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0155] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for measuring the flow rate of a pipeline, characterized in that, The method includes: The historical measurement datasets and current measurement data of multiple channels located on both sides of the horizontal plane at the center of the pipe are obtained, as well as the analysis results of the historical measurement datasets of each channel. The historical measurement datasets of the multiple channels include multiple measurement data of each channel at different historical times. The analysis results are determined based on the measurement data. The analysis results include the existence of at least one abnormal channel and / or at least one normal channel among the multiple channels. The abnormal channel includes the abnormality when the channel has instantaneous fluctuations and the channel has skipped waves. When the channel has skipped waves, the measured ultrasonic signal values differ by approximately an integer multiple of the signal period. If the analysis results indicate the existence of at least one abnormal channel and at least one normal channel, then based on the historical measurement dataset of the at least one abnormal channel, update the current measurement data of the at least one abnormal channel to obtain the updated current measurement data of the at least one abnormal channel. Based on the historical measurement dataset of the at least one abnormal channel and the updated current measurement data, a first historical flow rate set and a first current flow rate of the at least one abnormal channel are determined; and based on the historical measurement dataset of the at least one normal channel and the current measurement data, a second historical flow rate set and a second current flow rate of the at least one normal channel are determined. Each historical flow velocity in the first historical flow velocity set and the second historical flow velocity set is processed and compared with the first flow velocity threshold to determine the flow state at the current moment; The current flow rate of the pipeline is determined based on the multi-channel time difference method, the first current flow rate, the second current flow rate, and the current flow state. The determination of the current flow rate of the pipeline based on the multi-channel time difference method, the first current flow rate, the second current flow rate, and the current flow state includes: Based on the correspondence between flow regime and correction coefficient, the target correction coefficient corresponding to the flow regime at the current moment is selected from multiple preset correction coefficients; Based on preset rules and the number of abnormal channels, determine the weighting coefficient for each channel; The fused current-time flow rate is determined based on each of the first current-time flow rates, each of the second current-time flow rates, and each of the weighting coefficients. The current flow rate of the pipeline is determined based on the multi-channel time difference method, correction coefficient, the fused current flow rate, and each weight coefficient. The weighting coefficient for each channel and the current flow rate for each channel are calculated using the following formulas to determine the flow rate for multi-channel fusion: in, For the flow rate of multi-channel fusion, Weights for each channel, The current flow rate for each audio channel. , Number of audio channels; Calculate the current flow rate of the pipeline using the following formula: in, The current flow rate. K For correction factor, D The diameter of the pipe; The step of processing each historical flow velocity in the first historical flow velocity set and the second historical flow velocity set and comparing it with a first flow velocity threshold to determine the flow state at the current moment includes: From the first historical flow rate set and the second historical flow rate set, select the historical flow rate of the target number of consecutive moments corresponding to each of the audio channels; By fusing the historical flow rates of the target quantity at consecutive moments for each of the aforementioned channels, the fused historical flow rates of the target quantity at consecutive moments are obtained. If all the channels located on the same side of the horizontal plane at the center of the pipe are abnormal channels, then compare whether the historical flow rate of the fusion at each moment is less than the first flow rate threshold. If both are yes, then the laminar flow state is determined to be the flow state at the current moment; Alternatively, select the historical flow rate of the target number of consecutive moments corresponding to each of the first and second historical flow rate sets; By fusing the historical flow rates of the target quantity at consecutive moments for each of the aforementioned channels, the fused historical flow rates of the target quantity at consecutive moments are obtained. If the sound channels located on both sides of the horizontal plane at the center of the pipe include at least one normal sound channel, then the maximum and minimum values of the flow velocity on one side of the horizontal plane at the center of the pipe, and the maximum and minimum values of the flow velocity on the other side of the horizontal plane at the center of the pipe are selected. Compare whether the fused historical flow rate at each time point is less than a first flow rate threshold, and compare whether the minimum flow rate on one side of the horizontal plane at the center of the pipe is greater than the maximum flow rate on the other side of the horizontal plane at the center of the pipe. If both are yes, then the laminar flow state is determined to be the flow state at the current moment.
2. The method according to claim 1, characterized in that, Obtain historical measurement datasets and current measurement data for multiple sound channels located on both sides of the horizontal plane at the center of the pipe, as well as the analysis results of the historical measurement datasets for each of the sound channels, including: Obtain historical measurement datasets and current measurement data for multiple vocal tracts; From the multiple current time measurement data, search for whether there is a current time measurement data that is less than or equal to a first measurement threshold, and whether there is a current time measurement data that is greater than the first measurement threshold; If so, then all current-time measurement data that are less than or equal to the first measurement threshold are counted to obtain the first target data, and all current-time measurement data that are greater than the first measurement threshold are counted to obtain the second target data; If the first target data and the second target data are found, then the channel corresponding to the first current time measurement data is determined to be the abnormal channel.
3. The method according to claim 2, characterized in that, Also includes: If the first target data is not found, then the difference between the mean of the historical measurement data of the multiple channels and the measurement data at the current time corresponding to the second target data is determined based on the historical measurement dataset of the multiple channels. If at least one target difference greater than the second measurement threshold is found among the multiple differences, then at least one channel corresponding to the at least one target difference is determined to be the abnormal channel.
4. The method according to claim 1, characterized in that, Also includes: If not, compare whether the historical flow rate of each fusion is greater than the second flow rate threshold; If the historical flow velocity of each fusion is greater than the second flow velocity threshold, then the turbulent state is determined as the current flow state. If the historical flow velocity of any fusion is not greater than the second flow velocity threshold, then the transitional flow state is determined as the current flow state.
5. A flow measurement device for a pipeline, characterized in that, The device includes: The acquisition module is used to acquire historical measurement datasets and current measurement data of multiple channels located on both sides of the horizontal plane at the center of the pipe, as well as the analysis results of the historical measurement datasets of each channel. The historical measurement datasets of the multiple channels include multiple measurement data of each channel at different historical times. The analysis results are determined based on the measurement data. The analysis results include the existence of at least one abnormal channel and / or at least one normal channel among the multiple channels. The abnormal channel includes anomalies when the channel exhibits instantaneous fluctuations and channel skipping waves. When a channel skips waves, the measured ultrasonic signal values differ by approximately an integer multiple of the signal period. An update module is configured to, if the analysis results indicate the existence of at least one abnormal channel and at least one normal channel, update the current measurement data of the at least one abnormal channel based on the historical measurement dataset of the at least one abnormal channel, thereby obtaining the updated current measurement data of the at least one abnormal channel. The first determining module is configured to determine a first historical flow rate set and a first current flow rate of the at least one abnormal channel based on the historical measurement dataset of the at least one abnormal channel and the updated current time measurement data, and to determine a second historical flow rate set and a second current time flow rate of the at least one normal channel based on the historical measurement dataset of the at least one normal channel and the current time measurement data. The second determining module is used to process each historical flow velocity of the first historical flow velocity set and the second historical flow velocity set and compare it with the first flow velocity threshold to determine the flow state at the current moment; The third determining module is used to determine the current flow rate of the pipeline based on the multi-channel time difference method, the first current flow rate, the second current flow rate, and the current flow state. Specifically, the third determining module is used to: select the target correction coefficient corresponding to the current flow state from multiple preset correction coefficients according to the correspondence between flow state and correction coefficient; determine the weight coefficient of each channel according to preset rules and the number of abnormal channels; determine the fused current flow rate according to each first current flow rate, each second current flow rate and each weight coefficient; and determine the current flow rate of the pipe based on the multi-channel time difference method, correction coefficient, the fused current flow rate and each weight coefficient. The weighting coefficient for each channel and the current flow rate for each channel are calculated using the following formulas to determine the flow rate for multi-channel fusion: in, For the flow rate of multi-channel fusion, Weights for each channel, The current flow rate for each audio channel. , Number of audio channels; Calculate the current flow rate of the pipeline using the following formula: in, The current flow rate. K For correction factor, D The diameter of the pipe; The second determining module is specifically used for: selecting the historical flow rate of a target number of consecutive moments from the first historical flow rate set and the second historical flow rate set; fusing the historical flow rates of the target number of consecutive moments corresponding to each of the channels to obtain the fused historical flow rate of the target number of consecutive moments; if all channels located on the same side of the horizontal plane at the center of the pipe are abnormal channels, then comparing whether the fused historical flow rate at each moment is less than the first flow rate threshold; if both are yes, then determining the laminar flow state as the flow state at the current moment; Alternatively, from the first historical flow rate set and the second historical flow rate set, select the historical flow rate of the target number of consecutive moments corresponding to each channel; fuse the historical flow rates of the target number of consecutive moments corresponding to each channel to obtain the fused historical flow rate of the target number of consecutive moments; if the channels located on both sides of the horizontal plane of the pipe center both include at least one normal channel, then select the maximum and minimum values of the flow rate on one side of the horizontal plane of the pipe center, and the maximum and minimum values of the flow rate on the other side of the horizontal plane of the pipe center; compare whether the fused historical flow rate at each moment is less than a first flow rate threshold, and compare whether the minimum value of the flow rate on one side of the horizontal plane of the pipe center is greater than the maximum value of the flow rate on the other side of the horizontal plane of the pipe center; if both are yes, then determine the laminar flow state as the flow state at the current moment.
6. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the flow measurement method for the pipeline as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the flow measurement method for the pipeline according to any one of claims 1 to 4.
Citation Information
Patent Citations
Fault sound channel compensation method based on crossed four-sound-channel ultrasonic flowmeter
CN116952316A
Flow measuring and calculating method, device and equipment of ultrasonic water meter and readable storage medium
CN118050062A