Optimization method for open channel ultrasonic flow monitoring based on deep learning with missing data

By optimizing missing data through deep learning, this method employs deep separable convolution, causal convolution, multi-head attention mechanism, long short-term memory network (LSTM), and graph attention network (GAT) to solve the problems of low measurement accuracy and missing flow velocity data in ultrasonic flow measurement technology under complex flow conditions, thus achieving high-precision and reliable open channel flow monitoring.

CN120369056BActive Publication Date: 2026-01-02CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510693703.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2026-01-02
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

Existing ultrasonic flow measurement technology has low measurement accuracy under complex flow conditions, and the measurement data error is large when flow velocity data is missing, resulting in inaccurate open channel flow monitoring.

Method used

This study employs deep learning-based methods, including deep separable convolution, causal convolution, multi-head attention mechanisms, Long Short-Term Memory (LSTM) networks, image attention mechanisms, and Graph Attention Network (GAT). Specifically, it optimizes data completion techniques for open channel ultrasonic flow monitoring under missing data conditions, thereby improving the reliability of flow measurement data under such conditions.

Benefits of technology

It achieves high-precision real-time measurement under complex flow conditions, ensuring the reliability and accuracy of flow measurement data, solving the problem of flow measurement data error when flow velocity data is missing, and guaranteeing the high robustness and accuracy of open channel flow monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120369056B_ABST
    Figure CN120369056B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on deep learning optimization missing data's open channel ultrasonic flow monitoring method, it includes S1 for the channel of lateral water intake for water intake, determine the installation position and optimum spacing of intelligent gate control device and ultrasonic flow measuring device;S2 obtains stratified flow rate and channel water level data using ultrasonic flow measuring device, according to channel water level data, calculate the probe submerged layer number of ultrasonic flow measuring device;S3 judges whether stratified flow rate is equal to probe submerged layer number, if yes, there is no stratified flow rate missing, enter step S5, otherwise stratified flow rate is missing, and enter step S4;S4 determines the position and quantity of stratified flow rate missing, and according to the position and quantity of missing, select deep learning method to complete missing stratified flow rate, then enter step S5;S5 calculates channel bottom flow rate according to side wall coefficient, and calculates channel total flow according to bottom flow rate, probe surface flow rate and probe flow rate of each layer.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of water conservancy channel measurement and control system, and particularly relates to an open channel ultrasonic flow monitoring method based on deep learning optimization of missing data. BACKGROUND

[0002] Open channel flow measurement is a crucial basic technical means in the fields of water conservancy, agricultural irrigation, urban drainage, environmental monitoring, etc. Traditional open channel flow measurement methods mainly rely on weir tank method, flow velocity-area method, float method, etc. These methods generally have defects such as complex installation, high maintenance cost, and large influence of measurement accuracy by environmental factors. With the rapid development of ultrasonic technology, ultrasonic flow measurement gradually becomes an important technical direction of open channel flow monitoring, with the advantages of non-contact, no pressure loss, and high resolution.

[0003] Existing ultrasonic flow measurement technologies mainly include time difference method, Doppler method, and cross-correlation method. Among them, the time difference method calculates the flow velocity by measuring the time difference of ultrasonic propagation in the downstream and upstream, which is suitable for relatively stable laminar flow or slowly varying flow. However, in complex flow conditions (such as vortex, turbulence or severe water surface fluctuation), the sound wave path is easily disturbed, leading to signal attenuation or phase distortion, and the measurement accuracy is significantly reduced.

[0004] Currently, the ultrasonic measurement and control system for complex flow state open channel still faces the following technical bottlenecks: (1) The conventional measurement and control integrated structure is prone to complex phenomena such as gas-liquid two-phase flow (such as air entrainment vortex street) under lateral water outflow conditions, which causes distortion of ultrasonic propagation path, time-varying of signal amplitude and frequency characteristics, and sharp drop of echo signal-to-noise ratio, thereby reducing the flow measurement accuracy. (2) Ultrasonic flow measurement relies on the flow velocity data measured by the transducer. When flow velocity data is missing (foreign matter obstruction, transducer damage, etc.), the flow measurement data error is extremely large or even invalid.

[0005] In summary, developing an ultrasonic measurement and control system that can adapt to complex flow conditions and achieve high-precision real-time measurement and intelligent collaborative control has become a key technical requirement to improve the efficiency of open channel water resource management and ensure the safe operation of water conservancy facilities. SUMMARY

[0006] In view of the above deficiencies in the prior art, the open channel ultrasonic flow monitoring method based on deep learning optimization of missing data provided by the present application can realize the reliability of flow measurement data under data missing conditions through a data filling method.

[0007] In order to achieve the above-mentioned purposes, the technical scheme adopted by the present application is as follows:

[0008] An open channel ultrasonic flow monitoring method based on deep learning optimization of missing data is provided, which includes the following steps:

