Machine learning-based method for calculating hydraulic performance of nodes of channel and pipe combined water delivery system
By constructing a machine learning-based model for predicting the hydraulic performance of nodes in a canal-pipe integrated water conveyance system, and combining deep learning with the Navier-Stokes equations, the problem of long calculation time and high cost of hydraulic performance of nodes in a canal-pipe integrated water conveyance system is solved, achieving efficient and accurate hydraulic performance prediction and system optimization.
Patent Information
- Application Number
- CN202511628886.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-10
AI Technical Summary
Existing methods for calculating the hydraulic performance of nodes in combined canal and pipe water conveyance systems are time-consuming, costly, and have low accuracy. Furthermore, the alternation of pressurized and unpressurized flows at the nodes makes the calculations difficult, and the water flow interface is a two-phase flow interface of water and air, which easily leads to calculation divergence.
A machine learning-based approach was adopted to construct a hydraulic performance prediction model for nodes in a canal-pipe integrated water conveyance system. The model combines a deep learning model (LSTM-Transformer hybrid structure) with Navier-Stokes equation constraints. By constructing a standardized hydraulic performance database, the model was trained to predict the hydraulic performance of nodes and updated online using real-time data.
It achieves high-precision prediction of the hydraulic performance of nodes in the combined canal and pipe water conveyance system, with high computational efficiency, reducing engineering investment and operation and maintenance costs. It can obtain the flow field hydraulic characteristics under different working conditions in real time, adapt to seasonal changes, has self-adaptive capabilities, and improve the efficiency of design decision-making and scheduling management.
Smart Images

