A method for predicting a ship T-beam welding robot operation time based on machine learning
By constructing linear models of multiple weld types and using machine learning to predict the operation time of welding robots for ship T-beams, the problem of inaccurate welding time prediction is solved, the accuracy of prediction is improved, and it is applicable to various shipbuilding workshops.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHIPBUILDING TECHNOLOGY RESEARCH INSITITUTE (NO 11 INSTITUTE OF CSSC)
- Filing Date
- 2022-05-19
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, there is a significant gap between the theoretical and practical operation time of ship T-beam welding robots. This is mainly due to factors such as the skill level of the robot operator, the quality of welding materials, the mismatch between welding path and parameters, segment placement errors, the influence of tack welding, and other factors that cause welding interruptions or extensions, making it difficult to accurately predict the welding time.
Machine learning methods were used to construct linear models of various types of welds by acquiring weld length and actual operation time data. The gradient descent method was used to train the models to predict the operation time of T-beam welding robots, including the operation time of flat welding, vertical welding, patch plate welding, elbow plate welding and through hole vertical welding.
It improves the accuracy of predicting welding operation time in shipbuilding workshops and is applicable to small assembly, medium assembly and painting workshops, meeting the scenario where the amount of work and operation time are linearly distributed.
Smart Images

Figure CN115270592B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of shipbuilding technology, and in particular to a method for predicting the operation time of a welding robot for ship T-beams based on machine learning. Background Technology
[0002] The T-beam welding robot on the thin plate segmentation production line plans the welding path and generates welding instructions for the robot's welding operation using advanced offline programming software. Theoretically, the entire welding process requires no human intervention. However, due to various subjective and objective reasons, welding is sometimes interrupted or prolonged, resulting in a significant difference between the theoretical welding time and the actual welding time. The reasons for this are as follows:
[0003] ① The skill level of the robot operators is not up to standard;
[0004] ② The welding materials are damp;
[0005] ③ The cut surface of the free edge of the patch is uneven;
[0006] ④ The welding path and welding parameters are mismatched;
[0007] ⑤ The segmented placement creates a large angle between the robot gantry and the robot.
[0008] ⑥ The size and position of the tack weld leg affect the robot's positioning and arc voltage tracking;
[0009] ⑦ The gaps in the previous assembly are not up to standard, some welds cannot be worked on, or the model details are not processed, causing interference in the operation;
[0010] ⑧ Poor conductivity of the torch tip, inadequate torch cleaning leaving residue, and occasional welding machine malfunctions.
[0011] Based on records of welding times for a large number of actual ship sections and empirical estimations, the operation time is linearly distributed with the length of the weld seam in the section. That is, the longer the length of the weld seam in the T-beam of the ship section, the longer the welding operation time. Further analysis shows that the higher the proportion of vertical weld seams and through-hole weld seams in the weld seam length, the longer the welding operation time. Summary of the Invention
[0012] The purpose of this invention is to provide a method for predicting the operation time of a welding robot for ship T-beams based on machine learning.
[0013] To achieve the above objectives, the technical solution of the present invention is as follows:
[0014] A method for predicting the operation time of a welding robot for ship T-beams based on machine learning, characterized by the following steps:
[0015] Step S1: Obtain the weld length of various types of welds and record the dataset of their actual operation time;
[0016] Step S2: Divide the dataset into training and test sets according to the time dimension, and load the segmented samples of the training and test sets respectively. ;
[0017] Step S3: Normalize the weld length for different weld types;
[0018] Step S4: Solve and construct linear models of multiple weld types using the gradient descent method.
[0019] The linear model for multiple types of welds is ,
[0020] in, This refers to the length of flat welds. The weighting of the effect of the weld length on the robot's operation time is determined by the length of the weld. The length of the vertical weld is [number] meters. The weighting of the welding length influencing the robot's operation time is determined by the following: For the number of meters of welded plates, To determine the weight of the number of welded plates affecting the robot's operation time, This refers to the length of the elbow plate weld. The weighting of the number of meters of elbow plate welding affects the robot's operation time. The length of the vertical weld for the through hole. The weighting of the number of meters of vertical welding through the hole affects the robot's operation time. These are the constants of the linear model;
[0021] make , Convert the linear model of multiple weld types into vector form
[0022] ,
[0023] in ,
[0024] ,
[0025] Assume there is Segmented samples , ,but ;
[0026] Step S5: Use the mean squared error loss function The evaluation model is used to predict the degree of discrepancy between the T-beam robot's operation time and the actual operation time.
[0027] Step S6: Set the initial values for hyperparameters and model variables;
[0028] Step S7: Train the model using gradient descent and calculate... Find the minimum value of the function and update the weights. The algorithm;
[0029] Represent the Loss function as a vector form ,
[0030] in, , , , It is an n x 6 matrix;
[0031] Solve Minimum value of the function
[0032] right Find the partial derivative ,
[0033] Update algorithm weights ;
[0034] Step S8: Visualize the results and observe. The function's performance on the test set data helps identify the training set. Function values and test sets The number of training iterations that minimizes the generalization error between function values Retrain the model and calculate the corresponding weights. Linear models of multiple weld types were obtained;
[0035] Step S9: Predict the operation time of the new ship section sample data on the model.
[0036] Furthermore, in step S1, each segment of the T-beam welding operation stage includes flat welding, vertical welding, patch plate welding, elbow plate welding, and through hole vertical welding, which are represented by "HORZ", "VERTI", "CL", "BK" and "VB" respectively. Each data point in the dataset records the actual welding operation time and the total actual operation time of a segment of the T-beam.
[0037] Furthermore, step S2 includes slicing the data for the entire time period, the past year, the past six months, the past month, and the same period in previous years.
[0038] Further, step S4 includes selecting the number of independent variables and determining the model type.
[0039] When the total weld length is used as the independent variable to predict the robot's operation time, the model is a univariate linear model, which is represented by a line on a two-dimensional coordinate axis.
[0040] When two types of weld seams are used to predict robot operation time, the model is a binary linear model, which is represented as a surface on a three-dimensional coordinate axis.
[0041] When three or more types of welds are used to predict robot operation time, the model is a multivariate linear model, which is represented by a hyperplane.
[0042] Furthermore, in step S6, the hyperparameters include the learning rate. and number of iterations The initial variable is a weight vector. ,
[0043] Initialize to one The random value.
[0044] Further, step S8 includes retraining the model and calculating the corresponding weights. Then, the weights Perform inverse normalization.
[0045] This invention constructs a linear model function for multiple weld types by utilizing the characteristics of segmented weld sample data. It trains the weights of each weld type in the model that affect the operation time, and predicts the operation time of the new segment at the robot welding station. It can be applied to various robot-based shipbuilding workshops, such as small assembly, medium assembly, and painting workshops where the amount of work and the operation time are linearly or nearly linearly distributed, thereby improving the accuracy of operation time prediction in shipbuilding workshops. Attached Figure Description
[0046] Figure 1 This is a flowchart illustrating the use of the gradient descent method to derive linear model functions for multiple types of welds in this invention.
[0047] Figure 2 Input a sample view for the dataset of this invention;
[0048] Figure 3 This is a diagram showing the relationship between various weld types and operation time in this invention;
[0049] Figure 4 This is a diagram showing the distribution of the training set data for this invention.
[0050] Figure 5 This is a diagram showing the data distribution of the test set for this invention.
[0051] Figure 6 This is a recorded view showing how the training loss and test loss decrease with the number of training iterations in this invention;
[0052] Figure 7 This is a visualization of how the training loss and test loss decrease with the number of iterations during the learning process of this invention.
[0053] Figure 8 This is a visualization view comparing the training set of this invention with the actual training results after training is completed;
[0054] Figure 9 This is a visualization view comparing the test set after training with the actual test set of this invention. Detailed Implementation
[0055] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] This embodiment discloses a method for predicting the operation time of a ship T-beam welding robot based on machine learning, such as... Figure 1 As shown, it includes the following steps:
[0057] Step S1, as follows Figure 2 , 3 As shown, the offline programming software for the T-beam welding robot plans the weld length of various types of welds and records their actual operation time. Each segment of the T-beam welding stage includes multiple weld types, specifically flat welding, vertical welding, patch plate welding, elbow plate welding, and through hole vertical welding, which are represented by "HORZ", "VERTI", "CL", "BK", and "VB" respectively. Each data point in the dataset records the actual welding operation time and the total actual operation time of a segment of the T-beam.
[0058] Step S2, as follows Figure 4 , 5 As shown, the dataset is divided into training and testing sets according to the time dimension, and sliced according to the entire time period, the past year, the past six months, the past month, and the same period of previous years. Alternatively, the dataset can be divided into training and testing sets in a random manner, for example, by dividing the training and testing sets in a 7:3 ratio, and then loading the segmented samples from the training and testing sets respectively. .
[0059] Step S3: Normalize the weld length for different weld types. Different types of welds have different impacts on operation time and different weight ratios in the data sample. To improve learning accuracy, limit the values of weld data to a certain range so that all types of welds are in the same range and the same order of magnitude, so that the model converges faster and obtains the optimal solution.
[0060] Step S4: Select the number of independent variables and determine the model type. When the total weld length is used as the independent variable to predict the robot's operation time, it is a univariate linear model, which is represented by a line on a two-dimensional coordinate axis. When two types of welds are used to predict the robot's operation time, it is a bivariate linear model, which is represented by a surface on a three-dimensional coordinate axis. When three or more types of welds are used to predict the robot's operation time, it is a multivariate linear model, which is represented by a hyperplane.
[0061] The linear model for multiple types of welds is ,
[0062] This refers to the length of flat welds. The weighting of the impact of the number of meters of flat welding on the robot's operation time;
[0063] The length of the vertical weld is [number] meters. The weighting of the welding length in relation to the robot's operation time;
[0064] For the number of meters of welded plates, The weighting of the number of welded plates affecting the robot's operation time;
[0065] This refers to the length of the elbow plate weld. The weighting of the number of meters of elbow plate welding affects the robot's operation time;
[0066] The length of the vertical weld for the through hole. The weighting of the number of meters of vertical welding through the hole affects the robot's operation time;
[0067] These are linear model constants.
[0068] make , Convert the linear model of multiple weld types into vector form
[0069] ,
[0070] in , ,
[0071] If we assume there are n segmented samples , ,but .
[0072] Step S5: Use the mean squared error loss function The evaluation model predicts the degree of discrepancy between the T-beam robot's operation time and the actual operation time.
[0073] Step S6: Set the initial values for hyperparameters and model variables. Hyperparameters include the learning rate. and number of iterations The initial values of the model variables refer to the weight vector. Initialized to a ( The random value of ).
[0074] Step S7: Train the model using gradient descent, specifically by calculating the mean squared error loss function. The minimum value will Represented in vector form,
[0075] ,
[0076] in , ,
[0077] , It is an n x 6 matrix;
[0078] Solve Minimum value of the function
[0079] right Find the partial derivative ,
[0080] Weight update algorithm .
[0081] Step S8, Observation The function's performance on the test set data helps identify the training set. Function values and test sets The number of training iterations that minimizes the generalization error between function values ,like Figure 6 As shown, the training set The function value is identified as test set The function value is identified as The test set error begins to rise between 600 and 700 training iterations, and the generalization error reaches its minimum at this point. The value is around 600, and the model is retrained based on this.
[0082] like Figures 7-9 As shown, the training process and results are visualized, and the weights that minimize the generalization error are calculated. For weights By performing inverse normalization, a better linear model for multiple weld types is obtained. .
[0083] Step S9: Input the weld data of the new segment, and predict the operation time of the new ship segment sample data on the model based on the multi-type weld linear model.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the operation time of a welding robot for ship T-beams based on machine learning, characterized in that, Includes the following steps: Step S1: Obtain the weld length of various types of welds and record the dataset of their actual operation time; Step S2: Divide the dataset into training and test sets according to the time dimension, and load the segmented samples of the training and test sets respectively. ; Step S3: Normalize the weld length for different weld types; Step S4: Solve and construct linear models of multiple weld types using the gradient descent method. The linear model for multiple types of welds is , in, This refers to the length of flat welds. The weighting of the effect of the weld length on the robot's operation time is determined by the length of the weld. The length of the vertical weld is [number] meters. The weighting of the welding length influencing the robot's operation time is determined by the following: For the number of meters of welded plates, To determine the weight of the number of welded plates affecting the robot's operation time, This refers to the length of the elbow plate weld. The weighting of the number of meters of elbow plate welding affects the robot's operation time. The length of the vertical weld for the through hole. The weighting of the number of meters of vertical welding through the hole affects the robot's operation time. These are the constants of the linear model; make , Convert the linear model of multiple weld types into vector form , in , , Assume there is Segmented samples , ,but ; Step S5: Use the mean squared error loss function The evaluation model is used to predict the degree of discrepancy between the T-beam robot's operation time and the actual operation time. Step S6: Set the initial values for hyperparameters and model variables; Step S7: Train the model using gradient descent and calculate... Find the minimum value of the function and update the weights. The algorithm; Represent the Loss function as a vector form , in, , , , It is an n x 6 matrix; Solve Minimum value of the function right Find the partial derivative , Update algorithm weights ; Step S8: Visualize the results and observe. The function's performance on the test set data helps identify the training set. Function values and test sets The number of training iterations that minimizes the generalization error between function values Retrain the model and calculate the corresponding weights. Linear models of multiple weld types were obtained; Step S9: Predict the operation time of the new ship section sample data on the model.
2. The method for predicting the operation time of a ship T-beam welding robot based on machine learning according to claim 1, characterized in that, In step S1, each segment T-beam welding operation stage includes flat welding, vertical welding, patch plate welding, elbow plate welding, and through hole vertical welding, which are represented by "HORZ", "VERTI", "CL", "BK" and "VB" respectively. Each data point in the dataset records the actual welding operation time and the total actual operation time of a segment T-beam.
3. The method for predicting the operation time of a ship T-beam welding robot based on machine learning according to claim 1, characterized in that, Step S2 includes slicing the data for the entire time period, the past year, the past six months, the past month, and the same period in previous years.
4. The method for predicting the operation time of a ship T-beam welding robot based on machine learning according to claim 1, characterized in that, Step S4 includes selecting the number of independent variables and determining the model type. When the total weld length is used as the independent variable to predict the robot's operation time, the model is a univariate linear model, which is represented by a line on a two-dimensional coordinate axis. When two types of weld seams are used to predict robot operation time, the model is a binary linear model, which is represented as a surface on a three-dimensional coordinate axis. When three or more types of welds are used to predict robot operation time, the model is a multivariate linear model, which is represented by a hyperplane.
5. The method for predicting the operation time of a ship T-beam welding robot based on machine learning according to claim 1, characterized in that, In step S6, the hyperparameters include the learning rate. and number of iterations The initial variable is a weight vector. , Initialize to one The random value.
6. The method for predicting the operation time of a ship T-beam welding robot based on machine learning according to claim 5, characterized in that, Step S8 includes retraining the model and calculating the corresponding weights. Then, the weights Perform inverse normalization.