Aerodynamic configuration optimization method and system based on two-stage particle swarm optimization algorithm
By employing a two-stage particle swarm optimization algorithm, which combines random and fixed inertial weight strategies with learning factors and b-spline fitting, the problem of insufficient global exploration and local convergence capabilities of traditional single-stage particle swarm optimization algorithms in aerodynamic shape optimization is solved, achieving highly efficient aerodynamic shape optimization results.
Patent Information
- Application Number
- CN202610102758.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-03-20
AI Technical Summary
In aerodynamic shape optimization, the traditional single-stage particle swarm optimization algorithm has difficulty simultaneously taking into account both global exploration and local convergence capabilities, resulting in poor optimization performance.
A two-stage particle swarm optimization algorithm is adopted. In the first stage, a random inertia weight strategy is used for global search. In the second stage, a fixed inertia weight strategy is used for local optimization. The inertia weight is dynamically selected by the random inertia weight strategy. Combined with the predefined learning factor and the historical best value of the particle swarm, a global optimal value sequence is constructed. The particles are screened by cubic b-spline fitting to determine the particles for the second stage. In the second stage, the fixed inertia weight and learning factor are used for iterative update to determine the target global optimal particle.
It improves the effectiveness and efficiency of aerodynamic shape optimization. Through a phased optimization strategy of global search and local convergence, it achieves efficient aerodynamic shape optimization and avoids the shortcomings of global exploration and local convergence capabilities in traditional algorithms.
Smart Images