[0009] S1, for a channel with a lateral water inlet, determining the installation position and optimal distance of an intelligent gate control device and an ultrasonic flow measurement device;

[0010] S2, obtaining stratified flow rate and channel water level data using the ultrasonic flow measurement device, and calculating the probe submerged layer number of the ultrasonic flow measurement device according to the channel water level data;

[0011] S3, determining whether the number of stratified flow rates is equal to the probe submerged layer number, if yes, there is no stratified flow rate missing, and entering step S5, otherwise there is stratified flow rate missing, and entering step S4;

[0012] S4, determining the position and number of stratified flow rate missing, and selecting a deep learning method to complete the missing stratified flow rate according to the missing position and number, and then entering step S5;

[0013] S5, calculating the channel bottom flow rate according to the side wall coefficient, and calculating the total flow rate of the channel according to the bottom flow rate, the probe surface flow rate and the flow rate of each layer of the probe.

[0014] Further, in step S3, the stratified flow rate missing includes ultrasonic flow rate missing one layer with abnormal flow value, ultrasonic flow rate missing multiple layers continuously with abnormal flow value, and flow rate missing completely with flow value missing.

[0015] Further, when the ultrasonic flow rate is missing one layer with an abnormal flow value, the method for completing the stratified flow rate includes:

[0016] A1, according to the collected multi-layer flow rate, marking the missing flow rate:

[0017]

[0018] Wherein, X k (t) is a three-dimensional feature tensor; and are the flow rates of the k-1th layer at t-τ and t time respectively; and are the flow rates of the k+1th layer at t-τ and t time respectively; τ is the time window length; NaN is the missing value; T is the transpose;

[0019] A2, according to the three-dimensional feature tensor X k (t) , using deep separable convolution to extract the spatial correlation features h s of adjacent layers:

[0020] h s =Conv1D(X k [:,t],kernel=[1,0,1])

[0021] where Conv1D() is a convolution layer function, and the convolution kernel kernel = [1, 0, 1]; X k [:, t] is the feature vector of X k (t) at time t.

[0022] A3, the time correlation feature h t is extracted by using a causal convolution layer and a multi-head attention mechanism.

[0023] h t = Attention(CausalConv1D(X k [k-1:k+1, :]))

[0024] where Attention(g) is a multi-head attention mechanism; CausalConv1D(g) is a causal convolution layer; X k [k-1:k+1, :] is the historical data vector of all time series from layer k-1 to layer k+1. k (t)

[0025] A4, the spatial correlation feature h s and the time correlation feature h t are fused as follows:

[0026] H fusion = GELU(W s h s +W t h t )

[0027] where H fusion is the fused feature; W s and W t are learnable weights; and GELU(g) is an activation function.

[0028] A5, the flow rate of the missing layer at time t is calculated according to the fused feature H fusion

[0029]

[0030] where f decoder is a fully connected network; and a is an adaptive mixing coefficient. and are the flow rates of the k-1th layer and the k+1th layer at time t, respectively. is the fused feature at time t, which specifically represents the comprehensive change feature of the water level and the flow rate; and Median(g) represents the median.

[0031] ​​Further, when the ultrasonic flow rate is missing multiple layers, and there is an abnormal flow value, the method for completing the stratified flow rate includes:

[0032] B1, according to the collected multi-layer flow rate, mark the continuous missing multi-layer flow rate:

[0033]

[0034] Where NaN is the missing value of the k~k+m-1 layer flow rate, m≥2; And Respectively, the flow rate of the first layer at t-τ and t time; And Respectively, the flow rate of the k-1 layer at t-τ and t time; And Respectively, the flow rate of the k+m layer at t-τ and t time; And Respectively, the flow rate of the n layer at t-τ and t time, n is the number of layers of the probe; T is the transpose;

[0035] B2, use long short-term memory network LSTM for training and filling, input the flow rate of the k-1 layer and the k+m layer at t-τ and t time, and output the flow rate of the k layer and the k+m-1 layer at t time:

[0036]

[0037] Where, And Respectively, the forward LSTM output at t time and t-1 time; And Respectively, the backward LSTM output at t time and t+1 time; Respectively, the flow rate of the k-1 layer and the k+m layer at t-τ time to t time; b is the output layer parameter; The predicted flow rate of the k layer at t time; The predicted flow rate of the k+m-1 layer at t time;

[0038] B3, according to the predicted flow rate of the k layer and the k+m-1 layer at t time, use graph attention network GAT to iteratively optimize the middle layer:

[0039]

[0040] α ij =soft max(Leaky Re LU(a T [Wv i ||Wv j ]))

[0041] Where, is the flow rate prediction value for the jth layer; a ij is the attention weight; W is the learnable weight matrix; a is the attention parameter vector; v i and v j are the flow rates of the ith layer and the jth layer, respectively; softmax(g) is the normalization processing function; LeakyReLU(g) is the activation function; T is the transpose.

