An ultrasonic flowmeter fault acoustic channel flow rate prediction method based on deep learning
By constructing a deep learning model that incorporates the pipeline velocity distribution equation, the problem of inaccurate flow velocity prediction by ultrasonic flowmeters under faulty acoustic channels was solved, achieving high-precision flow velocity prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing ultrasonic flow meters are prone to malfunction when encountering factors such as ice fragments and pollutants, leading to inaccurate flow calculations.
A deep learning-based ultrasonic flow meter fault channel velocity prediction model was constructed. The pipeline velocity distribution equation was used as a soft constraint. The model was trained by a deep neural network and the velocity was 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 velocity prediction, reduces training and prediction errors that deviate from physical laws, and enhances the measurement accuracy of the flow meter.
Smart Images

Figure CN120911285B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of flow measurement, and particularly relates 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 amount, 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. The normal operation and accuracy of the ultrasonic flowmeter 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, thereby causing the flowmeter to fail or the flow calculation to be inaccurate. SUMMARY
[0004] In view of the above problems 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:
[0006] constructing a pre-trained fault sound channel flow rate prediction model for each sound channel of the ultrasonic flowmeter;
[0007] locating the fault sound channel of the ultrasonic flowmeter in the water pump unit to be measured;
[0008] calling the fault sound channel flow rate prediction model corresponding to the fault sound channel;
[0009] 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.
[0010] 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:
[0011] obtaining the fault state of each sound channel of the ultrasonic flowmeter;
[0012] analyzing the characteristic factors affecting the flow rate signals of each sound channel under the fault state;
[0013] By taking the characteristic factors affecting the flow velocity signal of each channel under fault conditions as input and the flow velocity of the faulty channel as output, a deep neural network that integrates physical information is constructed.
[0014] During training, key parameters of the deep neural network are selected through hyperparameter optimization.
[0015] A fault channel velocity prediction model was developed for each channel of the ultrasonic flow meter.
[0016] 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;
[0017] 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.
[0018] 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.
[0019] Furthermore, the expression for calculating the loss function of a deep neural network is:
[0020]
[0021] 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 pdeis the flow velocity value of the pipe velocity distribution equation.
[0022] Further, the expression of the pipe velocity distribution equation is:
[0023]
[0024] wherein, is the flow velocity at the height of h represents the maximum flow velocity at the vertical center of the inlet flow channel, H is the height of the inlet flow channel, is an empirical index related to the Reynolds number.
[0025] Further, the hyperparameter optimization is specifically:
[0026] Establish a learning function; specify 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; determine the optimal hyperparameter combination through Bayesian probability.
[0027] Further, 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.
[0028] Secondly, the application also provides a computer readable storage medium, which stores 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.
[0029] Finally, the application also 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.
[0030] The application has the following beneficial effects:
[0031] By combining the pipe velocity equation with the deep neural network, the physical law is added to the data-driven flow velocity prediction model, a physical and data-driven ultrasonic flowmeter flow velocity prediction model is formed, the training and prediction values deviating from the physical law can be effectively removed, the training cost is reduced, and the accuracy and reliability of the fault acoustic channel flow velocity prediction are greatly improved. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 A flowchart of a deep learning-based ultrasonic flowmeter fault acoustic channel flow velocity prediction method provided by the embodiment is shown in the figure;
[0033] Figure 2 An ultrasonic flowmeter sound channel distribution diagram provided for an embodiment;
[0034] Figure 3 A comparison diagram of the results of the fault sound channel flow rate prediction in the embodiment and the actual test. DETAILED DESCRIPTION
[0035] 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.
[0036] As shown in Figure 1 An ultrasonic flowmeter fault sound channel flow rate prediction method based on deep learning, comprising the following steps:
[0037] S1, constructing a pre-trained fault sound channel flow rate prediction model for each sound channel of the ultrasonic flowmeter;
[0038] The object to be tested in the embodiment is an eight-sound channel ultrasonic flowmeter of a certain unit in a multi-unit parallel operation pump station, and there are a total of 16 ultrasonic probes;
[0039] S1-1, obtaining the fault state of each sound channel of the ultrasonic flowmeter, and there are various factors causing the loss of ultrasonic flowmeter sound channel signal and other faults during operation, the main factors including multi-form pollutants such as ice, ribbon-shaped pollutants, waterweeds, and gravel blocking the sound channel signal path, causing the loss of ultrasonic flowmeter sound channel signal;
[0040] S1-2, analyzing the characteristic factors affecting the flow rate signal of each sound channel under the fault state;
[0041] The characteristic factors affecting the flow rate signal of each sound channel under the fault state include the on-off state of other units, the current water pump speed, the blocking degree of the guard grid, and the signals of other sound channels of the ultrasonic flowmeter; wherein the on-off state of other units is taken as label data, 0 corresponds to the closed state, 1 corresponds to the open state, and the state of multiple units is included; 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 seven sound channels is the average value calculated from the ultrasonic signals of each sound channel. The flow rate signal influencing factors of the eight-sound channel ultrasonic flowmeter are comprehensively analyzed and summarized as the characteristic factors of the deep neural network, improving the prediction accuracy.
[0042] S1-3. Using the characteristic factors affecting the flow velocity signal of each channel under fault conditions as input, and the flow velocity of the fault channel as output, construct a deep neural network that integrates physical information (the integrated physical information is: embedding the pipeline velocity distribution equation as a soft constraint into the loss function of the deep neural network).
[0043] 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.
[0044] The expression for calculating the loss function of a deep neural network is as follows:
[0045]
[0046] 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.
[0047] 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:
[0048]
[0049] 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.
[0050] 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:
[0051] 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.
[0052] After training, the optimal parameters of the deep neural network are selected as shown in Table 1.
[0053] Table 1
[0054] 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
[0055] S1-5. Develop a fault channel velocity prediction model for each channel of the ultrasonic flow meter.
[0056] 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).
[0057] 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-path ultrasonic flowmeter, which is an eight-channel ultrasonic flowmeter. The schematic diagram of the eight channels of the ultrasonic flowmeter is shown in Figure 2 The two sound channel signals shown in Figure 2 The two sound channel signals shown in
[0058] Table 2
[0059] 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
[0060] S3, calling the fault sound channel flow rate prediction model corresponding to the fourth sound channel;
[0061] 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.
[0062] 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.
[0063] 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.
[0064] 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 method for predicting the flow velocity in a faulty ultrasonic flow meter channel based on deep learning, characterized in that, include: Construct a pre-trained model for predicting the flow velocity of faulty channels in each channel of an ultrasonic flow meter. Locate the faulty sound channel of the ultrasonic flow meter in the water pump unit under test; Call the faulty audio channel flow rate prediction model corresponding to the faulty audio channel. The flow velocity of the faulty channel is obtained by using the on / off status of other units, the current pump speed, the degree of obstruction of the barrier, and the other channel signals of the ultrasonic flow meter as inputs to the flow velocity prediction model of the faulty channel. 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 of the barrier, and the other channel signals of the ultrasonic flow meter. The specific methods for constructing pre-trained fault channel flow velocity prediction models for each channel of an ultrasonic flowmeter include: Obtain the fault status of each channel of the ultrasonic flow meter; Analyze the characteristic factors affecting the flow velocity signals of each channel under fault conditions; By taking the characteristic factors affecting the flow velocity signal of each channel under fault conditions as input and the flow velocity of the faulty channel as output, a deep neural network that integrates physical information is constructed. The fusion of physical information refers to embedding the pipeline velocity distribution equation as a soft constraint into the loss function of a deep neural network. The expression for calculating the loss function of a deep neural network is: 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; The expression for the velocity distribution equation in the pipe is: 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, It is an empirical index and is related to the Reynolds number.
2. The method for predicting the flow velocity in a faulty ultrasonic flow meter channel based on deep learning according to claim 1, characterized in that, Specific methods for constructing pre-trained fault channel velocity prediction models for each channel of an ultrasonic flowmeter also include: During training, key parameters of the deep neural network are selected through hyperparameter optimization. A fault channel velocity prediction model was developed for each channel of the ultrasonic flow meter.
3. The method for predicting the flow velocity in a faulty ultrasonic flow meter channel based on deep learning according to claim 2, characterized in that, 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.
4. The method for predicting the flow velocity in a faulty ultrasonic flow meter channel based on deep learning according to claim 2, characterized in that, The hyperparameter optimization specifically involves: 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 of the optimal activation function; determine the optimal combination of hyperparameters using Bayesian probability.
5. The method for predicting the flow velocity in a faulty ultrasonic flow meter channel based on deep learning according to claim 4, characterized in that, 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 is between 0.2 and 0.5, the learning rate is between 0.00001 and 0.1, and the activation function is one of ReLU, leaky_ReLU, and tanh.
6. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1 to 5.
7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Ultrasonic flowmeter fault diagnosis method based on improved sparrow search algorithm
CN117851903A
Flow metering system condition-based monitoring and failure to predictive mode
US20200166398A1