Ultrasonic flowmeter fault sound channel flow velocity prediction method based on deep learning
By constructing a deep neural network model that integrates physical information, the problem of flow velocity prediction in ultrasonic flow meters under faulty acoustic channels was solved, and high-precision flow measurement was achieved.
Patent Information
- Application Number
- CN202511053673.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-07-30
AI Technical Summary
Existing ultrasonic flow meters are prone to malfunction when encountering ice fragments or solid contaminants, leading to inaccurate flow calculations.
A deep learning-based method for predicting the flow velocity in the faulty channel of an ultrasonic flow meter is constructed. By integrating physical information and a data-driven deep neural network model, the flow velocity in the faulty channel is predicted using features such as the status of other units, pump speed, and the degree of obstruction by the guardrail.
It improves the accuracy and reliability of fault channel flow rate prediction, reduces training costs, and achieves high-precision flow rate calculation.
Smart Images

Figure CN120911285A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of flow measurement, in particular to an ultrasonic flowmeter fault sound channel flow rate prediction method based on deep learning. BACKGROUND
[0002] Pump stations play an important role in cross-basin water transfer projects, agricultural irrigation and urban water supply and drainage projects. Flow is a necessary indicator for monitoring water pump units in pump stations. Flow not only relates to the current operation state of the water pump, but also relates to the actual water transfer quantity, scheduling operation management and overall benefits of the pump station. Ultrasonic flowmeters are widely used in flow monitoring of water pump units in pump stations due to their non-contact measurement advantages. Their normal operation and accuracy are of great significance to the pump station.
[0003] During the operation of the pump station, it is inevitable to have an undesirable operation condition, such as the presence of broken ice in the river in winter or small solid pollutants in the fluid. These will block the transmission of ultrasonic signals, causing the flowmeter to fail or the flow calculation to be inaccurate. SUMMARY
[0004] In view of the above shortcomings in the prior art, the present application provides an ultrasonic flowmeter fault sound channel flow rate prediction method based on deep learning, which solves the problem that the prior art cannot accurately measure the flow rate of the fault sound channel.
[0005] In order to achieve the above-mentioned application purposes, the technical scheme adopted by the present application is as follows: an ultrasonic flowmeter fault sound channel flow rate prediction method based on deep learning, comprising: constructing a pre-trained fault sound channel flow rate prediction model for each sound channel of the ultrasonic flowmeter; locating the fault sound channel of the ultrasonic flowmeter in the water pump unit to be measured; calling the fault sound channel flow rate prediction model corresponding to the fault sound channel; taking the opening and closing state of other units, the current water pump speed, the shielding degree of the retaining grid and the signals of other sound channels of the ultrasonic flowmeter as inputs of the fault sound channel flow rate prediction model to obtain the flow rate of the fault sound channel.
[0006] Further, the specific method for constructing the pre-trained fault sound channel flow rate prediction model for each sound channel of the ultrasonic flowmeter is as follows: obtain the fault state of each sound channel of the ultrasonic flowmeter; analyze the characteristic factors affecting the flow rate signals of each sound channel under the fault state; construct a deep neural network that fuses physical information by taking the characteristic factors affecting the flow rate signals of each sound channel under the fault state as inputs and taking the flow rate of the fault sound channel as output; select the key parameters of the deep neural network through hyperparameter optimization in the training process; A fault channel velocity prediction model was developed for each channel of the ultrasonic flow meter.
[0007] Furthermore, the characteristic factors affecting the flow velocity signals of each channel under fault conditions include: the on / off status of other units, the current pump speed, the degree of obstruction by the guardrail, and the other channel signals of the ultrasonic flow meter; The on / off status of other units is used as tag data, with 0 corresponding to the closed state and 1 corresponding to the open state, including the status of multiple units; the degree of obstruction of the barrier is expressed as a percentage, calculated based on the degree of blockage of the barrier on site; the flow velocity of other channels is the average value calculated from the ultrasonic signals of each channel.
[0008] Furthermore, the fusion of physical information refers to embedding the pipeline velocity distribution equation as a soft constraint into the loss function of the deep neural network.
[0009] Furthermore, the expression for calculating the loss function of a deep neural network is:
[0010] in, J For loss function, J d Here, is the loss function for the data item, representing the mean squared error between the predicted and actual values. J p Let be the physical term loss function, representing the mean square error between the predicted and equation values; N d The number of data points used to calculate the loss function for each data item. i For indexing data points, For the first i Predicted flow velocity values for each data point For the first i The actual flow rate value of each data point; n The number of velocity vectors that can be calculated from the acoustic channel signal of the ultrasonic flowmeter. j For velocity vector index, N f The number of data points used to calculate the physical loss function. The velocity value at a point on the center line of the ultrasonic flow meter is calculated jointly from the predicted flow velocity and the flow velocities in other channels. U pde The velocity value is the velocity value in the pipeline velocity distribution equation.
[0011] Furthermore, the expression for the velocity distribution equation in the pipe is:
[0012] in, For height is h Flow velocity at that point Vmax represents the maximum flow velocity at the center of the vertical line of the inlet flow channel, H H represents the height of the inlet flow channel, Re represents the Reynolds number, and n represents an empirical index related to the Reynolds number.
[0013] Further, the hyperparameter optimization specifically comprises: establishing a learning function; defining a sample distribution of a hidden layer number, a node number of a multi-perception machine, a dropout rate, a learning rate and an optimal activation function; and determining an optimal hyperparameter combination through Bayesian probability.
[0014] Further, the hidden layer number is greater than or equal to 3 layers, the node number of the multi-perception machine is less than or equal to 256, the dropout rate ranges from 0.2 to 0.5, the learning rate ranges from 0.00001 to 0.1, and the activation function is one of relu, leaky_relu and tanh.
[0015] Secondly, the application further provides a computer readable storage medium storing a computer program, characterized in that the program is executed by a processor to realize a deep learning-based ultrasonic flowmeter fault acoustic channel flow velocity prediction method.
[0016] Finally, the application further provides a computer program product comprising a computer program, characterized in that the computer program is executed by a processor to realize a deep learning-based ultrasonic flowmeter fault acoustic channel flow velocity prediction method.
[0017] The application has the following beneficial effects: By combining the pipe velocity equation with the deep neural network, the physical law is added to the data-driven flow velocity prediction model, thereby forming a physical and data-driven ultrasonic flowmeter flow velocity prediction model, which can effectively remove the training and prediction values deviating from the physical law, reduce the training cost, and greatly improve the accuracy and reliability of the fault acoustic channel flow velocity prediction. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 FIG. 1 is a flowchart of a deep learning-based ultrasonic flowmeter fault acoustic channel flow velocity prediction method provided in an embodiment; Figure 2 FIG. 2 is a schematic diagram of an ultrasonic flowmeter acoustic channel distribution provided in the embodiment; Figure 3 FIG. 3 is a comparison diagram of the results of predicting the fault acoustic channel flow velocity and the actual test in the embodiment. DETAILED DESCRIPTION
[0019] The specific embodiments of the present application are described below to facilitate the understanding of the present application for those skilled in the art, but it should be clear that the present application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the present application defined and determined by the appended claims, and all the inventions utilizing the concept of the present application are within the scope of protection.
[0020] As Figure 1 shown, in one embodiment of the present application, a deep learning-based ultrasonic flowmeter fault channel flow rate prediction method comprises the following steps: S1, constructing a pre-trained fault channel flow rate prediction model for each channel of the ultrasonic flowmeter; The object to be tested in the present embodiment is an eight-channel ultrasonic flowmeter of a certain unit in a multi-unit parallel operation pump station, with a total of 16 ultrasonic probes; S1-1, obtaining the fault state of each channel of the ultrasonic flowmeter, various factors cause the loss of ultrasonic flowmeter channel signal and other faults during operation, the main factors include multi-form pollutants such as ice, ribbon-shaped pollutants, waterweeds, and gravel blocking the channel signal path, causing the loss of ultrasonic flowmeter channel signal; S1-2, analyzing the characteristic factors affecting the flow rate signal of each channel under the fault state; The characteristic factors affecting the flow rate signal of each channel under the fault state include: the opening and closing state of other units, the current water pump speed, the blocking degree of the guard grid, and the signals of other channels of the ultrasonic flowmeter; wherein the opening and closing state of other units is used as label data, 0 corresponds to the closed state, 1 corresponds to the open state, and contains the state of multiple units; the blocking degree of the guard grid is expressed by percentage, which is calculated according to the blocking degree of the on-site guard grid; the flow rate of the other 7 channels is the average value calculated from the ultrasonic signals of each channel. The flow rate signal influencing factors of the eight-channel ultrasonic flowmeter are comprehensively analyzed and summarized as the characteristic factors of the deep neural network, improving the prediction accuracy.
[0021] S1-3, taking the characteristic factors affecting the flow rate signal of each channel under the fault state as input, and taking the flow rate of the fault channel as output to construct a deep neural network that fuses physical information (the fusion physical information is that the pipe velocity distribution equation is embedded in the loss function of the deep neural network as a soft constraint); Specifically, the residuals of the equations generated by the iterative prediction of flow velocity from a deep neural network are used as the physical term of the loss function, which, together with the data term, constitutes the loss function of the deep neural network. The loss function constrained by the pipe velocity distribution is applied to the neural network training process, ensuring that the training of the neural network follows physical principles. By combining the pipe velocity distribution equation with the deep neural network, physical laws are incorporated into the purely data-driven flow velocity prediction model, forming a physical and data-driven eight-channel ultrasonic flowmeter flow velocity prediction model. Compared to purely data-driven prediction models, this model can effectively remove training and prediction values that deviate from physical laws, reduce training costs, and significantly improve the reliability and accuracy of the model's predictions.
[0022] The expression for calculating the loss function of a deep neural network is as follows:
[0023] in, J For loss function, J d Here, is the loss function for the data item, representing the mean squared error between the predicted and actual values. J p Let be the physical term loss function, representing the mean square error between the predicted and equation values; N d The number of data points used to calculate the loss function for each data item. i For indexing data points, For the first i Predicted flow velocity values for each data point For the first i The actual flow rate value of each data point; n The number of velocity vectors that can be calculated from the acoustic channel signal of the ultrasonic flowmeter. j For velocity vector index, N f The number of data points used to calculate the physical loss function. The velocity value at a point on the center line of the ultrasonic flow meter is calculated jointly from the predicted flow velocity and the flow velocities in other channels. U pde The velocity value is the velocity value in the pipeline velocity distribution equation.
[0024] The flow velocity signals from the eight channels should conform to the pipe velocity distribution law. The channel flow velocity signals are processed into four velocity vectors, which are used to calculate the physical term residual of the loss function in the pipe velocity distribution equation. Vector processing is performed on the predicted velocity signals. Specifically, for signals from two channels at the same height, the intersection point velocity vector is obtained. The eight-channel ultrasonic flowmeter acquires a total of four velocity vectors. These four velocity vectors are distributed along the centerline perpendicular to the water flow direction in the elbow-shaped inlet channel. This vector should satisfy the pipe velocity distribution curve, i.e., exhibit a parabolic shape. The expression for the pipe velocity distribution equation is:
[0025] in, For height is h Flow velocity at that point This indicates the maximum flow velocity at the center of the vertical line of the inlet channel. H The height of the inlet channel, This is an empirical index, related to the Reynolds number. The residual of the pipeline velocity distribution equation is calculated using signals from an eight-channel ultrasonic flow meter and fused with a deep neural network to effectively extract the physical laws governing flow velocity, thus facilitating more accurate flow velocity prediction.
[0026] S1-4. Train the fault channel flow velocity prediction model for different channel fault states; during training, select key parameters of the deep neural network through hyperparameter optimization: Establish the learning function; specify the number of hidden layers, the number of nodes in the multi-perceptron, the dropout rate, the learning rate, and the sample distribution for the optimal activation function; determine the optimal hyperparameter combination using Bayesian probability. The number of hidden layers is greater than or equal to 3, the number of nodes in the multi-perceptron is less than or equal to 256, the dropout rate ranges from 0.2 to 0.5, the learning rate ranges from 0.00001 to 0.1, and the activation function is one of ReLU, Leaky ReLU, or Tanh.
[0027] After training, the optimal parameters of the deep neural network are selected as shown in Table 1.
[0028] Table 1 Parameter name Optimal value Number of hidden layers 3 Number of hidden nodes 128 Dropout rate 0.317 Learning rate 0.00302 Activation function Tanh S1-5. Develop a fault channel velocity prediction model for each channel of the ultrasonic flow meter.
[0029] S2. Locate the faulty channel of the ultrasonic flow meter in the water pump unit under test (in this embodiment, the fourth channel is the faulty channel, and the other channels are normal channels). A model pump station is used as an experimental object in the embodiment, which is a 1:20 scale model of an actual pump station, four vertical axial flow pumps are operated in parallel, and No. 4 water pump unit is taken as an application object. The rated speed of the unit is n=1450r / min, the water pump impeller diameter is D=157.5mm, and the type of the ultrasonic flowmeter is Qwsonic 5317 type multi-sound path ultrasonic flowmeter, which is an eight-channel ultrasonic flowmeter. The schematic diagram of the eight sound channels of the ultrasonic flowmeter is shown in Figure 2 The sound channel signals shown in Figure 2 The sound channel signals shown in
[0030] Table 2 Sound channel Sound channel length (mm) Sound channel angle (°) Sound channel to center distance (mm) 1 419 65.59 92.8 2 418.5 65.67 36.7 3 419 65.79 35.8 4 419 65.91 90.2 5 421 65.12 92.2 6 420 65.18 36.6 7 420 65.3 35.4 8 420 65.41 89.8 S3, calling the fault sound channel flow rate prediction model corresponding to the fourth sound channel; S4, taking the opening and closing state of other units, the current water pump speed, the shielding degree of the blocking grid and the signals of other sound channels of the ultrasonic flowmeter as inputs of the fault sound channel flow rate prediction model, to obtain the flow rate of the fault sound channel.
[0031] In the embodiment, the flow rate of the entire unit can be calculated by combining the flow rate of the fault sound channel with the flow rates of other sound channels after obtaining the flow rate of the fault sound channel, and more accurate flow rate data than the traditional estimation method can be obtained.
[0032] As shown in Figure 3 Compared with the actual test value, the flow rate result obtained by the prediction model provided by the present application is consistent with the experimental value, which proves that the model provided by the embodiment can effectively predict the flow rate of the fault sound channel of the ultrasonic flowmeter.
[0033] In summary, the present application constructs a fault sound channel flow rate prediction model for each sound channel, forms a prediction model for a specific sound channel, improves the prediction accuracy of the flow rate of the fault sound channel, avoids errors caused by different sound channels, and realizes high-precision flow rate prediction.
Claims
1. A deep learning based ultrasonic flow meter fault acoustic channel flow velocity prediction method, characterized in that, The method comprises the following steps: constructing a pre-trained fault channel flow rate prediction model for each channel of an ultrasonic flow meter; locating a fault channel of an ultrasonic flow meter in a water pump unit to be tested; calling a fault channel flow rate prediction model corresponding to the fault channel; taking other unit opening and closing states, current water pump speed, barrier screen shielding degree, and other channel signals of the ultrasonic flow meter as inputs of the fault channel flow rate prediction model to obtain the flow rate of the fault channel.
2. The method of claim 1, wherein the method is based on deep learning. The specific method for constructing the pre-trained fault channel flow rate prediction model for each channel of the ultrasonic flow meter is as follows: obtaining fault states of each channel of the ultrasonic flow meter; analyzing characteristic factors affecting flow rate signals of each channel in the fault state; constructing a deep neural network fusing physical information by taking the characteristic factors affecting the flow rate signals of each channel in the fault state as inputs and taking the flow rate of the fault channel as output; selecting key parameters of the deep neural network through hyperparameter optimization in the training process; forming a fault channel flow rate prediction model for each channel of the ultrasonic flow meter.
3. The deep learning based ultrasonic flow meter fault acoustic path flow rate prediction method of claim 2, wherein, The characteristic factors affecting the flow rate signals of each channel in the fault state include other unit opening and closing states, current water pump speed, barrier screen shielding degree, and other channel signals of the ultrasonic flow meter; wherein the opening and closing states of other units are taken as label data, 0 corresponds to a closed state, 1 corresponds to an open state, and the states of multiple units are included; the barrier screen shielding degree is expressed by percentage and calculated according to the blocking degree of the on-site barrier screen; the flow rate of the other channel is the average value calculated from the ultrasonic signals of each channel.
4. The deep learning based ultrasonic flow meter fault acoustic path flow rate prediction method of claim 2, wherein, The physical information fusion means that the pipe velocity distribution equation is embedded as a soft constraint in the loss function of the deep neural network.
5. The deep learning based ultrasonic flow meter fault acoustic path flow rate prediction method of claim 4, wherein, The calculation expression of the loss function of the deep neural network is as follows: wherein, J is a loss function, J d is a data item loss function, representing the mean squared error of predicted and true values, J p is a physical item loss function, representing the mean squared error of predicted and equation values; N d is the number of data points used to calculate the data item loss function, i is a data point index, is the flow rate predicted value of the i th data point, is the flow rate true value of the i th data point; n is the number of velocity vectors that can be calculated from the ultrasonic flowmeter path signals, j is a velocity vector index, N f is the number of data points used to calculate the physical item loss function, is the velocity value at a point on the centerline of the ultrasonic flowmeter, calculated from the flow rate predicted value and other path flow rates, U pde is the flow rate value of the pipe velocity distribution equation.
6. The deep learning based ultrasonic flow meter fault acoustic path flow rate prediction method of claim 4, wherein, The expression of the pipe velocity distribution equation is as follows: wherein is the height of the inlet flow channel h is the flow rate at the height of is the maximum flow rate at the vertical center of the inlet flow channel H is the height of the inlet flow channel is an empirical exponent related to the Reynolds number.
7. The deep learning based ultrasonic flow meter fault acoustic path flow rate prediction method of claim 2, wherein, The hyperparameter optimization is as follows: establishing a learning function; specifying the number of hidden layers, the number of nodes of the multi-perception machine, the dropout rate, the learning rate, and the sample distribution of the optimal activation function; and determining the optimal hyperparameter combination through Bayesian probability.
8. The deep learning based ultrasonic flow meter fault acoustic path flow rate prediction method of claim 7, wherein, The number of hidden layers is greater than or equal to 3 layers, the number of nodes of the multi-perception machine is less than or equal to 256, the dropout rate ranges from 0.2 to 0.5, the learning rate ranges from 0.00001 to 0.1, and the activation function is one of relu, leaky_relu, and tanh.
9. A computer-readable storage medium storing a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1-8.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-8.
Citation Information
Patent Citations
Ultrasonic flow metering system and method
CN104006854A
Flow rate measurement data fusion method of double-sound channel ultrasonic time difference method
CN110346004A
Ultrasonic water meter data restoration method based on deep learning model
CN112132324A
Method and system for reconstructing ultrasonic vessel velocity field and pressure field based on neural network
CN117198542A
Ultrasonic flowmeter fault diagnosis method based on improved sparrow search algorithm
CN117851903A