Method and system for predicting stress of buried natural gas pipeline under landslide action
By constructing a three-dimensional simulation model of landslide-soil-bimetallic composite pipeline and optimizing the BP neural network, the problem of high accuracy and high efficiency in pipeline stress prediction under landslide action was solved, and rapid and reliable prediction and safety assessment of multi-factor coupling effects were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN KETE TESTING TECH CO LTD
- Filing Date
- 2026-01-15
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies cannot simultaneously achieve both high accuracy and high efficiency in rapidly and reliably predicting the maximum stress of buried natural gas bimetallic composite pipelines under landslide conditions, especially in handling multi-factor coupling relationships.
By constructing a three-dimensional numerical simulation model of landslide body-stabilized soil-bimetallic composite pipeline, and combining BP neural network and artificial fish swarm algorithm (AFSA), the weights and thresholds of BP neural network are optimized to form AFSA-BP prediction model, achieving high-precision mapping of the coupling effect of multiple factors.
It achieves high-precision prediction of the maximum stress on pipelines under landslide action, reduces computational costs, improves prediction efficiency, and can quickly adapt to the needs of different engineering scenarios, providing safety assessment and protection measures recommendations.
Smart Images

Figure CN121543355B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of safety technology for oil and gas pipeline engineering, specifically relating to a method and system for predicting stress in buried natural gas pipelines under landslide conditions. Background Technology
[0002] Bimetallic composite pipes, with their combination of excellent corrosion resistance in the inner layer and high-strength support in the outer layer, are increasingly widely used in long-distance pipeline projects. However, natural gas pipeline networks often need to traverse mountainous and hilly areas with complex geological conditions. When landslides occur, the sliding soil exerts complex pushing, bending, and tensile forces on the pipelines buried within, leading to a sharp deterioration in the pipeline's stress state. This makes it highly susceptible to leaks, ruptures, or even explosions when the stress exceeds the material's yield strength.
[0003] Therefore, accurately predicting the stress state of buried pipelines under landslide conditions, especially the more complex bimetallic composite pipelines, is a prerequisite for pipeline safety assessment, early warning, and the development of scientific protection measures. Currently, this mainly relies on the following two technical approaches:
[0004] The first category is the direct calculation method based on numerical simulation of finite element theory. This method uses general-purpose finite element software such as ANSYS and ABAQUS to establish a mechanical model of the interaction between the pipeline and the soil. By setting the material constitutive model, contact relationship and boundary conditions, the pipeline stress under specific working conditions can be directly solved.
[0005] Chinese patent CN115345038A discloses an analytical method for the stress sensitivity of pipelines under landslide conditions. This method uses pipe elements (such as PIPE20) to simulate the pipeline and defines three-directional soil spring elements (such as COMBIN39) to simplify the simulation of pipe-soil interaction, thereby analyzing the influence of different parameters on pipeline stress. This method has a clear mechanical principle and can reflect the trend of stress influence by parameter changes to a certain extent. However, this method and similar technologies have inherent defects: First, the pipe element-soil spring model used to improve computational efficiency is a highly simplified representation of the interaction of a three-dimensional continuum, which cannot accurately characterize the interlayer mechanical behavior of bimetallic composite pipelines, the large deformation and sliding contact between the landslide body and stable soil, and the complex local stress concentration effects of the pipeline, resulting in limited absolute accuracy of its prediction results. Second, even with such a simplified model, landslides involve the complex coupling of more than ten influencing factors, including geological conditions (such as landslide scale and soil parameters), pipeline properties (such as bimetallic layer size, material, and burial depth), and operating conditions (such as internal pressure). Changes in any single factor require readjustment of model parameters and recalculation. When conducting sensitivity analysis or rapid safety assessments for multiple operating conditions and multiple parameter combinations, the computational cost remains high and the efficiency is low, making it difficult to meet the needs of engineering sites for rapid or real-time prediction of massive operating conditions.
[0006] The second category is early warning and assessment methods based on monitoring data or empirical formulas. To avoid the computational burden of direct simulation, some research has shifted to early warning models based on monitoring data and macroeconomic indicators.
[0007] Chinese patent application CN117892537A discloses a method for establishing a three-dimensional early warning model for buried oil and gas pipelines crossing landslides. This method constructs a comprehensive early warning level by simultaneously establishing three sub-models: mechanical early warning, landslide displacement early warning, and groundwater level early warning. The advantage of this type of method lies in its ability to integrate multi-source information for risk classification. However, its core "mechanical early warning sub-model" heavily relies on the accurate input of the actual additional stress on the pipeline, but the method itself does not provide an efficient and high-precision means to obtain this crucial stress data. Essentially, it is a post-assessment and decision-making framework, rather than a stress prediction model. For pipelines that have not yet deployed dense monitoring equipment or are still in the design phase, it cannot provide the required stress prediction values.
[0008] In addition, some researchers have attempted to use traditional machine learning algorithms such as backpropagation (BP) neural networks to build a mapping model from influencing factors to pipeline stress by training on historical data or limited simulation data, aiming to achieve rapid prediction. Once the model is trained, this method offers extremely fast prediction speeds. However, traditional BP neural networks exhibit significant limitations when dealing with complex engineering problems involving multiple factors, strong nonlinearity, and high-dimensional coupling, as discussed in this invention.
[0009] First, its training process uses the backpropagation algorithm, which is prone to getting stuck in local optima, causing the model to converge to a suboptimal state and limiting prediction accuracy. Second, the setting of the initial weights and thresholds of the network has a huge impact on the final performance, and the lack of an effective global optimization mechanism results in insufficient model stability and generalization ability. Third, the model performance is highly dependent on the quality and scale of the training data. Summary of the Invention
[0010] The purpose of this invention is to provide a method and system for predicting the stress of buried natural gas pipelines under landslide conditions. This invention solves the technical problems in the prior art, which cannot simultaneously meet the requirements of high accuracy and high efficiency, and is difficult to accurately handle the coupling relationship of multiple factors, thus making it impossible to quickly and reliably predict the maximum stress of buried natural gas bimetallic composite pipelines under landslide conditions.
[0011] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0012] A method for predicting stress in buried natural gas pipelines under landslide conditions includes the following steps:
[0013] Simulation data acquisition steps: A three-dimensional numerical simulation model of landslide body-stable soil-bimetallic composite pipe is established using finite element analysis software. The maximum stress value of the bimetallic composite pipe under different parameter combinations of multiple influencing factors is calculated to form a simulation dataset.
[0014] Data preprocessing steps: The simulation dataset is cleaned and normalized, and then divided into training and testing sets;
[0015] Model construction and optimization steps: Construct a BP neural network model with the multiple influencing factors as input and the maximum stress value as output, and use the artificial fish swarm algorithm to optimize the weights and thresholds of the BP neural network model to obtain the optimized AFSA-BP prediction model;
[0016] Model testing and application steps: The accuracy of the AFSA-BP prediction model is tested using the test set, and the model that meets the accuracy requirements is used to predict the maximum stress of buried natural gas bimetallic composite pipelines under landslide action.
[0017] Furthermore, the simulation data acquisition step specifically includes:
[0018] In the geometry module of the finite element analysis software, a prism model of the landslide body, a cuboid model of the stable soil body, and a concentric cylinder model of the bimetallic composite pipe are constructed respectively.
[0019] In the material properties module, elastic modulus, Poisson's ratio and yield strength parameters are defined for the inner and outer linings of the bimetallic composite pipe. Internal friction angle, cohesion, elastic modulus and Poisson's ratio parameters based on the Mohr-Coulomb constitutive model are defined for the landslide body and stable soil body. The elastic modulus and cohesion parameters of the soil body are reduced according to the rainfall duration.
[0020] In the mesh generation module, a structured mesh is used for the pipeline body area, an unstructured mesh is used for the contact area between the pipeline and the soil, and a coarsened mesh is used for the far end area of the soil.
[0021] In the load and constraint module, the inner and outer linings of the pipe are set to bonded contact, and the outer wall of the pipe is set to frictional contact with the soil. Fixed constraints are applied to the bottom of the stable soil, and normal constraints are applied to the sides of the stable soil. Displacement loads along the sliding direction are applied to the landslide. Transport pressure loads are applied to the inner wall of the pipe. Gravity loads are applied to all components.
[0022] The parametric scanning function is used to calculate the working conditions of the multiple influencing factors under different level combinations in batches, and the maximum stress value of the bimetallic composite pipe is extracted.
[0023] Furthermore, the multiple influencing factors include landslide geometric parameters, soil mechanical parameters, pipeline structural parameters, pipeline material parameters, and operational parameters;
[0024] Specifically, these include: landslide length, landslide height, landslide width, internal friction angle of the landslide soil, cohesion of the landslide soil, internal friction angle of the stable soil, cohesion of the stable soil, rainfall duration, pipeline burial depth, pipeline inner diameter, elastic modulus of the inner lining material, Poisson's ratio of the inner lining material, yield strength of the inner lining material, elastic modulus of the outer lining material, Poisson's ratio of the outer lining material, yield strength of the outer lining material, inner lining wall thickness, outer lining wall thickness, and transport pressure.
[0025] Furthermore, the data preprocessing steps specifically include:
[0026] The simulation dataset was cleaned using the 3σ criterion to remove outliers;
[0027] The cleaned data is randomly divided into training and testing sets according to a preset ratio;
[0028] The Min-Max normalization method is used to map the values of each influencing factor in the training set and the test set to the interval [0,1].
[0029] Furthermore, in the model construction and optimization steps, the BP neural network model includes an input layer, at least one hidden layer, and an output layer;
[0030] The number of nodes in the input layer is consistent with the number of influencing factors;
[0031] The activation function of the hidden layer is the ReLU function;
[0032] The output layer has one node, and its activation function is a linear function.
[0033] Furthermore, the optimization of the weights and thresholds of the BP neural network model using the artificial fish swarm algorithm specifically includes:
[0034] All values and thresholds of the BP neural network model are encoded sequentially to form the position vector of the artificial fish;
[0035] Set the parameters of the artificial fish swarm algorithm, including swarm size, field of view, step size, crowding factor, and maximum number of iterations;
[0036] In each iteration, each artificial fish sequentially performs swarming behavior, tail-chasing behavior, or foraging behavior, and updates its position vector according to the behavior rules;
[0037] A bulletin board is set up to record the historical best position vector and its corresponding fitness value. The fitness value is the reciprocal of the prediction error of the BP neural network model, and the bulletin board is updated after each iteration.
[0038] When the maximum number of iterations is reached or the preset convergence condition is met, the optimal position vector recorded on the bulletin board is decoded and assigned as the optimized weights and thresholds to the BP neural network model.
[0039] Furthermore, the behavioral rules for artificial fish are as follows:
[0040] Grouping behavior: If the fitness value of the center position of a companion in the current artificial fish's field of vision is better than its own fitness value, and the center position is not crowded, then move one step towards the center position;
[0041] Tail-chasing behavior: If the fitness value of the partner with the best fitness in the current artificial fish's field of vision is better than its own fitness value, and the partner's position is not crowded, then move one step towards the best partner's position;
[0042] Foraging behavior: If none of the above behaviors are performed, a new location is randomly selected within the field of vision. If the fitness value is better, the location is moved to that location; otherwise, the location is moved one step randomly within the field of vision.
[0043] Furthermore, in the model testing and application steps, the root mean square error, mean absolute error, and coefficient of determination of the AFSA-BP prediction model are calculated using the test set, and it is determined whether they simultaneously satisfy the following conditions: root mean square error not exceeding 4.0 MPa, mean absolute error not exceeding 2.5 MPa, and coefficient of determination not less than 0.94.
[0044] Furthermore, following the model testing and application steps, the following steps are also included:
[0045] Safety assessment steps: Compare the predicted maximum stress value with the yield strength of the inner and outer lining materials of the bimetallic composite pipe to assess the pipe safety risk;
[0046] Decision output steps: If the predicted maximum stress value exceeds the safety threshold, output the corresponding pipeline protection measures recommendation.
[0047] This invention also discloses a stress prediction system for buried natural gas pipelines under landslide action, used to implement the stress prediction method for buried natural gas pipelines under landslide action as described above, including:
[0048] The simulation calculation module is used to execute the simulation data acquisition step and generate a simulation dataset;
[0049] The data processing module is used to perform the data preprocessing steps and output the processed training set and test set;
[0050] The model training module is used to execute the model building and optimization steps and train the AFSA-BP prediction model.
[0051] The prediction and evaluation module is used to perform the model testing and application steps, and to perform the security evaluation and decision output steps.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] This invention addresses the technical problems of traditional BP neural networks, which are prone to getting trapped in local optima and lacking generalization ability when solving multi-factor, highly nonlinear problems. It introduces the Artificial Fish Swarm Algorithm (AFSA) to globally optimize the weights and thresholds of the neural network. This enables the constructed AFSA-BP prediction model to more fully learn the complex mechanical laws revealed by high-fidelity finite element simulations, thereby achieving high-precision mapping of the maximum stress in the pipeline under the coupled effects of up to nineteen factors, including landslide geometry, soil parameters, pipeline properties, and operating conditions. The model has been validated on a test set, and its key indicators, such as root mean square error, mean absolute error, and coefficient of determination, all meet or exceed the preset stringent accuracy standards, effectively overcoming the technical bottlenecks of insufficient accuracy and reliability in existing prediction methods.
[0054] This invention addresses different engineering scenarios (such as changes in landslide scale, soil properties, or pipeline specifications) without requiring the redesign of complex simulation models. It simplifies the process by adjusting input parameters and executing pre-defined data generation and model training procedures to quickly obtain a specialized prediction model applicable to the new scenario. While maintaining the reliability of predictions based on physical mechanisms, it avoids the time-consuming direct finite element calculations required for each new condition, providing an efficient tool for rapid on-site safety assessment and decision-making.
[0055] This invention compares the predicted results with the yield strength of the inner and outer lining materials of the bimetallic composite pipe, achieving a quantitative assessment of pipeline safety risks. When the predicted stress exceeds the safety threshold, it can output graded and targeted pipeline protection measures based on the specific degree of exceedance and operating conditions. This elevates the technical solution from a purely predictive method to a systematic solution integrating stress analysis, safety assessment, and decision support, enhancing the practical value of the technology. Attached Figure Description
[0056] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.
[0057] Figure 1 This is the overall flowchart of the present invention.
[0058] Figure 2 This is an overall flowchart of the method described in this invention. Detailed Implementation
[0059] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0060] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0061] Example 1: See Figure 1 and Figure 2 This embodiment discloses a method for predicting the stress of buried natural gas pipelines under landslide conditions, which specifically includes the following steps:
[0062] Simulation data acquisition based on ANSYS Workbench (executed by the simulation calculation module):
[0063] A detailed three-dimensional numerical simulation model of a landslide-stabilized soil-bimetallic composite pipeline was constructed using ANSYS Workbench software. The maximum stress on the pipeline under various working conditions was calculated, and a simulation dataset was generated. The specific process is as follows:
[0064] Geometric modeling: The landslide body is modeled as a prism, and the inclination angle of the sliding surface is set according to geological survey data (usually 15-35°). The dimensional parameters are: landslide length 50-200m, landslide height 5-25m, and landslide width 30-100m. A "cubic-shaped buffer zone" is constructed around the landslide body, extending 50-80m beyond the landslide boundary in the horizontal direction and covering 30-50m below the pipe burial depth (0.8-3.0m) in the vertical direction, simulating the constraint effect of the semi-infinite domain soil on the landslide body. The bimetallic composite pipe adopts a "concentric cylinder" structure, with an inner lining thickness of 5-15mm, an outer lining thickness of 8-20mm, and an inner diameter of 300-800mm. The pipe axis is perpendicular to the landslide sliding direction (most unfavorable stress condition).
[0065] Material properties and unit definition: Based on GB50251-2015 "Code for Design of Gas Pipeline Engineering" and indoor geotechnical test data, the material parameters and unit types of each structural component are defined.
[0066] The bimetallic composite pipe uses SOLID186 three-dimensional solid elements for both its inner and outer linings. The inner lining material has an elastic modulus of 190-210 GPa, a Poisson's ratio of 0.28-0.32, and a yield strength of 190-345 MPa. The outer lining material has an elastic modulus of 205-225 GPa, a Poisson's ratio of 0.27-0.31, and a yield strength of 460-555 MPa. The landslide soil and stable soil are... The SOLID185 solid element was used, based on the Mohr-Coulomb elastoplastic constitutive model. The internal friction angle of the landslide soil was 20-40°, the cohesion was 5-50 kPa, the elastic modulus was 3-20 MPa, and the Poisson's ratio was 0.25-0.40. The internal friction angle of the stable soil was 25-45°, the cohesion was 10-60 kPa, the elastic modulus was 5-25 MPa, and the Poisson's ratio was 0.22-0.38.
[0067] In addition, the effect of rainfall duration (0-72h) on soil parameters was achieved by adjusting the saturation: for every 12h increase in rainfall duration, the elastic modulus of landslide soil and stabilized soil decreased by 8%-12% and the cohesion decreased by 5%-8%. This parameter adjustment was based on indoor rainfall infiltration test data.
[0068] It should be noted that the specific value ranges of landslide geometric parameters, soil mechanical parameters, pipeline parameters, and operational parameters mentioned in the embodiments are determined comprehensively based on the "GB 50251-2015 Code for Design of Gas Pipeline Engineering", the "Code for Investigation of Landslide Prevention Engineering" (DZ / T 0218-2020), and statistical data from surveys of typical pipeline projects in high-risk geological disaster areas in Southwest and Northwest my country. This aims to cover the vast majority of common working conditions in engineering projects. The reduction relationship of rainfall on soil parameters is based on the effective stress principle in saturated-unsaturated soil mechanics and is an empirical correction coefficient obtained through indoor standard geotechnical tests (such as direct shear tests and triaxial tests) combined with rainfall infiltration simulation. Those skilled in the art can calibrate and apply the reduction coefficient based on the soil sample test results of specific sites.
[0069] Mesh Generation: A "zonal refinement" strategy is adopted to balance computational accuracy and efficiency. The pipe body uses a structured mesh, with element size not exceeding 1 / 10 of the pipe's inner diameter (e.g., 50mm for a 500mm inner diameter) to ensure computational accuracy in areas with large stress gradients (e.g., the top and bottom of the pipe). The pipe-soil contact area uses an unstructured mesh, with element size not exceeding 1 / 5 of the pipe's inner diameter (e.g., 100mm for a 500mm inner diameter) to capture the stress transfer effect at the contact interface. The soil distal to the contact (away from the landslide and pipe area) uses a coarse unstructured mesh with element size 3-5 times that of the contact area (e.g., 300-500mm) to reduce computational load. Mesh quality control indicators are: element distortion rate not exceeding 0.85, and AspectRatio not exceeding 5, to ensure solution convergence.
[0070] Contact and Boundary Condition Settings: For contact relationships, the inner-outer lining interface of the bimetallic composite pipe adopts "Bonded" contact, simulating interlayer metallurgical bonding (no relative sliding); the pipe-soil interface adopts "Frictional" contact, with the friction coefficient determined according to the soil type (0.30-0.40 for sand, 0.20-0.25 for clay). For boundary constraints, a "FixedSupport" constraint (all degrees of freedom are 0) is applied to the bottom of the stable soil; a "NormalConstraint" constraint is applied to the sides of the stable soil (limiting only displacement perpendicular to the sides); a "DisplacementLoad" displacement load is applied to the landslide, with a displacement magnitude of 0.1-1.0m along the sliding direction (matching the landslide scale). Regarding load application, a "PressureLoad" delivery pressure (0.5-12MPa, uniformly applied to the inner wall of the lining) is applied inside the pipe; a "GravityLoad" gravity load (9.81m / s², vertically downward) is applied to all components.
[0071] Multi-condition calculation and data extraction: Orthogonal experimental design is used to reduce the number of conditions (ensuring coverage of all level combinations of the 19 factors). Each factor is set with 4-5 levels (e.g., landslide length 50 / 100 / 150 / 200m, delivery pressure 2 / 4 / 6 / 8 / 12MPa), generating a total of 800-1200 conditions. The maximum stress in the pipeline under each condition is extracted using the "ParameterSet" function of ANSYS Mechanical, forming a simulation dataset of "19 input factors - 1 output (maximum stress)".
[0072] Initial prediction model construction of BP neural network:
[0073] The core of combining BP neural networks with ANSYS Workbench is "simulation data-driven modeling." Workbench generates the training / test data needed for the neural network, and the trained network replaces repetitive simulations. The overall approach is as follows: After generating the original dataset in ANSYS Workbench, before dividing it into training and test sets, all 19 input parameters are uniformly normalized to the [0,1] interval using Min-Max normalization, before being used for BP neural network training. This is to eliminate differences in parameter magnitude and prevent the model from being biased towards higher-order parameters during training. A detailed analysis follows:
[0074] Dataset preprocessing (performed by the data processing module):
[0075] Data cleaning: Outliers are removed using the "3σ criterion", which means that when data exceeds the mean ± 3 times the standard deviation, it is identified as an outlier and removed to ensure the integrity of the dataset;
[0076] Data partitioning: Randomly partition the data into a training set (for model training and parameter optimization) and a test set (for model performance validation) in a ratio of 7:3 or 8:2.
[0077] Data normalization: Min-Max normalization is used to eliminate dimensional differences. The formula is: ;
[0078] in : Normalized data (mapped to the [0,1] interval); : Raw input data (the original value of a certain influencing factor); The minimum value of this influencing factor in the dataset;
[0079] The maximum value of this influencing factor in the dataset is normalized to the [0,1] interval to avoid model training bias towards higher-order parameters due to differences in parameter magnitude.
[0080] The BP neural network is built using the TensorFlow or PyTorch framework, with the model structure and parameter settings as follows:
[0081] Input layer: 19 nodes, corresponding to 19 influencing factors (landslide length, landslide height, landslide width, internal friction angle of landslide soil, cohesion of landslide soil, internal friction angle of stable soil, cohesion of stable soil, rainfall time, pipeline burial depth, pipeline inner diameter, elastic modulus of inner lining material, Poisson's ratio of inner lining material, yield strength of inner lining material, elastic modulus of outer lining material, Poisson's ratio of outer lining material, yield strength of outer lining material, inner lining wall thickness, outer lining wall thickness, and transport pressure). Its function is to receive the normalized input vector and pass it to the hidden layer.
[0082] Hidden layers: Set 2-3 layers (for high-dimensional data fitting requirements), with 10-30 nodes per layer. Determine the optimal number of nodes through trial and error: Select nodes sequentially within the range of 10-30, build and train the model, calculate the training error (root mean square error) and cross-validation error of each model, and select the number of nodes with the smallest training error and the most stable cross-validation error (usually 20-25 nodes / layer). The hidden layer activation function uses the ReLU function, with the expression: This solves the gradient vanishing problem of the traditional Sigmoid function.
[0083] Output layer: 1 node, corresponding to the maximum stress in the pipe. A linear activation function is used to achieve continuous output of the stress value. The expression is:
[0084] ;
[0085] in The hidden layer-output layer connection weights, For hidden layer output, (for the output layer threshold). This is the final output value of the output layer, corresponding to the predicted maximum stress value of the buried natural gas bimetallic composite pipeline under landslide conditions. This represents the total number of nodes in the hidden layers of a BP neural network (e.g., in the structure "20 hidden 1-15 hidden 2", the number of nodes in a certain hidden layer needs to be determined based on the actual structure of the model).
[0086] Initial parameter settings: Network weights and thresholds are randomly generated using a He normal distribution, with values ranging from -0.5 to 0.5; the learning rate is initially set to 0.001; the loss function is the mean squared error (MSE), expressed as: , This represents the actual stress value. Let n be the predicted value, and n be the total number of samples involved in the MSE calculation (the number of samples in the training or test set).
[0087] Parameter optimization of BP neural network model based on Artificial Fish Swarm Algorithm (AFSA):
[0088] The core of AFSA is to optimize the initial parameters (weights and thresholds) of the BP neural network. By finding the minimum value of the objective function (mean squared error, MSE) of the BP neural network, it solves the problem of BP networks easily getting trapped in local optima, achieves global optimization, and improves the model's prediction accuracy. Specifically:
[0089] The AFSA algorithm is used to optimize the weights and thresholds of the BP neural network to achieve global optimization. The specific steps are as follows:
[0090] Optimization Objective and Encoding: Encode all key parameters of the BP neural network (inter-layer connection weights and neuron thresholds) into position vectors for artificial fish. The dimension of the position vectors is the same as the total number of key parameters. For example, if the BP network has a structure of "19 inputs - 20 hidden 1s - 15 hidden 2s - 1 output", the parameters to be optimized include 19 × 20 (inputs - hidden 1 weights) + 20 (hidden 1 thresholds) + 20 × 15 (hidden 1s - hidden 2 weights) + 15 (hidden 2 thresholds) + 15 × 1 (hidden 2s - output weights) + 1 (output threshold) = 671. The dimension of the position vector for each artificial fish is 671.
[0091] AFSA Parameter Initialization: Based on extensive trial and error optimization, the key AFSA parameters are set as follows: fish school size: 30-50 fish (preferably 40); field of view: 0.3-0.6 (preferably 0.5); step size: 0.05-0.15 (preferably 0.1); crowding factor: 0.6-0.8 (preferably 0.7); maximum number of iterations: 50-100 (preferably 80); maximum number of foraging attempts: 5-10 (preferably 8). The "preferred" values for these AFSA parameters were determined through parameter sensitivity analysis using the controlled variable method. Specifically, while keeping other parameters constant, a single parameter (such as fish school size) was changed sequentially, and the prediction accuracy (primarily RMSE) and convergence speed of the AFSA-BP model on a fixed validation set were observed. Finally, the parameter value that ensures stable model performance and rapid convergence was selected as the preferred value. Those skilled in the art can fine-tune these values based on the complexity of the actual problem and available computational resources.
[0092] Artificial Fish Behavior Simulation and Parameter Update: Each artificial fish corresponds to a set of BP network parameters, and sequentially performs swarming, tail-chasing, and foraging behaviors. The position vector (i.e., the optimized parameters) is updated using the following formula:
[0093] (1) Grouping behavior:
[0094] Calculate the center position Pc of all companions within the current field of vision of the artificial fish.
[0095] Calculate the objective function value corresponding to Pc. Objective function value corresponding to the current fish position If satisfied ,(in For the crowding factor, The number of companions within sight. If the objective function value corresponds to the center position Pc of all companions within the current artificial fish's field of vision, then the current fish moves one step towards Pc, and the formula for the new position is: In the formula, For the movement step size, A random number in the interval [0,1]. The new position vector is updated after the artificial fish performs swarming behavior, and this vector corresponds to a set of optimized BP neural network weights and thresholds; otherwise, foraging behavior is performed.
[0096] (2) Rear-end collision:
[0097] Find the position of the partner with the minimum objective function value within the current fish's field of vision. Calculate the corresponding objective function value. If satisfied ,(in For the crowding factor, (The objective function value corresponding to the current position of the artificial fish), then the current direction of the fish... Move one step, and the new location is calculated in the same way as the clustering behavior; otherwise, perform foraging behavior.
[0098] (3) Foraging behavior:
[0099] The fish will randomly generate a new location within the field of view. The formula is: ;
[0100] In the formula, This indicates the current position of the fish. For the field of vision, The value is a random number in the interval [0,1]. Calculate the objective function value Dj corresponding to Pj. If Dj < Di, the fish moves one step towards Pj. If no better position is found after the maximum number of consecutive foraging attempts, the fish moves one step randomly according to the following formula: In the formula, It is a random number in the interval [0,1].
[0101] (4) Notice board update and iteration termination:
[0102] A notice board is set up to record the globally optimal position (i.e., the parameter combination with the minimum MSE) and its corresponding objective function value. After each action is executed, the MSE corresponding to the current fish's optimal position is compared with the globally optimal value on the notice board. If the current value is smaller, the notice board is updated. The iteration terminates when the number of iterations reaches the maximum number of iterations (preferably 80) or the difference between the globally optimal MSEs of two adjacent iterations is ≤1e-6, and the globally optimal position vector recorded on the notice board is output.
[0103] (5) Model output:
[0104] The globally optimal position vector is decoded into the optimal weights and thresholds of a BP neural network, and the initial random parameters are replaced to obtain the optimized AFSA-BP prediction model. This model receives 19 normalized input parameters and outputs the predicted value of the maximum stress in the pipeline through a linear function in the output layer. The expression of the output layer function is as follows: In the formula, wj is the hidden layer-output layer connection weight, hj is the hidden layer output (activated by the ReLU function, f(x)=max(0,x), and b is the output layer threshold).
[0105] Model testing and engineering applications:
[0106] Model performance verification and iterative optimization: Normalized test set data is input into the trained AFSA-BP prediction model, and the root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²) of the predicted values are calculated. In this embodiment of the invention, the accuracy thresholds for the model to be applied in engineering are set as follows: RMSE ≤ 4.0 MPa, MAE ≤ 2.5 MPa, and R² ≥ 0.94. If the model performance does not simultaneously meet the above thresholds, it indicates that the current model has not yet fully converged or its structure needs optimization. In this case, the model construction and optimization steps should be returned to, and iterative improvements should be made using conventional model adjustment methods (e.g., increasing the amount of training data, fine-tuning the number of hidden layer nodes, re-initializing and executing the AFSA optimization process) until the trained model meets the accuracy requirements.
[0107] The results of Example 1 and subsequent engineering examples demonstrate that the method of this invention can stably train a reliable prediction model that meets the stated accuracy threshold. Performance comparison with traditional methods:
[0108] To demonstrate the advantages of this invention, comparative experiments were conducted under the same conditions, and the results are shown in Table 1 below:
[0109] Table 1 compares the prediction performance of different algorithm models:
[0110]
[0111] The results show that the AFSA-BP prediction model of this invention is significantly better than other comparative models in terms of prediction accuracy (RMSE, MAE, R²), and has reasonable training efficiency while ensuring accuracy.
[0112] The training and optimization steps (pseudocode logic) of the AFSA-BP prediction model are as follows:
[0113] 1. Initialize the fish swarm positions (corresponding to the BP network weight threshold);
[0114] 2. Calculate the initial fitness (reciprocal of mean squared error);
[0115] 3. While the maximum number of iterations has not been reached:
[0116] a. Performing swarming behavior: Calculating the center position of the fish school and assessing fitness improvement;
[0117] b. Perform a rear-end collision: track the best individual in the neighborhood;
[0118] c. Perform foraging behavior: randomly search for new locations;
[0119] d. Update the bulletin board: record the historical best solution;
[0120] e. Adaptively adjusts the field of view and step size;
[0121] 4. Decode the optimal fish position as the final weight of the BP network.
[0122] To facilitate a better understanding of the present invention by those skilled in the art, the present invention will be further described below in conjunction with specific engineering applications.
[0123] Engineering Application: Stress Prediction and Verification of Gas Pipelines in Mountainous Areas
[0124] Taking a bimetallic composite pipeline actually in service in a mountainous area as an example, the method of this invention was fully applied for prediction, and the results were compared with those of high-fidelity simulation and on-site monitoring.
[0125] Application of simulation data acquisition steps:
[0126] For the target pipe segment, its specific parameters are determined to form the basis for constructing the simulation dataset.
[0127] The pipeline parameters are as follows: inner diameter 500mm, burial depth 1.5m, inner lining (X65 steel) thickness 10mm (elastic modulus 200GPa, Poisson's ratio 0.3, yield strength 235MPa), outer lining (X80 steel) thickness 15mm (elastic modulus 210GPa, Poisson's ratio 0.29, yield strength 500MPa).
[0128] The landslide parameters are: length 100m, height 15m, width 60m; internal friction angle of the landslide soil 30°, cohesion 25kPa; internal friction angle of the stable soil 35°, cohesion 35kPa. Environmental and operational parameters are: rainfall duration 24 hours, pipeline transport pressure 6MPa.
[0129] Based on the above parameters, a corresponding three-dimensional refined numerical simulation model was established in ANSYS Workbench, and a high-quality simulation dataset containing about 1,000 working conditions was generated through orthogonal experimental design around these nineteen influencing factors.
[0130] Application of data preprocessing steps: The generated simulation dataset was first cleaned using the 3σ criterion to remove outliers. Then, it was randomly divided into a training set (approximately 800 sets) and a test set (approximately 200 sets) at an 8:2 ratio. Finally, the Min-Max normalization method was used to map all data to the [0,1] interval.
[0131] Application of Model Construction and Optimization Steps: Based on the TensorFlow framework, an initial BP neural network model was constructed, consisting of a 19-node input layer, two hidden layers (24 and 18 nodes respectively, with ReLU activation function), and a 1-node output layer (linear activation function). Subsequently, the artificial fish swarm algorithm was used to globally optimize the weights and thresholds of this network. The algorithm parameters were set as follows: swarm size 40, field of view 0.5, step size 0.1, crowding factor 0.7, and maximum number of iterations 80. After iterative optimization, the optimal parameters were obtained, and the AFSA-BP prediction model was constructed.
[0132] Application of model testing and application steps:
[0133] Accuracy Validation: The AFSA-BP prediction model was validated using a test set. The calculated performance metrics for the prediction results were: Root Mean Square Error (RMSE) = 3.2 MPa, Mean Absolute Error (MAE) = 2.1 MPa, and Coefficient of Determination (R²) = 0.95. These results fully meet and exceed the usable accuracy standards set by this invention (RMSE ≤ 4.0 MPa, MAE ≤ 2.5 MPa, R² ≥ 0.94).
[0134] Engineering prediction: The nineteen specific parameters of the target pipe section (after being normalized in the same way) are input into the pre-trained AFSA-BP prediction model. The model quickly outputs the prediction results: the location of the maximum stress is at the top of the pipe in the middle of the landslide body (corresponding to station K0+500), and the predicted maximum stress value is 285MPa.
[0135] Comparison and Verification: To verify the reliability of the prediction, high-fidelity simulation of this specific working condition was performed using ANSYS Workbench, and stress sensors were deployed on-site for monitoring. The comparison of the three methods is shown in Table 2 below:
[0136] Table 2:
[0137]
[0138] Position deviation: The maximum stress position deviation between AFSA-BP prediction and ANSYS simulation and actual monitoring is ≤2m, which meets the engineering positioning requirements (error ≤5%).
[0139] Numerical deviation: The deviation between the AFSA-BP predicted value and the actual monitored value is 3 MPa (error 1.04%), and the deviation between the ANSYS simulation value and the actual monitored value is 4 MPa (error 1.39%).
[0140] The AFSA-BP model has slightly higher prediction accuracy than the ANSYS simulation alone and is closer to the actual situation. This is because the BP network optimized by AFSA incorporates the simulation data patterns of 800-1200 sets of working conditions, avoiding problems such as mesh generation deviation and parameter setting errors that may exist in the single ANSYS Workbench model.
[0141] Engineering application: If the predicted maximum stress does not exceed 0.8 times the minimum yield strength of the inner and outer linings, the pipeline is safe; if it does, protective measures should be taken as shown in Table 3.
[0142] Table 3:
[0143]
[0144] Engineering applications and outdoor field verification cases:
[0145] Verification results based on actual landslide monitoring data:
[0146] (1) A natural gas pipeline in a mountainous area:
[0147] Landslide parameters: length 120m, height 18m, soil internal friction angle 28°;
[0148] Sensor measured stress: 275MPa (station K0+355);
[0149] AFSA-BP predicted value: 272MPa (station K0+353);
[0150] Positional deviation: 2 meters;
[0151] Stress error: 3MPa.
[0152] (2) Trans-valley pipeline project:
[0153] Landslide parameters: length 95m, height 12m, cohesion decreased by 18% after rainfall;
[0154] The strain gauge measured stress was 298 MPa (station K0+620).
[0155] AFSA-BP predicted value: 302MPa (station K0+622);
[0156] Positional deviation: 2 meters;
[0157] Stress error: 4MPa.
[0158] (3) Gas pipelines in hilly areas:
[0159] Landslide parameters: length 150m, height 22m, sliding displacement 0.6m;
[0160] Sensor data: 312MPa (station K0+780);
[0161] AFSA-BP prediction: 308MPa (chainage K0+778);
[0162] Positional deviation: 2 meters;
[0163] Stress error: 4 MPa;
[0164] The three independent experimental cases above show that the AFSA-BP prediction model constructed based on the method of this invention has a prediction error of less than 5MPa in different scenarios, a position deviation of no more than 2 meters, and all indicators stably meet the accuracy requirements of RMSE≤4.0MPa, MAE≤2.5MPa, and R²≥0.94, which fully demonstrates that the method has excellent accuracy, robustness and engineering practical value.
[0165] This invention utilizes three-dimensional solid finite element simulation, strictly adhering to the principles of elastoplastic mechanics and contact mechanics, to construct a high-fidelity model that accurately reflects the complex interactions between the landslide body, stable soil, and bimetallic composite pipe, ensuring the physical authenticity and high accuracy of the original data source. Based on this model, a dataset is generated, and a neural network surrogate model is then trained, resulting in a final prediction model that incorporates profound physical and mechanical laws, achieving a balance between fidelity in physical mechanism and prediction speed.
[0166] This invention addresses the inherent limitations of traditional BP neural networks, such as the extremely high nonlinearity caused by the multi-factor coupling of landslide effects and the tendency to get trapped in local optima, by introducing an artificial fish swarm algorithm (AFSA) to perform global optimization of the BP network. The AFSA's clustering, tail-chasing, and foraging behaviors effectively avoid the sensitivity of gradient descent to initial values, ensuring that the obtained AFSA-BP prediction model can robustly converge to the global optimum or near-optimal solution, thereby significantly improving prediction accuracy (RMSE ≤ 4.0 MPa) and stability (R² ≥ 0.94). This solves the fundamental problem of insufficient accuracy and poor reliability of the underlying prediction model in early warning methods.
[0167] This invention goes beyond simple stress calculation or early warning classification, forming a complete technical closed loop: refined modeling → efficient data generation → global optimization training → accurate stress prediction → safety threshold comparison → protective measure decision-making. It not only outputs predicted stress values but also achieves quantitative safety risk assessment through direct comparison with material yield strength, and outputs graded protection recommendations. This directly transforms the prediction results into actionable engineering decision-making criteria, enhancing the practicality and systematic value of the technology.
[0168] Example 2: This example discloses a stress prediction system for buried natural gas pipelines under landslide conditions, including:
[0169] The simulation calculation module is used to execute the simulation data acquisition step and generate a simulation dataset;
[0170] The data processing module is used to perform the data preprocessing steps and output the processed training set and test set;
[0171] The model training module is used to execute the model building and optimization steps and train the AFSA-BP prediction model.
[0172] The prediction and evaluation module is used to perform the model testing and application steps, and to perform the security evaluation and decision output steps.
[0173] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0174] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting stress in buried natural gas pipelines under landslide conditions, characterized in that, Includes the following steps: Simulation data acquisition steps: A three-dimensional numerical simulation model of landslide body-stable soil-bimetallic composite pipe is established using finite element analysis software. The maximum stress value of the bimetallic composite pipe under different parameter combinations of multiple influencing factors is calculated to form a simulation dataset. Data preprocessing steps: The simulation dataset is cleaned and normalized, and then divided into training and testing sets; Model construction and optimization steps: Construct a BP neural network model with the multiple influencing factors as input and the maximum stress value as output, and use the artificial fish swarm algorithm to optimize the weights and thresholds of the BP neural network model to obtain the optimized AFSA-BP prediction model; Model testing and application steps: Use the test set to test the accuracy of the AFSA-BP prediction model, and use the model that meets the accuracy requirements to predict the maximum stress of buried natural gas bimetallic composite pipelines under landslide action; The simulation data acquisition steps specifically include: In the geometry module of the finite element analysis software, a prism model of the landslide body, a cuboid model of the stable soil body, and a concentric cylinder model of the bimetallic composite pipe are constructed respectively. In the material properties module, elastic modulus, Poisson's ratio and yield strength parameters are defined for the inner and outer linings of the bimetallic composite pipe. Internal friction angle, cohesion, elastic modulus and Poisson's ratio parameters based on the Mohr-Coulomb constitutive model are defined for the landslide body and stable soil body. The elastic modulus and cohesion parameters of the soil body are reduced according to the rainfall duration. In the mesh generation module, a structured mesh is used for the pipeline body area, an unstructured mesh is used for the contact area between the pipeline and the soil, and a coarsened mesh is used for the far end area of the soil. In the load and constraint module, the inner and outer linings of the pipe are set to bonded contact, and the outer wall of the pipe is set to frictional contact with the soil. Fixed constraints are applied to the bottom of the stable soil, and normal constraints are applied to the sides of the stable soil. Displacement loads along the sliding direction are applied to the landslide. Transport pressure loads are applied to the inner wall of the pipe. Gravity loads are applied to all components. The parametric scanning function is used to calculate the working conditions of the multiple influencing factors under different level combinations in batches, and the maximum stress value of the bimetallic composite pipe is extracted.
2. The method for predicting stress in buried natural gas pipelines under landslide conditions according to claim 1, characterized in that, The multiple influencing factors include landslide geometric parameters, soil mechanical parameters, pipeline structural parameters, pipeline material parameters, and operational parameters; Specifically, these include: landslide length, landslide height, landslide width, internal friction angle of the landslide soil, cohesion of the landslide soil, internal friction angle of the stable soil, cohesion of the stable soil, rainfall duration, pipeline burial depth, pipeline inner diameter, elastic modulus of the inner lining material, Poisson's ratio of the inner lining material, yield strength of the inner lining material, elastic modulus of the outer lining material, Poisson's ratio of the outer lining material, yield strength of the outer lining material, inner lining wall thickness, outer lining wall thickness, and transport pressure.
3. The method for predicting stress in buried natural gas pipelines under landslide conditions according to claim 1, characterized in that, The data preprocessing steps specifically include: The simulation dataset was cleaned using the 3σ criterion to remove outliers; The cleaned data is randomly divided into training and testing sets according to a preset ratio; The Min-Max normalization method is used to map the values of each influencing factor in the training set and the test set to the interval [0,1].
4. The method for predicting stress in buried natural gas pipelines under landslide conditions according to claim 1, characterized in that, In the model construction and optimization steps, the BP neural network model includes an input layer, at least one hidden layer, and an output layer; The number of nodes in the input layer is consistent with the number of influencing factors; The activation function of the hidden layer is the ReLU function; The output layer has one node, and its activation function is a linear function.
5. The method for predicting stress in buried natural gas pipelines under landslide action according to claim 1 or 4, characterized in that, The optimization of the weights and thresholds of the BP neural network model using the artificial fish swarm algorithm specifically includes: All values and thresholds of the BP neural network model are encoded sequentially to form the position vector of the artificial fish; Set the parameters of the artificial fish swarm algorithm, including swarm size, field of view, step size, crowding factor, and maximum number of iterations; In each iteration, each artificial fish sequentially performs swarming behavior, tail-chasing behavior, or foraging behavior, and updates its position vector according to the behavior rules; A bulletin board is set up to record the historical best position vector and its corresponding fitness value. The fitness value is the reciprocal of the prediction error of the BP neural network model, and the bulletin board is updated after each iteration. When the maximum number of iterations is reached or the preset convergence condition is met, the optimal position vector recorded on the bulletin board is decoded and assigned as the optimized weights and thresholds to the BP neural network model.
6. The method for predicting stress in buried natural gas pipelines under landslide action according to claim 5, characterized in that, The behavioral rules for artificial fish are: Grouping behavior: If the fitness value of the center position of a companion in the current artificial fish's field of vision is better than its own fitness value, and the center position is not crowded, then move one step towards the center position; Tail-chasing behavior: If the fitness value of the partner with the best fitness in the current artificial fish's field of vision is better than its own fitness value, and the partner's position is not crowded, then move one step towards the partner's position; Foraging behavior: If none of the above behaviors are performed, a new location is randomly selected within the field of vision. If the fitness value is better, the location is moved to that location; otherwise, the location is moved one step randomly within the field of vision.
7. The method for predicting stress in buried natural gas pipelines under landslide conditions according to claim 1, characterized in that, In the model testing and application steps, the root mean square error, mean absolute error, and coefficient of determination of the AFSA-BP prediction model are calculated using the test set, and it is determined whether they simultaneously satisfy the following conditions: root mean square error not exceeding 4.0 MPa, mean absolute error not exceeding 2.5 MPa, and coefficient of determination not less than 0.
94.
8. The method for predicting stress in buried natural gas pipelines under landslide conditions according to claim 1, characterized in that, Following the model testing and application steps, the following is also included: Safety assessment steps: Compare the predicted maximum stress value with the yield strength of the inner and outer lining materials of the bimetallic composite pipe to assess the pipe safety risk; Decision output steps: If the predicted maximum stress value exceeds the safety threshold, output the corresponding pipeline protection measures recommendation.
9. A stress prediction system for buried natural gas pipelines under landslide conditions, used to implement the stress prediction method for buried natural gas pipelines under landslide conditions as described in claim 8, characterized in that... include: The simulation calculation module is used to execute the simulation data acquisition step and generate a simulation dataset; The data processing module is used to perform the data preprocessing steps and output the processed training set and test set; The model training module is used to execute the model building and optimization steps and train the AFSA-BP prediction model. The prediction and evaluation module is used to perform the model testing and application steps, and to perform the security evaluation and decision output steps.
Citation Information
Patent Citations
Analysis method of pipeline stress sensitivity under landslide effect
CN115345038A
Method for establishing three-dimensional early warning model of buried oil and gas pipeline traversing landslide
CN117892537A
Water supply network reorganization and expansion optimization method based on improved artificial fish school algorithm
CN103258235A
Crude oil pipeline wax precipitation rate prediction method based on whale algorithm optimized BP neural network
CN118734890A