[0042] Further, when the ultrasonic flow rate is completely missing and the flow value is missing, the method for completing the stratified flow rate comprises:

[0043] C1, obtaining historical water levels H ∈ R T′ and historical flow rates X hist ∈ R T′×n , wherein H is a historical water level vector at the same time; X hist is a historical flow rate vector; n is the number of submerged layers of the probe; T' is the time step;

[0044] C2, extracting dynamic features of the water level according to the historical water level:

[0045]

[0046] Δh / Δt = (h t+1 -h t-1 ) / 2, Δ 2 h / Δt 2 = (h t+1 -2h t +h t-1 ) / 2

[0047] wherein, is a water level dynamic feature vector; Δh / Δt is a first-order derivative of the historical water level; Δ 2 h / Δt 2 is a second-order derivative of the historical water level; FFT() is an amplitude function; h t+1 , h t , and h t-1 are water level values at t+1, t, and t-1, respectively; h t-τ:t is a historical water level from t-τ to t;

[0048] C3, extracting dynamic features of the flow rate according to the historical flow rate:

[0049]

[0050] wherein, is a flow rate dynamic feature vector; μ v is a sliding window mean value from t-τ to t; σ vis the standard deviation from t-τ time to t time; max() is the maximum value function; v t-τ:t is the historical flow rate from t-τ time to t time;

[0051] C4, using long short-term memory network LSTM to encode the water level to obtain a dynamically changing water level feature vector

[0052]

[0053] wherein, W h is the weight corresponding to the water level; b h is the parameter vector corresponding to the water level;

[0054] C5, using convolutional neural network CNN to encode the flow rate to obtain a dynamically changing flow rate feature vector

[0055]

[0056] wherein, W c is the weight corresponding to the flow rate; b c is the parameter vector corresponding to the flow rate; Conv1D() is a convolutional layer function;

[0057] C6, after the water level feature vector and the flow rate feature vector are fused, output through the output layer:

[0058]

[0059] wherein, h fuse is the feature vector after the water level feature vector and the flow rate feature vector are fused; W f is the weight corresponding to the fused feature; b f is the parameter vector corresponding to the fused feature; GELU(g) is an activation function; represents a feature concatenation operation; is the predicted flow rate of the i-th layer; and are the weight matrix of the i-th layer in the decoder and the bias term of the i-th layer in the decoder, respectively; n is the probe submerged layer number.

[0060] Further, the expression for calculating the probe submerged layer number of the ultrasonic flow measuring device is:

[0061]

[0062] wherein, n is the probe submerged layer number; h is the channel operating water level; d is the vertical spacing of the ultrasonic flow measuring device.

[0063] Further, step S5 further comprises:

[0064] S51. Calculate the bottom velocity v0 based on the sidewall coefficient:

[0065] v0=ηv1

[0066] Where η is the wall coefficient; v1 is the first layer velocity of the ultrasonic flow measurement device;

[0067] S52. Calculate the surface velocity of the ultrasonic flow measuring device based on the flow velocities of the last two layers:

[0068] v n+δ =(v n -v n-1 )·(hn·d) / d+v n

[0069] Among them, v n+δ For surface flow velocity in ultrasonic flow measurement equipment; v n and v n-1 , respectively, represent the flow velocities at the nth and (n-1)th layers of the ultrasonic flow measurement equipment; n is the number of layers submerged by the probe; h is the operating water level of the channel; d is the vertical spacing of the ultrasonic flow measurement equipment;

[0070] S53. Calculate the total channel flow rate based on the first layer velocity and the surface velocity measured by the ultrasonic flow measuring device:

[0071]

[0072] q n+δ =b·((v) n+δ +v n ) / 2)·(hn·d), q=q0+q i +q n+δ

[0073] Where, q n+δ q is the traffic from the nth layer of the channel to the surface layer; q0 is the traffic from the 1st layer of the channel to the bottom layer; q i v represents the flow from channel layer 1 to layer i; i v i-1 q represents the flow velocities of the i-th and (i-1)-th layers of the ultrasonic flow measurement device, respectively; q represents the total flow rate of the channel.

[0074] Furthermore, the installation positions of the intelligent gate control device and the ultrasonic flow measurement device are in a measurement and control collaborative assembly mode: the intelligent gate control device is located at the water intake, and the ultrasonic flow measurement device is installed behind the intelligent gate control device, and is installed on the rectangular straight section behind the water intake.

[0075] Further, the optimal distance between the intelligent control device and the ultrasonic flow measuring device needs to meet that the water flow of the flow measuring section where the ultrasonic flow measuring device is located is stable, and that there is a rectangular straight section with a distance of at least 4 times the channel width in front of the ultrasonic flow measuring device and a rectangular straight section with a distance of at least 1 times the channel width behind the ultrasonic flow measuring device.