Figure CN121503232A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of node hydraulic performance calculation of canal-pipe combined water delivery system, and particularly relates to a node hydraulic performance calculation method of canal-pipe combined water delivery system based on machine learning. BACKGROUND
[0002] Due to the lack of relevant specifications, the current node of canal-pipe combined water delivery system is roughly connected, the node hydraulic performance is poor, and the engineering design is unreasonable. At the same time, since the water flow flows from the canal into the pipe, i.e. the non-pressure flow becomes the pressure flow, the numerical calculation is difficult. The current node hydraulic performance index calculation mainly relies on the hydraulic model test and the numerical calculation method. The hydraulic model test is time-consuming and costly. The numerical calculation model requires high hardware and high cost of commercial software, and the calculation time is long. Moreover, due to the alternation of pressure flow and non-pressure flow at the node, and the water-gas two-phase flow interface, the calculation is difficult and easy to diverge. SUMMARY
[0003] In view of the above problems in the prior art, the node hydraulic performance calculation method of canal-pipe combined water delivery system based on machine learning provided by the application solves the problems of long test time, high cost and low calculation accuracy of the prior art.
[0004] In order to achieve the above-mentioned purposes, the technical scheme adopted by the application is as follows: a node hydraulic performance calculation method of canal-pipe combined water delivery system based on machine learning, comprising: obtaining basic test and numerical simulation data, and collecting node hydraulic performance indexes through hydraulic model test and CFD numerical simulation; constructing a standardized hydraulic performance database according to the node hydraulic performance indexes; constructing a node hydraulic performance prediction model of canal-pipe combined water delivery system; the node hydraulic performance prediction model of canal-pipe combined water delivery system comprises a spatial branch for extracting spatial distribution characteristics of a section, a time branch for extracting time evolution characteristics of a single point and a combined section, a fusion layer for fusing the spatial distribution characteristics and the time evolution characteristics, and a prediction head for predicting the node hydraulic performance according to the fusion layer output; training the node hydraulic performance prediction model of canal-pipe combined water delivery system by using the standardized hydraulic performance database to obtain a trained node hydraulic performance prediction model of canal-pipe combined water delivery system; for a to-be-tested working condition, the trained node hydraulic performance prediction model of canal-pipe combined water delivery system is used to predict the node hydraulic performance.
[0005] The beneficial effects of the present application are: from the aspect of pipe operation, in the channel-pipe combined water conveying system, the flow field hydraulic characteristics under different working conditions and structural parameters can be obtained in real time at the channel-pipe combined connection section, which has the advantages of high calculation efficiency, short time consumption and low investment compared with traditional hydraulic test and numerical calculation. The acquisition of hydraulic characteristic parameter index values under different conditions is reduced from 3-5 days to milliseconds, greatly improving the hydraulic characteristic calculation of the channel-pipe combined water conveying system connection section. From the aspect of construction optimization, there is no special design guide technical regulation for the channel-pipe combined water conveying system connection section at the current stage, the present application can effectively obtain the connection section structural parameter values under different working conditions and conditions, optimize the connection section structural parameters with multi-objective hydraulic characteristic parameters, ensure the safe and efficient operation of the system, reduce the engineering investment, energy consumption and operation and maintenance cost, and greatly improve the efficiency, providing theoretical support and technical support for the structural parameters and operation and maintenance management of the channel-pipe combined water conveying system.
[0006] Further, the spatial branches are sequentially connected with a plurality of CNN convolution layers, and the first Transformer Encoder coding layer is connected with the last CNN convolution layer.
[0007] The beneficial effects of the above further scheme are: by constructing a standardized hydraulic performance database and combining a deep learning model (LSTM-Transformer hybrid structure) with a Navier-Stokes equation constraint, high-precision prediction of the hydraulic performance of the channel-pipe combined water conveying system node is realized. The model prediction result is not only highly consistent with the measured value, but also meets the momentum conservation and energy balance in terms of physical laws, significantly improving the reliability and physical consistency of the prediction. The model is based on a course learning phased training strategy, first uses a large amount of simulation data to establish the basic law, and then uses measured data for fine tuning and correction, and can continuously optimize the model parameters through online incremental learning during system operation, so that it can adapt to seasonal changes and differences in operating conditions for a long time, and has strong self-adaptive ability. Through the standardized database and the trained prediction model, the user can quickly obtain the node hydraulic performance indicators (such as water depth distribution, local water head loss, flow velocity field characteristics, etc.) after inputting the channel geometric parameters and operating conditions, which greatly reduces the calculation time compared with traditional CFD simulation, and improves the efficiency of design decision and scheduling management. The model can combine a multi-objective collaborative evaluation module to consider energy loss and investment cost at the same time, realize parameter optimization design of the channel-pipe combined water conveying system, effectively guide the configuration of channel head, transition section and pipeline parameters, and achieve the comprehensive effect of reducing energy loss, saving investment and improving water conveying efficiency. The model structure and database system of the present application can be extended to different regional or different types of channel-pipe systems, and only need to input regional characteristic parameters to be migrated and applied, which has good portability and secondary development potential.
[0008] Further, the time branch comprises a plurality of sequentially connected LSTM network layers and a second Transformer Encoder encoding layer connected with the last LSTM network layer.
[0009] The above further scheme has the beneficial effect that: by setting a multi-layer LSTM network structure in the time branch, the model can extract flow regularity features at different time scales in layers, which can capture short-term fluctuations and identify long-term evolution trends, thereby comprehensively reflecting the time sequence characteristics of the node hydraulic performance of the pipe-pipe joint system. After the last LSTM layer, the Transformer Encoder is added, which can use the self-attention mechanism to globally model the water flow evolution information over a long time span, effectively overcoming the memory decay problem of traditional LSTM when dealing with long sequence input, making the model more stable when dealing with complex unsteady flow and hysteresis effect. The LSTM layer focuses on local dynamic feature extraction of time series, while the Transformer layer can perform global correlation analysis from the overall time dimension. The series structure of the two realizes the organic combination of local time sequence memory and global correlation, significantly improving the accuracy and robustness of node hydraulic performance prediction. The structure explicitly shows the importance of each time step through the attention weight mechanism, so that the model can not only automatically focus on key periods (such as flow mutation or energy loss peak stage), but also improve the adaptability and interpretability of the model. The LSTM-Transformer hybrid time branch can still maintain smooth and stable output when facing seasonal fluctuations, gate opening and closing and other dynamic boundary changes, ensuring the continuity and engineering usability of the node hydraulic performance prediction results.
[0010] Further, the boundary condition is introduced in each LSTM network layer to correct the cell state update, and the turbulent kinetic energy is connected into the forget gate and the input gate.
[0011] The above further scheme has the beneficial effect that: in view of the multi-phase flow, boundary turbulence and nonlinear energy loss characteristics of the pipe-pipe joint section, the turbulent flow feature gating mechanism and the boundary perception memory unit are introduced, which can automatically identify the turbulent flow features and boundary effects under different working conditions, thereby realizing intelligent modeling and accurate prediction of the hydraulic performance at complex nodes.
[0012] Further, the expression for correcting the cell state update is:
[0013]
[0014] wherein, is the cell state at the current time; is the forget gate state at the current time; is the Hadamard product; is the cell state of the last time step; is the input gate state of the current time step; is the candidate memory of the current time step; is the learnable scalar; is the linear transformation matrix; is the boundary condition encoding vector of the current time step; is the neural network function; is the boundary condition.
[0015] The beneficial effects of the above further scheme are: the introduction of the boundary-aware memory unit can automatically identify the boundary effect under different working conditions, thereby realizing intelligent modeling and accurate prediction of the hydraulic performance at complex nodes; the dynamic correction of the cell state by the boundary condition information ensures that the prediction results of the node region meet the boundary continuity and conservation constraints; the prediction accuracy and stability of the model near the boundary are improved; the coupling modeling of time series learning and spatial physical constraints is realized; different types of boundary influences can be adaptively learned, enhancing the generalization ability and physical interpretability of the model.
[0016] Further, the expression of the turbulent kinetic energy in series with the forget gate and the input gate is:
[0017]
[0018] wherein, is the forget gate state of the current time step; is the activation function; is the weight matrix of the forget gate; is the hidden state of the last time step; is the input vector of the current time step; is the turbulent kinetic energy of the current time step; is the bias term of the forget gate; is the input gate state of the current time step; is the input gate weight matrix; is the bias term of the input gate.
[0019] The beneficial effects of the above further scheme are: strengthening the model's physical perception of turbulence characteristics, directly connecting the turbulent kinetic energy as an input signal into the forget gate and input gate of the LSTM, allowing the model to adaptively adjust the memory update and forgetting degree according to the changes in turbulence intensity under different flow regimes, thereby realizing physical perception modeling of energy exchange and momentum dissipation in the flow field. Turbulent kinetic energy reflects the turbulence intensity inside the fluid. By introducing it into the gating structure, the model learns the time series rules while embedding physical prior information, making the prediction results have high precision, physical rationality and stability. In the node area or pipe connection transition section, the flow regime often presents periodic disturbance and transient turbulence changes. This mechanism can dynamically adjust the "forgetting" speed of the network, avoiding gradient explosion or information loss caused by sudden flow regime, thereby ensuring the model's stable prediction ability under strong nonlinearity. Through the automatic response of the gating structure to different turbulent kinetic energy levels, the model can adaptively distinguish different flow regimes such as laminar flow, weak turbulence and strong turbulence, and can be applied to different pipe systems without retraining, improving the model's generalization ability under multiple working conditions. Turbulent kinetic energy directly affects local head loss and flow velocity distribution. This scheme allows the network to retain more dynamic information in high turbulence intervals, effectively reducing the prediction error of water depth, flow velocity and local energy loss, and improving the reliability of engineering calculations.
[0020] Further, the expression of the fusion layer output is:
[0021] wherein, is the fusion layer output; is a learnable gating weight; is a Hadamard product; is a spatial distribution feature; is a time evolution feature; is an activation function; is a fusion layer weight matrix; is a weighted sum bias term.
[0022] The beneficial effects of the above further scheme are: by introducing a learnable parameter , the fusion layer can automatically adjust the weight ratio of the spatial feature branch and the time feature branch according to different working conditions, thereby strengthening the spatial distribution information in the steady flow state and highlighting the time variation law in the unsteady flow, and realizing the dynamic adaptive fusion of spatial features and time features. Through the linear weighted fusion structure, the information of the spatial branch and the time branch is organically combined, avoiding the information redundancy and feature conflict problems existing in the traditional feature splicing method, so that the model can accurately reflect the instantaneous change of the flow field in the node area and maintain the global understanding of the overall flow state. Under different boundary conditions or flow disturbances, the contribution ratio of the spatial branch and the time branch will dynamically change. The learnable fusion parameters can automatically balance the influence of the two on the output, reduce the dependence of the model on a single feature, and improve the stability and anti-interference ability of the prediction. When there is strong coupling or local reflux in the pipe-pipe joint node, there is a nonlinear correlation between the spatial and time features. The fusion layer weighting mechanism can automatically capture such correlations, thereby effectively reducing the prediction error under the conditions of flow state mutation, uneven energy loss or gas-water interface fluctuation. The linear learnable fusion structure is lightweight, has few parameters and high computational efficiency, and can be directly embedded in the existing LSTM-Transformer framework to realize fast training and engineering deployment.
[0023] Further, the expression of the loss function of the pipe-pipe joint water conveyance system node hydraulic performance prediction model is:
[0024]
[0025]
[0026]
[0027] wherein, is the loss function of the pipe-pipe joint water conveyance system node hydraulic performance prediction model; is the weight of the conventional data loss; is the data fitting loss; is the weight of the physical conservation residual; is the physical conservation residual; is the weight of the boundary condition consistency loss; is the boundary condition consistency loss; is the weight of the model regularization; is the model regularization; is the weight of the optional auxiliary loss; is the optional auxiliary loss, which is a turbulence spectrum matching loss or an energy spectrum loss; is the number of sampling points used to calculate the physical residual; is is the space point where the momentum equation is X the residual in the direction; is the specific spatial point at time ; is the spatial point index; is the time; is the root mean square error; is the upstream predicted water depth; is the upstream measured water depth; is the downstream predicted water depth; is the downstream measured water depth.
[0028] The beneficial effects of the above further solutions are: by introducing the equation residual term in the loss function, the model simultaneously minimizes the prediction error and the deviation of the momentum conservation equation during the training process, thereby automatically following the laws of fluid mechanics while learning data, so that the prediction result has both numerical accuracy and physical rationality. Traditional pure data-driven models are prone to distortion when the training samples are limited or extrapolated to new working conditions, while the present application uses physical equations as regular constraints to effectively reduce overfitting and improve the generalization performance and stability of the model under different channel cross-sections, flow ranges and boundary conditions. When there is a lack of complete measured samples or abnormal data, the momentum conservation residual term provides additional physical guidance, enabling the model to maintain reasonable hydraulic prediction output even in the case of insufficient data, especially in extreme working conditions such as supercritical flow and sudden flow regime. The term in the loss function forces the coupling relationship between the velocity field and the pressure field, so that the prediction result satisfies the fluid conservation law in numerical value, fundamentally avoiding the "false energy gain" or "non-physical flow regime" that may occur in traditional machine learning models. The physical constraint strength can be automatically adjusted during the training phase: strengthening data learning in the early stage of the model and gradually enhancing physical consistency in the later stage, achieving a balance between data-driven and physical guidance, and improving training efficiency and convergence stability. The loss function design makes the model's prediction not just "fit the data", but "meet the physics", theoretically guaranteeing the interpretability of the results and providing a generalizable "physical information fusion modeling" paradigm for water conveyance system modeling.
[0029] Further, the weight values of each loss in the training process are continuously increased to the target values of the loss weights with the iteration process.
[0030] The beneficial effects of the above further scheme are: in the initial stage of model training, the low loss weight makes the model focus on learning data features and quickly establish basic prediction ability; with training iteration, the loss weight of physical constraints, boundary constraints, etc. gradually increases, the model gradually strengthens the following of conservation laws and physical consistency, and realizes the smooth transition from data fitting to physical constraints. If strong physical constraints are applied at the initial stage, it is easy to cause gradient instability or fall into local optimum. The present application adopts a weight gradually increasing mechanism to reduce constraint interference and improve convergence speed in the early stage of training, and to steadily strengthen the constraint in the later stage, thereby realizing the balance of stability and efficiency of training. The dynamic weight scheduling mechanism can adaptively adjust the weight growth rate according to the loss convergence, so that the main error term can be reasonably focused at different stages, preventing a certain sub-loss from dominating the training process, and improving the overall optimization efficiency and convergence stability. By gradually strengthening each loss term (such as data error, physical residual, boundary error, etc.) in stages, the model can form comprehensive optimization characteristics under multiple constraints in the later stage, thereby maintaining high prediction accuracy and robustness under complex flow patterns, variable boundaries and multi-scale disturbances. The visualization of the weight increasing process of each loss can reflect the evolution path of the model from "fitting data" to "following physics", making the training process controllable and interpretable, and providing quantitative basis for subsequent model optimization and deployment. The dynamic weight scheduling mechanism can automatically adjust the growth strategy according to the loss convergence curve, without the need for manual multiple experiments to set hyperparameters, simplifying the model training process and improving the reproducibility.
[0031] Further, the training of the node hydraulic performance prediction model of the conduit combined water delivery system adopts three-stage training: In the first stage, the standardized hydraulic performance database is used for training; In the second stage, measured data is introduced into the standardized hydraulic performance database for training; In the third stage, online incremental update based on real-time data.
[0032] The beneficial effects of the above further scheme are: obtaining a more comprehensive application scenario of the canal-pipe combined water delivery system, increasing the application range and calculation accuracy of the method. The model realizes progressive optimization from "theoretical cognition" to "practical adaptation"; through the three-stage training strategy, the model first establishes the basic physical and statistical law based on the standardized hydraulic performance database, then corrects the local deviation by using the measured data, and finally dynamically updates combined with real-time operation data, so as to realize the global adaptive optimization process from theoretical law to engineering practice. The database training in the first stage enables the model to master the characteristics of a wide range of flow states, the measured correction in the second stage enhances its perception ability to complex working conditions (such as local energy loss and structural error) on site, and the online update in the third stage ensures that the model can continuously respond to changes in operating conditions and boundary disturbances, and maintain long-term high-precision prediction. Through offline learning of the general characteristics of the hydraulic system and online correction of the differences of specific nodes or working conditions, a learning mechanism driven by data and real-time feedback is established, avoiding the problem of performance degradation of the model due to environmental changes. In the online incremental update stage, the model parameters can be updated adaptively according to the real-time monitoring data during system operation, without the need to stop and retrain, ensuring the prediction accuracy and stability of the canal-pipe combined water delivery system in long-term operation, and significantly improving the intelligent operation level of the project. The three-stage strategy breaks down the barriers between numerical simulation data, on-site measured data and operation monitoring data, realizes the collaborative use of multi-source heterogeneous data, and comprehensively improves the sample richness, feature diversity and physical authenticity of the model. Through the phased training framework, the model can be pre-trained on the existing standardized database, fine-tuned by introducing a small amount of measured data in the target area, and finally completed by online learning. Local adaptation greatly shortens the deployment cycle and reduces the cost of secondary modeling. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 The method flowchart of the present application. DETAILED DESCRIPTION
[0034] The specific embodiments of the present application are described below to facilitate understanding of the present application by 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 it is obvious to those skilled in the art that various changes are within the spirit and scope of the present application as defined and determined by the appended claims, and all inventions utilizing the concept of the present application are within the scope of protection.
[0035] As Figure 1 shown, in one embodiment of the present application, a machine learning-based node hydraulic performance calculation method for a canal-pipe combined water delivery system comprises: Obtain basic test and numerical simulation data, and collect node hydraulic performance indicators through hydraulic model test and CFD numerical simulation; According to the node hydraulic performance index, a standardized hydraulic performance database is constructed; A node hydraulic performance prediction model of a canal-pipe combined water conveyance system is constructed, and the node hydraulic performance prediction model of the canal-pipe combined water conveyance system comprises a spatial branch for extracting spatial distribution characteristics of a section, a time branch for extracting time evolution characteristics of a single point and a combined section, a fusion layer for fusing the spatial distribution characteristics and the time evolution characteristics, and a prediction head for performing node hydraulic performance prediction according to an output of the fusion layer; The node hydraulic performance prediction model of the canal-pipe combined water conveyance system is trained by using the standardized hydraulic performance database, and a trained node hydraulic performance prediction model of the canal-pipe combined water conveyance system is obtained. For a to-be-tested working condition, the trained node hydraulic performance prediction model of the canal-pipe combined water conveyance system is used to perform node hydraulic performance prediction.
[0036] In this embodiment, the present application combines fluid mechanics constraints with deep learning algorithms to form a hybrid modeling framework with physical consistency and data-driven characteristics. The technical solution follows the following process: Obtain basic test and numerical simulation data. Through hydraulic model test and CFD numerical simulation, node hydraulic performance indexes (channel flow velocity distribution, channel water depth, local water head loss, turbulent kinetic energy k, etc.) are collected.
[0037] Based on the test data and numerical simulation data, a standardized hydraulic performance database is constructed, and parameterized arrangement, unified symbol and physical quantity definition are performed.
[0038] An improved LSTM-Transformer modeling method is designed: (1) a N-S equation constraint term is introduced into the loss function to ensure that the prediction result conforms to the momentum conservation; (2) turbulent kinetic energy k is introduced as a gate signal in the forgetting gate to realize turbulent flow feature perception; (3) a space-time double-flow structure is constructed, branch 1 processes section spatial distribution, branch 2 processes time sequence characteristics, and joint prediction is performed in the fusion layer; (4) a boundary perception memory unit is proposed, which introduces boundary condition correction memory in the node boundary wall area to improve boundary prediction accuracy.
[0039] A course learning strategy is used for stage-by-stage training. Stage 1: large-scale pre-training of pure simulation data; Stage 2: mixed fine-tuning of simulation and measured data; Stage 3: online incremental update of real-time data. Dynamic time step sampling is used in the training process, and the input sequence length is adaptively adjusted based on the Fr number Fr.
[0040] In this embodiment, branch 1 (spatial branch, Spatial-Transformer): responsible for processing the spatial distribution characteristics on the section (m measurement points), using 1D-CNN to extract local spatial features + Transformer Encoder to capture long-range spatial dependencies.
[0041] Branch 2 (temporal branch, Temporal-LSTM / Transformer hybrid): responsible for processing the time evolution of single points or combined sections, using LSTM to extract time memory, and then capturing cross-time long-range dependencies through the Transformer layer.
[0042] Fusion layer (Fusion-Gate): fuse and into a joint representation H, and learn the importance of the two through the gate α.
[0043] Prediction head (Multi-Task Heads): multiple fully connected or convolutional heads output water depth, velocity, local loss, turbulent kinetic energy, etc.
[0044] The spatial branch comprises a plurality of sequentially connected CNN convolutional layers and a first Transformer Encoder encoding layer connected with the last CNN convolutional layer.
[0045] The temporal branch comprises a plurality of sequentially connected LSTM network layers and a second Transformer Encoder encoding layer connected with the last LSTM network layer.
[0046] In each of the LSTM network layers, the boundary condition is introduced to correct the cell state update, and the turbulent kinetic energy is connected into the forget gate and the input gate.
[0047] In the modeling logic of the present application, the boundary condition (BC) mainly participates in the update process of the cell state, rather than directly affecting the calculation of the input gate or the output gate. Further, the boundary condition information is introduced in each of the LSTM network layers, and the boundary condition is corrected based on the boundary condition when updating the cell state to ensure that the state evolution of the node region satisfies the boundary continuity and momentum conservation constraints. In the improved LSTM unit, the input gate, the forget gate and the output gate mainly control the "amount" and "direction" of information flow; while the cell state update is the time series accumulation and correction of the fluid physical state (such as water depth, velocity, pressure, etc.). The boundary conditions (such as upstream flow, downstream water level or side wall pressure gradient) are used to physically constrain and correct the state update of the node area, that is, the boundary condition term is introduced when calculating the new cell state, so that it meets the boundary continuity and conservation relationship. Therefore, the boundary condition indeed participates in the calculation only in the cell state update stage, and does not directly affect the calculation result of the gating function.
[0048] The expression for correcting the cell state update is:
[0049]
[0050] wherein, is the cell state at the current time; is the forget gate state at the current time; is the Hadamard product; is the cell state at the previous time; is the input gate state at the current time; is the candidate memory at the current time; is the learnable scalar; is the linear transformation matrix; is the boundary condition encoding vector at the current time; is the neural network function; is the boundary condition.
[0051] In this embodiment, different neural network functions are selected according to different variables: (1) fully connected (suitable for scalar boundary such as water level and flow), (2) convolution (suitable for distributed boundary such as wall pressure distribution), and (3) attention enhanced (for complex multi-boundary nodes).
[0052] The expression for connecting the turbulent kinetic energy into the forget gate and the input gate is:
[0053]
[0054] wherein, is the forget gate state at the current time; is the activation function; is the weight matrix of the forget gate; is the hidden state at the previous time; is the input vector at the current time; is the current time step's turbulent kinetic energy; is the bias term for the forget gate; is the current time step's input gate state; is the input gate weight matrix; is the bias term for the input gate.
[0055] The expression of the fusion layer output is:
[0056] wherein, is the fusion layer output; is the learnable gating weight; is the Hadamard product; is the spatial distribution feature; is the time evolution feature; is the activation function; is the fusion layer weight matrix; is the weighted sum bias term.
[0057] In the present embodiment, the physical constraint (Navier-Stokes or depth-averaged Saint-Venant equation) is combined with deep learning (a hybrid structure of LSTM + Transformer): the loss is constrained by a physical residual term, so that the network output not only conforms to the data but also approximately satisfies the conservation law; through the turbulence gate, the boundary memory unit and the space-time double-flow structure, the modeling ability of complex node (pressureless-pressurized, gas-water interface) regions is improved.
[0058] The expression of the loss function of the channel-pipe combined water conveyance system node hydraulic performance prediction model is:
[0059]
[0060]
[0061]
[0062] wherein, is the loss function of the channel-pipe combined water conveyance system node hydraulic performance prediction model; is the weight of the conventional data loss; is the data fitting loss; is the weight of the physical conservation residual; is the physical conservation residual; is the weight of the boundary condition consistency loss; is the boundary condition consistency loss; is the weight of the model regularization; is the model regularization; is the weight of the optional auxiliary loss; is the optional auxiliary loss, which is either a turbulence spectrum matching loss or an energy spectrum loss; is the number of sampling points used to calculate the physical residual, i.e., the "total number of space-time control points" for which the physical constraints are evaluated; is the moment in time, spatial point , residual of the momentum equation in the X direction; is the specific spatial point at the moment in time; is the spatial point index; is the time; is the root mean square error; is the predicted upstream water depth; is the measured upstream water depth; is the predicted downstream water depth; is the measured downstream water depth.
[0063] In this embodiment, the physical weight scheduling (curricular physical regularization) is reduced at the beginning of training (e.g. = 0.01) to ensure that the model first learns the data pattern; then gradually increased to the target value (e.g. 0.1~1.0).
[0064] For example, the scheduling formula is: , is the iteration round; controls the rate of rise.
[0065] In this embodiment, the original input items (each sample) of the node hydraulic performance prediction model of the canal-pipeline combined water conveyance system include: Geometric parameters: channel bottom width, side slope coefficient, transverse coordinates of section position, pipe diameter, pipe installation height, transition section length, connection angle, etc.
[0066] Boundary conditions: upstream flow or upstream water level, downstream hub water level or water outlet pressure.
[0067] Physical parameters: bed roughness, fluid density, dynamic viscosity.
[0068] Observations (measurement point sequence): time series water depth, velocity component (if any), CFD / measured turbulent kinetic energy, local pressure (if measurable) at each measurement point.
[0069] 2) Derived quantities and feature engineering Local Froude number.
[0070] Reynolds number; normalized coordinates.
[0071] Relative elevation, local cross-sectional area, and hydraulic radius.
[0072] 3) Pretreatment steps Missing values: Interpolated using time series interpolation or interpolated based on adjacent cross sections (linear or higher order).
[0073] Denoising: Denoise using filters (median / low-pass) or wavelet denoising; model the measurement noise and add similar noise during training to enhance robustness.
[0074] Normalization: For each feature, calculate the zero mean and unit variance (training set statistics), paying special attention to ensuring that the units of physical quantities are consistent.
[0075] Grid alignment: If the measurement points are irregular, the spatial data is first projected onto a uniform set of m cross-sectional sampling points (e.g., equidistant points m=32) through interpolation.
[0076] Data augmentation: Apply small perturbations (±5%) to the geometry and boundary conditions to generate additional samples to improve generalization. Latin hypercube (LHS) sampling is recommended for generating simulation parameters.
[0077] Model input / output definition (precise) Input X: contains a spatial vector sequence and a time series (if using a sliding window).
[0078] Output Y: The target is the water depth distribution, velocity distribution, local head loss, turbulent kinetic energy prediction, etc. at the next time step or in the next time series.
[0079] During training, the weights of each loss function are continuously increased to the target values of each loss function as the training process iterates.
[0080] The training of the hydraulic performance prediction model for nodes in the canal-pipe combined water conveyance system adopts a three-stage training method: In the first phase, a standardized hydraulic performance database was used for training. In the second stage, measured data are introduced into a standardized hydraulic performance database for training. The third stage involves online incremental updates based on real-time data.
[0081] The course learning strategy employs phased training: The overall goal is to adopt phased training, enabling the model to first learn universal flow laws on large-scale simulation data, then calibrate it with a small amount of high-quality measured data, and finally, after deployment, adapt to real-world changes through online incremental learning while maintaining physical consistency and stability.
[0082] Phase 1: Large-scale pre-training with pure simulation data This allows the model to quickly learn universal hydraulic patterns and typical behaviors of turbulent fields on large-scale, diverse, yet perfectly labeled simulation data.
[0083] Phase 2: Fine-tuning using a mix of simulation and measured data Objective: To correct the domain deviation between simulation and reality using limited measured data, thereby improving accuracy and reliability in real-world scenarios.
[0084] Phase 3: Real-time online incremental data updates Objective: After deployment, the model will continuously learn from new field data to cope with sensor drift, seasonal changes and sudden operating conditions, while avoiding catastrophic amnesia.
Claims
1. A method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning, characterized in that, include: Acquire basic experimental and numerical simulation data, and collect nodal hydraulic performance indicators through hydraulic model tests and CFD numerical simulations; A standardized hydraulic performance database is constructed based on the hydraulic performance indicators of the nodes; A prediction model for the hydraulic performance of nodes in a canal-pipe combined water conveyance system is constructed. The prediction model includes a spatial branch for extracting the spatial distribution features of cross sections, a temporal branch for extracting the temporal evolution features of single points and combined cross sections, a fusion layer for fusing spatial distribution features and temporal evolution features, and a prediction head for predicting the hydraulic performance of nodes based on the output of the fusion layer. A standardized hydraulic performance database was used to train a hydraulic performance prediction model for the nodes of the canal-pipe combined water conveyance system, resulting in a trained hydraulic performance prediction model for the nodes of the canal-pipe combined water conveyance system. For the test conditions, the hydraulic performance of the nodes is predicted using the trained canal-pipe combined water conveyance system node hydraulic performance prediction model.
2. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning as described in claim 1, characterized in that, The spatial branch consists of several sequentially connected CNN convolutional layers and a first Transformer Encoder layer connected to the last CNN convolutional layer.
3. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning as described in claim 1, characterized in that, The time branch includes several sequentially connected LSTM network layers and a second Transformer Encoder layer connected to the last LSTM network layer.
4. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning according to claim 3, characterized in that, Each LSTM network layer introduces boundary conditions to correct the cell state during updates, and turbulent kinetic energy is connected in series between the forget gate and the input gate.
5. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning according to claim 4, characterized in that, The expression that is corrected during cell state updates is: in, This represents the current state of the cell. The current state of the forget gate; For Hadamah accumulation; This represents the cell state at the previous moment; The current state of the input gate; Candidate memories for the current moment; It is a learnable scalar; It is a linear transformation matrix; Encode the boundary conditions vector for the current time step; For neural network functions; These are boundary conditions.
6. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning according to claim 4, characterized in that, The expression for incorporating turbulent kinetic energy into the forget gate and the input gate is as follows: in, The current state of the forget gate; For activation functions; Here is the weight matrix for the forget gate; This is the hidden state from the previous moment; This is the input vector at the current moment; The turbulent kinetic energy at the current moment; For the bias term of the forget gate; The current state of the input gate; The input gate weight matrix; This is the bias term for the input gate.
7. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning according to claim 1, characterized in that, The expression output by the fusion layer is: in, Output for the fusion layer; These are learnable gating weights; For Hadamah accumulation; Spatial distribution characteristics; Features of temporal evolution; For activation functions; This is the weight matrix of the fusion layer; For weighted and biased terms.
8. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning according to claim 1, characterized in that, The expression for the loss function of the node hydraulic performance prediction model of the canal-pipe combined water conveyance system is as follows: in, The loss function is used for predicting the hydraulic performance of nodes in a canal-pipe integrated water conveyance system. Weights for loss in regular data; For data fitting loss; The weights of the physically conserved residuals; The residual is a physical conservation. The weights for the boundary condition consistency loss; This is the loss due to boundary condition consistency. The weights are used for model regularization. To regularize the model; The weights for optional auxiliary losses; The optional auxiliary loss can be either turbulence spectrum matching loss or energy spectrum loss. This is the number of sampling points used to calculate the physical residual; for Time, Space At that point, the momentum equation is X Residuals in direction; for Specific spatial point at a moment ; For spatial point indexing; For time; This is the root mean square error; Predicting water depth upstream; The water depth was measured upstream; Predict water depth downstream; The water depth was measured downstream.
9. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning according to claim 8, characterized in that, During training, the weights of each loss function are continuously increased to the target values of each loss function as the training process iterates.
10. The method for calculating the hydraulic performance of nodes in a canal-pipe combined water conveyance system based on machine learning according to claim 1, characterized in that, The training of the hydraulic performance prediction model for nodes in the canal-pipe combined water conveyance system adopts a three-stage training method: In the first phase, a standardized hydraulic performance database was used for training. In the second stage, measured data are introduced into a standardized hydraulic performance database for training. The third stage involves online incremental updates based on real-time data.
Citation Information
Patent Citations
Multi-model space-time combination flood peak prediction method fusing physical constraints
CN120278021A
Machine learning enhanced water supply network real-time hydraulic modeling method and monitoring system
CN120597743A