Method for determining structure size of composite tube based on GA-PSO joint algorithm
The structural size of composite pipes is optimized through the GA-PSO joint algorithm, which solves the problems of low composite pipe design efficiency and slow convergence in traditional methods, and realizes the high-strength and long-life design of composite pipes in the fields of oil, natural gas, high-pressure transportation, etc.
Patent Information
- Application Number
- CN202510706176.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-02
AI Technical Summary
Traditional optimization methods are difficult to achieve global optimal solutions under multi-objective and multi-constraint conditions in composite pipe design, resulting in low efficiency and slow convergence, making it difficult to meet the high-strength and long-life requirements of composite pipes in oil, natural gas, high-pressure transportation and other fields.
The GA-PSO joint algorithm is adopted, combined with genetic algorithm and particle swarm algorithm, and the structural size of the composite tube is optimized by establishing a mathematical model of the bearing capacity of the composite tube, and combining dynamic adjustment of inertial weights, cross-rates and mutation rates, the balance between global optimization and local search is achieved.
The optimization efficiency and accuracy of composite pipe structure design is improved, and the local optimal solution is avoided, and the composite pipe design with the maximum load-bearing capacity is realized under the minimum material cost.
Smart Images

Figure CN120579448A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a method for determining the structural dimensions of a composite tube based on a GA-PSO joint algorithm, and belongs to the technical field of processing tubular articles. Background Art
[0002] Composite pipe structures are widely used in the oil and gas, chemical, and high-pressure transportation industries. Due to their multi-layered structure, composite pipes are typically required to possess high strength, corrosion resistance, and a long service life. The structural design of composite pipes plays a key role in ensuring their strength, pressure resistance, and longevity. However, composite pipe design involves multivariable optimization of material and structural parameters. Traditional optimization methods struggle to achieve a global optimal solution under multiple objectives and constraints, and suffer from low efficiency and slow convergence.
[0003] In recent years, intelligent optimization algorithms have achieved remarkable results in solving complex optimization problems. Genetic algorithms (GAs), as global optimization algorithms based on biological evolution, possess strong global search capabilities. Particle swarm optimization (PSO), an algorithm based on swarm intelligence, achieves rapid convergence through information sharing between individuals and the swarm. Therefore, combining GAs and PSO for composite pipe sizing optimization is expected to improve optimization efficiency and accuracy. Summary of the Invention
[0004] In view of this, the present application provides a method for determining the structural dimensions of composite pipes based on the GA-PSO joint algorithm. Based on the combination of genetic algorithm and particle swarm algorithm, a mathematical model of the bearing capacity of composite pipes is established. Combined with the GA-PSO joint optimization strategy, the structural dimensions of composite pipes in the oil and gas, high-pressure transportation and other industries are optimized, striving to achieve maximum bearing capacity at the minimum material cost.
[0005] Specifically, this application is implemented through the following solutions:
[0006] A method for determining the structural dimensions of a composite pipe based on a GA-PSO joint algorithm, the steps are as follows:
[0007] Step 1: Set the initial range of variables: Determine the key design variables of the composite pipe structure and set upper and lower limits for each key design variable to ensure that the solution generated during the size determination process meets the design requirements. The key design variables include the total number of winding wires N, the wire diameter d, and the winding angle α. The upper and lower limits corresponding to the total number of wires N are respectively denoted as N max 、N min The upper and lower limits of the wire diameter d are denoted as d max d min The upper and lower limits of the winding angle α are denoted as α max , α min .
[0008] Step 2: Define the objective function: According to the size requirements and usage conditions of the composite pipe, set the objective function, which includes the composite pipe load capacity P B , balance between material cost C and service life.
[0009] Step 3: Set the initial population and particle speed: Generate an initial population with a population size of N z Each individual in the initial population represents a composite tube design scheme. The initial position and initial velocity are randomly assigned to each particle, which are used to update the velocity of the particle group in size confirmation. The initial fitness value is
[0010] The initial value of each individual is selected within the upper and lower limit boundaries, that is:
[0011] N∈[N min , N max ],d∈[d min , d max ],α∈[α min , α max ].
[0012] Step 4: Initial evaluation and optimal position setting: Calculate the fitness value of each individual, set the historical optimal position of each individual according to the fitness value, and find the global optimal solution g best .
[0013] The fitness value function f(X) for calculating the fitness value satisfies:
[0014] f(X)=-P B (N,d,α)+0.01·C(N,d)+penalty N +penalty d .
[0015] The above fitness function f(X) combines the load-bearing capacity P of the composite pipe B and material cost C, and through the penalty function penalty N and penalty d Ensure that the optimization results meet engineering requirements.
[0016] Step 5: The main loop iteration begins: set the number of iterations and convergence criteria, enter the main loop iteration, in which the genetic algorithm operation part performs selection, crossover and mutation operations to generate a new population; and for each individual, based on the current speed Personal optimal position and the global optimal solution g best Update the velocity and position to get the particle swarm optimization.
[0017] Update speed satisfy:
[0018] is the current position, ω is the inertia weight, c1 and c2 are learning factors, and r1 and r2 are random factors.
[0019] Updated location satisfy:
[0020]
[0021] And limit x by boundary conditions i,j To the extent practicable:
[0022] x i,j is the jth parameter of individual i.
[0023] Step 6: Based on the obtained new population and particle swarm optimization, the GA-PSO parameters are dynamically adjusted in each generation.
[0024] Step 7: Every several generations, the global optimal solution g best Perform local search to form a small disturbance to the current global optimal solution g best Make fine adjustments to bring the results closer to the optimal value.
[0025] When the result reaches the preset number of iterations or meets the convergence criterion, the final optimal solution is output, which is the structural size of the composite pipe; otherwise, steps five to seven are repeated.
[0026] In the above scheme, GA is used for individual selection, crossover and mutation to preliminarily optimize the fitness of individuals and give the algorithm global exploration capabilities; the speed and position update formulas of PSO are used to accelerate the convergence of the population and optimize individuals in local search; in the optimization process of GA-PSO, the inertia weight, crossover rate and mutation rate are dynamically adjusted to balance the global exploration and local development capabilities of the algorithm.
[0027] Furthermore, as a preference:
[0028] In step 3, the optimization parameter vector X = [N, d, α] for each individual T .
[0029] In step five:
[0030] The probability of selection is calculated by the inverse of the individual fitness, crossover adopts a multi-point crossover strategy, and mutation introduces random disturbance to maintain population diversity.
[0031] After each iteration, update the historical best position of each particle and the global optimal solution g best , when the individual's current fitness is better than its historical best value, update When the individual's fitness is better than the current global optimal value, update g best .
[0032] In each iteration, the selection, crossover and mutation operations of GA and the velocity and position update operations of PSO are performed alternately to exploit the global search capability of GA and the fast convergence of PSO.
[0033] In step 6, the dynamically adjusted GA-PSO parameters include the inertia weight ω, crossover rate, and mutation rate to balance exploration and exploitation during the search process. The inertia weight ω adjustment formula is:
[0034]
[0035] The crossover probability is set between [0.6, 0.8], and the mutation probability is designed between [0.05, 0.1]. Any value within the crossover probability and mutation probability interval is used during design.
[0036] In step 7, the current global optimal solution is fine-tuned: a small perturbation σ is added to the optimal solution, where σ is a random value generated in the range of [-0.05, 0.05]. The optimal solution after fine-tuning is: g best +σ, σ~μ(-0.05, 0.05), fine-tune the global optimal solution through uniformly distributed random perturbations. This operation not only maintains the accuracy of the solution but also enables fine search in the local range.
[0037] Preset maximum number of iterations K max Less than k+1, where k is the current number of iterations. When the program reaches the maximum number of iterations, the operation is terminated and the result is output. This is the termination condition.
[0038] Alternatively, the convergence condition is that the global optimal solution satisfies: |g k+1 -g k |<ε,g k 、g k+1 denote the global optimal solutions of the kth and k+1th iterations respectively.
[0039] The convergence condition is determined together with the termination condition. If the global optimal solution of two consecutive iterations has no significant difference, and the difference is extremely small (less than ε), the algorithm is considered to have converged and the iteration can be terminated early without reaching the maximum number of iterations. If the global optimal solution of two iterations does not satisfy this equation, the calculation needs to continue until the equation is satisfied or the maximum number of iterations is reached.
[0040] The above scheme achieves efficient optimization of the composite pipe structure through the GA-PSO joint optimization algorithm, overcoming the defect that traditional optimization methods are prone to falling into local optimal solutions in complex multi-dimensional spaces. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0042] Figure 1 This is a flowchart of the application. DETAILED DESCRIPTION
[0043] In order to make the technical problems, technical solutions and beneficial effects to be solved by this application more clearly understood, the technical solutions in the embodiments of this application will be further described in detail below in conjunction with the drawings in the embodiments of this application. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit the technical solutions of this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of this application.
[0044] This embodiment provides a method for determining the structural dimensions of a composite pipe based on a GA-PSO joint algorithm. The embodiment of this application is described below with reference to the accompanying drawings.
[0045] See Figure 1 , Figure 1 A flowchart of this embodiment is shown.
[0046] In the design of composite pipe structures, key dimensional parameters such as the total number of steel wire windings N, the wire diameter d, and the winding angle α are determined. These dimensional parameters are globally optimized using a GA-PSO joint algorithm to minimize cost while ensuring structural strength.
[0047] The main process is as follows:
[0048] Optimization variable definition: Set the optimization parameter vector X of each individual in the particle swarm, that is, the optimization variable of the GA-PSO joint algorithm is:
[0049] X = [N, d, α] T .
[0050] Wherein, N represents the total number of wound steel wires, d represents the diameter of the steel wire, and α represents the winding angle.
[0051] Optimize the initial range of variables: Set the initial value X0 and velocity v0 vector of each individual. The initial range and theoretical boundary value of the variables are:
[0052] N∈[N min , N max ],d∈[d min , d max ],α∈[α min , α max ].
[0053] Among them, N min and N max are the minimum and maximum number of steel wires, respectively, min and d max are the lower and upper limits of the wire diameter, α min and α max is the range of winding angle.
[0054] Definition of objective function: According to the stress requirements and material usage of the composite pipe, the objective function f(X) is defined as follows:
[0055] f(X)=-P B (N,d,α)+0.01·C(N,d)+penalty N +penalty d .
[0056] Among them, P E is the load-bearing capacity of the composite pipe, C is the material cost, and penalty N and penalty d Penalty for exceeding the boundary.
[0057] The fitness function f(X) is used to evaluate individual performance.
[0058] GA-PSO joint algorithm process:
[0059] 1. Initialize the population: randomly generate the initial population and set the population size to N z , and assign an initial position and velocity to each particle, and the initial fitness value is
[0060] 2. GA operation part: Use the selection, crossover and mutation operations of the genetic algorithm to generate new candidate solutions to improve the diversity of the population.
[0061] 3. PSO operation part: For each particle, the particle swarm optimization part updates its speed and position according to the following formula:
[0062]
[0063] Where ω is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random factors, is the individual's best historical position, g best is the global optimal solution.
[0064] And limit x by boundary conditions i,j To the extent practicable:
[0065]
[0066] where x i,j is the j-th parameter of individual i.
[0067] Starting from the first generation, a new population is generated using the selection, crossover and mutation operations of the genetic algorithm. The selection probability is calculated by the inverse of the individual fitness. The crossover adopts a multi-point crossover strategy, and the mutation introduces random disturbances to maintain population diversity.
[0068] After each iteration, update the historical best position of each particle and the global optimal solution g best , when the individual's current fitness is better than its historical best value, update When the individual's fitness is better than the current global optimal value, update g best .
[0069] In each iteration, the selection, crossover and mutation operations of GA and the velocity and position update operations of PSO are performed alternately to exploit the global search capability of GA and the fast convergence of PSO.
[0070] 4. Dynamic parameter adjustment: Update the inertia weight, crossover rate, and mutation rate with the number of iterations to balance global and local search.
[0071] The dynamic adjustment formula of inertia weight ω is:
[0072]
[0073] The crossover probability is set between [0.6, 0.8], and the mutation probability is designed between [0.05, 0.1]. Any value within the crossover probability and mutation probability interval is used during design.
[0074] 5. Local search strategy: Every few generations, make small perturbations to the global optimal solution and fine-tune the current global optimal solution to more precisely approach the optimal solution. The specific operations are:
[0075] A small perturbation σ is added to the current global optimal solution to complete fine-tuning. σ is a value randomly generated in the interval [-0.05, 0.05]. This operation can maintain the accuracy of the solution while performing a fine search in the local range.
[0076] Iteration termination condition: When the maximum number of iterations is reached or the convergence condition is met, the optimization loop terminates and stops iteration, outputting the optimal solution And the corresponding optimal fitness value G zb .
[0077] k represents the current iteration count. The preset maximum number of iterations is Kmax. When Kmax is less than k+1, the program has reached the maximum number of iterations, terminates the calculation, and outputs the result. For example, suppose the current iteration count k is 200, and the preset maximum number of iterations Kmax is set to 200 during parameter configuration. Then, the preset maximum number of iterations 200 < k+1 = 201, and the calculation terminates. If k is 155, then the preset maximum number of iterations 200 > k+1 = 156, indicating that the program has not yet reached the maximum number of iterations and continues to calculate.
[0078] Therefore, the termination conditions of the optimization cycle include reaching the preset maximum number of iterations Kmax or the global optimal solution has no significant changes in several consecutive generations:
[0079] Kmax>k+1or|g k+1 -g k |<ε.
[0080] The minimum difference ε can vary depending on the objective function. When the objective function is in the hundreds, the value of ε is in the range [0.1, 1]. In this case, the load-bearing capacity of the composite pipe is generally evaluated based on a burst pressure of tens of MPa, so the value of ε is 0.001.
[0081] Through the above steps, the present invention implements a composite pipe structural dimension optimization method based on a GA-PSO joint algorithm. This method effectively combines the advantages of the genetic algorithm and the particle swarm optimization algorithm, overcoming the shortcomings of traditional optimization methods that are prone to falling into local optimal solutions in complex multivariable problems, and improving the global optimization capability and convergence speed.
[0082] The above-described embodiments merely represent several feasible implementation methods of the present invention. The description thereof is relatively specific and detailed, but it should not be understood as limiting the scope of the invention. The embodiments are not intended to limit the scope of protection in the claims of the present invention. For those skilled in the art, various modifications and improvements can be made without departing from the concept of the present invention. Any equivalent implementation or modification that does not depart from the scope of the present invention should be included in the technology of the present invention.
Claims
1. A method for determining the structural dimensions of a composite pipe based on a GA-PSO joint algorithm, characterized in that: Here are the steps: Step 1: Set the initial range of variables: Determine the key design variables of the composite pipe structure and set upper and lower limits for each key design variable to ensure that the solution generated during the size determination process meets the design requirements. The key design variables include the total number of winding wires N, the wire diameter d, and the winding angle α. The upper and lower limits corresponding to the total number of wires N are respectively denoted as N max 、N min The upper and lower limits of the wire diameter d are denoted as d max d min The upper and lower limits of the winding angle α are denoted as α max , α min ; Step 2: Define the objective function: According to the size requirements and usage conditions of the composite pipe, set the objective function, which includes the composite pipe load capacity P B , the balance between material cost C and service life; Step 3: Set the initial population and particle speed: Generate an initial population with a population size of N z Each individual in the initial population represents a composite tube design scheme. The initial position and initial velocity are randomly assigned to each particle, which are used to update the velocity of the particle group in size confirmation. The initial fitness value is The initial value of each individual is selected within the upper and lower limit boundaries, that is: N∈[N min ,N max ],d∈[d min ,d max ],α∈[α min ,a max ]; Step 4: Initial evaluation and optimal position setting: Calculate the fitness value of each individual, set the historical optimal position of each individual according to the fitness value, and find the global optimal solution. The fitness value function f(X) for calculating the fitness value satisfies: f(X)=-P B (N,d,α)+0.01·C(N,d)+penalty N +penalty d , penalty N and penalty d Penalty for exceeding the boundary; Step 5: The main loop iteration begins: set the number of iterations and convergence criteria, enter the main loop iteration, in which the genetic algorithm operation part performs selection, crossover and mutation operations to generate a new population; and for each individual, based on the current speed Personal optimal position and the global optimal solution g best Update the speed and position to get the particle swarm optimization, Update speed satisfy: is the current position, ω is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random factors, Updated location satisfy: And limit x by boundary conditions i,j To the extent practicable: x i,j is the jth parameter of individual i; Step 6: Based on the obtained new population and particle swarm optimization, the GA-PSO parameters are dynamically adjusted in each generation; Step 7: Perform local search on the global optimal solution every several generations to form a small perturbation, and fine-tune the current global optimal solution to make the result closer to the optimal value; When the result reaches the preset maximum number of iterations or meets the convergence criteria, the final optimal solution is output, which is the composite pipe structure size; Otherwise, repeat steps 5 to 7.
2. The method for determining the structural dimensions of a composite pipe based on a GA-PSO joint algorithm according to claim 1, characterized in that: In step 3, the optimization parameter vector X = [N, d, α] for each individual T .
3. The method for determining the structural dimensions of a composite pipe based on a GA-PSO joint algorithm according to claim 1, characterized in that: In step five, the probability of selection is calculated by the inverse of the individual fitness, crossover adopts a multi-point crossover strategy, and mutation introduces random disturbance to maintain population diversity.
4. The method for determining the structural dimensions of a composite pipe based on a GA-PSO joint algorithm according to claim 1, characterized in that: In step 5, after each iteration, the optimal position of each particle is updated. and the global optimal solution g best , when the individual's current fitness is better than its historical best value, update When the individual's fitness is better than the current global optimal solution, update g best .
5. The method for determining the structural dimensions of a composite pipe based on a GA-PSO combined algorithm according to claim 1, characterized in that: In step five, in each iteration, the selection, crossover, and mutation operations of GA and the speed and position update operations of PSO are performed alternately to utilize the global search capability of GA and the fast convergence of PSO.
6. The method for determining the structural dimensions of a composite pipe based on a GA-PSO combined algorithm according to claim 1, characterized in that: In step 6, the dynamically adjusted GA-PSO parameters include the inertia weight ω, crossover rate, and mutation rate to balance exploration and exploitation during the search process. The inertia weight ω adjustment formula is:
7. The method for determining the structural dimensions of a composite pipe based on a GA-PSO combined algorithm according to claim 1, characterized in that: In step 7, fine-tuning the current global optimal solution refers to g best Add σ to the basis, σ~μ(-0.05, 0.05).
8. The method for determining the structural dimensions of a composite pipe based on a GA-PSO combined algorithm according to claim 1, characterized in that: When outputting the final optimal solution, the preset maximum number of iterations is less than k+1; or, there is no significant difference in the global optimal solutions of two consecutive iterations.