Welded beam design optimization method of Bayesian optimization algorithm based on variable selection, equipment and medium
By applying Bayesian optimization algorithm based on variable selection in welding beam design, building a Gaussian process model and optimizing the low-dimensional search subspace, the problem that genetic algorithms are prone to fall into local optimization is solved, and more efficient global optimization and improvement are achieved Strong design flexibility.
Patent Information
- Application Number
- CN202411473575.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-22
AI Technical Summary
In the prior art, genetic algorithms are prone to fall into local optimal solutions in welding beam design, especially when the design space is complex or there are multiple local extremely small points, it is difficult to find the global optimal design solution.
Using Bayesian optimization algorithm based on variable selection, we optimize low-dimensional search subspace by constructing a Gaussian process model and calculating hyperparameter vectors, and maximizing the acquisition function with the expected improvement criteria, and gradually optimizing the welded beam design variables to avoid local optimization .
It effectively avoids local optimal solutions, improves the global optimization capability of welded beam design, saves computing resources, improves computing efficiency, and enhances design flexibility and constraint satisfaction.
Smart Images

Figure CN119475685A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the fields of architecture and engineering, and in particular to a welding beam design optimization method, equipment and medium based on a Bayesian optimization algorithm for variable selection. Background Art
[0002] In modern industrial production, the design and manufacture of welded beams is a key link, which directly affects the stability and safety of the structure. In the fields of construction and engineering, welded beams are common structural components, and their design needs to meet multiple mechanical and geometric constraints, such as strength, stiffness, stability and deflection limits.
[0003] In the prior art, genetic algorithm is a probability-based optimization method, which may fall into the local optimal solution during the search process, especially in the design of welded beams. If the design space is complex or there are many local minima, the algorithm may not find the global optimal design solution. Summary of the invention
[0004] The invention provides a welding beam design optimization method, equipment and medium based on a Bayesian optimization algorithm for variable selection to solve the problem of local optimal solution in the prior art.
[0005] The technical solution adopted by the present invention is:
[0006] A welding beam design optimization method based on a Bayesian optimization algorithm for variable selection (abbreviated as RW-EGO), characterized by comprising the following steps:
[0007] Step S1: Collect data of the welded beam, establish a welded beam design problem model with the manufacturing cost minimization problem as the design problem, then determine a set of m variables that affect the manufacturing cost as the search space X of the manufacturing cost minimization problem, and simultaneously determine an engineering constraint condition vector G(X) composed of n engineering constraint conditions.
[0008] Where X = [x1, x2, …, x m ],G(X)=[g1(x),g2(x),…,g n (x)].
[0009] x1,x2,…,x m There are m variables that affect the manufacturing cost.
[0010] g1(x),g2(x),…,g n (x) is n engineering constraints.
[0011] Step S2: Based on the search space X, construct the Gaussian process model in the Bayesian optimization algorithm and calculate the new hyperparameter vector θ * .
[0012] Step S3: According to the new hyperparameter vector θ * Calculate the low-dimensional search subspace X * .
[0013] Step S4: Search the low-dimensional subspace X * Maximize the acquisition function in the Bayesian optimization algorithm to obtain the update point X new , and update point X new Substitute it into the objective function f(x) of the Gaussian process model as the new optimal solution to calculate the optimal value f min , which is the optimal value for minimizing manufacturing cost.
[0014] Step S5: Repeat steps S2 to S4 to obtain a new optimal solution X new and the optimal value f min , and the new optimal solution X obtained in each iteration new and the optimal value f min Add the sample set of the Gaussian process model constructed in step S2, train and update the Gaussian process model constructed in step S2 until the preset number of iterations is reached, and then output the final optimal value f min ; Wherein, during the iterative optimization process, the hyperparameter vector θ is the current hyperparameter vector.
[0015] Furthermore, the sample points for collecting the data of the welding beam in step S1 are obtained by Latin hypercube sampling.
[0016] Furthermore, the step S2 calculates a new hyperparameter vector θ * When the system is running, perform the following steps:
[0017] Step S21: Calculate the mean of each variable in the search space X, then initialize the hyperparameter vector θ, select the kernel function, and calculate the covariance matrix.
[0018] Step S22: constructing a Gaussian process model in a Bayesian optimization algorithm based on the calculated mean of each variable and the covariance matrix; wherein the Gaussian process model expression is:
[0019] f(x)~GP(μ(x),k(x,x')).
[0020] Where f(x) is the objective function.
[0021] μ(x) is the mean function.
[0022] k(x,x') is the Gaussian kernel function, which is expressed as:
[0023]
[0024] in,
[0025]
[0026] is the covariance matrix.
[0027] s 2 is the variance of each variable in the search space X.
[0028] x and x' are any two variables in the search space X.
[0029] n is the number of variables in the search space X.
[0030] θ i is a sub-hyperparameter corresponding to each variable in the i-th search space X, wherein the sub-hyperparameter describes the weight of the i-th dimension of the search space X, and the larger the sub-hyperparameter is, the greater the impact on the covariance matrix is.
[0031] P i is the smoothness of the sub-hyperparameter in the i-th dimension design space, P i takes a value between [1,2]; the hyperparameter vector θ includes the sub-hyperparameters corresponding to each variable in the search space X, expressed as θ1, θ2, …, θ m .
[0032] When initializing the hyperparameter vector θ, θ1, θ2, …, θ m All are assigned a value of 0.
[0033] Step S23: Calculate the hyperparameter vector θ by maximizing the likelihood function to obtain a new hyperparameter vector θ * , the new hyperparameter vector θ * The variables are expressed as in is the new hyperparameter vector θ * The ith element of .
[0034] Furthermore, the new hyperparameter vector θ * The calculation expression is:
[0035] θ * = argmaxL(θ);
[0036] θ * =[θ1,θ2,…,θ m ];
[0037] Among them, θ1, θ2, …, θ m are x1,x2,…,xm The corresponding sub-hyperparameters.
[0038] L(θ) is the likelihood function of θ.
[0039] argmax L(θ) is the value of θ that makes L(θ) reach its maximum value.
[0040] Furthermore, step S3 is based on the new hyperparameter vector θ * Calculate the low-dimensional search subspace X * When the system is running, perform the following steps:
[0041] Step S31: Using the new hyperparameter vector As an evaluation of the importance of each dimension variable, calculate the variables x1, x2, ..., x m The probability of being selected for optimization in each optimization is P1, P2, ..., P m , the calculation expression is
[0042]
[0043] Step S32: P1, P2, ..., P m The probability vector P is expressed as:
[0044] P=[P1,P2,…,P m ];
[0045] Then, according to the roulette variable selection strategy, q search spaces X are selected. * The variables in are r1,…,r q .
[0046] Step S33: The variables r1, ..., r selected by the roulette wheel are q The low-dimensional search subspace X * .
[0047] Furthermore, the step S4 performs the low-dimensional search subspace X * Maximize the acquisition function in the Bayesian optimization algorithm to obtain the update point X new When the system is running, perform the following steps:
[0048] Step S41: construct and optimize the acquisition function CEI(x), the expression is:
[0049]
[0050] in,
[0051] EI(x) is the expected improvement function without considering constraints.
[0052] Pr(G j (x)≤0) is the probability that the optimization solution satisfies the jth constraint.
[0053] is the probability that the optimization solution satisfies all constraints.
[0054] Φ and Ψ are the standard cumulative distribution function and probability density function.
[0055] and s(x) represent the predicted value of the objective function and the variance of the predicted value respectively.
[0056] and They represent the predicted value and variance of the predicted value of the jth constraint condition respectively.
[0057] f min is the optimal value.
[0058] Step S42: First, the low-dimensional search subspace X obtained in step S3 is * Import vector Z,
[0059] Z=[x1,x2,…,X * ,x m ].
[0060] Then, the vector Z is substituted into the optimized acquisition function CEI(Z) constructed in step S41;
[0061] Finally, substitute CEI(Z) into the expression
[0062] Z new =argmax CEI(Z)
[0063] Optimize and get vector Z new .
[0064] Among them, Z new =[x 1,new ,…,x q,new ], x 1,new ,…,x q,new Z new variables.
[0065] argmax CEI(Z) is the value of Z that maximizes CEI(Z).
[0066] Step S43: The vector Z obtained in step S42 is new Import the search space X, Z new The variable x 1,new ,…,x q,newReplace the corresponding original variables respectively, and use the corresponding variable values of the current optimal solution to supplement the remaining variables to obtain the updated point X new , which is the new optimal solution.
[0067] Among them, X new =[x1,x2,…,Z new , …x m ]; then for X new Calculate the objective function f(x) in step S22 and the constraint function G(x) in step S1 to obtain the current optimal value f min .
[0068] Furthermore, the objective function f(x) in step S2 is expressed as:
[0069] f(x)=1.10471x1 2 x2+0.04811x3x4(x2+14)+0.01x6(2x5(x2x7x8)).
[0070] in,
[0071] x1 is the length of the welded beam;
[0072] x2 is the height of the welded beam;
[0073] x3 is the thickness of the welded beam;
[0074] x4 is the weld thickness;
[0075] x5 is the length of the clamp;
[0076] x6 is the production batch;
[0077] x7 is the welding current;
[0078] x8 is labor cost.
[0079] Furthermore, it is characterized in that there are 6 engineering constraints determined in step S1, namely g1(x), g2(x), ..., g6(x), and the expressions are respectively:
[0080]
[0081] g4(x)=0.10471x1 2 +0.04811x3x4(14+x2)-5≤0;
[0082]
[0083]
[0084] in,
[0085] x1 is the length of the welded beam;
[0086] x2 is the height of the welded beam;
[0087] x3 is the thickness of the welded beam;
[0088] x4 is the weld thickness,
[0089] P=6000
[0090] L=14
[0091] E=30*10 6
[0092] G=12*10 6 ,
[0093]
[0094] Based on the same inventive concept, the present invention also provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the aforementioned welding beam design optimization method based on the Bayesian optimization algorithm for variable selection by executing the computer instructions.
[0095] Based on the same inventive concept, the present invention also provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the aforementioned welding beam design optimization method based on a Bayesian optimization algorithm for variable selection.
[0096] The beneficial effects of the present invention are:
[0097] Solving the local optimum problem: Genetic algorithms and particle swarm algorithms may fall into local optimum in the process of searching for the optimal solution, especially when there are many design variables of the welded beam and the design space is complex. Bayesian optimization, by establishing a Gaussian process model of the objective function and combining the expectation improvement criterion, can more effectively search for the global optimal solution in a global scope. Moreover, the variable selection strategy adopted by the present invention does not only focus on selecting only the best variables when selecting variables, because the best variables may not lead to the best solution. On the contrary, some "fewer" possibilities will also be considered to select "favorable" variables to prevent the algorithm from falling into the local optimal solution.
[0098] 2. Save computing resources and improve computing efficiency: In actual welding beam design, the fitness value evaluation required for genetic algorithm optimization may lead to high computing costs. The method of the present invention intelligently selects the next most potential point for fitness value calculation through variable selection and acquisition function optimization, which not only reduces the number of evaluations in the design process, saves computing costs, but also reduces the number of iterations, thereby improving computing efficiency.
[0099] 3. Greater design flexibility: First, the Bayesian optimization algorithm allows designers to flexibly adjust design parameters and constraints to adapt to different engineering needs and goals. This is because the parameter update of the Bayesian optimization algorithm is based on the probability model, namely the Gaussian process model, which has a strong theoretical basis. The parameter settings of other design methods are more empirical, and multiple tests are required to determine them in the design of welded beams. Secondly, welded beam design usually needs to meet multiple constraints. The Bayesian optimization algorithm can naturally integrate constraints into the optimization process, and ensure that the solution meets all engineering constraints by defining appropriate acquisition functions and models without the need for additional processing mechanisms. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0101] Figure 1 The present invention is a flow chart of a welding beam design optimization method based on a Bayesian optimization algorithm for variable selection.
[0102] Figure 2 Schematic diagram of the strategy selection for roulette.
[0103] Figure 3 Iterative plot of optimization results for welded beam design. DETAILED DESCRIPTION
[0104] The invention provides a welding beam design optimization method, equipment and medium based on a Bayesian optimization algorithm for variable selection to solve the problem of local optimal solution in the prior art.
[0105] The following disclosure provides examples which are not intended to limit the present invention.
[0106] The embodiments of the invention are described in detail below with reference to the accompanying drawings:
[0107] A welded beam design optimization method based on Bayesian optimization algorithm for variable selection (abbreviated as RW-EGO) is proposed. Figure 1 The flowchart includes the following steps and explains each step:
[0108] A method for optimizing welded beam design based on a Bayesian optimization algorithm for variable selection, characterized in that it comprises the following steps:
[0109] Step S1: Use the Latin hypercube sampling method to collect data on the welded beam, prepare for the subsequent construction of the Gaussian process model in the Bayesian optimization algorithm, establish a welded beam design problem model with the manufacturing cost minimization problem as the design problem, and then determine a set of m variables that affect the manufacturing cost as the search space X of the manufacturing cost minimization problem, and at the same time determine an engineering constraint vector G(X) composed of n engineering constraints. In this embodiment, m is set to 8 and n is set to 6. The welded beam design problem model is established to solve the objective function f(x) with the welded beam design cost minimization as the condition of satisfying G(X) in the search space X.
[0110] Where X = [x1, x2, …, x8],
[0111] G(X)=[g1(x),g2(x),…,g6(x)].
[0112] x1, x2, ..., x8 are eight variables that affect the manufacturing cost. In this embodiment, x1 is the length of the welded beam, x2 is the height of the welded beam, x3 is the thickness of the welded beam, x4 is the weld thickness, x5 is the length of the clamp, x6 is the production batch, x7 is the welding current, and x8 is the labor cost. In this embodiment, g1(x), g2(x), ..., g6(x) are six engineering constraints, where
[0113] g1(x) is the shear stress of the welded beam, which shall not be greater than the maximum limit value.
[0114] g2(x) is the bending stress of the welded beam, which shall not be greater than the maximum limit value.
[0115] g3(x) means the weld thickness cannot exceed the beam width.
[0116] g4(x) is the lateral constraint of the design variable and must not exceed the set value.
[0117] g5(x) is the end deviation of the welded beam and shall not exceed 0.25mm.
[0118] g6(x) is the buckling load of the welded beam and shall not exceed the maximum limit value.
[0119] In this embodiment, the calculation expressions of g1(x), g2(x), ..., g6(x) are respectively:
[0120]
[0121] g4(x)=0.10471x1 2 +0.04811x3x4(14+x2)-5≤0;
[0122]
[0123] Among them, x1 is the length of the welded beam, x2 is the height of the welded beam, x3 is the thickness of the welded beam, and x4 is the thickness of the weld.
[0124] P=6000
[0125] L=14
[0126] E=30*10 6
[0127] G=12*10 6 ;
[0128]
[0129] Step S2: Based on the search space X, construct the Gaussian process model in the Bayesian optimization algorithm and calculate the new hyperparameter vector θ * . Perform the following steps:
[0130] Step S21: Calculate the mean of each variable in the search space X, then initialize the hyperparameter vector θ, select the kernel function, and calculate the covariance matrix.
[0131] Step S22: constructing a Gaussian process model in the Bayesian optimization algorithm according to the calculated mean of each variable and the covariance matrix; wherein the Gaussian process model expression is:
[0132] f(x)~GP(μ(x),k(x,x'));
[0133] Wherein, f(x) is the objective function. In this embodiment, the expression of f(x) is:
[0134] f(x)=1.10471x1 2 x2+0.04811x3x4(x2+14)+0.01x6(2x5(x2x7x8));
[0135] μ(x) is the mean function; k(x,x') is the Gaussian kernel function, which is specifically expressed as:
[0136]
[0137] in,
[0138]
[0139] is the covariance matrix.
[0140] s 2 is the variance of each variable in the search space X.
[0141] x and x' are any two variables in the search space X.
[0142] n is the number of variables in the search space X.
[0143] θ i is a sub-hyperparameter corresponding to each variable in the i-th search space X, wherein the sub-hyperparameter describes the weight of the i-th dimension of the search space X, and the larger the sub-hyperparameter is, the greater the impact on the covariance matrix is.
[0144] P i is the smoothness of the sub-hyperparameter in the i-th dimension design space, P i The value is between [1,2].
[0145] The hyperparameter vector θ includes sub-hyperparameters corresponding to each variable in the search space X, which are expressed as θ1, θ2, ..., θ8 respectively; when initializing the hyperparameter vector θ, θ1, θ2, ..., θ8 are all assigned 0.
[0146] Step S23: Calculate the hyperparameter vector θ by maximizing the likelihood function to obtain a new hyperparameter vector θ * , the new hyperparameter vector θ * The variables are expressed as in is the new hyperparameter vector θ * In this embodiment, the calculation expression is:
[0147] θ * = argmaxL(θ);
[0148] θ * =[θ1,θ2,…,θ8].
[0149] Among them, θ1, θ2, …, θ8 are the sub-hyperparameters corresponding to x1, x2, …, x8 respectively. L(θ) is the likelihood function of θ, and argmax L(θ) is the value of θ that makes L(θ) reach the maximum value.
[0150] Step S3: According to the new hyperparameter vector θ * Calculate the low-dimensional search subspace X * . Perform the following steps:
[0151] Step S31: Using the new hyperparameter vector As an evaluation of the importance of each dimension variable, the probability of the variables x1, x2, ..., x8 in the search space X being selected for optimization in each optimization is calculated, which are P1, P2, ..., P8 respectively. The calculation expression is:
[0152]
[0153] Step S32: P1, P2, ..., P8 form a probability vector P, expressed as:
[0154] P = [P1, P2, ..., P8];
[0155] Then, according to the roulette variable selection strategy, q search spaces X are selected. * , in this embodiment, q is set to 4, namely r1,…,r4. The reason for this operation: in the design of welded beams, there are many factors that affect the final manufacturing cost, that is, the number of problem variables will increase. If all variables are optimized, the calculation time cost will be large, so the roulette variable selection strategy is used, and each iteration selects the variable with more hope of improvement for optimization. The present invention adopts a roulette strategy for variable selection, and the probability of selecting a sector on the roulette wheel is proportional to the size of the central angle of the sector. In a similar manner, the roulette wheel is divided into several parts, each of which represents a variable. Then selecting a variable is equivalent to randomly selecting a point on the wheel and locating the corresponding sector, as shown in the attached figure. Figure 2 The schematic diagram of the roulette wheel selection strategy is shown in Figure 2. This selection strategy selects variables in proportion to the fitness value of the individual, which helps to retain excellent individuals during the optimization process.
[0156] Step S33: The variables r1, ..., r4 selected by the roulette wheel form the low-dimensional search subspace X * .
[0157] Step S4: Search the low-dimensional subspace X * Maximize the acquisition function in the Bayesian optimization algorithm to obtain the update point X new , and update point X new Substitute it into the objective function f(x) of the Gaussian process model as the new optimal solution to calculate the optimal value f min , which is the optimal value for minimizing manufacturing cost.
[0158] The step S4 performs the low-dimensional search subspace X * Maximize the acquisition function in the Bayesian optimization algorithm to obtain the update point X new When the system is running, perform the following steps:
[0159] Step S41: construct and optimize the acquisition function CEI(x), the expression is:
[0160]
[0161] Where EI(x) is the expected improvement function without considering constraints.
[0162] Pr(G j (x)≤0) is the probability that the optimization solution satisfies the jth constraint.
[0163] is the probability that the optimization solution satisfies all constraints.
[0164] Φ and Ψ are the standard cumulative distribution function and probability density function.
[0165] and s(x) represent the predicted value of the objective function and the variance of the predicted value respectively.
[0166] and They represent the predicted value and variance of the predicted value of the jth constraint condition respectively.
[0167] f min is the optimal value.
[0168] Reasons for selecting this acquisition function: Currently commonly used types include UCB (upper confidence limit), PI (probability of improvement) and EI (expected improvement). Among them, the EI standard is the most widely used. The expected improvement criterion provides a good balance between global search and local search. The present invention selects the expected improvement criterion as the acquisition function for optimization in the subspace. Due to the existence of engineering constraints in the design optimization of welded beams, the constraints can be directly taken into account when maximizing the EI function, and the problem of selecting update points can be changed from unconstrained optimization of the EI function to constrained optimization of the EI function. The first term of the expression of the acquisition function CEI (x) tends to select points with expected improvement values, while the second term tends to select points with a high probability of satisfying the constraints. By multiplying these two terms, the expected improvement criterion will select points that have a high probability of satisfying the constraints and a large improvement as update points.
[0169] Step S42: First, the low-dimensional search subspace X obtained in step S3 is * Import vector Z, Z = [x1, x2, ..., X * ,x8]; then, substitute the vector Z into the optimized acquisition function CEI(Z) constructed in step S41; finally, substitute CEI(Z) into the expression Z new =argmax CEI(Z) is optimized to obtain vector Z new .
[0170] Among them, Z new =[x 1,new ,…,x 4,new ], x 1,new ,…,x 4,new Z new variables.
[0171] argmax CEI(Z) is the value of Z that maximizes CEI(Z).
[0172] Step S43: The vector Z obtained in step S42 is new Import the search space X, Z new The variable x 1,new ,…,x 4,new Replace the corresponding original variables respectively, and use the corresponding variable values of the current optimal solution to supplement the remaining variables to obtain the updated point X new , which is the new optimal solution.
[0173] Among them, X new =[x1,x2,…,Z new ,…x8].
[0174] Then for X new Calculate the objective function f(x) in step S22 and the constraint function G(x) in step S1 to obtain the current optimal value f min .
[0175] Step S5: Repeat steps S2 to S4 to obtain a new optimal solution X new and the optimal value f min , and the new optimal solution X obtained in each iteration new and the optimal value f min Add the sample set of the Gaussian process model constructed in step S2, train and update the Gaussian process model constructed in step S2 until the preset number of iterations is reached, and then output the final optimal value f min ; Wherein, during the iterative optimization process, the hyperparameter vector θ is the current hyperparameter vector.
[0176] In order to reduce the random generation of initial vectors or initial populations by Latin hypercube sampling, the results of each run are different. The present invention conducts 5 sets of repeated tests on the embodiment to improve the reliability of the final results. The minimum target value (i.e., the minimum manufacturing cost of the welded beam design) obtained in each iteration is saved, and finally the f minCalculate the average value and then draw the graph. The optimization effect of the method of the present invention is displayed in the form of an iterative curve. The horizontal axis is the number of objective function calculations (number of evaluations), and the vertical axis is the minimum manufacturing cost obtained in each iteration. The black solid line represents the average value of the optimization results of the method of the present invention (abbreviated as RW-EGO), and the upper and lower dotted lines are the upper and lower bounds of the optimization results drawn according to the standard deviation of the optimization results. Figure 3 The iterative curve of the welded beam design optimization result shows that the optimization algorithm has a certain degree of optimization for the initial value of the objective function. It can be found that under multiple design variables and multiple engineering constraints, the RW-EGO algorithm still has good optimization results for the welded beam design optimization.
[0177] Based on the same inventive concept, the present invention also provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the aforementioned welding beam design optimization method based on the Bayesian optimization algorithm for variable selection by executing the computer instructions.
[0178] Based on the same inventive concept, the present invention also provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the aforementioned welding beam design optimization method based on a Bayesian optimization algorithm for variable selection.
Claims
1. A method for optimizing welded beam design based on a Bayesian optimization algorithm for variable selection, characterized in that: The following steps are involved: Step S1: Collect data of the welded beam, establish a welded beam design problem model with the manufacturing cost minimization problem as the design problem, then determine a set of m variables that affect the manufacturing cost as the search space X of the manufacturing cost minimization problem, and simultaneously determine an engineering constraint condition vector G(X) composed of n engineering constraint conditions; Where X = [x1, x2, …, x m ],G(X)=[g1(x),g2(x),…,g n (x)]; x1,x2,…,x m are m variables that affect manufacturing costs; g1(x),g2(x),…,g n (x) is n engineering constraints; Step S2: Based on the search space X, construct the Gaussian process model in the Bayesian optimization algorithm and calculate the new hyperparameter vector θ * ; Step S3: According to the new hyperparameter vector θ * Calculate the low-dimensional search subspace X * ; Step S4: Search the low-dimensional subspace X * Maximize the acquisition function in the Bayesian optimization algorithm to obtain the update point X new , and update point X new Substitute it into the objective function f(x) of the Gaussian process model as the new optimal solution to calculate the optimal value f min , which is the optimal value for minimizing manufacturing cost; Step S5: Repeat steps S2 to S4 to obtain a new optimal solution X new and the optimal value f min , and the new optimal solution X obtained in each iteration new and the optimal value f min Add the sample set of the Gaussian process model constructed in step S2, train and update the Gaussian process model constructed in step S2 until the preset number of iterations is reached, and then output the final optimal value f min ; Wherein, during the iterative optimization process, the hyperparameter vector θ is the current hyperparameter vector.
2. The welding beam design optimization method based on the Bayesian optimization algorithm of variable selection according to claim 1 is characterized in that: The sample points for collecting the data of the welding beam in step S1 are obtained by Latin hypercube sampling.
3. The welding beam design optimization method based on the Bayesian optimization algorithm of variable selection according to claim 1 or 2, characterized in that: The step S2 calculates the new hyperparameter vector θ * When the system is running, perform the following steps: Step S21: Calculate the mean of each variable in the search space X, then initialize the hyperparameter vector θ, select the kernel function, and calculate the covariance matrix; Step S22: constructing a Gaussian process model in the Bayesian optimization algorithm according to the calculated mean of each variable and the covariance matrix; wherein the Gaussian process model expression is: f(x)~GP(μ(x),k(x,x')); Where f(x) is the objective function; μ(x) is the mean function; k(x,x') is the Gaussian kernel function, which is expressed as: in, is the covariance matrix; s 2 is the variance of each variable in the search space X; x and x' are any two variables in the search space X; n is the number of variables in the search space X; θ i is a sub-hyperparameter corresponding to each variable in the i-th search space X, wherein the sub-hyperparameter describes the weight of the i-th dimension of the search space X, and the larger the sub-hyperparameter is, the greater the impact on the covariance matrix is; P i is the smoothness of the sub-hyperparameter in the i-th dimension design space, P i The value is between [1,2]; The hyperparameter vector θ includes sub-hyperparameters corresponding to each variable in the search space X, expressed as θ1, θ2, ..., θ m ; When initializing the hyperparameter vector θ, θ1, θ2, …, θ m All are assigned a value of 0; Step S23: Calculate the hyperparameter vector θ by maximizing the likelihood function to obtain a new hyperparameter vector θ * , the new hyperparameter vector θ * The variables are expressed as in is the new hyperparameter vector θ * The ith element of .
4. The welding beam design optimization method based on the Bayesian optimization algorithm of variable selection according to claim 3 is characterized in that: The new hyperparameter vector θ * The calculation expression is: θ * =argmaxL(θ); i * =[θ1,θ2,…,θ m ]; Among them, θ1, θ2, …, θ m are x1,x2,…,x m The corresponding sub-hyperparameters; L(θ) is the likelihood function of θ, argmax L(θ) is the value of θ that makes L(θ) reach its maximum value.
5. The welding beam design optimization method based on the Bayesian optimization algorithm of variable selection according to claim 4 is characterized in that: The step S3 is based on the new hyperparameter vector θ * Calculate the low-dimensional search subspace X * When the system is running, perform the following steps: Step S31: Using the new hyperparameter vector As an evaluation of the importance of each dimension variable, calculate the variables x1, x2, ..., x m The probability of being selected for optimization in each optimization is P1, P2, ..., P m , the calculation expression is Step S32: P1, P2, ..., P m The probability vector P is expressed as: P=[P1,P2,…,P m ]; Then, according to the roulette variable selection strategy, q search spaces X are selected. * The variables in are r1,…,r q ; Step S33: The variables r1, ..., r selected by the roulette wheel are q The low-dimensional search subspace X * .
6. The method for optimizing welded beam design based on Bayesian optimization algorithm for variable selection according to claim 5, characterized in that: The step S4 performs the low-dimensional search subspace X * Maximize the acquisition function in the Bayesian optimization algorithm to obtain the update point X new When the system is running, perform the following steps: Step S41: construct and optimize the acquisition function CEI(x), the expression is: in, EI(x) is the expected improvement function without considering constraints, Pr(G j (x)≤0) is the probability that the optimization solution satisfies the jth constraint condition, is the probability that the optimization solution satisfies all constraints, Φ and Ψ are the standard cumulative distribution function and probability density function, and s(x) represent the predicted value and variance of the predicted value of the objective function, respectively. and They represent the predicted value and variance of the predicted value of the jth constraint condition respectively; f min is the optimal value; Step S42: First, the low-dimensional search subspace X obtained in step S3 is * Import vector Z, Z=[x1,x2,...,X * , x m ]: Then, the vector Z is substituted into the optimized acquisition function CEI(Z) constructed in step S41; Finally, substitute CEI(Z) into the expression From new =argmax CEI(Z) Optimize and get vector Z new ; Among them, Z new =[x 1,new ,…,x q,new ], x 1,new ,…,x q,new Z new Variables; argmax CEI(Z) is the value of Z that makes CEI(Z) reach its maximum value; Step S43: The vector Z obtained in step S42 is new Import the search space X, Z new The variable x 1,new ,…,x q,new Replace the corresponding original variables respectively, and use the corresponding variable values of the current optimal solution to supplement the remaining variables to obtain the updated point X new , which is the new optimal solution; Among them, X new =[x1,x2,…,Z new , …x m ]; then for X new Calculate the objective function f(x) in step S22 and the constraint function G(x) in step S1 to obtain the current optimal value f min .
7. The welding beam design optimization method based on the Bayesian optimization algorithm of variable selection according to claim 3 is characterized in that: The expression of the objective function f(x) in step S2 is: f(x)=1.10471x1 2 x2+0.04811x3x4(x2+14)+0.01x6(2x5(x2x7x8)); in, x1 is the length of the welded beam, x2 is the height of the welded beam, x3 is the thickness of the welded beam, x4 is the weld thickness, x5 is the length of the clip, x6 is the production batch, x7 is the welding current, x8 is labor cost.
8. The welding beam design optimization method based on the Bayesian optimization algorithm of variable selection according to claim 7 is characterized in that: There are 6 engineering constraints determined in step S1, namely g1(x), g2(x), ..., g6(x), and their expressions are: in, x1 is the length of the welded beam; x2 is the height of the welded beam; x3 is the thickness of the welded beam; x4 is the weld thickness; P=6000 L=14 E=30*10 6 G=12*10 6 , 9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the welding beam design optimization method based on the Bayesian optimization algorithm for variable selection as described in any one of claims 1 to 8 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute a welding beam design optimization method based on a Bayesian optimization algorithm for variable selection as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Method for learning optimal Bayesian network by using Dijkstra algorithm
CN113033810A
Bayesian optimization algorithm based on cooperative computing
CN116702450A
Cited By
Production rhythm self-adaptive converter steelmaking oxygen consumption prediction method and system
CN120951151A