A method for establishing a tensile shear force prediction model for resistance spot welding

By extracting the characteristic quantities of the dynamic resistance curve during the welding process and combining the optimization of XGBoost and sparrow search algorithms, a welding point pulling shear prediction model for resistance spot welding was established, which solved the problems of low prediction accuracy and difficulty in real-time monitoring in the existing technology, and achieved high-precision welding quality monitoring and control.

CN119783495APending Publication Date: 2025-04-08天津七所高科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411608534.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art has shortcomings in the prediction of welding joint tension shear force, traditional methods are time-consuming and laborious and cannot be detected in real time, data-driven models are difficult to capture complex nonlinear relationships during welding, and model stability and generalization capabilities are poor.

Method used

By obtaining the dynamic resistance curve data and welding process parameters during the resistance spot welding process, the characteristic quantities related to the welding joint pulling shear force are extracted and screened out, and combined with the XGBoost algorithm and the sparrow search algorithm to optimize the model parameters, an accurate and stable welding joint pulling shear force prediction model is established.

Benefits of technology

Real-time monitoring and control of welding quality is realized, prediction accuracy is significantly improved, model stability and generalization ability is improved, different welding materials and process parameters are adapted to meet the efficiency requirements of actual industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783495A_ABST
    Figure CN119783495A_ABST
Patent Text Reader

Abstract

The present application relates to the field of welding quality detection, and discloses a method for establishing a shear force prediction model for resistance spot welding, which includes the following steps: first, by acquiring the dynamic resistance curve data and welding process parameters in the resistance spot welding process, extracting key feature quantities and performing correlation analysis, and screening out features that are highly correlated with shear force; then, a multivariate polynomial regression model is established based on these features, and the shear force prediction model is further constructed using the XGBoost algorithm; in order to optimize the hyperparameter combination of the XGBoost model, the sparrow search algorithm is introduced for parameter tuning, and the initial population distribution of the sparrow search algorithm is optimized using chaotic mapping to enhance the global search capability; after training and verification, the weld shear force prediction model is finally obtained. This method can realize online real-time monitoring of welding quality, improve the automation level of the welding production process, and provide reliable technical support for resistance spot welding quality control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of welding quality detection, in particular to a method for establishing a weld point tensile shear force prediction model for resistance spot welding. Background Art

[0002] In the process of resistance spot welding, the quality of the weld is directly related to the strength and service life of the welded structure. One of the key indicators of weld quality is the shear force of the weld, that is, the maximum shear force that the weld can withstand under shear stress, which reflects the ability of the weld to resist deformation and fracture. In order to ensure the quality of welding, it is particularly important to accurately predict the shear force of the weld. However, the existing technology has many shortcomings in predicting the shear force of the weld.

[0003] The traditional method of evaluating the tensile shear force of welds mainly relies on offline testing, which uses tensile shear test equipment to perform destructive tests on samples after welding. This method is not only time-consuming and labor-intensive, but also fails to perform real-time testing during the welding process, making it difficult to detect and correct defects in the welding process in a timely manner. In addition, offline testing requires a large number of samples, which increases production costs and is not suitable for real-time monitoring needs of automated production lines.

[0004] With the development of machine learning technology, some studies have attempted to use data-driven methods to predict tensile shear forces. However, existing data-driven models usually rely on traditional regression methods, which are difficult to effectively capture the complex nonlinear relationships in the welding process, resulting in limited prediction accuracy. At the same time, traditional machine learning methods rely more on manual debugging for hyperparameter selection, which is a cumbersome process and difficult to ensure that the global optimal parameter combination is found, which in turn affects the stability and generalization ability of the model. In addition, the input data feature quantities of the model are not screened, and the data dimension is high, which can easily cause overfitting of the model or increase the computational cost, making it difficult to meet the efficiency requirements in actual industrial applications. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a method for establishing a weld shear force prediction model for resistance spot welding. During the resistance spot welding process, dynamic resistance curve data and welding parameters are used to construct an accurate and stable weld shear force prediction model to achieve real-time monitoring and control of welding quality.

[0006] To achieve the above objectives, the present invention is implemented by the following technical solutions: A method for establishing a weld shear force prediction model for resistance spot welding, comprising the following steps:

[0007] Based on the resistance spot welding process, obtain the dynamic resistance curve data of the welding spot and the welding process parameters;

[0008] Extract the characteristic quantity of the dynamic resistance curve of the solder joint;