[0076] Further, the ultrasonic flow measuring device is an ultrasonic transducer.

[0077] The beneficial effects of the present application are that: the present scheme can determine whether the collected flow rate is missing by the number of layered flow rates and the number of probe submerged layers, and when there is a missing, the missing data is completed by using a deep learning method, so that the reliability of the flow measuring data can be realized when the flow rate data is missing (foreign matter blocking, transducer damage, etc.); then, on the basis of the completion, the calculation of the total water quantity of the channel can be carried out, so that the problems existing in the actual flow measuring engineering can be completely solved, and the high robustness and accuracy of the flow measuring data can be ensured.

[0078] The present scheme can ensure that the flow state of the ultrasonic flow measuring device is stable by setting the measurement and control cooperation method (4 times the channel width in front and 1 times the channel width in back), the discrete degree of the flow rate data is obviously reduced, and the problem of low flow measuring precision caused by the integration of measurement and control in the current irrigation area can be solved; the tested measurement and control distance can guide the economic and accurate installation of the flow measuring device system in the irrigation area. BRIEF DESCRIPTION OF DRAWINGS

[0079] Figure 1 It is a flowchart of the open channel ultrasonic flow monitoring method based on deep learning optimization of missing data.

[0080] Figure 2 It is an installation schematic diagram of the intelligent control device and the ultrasonic flow measuring device in the channel.

[0081] Figure 3 It is a flowchart of single-layer data missing working condition flow rate filling.

[0082] Figure 4 It is a flowchart of continuous multi-layer data missing working condition data filling.

[0083] Figure 5 It is a flowchart of data completely missing working condition data filling.

[0084] Figure 6 It is a flow rate distribution discrete degree diagram of the ultrasonic flow measuring device and the intelligent control device under different installation distances; (a) to (d) are flow rate distribution discrete degree diagrams under installation distances of 1D, 2D, 3D and 4D respectively.

[0085] 1, upper channel; 2, water distribution port; 3, straight section; 4, ultrasonic flow measuring device; 5, water distribution channel; 6, intelligent control water distribution gate; 7, intelligent control water saving gate. DETAILED DESCRIPTION

[0086] 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, all the inventions utilizing the concept of the present application are within the scope of the present application as long as various changes are obvious within the spirit and scope of the present application defined and determined by the appended claims.

[0087] Reference Figure 1 , Figure 1 The flow chart of the open channel ultrasonic flow monitoring method based on deep learning optimization of missing data is shown; as shown in Figure 1 , the method S includes steps S1-S5.

[0088] In step S1, for the channel with lateral water intake, the installation position and the optimal distance of the intelligent gate control device and the ultrasonic flow measuring device are determined; in the implementation, the ultrasonic flow measuring device is preferably an ultrasonic transducer.

[0089] The channel with lateral water intake is Figure 2 the water distribution channel 5 on the right side of the water distribution port 2, the water distribution channel 5 is separated from the upper channel 1 by the intelligent control water distribution gate 6, and the upstream channel 1 is separated from the downstream channel by the intelligent control water-saving gate 7; in this scheme, a straight section 3 is provided adjacent to the water distribution port 2 in the water distribution channel 5, and the length of the straight section 3 is at least 5 times the channel width. The intelligent gate control device in this scheme specifically refers to Figure 2 the intelligent control water distribution gate 6 in the above.

[0090] As shown in Figure 2 , the installation position of the intelligent gate control device and the ultrasonic flow measuring device in this scheme is a measurement and control cooperative assembly method: the intelligent gate control device is located at the water intake, and the ultrasonic flow measuring device is installed behind the intelligent gate control device and in the rectangular straight section behind the water intake.

[0091] The optimal distance of the intelligent gate control device and the ultrasonic flow measuring device needs to satisfy that the water flow in the flow measuring section where the ultrasonic flow measuring device is located is stable, and there is a rectangular straight section with a distance of at least 4 times the channel width in front of the ultrasonic flow measuring device and a rectangular straight section with a distance of at least 1 times the channel width behind the ultrasonic flow measuring device.

[0092] In step S2, the ultrasonic flow measuring device is used to obtain the stratified flow velocity and channel water level data, and according to the channel water level data, the probe submerged layer number of the ultrasonic flow measuring device is calculated:

[0093]

[0094] wherein n is the probe submerged layer number; h is the channel operating water level; and d is the vertical distance of the ultrasonic flow measuring device.

[0095] The ultrasonic flow measuring device can measure channel stratified flow velocity data {v(1), v(2),..., v(n)} measured by the ultrasonic transducer.

