A method for identifying the absorptivity of metal materials for laser soldering
By constructing a data set, cleaning and normalizing it, and combining it with a PyTorch training model, the problem of loss function failure in laser soldering metal material absorptivity identification was solved, and a prediction effect with fast convergence and strong generalization ability was achieved.
Patent Information
- Application Number
- CN202210923181.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-02
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-08-02
AI Technical Summary
Existing machine learning methods have the problem of failing to converge the loss function when the input data dimension is smaller than the output data dimension in the identification of the absorptivity of laser soldering metal materials, resulting in poor model prediction effect, and insufficient generalization ability of recurrent neural networks for unknown input data.
Construct a dataset, determine the number of models by time steps, use matplotlib to draw a 3D graph to determine the model power, use the PyTorch library to train the model, use the mean square error function and gradient descent algorithm to optimize the model parameters, and combine data cleaning and normalization to implement polynomial regression.
It achieves fast convergence of the loss function, low training requirements, strong generalization ability, good performance in predicting unknown data, and simplifies the absorptivity identification process of laser soft soldering metal materials.
Smart Images

Figure CN115482887B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of absorptivity identification of metal materials in laser soldering, and in particular to an absorptivity identification method of metal materials in laser soldering. Background Art
[0002] Existing machine learning methods often use regression prediction models with input data dimensions that are larger than the output data dimensions. This means that multiple variables are input and a single predicted value is output. When the input data dimensions are significantly smaller than the output data dimensions, the loss function fails to converge, resulting in poor model prediction performance and a high sample size requirement. While the recently emerging recurrent neural network combined with the K-nearest neighbor algorithm has demonstrated good performance for time series pattern learning, it is not a regression model in essence, and therefore has poor generalization capabilities for unknown input data and limited application value. Therefore, we propose a method for identifying the absorptivity of metal materials in laser soldering. Summary of the Invention
[0003] (1) Technical problems solved
[0004] In view of the shortcomings of the prior art, the present invention provides a method for identifying the absorptivity of laser soldering metal materials to solve the above problems.
[0005] (2) Technical solution
[0006] To achieve the above-mentioned purpose, the present invention provides the following technical solutions:
[0007] A method for identifying the absorptivity of a metal material for laser soldering, comprising the following steps:
[0008] Step 1: Build a dataset;
[0009] Step 2: Determine the number of models based on the time step;
[0010] Step 3: Use matplotlib to draw a 3D graph to determine the power of the model;
[0011] Step 4: Training the model;
[0012] Step 5: Combine the prediction results for each time step to generate a prediction curve and compare it with the actual curve.
[0013] Preferably, the constructed data set includes the following contents:
[0014] Data collection and segmentation: Based on the temperature variation curve generated by the welding experiment and the variables in the experiment, two effective features were screened out: the power used when welding the material and the surface area of the laser contact surface. In the program, they are labeled "power" and "area", respectively. Temperature is used as the label to be predicted, and is labeled "tem".
[0015] Data cleaning: filter out invalid data, which generally falls into three situations: the data value is empty or Nan, and the same power and area correspond to different tem. Only one group of such data is needed;
[0016] Dataset normalization: Use the mean normalization method to preprocess the data set, thereby reducing the fluctuation of the sample data so that the gradient descent can find a "shortcut" more quickly, thus reaching the global minimum, making the sample data change equally obvious within a smaller range.
[0017] Preferably, the 3D graph determination model drawing in the third step includes the following contents:
[0018] S1: Draw a three-dimensional relationship diagram between two variables and labels;
[0019] S2: draw the pre-fitted polynomial curve;
[0020] S3: Merge the pre-fitting curve and the feature label relationship diagram to observe the fitting status;
[0021] S4: Continuously optimize the polynomial model based on the fitting situation;
[0022] S5: After continuous iteration, the power corresponding to the area feature and the power feature is determined.
[0023] Preferably, the training model in the fourth step includes the following steps:
[0024] S1: Combine labels and features and shuffle their order for subsequent training of different batches;
[0025] S2: Build the model;
[0026] S3: Initialize the model parameters using a normal distribution with a standard deviation of 1 and a mean of 0;
[0027] S4: Use the mean square error function as the loss function;
[0028] S5: Use the gradient descent algorithm as the optimizer, set the learning rate to 0.001, the momentum coefficient to 0, and the L2 regularization coefficient (weight decay) to 1;
[0029] S6: Set the stochastic gradient descent batch size to 1, the number of iterations to 1000, and start training;
[0030] S7: Check the loss function decline curve;
[0031] S8: Based on the parameters obtained after model training, the temperature value of the time step is predicted.
[0032] (3) Beneficial effects
[0033] Compared with the prior art, the absorptivity identification method for laser soldering metal materials provided by the present invention has the following beneficial effects:
[0034] 1. The absorption rate identification method of laser soldering metal materials is simple to implement, has a fast loss function convergence speed, and has low requirements on computer performance during training.
[0035] 2. This method for identifying the absorption rate of laser soldering metal materials does not require a large amount of data, has strong generalization ability, and performs well in predicting unknown data. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 Schematic diagram of the process of the absorbance identification method of the present invention;
[0037] Figure 2 A schematic diagram of the three-dimensional relationship between two variables and labels;
[0038] Figure 3 This is a schematic diagram of the pre-fitted polynomial curve of the present invention;
[0039] Figure 4 Schematic diagram of the pre-fitted polynomial curve;
[0040] Figure 5 This is a schematic diagram after optimization of the pre-fitted polynomial curve;
[0041] Figure 6 This is a schematic diagram of the PyTorch library code;
[0042] Figure 7 A schematic diagram for building the model code;
[0043] Figure 8 Schematic diagram of the parameters for initializing the model;
[0044] Figure 9 Schematic diagram of loss function;
[0045] Figure 10 Schematic diagram of the gradient descent algorithm as an optimizer;
[0046] Figure 11 Schematic diagram for setting the stochastic gradient descent batch size to 1;
[0047] Figure 12 Schematic diagram of the loss function decline curve;
[0048] Figure 13 Schematic diagram of the predicted curve compared with the actual curve. DETAILED DESCRIPTION
[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.
[0050] Example
[0051] See also Figure 1-13 The embodiment of the present invention provides a method for identifying the absorptivity of a metal material for laser soldering, comprising the following steps:
[0052] Step 1: Build a dataset;
[0053] 1. Data collection and segmentation: Based on the temperature change curve generated by the welding experiment and the variables in the experiment, two effective features were screened out, namely the power used when welding the material and the surface area of the laser contact surface. In the program, they are marked with power and area respectively. Temperature is used as the label to be predicted and marked with tem.
[0054] 2. Data cleaning: Filter out invalid data. Generally, there are three situations: the data value is empty or Nan, and the same power and area correspond to different terms. Only one group of such data is needed.
[0055] 3. Dataset Normalization: Use the mean normalization method to preprocess the dataset, thereby reducing the fluctuation of the sample data so that gradient descent can find a "shortcut" more quickly to reach the global minimum, making the sample data vary significantly within a smaller range.
[0056] Step 2: Determine the number of models based on the time step;
[0057] The experimental data shows the material heating curve within 1 second. Each set of data corresponds to 1000 temperature values, so the time step T here should also be set to 1000.
[0058] Step 3: Use matplotlib to draw a 3D graph to determine the power of the model, see Figures 2 to 5 ;
[0059] Draw a three-dimensional relationship graph between two variables and labels;
[0060] Draw the pre-fitted polynomial curve;
[0061] Combine the pre-fitting curve and the feature label relationship diagram to observe the fitting status;
[0062] Continuously optimize the polynomial model based on the fitting situation;
[0063] After continuous iteration, the power corresponding to the area feature and the power feature is determined.
[0064] Step 4: Train the model. The modeling tool uses the PyTorch library. The basic form of the data is ndarray in Numpy. Figures 6 to 12 ;
[0065] Combine labels and features and shuffle their order for subsequent training of different batches;
[0066] Build a model;
[0067] Initialize the model parameters using a normal distribution with a standard deviation of 1 and a mean of 0;
[0068] Use the mean square error function as the loss function;
[0069] Use the gradient descent algorithm as the optimizer, set the learning rate to 0.001, the momentum coefficient to 0, and the L2 regularization coefficient (weight decay) to 1;
[0070] Set the stochastic gradient descent batch size to 1, the number of iterations to 1000, and start training;
[0071] Check the loss function decline curve;
[0072] Based on the parameters obtained after model training, the temperature value of the time step is predicted.
[0073] Step 5: Combine the prediction results of each time step to generate a prediction curve and compare it with the actual curve. Figure 8 .
[0074] Deep learning: Deep learning is a branch of machine learning. Many traditional machine learning algorithms have limited learning capabilities, and increasing the amount of data does not consistently increase the total amount of knowledge learned. However, deep learning systems can improve their performance by accessing more data—machine code for "more experience." Once a machine has gained sufficient experience through deep learning, it can be used for specific tasks, such as driving a car, identifying weeds among crops in a field, diagnosing diseases, and detecting machine failures.
[0075] Neural networks: Neural networks are designed to simulate the functions of the human nervous system by modeling and connecting neurons, the basic units of the human brain. The goal is to develop artificial systems with intelligent information processing capabilities such as learning, association, memory, and pattern recognition. A key feature of neural networks is their ability to learn from their environment and store the results of this learning distributed across the network's synaptic connections.
[0076] Recurrent Neural Network (RNN): A recurrent neural network (RNN) is a type of recurrent neural network that takes sequence data as input and recursively repeats itself in the direction of the sequence's evolution, with all nodes (recurrent units) connected in a chain-like fashion. RNNs have advantages in learning nonlinear features of sequences due to their memory, parameter sharing, and Turing completeness. RNNs have applications in natural language processing (NLP), such as speech recognition, language modeling, and machine translation, and are also used for various types of time series forecasting.
[0077] Polynomial regression: The regression function is a polynomial of the regression variables. A polynomial regression model is a type of linear regression model in which the regression function is linear with respect to the regression coefficients. Since any function can be approximated by a polynomial, polynomial regression has a wide range of applications.
[0078] K-Nearest Neighbor (KNN): The K-Nearest Neighbor (KNN) classification algorithm is one of the simplest methods in data mining classification. K-Nearest Neighbor stands for K nearest neighbors, meaning that each example can be represented by its K nearest neighbors. The KNN algorithm classifies each record in a data set.
[0079] While 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 these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for identifying the absorptivity of metal materials for laser soldering, characterized in that: The following steps are involved: Step 1: Build a dataset; Step 2: Determine the number of models based on the time step; Step 3: Use matplotlib to draw a 3D graph to determine the power of the model; Step 4: Training the model; Step 5: Combine the prediction results of each time step to generate a prediction curve and compare it with the actual curve; Said data set construction includes data collection and division, data cleaning and data set normalization; Data collection and segmentation include the following: Based on the temperature variation curve generated by the welding experiment and the variables in the experiment, two effective features were screened out: the power used when welding the material and the surface area of the laser contact surface. In the program, they are labeled "power" and "area", respectively. Temperature is used as the prediction label, labeled "tem". The 3D diagram determination model drawing in the third step includes the following contents: S1: Draw a three-dimensional relationship diagram between two variables and labels; S2: draw the pre-fitted polynomial curve; S3: Merge the pre-fitting curve and the feature label relationship diagram to observe the fitting status; S4: Continuously optimize the polynomial model according to the fitting situation; S5: After continuous iteration, the power corresponding to the area feature and the power feature is determined; The training model in the fourth step includes the following steps: S1: Combine labels and features and shuffle their order for subsequent training of different batches; S2: Build the model; S3: Initialize the model parameters using a normal distribution with a standard deviation of 1 and a mean of 0; S4: Use the mean square error function as the loss function; S5: Use the gradient descent algorithm as the optimizer, set the learning rate to 0.001, the momentum coefficient to 0, and the L2 regularization coefficient to 1; S6: Set the stochastic gradient descent batch size to 1, the number of iterations to 1000, and start training; S7: Check the loss function decline curve; S8: Based on the parameters obtained after model training, the temperature value of the time step is predicted.
2. The method for identifying the absorptivity of a metal material for laser soldering according to claim 1, wherein: Data cleaning includes the following: Filter out invalid data.
3. The method for identifying the absorptivity of metal materials for laser soldering according to claim 1, wherein: Dataset normalization includes the following: The dataset was preprocessed using mean normalization method.
Citation Information
Patent Citations
Method for calibration of laser absorptivity of metal material
CN107462597A
Temperature-power modeling method for laser soldering power automatic control system
CN108983611A