[0009] Conduct correlation analysis on the extracted feature quantities to select the feature quantities with high correlation with the tensile shear force of the weld point;

[0010] A multivariate polynomial regression model was constructed based on the selected characteristic quantities, and a tension-shear force prediction model was preliminarily established;

[0011] The tension-shear force prediction model is optimized based on the optimization method combining the XGBoost algorithm and the sparrow search algorithm.

[0012] The final weld tensile shear force prediction model was trained and validated.

[0013] Preferably, the feature quantity of extracting the dynamic resistance curve of the solder joint includes:

[0014] Average resistance R mean ; Maximum resistance value R max ; Minimum resistance value R min ; The average value of the maximum resistance and the minimum resistance R middle ; Standard deviation of resistance value σ; Range R between the maximum and minimum points in the dynamic resistance signal deita ; Dynamic resistance curve integral D; initial resistance value r0; maximum resistance value and its time r1, t1 in the clamping stage; local minimum resistance value and its time r2, t2 in the softening process; local maximum resistance value and its time r3, t3 in the melting process; terminal resistance value and its time r4, t4; slope k1 from the softening minimum resistance point to the clamping maximum resistance point; slope k2 from the melting maximum resistance point to the softening minimum resistance point; slope k3 from the terminal point to the melting maximum resistance point.

[0015] Preferably, the step of performing correlation analysis on the extracted feature quantities, reducing the dimension of the process feature quantities, and screening out feature quantities with high correlation with the tensile shear force of the weld point comprises:

[0016] Perform Pearson correlation coefficient analysis on the extracted feature quantities, calculate the Pearson correlation coefficient between each feature quantity and other feature quantities, and obtain a correlation coefficient matrix;

[0017] By setting the correlation threshold, traversing the calculated Pearson correlation coefficient matrix, and filtering out the feature quantities that need to be retained based on the order of appearance of the eigenvalues, the dimensionality reduction of the feature quantities is achieved.

[0018] Preferably, the step of constructing a multivariate polynomial regression model based on the selected characteristic quantities and preliminarily establishing a tensile shear force prediction model comprises:

[0019] Based on the selected feature quantities, a multivariate polynomial regression model is constructed, and the tensile shear force of the weld point is taken as the dependent variable. The selected feature quantities x1, x2, x3,…, x n as independent variable;

[0020] Make m independent observations on the independent variable and obtain m groups of sample observations (x i1 ,x i2 ,x i3 ,…,x in ), where the dependent variable observation corresponding to the i-th group of sample observations is y i ;

[0021] Establish the tensile shear force y of the weld point i The multivariate polynomial regression equation between and the independent variable x:

[0022]

[0023] Among them, α0 is a constant term, α j and a jk is the parameter to be estimated, ε is the error term;

[0024] The objective function f is defined to represent the tensile shear force output value of the prediction model, and its form is as follows:

[0025]

[0026] The least square method is used to estimate the parameters α0, α j ,α jk Estimation is performed to determine the optimal value of the parameter by minimizing the residual sum of squares, that is, solving the parameter combination that satisfies the following conditions:

[0027]

[0028] Calculate the coefficient of determination R of the model 2 and the adjusted R 2 The goodness of fit of the multivariate polynomial regression model was evaluated to verify the explanatory power of the model and ensure that the model was not overfitting.

[0029] Preferably, the optimization method based on the combination of XGBoost algorithm and sparrow search algorithm, the step of optimizing the tensile shear force prediction model comprises:

[0030] The XGBoost algorithm is used to establish a tensile shear force prediction model, with the solder joint feature quantity as the input variable and the solder joint tensile shear force as the output variable;

[0031] In the XGBoost algorithm, multiple classification and regression trees are used as base learners. Through the Boosting iteration method, the error of each round is brought into the next round of iteration for optimization, and finally an integrated tree model is formed;

[0032] Define the objective function as the sum of the loss function and the regularization term, and the XGBoost model predicts the value The expression is as follows:

[0033]

[0034] Among them, T is the number of iterations, F t (x i ) is the t-th regression tree for sample x i The predicted value of .

[0035] Preferably, the objective function is:

[0036]

[0037] Among them, Ω(f t ) represents the model complexity of the tth regression tree, which is defined as:

[0038]

[0039] Among them, γ and λ are regularization penalty coefficients, T is the number of leaf nodes, ω i is the weight of the i-th leaf node.