[0096] In step S3, it is judged whether the number of stratified flow velocities is equal to the number of layers of the probe submergence, if yes, there is no stratified flow velocity missing, and step S5 is entered, otherwise, there is stratified flow velocity missing, and step S4 is entered; the stratified flow velocity missing includes ultrasonic flow velocity missing one layer, abnormal flow value; ultrasonic flow velocity continuous missing multiple layers, abnormal flow value; flow velocity is all missing, flow value is missing.

[0097] In step S4, the position and number of stratified flow velocity missing are determined, and a deep learning method is selected according to the position and number of missing stratified flow velocities to complete the missing stratified flow velocities, and then step S5 is entered.

[0098] As shown in FIG. Figure 3 In an embodiment of the present application, when the ultrasonic flow velocity is missing one layer and the abnormal flow value is missing, the method for completing the stratified flow velocity includes:

[0099] A1, according to the collected multi-layer flow velocity, the missing flow velocity is marked:

[0100]

[0101] Wherein, X k (t) is a three-dimensional feature tensor; and are the flow velocities of the k-1 layer at t-τ and t time respectively; and are the flow velocities of the k+1 layer at t-τ and t time respectively; τ is the length of the time window; NaN is the missing value; T is the transpose;

[0102] A2, according to the three-dimensional feature tensor X k (t) , the spatial correlation features h s of the vertically adjacent layers are extracted by using deep separable convolution:

[0103] h s =Conv1D(X k [:,t],kernel=[1,0,1])

[0104] Wherein, Conv1D() is a convolution layer function, and the convolution kernel kernel=[1,0,1]; X k [:,t] is all feature vectors in X k (t) at t time;

[0105] A3, adopt causal convolution layer and multi-head attention mechanism to extract time correlation feature h t :

[0106] h t =Attention(CausalConv1D(X k [k-1:k+1,:]))

[0107] Wherein, Attention(g) is a multi-head attention mechanism; CausalConv1D(g) is a causal convolution layer; X k [k-1:k+1,:] is the historical data vector of all time series from k-1 layer to k+1 layer in X k (t) ;

[0108] A4, the spatial correlation feature h s And the time correlation feature h t Feature fusion is carried out:

[0109] H fusion =GELU(W s h s +W t h t )

[0110] Wherein, H fusion Is the fusion feature; W s And W t Both are learnable weights; GELU(g) is an activation function;

[0111] A5, according to the fusion feature H fusion , the flow velocity of the missing layer at t time is calculated

[0112]

[0113] Wherein, f decoder Is a fully connected network; Alpha is an adaptive mixing coefficient; Respectively, the flow velocity of the k-1 layer and the k+1 layer at t time; Is the fusion feature at t time, which specifically represents the comprehensive change feature of water level and flow velocity; Median(g) represents the median.

[0114] As shown in Figure Figure 4 In one embodiment of the present application, when the ultrasonic flow velocity is missing for multiple layers, and there is an abnormal flow value, the method for completing the layered flow velocity comprises:

[0115] B1, according to the collected multi-layer flow velocity, mark the continuous missing multi-layer flow velocity:

[0116]

[0117] wherein NaN is the missing value of flow rate of the k~k+m-1 layer, m≥2; and are the flow rates of the 1st layer at t-τ and t time respectively; and are the flow rates of the k-1th layer at t-τ and t time respectively; and are the flow rates of the k+mth layer at t-τ and t time respectively; and are the flow rates of the nth layer at t-τ and t time respectively, n is the number of submerged layers of the probe; T is the transpose;

[0118] B2, using long short-term memory network LSTM for training and filling, inputting the flow rates of the k-1th and k+mth layers at t-τ and t time, and outputting the flow rates of the kth and k+m-1th layers at t time:

[0119]

[0120] wherein, and are the forward LSTM outputs at t time and t-1 time respectively; and are the backward LSTM outputs at t time and t+1 time respectively; are the flow rates of the k-1th and k+mth layers at t-τ time to t time; b is the output layer parameter; is the predicted flow rate of the kth layer at t time; is the predicted flow rate of the k+m-1th layer at t time;

[0121] B3, according to the predicted flow rates of the kth and k+m-1th layers at t time, using graph attention network GAT to iteratively optimize the middle layer:

[0122]

[0123] α ij = soft max(Leaky Re LU(a T [Wv i ||Wv j ]))

[0124] wherein, is the flow rate prediction value of the jth layer; α ij is the attention weight; W is a learnable weight matrix; a is an attention parameter vector; v i and v jThe flow rates of the i-th layer and the j-th layer, respectively; softmax(g) is a normalization processing function; LeakyReLU(g) is an activation function; and T is a transpose.

[0125] As shown in Figure 5 the implementation, the method for completing the layered flow rate when the ultrasonic flow rate is all missing and the flow value is missing preferably comprises the following steps:

[0126] C1, obtaining historical water level H∈R T′ and historical flow rate X hist ∈R T′×n , wherein H is a historical water level vector at the same time; X hist is a historical flow rate vector; n is the number of submerged layers of the probe; and T' is a time step;