Figure CN121706263A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wing design technology, and in particular to an aerodynamic shape optimization method and system based on a two-stage particle swarm optimization algorithm. Background Technology
[0002] When solving aerodynamic shape optimization (ASO) problems, the effectiveness and efficiency of the optimization method are two key metrics for evaluating algorithm performance. Effectiveness is mainly reflected in whether the optimization result can approach the global optimum, while efficiency reflects the number of times the objective function needs to be evaluated before obtaining the global optimum.
[0003] For the ASO problem, commonly used optimization strategies are mainly divided into two categories: local optimization methods and global optimization methods. Local optimization methods (such as gradient-based adjoint methods) have the advantage of high computational efficiency, but are prone to getting trapped in local optima; conversely, global optimization methods (such as genetic algorithms and particle swarm optimization algorithms) have the characteristic of strong global search capabilities, but have higher computational costs and relatively lower efficiency. To combine the advantages of both, researchers have proposed a number of improved algorithms to enhance global search capabilities and accelerate convergence speed.
[0004] Particle Swarm Optimization (PSO), as a typical global optimization method, has been widely used in Aerodynamic Optimization (ASO). However, in aerodynamic optimization problems, the fixed inertia weight coefficient of the traditional single-stage PSO algorithm makes it difficult to simultaneously consider global exploration and local convergence capabilities. When the inertia weight is too large, particles jump around extensively in the search space, making stable convergence difficult; when the inertia weight is too small, the particle swarm is prone to getting trapped in local optima, reducing global search efficiency and ultimately leading to poor optimization results for aerodynamic shape. Summary of the Invention
[0005] This invention provides an aerodynamic shape optimization method and system based on a two-stage particle swarm optimization algorithm, which solves the technical problem that the fixed inertia weight coefficient of the traditional single-stage PSO algorithm in aerodynamic optimization problems is difficult to simultaneously take into account global exploration and local convergence capabilities, resulting in poor aerodynamic shape optimization effect.
[0006] The first aspect of this invention provides an aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm, comprising:
[0007] In response to the optimization request, based on the predefined range of values for the class shape transformation variable, initialize each first-stage particle in the particle swarm.
[0008] A global optimal value sequence is constructed and output by adopting a random inertia weighting strategy based on a predefined learning factor, the historical individual optimal value of each particle in the first stage, and the global optimal value of the population corresponding to the particle swarm.
[0009] A second-stage particle selection process is performed using cubic b-splines based on the global optimal value sequence to determine multiple second-stage particles.
[0010] The predefined fixed inertia weights and the predefined learning factor are used to iteratively update each second-stage particle to determine the target globally optimal particle;
[0011] Based on the shape transformation variables corresponding to the target global optimal particle, the airfoil geometric shape coordinates are calculated, and the airfoil geometric shape coordinates are used to achieve aerodynamic shape optimization.
[0012] Optionally, the step of employing a random inertia weighting strategy to construct a global optimal value sequence based on a predefined learning factor, the historical individual optimal values of each particle in the first stage, and the global optimal value of the population corresponding to the particle swarm, and outputting the global optimal value sequence, includes:
[0013] Based on the aforementioned random inertia weight strategy, inertia weights are randomly selected;
[0014] The inertial weight, the predefined learning factor, the historical individual optimality of each first-stage particle, and the global optimality of the population corresponding to the particle swarm are used to update each first-stage particle to obtain multiple updated first-stage particles.
[0015] Calculate the objective function value corresponding to each of the updated first-stage particles based on the shape transformation variables corresponding to each of the updated first-stage particles;
[0016] The historical individual optimality of each first-stage particle and the global optimality of the population corresponding to the particle swarm are updated using the updated objective function value of each first-stage particle, and the current iteration step number is counted in real time.
[0017] When the current iteration step reaches a preset step threshold, a global optimum value sequence is constructed based on the global optimum of the population recorded when the current iteration step reaches the preset step threshold and the global optimum of the population recorded in multiple future iteration steps.
[0018] Optionally, the step of using cubic b-splines to perform a second-stage particle selection based on the global optimal value sequence to determine multiple second-stage particles includes:
[0019] Perform a logarithmic transformation on the global optimum sequence to obtain the transformed global optimum sequence;
[0020] The transformed global optimum sequence and the number of iteration steps corresponding to the global optimum of each population in the transformed global optimum sequence are taken as continuous variables, and a second-differentiable continuous curve is obtained by fitting the cubic b-spline.
[0021] Extract the first and second derivatives corresponding to each iteration step from the second-differentiable continuous curve, and calculate the curvature corresponding to each iteration step based on the first and second derivatives corresponding to each iteration step.
[0022] The number of iterations corresponding to any second derivative that is less than the second derivative threshold is taken as the target number of iterations.
[0023] Among the curvatures corresponding to each target iteration step, the target iteration step corresponding to the largest curvature is selected as the candidate iteration step.
[0024] Determine whether the absolute value of the change in the first derivative associated with the future iteration steps corresponding to the candidate iteration step is less than the first derivative threshold;
[0025] If so, the candidate iteration step number is taken as the first stage stopping point, and each first stage particle corresponding to the first stage stopping point is taken as the second stage particle.
[0026] Optionally, the step of iteratively updating each second-stage particle using predefined fixed inertia weights and the predefined learning factor to determine the target globally optimal particle includes:
[0027] The predefined fixed inertia weights and the predefined learning factors are used to update each second-stage particle to determine multiple updated second-stage particles;
[0028] Calculate the objective function value corresponding to each of the updated second-stage particles based on the shape transformation variables corresponding to each of the updated second-stage particles;
[0029] The historical individual optimum of each second-stage particle and the global population optimum of the second-stage particle swarm are updated using the updated objective function values of each second-stage particle;
[0030] When the iteration termination condition is met, the population global optimum determined when the iteration termination condition is met is taken as the target global optimum particle.
[0031] The second aspect of this invention provides an aerodynamic shape optimization system based on a two-stage particle swarm optimization algorithm, comprising:
[0032] The response module is used to respond to optimization requests and initialize each first-stage particle in the particle swarm based on the predefined range of values for class shape transformation variables.
[0033] The construction module is used to construct a global optimal value sequence based on a predefined learning factor, the historical individual optimal value of each particle in the first stage, and the global optimal value of the population corresponding to the particle swarm, and output the global optimal value sequence.
[0034] The screening module is used to perform second-stage particle screening based on the global optimal value sequence using cubic b-splines to determine multiple second-stage particles;
[0035] The update module is used to iteratively update each second-stage particle using a predefined fixed inertia weight and the predefined learning factor to determine the target globally optimal particle.
[0036] The optimization module is used to calculate the airfoil geometric shape coordinates based on the shape transformation variables corresponding to the target global optimal particle. The airfoil geometric shape coordinates are used to achieve aerodynamic shape optimization.
[0037] Optionally, the building module is specifically used for:
[0038] Based on the aforementioned random inertia weight strategy, inertia weights are randomly selected;
[0039] The inertial weight, the predefined learning factor, the historical individual optimality of each first-stage particle, and the global optimality of the population corresponding to the particle swarm are used to update each first-stage particle to obtain multiple updated first-stage particles.
[0040] Calculate the objective function value corresponding to each of the updated first-stage particles based on the shape transformation variables corresponding to each of the updated first-stage particles;
[0041] The historical individual optimality of each first-stage particle and the global optimality of the population corresponding to the particle swarm are updated using the updated objective function value of each first-stage particle, and the current iteration step number is counted in real time.
[0042] When the current iteration step reaches a preset step threshold, a global optimum value sequence is constructed based on the global optimum of the population recorded when the current iteration step reaches the preset step threshold and the global optimum of the population recorded in multiple future iteration steps.
[0043] Optionally, the filtering module is specifically used for:
[0044] Perform a logarithmic transformation on the global optimum sequence to obtain the transformed global optimum sequence;
[0045] The transformed global optimum sequence and the number of iteration steps corresponding to the global optimum of each population in the transformed global optimum sequence are taken as continuous variables, and a second-differentiable continuous curve is obtained by fitting the cubic b-spline.
[0046] Extract the first and second derivatives corresponding to each iteration step from the second-differentiable continuous curve, and calculate the curvature corresponding to each iteration step based on the first and second derivatives corresponding to each iteration step.
[0047] The number of iterations corresponding to any second derivative that is less than the second derivative threshold is taken as the target number of iterations.
[0048] Among the curvatures corresponding to each target iteration step, the target iteration step corresponding to the largest curvature is selected as the candidate iteration step.
[0049] Determine whether the absolute value of the change in the first derivative associated with the future iteration steps corresponding to the candidate iteration step is less than the first derivative threshold;
[0050] If so, the candidate iteration step number is taken as the first stage stopping point, and each first stage particle corresponding to the first stage stopping point is taken as the second stage particle.
[0051] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the aerodynamic shape optimization method based on the two-stage particle swarm optimization algorithm as described above.
[0052] The fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, it implements the aerodynamic shape optimization method based on the two-stage particle swarm optimization algorithm as described above.
[0053] The fifth aspect of the present invention provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein, when the program instructions are executed by a computer, the computer performs the steps of the aerodynamic shape optimization method based on the two-stage particle swarm optimization algorithm as described above.
[0054] As can be seen from the above technical solutions, the present invention has the following advantages:
[0055] The above-mentioned technical solution of the present invention provides an aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm. When aerodynamic shape optimization is required, each first-stage particle in the particle swarm is initialized based on a predefined range of values for shape transformation variables. A random inertia weight strategy is used to construct a global optimal value sequence based on a predefined learning factor, the historical individual optimal values of each first-stage particle, and the global optimal value of the corresponding population in the particle swarm, and outputs the global optimal value sequence. Cubic b-splines are used to screen second-stage particles based on the global optimal value sequence to determine multiple second-stage particles. A predefined fixed inertia weight and a predefined learning factor are used to optimize the aerodynamic shape. Each second-stage particle undergoes iterative updates to determine the target globally optimal particle. Based on the shape transformation variables corresponding to the target globally optimal particle, the airfoil geometric coordinates are calculated, and these coordinates are used to optimize the aerodynamic shape. Based on the above scheme, this invention adopts a two-stage optimization strategy: In the first stage (global stage), the particle swarm uses random inertial weights to enhance the global search capability of the swarm, enabling particles to explore the optimal solution throughout the design space and avoiding premature convergence; in the second stage (local stage), fixed inertial weights are set to emphasize the local search capability of particles within the optimal solution region, allowing for fine-tuning of the initial solution. Through this phased weight control strategy, efficient local convergence can be achieved while ensuring global search capability, thereby improving the optimization effect of the aerodynamic shape. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is a flowchart illustrating the steps of an aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm provided in Embodiment 1 of the present invention.
[0058] Figure 2 This is a comparison chart of single-stage and two-stage convergence curves when dv=2, provided in Embodiment 1 of the present invention.
[0059] Figure 3 This is a comparison chart of single-stage and two-stage convergence curves when dv=4 provided in Embodiment 1 of the present invention;
[0060] Figure 4 This is a comparison chart of the single-stage and two-stage PSO optimization convergence curves of the NACA0012 airfoil provided in Embodiment 1 of the present invention.
[0061] Figure 5This is a comparison diagram of the single-stage and two-stage PSO optimized geometry of the NACA0012 airfoil provided in Embodiment 1 of the present invention;
[0062] Figure 6 A comparison of single-stage and two-stage PSO optimized pressure distribution of the NACA0012 airfoil provided in Embodiment 1 of the present invention;
[0063] Figure 7 This is a flowchart illustrating an aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm provided in Embodiment 1 of the present invention.
[0064] Figure 8 This is a structural block diagram of an aerodynamic shape optimization system based on a two-stage particle swarm optimization algorithm, provided in Embodiment 2 of the present invention. Detailed Implementation
[0065] This invention provides an aerodynamic shape optimization method and system based on a two-stage particle swarm optimization algorithm, which solves the technical problem that the fixed inertia weight coefficient of the traditional single-stage PSO algorithm in aerodynamic optimization problems is difficult to simultaneously take into account global exploration and local convergence capabilities, resulting in poor aerodynamic shape optimization effect.
[0066] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be noted that in the optional embodiments of the present invention, the object information and other related data involved require the permission or consent of the object when the embodiments of the present invention are applied to specific products or technologies, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. That is to say, if the embodiments of the present invention involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations, and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required, and the embodiments also need to be implemented with the authorization and consent of the object.
[0067] Please see Figure 1 , Figure 1 This is a flowchart illustrating the steps of an aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm, as provided in Embodiment 1 of the present invention.
[0068] This invention provides an aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm, comprising:
[0069] Step 101: Respond to the optimization request and initialize each first-stage particle in the particle swarm based on the predefined range of values for the class shape transformation variable.
[0070] Class-Shape Transformation (CST) variables are parameters used to quantify the core geometric features of aerodynamic shapes such as airfoils. By adjusting their values, the geometric shape of the aerodynamic shape can be precisely controlled. They are the core carrier connecting particle swarm optimization and aerodynamic shape design.
[0071] The range of values for shape transformation variables refers to the reasonable range of values for shape transformation variables that are pre-set based on engineering constraints, processing requirements, and aerodynamic performance requirements of aerodynamic shape design. This range is used to limit the effectiveness of the variable combinations corresponding to particles and avoid invalid shape designs.
[0072] It should be noted that, based on the predefined range of values for shape transformation variables, each first-stage particle in the particle swarm is initialized. Each first-stage particle corresponds to a set of shape transformation variable combinations, and the variable values strictly fall within the predefined range to match the aerodynamic shape design constraints, thus providing a basic particle set for the subsequent first-stage global search.
[0073] Step 102: Using a random inertia weighting strategy, construct a global optimal value sequence based on the predefined learning factor, the historical individual optimal value of each first-stage particle, and the global optimal value of the corresponding particle swarm, and output the global optimal value sequence.
[0074] It should be noted that a random inertia weight strategy is used to dynamically select inertia weights. Combined with predefined learning factors, the historical individual optimal values of each particle in the first stage, and the global optimal values of the corresponding particle swarm, the particles are iteratively updated. The global optimal values of the corresponding swarm are recorded synchronously for each iteration. Based on this, a global optimal value sequence is constructed and output to provide data support for the subsequent particle selection in the second stage.
[0075] Furthermore, step 102 may include the following sub-steps:
[0076] S21. Based on the random inertia weight strategy, randomly select inertia weights;
[0077] S22. The first-stage particles are updated using inertial weights, predefined learning factors, the historical individual optimality of each first-stage particle, and the global optimality of the population corresponding to the particle swarm, resulting in multiple updated first-stage particles.
[0078] S23. Calculate the objective function value corresponding to each updated first-stage particle based on the shape transformation variable corresponding to each updated first-stage particle.
[0079] S24. Update the historical individual optimality of each first-stage particle and the global optimality of the population corresponding to the particle swarm using the updated objective function value of each first-stage particle, and count the current iteration step in real time.
[0080] S25. When the current iteration step reaches the preset step threshold, construct a global optimal value sequence based on the global optimum of the population recorded when the current iteration step reaches the preset step threshold and the global optimum of the population recorded in multiple future iteration steps.
[0081] The random inertia weight strategy refers to the strategy of randomly selecting inertia weights from a predefined interval in the first stage of optimization. It is used to flexibly adjust the search inertia of particles to adapt to the needs of global exploration and is a key strategy to ensure the rationality of the global search range in the first stage.
[0082] It should be noted that the two-stage particle swarm optimization algorithm proposed in this invention, based on traditional PSO, introduces a curvature-based adaptive stopping point determination mechanism, realizing a phased optimization strategy from global search to local fine-grained search. Specifically:
[0083] 1. Parameter initialization: Let the size of the particle swarm be N, the search dimension be DV, and the maximum number of iterations be T. max The inertial weight is w, the predefined learning factors are c1 and c2, and the velocity and position of each particle in the particle swarm are initialized according to the predefined range of values for the shape transformation variables.
[0084] 2. First Phase Optimization: Global Search Phase
[0085] (a) Randomly select inertia weights w∈[0.4,0.9] for global search;
[0086] (b) Update velocity and position in each iteration according to the standard PSO update formula:
[0087] ;
[0088] in, Let be the velocity of the i-th first-stage particle in the (t+1)-th iteration, representing the update rate of the shape transformation variable combination corresponding to the particle, reflecting the change range of aerodynamic shape design parameters; Let be the velocity of the i-th first-stage particle in the t-th iteration; Inertial weights; , For predefined learning factors; , A random number between 0 and 1; For the i-th first-stage particle, the historical individual optimal represents the optimal combination of shape transformation variables (i.e., optimal aerodynamic shape design parameters) during the iteration process of this particle. Let be the position of the i-th first-stage particle at the t-th iteration, and let represent the corresponding combination of shape transformation variables in this iteration, characterizing the current aerodynamic shape design parameters; The global optimum of the population corresponding to the particle swarm represents the optimal combination of shape transformation variables (i.e., the globally optimal aerodynamic shape design parameters) during the entire first-stage particle swarm iteration process. Let be the position of the i-th first-stage particle in the (t+1)-th iteration.
[0089] (c) Record the global optimum value for each iteration ;
[0090] Specifically, based on a random inertia weight strategy, inertia weights are randomly selected (within a predefined reasonable range). Each first-stage particle is updated using its inertia weight, a predefined learning factor, the historical individual optimal value of each first-stage particle, and the global optimal value of the corresponding particle swarm, resulting in multiple updated first-stage particles. The particle velocity and position are adjusted using the standard PSO update formula to adapt the particle's corresponding shape transformation variable combination to the global search. Based on the updated shape transformation variables of each first-stage particle, the objective function value corresponding to each updated first-stage particle is calculated. This value is then substituted into the aerodynamic performance-related objective function model to obtain the aerodynamic shape performance reflecting the current combination of shape transformation variables. The quantitative value is obtained; the historical individual optimum of each first-stage particle and the global optimum of the particle swarm are updated using the objective function value corresponding to each updated first-stage particle, and the current iteration step is counted in real time. If the objective function value of the updated particle is better, the original historical individual optimum is replaced; if the particle is the best in the current particle swarm, the global optimum of the swarm is updated synchronously, and the number of iterations is accumulated and recorded; when the current iteration step reaches the preset step threshold, the global optimum of the swarm recorded when the current iteration step reaches the preset step threshold and the global optimum of the swarm recorded in multiple future iteration steps are used to construct a global optimum value sequence, that is, the global optimum of the swarm corresponding to each subsequent iteration is continuously recorded, and these optimal results are organized into an ordered set according to the iteration step order. This step adapts the global search requirements by random inertial weights, combines the objective function value to dynamically update the optimal information and construct the global optimum value sequence in a targeted manner. This avoids the problem of particle convergence when the fixed inertial weights of traditional single-stage PSO are too large, and ensures the sufficiency of global exploration, laying the foundation for accurate selection in subsequent stages and helping to improve the effectiveness of aerodynamic shape optimization.
[0091] Among them, the objective function model related to aerodynamic performance refers to a mathematical model that transforms core aerodynamic performance indicators such as lift coefficient, drag coefficient, and lift-to-drag ratio into quantifiable calculations based on the requirements of aerodynamic shape optimization. Its input is a combination of shape transformation variables, and its output is an objective function value that reflects the performance of the corresponding aerodynamic shape. It is the core basis for judging the quality of particles (combinations of shape transformation variables) and updating the individual optimum and the global optimum of the population. It is directly related to the core requirements of aerodynamic shape design (such as drag reduction, lift increase, and improvement of aerodynamic efficiency).
[0092] Step 103: Use cubic b-splines to perform second-stage particle screening based on the global optimal value sequence to determine multiple second-stage particles.
[0093] Cubic b-splines are a piecewise cubic polynomial interpolation method used for data fitting, which has good smoothness and approximation. Here, they are used to fit discrete "transformed global optimum - iteration steps" data pairs into a second-differentiable continuous curve, providing a continuous data basis for the extraction of derivatives and curvature.
[0094] It should be noted that the common termination conditions in the traditional PSO algorithm mainly include the following:
[0095] 1. Until the preset maximum number of iterations;
[0096] 2. When the global optimum converges to a given threshold, the algorithm considers it to have reached a stable state.
[0097] 3. When the average velocity or position change of the particle swarm approaches zero, it indicates that the swarm has essentially stopped searching.
[0098] However, these traditional termination conditions mostly rely on empirical parameters or are manually set, making it difficult to adaptively reflect the true convergence state of the optimization process, which may lead to premature termination or invalid iterations. In a staged particle swarm optimization structure, the core objective of the first stage is to quickly obtain the convergence trend and automatically determine a reasonable stopping point to provide a high-quality initial solution for the second stage. To this end, this invention proposes an adaptive stopping point criterion based on curvature, and also incorporates a concavity / convexity determination mechanism and derivative stability judgment to automatically determine the convergence stopping point of the first-stage optimization process, thereby significantly improving optimization efficiency while ensuring accuracy.
[0099] In the first stage of optimization, the curvature is not analyzed all at once after optimization, but rather its changes are calculated and monitored in real time during each iteration. Let the global optimum sequence of the optimization process be... , where t is the number of iterations. To more sensitively capture the changing trend of the optimization curve, a logarithmic transformation is performed on the sequence to obtain... After each iteration, points from the current round and previous rounds are selected as a sequence and treated as a continuous sequence varying with the round number. Then, a cubic b-spline is used to fit this sequence to obtain a second-differentiable continuous curve. The curvature is then calculated according to the definition of curvature. The geometric curvature of this curve is defined as:
[0100] ;
[0101] in, x=t represents the number of iterations. Curvature reflects the degree of curvature of the curve. A large value indicates a significant change in the optimization speed or trend, typically corresponding to a turning point in the optimization curve. Therefore, the main objective of this invention is to find the peak curvature of the first-stage optimization curve. However, since the global optimum decreases rapidly in the early stages of optimization, the optimization curve is usually convex (i.e., second derivative y > 0). In this case, the peak curvature often reflects changes in the early stages of rapid convergence rather than a true turning point. Therefore, to avoid misjudgment, convexity is used as an additional condition for a valid stopping point.
[0102] y"<0;
[0103] That is, only when the optimization curve enters the concave stage, at which point the convergence rate slows down and the change tends to stabilize, does the peak curvature have physical significance and can be considered as a candidate for the upper-level termination point. Then, based on the selection of the stopping point based on the maximum curvature, within the region that satisfies the concave condition, the algorithm finds the iteration step corresponding to the maximum curvature by dynamically monitoring the curvature value. :
[0104] ;
[0105] Point of maximum curvature This typically corresponds to an inflection point or the point of most significant change in the convergence curve. Before this point, the algorithm converges relatively quickly, and the particle swarm is still actively searching the global space; after this point, the convergence speed decreases significantly, and the search gradually focuses on local regions. Therefore, using this point as an adaptive stopping point is reasonable and efficient.
[0106] Finally, to ensure that the found point is the inflection point between the curve's descent and convergence, and to avoid misjudgment, the algorithm also calculates the first derivative for 10 rounds after that stopping point:
[0107] ;
[0108] in, , This represents the first derivative of the sum of the first and second derivatives of the two points. The parameter value for determining the stationarity of the derivative is set to 0.01 in the algorithm. That is, if the change in the first derivative is less than 0.01 within 10 rounds after this point, it indicates that the curve has entered the convergence phase and the global optimum is decreasing slowly. At this point, this point is suitable as the stopping point for the first stage.
[0109] In summary, the first-stage stopping point (i.e., the stop point of the upper-level optimization) is considered to have been reached when the following three conditions are met simultaneously:
[0110] ;
[0111] At this point, it is considered that the algorithm's convergence speed has slowed down and the improvement has significantly decreased, so the upper-level iteration should be terminated.
[0112] Specifically, step 103 may include the following sub-steps:
[0113] S31. Perform a logarithmic transformation on the global optimum sequence to obtain the transformed global optimum sequence;
[0114] S32. Take the transformed global optimum sequence and the number of iteration steps corresponding to the global optimum of each population in the transformed global optimum sequence as continuous variables, and obtain a second-differentiable continuous curve by cubic b-spline fitting.
[0115] S33. Extract the first and second derivatives corresponding to each iteration step from the twice differentiable continuous curve, and calculate the curvature corresponding to each iteration step based on the first and second derivatives corresponding to each iteration step.
[0116] S34. Take the number of iterations corresponding to any second derivative that is less than the second derivative threshold as the target number of iterations;
[0117] S35. Among the curvatures corresponding to each target iteration step, select the target iteration step corresponding to the largest curvature as the candidate iteration step.
[0118] S36. Determine whether the absolute value of the change in the first derivative associated with the candidate iteration step is less than the first derivative threshold.
[0119] S37. If so, then the candidate iteration step number is taken as the first stage stopping point, and each first stage particle corresponding to the first stage stopping point is taken as the second stage particle.
[0120] The future iteration step number refers to the number of consecutive iteration steps after the candidate iteration step number. It is used to verify whether the convergence state corresponding to the candidate iteration step number is sustainable and to avoid misjudging the stopping point due to accidental fluctuations.
[0121] It should be noted that after reaching the preset step threshold (the 10th iteration), the logarithmic form of the current convergence curve is calculated in real time. The curvature is calculated by obtaining the first and second derivatives through cubic B-spline fitting.
[0122] ;
[0123] in, The curvature corresponding to the t-th iteration is, in physical terms, the degree of curvature of the logarithmic convergence curve of the global optimum sequence at that iteration number. It is used to reflect the fluctuation characteristics of the global optimum (corresponding to aerodynamic performance) as the number of iterations changes, and is one of the core criteria for selecting the target iteration number. It is the second derivative; It is the first derivative.
[0124] The first-stage stop point is determined when the following conditions are met. :
[0125] ;
[0126] At this point, the algorithm is considered to have entered the convergence region, and the first stage of optimization is stopped. The first stage stopping round is then read. The globally optimal round gBestIter and the optimal particle number. The particle corresponding to gBestIter is taken as the optimal particle for the first stage:
[0127] ;
[0128] Pass it to the second phase as the initial optimal particle, and replace the initial particle swarm of the second phase with all the particles from the first phase for that round:
[0129] ;
[0130] in, Stop the first phase round Below, numbered The combination of shape transformation variables corresponding to the first-stage optimal particle (i.e., the design parameters of the optimal aerodynamic shape carried by the particle), i.e., the shape transformation variables corresponding to the first-stage particle; Stop the first phase round At that time, the number was The optimal position of the particle, i.e., the combination of shape transformation variables corresponding to that particle; The set of shape transformation variables corresponding to the initial particle swarm in the second stage is based on the stopping round in the first stage. The initial shape transformation variables of the second-stage particles are obtained by replacing the shape transformation variables of all particles, which realizes the transfer of the global search results from the first stage to the second stage. Stop the first phase round In the diagram, gBestIter corresponds to the optimal particle number, which is the number of the first-stage particle corresponding to the global best in this round. gBestIter is the stopping round of the first stage. The corresponding global optimum of the population is the global optimum of the population corresponding to the first stage stopping point; This refers to the iteration rounds corresponding to the first-stage stopping point.
[0131] It is worth mentioning that the first phase stop point The corresponding gBestIter round is used as the global optimal round in the first stage. Then, the positions of all particles in the gBestIter round are used to replace the initial particle swarm positions in the second stage, achieving a natural transition between the two stages of optimization. The velocities and optimal information of the particles do not need to be replaced; they will be automatically generated in the second stage.
[0132] In this embodiment, a logarithmic transformation is performed on the global optimum sequence to obtain a transformed global optimum sequence. This transformation enhances the convergence trend identification of the global optimum sequence and weakens the interference of extreme value fluctuations on subsequent analysis. The transformed global optimum sequence and the iteration steps corresponding to the global optimum of each population in the transformed global optimum sequence are used as continuous variables (where the iteration steps are the independent variable and the transformed global optimum is the dependent variable). A second-order differentiable continuous curve is obtained through cubic b-spline fitting. This fitting process smooths the discrete global optimum sequence, providing a continuous data foundation for accurately extracting derivative information. The first and second derivatives corresponding to each iteration step are extracted from the second-order differentiable continuous curve. Based on the first and second derivatives corresponding to each iteration step, the curvature corresponding to each iteration step is calculated using the curvature calculation formula. The curvature magnitude can quantitatively reflect the degree of bending of the continuous curve, indirectly characterizing the convergence fluctuation characteristics of the global optimum. The iteration step corresponding to any second derivative less than the second derivative threshold is used as... For the target iteration number, a second derivative less than a threshold indicates that the curve is in a concave convergence phase, where the rate of change of the global optimum decreases, corresponding to a phase where the convergence trend gradually stabilizes during global exploration. Among the curvatures corresponding to each target iteration number, the target iteration number corresponding to the largest curvature is selected as the candidate iteration number. The point of maximum curvature corresponds to the position where the curve bends most significantly, i.e., the key node where the convergence trend of the global optimum changes significantly, and can serve as a potential boundary point for the transition from the first stage of exploration to the second stage of optimization. It is determined whether the absolute value of the change of the first derivative associated with the candidate iteration number for future iteration steps is less than the first derivative threshold. By verifying the stability of the change of the first derivative in subsequent iterations, the sustainability of the convergence state corresponding to the candidate iteration number is ensured, avoiding misjudgment of the stopping point due to accidental fluctuations. If so, the candidate iteration number is taken as the first stage stopping point, and each first-stage particle corresponding to the first-stage stopping point is taken as the second-stage particle, achieving a precise connection between the first-stage global exploration and the second-stage local optimization. This invention uses logarithmic transformation, cubic b-spline fitting, and multi-dimensional derivative and curvature determination to accurately select the optimal stopping node in the first stage. This ensures that the first stage fully leverages the global exploration advantage of the stochastic inertial weight strategy while also terminating ineffective exploration in a timely manner. The particle swarm with a stable convergence trend is then transferred to the second stage. This effectively compensates for the shortcomings of the traditional single-stage PSO algorithm, which struggles to balance global exploration and local convergence with fixed inertial weights. This lays a high-quality data foundation for the subsequent second stage to achieve precise local optimization using fixed inertial weights, thereby improving the overall effect and efficiency of aerodynamic shape optimization.
[0133] Step 104: Iteratively update each second-stage particle using predefined fixed inertia weights and predefined learning factors to determine the target globally optimal particle.
[0134] It should be noted that the second-stage particle swarm optimization (PSO) is initialized based on the results of the first stage; a smaller inertia weight is set, i.e., a predefined fixed inertia weight (e.g., w=0.4), to enhance local search capabilities; and the PSO update iteration continues until any of the following conditions (i.e., the iteration termination condition) is met:
[0135] 1) Achieve target accuracy ;
[0136] 2) Reaching the maximum number of iterations .
[0137] When any of the above conditions are met, the global optimal solution gbest for the second stage is obtained. (2) As the final optimization result, the final optimal solution (i.e., the target globally optimal particle) is output. Optimal objective function value and the first phase stop point .
[0138] Furthermore, step 104 may include the following sub-steps:
[0139] S41. Update each second-stage particle using predefined fixed inertia weights and predefined learning factors to determine multiple updated second-stage particles.
[0140] S42. Calculate the objective function value corresponding to each updated second-stage particle based on the shape transformation variable corresponding to each updated second-stage particle.
[0141] S43. Using the updated objective function values corresponding to each second-stage particle, update the historical individual optimal value of each second-stage particle and the global population optimal value corresponding to the second-stage particle swarm.
[0142] S44. When the iteration termination condition is met, the population global optimum determined when the iteration termination condition is met is taken as the target global optimum particle.
[0143] It should be noted that after obtaining the stopping point of the first stage, the optimal particle at that point needs to be used as the initial solution for the next stage. The specific steps are as follows: When the first-stage optimization algorithm iterates to... Stop at the end of the round, find the result file corresponding to that round, and obtain the optimal particle number for that round. Then, go to the psoOutput file generated during training, find the optimal particle with the corresponding number, and record the design variables corresponding to the optimal particle at this time. The value of is then added to the dvInit file of the second-stage initialization file, replacing any particle. Because this particle represents the optimal solution of the first stage and has better optimization results than other randomly generated particles, it will be directly used as the initial optimal solution in the second-stage training to achieve a natural transition between the stages of optimization.
[0144] ;
[0145] It is important to note that in the specific implementation process, there are two strategies for transferring the optimal solution from the first stage to the second stage:
[0146] 1) Full particle replacement strategy: Replace all particle design variables (i.e. the entire swarm in the first phase stop round) with the initial particle swarm in the second phase;
[0147] 2) Single-particle embedding strategy: Only the best particle of this round is inserted into the initial population of the second stage, and the remaining particles are initialized randomly or uniformly.
[0148] The two strategies have different impacts on subsequent optimization. The former preserves the overall distribution information of the population in the first stage, enabling the second stage to continue searching efficiently within the convergence region, thereby accelerating the convergence speed; the latter, due to the reinitialization of the population distribution, may lead to the loss of the search information already obtained, thus reducing the accuracy and efficiency of local optimization. Therefore, this invention adopts the full particle replacement strategy.
[0149] In summary, the curvature-based adaptive stopping point criterion provides an efficient, stable, and adaptive optimization stage connection mechanism for the two-stage PSO algorithm, enabling a better balance between accuracy and efficiency in the two-stage optimization structure, and achieving the following objectives:
[0150] 1) Real-time monitoring and dynamic judgment: No need to preset the number of iterations or thresholds;
[0151] 2) Curvature screening based on concavity / convexity: avoids misjudgment of early false peaks;
[0152] 3) Naturally connect two-stage optimization: the first stage is fast global search, and the second stage is high-precision local optimization;
[0153] 4) Significantly improve efficiency and stability: ensure the rationality of the stopping point and the adaptability of the algorithm.
[0154] Specifically, predefined fixed inertia weights and predefined learning factors are used to update each second-stage particle, determining multiple updated second-stage particles. The particle velocity and position are adjusted using the standard PSO update formula, finely adjusting the particle's corresponding shape transformation variable combination to focus on the optimal region transferred from the first stage. Based on the shape transformation variables corresponding to each updated second-stage particle, the objective function value corresponding to each updated second-stage particle is calculated, i.e., substituted into the aerodynamic performance-related objective function model, to obtain a quantitative value reflecting the fine performance of the aerodynamic shape corresponding to the current shape transformation variable combination. The updated second-stage particles are then used to refine the particle's shape transformation performance. The objective function value corresponding to the particles in the second stage is updated. The historical individual optimal value of each particle in the second stage and the global optimum of the particle swarm in the second stage are updated. If the objective function value of the updated particle is better, the original historical individual optimal value of the particle is replaced. If the particle is the best in the current particle swarm in the second stage, the global optimum of the population is updated synchronously to continuously maintain the real-time optimal state of the second stage. When the iteration termination condition is reached, the global optimum of the population determined when the iteration termination condition is reached is taken as the target global optimum particle. The iteration termination condition can be a preset objective function value accuracy or a preset maximum number of iterations in the second stage, ensuring that the local optimization in the second stage is sufficient and efficient. This step uses a predefined fixed inertia weight in the second stage, combined with the high-quality particle swarm passed from the first stage, to enable the particles to perform precise local iterations in the explored optimal region. This avoids the defects of traditional single-stage PSO, which is prone to getting trapped in local optima when the fixed inertia weight is too small and difficult to converge when it is too large. At the same time, by continuously updating the individual optimal value and the global optimum of the population, the accuracy of the local convergence in the second stage is guaranteed. The shape transformation variable corresponding to the target global optimum particle can support a better airfoil geometry design, effectively improving the effect and accuracy of aerodynamic shape optimization.
[0155] Step 105: Based on the shape transformation variables corresponding to the target global optimal particle, calculate the airfoil geometric shape coordinates. The airfoil geometric shape coordinates are used to achieve aerodynamic shape optimization.
[0156] It should be noted that, based on the shape transformation variables corresponding to the target globally optimal particle, these variables are substituted into a predefined airfoil shape transformation parameterized model. Following the mapping rules between the shape transformation variables and the airfoil profile in the model, a set of discrete coordinate points covering the leading edge, trailing edge, and upper and lower surfaces of the airfoil is calculated; this is the airfoil geometric shape coordinate. These coordinates can be directly imported into aerodynamic performance simulation tools to conduct flow field simulation analysis, obtaining corresponding aerodynamic performance indicators such as lift coefficient, drag coefficient, and lift-to-drag ratio. This verifies whether they meet the preset aerodynamic optimization requirements. If there are slight deviations, the variables can be adjusted in reverse and secondary local optimization can be performed based on the correlation between the coordinates and the shape transformation variables. Simultaneously, these airfoil geometric shape coordinates can also be directly used for airfoil engineering modeling and fabrication adaptation, transforming the optimized aerodynamic shape from the parameter level into a practically applicable airfoil structure, thus completing the entire process of aerodynamic shape optimization. This invention uses airfoil geometry coordinates as the link between optimization results and practical applications. It not only inherits the optimal shape transformation variables obtained by the two-stage PSO algorithm (global exploration + local convergence), but also verifies through simulation and engineering implementation, allowing the optimized aerodynamic shape to truly exert better aerodynamic performance. This makes up for the problem that the optimization results are difficult to accurately implement and the aerodynamic performance is not up to standard due to the fixed inertial weight of the traditional single-stage PSO algorithm, and effectively improves the practicality and effect of aerodynamic shape optimization.
[0157] Among them, the airfoil-type shape transformation parameterization model refers to a pre-constructed mathematical model used to associate shape transformation variables with airfoil geometry. It contains mapping rules from shape transformation variables to airfoil profile coordinates and is the core tool for transforming shape transformation variables into airfoil geometry coordinates.
[0158] Airfoil geometry coordinates refer to the set of discrete coordinate points of the airfoil profile calculated by the airfoil shape transformation parameterization model based on the target global optimal shape transformation variable. It covers the leading edge, trailing edge and upper and lower surfaces of the airfoil. It is a digital representation of the airfoil geometry and the basic data for aerodynamic simulation and engineering manufacturing.
[0159] Aerodynamic performance simulation tools are software tools used to perform flow field analysis on airfoil geometry. They can calculate aerodynamic performance indicators such as lift coefficient and drag coefficient based on airfoil geometry coordinates, and are key tools for verifying the effect of aerodynamic shape optimization.
[0160] It is worth noting that, for the experimental setup, the test function used in this invention is:
[0161] ;
[0162] The optimization objective is to minimize Theoretical optimal solution =0, optimal value =0, the target optimal value is set to The maximum number of iterations is 1000. In the comparative experiment, the single-stage particle swarm optimization algorithm (Single-Stage PSO) uses a random inertia weight update strategy; in the two-stage particle swarm optimization algorithm (TS-PSO), the first stage also uses the random inertia weight update method, and the inertia weight in the second stage is fixed at 0.4. By comparing the convergence performance and stability of the two strategies, the improvement effect of the two-stage optimization mechanism on the global search capability of the algorithm is analyzed. The main parameter settings of the PSO algorithm are shown in Table 1:
[0163] Table 1. Main parameter settings for the PSO algorithm
[0164]
[0165] Furthermore, experiments were conducted for different design dimensions of 2 and 4, yielding convergence curves for single-stage and two-stage optimization. The horizontal axis represents the number of iterations, and the vertical axis represents the global optimum, expressed in logarithmic range. The green curve is the average convergence curve for single-stage optimization, while the red and blue curves are the average convergence curves for the first and second stages of two-stage optimization, respectively. The gray curve represents the convergence curves for different two-stage optimizations with 50 opts.
[0166] Specific curves are as follows: Figure 2 As shown, by comparing the PSO optimization curves of single-stage and two-stage designs, it can be seen that when the design dimension is 2, the single-stage design reaches the target optimum of 1×10 on average in about 120 rounds. -6 This halted the optimization process. The two-stage optimization reached its target optimum in approximately 50 rounds on average, a 58% reduction in rounds compared to a single-stage optimization. In terms of optimization precision, a single-stage optimization reaches a global optimum on the order of 10⁻³ in 60 rounds, while the two-stage optimization achieves... The difference in efficiency is orders of magnitude smaller than that of single-stage optimization, by three orders of magnitude, demonstrating the advantages of two-stage optimization. Looking at the overall convergence trend, the curve for single-stage optimization declines rapidly before 20 rounds, then decreases at a slower rate after 20 rounds, indicating that the ability of single-stage optimization to find local optima is constantly weakening, requiring more rounds to reach the target optimum. Two-stage optimization avoids this problem. In the initial 20 rounds of optimization, it can quickly find the approximate range of the global optimum at a similar speed to single-stage optimization, and it does not decrease its optimization speed after transitioning to the second stage, finding local optima even faster. Therefore, it achieves the optimization effect of single-stage optimization with fewer rounds.
[0167] Furthermore, when the design dimension is 4, the advantages of the two-stage optimization become even more apparent. On average, it only takes 75 rounds to reach the target optimum, while a single-stage optimization requires 280 rounds. Under the condition of achieving the same target value, the two-stage optimization reduces the number of rounds required by the two-stage optimization by 73%, and the optimization speed is 2.7 times faster, fully demonstrating the advantages of the two-stage optimization. Moreover, the advantages of the two-stage optimization are even more pronounced in high-dimensional cases. Different optimization effects can be achieved by adjusting the inertia weight coefficient. The initial random strategy improves the algorithm's global optimization ability, while the two-stage optimization uses a lower inertia weight coefficient to achieve better local optimization ability, ensuring high optimization performance throughout the entire process and improving both optimization effectiveness and efficiency.
[0168] Furthermore, to test the applicability of the two-stage particle swarm optimization algorithm in specific application scenarios, this invention conducted a maximum lift optimization experiment on an airfoil. The initial airfoil used was NACA0012, and the coordinate points (x,y) were saved in shape2D_ori.dat. The airfoil was represented using CST variables, with 5 variables and a defined range. The maximum number of iterations was set to 100. During optimization, globalbest was set as the inverse of the lift, and the optimization objective was to minimize globalbest, representing the maximum lift at that point. During optimization, intermediate airfoils were saved in shape2D.dat, and their lift was calculated using the xfoil program. Then, the particle corresponding to the maximum lift was selected for the next iteration. Both single-stage and two-stage particle swarm optimization methods were used, with other conditions remaining consistent. The number of optimization examples was set to 30 opts. The test results were averaged to eliminate the influence of single-step fluctuations, and the convergence curves for single-stage and two-stage particle swarm optimization were finally obtained. A comparison is shown in the figure below. Figure 4 As shown.
[0169] Figure 4 The average convergence curves for maximum lift optimization of NACA0012 using single-stage and two-stage PSO are presented. The horizontal axis represents the number of iterations, and the vertical axis represents the global optimum, which is the negative of the lift. The green curve represents the average optimization curve of single-stage PSO, the red and blue curves represent the average optimization curves of the first and second stages in the two-stage optimization, and the gray curves represent the optimization curves for each of the 30 opts in the two stages. It can be seen that the global optimum decreases faster and the convergence value is lower in the two-stage optimization than in the single-stage optimization, indicating that the optimized airfoil has greater lift and achieves a better optimization effect. To more intuitively illustrate the optimization results, this invention provides a comparison of the geometry and pressure distribution of the airfoil optimized by single-stage and two-stage PSO, as shown in the figure. Figure 5 , Figure 6 As shown.
[0170] The red curve represents the original airfoil of NACA0012, the green curve represents the final airfoil after single-stage optimization, and the blue curve represents the final airfoil after two-stage optimization. This can be seen from... Figure 5 As shown in Figure 6, both single-stage and two-stage optimization alter the geometry and pressure distribution of the original airfoil. However, two-stage optimization exhibits better pressure distribution characteristics compared to single-stage optimization because the pressure difference between the upper and lower surfaces is greater in two-stage optimization. Integral analysis reveals that the airfoil optimized in two-stage optimization generates higher lift, thus better achieving the optimization objective of maximizing lift. Ultimately, we can conclude that the two-stage particle swarm optimization algorithm not only demonstrates high performance on the test function but also achieves better optimization results compared to single-stage optimization for practical airfoil optimization, sufficiently proving the applicability and refinement of this algorithm in real-world applications.
[0171] In summary, the two-stage particle swarm optimization algorithm proposed in this invention improves the global and local search capabilities of particle swarm optimization through a phased optimization strategy and an adaptive stopping point criterion based on curvature. This results in better convergence accuracy and speed compared to traditional single-stage optimization algorithms. Furthermore, the algorithm demonstrates greater optimization performance for higher-dimensional objective functions, exhibiting excellent optimization capabilities and making it highly suitable for high-dimensional optimization problems. Regarding the algorithm's scalability, future improvements could explore reducing the range of design variables, multi-stage optimization, and hybrid algorithms (such as PSO + quasi-Newton methods) to further refine the algorithm and achieve even better optimization results.
[0172] For comparison of technical effectiveness, existing technologies can be referenced. Particle Swarm Optimization (PSO), as a typical global optimization method, has been widely used in ASO. However, traditional single-stage PSO algorithms still have certain shortcomings in aerodynamic optimization problems: First, fixed inertia weight coefficients are difficult to balance global exploration and local convergence capabilities simultaneously. When the inertia weight is too large, particles jump around extensively in the search space, making stable convergence difficult; when the inertia weight is too small, the particle swarm is prone to getting trapped in local optima, reducing global search efficiency. Second, in high-dimensional or complex design spaces, single-stage PSO usually requires many iterations to achieve acceptable convergence accuracy, resulting in low optimization efficiency.
[0173] To address the aforementioned problems, this invention provides an aerodynamic shape optimization method based on a two-stage particle swarm optimization (TS-PSO) algorithm. It aims to combine hybrid optimization principles with staged adjustment of inertia weights to achieve efficient convergence from global to local optimization. Specifically, the algorithm employs a two-stage optimization strategy: in the first stage (global stage), the particle swarm uses randomized inertia weight coefficients to enhance the global search capability of the population, enabling particles to explore the optimal solution throughout the design space and avoiding premature convergence; in the second stage (local stage), smaller inertia weights are set to emphasize the local search capability of particles within the optimal solution region, allowing for fine-tuning of the initial solution. Through this staged weight control strategy, the algorithm can achieve efficient local convergence while maintaining global search capability, thereby improving the accuracy and efficiency of optimization.
[0174] Specifically, to further improve the efficiency and accuracy of the optimization process, this invention adopts a two-stage particle swarm optimization (TS-PSO) structure. The core idea of this method is to achieve a progressive optimization strategy from global search to local search through two-stage iteration and gradual shrinking of the search space.
[0175] like Figure 7 As shown, the first stage of optimization involves randomly initializing the particle swarm within the domain of the design space and running the standard particle swarm optimization algorithm. Generally, the first stage uses either a random inertia weighting method or a static inertia weighting method. This invention uses the random inertia weighting method (random) to ensure higher global performance. The next step is finding the stopping point of the first stage optimization. Specifically, the stopping point of the algorithm is determined based on a preset convergence criterion or termination condition, obtaining the globally optimal particle swarm optimization (gbest) for this stage. (1) Finding a suitable and accurate stopping point is crucial for ensuring the effectiveness of subsequent optimization. Therefore, the algorithm uses the method of finding the point of maximum curvature to locate the stopping point. During the optimization process, a convergence curve is established based on the global optimum of the current round and the existing rounds. The algorithm then uses cubic b-spline fitting and curvature calculation to determine whether a round should be considered a stopping point, ensuring the accuracy of the stopping point in the first stage of optimization. Once the algorithm finds a stopping point, it automatically terminates the first stage of optimization and proceeds to the second stage.
[0176] Second-stage optimization: After the first-stage optimization is completed, the second-stage optimization process begins. The first step is to optimize the optimal solution gbest obtained in the first-stage optimization. (1) The particle is added to the initial particle swarm in the second stage, and the inertia weight coefficient w is adjusted (usually by taking a smaller value to enhance local search capability). The PSO algorithm is then run again, and the globally optimal particle gbest with higher precision is obtained based on the convergence criterion. (2) .
[0177] By employing this phased optimization strategy, the algorithm can improve the convergence speed and local optimization accuracy in later search stages while maintaining global search capability, thereby achieving higher optimization efficiency and result stability in aerodynamic shape optimization problems. The key to phased optimization lies in accurately finding a suitable stopping point. This stopping point not only determines the convergence quality of the first stage of optimization but also serves as the starting point for the second stage, having a decisive impact on the overall optimization effect. An inappropriate stopping point may lead to the second stage optimization getting stuck in local optima or reduced search efficiency; while an accurate stopping point can improve global search accuracy and computational efficiency while ensuring convergence stability, thus achieving better optimization results. Therefore, the stopping point criteria of the algorithm will be discussed in detail below.
[0178] Based on the above principles, the specific implementation process of the two-stage particle swarm optimization algorithm (TS-PSO) designed in this invention is shown in Tables 2-1 and 2-2:
[0179] Table 2-1 Two-stage particle swarm optimization algorithm
[0180]
[0181] Table 2-2 Two-stage Particle Swarm Optimization Algorithm
[0182]
[0183] In this embodiment of the invention, an aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm is provided. When aerodynamic shape optimization is required, each first-stage particle in the particle swarm is initialized based on a predefined range of values for shape transformation variables. A random inertia weight strategy is used to construct a global optimal value sequence based on a predefined learning factor, the historical individual optimal values of each first-stage particle, and the global optimal value of the corresponding population, and the global optimal value sequence is output. A cubic b-spline is used to screen second-stage particles based on the global optimal value sequence to determine multiple second-stage particles. A predefined fixed inertia weight and a predefined learning factor are used. Each second-stage particle is iteratively updated to determine the target globally optimal particle. Based on the shape transformation variables corresponding to the target globally optimal particle, the airfoil geometric coordinates are calculated, and these coordinates are used to optimize the aerodynamic shape. Based on the above scheme, this invention adopts a two-stage optimization strategy: In the first stage (global stage), the particle swarm uses random inertial weights to enhance the global search capability of the swarm, enabling particles to explore the optimal solution throughout the design space and avoiding premature convergence; in the second stage (local stage), fixed inertial weights are set to emphasize the local search capability of particles within the optimal solution region, allowing for fine-tuning of the initial solution. Through this phased weight control strategy, efficient local convergence can be achieved while ensuring global search capability, thereby improving the optimization effect of the aerodynamic shape.
[0184] Please see Figure 8 , Figure 8 This is a structural block diagram of an aerodynamic shape optimization system based on a two-stage particle swarm optimization algorithm, provided in Embodiment 2 of the present invention.
[0185] This invention provides an aerodynamic shape optimization system based on a two-stage particle swarm optimization algorithm, comprising:
[0186] The response module 801 is used to respond to optimization requests and initialize each first-stage particle in the particle swarm based on the predefined range of values for the class shape transformation variable.
[0187] Module 802 is used to construct a global optimal value sequence based on a random inertia weighting strategy, according to a predefined learning factor, the historical individual optimal value of each first-stage particle, and the global optimal value of the population corresponding to the particle swarm, and output the global optimal value sequence.
[0188] The screening module 803 is used to perform second-stage particle screening based on the global optimal value sequence using cubic b-splines to determine multiple second-stage particles.
[0189] The update module 804 is used to iteratively update each second-stage particle using predefined fixed inertia weights and predefined learning factors to determine the target globally optimal particle.
[0190] The optimization module 805 is used to calculate the airfoil geometric shape coordinates based on the shape transformation variables corresponding to the target global optimal particle. The airfoil geometric shape coordinates are used to achieve aerodynamic shape optimization.
[0191] Furthermore, module 802 is specifically used for:
[0192] Based on a random inertia weighting strategy, inertia weights are randomly selected;
[0193] The inertial weight, predefined learning factor, historical individual optimality of each first-stage particle, and global optimality of the population corresponding to the particle swarm are used to update each first-stage particle, resulting in multiple updated first-stage particles.
[0194] Calculate the objective function value for each updated first-stage particle based on the shape transformation variable corresponding to each updated first-stage particle.
[0195] The historical individual optimality of each first-stage particle and the global optimality of the population corresponding to the particle swarm are updated using the updated objective function value of each first-stage particle, and the current iteration step number is counted in real time.
[0196] When the current iteration step reaches the preset step threshold, a global optimum value sequence is constructed based on the global optimum of the population recorded when the current iteration step reaches the preset step threshold and the global optimum of the population recorded in multiple future iteration steps.
[0197] Furthermore, the filtering module 803 is specifically used for:
[0198] Perform a logarithmic transformation on the global optimum sequence to obtain the transformed global optimum sequence;
[0199] The transformed global optimum sequence and the number of iteration steps corresponding to the global optimum of each population in the transformed global optimum sequence are taken as continuous variables, and a second-differentiable continuous curve is obtained by cubic b-spline fitting.
[0200] Extract the first and second derivatives corresponding to each iteration step from the continuous curve that is twice differentiable, and calculate the curvature corresponding to each iteration step based on the first and second derivatives corresponding to each iteration step.
[0201] The number of iterations corresponding to any second derivative that is less than the second derivative threshold is taken as the target number of iterations.
[0202] Among the curvatures corresponding to each target iteration step, the target iteration step corresponding to the largest curvature is selected as the candidate iteration step.
[0203] Determine whether the absolute value of the change in the first derivative associated with the candidate iteration step number and the future iteration step number is less than the first derivative threshold;
[0204] If so, the candidate iteration step number is taken as the first stage stopping point, and each first stage particle corresponding to the first stage stopping point is taken as the second stage particle.
[0205] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system and modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0206] This invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program; when the computer program is executed by the processor, the processor performs the steps of the aerodynamic shape optimization method based on the two-stage particle swarm optimization algorithm as described in the above embodiments.
[0207] This invention also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the aerodynamic shape optimization method based on the two-stage particle swarm optimization algorithm as described in the above embodiments.
[0208] This invention also provides a computer program product, including a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the aerodynamic shape optimization method based on the two-stage particle swarm optimization algorithm as described in the above embodiments.
[0209] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0210] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm, characterized in that, include: In response to the optimization request, based on the predefined range of values for the class shape transformation variable, initialize each first-stage particle in the particle swarm. A global optimal value sequence is constructed and output by adopting a random inertia weighting strategy based on a predefined learning factor, the historical individual optimal value of each particle in the first stage, and the global optimal value of the population corresponding to the particle swarm. A second-stage particle selection process is performed using cubic b-splines based on the global optimal value sequence to determine multiple second-stage particles. The predefined fixed inertia weights and the predefined learning factor are used to iteratively update each second-stage particle to determine the target globally optimal particle; Based on the shape transformation variables corresponding to the target global optimal particle, the airfoil geometric shape coordinates are calculated, and the airfoil geometric shape coordinates are used to achieve aerodynamic shape optimization.
2. The aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm according to claim 1, characterized in that, The method employs a random inertia weighting strategy to construct a global optimal value sequence based on a predefined learning factor, the historical individual optimal values of each particle in the first stage, and the global optimal value of the corresponding particle swarm. The output global optimal value sequence includes: Based on the aforementioned random inertia weight strategy, inertia weights are randomly selected; The inertia weight, the predefined learning factor, the historical individual optimality of each first-stage particle, and the global optimality of the population corresponding to the particle swarm are used to update each first-stage particle to obtain multiple updated first-stage particles. Calculate the objective function value corresponding to each of the updated first-stage particles based on the shape transformation variables corresponding to each of the updated first-stage particles; The historical individual optimality of each first-stage particle and the global optimality of the population corresponding to the particle swarm are updated using the updated objective function value of each first-stage particle, and the current iteration step number is counted in real time. When the current iteration step reaches a preset step threshold, a global optimum value sequence is constructed based on the global optimum of the population recorded when the current iteration step reaches the preset step threshold and the global optimum of the population recorded in multiple future iteration steps.
3. The aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm according to claim 1, characterized in that, The second-stage particle selection, using cubic b-splines based on the global optimal value sequence, determines multiple second-stage particles, including: Perform a logarithmic transformation on the global optimum sequence to obtain the transformed global optimum sequence; The transformed global optimum sequence and the number of iteration steps corresponding to the global optimum of each population in the transformed global optimum sequence are taken as continuous variables, and a second-differentiable continuous curve is obtained by fitting the cubic b-spline. Extract the first and second derivatives corresponding to each iteration step from the second-differentiable continuous curve, and calculate the curvature corresponding to each iteration step based on the first and second derivatives corresponding to each iteration step. The number of iterations corresponding to any second derivative that is less than the second derivative threshold is taken as the target number of iterations. Among the curvatures corresponding to each target iteration step, the target iteration step corresponding to the largest curvature is selected as the candidate iteration step. Determine whether the absolute value of the change in the first derivative associated with the future iteration steps corresponding to the candidate iteration step is less than the first derivative threshold; If so, the candidate iteration step number is taken as the first stage stopping point, and each first stage particle corresponding to the first stage stopping point is taken as the second stage particle.
4. The aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm according to claim 1, characterized in that, The step of iteratively updating each second-stage particle using predefined fixed inertia weights and predefined learning factors to determine the target globally optimal particle includes: The predefined fixed inertia weights and the predefined learning factors are used to update each second-stage particle to determine multiple updated second-stage particles; Calculate the objective function value corresponding to each of the updated second-stage particles based on the shape transformation variables corresponding to each of the updated second-stage particles; The historical individual optimum of each second-stage particle and the global optimum of the second-stage particle swarm are updated using the updated objective function values of each second-stage particle; When the iteration termination condition is met, the population global optimum determined when the iteration termination condition is met is taken as the target global optimum particle.
5. An aerodynamic shape optimization system based on a two-stage particle swarm optimization algorithm, characterized in that, include: The response module is used to respond to optimization requests and initialize each first-stage particle in the particle swarm based on the predefined range of values for class shape transformation variables. The construction module is used to construct a global optimal value sequence based on a predefined learning factor, the historical individual optimal value of each particle in the first stage, and the global optimal value of the population corresponding to the particle swarm, and output the global optimal value sequence. The screening module is used to perform second-stage particle screening based on the global optimal value sequence using cubic b-splines to determine multiple second-stage particles; The update module is used to iteratively update each second-stage particle using a predefined fixed inertia weight and the predefined learning factor to determine the target globally optimal particle. The optimization module is used to calculate the airfoil geometric shape coordinates based on the shape transformation variables corresponding to the target global optimal particle. The airfoil geometric shape coordinates are used to achieve aerodynamic shape optimization.
6. The aerodynamic shape optimization system based on a two-stage particle swarm optimization algorithm according to claim 5, characterized in that, The building module is specifically used for: Based on the aforementioned random inertia weight strategy, inertia weights are randomly selected; The inertia weight, the predefined learning factor, the historical individual optimality of each first-stage particle, and the global optimality of the population corresponding to the particle swarm are used to update each first-stage particle to obtain multiple updated first-stage particles. Calculate the objective function value corresponding to each of the updated first-stage particles based on the shape transformation variables corresponding to each of the updated first-stage particles; The historical individual optimality of each first-stage particle and the global optimality of the population corresponding to the particle swarm are updated using the updated objective function value of each first-stage particle, and the current iteration step number is counted in real time. When the current iteration step reaches a preset step threshold, a global optimum value sequence is constructed based on the global optimum of the population recorded when the current iteration step reaches the preset step threshold and the global optimum of the population recorded in multiple future iteration steps.
7. The aerodynamic shape optimization system based on a two-stage particle swarm optimization algorithm according to claim 5, characterized in that, The filtering module is specifically used for: Perform a logarithmic transformation on the global optimum sequence to obtain the transformed global optimum sequence; The transformed global optimum sequence and the number of iteration steps corresponding to the global optimum of each population in the transformed global optimum sequence are taken as continuous variables, and a second-differentiable continuous curve is obtained by fitting the cubic b-spline. Extract the first and second derivatives corresponding to each iteration step from the second-differentiable continuous curve, and calculate the curvature corresponding to each iteration step based on the first and second derivatives corresponding to each iteration step. The number of iterations corresponding to any second derivative that is less than the second derivative threshold is taken as the target number of iterations. Among the curvatures corresponding to each target iteration step, the target iteration step corresponding to the largest curvature is selected as the candidate iteration step. Determine whether the absolute value of the change in the first derivative associated with the future iteration steps corresponding to the candidate iteration step is less than the first derivative threshold; If so, the candidate iteration step number is taken as the first stage stopping point, and each first stage particle corresponding to the first stage stopping point is taken as the second stage particle.
8. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the aerodynamic shape optimization method based on the two-stage particle swarm optimization algorithm as described in any one of claims 1-4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the aerodynamic shape optimization method based on the two-stage particle swarm optimization algorithm as described in any one of claims 1-4.
10. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the aerodynamic shape optimization method based on a two-stage particle swarm optimization algorithm as described in any one of claims 1-4.