[0040] Preferably, the sparrow search algorithm optimizes the parameters of the XGBoost model, and the optimization goal is to minimize the root mean square error fitness function value after cross validation.

[0041] Preferably, the sparrow search algorithm comprises the following steps:

[0042] Set the search range of XGBoost model parameters, where the number of trees ranges from [1,100], the maximum depth ranges from [1,12], and the learning rate ranges from [0.01,0.3];

[0043] A group of sparrows are randomly generated as the initial population, and each sparrow represents a parameter combination of XGBoost;

[0044] The fitness value of each sparrow is iteratively calculated, the sparrows are sorted according to the fitness function, and the sparrow with the smallest fitness value is selected as the optimal solution.

[0045] Preferably, it further includes using Circle chaotic mapping to optimize the initial population during the population initialization process of the sparrow search algorithm to enhance the global search capability of the population, and the formula of the Circle chaotic mapping is:

[0046]

[0047] Among them, x n is the position of the nth sparrow.

[0048] The present invention also provides a weld nugget tensile shear force prediction model, which is constructed by the establishment method.

[0049] The present invention provides a method for establishing a weld point tensile shear force prediction model for resistance spot welding. It has the following beneficial effects:

[0050] 1. The present invention ensures the quality of the model input data by extracting the key feature quantities of the dynamic resistance curve and screening out the features that are highly correlated with the tensile shear force of the solder joint. The model optimized by combining the XGBoost algorithm and the sparrow search algorithm (SSA) can accurately capture the complex relationship between the feature quantities and the tensile shear force, thereby significantly improving the prediction accuracy.

[0051] 2. The present invention introduces the XGBoost algorithm and controls the model complexity through the regularization term to reduce the risk of overfitting. At the same time, the sparrow search algorithm is used to optimize the model parameters, which effectively improves the stability of the model under different welding conditions and ensures its reliability in practical applications.

[0052] 3. The present invention uses chaotic mapping to optimize the initial population distribution of SSA, enhances the global search capability, avoids the model from falling into the local optimal solution, and further improves the generalization performance of the model. The optimized model can adapt to different welding materials and process parameters and has a strong wide range of applications.

[0053] 4. The model of the present invention can provide timely feedback on welding quality during the welding process by predicting the tensile shear force of the weld in real time, assist operators in quality control, improve the automation level of the welding production line, reduce the need for manual inspection, and improve production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a schematic diagram of the process of establishing the method of the present invention;

[0055] Figure 2 This is a physical diagram of the welding experimental device of the present invention;

[0056] Figure 3 A schematic diagram of a welding experiment sample of the present invention;

[0057] Figure 4 It is a schematic diagram of a dynamic resistance curve set of the present invention;

[0058] Figure 5 It is a schematic diagram of the distribution trend of the data tensile shear force of the present invention;

[0059] Figure 6 It is a schematic diagram of the welding state corresponding to the resistance curve of the present invention;

[0060] Figure 7 It is a schematic diagram of characteristic points of the dynamic resistance curve of the present invention;

[0061] Figure 8 It is a schematic diagram of calculating the Pearson correlation coefficient of the present invention;

[0062] Fig. 9 It is a schematic diagram of the tensile shear force prediction process of the solder joint using the CSSA-XGBoost algorithm of the present invention;

[0063] Fig.10 Schematic diagram of chaotic mapping distribution of the present invention, wherein (a) original Circle chaotic mapping distribution (b) improved chaotic mapping distribution;

[0064] Fig.11 It is a schematic diagram of the conclusion of the radar chart of the performance indicators of each algorithm of the present invention;

[0065] Fig.12 Schematic diagram of the prediction results of the training set and the prediction set of the present invention, wherein (a) the prediction results of the training set and (b) the prediction results of the test set. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0067] Please see attached Figure 1 -Attached Fig.12 The embodiment of the present invention provides a method for establishing a weld shear force prediction model for resistance spot welding, comprising the following steps:

[0068] S1. Based on the resistance spot welding process, obtain the dynamic resistance curve data and welding process parameters of the welding spot

[0069] In this embodiment, based on the resistance spot welding process, an automated welding test is performed by a welding robot, a robot welding clamp and a medium-frequency resistance welding controller. During the welding process, a voltage acquisition module is used to measure the voltage between the upper and lower electrodes in real time, and the current in the welding circuit is obtained through a Rogowski coil. To ensure the accuracy of the data and the continuity of the timing, the sampling frequency of the voltage and current is set to 1kHz, which can fully capture the dynamic changes of the voltage and current during the welding process.