[0127] C2, extracting the dynamic characteristics of the water level according to the historical water level:

[0128]

[0129] Δh / Δt=(h t+1 -h t-1 ) / 2,Δ 2 h / Δt 2 =(h t+1 -2h t +h t-1 ) / 2

[0130] wherein, is a water level dynamic characteristic vector; Δh / Δt is a first-order derivative of the historical water level; Δ 2 h / Δt 2 is a second-order derivative of the historical water level; FFT() is an amplitude function; h t+1 , h t and h t-1 are water level values at t+1, t and t-1, respectively; h t-τ:t is the historical water level from t-τ to t;

[0131] C3, extracting the dynamic characteristics of the flow rate according to the historical flow rate:

[0132]

[0133] wherein, is a flow rate dynamic characteristic vector; μ v is a sliding window mean value from t-τ to t; σ v is a standard deviation from t-τ to t; max() is a maximum value function; v t-τ:t is the historical flow rate from t-τ to t;

[0134] C4, encode the water level by using the long short-term memory network (LSTM) to obtain a dynamically changing water level feature vector

[0135]

[0136] wherein W h is a weight corresponding to the water level; b h is a parameter vector corresponding to the water level;

[0137] C5, encode the flow rate by using the convolutional neural network (CNN) to obtain a dynamically changing flow rate feature vector

[0138]

[0139] wherein W c is a weight corresponding to the flow rate; b c is a parameter vector corresponding to the flow rate; and Conv1D() is a convolutional layer function;

[0140] C6, after the water level feature vector and the flow rate feature vector are fused, output by the output layer:

[0141]

[0142] wherein h fuse is a feature vector after the water level feature vector and the flow rate feature vector are fused; W f is a weight corresponding to the fused feature; b f is a parameter vector corresponding to the fused feature; and GELU(g) is an activation function; represents a feature splicing operation; is the predicted flow rate of the i-th layer; and are a weight matrix of the i-th layer in the decoder and a bias term of the i-th layer in the decoder, respectively; and n is the number of submerged layers of the probe.

[0143] In step S5, the flow rate at the bottom of the channel is calculated according to the side wall coefficient, and the total flow rate of the channel is calculated according to the bottom flow rate, the surface flow rate of the probe, and the flow rate of each layer of the probe; the detailed implementation steps of step S5 include:

[0144] S51, calculate the bottom flow rate v0 according to the side wall coefficient:

[0145] v0 = ηv1

[0146] wherein η is the side wall coefficient; and v1 is the first layer flow rate of the ultrasonic flow measuring device;

[0147] S52, calculate the surface flow rate of the ultrasonic flow measuring device according to the flow rates of the last two layers of the ultrasonic flow measuring device:

[0148] v n+δ = (v n -v n-1 ) · (h - n · d) / d + v n

[0149] wherein v n+δ is the surface flow velocity of the ultrasonic flow measuring device; v n and v n-1 are the flow velocities of the nth layer and the (n-1)th layer of the ultrasonic flow measuring device respectively; n is the number of layers of the probe submerged; h is the running water level of the channel; and d is the vertical spacing of the ultrasonic flow measuring device;

[0150] S53, calculating the total flow of the channel according to the flow velocity of the first layer and the surface flow velocity of the ultrasonic flow measuring device:

[0151]

[0152] q n+δ = b · ((v n+δ +v n ) / 2) · (h - n · d), q = q0+ q i + q n+δ

[0153] wherein q n+δ is the flow from the nth layer to the surface of the channel; q0 is the flow from the first layer to the bottom layer of the channel; q i is the flow from the first layer to the ith layer of the channel; v i and v i-1 are the flow velocities of the ith layer and the (i-1)th layer of the ultrasonic flow measuring device respectively; and q is the total flow of the channel.

[0154] In the present scheme, after the data completion operation, the flow velocity of the corresponding layer in step S5 is the predicted flow velocity obtained by the completion operation.

[0155] For the optimal spacing between the intelligent gate control device and the ultrasonic flow measuring device, the present scheme gives the corresponding parameters from 1 times the channel width to 4 times the channel width (the channel width is represented by the letter D), which can be referred to in Table 1:

[0156] Table 1 Discrete degree of flow velocity distribution under different installation distances of flow measuring device and gate control device (standard deviation)

[0157] Distance h = 10 cm h = 20 cm h = 30 cm h = 40 cm D 0.22 0.83 1.72 - 2D 0.24 0.35 0.23 1.82 3D 0.17 0.18 0.18 1.00 4D 0.14 0.14 0.15 0.36

