Error correction method for intelligent diagnosis of sewer pipe clogging
Patent Information
- Application Number
- CN202311790366.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-12-25
AI Technical Summary
但是,长短期记忆神经网络(LSTM)存在无法提取深层特征的缺陷
[0066]本发明的有益效果是:本发明提出了1DInception和长短期记忆神经网络(LSTM)相结合的数据处理架构,该方法能够弥补各自在时序特征提取和深层空间特征提取方面的缺陷,极大地提高管道淤积智能诊断的性能;最后利用深度神经网络(DNN)对提取特征进行拟合逼近,得到排水管网的淤积高度以及厚度;同时在训练网络模型1DInception-LSTM-DNN时,采用弱形式分析和理论引导损失函数误差修正函数控制网络训练,使得排水管道淤积智能诊断方法对排水管道流速、流量数据序列进行排水管道淤积智能化、精确化诊断。
Smart Images

Figure CN117725836B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent diagnosis technology for functional defects in municipal drainage pipe networks, and relates to an error-corrected intelligent diagnosis method for drainage pipe siltation. Background Technology
[0002] Underground drainage pipes are a crucial component of urban infrastructure. Surveys show that in some Chinese cities, an average of 12 functional defects exist per kilometer of drainage pipes, with siltation accounting for over 80%. Poor drainage caused by pipe siltation has become a significant factor contributing to urban flooding. However, quickly and effectively diagnosing siltation points in drainage pipes remains a challenge for the operation and maintenance of this infrastructure. Currently, the detection of siltation problems relies mainly on regular inspections and emergency response, lacking support from automated and intelligent methods. Therefore, the efficiency of inspecting drainage pipes for siltation is low.
[0003] There are four main existing non-destructive testing methods for pipe siltation: X-ray inspection, ultrasonic testing, infrared thermography, and target detection. The core principle of X-ray inspection is to use a radiation source to emit gamma rays or X-rays into the pipe, and then use film or a detector to collect these rays, thereby generating a cross-sectional image of the pipe layers. This method features high image resolution and accuracy in identifying pipe siltation. However, it still suffers from drawbacks such as low efficiency in siltation diagnosis, limited application conditions, and strong radiation pollution. Target detection typically involves deploying portable closed-circuit television (CCTV) equipment into the pipe to assess siltation by taking photos or videos, but it is only suitable for inspecting pipe sections that are not at full water level. Ultrasonic testing uses high-frequency sound waves to detect siltation inside the pipe, and significant errors can occur when there are large differences in acoustic impedance. Infrared thermography assesses the distribution of siltation by measuring the infrared thermal radiation of objects. This method is susceptible to environmental temperature and noise interference, leading to a decrease in diagnostic accuracy. All of the above-mentioned traditional non-destructive testing methods for pipe siltation suffer from problems such as inability to adapt to various operating conditions, low diagnostic efficiency, and the need for manual operation. There is an urgent need to develop an automated, intelligent, and precise diagnostic model for drainage pipe siltation.
[0004] In recent years, artificial intelligence has developed rapidly, and people have begun to pay attention to the application of deep learning in solving complex engineering problems, including its engineering application in the diagnosis of urban pipeline siltation. Neural networks in deep learning have evolved from multilayer perceptrons; they can learn deep nonlinear networks and fit complex functions. Deep learning has the ability to extract shallow features and recombine them to form deep abstract features, thereby better describing data characteristics. The intelligent path of deep learning in pipeline siltation diagnosis models requires the integration of CCTV technology, which leads to low efficiency and incompatibility with full-water-level conditions. Because pipeline siltation has a complex coupling relationship with inlet and outlet flow velocities and flow rates, pipeline siltation diagnosis models based on feature extraction and result classification require deep feature mining of the original data sequence as input to the algorithm.
[0005] Currently, common neural networks used for feature extraction include Convolutional Neural Networks (CNNs) and Long Short-Term Memory (LSTM) networks. CNNs can effectively extract spatial features and deep semantic information, but they are relatively weak in capturing temporal dependencies in sequence data. In contrast, LSTMs, combined with gating mechanisms to control the flow of information, have advantages in extracting features related to long-term dependencies in sequences. However, LSTMs have the drawback of being unable to extract deep features. Therefore, how to combine the advantages of both CNNs and LSTMs, along with deep neural network (DNN) classification algorithms, to construct a diagnostic model that can both extract sequence features and expand feature depth is one of the key factors in improving the intelligence and accuracy of intelligent diagnostic algorithms for pipeline siltation.
[0006] To address the distortion issue in the output of deep learning algorithms, incorporating physical constraints into the loss function has become a new direction for further improving the robustness of the output results. How to combine fluid-structure interaction physics related to pipe siltation, order reduction of higher-order derivatives of governing equations, and knowledge embedding techniques in the loss function to construct an intelligent diagnostic model for pipe siltation that balances accuracy and robustness is another key factor in current research in this field.
[0007] Therefore, it is necessary to develop an intelligent and precise intelligent diagnostic model for drainage pipe siltation based on weak form analysis and theoretically guided loss function error correction. Summary of the Invention
[0008] To address the aforementioned problems, this invention proposes an intelligent diagnostic method for drainage pipe siltation with error correction. Based on weak form analysis and a theory-guided loss function error correction mechanism, the method improves the accuracy of the output diagnostic results by reducing the order of high-order fluid-structure interaction differential control equations and embedding the physical knowledge of the deep learning loss function.
[0009] The technical solution adopted in this invention is as follows: an intelligent diagnostic model for drainage pipe siltation based on weak formal analysis and theoretically guided loss function error correction, specifically including the following steps:
[0010] Step S1 involves weakly formalizing the differential control equations in the fluid-structure interaction differential control equation set for siltation in the drainage pipe, and combining the mean square error of the loss function with the boundary equations in the fluid-structure interaction differential control equation set to form a loss function guided by theory, thereby correcting the loss function.
[0011] Step S2 involves using full-scale experiments and numerical simulations to perform joint parameter calibration of the fluid-structure interaction differential control equations for siltation in the drainage pipes from Step S1, and obtaining the calibrated weak-form analysis and theoretically guided loss function. The numerical simulation method employs fluid dynamics software and discrete element analysis software for dynamic coupling simulation.
[0012] Step S3: A combined (CBT) convolutional layer is constructed using one-dimensional convolution, batch normalization, and hyperbolic tangent (Tanh) function to extract features from the labeled training sample set in step S2.
[0013] Step S4: Based on the feature extraction of the combined (CBT) convolutional layer and the feature compression of the max pooling layer and the processing method of temporal feature extraction by the Long Short-Term Memory Network (LSTM) in step S3, 1DInception-LSTM is formed.
[0014] Step S5: Based on the 1DInception-LSTM extracted in step S4, the features of the flow velocity and flow rate data sequence of the drainage pipe are extracted. The extracted features are then fitted and approximated by a deep neural network (DNN) to obtain the regression output of the pipe siltation diagnosis result, thus realizing the construction of the 1DInception-LSTM-DNN model.
[0015] Step S6: Based on the regression output of the 1DInception-LSTM-DNN model obtained in Step S5, the error loss is calculated using the weak form analysis and theoretically guided loss function completed in Step S2. The 1DInception-LSTM-DNN is then trained using backpropagation based on the error loss. The resulting intelligent diagnostic model for drainage pipe siltation outputs two indicators: siltation length and siltation height, based on the drainage pipe flow velocity and flow rate data sequence as input.
[0016] Specifically, in step S1, the differential control equations in the fluid-structure interaction differential control equation system for siltation in the drainage pipe are weakly formalized, and a loss function guided by theory is formed by combining the mean square error of the loss function and the boundary equations in the fluid-structure interaction differential control equation system for siltation. The loss function is then corrected, as follows:
[0017] Step S11: The fluid-structure interaction differential governing equations for siltation in drainage pipes are as follows:
[0018]
[0019]
[0020] u(A,t)=v A (t) (3)
[0021] u(B,t)=v B (t) (4)
[0022] Where u is the average flow velocity of water in the drainage pipe along the x-axis; t represents a specific moment in time; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe; g is the gravitational acceleration of the water flow; α represents the angle between the pipe and the standard horizontal plane; v t The turbulent kinetic energy per unit mass of water flow is given by: μ represents the dynamic viscosity coefficient; ρ is the density of the sediment-laden water flow; Q A (t) and Q B (t) represents the instantaneous flow rates at pipe inlet A and outlet B, respectively; η1 and η2 represent the friction coefficients of fluid-structure interaction in non-silting and silting pipe sections, respectively; η3 is the kinetic energy conversion efficiency coefficient of the water flow in the non-silting pipe section; l p This represents the total length of the pipeline from inlet A to outlet B; c Represents the length of the pipe siltation; s c Represents the thickness of the silt buildup in the pipe; v A (t) and v B (t) represents the actual flow velocity at the pipe inlet and outlet at time t, as measured by the flow meter; t1 represents the time required for the water to move from the drainage pipe inlet A to the drainage pipe outlet B; u(A,t) and u(B,t) represent the average flow velocities at the pipe inlet and outlet, respectively, as output by the pipe sedimentation fluid-structure interaction model at time t.
[0023] Step S12: Based on weak form analysis, the control equation formula (1) in the fluid-structure interaction differential control equation set for siltation in drainage pipelines is transformed into a weak form, and the resulting weak form formulas (5)-(9) of the higher-order differential state control equations are shown below:
[0024] I = I1 + I2 + I3 + I4 = 0 (5)
[0025]
[0026]
[0027]
[0028]
[0029] Among them, the four terms in the higher-order differential state control equation (5) are obtained by integral transformations of I1, I2, I3, and I4 respectively; The function is the test function; t represents a specific moment in time; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe; u is the average flow velocity of the water in the drainage pipe along the x-axis; g is the gravitational acceleration of the water flow; α represents the angle between the pipe and the standard horizontal plane; v t denoted as turbulent kinetic energy per unit mass of water flow; μ represents the dynamic viscosity coefficient.
[0030] Step S13: Based on the weak form transformation, the weak form formulas (5)-(9) of the higher-order differential state control equations are obtained. The test function is required. Required test function And the first derivative with respect to x vanishes on the integral boundary, therefore the test function... Defined as formula (10):
[0031]
[0032] Among them, (x c ,t c H represents the center coordinates of the integral subfield; x H t These represent the half-lengths of the accumulated water area along the x and t directions, respectively; t represents a specific moment in time; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe.
[0033] Step S14: Based on the differential control equations (2)-(4) of the fluid-structure interaction in the drainage pipe siltation in step S11 and the weak form of the higher-order differential state control equations (5) in step S12, a penalty term for the control equations is introduced. and Initial condition term penalty term L PIC and boundary condition penalty term MSE PBC This is used to correct the error in the loss function. The specific calculation method is as follows:
[0034]
[0035]
[0036]
[0037]
[0038] Where, N PGE N PIC and N PBCThese represent the number of velocity / flow rate data sequences at the pipe inlet and outlet, the number of boundary conditions, and the number of initial conditions, respectively; u i This represents the instantaneous flow velocity at the same location in the ith time period within the same algorithm training cycle; t represents a specific moment in the time dimension; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe; g is the gravitational acceleration of the water flow; α represents the angle between the pipe and the standard horizontal plane; v t The turbulent kinetic energy per unit mass of water flow is given by: μ represents the dynamic viscosity coefficient; ρ is the density of the sediment-laden water flow; Q A (t) and Q B (t) represents the instantaneous flow rates at pipe inlet A and outlet B, respectively; η1 and η2 represent the friction coefficients of fluid-structure interaction in non-silting and silting pipe sections, respectively; η3 is the kinetic energy conversion efficiency coefficient of the water flow in the non-silting pipe section; l p This represents the total length of the pipeline from inlet A to outlet B; c,i and s c,i These represent the diagnostic results for the length and thickness of pipe siltation at the end of the (i-1)th round of training; v A (t) and v B (t) represent the actual flow velocities at the pipe inlet and outlet at time t, as measured by the flow meter; t1 represents the time required for the water to move from the drain pipe inlet A to the drain pipe outlet B; u i (A,t) and u i (B, t+t1) represent the initial and boundary conditions derived in reverse from the diagnostic results of the current training round of the intelligent algorithm, respectively.
[0039] Step S15: Based on the penalty terms introduced into the governing equations, the boundary condition penalty terms, and the initial condition penalty terms, the domain knowledge-guided loss function error correction formula is obtained, as shown below:
[0040]
[0041] Wherein, λ1, λ2, λ3, λ4, and λ5 represent the weights of each penalty term in the corrected error function. The weights of the penalty terms are manually adjusted based on experience or repeated trials and remain unchanged during training.
[0042] In particular, in step S2, the fluid-structure interaction differential control equations for siltation in the drainage pipe in step S1 are jointly calibrated using full-scale experiments and numerical simulation methods, and the weak form analysis and theoretically guided loss function after calibration are obtained. The numerical simulation method uses fluid dynamics software and discrete element analysis software for dynamic coupling simulation, as detailed below.
[0043] Step S21: The discrete element analysis software is responsible for generating discrete particles and setting boundary conditions, and is linked to the fluid dynamics software via the multiphase flow application interface;
[0044] Step S22: Based on step S21, set the physical properties of the water flow in the siltation drainage pipe and the basic physical properties of the silt particles in the pipe in the fluid dynamics software to obtain the basic calculation unit of fluid-structure interaction for siltation in the drainage pipe.
[0045] Step S23: The basic computational unit for fluid-structure interaction in the drainage pipe siltation in step S22 performs a time-step fluid-structure interaction calculation to obtain flow field data information, and imports the obtained flow field data information into the discrete element analysis software in step S21 to calculate a state equation for particle phase motion displacement within a corresponding time step.
[0046] Step S24: Based on step S23, the fluid dynamics software and discrete element analysis software are combined to realize the fluid-structure interaction function of drainage pipe siltation. The control variable method is used to calibrate the parameters of the control equation set of drainage pipe siltation fluid-structure interaction.
[0047] Step S25: Verify the accuracy of the parameters calibrated by the control variable method in step S24 using full-scale experiments, complete the joint parameter calibration of the fluid-structure interaction control equation set for drainage pipeline siltation, and substitute the parameters obtained from the calibration back into step S15 to obtain the weak form analysis and theoretically guided loss function completed by the calibration.
[0048] Specifically, in step S3, a combined (CBT) convolutional layer is composed of one-dimensional convolution, batch normalization, and hyperbolic tangent (Tanh) function to extract features from the labeled training sample set in step S2, as follows:
[0049] Step S31: Use one-dimensional convolution to process the flow velocity and flow rate data sequences and time series data of the drainage pipes to obtain local features in the sequence data and encode the features into a higher-level representation;
[0050] Step S32: Based on the local features in the sequence data obtained in step S31, batch normalization is performed to make it conform to a normal distribution with a mean of 0 and a variance of 1, thereby reducing the variability of data distribution;
[0051] Step S33: Based on step S32, the features are subjected to nonlinear processing using the hyperbolic tangent function (Tanh);
[0052] Step S34: Proceed with steps S31, S32, and S33 in sequence to obtain the combined (CBT) convolutional layer.
[0053] Specifically, in step S4, the 1DInception-LSTM is composed of the feature extraction from the combined (CBT) convolutional layer and the feature compression from the max pooling layer, as well as the processing method for temporal feature extraction using the Long Short-Term Memory (LSTM) network, as detailed below:
[0054] Step S41: Feature F enters the first path: The combined (CBT) convolutional layer in step S3 is used to first increase the dimensionality of the local features in the sequence data of step S31 to expand the feature space; then the local features in the expanded sequence data enter the parallel combined (CBT) convolutional layer sub-channel composed of two convolutional kernels with sizes of 3 and 5 to realize the extraction of local features in sequence data at different scales. Finally, the fused features are used to obtain feature G, and finally, the temporal features are extracted by the Long Short-Term Memory Neural Network (LSTM).
[0055] Step S42: Feature F enters the second path: The local features in the sequence data from step S31 are updimensionalized using the combined (CBT) convolutional layer from step S3, and then four combined (CBT) convolutional layers with a kernel size of 3 and a max pooling layer are connected sequentially; during the sequential connection process, a ResNet residual skip is introduced, that is, skip connections are used between every two combined (CBT) convolutional layers with a kernel size of 3; then, the max pooling layer is responsible for downsampling the input data to obtain feature H, and then the Long Short-Term Memory (LSTM) neural network extracts the temporal features;
[0056] Step S43: Feature F enters the third path: The combined (CBT) convolutional layer in step S3 is used to increase the dimensionality of the local features in the sequence data of step S31; then, the combined (CBT) convolutional layer in step S3 is used to continue to extract the local features in the sequence data of step S31 to obtain feature I, and finally the long short-term memory neural network (LSTM) is used to extract the time features.
[0057] Step S44: Feature F enters the fourth path: The max pooling layer is used to downsample the input data. Finally, the combined (CBT) convolutional layer in step S3 is used to extract the local features in the sequence data in step S31 to obtain feature J. Then, the long short-term memory neural network (LSTM) is used to extract the time features.
[0058] Step S45: Stack and fuse the features G, H, I, and J obtained from the four paths S41, S42, S43, and S44 according to depth to obtain the output features of 1DInception-LSTM.
[0059] Specifically, based on the features extracted from the flow velocity and flow rate data sequences of the drainage pipe using 1DInception-LSTM in step S4, the extracted features are then fitted and approximated by a deep neural network (DNN) to obtain the regression output of the pipe siltation diagnosis result, thus realizing the construction of the 1DInception-LSTM-DNN model, as detailed below:
[0060] Step S51: Flatten the output features from step S45 so that the flattened output features from step S45 become one-dimensional features.
[0061] Step S52: Input the flattened one-dimensional feature into a deep neural network (DNN) to obtain the network output intelligent diagnosis result of drainage pipe siltation, namely siltation length, siltation height, and the penalty term of the control equation in step S14. Initial condition term penalty term L PIC and boundary condition penalty term MSE PBC Required instantaneous flow velocity u for pipe siltation i The average flow velocity u at the pipe inlet at time t i (A,t), the average flow velocity u at the pipe outlet at time t+t1 i (B,t+t1).
[0062] Specifically, in step S6, based on the regression output of the 1DInception-LSTM-DNN model obtained in step S5, the error loss is calculated using the weak form analysis and theoretically guided loss function completed in step S2. Based on this error loss, the 1DInception-LSTM-DNN is trained using backpropagation. The resulting intelligent diagnostic model for drainage pipe siltation, using the drainage pipe flow velocity and flow rate data sequence as input, outputs two indicators: siltation length and siltation height, as detailed below:
[0063] Step S61: Based on the results of step S32, calculate the loss value according to the weak form analysis and theoretically guided loss function error correction formula completed in step S25;
[0064] Step S62: Based on the results calculated in step S61 and the domain knowledge-guided loss function error correction formula, backpropagation of the 1DInception-LSTM-DNN model network is realized, and the weights in the network are continuously updated.
[0065] Step S63: When the loss value in step S61 reaches its minimum or tends to stabilize, the training of the network can be stopped, and the final intelligent diagnostic model for drainage pipe siltation based on weak form analysis and theoretical guidance for loss function error correction is obtained. The model can then be input with the drainage pipe flow velocity and flow rate data sequence, and output two indicators: siltation length and siltation height.
[0066] The beneficial effects of this invention are as follows: This invention proposes a data processing architecture combining 1DInception and Long Short-Term Memory Neural Network (LSTM). This method can overcome the shortcomings of each in temporal feature extraction and deep spatial feature extraction, greatly improving the performance of intelligent diagnosis of pipeline siltation. Finally, a deep neural network (DNN) is used to fit and approximate the extracted features to obtain the siltation height and thickness of the drainage pipe network. At the same time, when training the network model 1DInception-LSTM-DNN, weak form analysis and theoretically guided loss function error correction function are used to control the network training, enabling the intelligent diagnosis method of drainage pipeline siltation to perform intelligent and accurate diagnosis of drainage pipeline siltation on drainage pipeline flow velocity and flow data sequences. Attached Figure Description
[0067] Figure 1 This diagram illustrates the data processing flow chart of the method of the present invention.
[0068] Figure 2 This diagram illustrates a one-dimensional convolution of the method of the present invention.
[0069] Figure 3 A schematic diagram of the Long Short-Term Memory (LSTM) neural network of the method of the present invention is shown;
[0070] Figure 4 A schematic diagram of the 1D Inception-LSTM method of the present invention is shown;
[0071] Figure 5 A schematic diagram of the deep neural network (DNN) of the method of the present invention is shown;
[0072] Figure 6 A schematic diagram of the 1DInception-LSTM-DNN method of the present invention is shown;
[0073] Figure 7 The diagram illustrates the steps of an intelligent diagnostic method for drainage pipe siltation provided by the present invention, which includes error correction. Detailed Implementation
[0074] like Figure 1 As shown, the present invention provides an intelligent diagnostic method for drainage pipe siltation with error correction, the steps of which are as follows:
[0075] Step 1: Weakly formalize the differential control equations in the differential control equation set of fluid-structure interaction for siltation in drainage pipes, and combine the loss function mean square error with the boundary equations in the differential control equation set of siltation fluid-structure interaction to form a loss function guided by theory, thereby realizing the correction of the loss function.
[0076] Step 2 involves using full-scale experiments and numerical simulations to perform joint parameter calibration of the fluid-structure interaction differential control equations for siltation in the drainage pipes from Step 1. This results in the weak-form analysis and theoretically guided loss function after calibration. The numerical simulation method employs fluid dynamics software combined with discrete element analysis software for dynamic coupling simulation.
[0077] Step 3, use one-dimensional convolution ( Figure 2 The convolutional layer consists of batch normalization and hyperbolic tangent function (Tanh) combined into a combined (CBT) convolutional layer.
[0078] Step four involves feature extraction from the combined (CBT) convolutional layers and feature compression from the max pooling layers, along with the use of a Long Short-Term Memory (LSTM) network, as described in step three. Figure 3 The processing methods for extracting temporal features consist of 1DInception-LSTM ( Figure 4 ).
[0079] Step 5: Based on the 1DInception-LSTM method used in Step 4, extract features from the flow velocity and flow rate data sequences of the drainage pipes. The extracted features are then processed by a deep neural network (DNN). Figure 5 The regression output of the pipeline siltation diagnosis result is obtained by fitting and approximating the model, thus realizing the 1D Inception-LSTM-DNN model. Figure 6 The construction of ).
[0080] Step six: Based on the regression output of the 1DInception-LSTM-DNN model obtained in step five, calculate the error loss using the weak form analysis and theoretically guided loss function completed in step two. Then, train the 1DInception-LSTM-DNN model using backpropagation based on the error loss. The resulting intelligent diagnostic model for drainage pipe siltation outputs two indicators: siltation length and siltation height, based on the drainage pipe flow velocity and flow rate data sequence as input.
[0081] This invention improves the accuracy of intelligent diagnosis of drainage pipe siltation by using a loss function error correction mechanism based on knowledge of pipe siltation and a 1DInception-LSTM-DNN model method. Each module is improved by modifying the source code. The specific steps are as follows:
[0082] S1: Building a 1DInception-LSTM-DNN using the open-source neural network framework, the specific steps are as follows:
[0083] Step S11: Constructing a Combinatorial (CBT) Convolutional Layer: Construct a combinatorial (CBT) convolutional layer using the open-source neural network framework PyTorch. It consists of three modules: one-dimensional convolution (Conv1d function), batch normalization (Batch Normalization1d function), and hyperbolic tangent function (Tanh function).
[0084] Step S12: Build the first path using the open-source neural network framework PyTorch and the combinatorial (CBT) convolutional layer in step S12: First, use a CBT convolutional layer with a kernel size of 1, followed by parallel combinatorial (CBT) convolutional sub-channels composed of convolutional kernel sizes of 3 and 5, and fuse the features of the two channels to obtain feature G. Finally, use the Long Short-Term Memory (LSTM) neural network function in PyTorch to extract the temporal features.
[0085] Step S13: Build the second path using the open-source neural network framework PyTorch and the combinatorial (CBT) convolutional layers from Step S12: Use the combinatorial (CBT) convolutional kernels with a kernel size of 1 from Step S11 to upscale the data sequence features, then connect four combinatorial (CBT) convolutional kernels with a kernel size of 3 and a max-pooling layer sequentially. During this sequential connection, ResNet residual skipping is introduced, meaning that skip connections are used between every two combinatorial (CBT) convolutional layers with a kernel size of 3. Finally, the max-pooling layer (Maxpool function) in PyTorch is used to downsample the input data to obtain features H, and finally, the Long Short-Term Memory (LSTM) neural network function in PyTorch is used to extract the temporal features.
[0086] Step S14: Utilize the open-source neural network framework PyTorch and the Combinatoric Bitwise Transform (CBT) convolutional layer from Step S12 to construct the third path: Upscaling the data sequence using the CBT convolutional layer with a kernel size of 1 from Step S12. Subsequently, the CBT convolutional layer from Step S3 is used to further extract feature information to obtain feature I. Finally, the Long Short-Term Memory (LSTM) neural network function in PyTorch is used to extract the temporal features.
[0087] Step S15: Build the fourth path using the open-source neural network framework PyTorch and the combinatorial (CBT) convolutional layer in step S12: Use a max pooling layer to downsample the input data, and finally use a combinatorial (CBT) convolutional kernel with a kernel size of 3 from step S12 to extract features J from the data. Then, use the Long Short-Term Memory (LSTM) neural network function in PyTorch to extract the temporal features.
[0088] Step S16: Use the torch.cat() function in PyTorch to stack and fuse the features obtained from the four paths according to depth to obtain the output of 1DInception-LSTM.
[0089] Step S17: Use the Linear function in PyTorch to set the hidden and output layers, obtaining a deep neural network (DNN). The Linear function of the output layer is set to have 5 outputs, representing the intelligent diagnosis results of drainage pipe siltation, namely siltation length, siltation height, and the penalty term to be used in the control equation. Initial condition term penalty term L PIC and boundary condition penalty term MSE PBC u in loss calculation i (A,t), u i (B,t+t1) and u i .
[0090] Step S18: Use the Flatten function in PyTorch to flatten the output of 1DInception-LSTM, and then input the flattened result into a deep neural network (DNN) to obtain the 1DInception-LSTM-DNN model.
[0091] S2: Use the open-source neural network framework and the open-source function library SciPy to build a loss function for pipe congestion domain knowledge, specifically the following steps:
[0092] S21: Based on weak form analysis, the control equation (1) in the fluid-structure interaction differential control equation set for siltation in drainage pipelines is transformed into a weak form, and the resulting weak form formulas (5)-(9) of the higher-order differential state control equations are shown below:
[0093] I = I1 + I2 + I3 + I4 = 0 (5)
[0094]
[0095]
[0096]
[0097]
[0098] Among them, the four terms in the higher-order differential state control equation (5) are obtained by integral transformations of I1, I2, I3, and I4, respectively. This is a test function.
[0099] Step S22: Based on the weak form transformation, the governing equations (5)-(9) need to be tested. The test function is required. And the first derivative with respect to x vanishes on the integral boundary, therefore the test function... It can be defined as equation (10):
[0100]
[0101] Step S23: Based on formulas (2)-(4) and (5), a penalty term for the governing equation can be introduced. and Initial condition term penalty term L PIC and boundary condition penalty term MSE PBC These penalty terms are used to correct errors in the loss function of the 1DInception-LSTM-DNN model. The specific calculation method for these penalty terms is as follows:
[0102]
[0103]
[0104]
[0105]
[0106] Where, N PGE N PIC and N PBC These represent the number of velocity / flow rate data sequences at the pipe inlet and outlet, the number of boundary conditions, and the number of initial conditions, respectively; u i The instantaneous flow velocity at the same location in the silted pipe section within the i-th time period of the same algorithm training cycle is represented; t represents a specific moment in the time dimension; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe; g is the gravitational acceleration of the water flow; α represents the angle between the pipe and the standard horizontal plane; v t The turbulent kinetic energy per unit mass of water flow is given by: μ represents the dynamic viscosity coefficient; ρ is the density of the sediment-laden water flow; Q A (t) and Q B (t) represents the instantaneous flow rates at pipe inlet A and outlet B, respectively; η1 and η2 represent the friction coefficients of fluid-structure interaction in non-silting and silting pipe sections, respectively; η3 is the kinetic energy conversion efficiency coefficient of the water flow in the non-silting pipe section; l p This represents the total length of the pipeline from inlet A to outlet B; c,i and s c,i These represent the diagnostic results for the length and thickness of pipe siltation at the end of the (i-1)th round of training; v A (t) and v B (t) represent the actual flow velocities at the pipe inlet and outlet at time t, as measured by the flow meter; t1 represents the time required for the water to move from the drain pipe inlet A to the drain pipe outlet B; ui (A,t) and u i (B, t+t1) represent the initial and boundary conditions derived in reverse from the diagnostic results of the current training round of the intelligent algorithm, respectively.
[0107] Step S24: Based on the above analysis, penalty terms for the control equation, boundary conditions, and initial conditions are introduced into the loss function of the 1DInception-LSTM-DNN model to obtain the domain knowledge-guided loss function error correction formula, as shown below:
[0108]
[0109] Where λ1, λ2, λ3, λ4, and λ5 represent the weights of the penalty terms in the corrected error function. These weights are usually manually adjusted based on experience or repeated trials and remain unchanged during training.
[0110] Step S25: Using full-scale experiments and numerical simulations, perform joint parameter calibration on the fluid-structure interaction differential control equations for siltation in the drainage pipes from Step S1, obtaining the calibration results. L PIC MSE PBC .
[0111] Step S26: Use the MSELoss function in PyTorch and the dblquad function in the open-source library SciPy to... L PIC MSE PBC Code it and adjust λ1, λ2, λ3, λ4, and λ5 according to requirements.
[0112] Step S3: Using drainage pipe flow velocity and flow rate data, and time series data, train the 1DInception-LSTM-DNN to obtain an error-corrected intelligent diagnosis method for drainage pipe siltation. The specific steps are as follows:
[0113] Step S31: Use the MinMaxScaler function from the open-source function library Sklearn to perform Max-Min data normalization on the input drainage pipe flow velocity, flow rate, and time data series.
[0114] Step S32: Input the normalized data into the 1DInception-LSTM-DNN model to obtain the intelligent diagnosis results of drainage pipe siltation, namely siltation length, siltation height, and the penalty term of the control equation in step S14. Initial condition term penalty term L PIC and boundary condition penalty term MSE PBC Required u i u i(A,t), u i (B,t+t1).
[0115] Step S33: Based on the predicted siltation length, siltation height, and u i (A,t), u i (B,t+t1) and u i And the loss function error correction loss function calculation model loss in the field of pipeline siltation knowledge.
[0116] Step S34: Use the backward function and optimizer in PyTorch to implement backpropagation of the 1DInception-LSTM-DNN model network and continuously update the weights in the network.
[0117] Step S35: Training the network until the loss value is minimized or stabilized is stopped. The final result is a smart diagnostic model for drainage pipe siltation based on weak form analysis and theoretical guidance for error correction of the loss function. The model can then be input with the drainage pipe flow velocity and flow rate data sequence and output two indicators: siltation length and siltation height.
Claims
1. An intelligent diagnostic method for drainage pipe siltation with error correction, characterized in that: Specifically, the following steps are included: Step S1: The differential control equations in the differential control equation set of fluid-structure interaction for siltation in drainage pipes are weakly formalized, and the loss function is corrected by combining the mean square error of the loss function and the boundary equations in the differential control equation set of fluid-structure interaction for siltation with the loss function mean square error of the loss function and the boundary equations in the differential control equation set of siltation with the loss function mean square error of ... Step S2 involves using full-scale experiments and numerical simulation to perform joint parameter calibration of the fluid-structure interaction differential control equations for siltation in the drainage pipes from Step S1. This process also yields a labeled training sample set and a weak-form analysis and theoretically guided loss function for the calibration. The numerical simulation method employs fluid dynamics software and discrete element analysis software for dynamic coupling simulation. Step S3: A combined convolutional layer consisting of one-dimensional convolution, batch normalization, and hyperbolic tangent function is used to extract features from the labeled training sample set in step S2. Step S4: Based on the feature extraction of the combined convolutional layer and the feature compression of the max pooling layer in step S3, as well as the processing method of temporal feature extraction by the long short-term memory network, 1DInception-LSTM is formed. Step S5: Based on the 1DInception-LSTM in step S4, extract the features of the flow velocity and flow rate data sequence of the drainage pipe. The extracted features are then fitted and approximated by a deep neural network to obtain the regression output of the pipe siltation diagnosis result, thus realizing the construction of the 1DInception-LSTM-DNN model. Step S6: Based on the regression output of the 1DInception-LSTM-DNN model obtained in Step S5, calculate the error loss using the weak form analysis and theoretically guided loss function completed in Step S2. Based on the error loss, train the 1DInception-LSTM-DNN using the backpropagation method to obtain the intelligent diagnostic model for drainage pipe siltation. Input the intelligent diagnostic model for drainage pipe siltation with the drainage pipe flow velocity and flow rate data sequence, and output two indicators: siltation length and siltation height. In step S1, the specific steps are as follows: Step S11: The fluid-structure interaction differential governing equations for siltation in drainage pipes are as follows: (1); (2); (3); (4); in, The average flow velocity of water in the drainage pipe along the x-axis; t represents a specific moment in time; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe; This is the acceleration due to gravity in the water flow; Indicates the angle between the pipe and the standard horizontal plane; The turbulent kinetic energy per unit mass of water flow; Indicates the dynamic viscosity coefficient; The density of the sediment-laden water flow; and These represent the instantaneous flow rates at pipe inlet A and outlet B, respectively. and These represent the friction coefficients of fluid-structure interaction in non-silting and silting pipe sections, respectively. The coefficient of kinetic energy conversion efficiency of water flow in non-silted pipe sections; This represents the total length of the pipeline from inlet A to outlet B. This represents the length of the pipe siltation. This represents the thickness of the silt buildup in the pipe; and These represent the actual flow velocities at the pipe inlet and outlet at time t, as measured by the flow meter. This indicates the time required for water to travel from the inlet A of the drainage pipe to the outlet B of the drainage pipe; and These represent the average flow velocities at the pipe inlet and outlet, respectively, output by the pipe sedimentation fluid-structure interaction model at time t. Step S12: Based on weak form analysis, the control equation formula (1) in the fluid-structure interaction differential control equation set for siltation in drainage pipelines is transformed into a weak form, and the resulting weak form formulas (5)-(9) of the higher-order differential state control equations are shown below: (5); (6); (7); (8); (9); Among them, the four terms in the higher-order differential state control equation (5) are respectively derived from... , , , Obtained by integral transform; This is the test function; t represents a specific moment in time; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe. The average flow velocity of water in the drainage pipe along the x-axis; This is the acceleration due to gravity in the water flow; Indicates the angle between the pipe and the standard horizontal plane; The turbulent kinetic energy per unit mass of water flow; Indicates the dynamic viscosity coefficient; Step S13: Based on the weak form transformation, the weak form formulas (5)-(9) of the higher-order differential state control equations are obtained. These formulas require a test function. The test function is required. And about The first derivative vanishes at the boundary of the integral, therefore the test function Defined as formula (10): (10); in, These are the center coordinates of the integral subfield; , They are the accumulated water areas along and The half-length in the direction; t represents a specific moment in the time dimension; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe; Step S14: Based on the differential control equations (2)-(4) of the fluid-structure interaction in the drainage pipe siltation in step S11 and the weak form of the higher-order differential state control equation (5) in step S12, a penalty term for the control equation is introduced. and Initial condition term and penalty term and boundary condition penalty terms This is used to correct the error in the loss function. The specific calculation method is as follows: (11); (12); (13); (14); in, , and These represent the number of velocity / flow data sequences at the pipe inlet and outlet, the number of boundary conditions, and the number of initial conditions, respectively. The instantaneous flow velocity at the same location in the silted pipe segment within the i-th time period of the same algorithm training cycle is represented; t represents a certain moment in the time dimension; the x-axis represents a coordinate axis parallel to the direction of water flow in the drainage pipe. This is the acceleration due to gravity in the water flow; Indicates the angle between the pipe and the standard horizontal plane; The turbulent kinetic energy per unit mass of water flow; Indicates the dynamic viscosity coefficient; The density of the sediment-laden water flow; and These represent the instantaneous flow rates at pipe inlet A and outlet B, respectively. and Let represent the friction coefficients of fluid-structure interaction in non-silting and silting pipe sections, respectively; The coefficient of kinetic energy conversion efficiency of water flow in non-silted pipe sections; This represents the total length of the pipeline from inlet A to outlet B. and These represent the diagnostic results for the length and thickness of the pipe siltation at the end of the (i-1)th round of training; and These represent the actual flow velocities at the pipe inlet and outlet at time t, as measured by the flow meter. This indicates the time required for water to travel from the inlet A of the drainage pipe to the outlet B of the drainage pipe; and These represent the initial and boundary conditions derived from the diagnostic results of the current training round of the intelligent algorithm, respectively. Step S15: Based on the penalty terms introduced into the governing equations, the boundary condition penalty terms, and the initial condition penalty terms, the domain knowledge-guided loss function error correction formula is obtained, as shown below: (15); in, , , , , This represents the weights of each penalty term in the corrected error function. These penalty term weights are manually adjusted based on experience or repeated trials and remain unchanged during training.
2. The intelligent diagnostic method for drainage pipe siltation with error correction according to claim 1, characterized in that: In step S2, the specific steps are as follows: Step S21: The discrete element analysis software is responsible for generating discrete particles and setting boundary conditions, and is linked to the fluid dynamics software via the multiphase flow application interface; Step S22: Based on step S21, set the physical properties of the water flow in the siltation drainage pipe and the basic physical properties of the silt particles in the pipe in the fluid dynamics software to obtain the basic calculation unit of fluid-structure interaction for siltation in the drainage pipe. Step S23: The basic computational unit for fluid-structure interaction in the drainage pipe siltation in step S22 performs a time-step fluid-structure interaction calculation to obtain flow field data information, and imports the obtained flow field data information into the discrete element analysis software in step S21 to calculate a state equation for particle phase motion displacement within a corresponding time step. Step S24: Based on step S23, the fluid dynamics software and discrete element analysis software are combined to realize the fluid-structure interaction function of drainage pipe siltation. The control variable method is used to calibrate the parameters of the control equation set of drainage pipe siltation fluid-structure interaction. Step S25: Verify the accuracy of the parameters calibrated by the control variable method in step S24 using full-scale experiments, complete the joint parameter calibration of the fluid-structure interaction control equation set for drainage pipeline siltation, and substitute the parameters obtained from the calibration back into step S15 to obtain the weak form analysis and theoretically guided loss function completed by the calibration.
3. The intelligent diagnostic method for drainage pipe siltation with error correction according to claim 2, characterized in that: In step S3, the specific steps are as follows: Step S31: Use one-dimensional convolution to process the flow velocity and flow rate data sequences and time series data of the drainage pipes to obtain local features in the sequence data and encode the features into a higher-level representation; Step S32: Based on the local features in the sequence data obtained in step S31, batch normalization is performed to make it conform to a normal distribution with a mean of 0 and a variance of 1, thereby reducing the variability of data distribution; Step S33: Based on step S32, the local features are subjected to nonlinear processing using the hyperbolic tangent function; Step S34: Proceed with steps S31, S32, and S33 in sequence to obtain the combined convolutional layer.
4. The intelligent diagnostic method for drainage pipe siltation with error correction according to claim 3, characterized in that: In step S4, the specific steps are as follows: Step S41: Feature F enters the first path: The combined convolutional layer in step S3 is used to first increase the dimensionality of the local features in the sequence data of step S31 to expand the feature space; then the local features in the expanded sequence data enter the sub-channel of the parallel combined convolutional layer composed of two convolutional kernels with sizes of 3 and 5, to realize the extraction of local features in sequence data at different scales, and finally the fused features are used to obtain feature G, and finally the temporal features are extracted by the long short-term memory neural network; Step S42: Feature F enters the second path: The combined convolutional layer in step S3 is used to upscale the local features in the sequence data of step S31, and then four combined convolutional layers with a kernel size of 3 and a max pooling layer are connected sequentially; during the sequential connection process, a ResNet residual skip is introduced, that is, skip connections are used between every two combined convolutional layers with a kernel size of 3; then, the max pooling layer is responsible for downsampling the input data to obtain feature H, and then the long short-term memory neural network extracts the temporal features; Step S43: Feature F enters the third path: The combined convolutional layer in step S3 is used to perform dimensionality upscaling of local features in the sequence data of step S31; Subsequently, the combined convolutional layer in step S3 is used to continue extracting local features from the sequence data in step S31 to obtain feature I, and finally the long short-term memory neural network is used to extract the temporal features. Step S44: Feature F enters the fourth path: The max pooling layer is used to downsample the input data. Finally, the combined convolutional layer in step S3 is used to extract the local features in the sequence data in step S31 to obtain feature J. Then, the long short-term memory neural network extracts the time features. Step S45: Stack and fuse the features G, H, I, and J obtained from the four paths S41, S42, S43, and S44 according to depth to obtain the output features of 1DInception-LSTM.
5. The intelligent diagnostic method for drainage pipe siltation with error correction according to claim 4, characterized in that: In step S5, the specific steps are as follows: Step S51: Flatten the output features from step S45 so that the flattened output features from step S45 become one-dimensional features. Step S52: Input the flattened one-dimensional features into the deep neural network to obtain the network output intelligent diagnosis results of drainage pipe siltation, namely siltation length, siltation height, and the penalty term of the control equation in step S14. Initial condition term and penalty term and boundary condition penalty terms Required instantaneous flow rate for pipe siltation Average flow velocity at pipe inlet at time t Average flow velocity at pipe outlet at time t+t1 .
6. The intelligent diagnostic method for drainage pipe siltation with error correction according to claim 5, characterized in that: In step S6, the specific steps are as follows: Step S61: Based on the results of step S32, calculate the loss value according to the weak form analysis and theoretically guided loss function error correction formula completed in step S25; Step S62: Based on the results calculated in step S61 and the domain knowledge-guided loss function error correction formula, backpropagation of the 1DInception-LSTM-DNN model network is realized, and the weights in the network are continuously updated. Step S63: When the loss value in step S61 reaches its minimum or tends to stabilize, the training of the network can be stopped, and the final intelligent diagnostic model for drainage pipe siltation based on weak form analysis and theoretical guidance for loss function error correction is obtained. The model can then be input with the drainage pipe flow velocity and flow rate data sequence, and output two indicators: siltation length and siltation height.