[0070] According to the real-time collected voltage U and current I, using the formula The dynamic resistance value is calculated to obtain the dynamic resistance curve of the entire welding process, such as Figure 4 This curve can reflect the resistance change of welding materials under the action of thermodynamics and mechanics during welding.

[0071] After marking the serial number, the tensile shear force test is carried out. The distribution of tensile shear force values ​​is shown in the following figure, with the set welding current as the group. Figure 5 As shown in the figure, the set input current and the tensile shear force of the solder joint show a positive correlation trend overall.

[0072] Specifically, the change in resistance value includes multiple stage characteristics:

[0073] The first stage: softening process. The accumulation of heat softens the welding material. In this stage, the current gradually rises to a stable state, the contact area of ​​the welding material gradually increases under the action of the electrode pressure, and the resistance decreases.

[0074] The second stage: melting process. After the plates are in close contact, as the temperature rises, the metal resistivity gradually increases until it reaches the melting point.

[0075] Part 3: The process of nugget formation. After the welding material reaches the melting point, the welding material near the electrode cap begins to melt and gradually forms a nugget. Under the action of the electrode force, the nugget between the two welded parts gradually becomes larger, and the resistance value rises slowly to the extreme point and then begins to gradually decrease.

[0076] During the formation of some weld nuggets, the heat continues to increase, causing the weld nugget to grow uncontrollably, and the molten metal will splash around in liquid form, such as Figure 6 As shown, at point S, the resistance value drops sharply due to splashing.

[0077] During the entire welding process, the change trend of the resistance value can reveal the change in the physical state of the welding material, providing an important basis for predicting the tensile shear force of the weld. The dynamic resistance curve data collected in this embodiment will be used for subsequent feature extraction and analysis as the input basic data of the tensile shear force prediction model.

[0078] S2. Extract the characteristic quantity of the dynamic resistance curve of the solder joint

[0079] After obtaining the dynamic resistance curve data and welding process parameters during the welding process, in order to further establish an accurate prediction model for the tensile shear force of the weld, it is necessary to extract representative feature quantities from the dynamic resistance curve. These feature quantities can reflect the resistance change trend during the welding process and the physical state of the weld, and are important input data for model training.

[0080] In this embodiment, the characteristic points in the dynamic resistance curve are calculated according to Table 1 and Figure 7 To perform the extraction:

[0081] Table 1 Feature points to be selected for dynamic resistance curve

[0082]

[0083]

[0084] These characteristic quantities are extracted from the dynamic resistance curve by statistical and computational methods, which can describe the physical and electrical characteristics of the welding process from multiple perspectives and provide structured data input for subsequent correlation analysis and model building.

[0085] S3. Perform correlation analysis on the extracted feature quantities to select the feature quantities with high correlation with the tensile shear force of the weld point

[0086] After extracting the dynamic resistance characteristic quantities during the welding process, it is necessary to further perform correlation analysis on these characteristic quantities to screen out the characteristic quantities that have a significant impact on the tensile shear force of the weld. Through correlation analysis, key features can be identified among many characteristic quantities, thereby simplifying the input dimensions of the model and improving the calculation efficiency and accuracy of the model.

[0087] The steps of performing correlation analysis on the extracted feature quantities, reducing the dimension of the process feature quantities, and screening out feature quantities with high correlation with the tensile shear force of the weld point include:

[0088] Perform Pearson correlation coefficient analysis on the extracted feature quantities, calculate the Pearson correlation coefficient between each feature quantity and other feature quantities, and obtain a correlation coefficient matrix;

[0089] By setting the correlation threshold, traversing the calculated Pearson correlation coefficient matrix, and filtering out the feature quantities that need to be retained based on the order of appearance of the eigenvalues, the dimensionality reduction of the feature quantities is achieved.

[0090] In this embodiment, the Pearson correlation coefficient analysis method is used to calculate the correlation between the extracted feature quantity and the tensile shear force of the weld. The Pearson correlation coefficient ρ is a statistical calculation method that characterizes the linear relationship of each data. It is used to measure the strength of the linear relationship between two variables X and Y. The range of values ​​is [-1,1]. The closer the ρ value is to 1 or -1, the stronger the linear correlation between the variables; the closer the ρ value is to 0, the weaker the linear relationship between the variables. Its calculation formula is as follows:

[0091]

[0092] in:

[0093] x i represents the observed value of the i-th feature;

[0094] y i represents the observed value of the tensile shear force of the ith weld;

[0095] and are the mean values ​​of characteristic quantity and tensile shear force of weld point respectively;

[0096] N is the number of samples.

[0097] In this embodiment, the Pearson correlation coefficient between each extracted characteristic quantity and the tensile shear force of the weld spot is first calculated to determine the linear influence intensity of each characteristic quantity on the tensile shear force of the weld spot.

[0098] Next, all feature quantities are sorted according to the calculated Pearson correlation coefficient value, and feature quantities with significant correlation with the tensile shear force of the weld point are screened out. Specifically, feature quantities with an absolute value of the Pearson correlation coefficient close to 1 are retained as the final input features to reduce the feature dimension, such as Figure 8 shown.

[0099] Through this correlation analysis step, the present embodiment can effectively screen out key feature quantities and ensure that there is a significant linear relationship between the selected feature quantities and the tensile shear force of the weld, laying a solid data foundation for subsequent multivariate regression modeling and machine learning model optimization.

[0100] S4. Construct a multivariate polynomial regression model based on the selected characteristic quantities and preliminarily establish a tensile shear force prediction model

[0101] After completing feature extraction and correlation analysis, in order to preliminarily establish a prediction model for the tensile shear force of the solder joint, this step uses a multivariate polynomial regression model to construct a regression equation for the selected feature quantities and establish the preliminary structure of the tensile shear force prediction model. The multivariate polynomial regression model can capture the nonlinear relationship between the tensile shear force of the solder joint and multiple feature quantities, providing a basis for subsequent machine learning model optimization.

[0102] In this embodiment, a multivariate polynomial regression model of the tensile shear force of the weld point is constructed based on the screened feature quantities with significant correlation.

[0103] For n independent variables, i.e., dynamic resistance curve characteristic quantities x1, x2, x3, ..., x n , the dependent variable is the tensile shear force of the weld nugget. The independent variable is observed m times independently to obtain m groups of sample observation values ​​(x i1 ,x i2 ,x i3 ,…,x in ),u=1,2,3,…,m, the observation value corresponding to the dependent variable is y i , i = 1, 2, 3, ..., m, then the multivariate polynomial between y and x is as follows:

[0104]

[0105] in:

[0106] α0 is a constant term,

[0107] α j and a jk are the regression coefficients of the linear term and the quadratic interaction term, respectively.

[0108] ε is the error term, which is used to represent the random error or unexplained part of the model.

[0109] For the overall model, it is to determine a functional relationship: Use the least squares method to estimate the parameter α, that is, find a set of α such that (Residual sum of squares) takes the minimum value. After performing least squares polynomial regression, the regression equation is obtained:

[0110] F=4.71008+1.63593Rmean-0.02333Rmax+0.11748Rmin-0.72191Rmiddle+0.93879σ-0.00562D-0.06980r1+0.14496r2 -1.06726t2+0.12617r3+0.07922t3-0.15001r4+1.49165k1-3.17320k2+22.56360k3-0.00590Rmean*Rmin-0.22066Rme an*k3+0.01981Rmax*k2-0.00821Rmin*σ+0.00559Rmin*r3-9.76248e-05Rmin*r4+0.00538Rmiddle*r2-0.02231σ*k1- 0.15173r1*k3-0.00518r2*r3-0.10380t2*k1+0.42801r3*k3+0.01106t3*k1-0.16178r4*k3+0.16195k1*k2-0.00047r2 2 +0.02094t2 2 +0.073239k1 2 +8.09551k3 2

[0111] The regression equation is subjected to variance analysis, and the F-value is used to evaluate the overall significance of the regression equation. It indicates the significant difference between the regression model and the constant model. The larger the value, the better the explanatory effect of the regression equation. The p-value is used to measure whether the independent variable in the regression model has a significant effect on the dependent variable.

[0112] After calculating the regression analysis results, the model fit evaluation method was used to verify the prediction coefficient R of the model. 2 , R 2 It indicates the degree of fit of the model to the data. The closer its value is to 1, the stronger the explanatory power of the model is. 2 The adjusted R 2 The difference between the two is less than 0.2, which is reasonable and consistent, proving that the regression model does not overfit the data and can fully explain the relationship between the resistance curve and the shear force in the welding process. It proves that the scheme of using the dynamic resistance curve characteristic quantity to characterize and predict the shear force is feasible.