[0158] For the four cases, the discrete degree of flow velocity distribution under different installation distances of the ultrasonic flow measuring device and the gate control device is determined respectively, which can be referred to in (a)-(d) of Figure 6 Figure 6 ​It can be seen that when the ultrasonic flow measuring device is located in front of the intelligent gate control device at a distance of 4 times the rectangular flat section width, the flow velocity dispersion degree is the smallest. Therefore, the ultrasonic flow measuring device is selected to be located in front of the intelligent gate control device at a distance of at least 4 times the rectangular flat section width.

[0159] In summary, the tested measurement and control distance can guide the economic and accurate installation of the flow measuring device system in the irrigation area. The data completion model can realize stable and reliable flow measurement data under the condition of data missing, and can solve the problem of inaccurate flow monitoring in actual flow measurement engineering, and ensure the high robustness and accuracy of the flow measurement data.

Claims

1. A method for optimizing open channel ultrasonic flow monitoring based on deep learning for missing data, characterized in that, Including the following steps: S1. For channels with side-entry water intake, determine the installation location and optimal spacing of the intelligent gate control equipment and the ultrasonic flow measurement equipment; S2. Use ultrasonic flow measurement equipment to obtain stratified flow velocity and channel water level data, and calculate the number of submerged layers of the ultrasonic flow measurement equipment probe based on the channel water level data. S3. Determine whether the number of stratified flow velocities is equal to the number of probe submerged layers. If yes, there is no missing stratified flow velocity, proceed to step S5; otherwise, there is a missing stratified flow velocity, proceed to step S4. S4. Determine the location and number of missing layered velocities, and select a deep learning method to fill in the missing layered velocities based on the location and number of missing velocities, and then proceed to step S5. S5. Calculate the bottom velocity of the channel based on the sidewall coefficient, and calculate the total flow rate of the channel based on the bottom velocity, the surface velocity of the probe, and the velocity of each layer of the probe.

2. The open channel ultrasonic flow monitoring method of claim 1, wherein, In step S3, the missing stratified flow velocity includes the absence of one layer of ultrasonic flow velocity with abnormal flow rate value; the absence of multiple layers of continuous ultrasonic flow velocity with abnormal flow rate value; and the absence of all flow velocities with missing flow rate value.

3. The open channel ultrasonic flow monitoring method of claim 2, wherein, When an ultrasonic flow velocity layer is missing or there are abnormal flow rates, methods for completing the layered flow velocities include: A1. Based on the collected multi-layer flow velocities, mark the missing flow velocities: wherein, is the three-dimensional feature tensor; and are the flow rates of the k-1th layer at t-τ and t, respectively; and are the flow rates of the k+1th layer at t-τ and t, respectively; τ is the length of the time window; is the missing value; T is the transpose; A2. According to the three-dimensional feature tensor , the spatial correlation features h of the vertically adjacent layers are extracted using a depth separable convolution s : wherein, is a convolution layer function, the convolution kernel ; is all feature vectors at time t in the sequence A3, adopt causal convolution layer and multi-head attention mechanism to extract time correlation feature h t : wherein, is a multi-headed attention mechanism; is a causal convolutional layer; is is a history data vector of all time series from layer k-1 to layer k+1 in the sequence A4, the spatial correlation feature h s and the time correlation feature h t perform feature fusion: wherein, is a fused feature; and are learnable weights; is a Gaussian error linear unit; A5. The method of claim 1, wherein the fusing feature is based on a fusion of the first feature and the second feature. , calculating the flow rate of the missing layer at time t : wherein, is a fully connected network; is an adaptive mixing coefficient; are flow rates of the k-1th layer and the k+1th layer at time t, respectively; is a fusion feature at time t, which specifically represents a comprehensive change feature of water level and flow rate; denotes taking the median.

4. The open channel ultrasonic flow monitoring method of claim 2, wherein, When ultrasonic flow velocities are missing in multiple layers or there are abnormal flow values, methods for completing the layered flow velocities include: B1. Based on the collected multi-layer flow velocities, mark the continuously missing multi-layer flow velocities: wherein, is a missing value, m ≥ 2; and are the flow rates of the 1st layer at t - τ and t, respectively; and are the flow rates of the k - 1st layer at t - τ and t, respectively; and are the flow rates of the k + mth layer at t - τ and t, respectively; and are the flow rates of the nth layer at t - τ and t, respectively, n is the number of layers of the probe to be submerged; T is transpose. B2. Use a Long Short-Term Memory (LSTM) network for training and filling in the gaps. Input the flow velocities of the (k-1)th and (k+m)th layers at times t-τ and t, and output the flow velocities of the kth and (k+m-1)th layers at time t: in, and The outputs are fed forward to the LSTM at time t and t-1, respectively. and The inverse LSTM outputs at time t and t+1 are respectively; The (k-1)th and (k+m)th layers are respectively in The flow rate from time t to time t; b is the output layer parameter; Let be the predicted flow velocity at time t in the k-th layer; Let be the predicted flow velocity at time t in the (k+m-1)th layer; B3. Based on the predicted flow velocities of the k-th and k+m-1-th layers at time t, the intermediate layers are iteratively optimized using a graph attention network (GAT). wherein, is the flow rate prediction value for the jth layer; is the attention weight; W is a learnable weight matrix; a is an attention parameter vector; and are the flow rates for the ith and jth layers, respectively; is a normalization processing function; is an activation function; T is a transpose.