[0113] By establishing a multivariate polynomial regression model, this embodiment preliminarily constructs a prediction model for the tensile shear force of welds, which provides an effective basis for subsequent machine learning model optimization, so that the prediction of the tensile shear force of welds has a certain degree of accuracy and stability.

[0114] S5. Optimize the shear force prediction model based on the optimization method combining XGBoost algorithm and sparrow search algorithm

[0115] like Fig. 9 As shown in the figure, after establishing the preliminary multivariate polynomial regression model, in order to further improve the accuracy and robustness of the weld shear force prediction model, this step uses the XGBoost extreme gradient boosting algorithm as the core and combines the optimized sparrow search algorithm of the chaotic sequence initialized SSA population to optimize the model parameters, thereby constructing a prediction model with high accuracy. The specific steps are:

[0116] 1. Preprocessing module

[0117] The preprocessing module of welding data is mainly based on the dynamic resistance curve and welding parameters to perform welding characteristics. The specific method is as described above. Then the data set is divided into data testing and training according to the ratio of 70%-30% by random sampling method;

[0118] 2. Chaotic map initialized sparrow search algorithm to optimize XGBoost module

[0119] The XGBoost extreme gradient boosting algorithm is a prediction model that has both linear regression and regression tree characteristics. It is an algorithm based on the GBDT gradient boosting decision tree. It uses the Boost iteration idea, which is different from the Bagging method used in algorithms such as random forest (i.e., resampling, taking the average of the model trained on each sample). Each iteration of Boost considers the results of the previous iteration and adjusts the decision tree. As the iteration proceeds, the error gradually decreases. XGBoost uses multiple classification and regression trees as base learners to form an integrated tree model structure, scores the decision trees, and selects the ones with high scores to achieve prediction. The specific algorithm flow of the weld shear force prediction model based on XGBoost is as follows:

[0120] For the spot welding feature data set E = {(x i ,y i )}, it consists of m features and n solder joint samples obtained by the preprocessing module, and the data subset x i The corresponding output is y i , the predicted value of the tensile shear force of the model weld is:

[0121]

[0122] in:

[0123] T is the total number of prediction rounds of the algorithm;

[0124] F t (x i ) represents the t-th regression tree sample x i The predicted value of

[0125] Output It is the sum of the scores of each tree.

[0126] The objective function is defined as follows:

[0127]

[0128] Among them, Ω(f t ) represents the model complexity of the tth regression tree, which is defined as:

[0129]

[0130] in:

[0131] γ and λ are regularization penalty coefficients;

[0132] T is the number of leaf nodes;

[0133] ω i is the weight of the i-th leaf node.

[0134] Ω is a regular term in the function, which can suppress overfitting of the model. Perform a second-order Taylor expansion on the objective function and remove the constant term to obtain:

[0135]

[0136] in:

[0137] g i is the first-order derivative of the loss function;

[0138] h i is the second-order derivative of the loss function.

[0139] The weight of each leaf node is calculated as:

[0140]

[0141] The optimal value of the objective function is:

[0142]

[0143] As an integrated learning algorithm, XGBOOST has strong classification and regression capabilities and is widely used in the fields of data mining and machine learning. However, when dealing with the problem of shear force regression of resistance spot welding, XGBOOST needs a lot of parameter adjustment and optimization to achieve better results. Traditional parameter adjustment methods usually rely on experience and trial and error, which are inefficient and difficult to find the global optimal solution. Therefore, the present invention introduces the sparrow search algorithm (SSA). First, the parameters of the XGBoost algorithm are optimized. The specific process is as follows:

[0144] (1) Define the fitness function of the sparrow search algorithm:

[0145] The fitness function is used to evaluate the performance of the XGBoost model under the current parameter combination. The root mean square error (RMSE) after cross-validation is selected as the indicator of the fitness function. The smaller the fitness function value, the better the model performance.

[0146] (2) Set the search space:

[0147] The learning rate, maximum depth, and number of trees in the XGBoost parameters are selected as the search objects. The specific search value range is as follows:

[0148] Table 2 XGBoost parameter search range

[0149]

[0150] (3) Initialize the sparrow group:

[0151] A group of sparrows is randomly generated as the initial group. Each sparrow represents a set of XGBoost parameter combinations. Set the size of the sparrow group (i.e., population size) and the maximum number of iterations. In this method, the size of the sparrow group is set to 50, the maximum number of iterations is set to 100, and the position X of the sparrow is defined as:

[0152]

[0153] in:

[0154] n represents the number of sparrows;

[0155] d represents the dimension of the variable to be optimized (i.e. 3).

[0156] (4) Iterative optimization:

[0157] In each iteration, the fitness function value of each sparrow is calculated. Its fitness matrix F x for:

[0158]

[0159] Sort the sparrows according to the fitness function value, and select the best sparrow (i.e. the sparrow with the smallest fitness function value). Update the position of the sparrow according to the sparrow sorting and position update rules. Continuously iterate and update the position of the sparrow until the maximum number of iterations is reached or the fitness function value is no longer significantly improved.

[0160] (5) Output the optimal XGBoost parameter combination: After the iteration, the optimal sparrow position is output, that is, the optimal XGBoost parameter combination. Use this set of parameters to train the XGBoost model and evaluate its performance on the validation set.

[0161] For the sparrow search algorithm, the position of the population is particularly important in the algorithm. The more dispersed the position is, the stronger the randomness is, and the closer the optimization result of the sparrow search algorithm is to the global optimal solution. In the population initialization of the sparrow search algorithm, the initial population uses a random uniform matrix, which has weak randomness and poor global search ability. It is easy to fall into the local optimal solution, and the parameter search effect may not be as good as the default parameters of the original model. Therefore, in order to circumvent this problem and further optimize the performance of the weld nugget shear force prediction model of resistance spot welding, the present invention continues to introduce chaos mapping theory, and uses the randomness of chaos mapping to help optimize the initial population of the sparrow search algorithm, which helps to jump out of the local optimal solution and increase the optimal parameter search ability of the XGBoost algorithm. Circle chaos mapping is used in the present invention, and the Circle chaos mapping formula used is:

[0162]

[0163] Among them, x nis the position of the nth sparrow.

[0164] The initial population distribution after using chaos mapping is as follows Fig.10 -(b) shows that compared with Fig.10 -(a) uses a random uniform matrix chaotic value to distribute more evenly in all dimensions. Therefore, using this chaotic map to initialize the population of the sparrow search algorithm can further enhance the algorithm's optimization ability.

[0165] S6. Train and verify the final weld shear force prediction model

[0166] After the optimization of the XGBoost model is completed, in order to ensure the effectiveness and applicability of the weld shear force prediction model, the model needs to be trained and verified. The model training and verification process can not only determine the actual prediction accuracy of the model, but also evaluate the generalization ability and stability of the model.

[0167] like Fig.11 and Fig.12 As shown, in this embodiment, based on the weld point data described above, the K-fold cross validation method is used to obtain the root mean square error of the model for the tensile shear force prediction is 0.35750 kN, and the average absolute percentage error is 2.411%.

[0168] The model performance has been significantly improved to meet the requirements of resistance spot welding tensile shear force prediction accuracy, and can be widely used in the prediction of weld nugget tensile shear force of resistance spot welding.

[0169] In general, the present invention obtains the dynamic resistance curve and welding process parameters during the welding process, extracts and screens the characteristic quantities closely related to the tensile shear force, and establishes a preliminary multivariate polynomial regression model. On this basis, the XGBoost algorithm is used to build a prediction model, and the hyperparameter combination of XGBoost is optimized by the sparrow search algorithm (SSA) to improve the prediction accuracy of the model. Finally, after model training and verification, a weld tensile shear force prediction model with high accuracy and good generalization ability is obtained, which provides effective technical support for the quality control of resistance spot welding.

[0170] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for establishing a tensile shear force prediction model for resistance spot welding, characterized in that: The following steps are involved: Based on the resistance spot welding process, obtain the dynamic resistance curve data of the welding spot and the welding process parameters; Extract the characteristic quantity of the dynamic resistance curve of the solder joint; Conduct correlation analysis on the extracted feature quantities to select the feature quantities with high correlation with the tensile shear force of the weld point; A multivariate polynomial regression model was constructed based on the selected characteristic quantities, and a tension-shear force prediction model was preliminarily established; The tension-shear force prediction model is optimized based on the optimization method combining the XGBoost algorithm and the sparrow search algorithm. The final weld tensile shear force prediction model was trained and validated.