5. The open channel ultrasonic flow monitoring method of claim 2, wherein, When ultrasonic flow velocities and flow rates are completely missing, methods for completing the stratified flow velocities include: C1, historical water level and historical flow rate wherein is the same time historical water level vector; is the historical flow rate vector; n is the number of probe flooded layers; is the time step; C2. Extract the dynamic characteristics of water levels based on historical water levels: , wherein, is a water level dynamic feature vector; is a first order derivative of historical water level; is a second order derivative of historical water level; is an amplitude function; h t+1 , h t , and h t-1 are water level values at time t+1, time t, and time t-1, respectively; is a historical water level from time t to time t; C3. Extract the dynamic characteristics of the flow velocity based on historical flow velocities: wherein, is a flow rate dynamic feature vector; is is a moving window mean from time instant to time instant t; is is a standard deviation from time instant to time instant t; is a max function; is is a historical flow rate from time instant to time instant t; C4. Use a Long Short-Term Memory (LSTM) network to encode the water level and obtain a dynamically changing water level feature vector. : in, The weight corresponding to the water level; This is the parameter vector corresponding to the water level; C5. A convolutional neural network (CNN) is used to encode the flow velocity, resulting in a dynamically changing flow velocity feature vector. : in, The weights corresponding to the flow rates; This is the parameter vector corresponding to the flow velocity; For convolutional layer functions; C6. After fusing the water level feature vector and the flow velocity feature vector, the output is passed through the output layer: in, The feature vector obtained by fusing the water level feature vector and the flow velocity feature vector; The weights corresponding to the fused features; This is the parameter vector corresponding to the fused features; For activation functions; Indicates feature concatenation operation; The predicted flow rate for the i-th layer; and , respectively, are the weight matrix of the i-th layer in the decoder and the bias term of the i-th layer in the decoder; n is the number of probe submersion layers.

6. The ultrasonic flow monitoring method for open channels according to claim 1, characterized in that, The expression for calculating the number of submerged layers of the probe in an ultrasonic flow measurement device is: Where n is the number of probe submersion layers; h is the channel operating water level; and d is the vertical spacing of the ultrasonic flow measurement equipment.

7. The ultrasonic flow monitoring method for open channels according to any one of claims 2-5, characterized in that, Step S5 further includes: S51. Calculate the bottom velocity based on the sidewall coefficient. : Where η is the wall coefficient; v1 is the first layer velocity of the ultrasonic flow measurement device; S52. Calculate the surface velocity of the ultrasonic flow measuring device based on the flow velocities of the last two layers: where v n+δ is the surface velocity of the ultrasonic flow measurement device; v n and v n-1 are the n-th and n-1-th layer velocities of the ultrasonic flow measurement device, respectively; n is the number of layers of the probe; h is the operating water level of the channel; and d is the vertical spacing of the ultrasonic flow measurement device. S53. Calculate the total channel flow rate based on the first layer velocity and the surface velocity measured by the ultrasonic flow measuring device: , , Where, q n+δ q is the traffic from the nth layer of the channel to the surface layer; q0 is the traffic from the 1st layer of the channel to the bottom layer; q i This refers to the traffic flow from the first layer to the i-th layer of the channel. q represents the flow velocities of the i-th and (i-1)-th layers of the ultrasonic flow measurement device, respectively; q represents the total flow rate of the channel.

8. The ultrasonic flow monitoring method for open channels according to any one of claims 1-6, characterized in that, The installation positions of the intelligent gate control device and the ultrasonic flow measurement device are in a measurement and control collaborative assembly mode: the intelligent gate control device is located at the water intake, and the ultrasonic flow measurement device is installed behind the intelligent gate control device, specifically on the rectangular straight section behind the water intake.

9. The ultrasonic flow monitoring method for open channels according to claim 8, characterized in that, The optimal distance between the intelligent gate control device and the ultrasonic flow measurement device must ensure that the water flow in the flow measurement section where the ultrasonic flow measurement device is located is stable, and that there is a rectangular straight section at least 4 times the channel width in front of the ultrasonic flow measurement device and at least 1 times the channel width behind it.

10. The ultrasonic flow monitoring method for open channels according to any one of claims 1-6 and 9, characterized in that, The ultrasonic flow measurement device is an ultrasonic transducer.

Citation Information

Patent Citations

  • Measuring flume-based detection device and measuring flume flow detection method

    CN112880778A

  • Method and device for calculating flow of isosceles trapezoid open channel

    CN115790728A