2. The method for establishing a tensile shear force prediction model for resistance spot welding according to claim 1, characterized in that: The feature quantity of extracting the dynamic resistance curve of the solder joint includes: Average resistance R mean ; Maximum resistance value R max ; Minimum resistance value R min ; The average value of the maximum resistance and the minimum resistance R middle ; Standard deviation of resistance value σ; Range R between the maximum and minimum points in the dynamic resistance signal deita ; Dynamic resistance curve integral D; initial resistance value r0; maximum resistance value and its time r1, t1 in the clamping stage; local minimum resistance value and its time r2, t2 in the softening process; local maximum resistance value and its time r3, t3 in the melting process; terminal resistance value and its time r4, t4; slope k1 from the softening minimum resistance point to the clamping maximum resistance point; slope k2 from the melting maximum resistance point to the softening minimum resistance point; slope k3 from the terminal point to the melting maximum resistance point.

3. The method for establishing a tensile shear force prediction model for resistance spot welding according to claim 1, characterized in that: The steps of performing correlation analysis on the extracted feature quantities, reducing the dimension of the process feature quantities, and screening out feature quantities with high correlation with the tensile shear force of the weld point include: Perform Pearson correlation coefficient analysis on the extracted feature quantities, calculate the Pearson correlation coefficient between each feature quantity and other feature quantities, and obtain a correlation coefficient matrix; By setting the correlation threshold, traversing the calculated Pearson correlation coefficient matrix, and filtering out the feature quantities that need to be retained based on the order of appearance of the eigenvalues, the dimensionality reduction of the feature quantities is achieved.

4. The method for establishing a tensile shear force prediction model for resistance spot welding according to claim 1, characterized in that: The steps of constructing a multivariate polynomial regression model based on the selected characteristic quantities and preliminarily establishing a tensile shear force prediction model include: Based on the selected feature quantities, a multivariate polynomial regression model is constructed, and the tensile shear force of the weld point is taken as the dependent variable. The selected feature quantities x1, x2, x3,…, x n as independent variable; Make m independent observations on the independent variable and obtain m groups of sample observations (x i1 ,x i2 ,x i3 ,…,x in ), where the dependent variable observation corresponding to the i-th group of sample observations is y i ; Establish the tensile shear force y of the weld i The multivariate polynomial regression equation between and the independent variable x: Among them, α0 is a constant term, α j and a jk is the parameter to be estimated, ε is the error term; The objective function f is defined to represent the tensile shear force output value of the prediction model, and its form is as follows: The least square method is used to estimate the parameters α0, α j ,α jk Estimation is performed to determine the optimal value of the parameter by minimizing the residual sum of squares, that is, solving the parameter combination that satisfies the following conditions: Calculate the coefficient of determination R of the model 2 and the adjusted R 2 The goodness of fit of the multivariate polynomial regression model was evaluated to verify the explanatory power of the model and ensure that the model was not overfitting.

5. The method for establishing a tensile shear force prediction model for resistance spot welding according to claim 1, characterized in that: The optimization method based on the combination of XGBoost algorithm and sparrow search algorithm, the steps of optimizing the tensile shear force prediction model include: The XGBoost algorithm is used to establish a tensile shear force prediction model, with the solder joint feature quantity as the input variable and the solder joint tensile shear force as the output variable; In the XGBoost algorithm, multiple classification and regression trees are used as base learners. Through the Boosting iteration method, the error of each round is brought into the next round of iteration for optimization, and finally an integrated tree model is formed; Define the objective function as the sum of the loss function and the regularization term, and the XGBoost model predicts the value The expression is as follows: Among them, T is the number of iterations, F t (x i ) is the t-th regression tree for sample x i The predicted value of .

6. The method for establishing a tensile shear force prediction model for resistance spot welding according to claim 5, characterized in that: The objective function is: Among them, Ω(f t ) represents the model complexity of the tth regression tree, which is defined as: Among them, γ and λ are regularization penalty coefficients, T is the number of leaf nodes, ω i is the weight of the i-th leaf node.

7. The method for establishing a tensile shear force prediction model for resistance spot welding according to claim 5, characterized in that: The sparrow search algorithm optimizes the parameters of the XGBoost model, and the optimization goal is to minimize the root mean square error fitness function value after cross validation.

Citation Information

Cited By

  • Spot welding STC curve recommendation method and device, electronic equipment and storage medium

    CN120791097A