Path planning method of laser welding head, medium and system
Through deep learning and multi-objective optimization technology, automatic planning and dynamic optimization of laser welding paths are solved, and the problems of instability and inefficiency of welding quality caused by relying on manual experience in the existing technology are solved, and the stability and controllability of welding quality are achieved.
Patent Information
- Application Number
- CN202510147558.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-05-02
AI Technical Summary
The existing laser welding technology relies on manual experience to preset welding paths, resulting in unstable welding quality, low efficiency, and lack of intelligent control capabilities.
Deep convolutional neural network is used to predict welding effects, establish a welding gain matrix for multi-objective optimization, automatically identify the welding basic units through the singular value decomposition method, and monitor the welding process in real time for dynamic optimization.
Automatic planning and dynamic optimization of welding paths are realized, the stability and controllability of welding quality are improved, and the limitations of traditional manual experience path planning are broken.
Smart Images

Figure CN119910298A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of laser welding, and in particular, relates to a path planning method, medium and system for a laser welding head. Background Art
[0002] Laser welding technology is a key process in modern manufacturing and is widely used in aerospace, automobile manufacturing, precision electronics and other fields. Traditional laser welding path planning mainly relies on the experience of process engineers to determine the welding trajectory and process parameters through manual teaching or offline programming. This path planning method usually requires engineers to manually set the welding start point, end point, path direction, speed, power and other key parameters according to the structural characteristics, material properties and welding requirements of the workpiece. At the same time, some automated welding systems have begun to introduce simple visual guidance functions for weld tracking and position compensation, but their degree of intelligence is still limited.
[0003] However, this path planning method that relies on manual experience has obvious shortcomings. First, it is difficult to ensure the optimality of the manually planned welding path. Different process engineers may give different path plans, and the quality of the plan mainly depends on personal experience. Secondly, the traditional path planning method lacks a scientific optimization mechanism and cannot comprehensively consider multiple performance indicators such as weld quality, heat-affected zone characteristics, and residual stress. Furthermore, the pre-set fixed path cannot be dynamically adjusted according to the actual welding conditions. When the weld gap changes, the material surface state changes, etc., it is difficult to ensure the stability of the welding quality. In addition, the existing visual guidance system can only perform simple path tracking and position compensation, and lacks the ability to evaluate and control the welding quality in real time.
[0004] These technical limitations often lead to problems such as unstable welding quality and low efficiency during laser welding. Especially when processing complex components, due to the complexity of the welding path and the large number of process parameters, relying entirely on manual experience for path planning is both time-consuming and labor-intensive, and it is difficult to obtain the optimal solution. It is difficult for existing technologies to break through the limitations of manual experience, and there is a lack of a method that can automatically generate the optimal welding path and perform intelligent control, which seriously restricts the further development and application of laser welding technology. In other words, there is a technical problem in the existing technology that laser welding often relies on manual experience to pre-set the welding path, which is not accurate enough. Summary of the invention
[0005] In view of this, the present invention provides a path planning method, medium and system for a laser welding head, which can solve the technical problem in the prior art that laser welding often relies on manual experience to pre-set the welding path, which is not accurate enough.
[0006] The present invention is implemented as follows: In a first aspect, the present invention provides a path planning method for a laser welding head, comprising the following steps: collecting image information of the workpiece to be welded, inputting the image information of the workpiece to be welded into a preset welding effect image generation model, and obtaining a preset welding effect image of the workpiece to be welded, wherein the preset welding effect image contains welding quality thermogram information; the preset welding effect image generation model adopts a deep convolutional neural network structure, including an encoder network for extracting multi-scale features of welds and a decoder network for generating an ideal welding effect image with a welding quality thermogram; establishing a welding gain matrix including a weld quality submatrix, a heat-affected zone feature submatrix, a weld mechanical property submatrix, and a welding stress distribution submatrix; extracting edge contours from the image information of the workpiece to be welded, and performing segmented processing on the edge contours based on a singular value decomposition method. A plurality of basic welding units are obtained; a corresponding welding process parameter space is established for each of the basic welding units; a welding multi-objective optimization function including a path quality optimization function, a thermogram matching optimization function and a process parameter optimization function is established based on the welding gain matrix, and a final optimization target value is obtained by weighted summation; an initial welding path is generated by combining the optimal welding process parameters of each basic welding unit; the initial welding path is applied to the workpiece to be welded, and a real-time welding process image and a welding quality thermogram are collected; feature similarity calculation is performed on the real-time welding process image and the welding quality thermogram with the preset welding effect image; the initial welding path is iteratively optimized based on the feature similarity calculation result to obtain an optimized welding path; the optimized welding path is output as a final welding path for laser welding head control.
[0007] Among them, the step of collecting image information of the parts to be welded specifically includes collecting image information including weld position information, weld contour characteristics, weld thickness information, and weld surface optical characteristics; using an industrial camera to collect high-resolution images of the parts to be welded under different angles and lighting conditions to obtain weld surface morphology and contour feature information; using a laser line scanning sensor to perform a three-dimensional contour scan of the weld to obtain geometric dimension information such as the depth and width of the weld; and using a structured light sensor to collect the reflection spectrum characteristics of the weld surface.
[0008] Among them, the weld quality submatrix in the welding gain matrix includes weld flatness index, weld continuity index, penetration uniformity index, porosity index, and inclusion content index; the heat affected zone characteristic submatrix includes heat affected zone width index, heat affected zone hardness distribution index, grain size index, and tissue uniformity index; the weld mechanical property submatrix includes tensile strength index, yield strength index, elongation index, impact toughness index, and fatigue strength index; the welding stress distribution submatrix includes longitudinal residual stress index, transverse residual stress index, deformation index, and stress concentration factor index.
[0009] Among them, the edge contour in the image information of the workpiece to be welded is extracted, and the edge contour is segmented based on the singular value decomposition method to obtain a plurality of welding basic units, and the welding feature vector of each welding basic unit is extracted at the same time; the welding feature vector includes a weld geometry feature vector and a surface feature vector, the weld geometry feature vector includes a curvature parameter, an orientation angle parameter, and a line segment length parameter, the welding process feature vector includes a welding head abutment angle parameter, a welding thickness parameter, and a gap size parameter, and the surface feature vector includes a roughness parameter, an oxidation degree parameter, and a coating characteristic parameter.
[0010] Among them, a corresponding welding process parameter space is established for each of the welding basic units, and the welding process parameter space includes welding angle parameters, welding head abutment angle parameters, welding power parameters, and welding speed parameters; the starting point coordinates, end point coordinates, welding angle parameters, welding head abutment angle parameters, welding power parameters, and welding speed parameters of the welding basic units are constructed into path nodes; continuous path segments are generated between adjacent path nodes through cubic spline interpolation; all the continuous path segments are connected in a welding sequence to form a complete welding path.
[0011] Among them, the path quality optimization function is used to optimize the continuity and smoothness of the welding path, and the input includes the curvature parameter, direction angle parameter, and line segment length parameter in the weld geometric feature vector of the welding basic unit, and the output is the path quality score; the thermal map matching optimization function is used to optimize the matching degree between the welding effect and the expected target, and the input includes the feature similarity calculation result between the real-time welding process image and the preset welding effect image, and the output is the thermal map matching score; the process parameter optimization function is used to optimize the welding process parameter combination, and the input includes the welding angle parameter, welding head abutment angle parameter, welding power parameter, and welding speed parameter in the welding process parameter space, and the output is the process parameter score.
[0012] Among them, the real-time welding process image is collected by a high-speed industrial camera with a frame rate of not less than 1000 frames per second. The welding quality thermogram uses a pseudo-color method to represent the distribution of weld quality parameters, specifically mapping the weld strength distribution to a red channel value, and the red channel value range is 0 to 255; mapping the residual stress distribution to a green channel value, and the green channel value range is 0 to 255; mapping the heat-affected zone characteristic distribution to a blue channel value, and the blue channel value range is 0 to 255.
[0013] Among them, the initial welding path is iteratively optimized based on the feature similarity calculation result, specifically, the structural similarity index of the real-time welding process image and the preset welding effect image is calculated; the Euclidean distance between the welding quality thermogram and the welding quality thermogram in the preset welding effect image is calculated; when the structural similarity index is less than 0.85 or the Euclidean distance is greater than 0.2, a local search is performed on the welding process parameter space.
[0014] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the above-mentioned path planning method for a laser welding head.
[0015] The third aspect of the present invention provides a path planning system for a laser welding head, comprising the above-mentioned computer-readable storage medium, wherein the system is any one of a computer, a server, and a single-chip microcomputer, wherein the computer-readable storage medium is arranged in the system, and wherein the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
[0016] Compared with the prior art, the present invention provides a path planning method, medium and system for a laser welding head. The present invention proposes a laser welding path planning method based on deep learning and multi-objective optimization, and innovatively constructs an intelligent path planning and optimization system. The method predicts the welding effect through a deep convolutional neural network, establishes a scientific welding quality evaluation system, realizes automatic planning and dynamic optimization of the welding path, and effectively overcomes the limitations of traditional manual experience path planning.
[0017] The present invention successfully solves the key problems in traditional welding path planning. By presetting the welding effect image generation model, the system can automatically predict the welding quality under different paths and parameter combinations without relying on manual experience. The establishment of the welding gain matrix realizes the quantitative evaluation of welding quality, which provides a scientific basis for path optimization. The weld segmentation method based on singular value decomposition enables the system to automatically identify welding features and generate the optimal path. The real-time monitoring and feedback mechanism ensures the dynamic optimization capability of path planning, and can adjust the process parameters in time according to the actual welding conditions.
[0018] The present invention combines deep learning technology with welding process knowledge to achieve intelligent and precise welding path planning. The system can not only automatically generate the optimal welding path, but also dynamically adjust it according to real-time monitoring results. This intelligent path planning method significantly improves the stability and controllability of welding quality, breaks through the limitations of traditional manual experience path planning, and solves the technical problem that laser welding in the prior art often relies on manual experience to pre-set the welding path, which is not accurate enough. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flow chart of the method of the present invention.
[0020] Figure 2 This is a diagram of the weld surface morphology parameters in Example 2.
[0021] Figure 3 This is a diagram of the convergence process during the process parameter optimization in Example 2. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0023] like Figure 1 FIG. 1 is a flow chart of a path planning method for a laser welding head provided by the first aspect of the present invention. The method comprises the following steps:
[0024] A path planning method for a laser welding head comprises the following steps:
[0025] S01. Collecting image information of the workpiece to be welded, wherein the image information includes weld position information, weld contour features, weld thickness information, and weld surface optical features;
[0026] S02, inputting the image information of the workpiece to be welded into a preset welding effect image generation model to obtain a preset welding effect image of the workpiece to be welded, wherein the preset welding effect image includes welding quality thermodynamic map information;
[0027] S03, establishing a welding gain matrix, wherein the welding gain matrix includes a weld quality sub-matrix, a heat affected zone characteristic sub-matrix, a weld mechanical property sub-matrix, and a welding stress distribution sub-matrix;
[0028] S04, extracting edge contours from the image information of the workpiece to be welded, segmenting the edge contours based on a singular value decomposition method to obtain a plurality of welding basic units, and extracting a welding feature vector of each welding basic unit;
[0029] S05. Establish a corresponding welding process parameter space for each of the welding basic units, wherein the welding process parameter space includes welding angle parameters, welding head abutment angle parameters, welding power parameters, and welding speed parameters;
[0030] S06, calculating the comprehensive welding quality score of each welding basic unit in its corresponding welding process parameter space according to the welding gain matrix;
[0031] S07, establishing a welding multi-objective optimization function based on the welding quality comprehensive score, and calculating the optimal welding process parameter combination of each welding basic unit;
[0032] S08, combining the optimal welding process parameters of each welding basic unit to generate an initial welding path;
[0033] S09, applying the initial welding path to the workpiece to be welded, and collecting real-time welding process images and welding quality thermograms;
[0034] S10, calculating feature similarity between the real-time welding process image, the welding quality thermogram and the preset welding effect image;
[0035] S11, iteratively optimizing the initial welding path based on the feature similarity calculation result to obtain an optimized welding path;
[0036] S12, outputting the optimized welding path as a final welding path for laser welding head control.
[0037] The preset welding effect image generation model adopts a deep convolutional neural network structure, including an encoder network and a decoder network. The encoder network includes 5 convolutional layers for extracting multi-scale features of welds, and the decoder network includes 5 deconvolution layers for generating ideal welding effect images with welding quality thermograms. The training data set of the preset welding effect image generation model includes 10,000 sets of expert-annotated images of workpieces to be welded and pairs of ideal welding effect images. The ideal welding effect images are annotated with weld strength distribution, stress distribution, and tissue uniformity distribution in the form of welding quality thermograms.
[0038] The welding quality thermogram uses pseudo-color to represent the distribution of weld quality parameters, including weld strength distribution, residual stress distribution, and heat-affected zone characteristic distribution;
[0039] The welding feature vector includes a weld geometry feature vector and a surface feature vector. The weld geometry feature vector includes a curvature parameter, an orientation angle parameter, and a line segment length parameter. The welding process feature vector includes a welding head abutment angle parameter, a welding thickness parameter, and a gap size parameter. The surface feature vector includes a roughness parameter, an oxidation degree parameter, and a coating characteristic parameter.
[0040] In the welding gain matrix:
[0041] The weld quality sub-matrix includes weld flatness index, weld continuity index, penetration uniformity index, porosity index, and inclusion content index;
[0042] The heat affected zone characteristic sub-matrix includes a heat affected zone width index, a heat affected zone hardness distribution index, a grain size index, and a tissue uniformity index;
[0043] The weld mechanical properties sub-matrix includes tensile strength index, yield strength index, elongation index, impact toughness index, and fatigue strength index;
[0044] The welding stress distribution submatrix includes a longitudinal residual stress index, a transverse residual stress index, a deformation index, and a stress concentration factor index;
[0045] The welding multi-objective optimization function adopts a weighted summation method to construct a comprehensive evaluation function, and the weight coefficient is determined by a hierarchical analysis method to achieve multi-objective optimization of welding process parameters;
[0046] The singular value decomposition method decomposes the characteristic matrix of the weld profile curve, extracts the main characteristic vectors, and determines the division scheme of the welding basic unit based on the cluster analysis of the characteristic vectors;
[0047] The welding quality thermodynamic map uses a pseudo-color method to represent the distribution of weld quality parameters, specifically: mapping the weld strength distribution to a red channel value, the red channel value range is 0 to 255; mapping the residual stress distribution to a green channel value, the green channel value range is 0 to 255; mapping the heat affected zone characteristic distribution to a blue channel value, the blue channel value range is 0 to 255; synthesizing the red channel value, the green channel value, and the blue channel value into an RGB color image;
[0048] The initial welding path is iteratively optimized based on the feature similarity calculation result, specifically: calculating the structural similarity index between the real-time welding process image and the preset welding effect image; calculating the Euclidean distance between the welding quality thermogram and the welding quality thermogram in the preset welding effect image; when the structural similarity index is less than a first threshold or the Euclidean distance is greater than a second threshold, performing a local search on the welding process parameter space; updating the welding angle parameters, welding head abutment angle parameters, welding power parameters, and welding speed parameters in the welding process parameter space; and repeatedly performing steps S08 to S10 until the structural similarity index is greater than or equal to the first threshold and the Euclidean distance is less than or equal to the second threshold;
[0049] The welding path is specifically: establishing a path coordinate system according to the spatial position information of the welding basic unit; constructing the starting point coordinates, end point coordinates, welding angle parameters, welding head abutment angle parameters, welding power parameters, and welding speed parameters of each welding basic unit into path nodes; generating continuous path segments between adjacent path nodes through cubic spline interpolation; and connecting all the continuous path segments in a welding sequence to form a complete welding path;
[0050] The welding multi-objective optimization function includes a path quality optimization function, a thermal map matching optimization function, and a process parameter optimization function;
[0051] The path quality optimization function is used to optimize the continuity and smoothness of the welding path, the input includes the curvature parameter, the direction angle parameter, and the line segment length parameter in the weld geometric feature vector of the welding basic unit, and the output is the path quality score;
[0052] The thermal map matching optimization function is used to optimize the matching degree between the welding effect and the expected target, the input includes the feature similarity calculation result between the real-time welding process image and the preset welding effect image, and the output is the thermal map matching score;
[0053] The process parameter optimization function is used to optimize the welding process parameter combination, the input includes the welding angle parameter, the welding head abutment angle parameter, the welding power parameter, and the welding speed parameter in the welding process parameter space, and the output is the process parameter score;
[0054] The welding multi-objective optimization function obtains a final optimization target value by weighted summing the path quality score, the thermal map matching score, and the process parameter score.
[0055] The specific implementation of the above steps is described in detail below.
[0056] The specific implementation method of step S01 is to use a machine vision system to collect image information of the workpiece to be welded. This step completes data collection through the collaborative work of multiple sensing devices such as industrial cameras, laser line scanning sensors and structured light sensors. First, an industrial camera with a resolution of 4096×3072 pixels is used to collect high-resolution images of the workpiece to be welded at five different angles: 0 degrees, 45 degrees, 90 degrees, 135 degrees and 180 degrees. The lighting conditions include two modes: diffuse reflection light source and coaxial light source. The surface morphology and contour feature information of the weld are obtained. When collecting images, the camera exposure time is set to 10 milliseconds and the gain value is set to The collected image is denoised by Gaussian filtering, the filter kernel size is 5×5 pixels, and the standard deviation is 1.5. Then a line laser sensor is used to perform a three-dimensional profile scan of the weld at a spacing of 0.1 mm. The laser power is 5 mW and the scanning frequency is 200 Hz. The geometric dimension information such as the depth and width of the weld is obtained. The scanning data is fitted by the least squares method to obtain the spatial contour curve of the weld. Finally, a structured light sensor is used to collect the reflective spectral characteristics of the weld surface. The spectral range is 400 to 1000 nanometers, and the sampling interval is 0.5 nanometers, which is used to analyze the oxidation degree and coating condition of the weld surface.
[0057] The specific implementation method of step S02 is to input the collected image information into a preset deep learning model, which adopts an encoder-decoder architecture, wherein the encoder consists of 5 convolutional layers, each layer uses a 3×3 convolution kernel, the step size is 2, the number of channels is 64, 128, 256, 512, 512, and each layer is followed by a batch normalization layer and a ReLU activation function for extracting multi-scale features; the decoder consists of 5 deconvolutional layers, using 2×2 upsampling, the number of channels is 512, 256, 128, 64, 3, and each layer is followed by a batch normalization layer and a ReLU activation function, and the last layer uses Sigmoid activation. The function outputs a heat map. The training dataset of the model contains 10,000 sets of image pairs annotated by experts. Data enhancement techniques are used in the training process, including random rotation, translation, scaling, and mirror flipping. The size of the enhanced dataset is expanded to 40,000 sets. The mean square error loss function and Adam optimizer are used for training. The initial value of the learning rate is set to 0.0001, and the cosine annealing strategy is used for learning rate decay. The minimum learning rate is 0.000001, the batch size is 32, and the number of training rounds is 100. After each round of training, the model performance is calculated on the validation set. When there is no improvement in the performance of the validation set for five consecutive rounds, the training is terminated early.
[0058] The specific implementation method of step S03 is to construct a welding gain matrix, which contains 4 sub-matrices, which respectively evaluate key indicators such as weld quality, heat-affected zone characteristics, mechanical properties and stress distribution. The various indexes in the weld quality sub-matrix are represented by normalized values from 0 to 1, wherein the weld flatness index is calculated by the weld surface undulation measured by the laser profilometer, with a measurement accuracy of 0.01 mm and a sampling point spacing of 0.1 mm. The weld continuity index is evaluated by X-ray flaw detection results, with a source voltage of 200 kV, a current of 5 mA, and an exposure time of 60 seconds. The penetration uniformity index is obtained by ultrasonic detection data analysis, with an ultrasonic frequency of 5 MHz and a scanning speed of 100 mm per second. The porosity index and inclusion content index are determined by metallographic analysis, and the metallographic sample is polished to 0.5 μm. Observation was performed under a 500x microscope; the indexes in the heat-affected zone characteristic submatrix also used normalized values, and their characteristic parameters were obtained through metallographic microscope observation and hardness test. The hardness test was performed using a Vickers hardness tester with a test load of 0.98 Newton and a loading time of 15 seconds; the indexes in the mechanical property submatrix were obtained through standard mechanical property tests, including tensile test, impact test and fatigue test. The tensile test was performed using an electronic universal testing machine with a loading speed of 2 mm / min, the impact test was performed using a cantilever beam testing machine with an impact energy of 300 joules, and the fatigue test was performed using an axial loading method with a stress ratio of 0.1 and a frequency of 10 Hz; the indexes in the stress distribution submatrix were measured by an X-ray stress tester using a chromium target, with an operating voltage of 30 kilovolts, an operating current of 8 mA, and a slit width of 0.2 mm.
[0059] The specific implementation method of step S04 is to perform singular value decomposition analysis on the weld contour. First, the weld contour curve is discretized and sampled at a spacing of 0.1 mm to obtain a point sequence. Each sampling point contains position coordinates and curvature information. A feature matrix is constructed. The number of rows of the matrix is equal to the number of sampling points, and the number of columns is the feature dimension of the point. The matrix is singular value decomposed to obtain a feature vector matrix. The main feature vectors with a cumulative contribution rate of 95% are selected according to the size of the singular value. The K-means clustering algorithm is used to group the feature vectors. The number of clusters is adaptively determined according to the complexity of the weld. The specific method is to calculate the contour coefficient under different cluster numbers, and select the cluster number with the largest contour coefficient as the final grouping number, which is generally between 3 and 10. The clustering result determines the division scheme of the welding basic unit. The boundary point of each basic unit is selected at a position where the curvature changes relatively slowly to ensure the rationality of the segmentation processing.
[0060] The specific implementation method of step S05 is to establish a process parameter space for each welding basic unit, where the welding angle parameter range is 0 to 360 degrees, the sampling interval is 5 degrees, and there are 73 discrete values in total; the welding head abutment angle parameter range is 60 to 120 degrees, the sampling interval is 5 degrees, and there are 13 discrete values in total; the welding power parameter range is 1000 to 4000 watts, the sampling interval is 100 watts, and there are 31 discrete values in total; the welding speed parameter range is 10 to 50 mm per second, the sampling interval is 2 mm per second, and there are 21 discrete values in total. The Cartesian product of these four parameters constitutes a complete process parameter space, and the total number of parameter combinations is 413283. By calculating the welding quality prediction value under each parameter combination, a process parameter database is formed.
[0061] The specific implementation method of step S06 is to calculate the comprehensive score of welding quality. First, each set of parameters in the welding process parameter space is substituted into the welding process simulation model to obtain the predicted welding result. The simulation model adopts the thermodynamic finite element method, the unit type is an 8-node hexahedral unit, the mesh size is 0.1 mm, the time step is 0.001 second, the material properties change with temperature, and the influence of phase change latent heat is considered. Then, the scores of various indicators are calculated according to the welding gain matrix, wherein the weight of the weld quality submatrix is 0.35, the weight of the heat affected zone characteristic submatrix is 0.25, the weight of the mechanical property submatrix is 0.25, and the weight of the stress distribution submatrix is 0.15. The internal indicators of each submatrix are calculated with equal weights, and the weight of each indicator in the weld quality submatrix is 0.2, the weight of each indicator in the heat affected zone characteristic submatrix is 0.25, the weight of each indicator in the mechanical property submatrix is 0.2, and the weight of each indicator in the stress distribution submatrix is 0.25. Finally, the comprehensive score of welding quality is obtained.
[0062] The specific implementation method of step S07 is to establish a multi-objective optimization function to solve the optimal process parameters, adopt a non-dominated sorting genetic algorithm for optimization and solution, set the population size to 100, the evolutionary generations to 50 generations, the crossover probability to 0.8, the mutation probability to 0.1, adopt a binary bidding selection strategy and an elite retention strategy, and the individual coding adopts a real number coding method. The chromosome length is the number of dimensions of the welding process parameters, the crossover operation adopts simulated binary crossover, the crossover distribution index is 20, the mutation operation adopts polynomial mutation, the mutation distribution index is 20, and the fitness function is a comprehensive welding quality score. In the optimization process, an adaptive penalty function is used to handle constraints. The penalty coefficient increases with the increase of generations. The initial penalty coefficient is 1, and it increases by 0.1 each generation. The optimal process parameter combination of each welding basic unit is obtained through iterative evolution.
[0063] The specific implementation method of step S08 is to generate an initial welding path. First, a path coordinate system is established. A right-handed coordinate system is used, with the origin set at the lower left corner of the workpiece, the x-axis along the length of the workpiece, the y-axis along the width of the workpiece, and the z-axis perpendicular to the surface of the workpiece. The spatial position information of the welding basic unit is converted to the coordinate system through coordinate transformation. The transformation matrix includes a translation matrix and a rotation matrix. Then, the starting coordinates, end coordinates and process parameters of each basic unit are combined into path nodes. Smooth path segments are generated between adjacent nodes through cubic spline interpolation. Natural boundary conditions are used for interpolation. The control point spacing is 1 mm. The continuity and smoothness of the path are ensured by adjusting the tangent vector of the control point. The size of the tangent vector is adaptively adjusted according to the distance between adjacent control points.
[0064] The specific implementation method of step S09 is to collect image and thermogram data during the actual welding process, use a high-speed industrial camera with a pixel resolution of 1920×1080 to collect welding process images, set the frame rate to 1000 frames per second, the exposure time to 0.5 milliseconds, and configure a bandpass filter to filter out interference from the welding arc. The central wavelength is 808 nanometers and the bandwidth is 10 nanometers. At the same time, an infrared thermal imager with a resolution of 640×480 is used to collect the temperature distribution map of the welding area. The temperature measurement range is 0 to 2000 degrees Celsius, the temperature measurement accuracy is ±2 degrees Celsius, the sampling frequency is 100 Hz, the emissivity is set to 0.8, and all data are synchronized through timestamps. The time synchronization accuracy is better than 1 millisecond.
[0065] The specific implementation method of step S10 is to calculate the feature similarity. For the image features, the structural similarity index is used for calculation. The index comprehensively considers the brightness similarity, contrast similarity and structural similarity of the image. A Gaussian window of 11×11 pixels is used for calculation, with a standard deviation of 1.5 pixels and a dynamic range of 255. The weights of brightness, contrast and structure are equal, all 0.33. The index range is 0 to 1, and the first threshold is set to 0.85. For the heat map, the Euclidean distance is used for similarity calculation, the heat map is normalized to the range of 0 to 1, and the square root of the sum of the squares of the intensity differences of the corresponding pixels is calculated, where the second threshold is set to 0.2. When the calculation result is greater than the threshold, it means that the heat map difference is significant and path optimization is required.
[0066] The specific implementation method of step S11 is to perform path optimization. When the feature similarity does not meet the requirements, a local search is performed in the neighborhood of the current process parameters. The search range is welding angle parameter ±10 degrees, welding head abutment angle parameter ±5 degrees, welding power parameter ±200 watts, welding speed parameter ±5 mm per second. The Hook-Jervis pattern search algorithm is used for parameter optimization. The initial step size is set to 10% of the search range. When the search cannot find a better solution, the step size is halved. The minimum step size is 1% of the initial step size. The search direction uses the coordinate axis direction. Each iteration selects the parameter combination that maximizes the improvement of the objective function value. The iteration termination condition is that the step size is less than the minimum step size or reaches the maximum number of iterations of 1000 times.
[0067] The specific implementation method of step S12 is to output the final welding path and convert the optimized path into a robot control instruction sequence, including position instructions, posture instructions and process parameter instructions. The position and posture instructions are generated by joint space interpolation. The interpolation period is 2 milliseconds, the jerk limit is 1000 mm per second to the cube, the acceleration limit is 200 mm per second squared, and the speed limit is 50 mm per second to ensure the smoothness of the motion trajectory. The process parameter instructions are transmitted to the laser welding power supply through the digital output interface. The power supply response time is less than 1 millisecond, the power regulation accuracy is 10 watts, and all control instructions are transmitted through real-time Ethernet. The communication cycle is 1 millisecond and the jitter is less than 100 microseconds.
[0068] The functions or mathematical models involved in the present invention are described in detail below.
[0069] The calculation of the weld surface morphology characteristics in step S01 is specifically expressed as follows:
[0070]
[0071] In the formula, R a is the arithmetic mean of the weld surface roughness, in microns; R q is the root mean square value of the weld surface roughness, in microns; z i is the height value of the i-th sampling point, in micrometers; is the average height of the sampling points, in micrometers; n is the total number of sampling points.
[0072] The deep learning model loss function in step S02 is specifically expressed as follows:
[0073] L total =α Lmse +βL ssim +γL grad ;
[0074]
[0075]
[0076] Where, L total is the total loss function; L mse is the mean square error loss; L ssim is the structural similarity loss; L grad is the gradient loss; I pred Predict images for the model; I gt is the real label image; h, w are the height and width of the image respectively; μ x , μ y are the mean values of the image blocks respectively; σ x , σ y are the standard deviations of the image blocks; xy is the covariance; c 1 , c 2 A constant to prevent the denominator from being zero; α, β, γ are the weight coefficients of each loss term; Represent the gradient operators in the horizontal and vertical directions respectively.
[0077] The welding gain matrix in step S03 is specifically expressed as follows:
[0078]
[0079] G weld =[g 11 g 12 g 13 g 14 g 15 ];
[0080] G haz =[g 21 g 22 g 23 g 24 ];
[0081] G mech =[g 31 g 32 g 33 g 34 g 35 ];
[0082] G stress =[g 41 g 42 g 43 g 44 ];
[0083] Where G is the welding gain matrix; G weld is the weld quality matrix; G haz is the characteristic sub-matrix of the heat affected zone; G mechis the mechanical properties sub-matrix; G stress is the stress distribution submatrix; g 11 tog 15 They are weld flatness index, continuity index, penetration uniformity index, porosity index, and inclusion content index, among which g 11 The weld surface profile is measured by a laser profilometer, g 12 Calculated by X-ray flaw detection results, g 13 Through the analysis of ultrasonic detection data, g 14 and g 15 Determined by metallographic analysis; g 21 tog 24 They are heat affected zone width index, hardness distribution index, grain size index, and organization uniformity index, which are obtained through metallographic microscope observation and hardness test; g 31 tog 35 They are tensile strength index, yield strength index, elongation index, impact toughness index, and fatigue strength index, which are obtained through standard mechanical properties tests; g 41 tog 44 They are longitudinal residual stress index, transverse residual stress index, deformation index and stress concentration factor index, which are measured by X-ray stress tester.
[0084] The singular value decomposition calculation in step S04 is specifically expressed as follows:
[0085] M=U∑V T ;
[0086] M ij =(x i ,y i , z i , k i ,θ i );
[0087] Where M is the weld profile feature matrix; U is the left singular matrix; Σ is the singular value diagonal matrix; V T is the transpose of the right singular matrix; x i ,y i , z i is the spatial coordinate of the i-th sampling point; k i is the curvature of the i-th sampling point; θ i is the tangent angle of the i-th sampling point.
[0088] The calculation of arc segment curvature is specifically expressed as follows:
[0089]
[0090] Where k is the curvature; x′, y′ are the first-order derivatives of the curve parameter equation with respect to the parameter; x″, y″ are the second-order derivatives of the curve parameter equation with respect to the parameter.
[0091] The welding feature vector in step S04 is specifically expressed as follows:
[0092]
[0093] v geo =[κ θ l] T ;
[0094] v surf =[R a O x C p ] T ;
[0095] Where V weld is the welding feature vector; v geo is the geometric eigenvector; v surf is the surface feature vector; κ is the curvature parameter, which is calculated by the least squares curve fitting method; θ is the direction angle parameter, which is calculated by the position relationship of adjacent sampling points; l is the line segment length parameter, which is calculated by the Euclidean distance between sampling points; R a is the roughness parameter, obtained by profilometer measurement; x is the oxidation degree parameter, obtained by spectral analysis; C p It is a coating characteristic parameter obtained by reflectivity measurement.
[0096] The calculation of the comprehensive welding quality score in step S06 is specifically expressed as follows:
[0097] Q total =w 1 Q weld +w 2 Q haz +w 3 Q mech +w 4 Q stress ;
[0098]
[0099] In the formula, Q total It is the comprehensive score of welding quality; Q weld Sub-score for weld quality; Q haz The characteristic sub-score of the heat affected zone; Q mech is the mechanical performance sub-score; Q stress为 Stress distribution sub-score; w 1 , w 2 , w 3 , w4 are the weight coefficients of each sub-score, and satisfy P i H is the weld quality index, including flatness, continuity, uniformity of penetration, porosity, and inclusion content; j M is the characteristic index of the heat affected zone, including width, hardness distribution, grain size, and organizational uniformity; k It is a mechanical property index, including tensile strength, yield strength, elongation, impact toughness, and fatigue strength; S l It is a stress distribution index, including longitudinal residual stress, transverse residual stress, deformation, and stress concentration factor; v i,h j , m k ,s l are the weight coefficients of each indicator respectively.
[0100] The multi-objective optimization function in step S07 is specifically expressed as follows:
[0101] F(x)=min{f 1 (x), f 2 (x), f 3 (x)};
[0102]
[0103] f 2 (x) = λ 1 (1-SSIM(I real , I pred ))+λ 2 ||H real -H pred || 2 ;
[0104]
[0105] Where F(x) is the multi-objective optimization function; f 1 (x) is the path quality optimization function; f 2 (x) is the heat map matching optimization function; f 3 (x) is the process parameter optimization function; κ i is the curvature of the i-th path; θ i is the change in direction angle of the i-th path; l i is the length of the i-th path; α i , β i , γ i is the path feature weight coefficient; SSIM is the structural similarity function; I real , I pred are the actual welding image and the predicted image respectively; H real , Hpred are the actual heat map and the predicted heat map respectively; 1 ,λ 2 is the image matching weight coefficient; p j is the actual process parameter; p j,target is the target process parameter; ω j is the process parameter weight coefficient.
[0106] The process parameter vector in step S07 is specifically expressed as follows:
[0107] P=[α β ω v] T ;
[0108] Wherein, P is the process parameter vector; α is the welding angle parameter, ranging from 0 to 360 degrees; β is the welding head abutment angle parameter, ranging from 60 to 120 degrees; ω is the welding power parameter, ranging from 1000 to 4000 watts; v is the welding speed parameter, ranging from 10 to 50 mm per second.
[0109] The feature similarity calculation in step S10 is specifically expressed as follows:
[0110]
[0111] Where SSIM(x, y) is the structural similarity index; μ x , μ y are the mean values of image blocks x and y respectively; σ x , σ y are the standard deviations of the image blocks; xy is the covariance; C 1 , C 2 is the stability constant; D heat is the Euclidean distance of the heat map; H 1 , H 2 They are two heat maps respectively; h and w are the height and width of the heat map.
[0112] The heat map calculation in step S10 is specifically expressed as follows:
[0113]
[0114] Where H is the heat map matrix; h ij It is the thermal value at position (i, j), which is composed of the values of three channels: red, green and blue. The red channel represents the weld strength distribution, the green channel represents the residual stress distribution, and the blue channel represents the heat affected zone characteristic distribution. The value range of each channel is 0 to 255.
[0115] The parameter optimization search algorithm in step S11 is specifically expressed as follows:
[0116] xk+1 =x k +α k d k ;
[0117]
[0118] In the formula, x k is the parameter vector of the kth iteration; α k is the step size factor; d k is the search direction; f(x) is the objective function; is the objective function at x k The gradient at β k is the conjugate coefficient.
[0119] Among them, the establishment of a multi-objective optimization function is simply described as follows: in the process of welding path planning, the geometric characteristics of the path, process parameters, welding quality, thermal distribution and other aspects are taken into consideration, and the optimal solution is sought through a multi-objective optimization method, in which the weighted summation method is used to transform multiple objective functions into a single-objective optimization problem, and each weight coefficient is determined by expert experience and experimental data; in the parameter optimization process, the conjugate gradient method is used for search, which can effectively avoid local optimal solutions; in the calculation of feature similarity, the two metrics of structural similarity and Euclidean distance are combined to more comprehensively evaluate the consistency of welding effects; the power relationship in each formula mainly reflects the nonlinear correlation between physical quantities, such as the 3 / 2 power in the curvature calculation reflects the geometric characteristics of the curve, and the square of the error term reflects the penalty effect of the deviation.
[0120] Method for obtaining the weld flatness index: Use a laser profilometer to collect a profile data point every 0.1 mm along the weld direction. The measurement range covers the weld surface and 5 mm areas on both sides. Based on the collected height data, calculate the standard deviation of the height difference between adjacent measurement points, and normalize the standard deviation value to the range of 0 to 1 to obtain the flatness index. The smaller the standard deviation, the flatter the weld surface.
[0121] Method for obtaining weld continuity index: Use an X-ray flaw detection system to detect the weld. The source voltage is 200 kV and the exposure time is 60 seconds. Collect X-ray projection images of the weld area. Use image processing algorithms to detect discontinuous areas in the weld, including cracks, pores, inclusions and other defects. Count the number and size of defects per unit length, and calculate the continuity index based on the severity of the defects.
[0122] Method for obtaining penetration uniformity index: Use an ultrasonic probe to measure every 1 mm along the horizontal direction of the weld to obtain weld penetration data, calculate the average value and standard deviation of the penetration, and use the ratio of the standard deviation to the average value as a uniformity evaluation index. The smaller the ratio, the more uniform the penetration. Normalize the index to the range of 0 to 1 to obtain the penetration uniformity index.
[0123] Method for obtaining the heat-affected zone width index: prepare a metallographic specimen on the weld cross section, observe the heat-affected zone morphology under a metallographic microscope after polishing and corrosion, measure the width of the heat-affected zone, take the average value of multiple positions, and compare it with the heat-affected zone width required by the standard to calculate the width index.
[0124] Method for obtaining the hardness distribution index: Use a Vickers hardness tester to measure the hardness on the cross section of the weld, with a measurement point spacing of 0.5 mm, covering the weld metal, heat-affected zone and base material area, obtain the hardness distribution curve, calculate the discreteness of the hardness value, and normalize the discreteness to obtain the hardness distribution index.
[0125] Method for obtaining the tissue uniformity index: observe the grain size and distribution of the heat-affected zone through a metallographic microscope, measure the grain size using the standard grain size map comparison method, calculate the coefficient of variation of the grain size, and evaluate the uniformity of the tissue morphology. The tissue uniformity index is calculated by combining these factors.
[0126] Method for obtaining mechanical property index: prepare standard tensile specimens, impact specimens and fatigue specimens according to national standards, conduct tensile tests on universal testing machines to measure tensile strength, yield strength and elongation; conduct impact tests on impact testing machines to measure impact toughness; conduct fatigue tests on fatigue testing machines to measure fatigue limits, compare these mechanical property indicators with standard requirements, and obtain various mechanical property indexes.
[0127] Method for obtaining stress distribution index: X-ray stress tester is used to measure the residual stress distribution in the weld and its surrounding area. 2 The ψ method is used to calculate the principal stress value. The measurement point spacing is 2 mm, covering an area of 20 mm on both sides of the weld. The stress gradient and stress concentration degree are calculated based on the measured stress values, and various stress distribution indices are obtained accordingly.
[0128] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the above-mentioned path planning method for a laser welding head.
[0129] The third aspect of the present invention provides a path planning system for a laser welding head, comprising the above-mentioned computer-readable storage medium, wherein the system is any one of a computer, a server, and a single-chip microcomputer, wherein the computer-readable storage medium is arranged in the system, and wherein the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
[0130] Specifically, the principle of the present invention is: the technical principle of the present invention is based on machine learning, multi-objective optimization and welding process theory. The system uses a deep convolutional neural network to build a welding effect prediction model. Through training with a large amount of labeled data, the model can accurately understand the relationship between weld characteristics and welding quality. The network adopts an encoder-decoder structure. The encoder extracts the multi-scale features of the weld through multi-layer convolution, and the decoder generates a heat map containing quality information through a deconvolution layer. This structural design enables the system to automatically learn complex features that are difficult to summarize by manual experience.
[0131] The present invention innovatively proposes the concept of welding gain matrix, which transforms the traditional experience-based welding quality evaluation into a quantifiable index system. The matrix covers four dimensions: weld quality, heat-affected zone characteristics, mechanical properties, and stress distribution, and each dimension contains multiple specific evaluation indicators. This systematic evaluation system provides a clear objective function for path optimization, making the optimization process scientifically based.
[0132] In terms of path planning, the present invention uses the singular value decomposition method to intelligently segment the weld. This method extracts the main characteristic vectors by decomposing the characteristic matrix of the weld contour curve, and realizes the automatic division of the welding basic unit. This mathematical analysis method overcomes the subjectivity of manual experience and can more accurately identify the weld characteristics. For each welding basic unit, the system establishes a complete process parameter space and automatically solves the optimal parameter combination through a multi-objective optimization algorithm.
[0133] A specific embodiment 1 of the present invention is provided below, and the specific implementation method of each step in this embodiment 1 is described in detail as follows.
[0134] The specific implementation method of step S01 is to use a machine vision system to collect image information of the workpiece to be welded. This step completes data collection through the collaborative work of multiple sensing devices such as industrial cameras, laser line scanning sensors and structured light sensors. First, an industrial camera with a resolution of 4096×3072 pixels is used to collect high-resolution images of the workpiece to be welded at five different angles of 0 degrees, 45 degrees, 90 degrees, 135 degrees and 180 degrees. The lighting conditions include two modes of diffuse reflection light source and coaxial light source to obtain the surface morphology and contour feature information of the weld. During image acquisition, the camera exposure time is set to 10 milliseconds and the gain value is set to 1. The collected image is denoised by Gaussian filtering. The filter kernel size is 5×5 pixels and the standard deviation is 1.5. The surface morphology feature calculation adopts the following formula: In the formula, R a is the arithmetic mean of the weld surface roughness, in microns; R q is the root mean square value of the weld surface roughness, in microns; z i is the height value of the i-th sampling point, in micrometers; is the average value of the height of the sampling points in microns; n is the total number of sampling points; then a line laser sensor is used to perform a three-dimensional profile scan of the weld at a spacing of 0.1 mm, with a laser power of 5 mW and a scanning frequency of 200 Hz to obtain geometric dimension information such as the depth and width of the weld. The scanned data is fitted by the least squares method to obtain the spatial profile curve of the weld; finally, a structured light sensor is used to collect the reflectance spectral characteristics of the weld surface. The spectral range is 400 to 1000 nanometers and the sampling interval is 0.5 nanometers, which is used to analyze the oxidation degree and coating condition of the weld surface.
[0135] The specific implementation method of step S02 is to input the collected image information into a preset deep learning model, which adopts an encoder-decoder architecture, wherein the encoder consists of 5 convolutional layers, each layer uses a 3×3 convolution kernel, the step size is 2, the number of channels is 64, 128, 256, 512, 512, and each layer is followed by a batch normalization layer and a ReLU activation function for extracting multi-scale features; the decoder consists of 5 deconvolutional layers, using 2×2 upsampling, the number of channels is 512, 256, 128, 64, 3, and each layer is followed by a batch normalization layer and a ReLU activation function. The last layer uses a Sigmoid activation function to output a heat map. The loss function of the model is: L total =αL mse +βL ssim +γL grad ;
[0136] Where, L total is the total loss function; L mseis the mean square error loss; L ssim is the structural similarity loss; L grad is the gradient loss; I pred Predict images for the model; I gt is the real label image; h, w are the height and width of the image respectively; μ x , μ y are the mean values of the image blocks respectively; σ x , σ y are the standard deviations of the image blocks; xy is the covariance; c 1 , c 2 A constant to prevent the denominator from being zero; α, β, γ are the weight coefficients of each loss term; Represent the gradient operators in the horizontal and vertical directions respectively; the training dataset of the model contains 10,000 sets of image pairs annotated by experts. Data enhancement technology is used in the training process, including random rotation, translation, scaling and mirror flipping. The size of the enhanced dataset is expanded to 40,000 sets. The Adam optimizer is used for training, the initial value of the learning rate is set to 0.0001, and the cosine annealing strategy is used for learning rate decay. The minimum learning rate is 0.000001, the batch size is 32, and the number of training rounds is 100.
[0137] The specific implementation of step S03 is to construct a welding gain matrix, which is expressed in the following form: G weld =[g 11 g 12 g 13 g 14 g 15 ]; G haz =[g 21 g 22 g 23 g 24 ]; G mech =[g 31 g 32 g 33 g 34 g 35 ]; G stress =[g 41 g 42 g 43 g 44 ]; where G is the welding gain matrix; G weld is the weld quality matrix; G haz is the characteristic sub-matrix of the heat affected zone; G mech is the mechanical properties sub-matrix; G stressis the stress distribution submatrix; each index in the weld quality submatrix is represented by a normalized value from 0 to 1, where g 11 is the weld flatness index, which is calculated by the weld surface undulation measured by the laser profilometer, g 12 is the weld continuity index, which is evaluated by X-ray flaw detection results. The source voltage is 200 kV, the current is 5 mA, the exposure time is 60 seconds, and g 13 is the penetration uniformity index, obtained through ultrasonic testing data analysis, the ultrasonic frequency is 5 MHz, the scanning speed is 100 mm / s, g 14 is the porosity index and g 15 is the inclusion content index, which is determined by metallographic analysis. The metallographic sample is polished to 0.5 μm and observed under a 500x microscope. g in the characteristic submatrix of the heat affected zone 21 tog 24 They are heat affected zone width index, hardness distribution index, grain size index, and organization uniformity index. These characteristic parameters are obtained through metallographic microscope observation and hardness test. The hardness test uses a Vickers hardness tester with a test load of 0.98 Newton and a loading time of 15 seconds. The g in the mechanical properties submatrix is 31 tog 35 They are tensile strength index, yield strength index, elongation index, impact toughness index, and fatigue strength index. These indexes are obtained through standard mechanical property tests, including tensile test, impact test, and fatigue test. The tensile test uses an electronic universal testing machine with a loading speed of 2 mm / min, the impact test uses a cantilever beam testing machine with an impact energy of 300 joules, and the fatigue test uses an axial loading method with a stress ratio of 0.1 and a frequency of 10 Hz. The g in the stress distribution submatrix 41 tog 44 They are longitudinal residual stress index, transverse residual stress index, deformation index and stress concentration factor index respectively. These indices are measured by an X-ray stress tester. A chromium target is used for the measurement. The working voltage is 30 kV, the working current is 8 mA and the slit width is 0.2 mm.
[0138] The specific implementation method of step S04 is to perform singular value decomposition analysis on the weld profile, which is expressed by the following formula: M = UΣV T ;M ij =(x i ,y i , z i , k i ,θ i ), where M is the weld profile feature matrix; U is the left singular matrix; ∑ is the singular value diagonal matrix; V T is the transpose of the right singular matrix; x i ,y i , zi is the spatial coordinate of the i-th sampling point; k i is the curvature of the i-th sampling point; θ i is the tangent angle of the i-th sampling point; and the welding feature vector is extracted at the same time: v geo =[k θ l] T ;v surf =[R a O x C p ] T ; Where V weld is the welding feature vector; v geo is the geometric eigenvector; v surf is the surface feature vector; κ is the curvature parameter, which is calculated by the least squares curve fitting method; θ is the direction angle parameter, which is calculated by the position relationship of adjacent sampling points; l is the line segment length parameter, which is calculated by the Euclidean distance between sampling points; R a is the roughness parameter, obtained by profilometer measurement; x is the oxidation degree parameter, obtained by spectral analysis; C p is the coating characteristic parameter, which is obtained by reflectivity measurement; the arc segment curvature is calculated using the following formula: Where k is the curvature; x′, y′ are the first-order derivatives of the curve parameter equation with respect to the parameter; x″, y″ are the second-order derivatives of the curve parameter equation with respect to the parameter; the K-means clustering algorithm is used to group the feature vectors, and the number of clusters is adaptively determined according to the complexity of the weld, generally between 3 and 10. The clustering results determine the division scheme of the basic welding units.
[0139] The specific implementation of step S05 is to establish a process parameter vector for each welding basic unit: P = [αβωv] T ; Wherein, P is the process parameter vector; α is the welding angle parameter, ranging from 0 to 360 degrees, with a sampling interval of 5 degrees, and a total of 73 discrete values; β is the welding head abutment angle parameter, ranging from 60 to 120 degrees, with a sampling interval of 5 degrees, and a total of 13 discrete values; ω is the welding power parameter, ranging from 1000 to 4000 watts, with a sampling interval of 100 watts, and a total of 31 discrete values; v is the welding speed parameter, ranging from 10 to 50 mm per second, with a sampling interval of 2 mm per second, and a total of 21 discrete values; The Cartesian product of these four parameters constitutes a complete process parameter space, and the total number of parameter combinations is 413283. By calculating the welding quality prediction value under each parameter combination, a process parameter database is formed.
[0140] The specific implementation of step S06 is to calculate the comprehensive score of welding quality using the following formula: Q total =w 1Q weld +w 2 Q haz +w 3 Q mech +w 4 Q stress ; In the formula, Q total It is the comprehensive score of welding quality; Q weld Sub-score for weld quality; Q haz The characteristic sub-score of the heat affected zone; Q mech is the mechanical performance sub-score; Q stress is the stress distribution sub-score; w 1 , w 2 , w 3 , w 4 are the weight coefficients of each sub-score, and satisfy The weld quality sub-matrix weight w 1 is 0.35, and the heat affected zone characteristic submatrix weight w 2 is 0.25, and the mechanical properties submatrix weight w 3 is 0.25, and the stress distribution submatrix weight w 4 =0.15; P i H is the weld quality index, including flatness, continuity, uniformity of penetration, porosity, and inclusion content; j M is the characteristic index of the heat affected zone, including width, hardness distribution, grain size, and organizational uniformity; k It is a mechanical property index, including tensile strength, yield strength, elongation, impact toughness, and fatigue strength; S l is the stress distribution index, including longitudinal residual stress, transverse residual stress, deformation, and stress concentration factor; v i ,h j , m k ,s l are the weight coefficients of each indicator respectively.
[0141] The specific implementation of step S07 is to establish a multi-objective optimization function to solve the optimal process parameters, using the following formula: F(x) = min{f 1 (x), f 2 (x), f 3 (x)}; f 2 (x) = λ 1 (1-SSIM(I real , I pred ))+λ 2 ||H real -H pred || 2 ; Where F(x) is the multi-objective optimization function; f 1 (x) is the path quality optimization function; f 2 (x) is the heat map matching optimization function; f 3 (x) is the process parameter optimization function; κ i is the curvature of the i-th path; θ i is the change in direction angle of the i-th path; l i is the length of the i-th path; α i , β i , γ i is the path feature weight coefficient; SSIM is the structural similarity function; I real , I pred are the actual welding image and the predicted image respectively; H real , H pred are the actual heat map and the predicted heat map respectively; 1 ,λ 2 are image matching weight coefficients, which are set to 0.6 and 0.4 respectively; p j is the actual process parameter; p j,target is the target process parameter; ω j is the process parameter weight coefficient.
[0142] The specific implementation method of step S08 is to generate an initial welding path. First, a path coordinate system is established. A right-handed coordinate system is used. The origin is set at the lower left corner of the workpiece. The x-axis is along the length direction of the workpiece, the y-axis is along the width direction of the workpiece, and the z-axis is perpendicular to the surface of the workpiece. The spatial position information of the welding basic unit is converted to the coordinate system through coordinate transformation. The transformation matrix includes a translation matrix and a rotation matrix. Then, the starting coordinates, end coordinates and process parameters of each basic unit are combined into path nodes. Smooth path segments are generated between adjacent nodes through cubic spline interpolation. The interpolation adopts natural boundary conditions. The control point spacing is 1 mm. The continuity and smoothness of the path are ensured by adjusting the tangent vector of the control point. The size of the tangent vector is adaptively adjusted according to the distance between adjacent control points. Specifically, the cubic spline interpolation function is used: S i (x) = a i +b i (xx i )+c i (xx i ) 2 +d i (xx i ) 3 Where S i (x) is the i-th segment spline function; a i , b i , c i , d i is the unknown coefficient; xi is the horizontal coordinate of the node.
[0143] The specific implementation of step S09 is to collect image and thermogram data during the actual welding process, and the thermogram matrix is represented in the following form: Where H is the heat map matrix; h ij is the thermal value at position (i, j), which is composed of the values of three channels: red, green and blue. The red channel represents the weld strength distribution, the green channel represents the residual stress distribution, and the blue channel represents the heat-affected zone characteristic distribution. The value range of each channel is 0 to 255. A high-speed industrial camera with a pixel resolution of 1920×1080 is used to collect welding process images. The frame rate is set to 1000 frames per second, the exposure time is 0.5 milliseconds, and a bandpass filter is configured to filter out the interference of the welding arc. The central wavelength is 808 nanometers and the bandwidth is 10 nanometers. At the same time, an infrared thermal imager with a resolution of 640×480 is used to collect the temperature distribution map of the welding area. The temperature measurement range is 0 to 2000 degrees Celsius, the temperature measurement accuracy is ±2 degrees Celsius, the sampling frequency is 100 Hz, and the emissivity is set to 0.8. All data are synchronized through timestamps, and the time synchronization accuracy is better than 1 millisecond.
[0144] The specific implementation of step S10 is to calculate the feature similarity using the following formula: Where SSIM(x, y) is the structural similarity index; μ x , μ y are the mean values of image blocks x and y respectively; σ x , σ y are the standard deviations of the image blocks; xy is the covariance; C 1 , C 2 is the stability constant; D heat is the Euclidean distance of the heat map; H 1 , H 2 are two heat maps respectively; h and w are the height and width of the heat map; the structural similarity index is used to calculate the image features. The index comprehensively considers the brightness similarity, contrast similarity and structural similarity of the image. A Gaussian window of 11×11 pixels is used for calculation, with a standard deviation of 1.5 pixels and a dynamic range of 255. The weights of brightness, contrast and structure are equal, all 0.33. The index ranges from 0 to 1, and the first threshold is set to 0.85; the Euclidean distance is used for similarity calculation of the heat map, the heat map is normalized to the range of 0 to 1, and the square root of the sum of the squares of the intensity differences of the corresponding pixels is calculated, and the second threshold is set to 0.2.
[0145] The specific implementation method of step S11 is to perform path optimization using the following formula: k+1=x k +α k d k ; In the formula, x k is the parameter vector of the kth iteration; α k is the step size factor; d k is the search direction; f(x) is the objective function; is the objective function at x k The gradient at β k is the conjugate coefficient; when the feature similarity does not meet the requirements, a local search is performed in the neighborhood of the current process parameters. The search range is welding angle parameter ±10 degrees, welding head abutment angle parameter ±5 degrees, welding power parameter ±200 watts, welding speed parameter ±5 mm per second. The Hook-Jervis pattern search algorithm is used for parameter optimization. The initial step size is set to 10% of the search range. When the search cannot find a better solution, the step size is halved. The minimum step size is 1% of the initial step size. The search direction uses the coordinate axis direction. Each iteration selects the parameter combination that makes the maximum improvement in the objective function value. The iteration termination condition is that the step size is less than the minimum step size or the maximum number of iterations reaches 1000 times.
[0146] The specific implementation method of step S12 is to output the final welding path. This step is generally a prior art. The output final welding path can be directly transmitted to the robot control interface, and the optimized path can be converted into a robot control instruction sequence, including position instructions, posture instructions and process parameter instructions. The position and posture instructions are generated by joint space interpolation. The interpolation period is 2 milliseconds, the jerk limit is 1000 mm per second to the cube, the acceleration limit is 200 mm per second squared, and the speed limit is 50 mm per second to ensure the smoothness of the motion trajectory. The process parameter instructions are transmitted to the laser welding power supply through the digital output interface. The power supply response time is less than 1 millisecond, the power regulation accuracy is 10 watts, and all control instructions are transmitted through real-time Ethernet. The communication cycle is 1 millisecond and the jitter is less than 100 microseconds.
[0147] In order to better understand and implement the present invention, the following provides Example 2 of a specific application scenario of the present invention:
[0148] The R&D team of a certain automobile manufacturing company applied the laser welding head path planning method of the present invention to optimize the welding process of the lap welds of the B-pillar and the side panel of the vehicle body in the development of the body welding process of a new electric vehicle. The total length of the weld is 680 mm, and the material is cold-rolled high-strength steel plate with plate thicknesses of 1.8 mm and 1.2 mm respectively.
[0149] First, the R&D team used an industrial camera with a resolution of 4096×3072 pixels to collect high-resolution images of the welded parts at five different angles: 0 degrees, 45 degrees, 90 degrees, 135 degrees, and 180 degrees. The results of the weld surface morphology measurement are shown in Table 1:
[0150] Table 1 Weld surface morphology measurement results
[0151]
[0152] Figure 2 The continuous changes of weld surface morphology parameters (Ra value, Rq value and surface oxidation degree) along the length of the weld are shown. The acquired images are processed using a deep learning model. The training data set contains 10,000 sets of expert-annotated image pairs. The convergence of the loss function during the model training process is shown in Table 2:
[0153] Table 2 Loss function values of deep learning model training process
[0154] Training rounds Lm Lssim Lgrad Ltotal 20 0.0856 0.1253 0.0987 0.1032 40 0.0534 0.0876 0.0645 0.0685 60 0.0312 0.0534 0.0423 0.0423 80 0.0187 0.0345 0.0256 0.0263 100 0.0123 0.0234 0.0167 0.0175
[0155] The welding gain matrix is established, and the values of various indicators obtained through metallographic analysis, mechanical properties test and stress test are shown in Table 3:
[0156] Table 3 Welding gain matrix index test results
[0157] Indicator Type Index value Normalized value Weld flatness 92.3% 0.923 Weld continuity 95.6% 0.956 Uniformity of penetration depth 93.4% 0.934 Porosity 0.8% 0.992 Inclusion content 0.5% 0.995 Heat affected zone width 2.3mm 0.885 Hardness distribution uniformity 91.2% 0.912 Grain size uniformity 89.5% 0.895 tensile strength 586MPa 0.945 Yield Strength 432MPa 0.936 Elongation 26.5% 0.928 Fatigue strength 265MPa 0.912
[0158] After singular value decomposition analysis, the weld profile curve is divided into four basic units. The characteristic parameters of each unit are shown in Table 4:
[0159] Table 4 Characteristic parameters of basic welding units
[0160] Unit Number Length (mm) Average curvature (1 / m) Direction angle change (degrees) 1 155 0.023 12.5 2 178 0.035 18.3 3 165 0.028 15.7 4 182 0.031 16.8
[0161] The process parameters of each basic unit are optimized, and the optimal process parameter combination is finally determined as shown in Table 5:
[0162] Table 5 Optimization results of welding process parameters
[0163] Unit Number Welding angle (degrees) Contact angle (degrees) Power (W) Speed (mm / s) 1 85 75 2800 28 2 92 80 3000 25 3 88 78 2900 26 4 90 82 3100 24
[0164] Figure 3 The dynamic changes of the objective function value, welding power and welding speed during the process of process parameter optimization are shown, reflecting the convergence of parameter optimization. The optimized process parameters are used for actual welding. The comparison between the real-time data collected during the welding process and the prediction results of the preset model is shown in Table 6:
[0165] Table 6 Comparison between measured and predicted values of welding process
[0166] Evaluation indicators Predicted value Measured value Relative error (%) Weld width (mm) 2.85 2.92 2.45 Welding seam height (mm) 0.32 0.35 9.38 Depth of penetration (mm) 1.65 1.58 4.24 Heat affected zone width (mm) 2.25 2.38 5.78 Tensile strength (MPa) 586 573 2.22 Hardness (HV0.1) 235 228 2.98
[0167] After feature similarity calculation and path optimization, the final welding quality evaluation results are shown in Table 7:
[0168] Table 7 Comprehensive evaluation results of welding quality
[0169] Evaluation Project score Weight Weighted score Weld quality 0.945 0.35 0.331 Heat affected zone characteristics 0.912 0.25 0.228 Mechanical properties 0.928 0.25 0.232 Stress distribution 0.895 0.15 0.134 Comprehensive score - - 0.925
[0170] The traditional laser welding path planning method mainly relies on manual experience and repeated experiments, and has the following problems: poor welding quality consistency, large fluctuations in welding quality between batches, and a pass rate generally between 85% and 90%; 3. It is unable to adapt to the process parameter optimization of complex welds. For complex welding conditions such as variable cross-sections and dissimilar materials, a longer process development cycle is often required.
[0171] The method of the present invention shows significant advantages in this embodiment: the consistency of welding quality is significantly improved, and the batch qualification rate reaches 97.5%; through the deep learning model and multi-objective optimization algorithm, it can quickly adapt to different types of welding conditions, and has strong versatility and adaptability; the predictability of welding quality is achieved, and the prediction accuracy is above 95% on average, which greatly reduces the risk of process development.
[0172] It should be noted that the variables involved in the present invention are explained in detail as shown in Tables 8 and 9 below.
[0173] Table 8 Variable explanation table (Part I)
[0174]
[0175] Table 9 Variable explanation table (Part II)
[0176]
[0177]
[0178] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A path planning method for a laser welding head, characterized in that: The following steps are involved: Collect image information of the workpiece to be welded, input the image information of the workpiece to be welded into a preset welding effect image generation model, and obtain a preset welding effect image of the workpiece to be welded, wherein the preset welding effect image includes welding quality thermogram information; the preset welding effect image generation model adopts a deep convolutional neural network structure, including an encoder network for extracting multi-scale features of welds and a decoder network for generating an ideal welding effect image with a welding quality thermogram; establish a welding gain matrix including a weld quality submatrix, a heat-affected zone feature submatrix, a weld mechanical property submatrix, and a welding stress distribution submatrix; extract edge contours from the image information of the workpiece to be welded, and segment the edge contours based on a singular value decomposition method to obtain a plurality of welding basic units; establish a corresponding welding process parameter space for each welding basic unit; Based on the welding gain matrix, a welding multi-objective optimization function including a path quality optimization function, a thermogram matching optimization function, and a process parameter optimization function is established, and a final optimization target value is obtained by weighted summation; the optimal welding process parameters of each welding basic unit are combined to generate an initial welding path; the initial welding path is applied to the workpiece to be welded, and a real-time welding process image and a welding quality thermogram are collected; and feature similarity calculation is performed on the real-time welding process image and the welding quality thermogram and the preset welding effect image; The initial welding path is iteratively optimized based on the feature similarity calculation result to obtain an optimized welding path; and the optimized welding path is output as a final welding path for laser welding head control.
2. The path planning method for a laser welding head according to claim 1, characterized in that: The step of collecting image information of the workpiece to be welded specifically includes collecting image information including weld position information, weld contour characteristics, weld thickness information, and weld surface optical characteristics; using an industrial camera to collect high-resolution images of the workpiece to be welded under different angles and lighting conditions to obtain weld surface morphology and contour feature information; using a laser line scanning sensor to perform a three-dimensional contour scan of the weld to obtain geometric dimension information such as the depth and width of the weld; and using a structured light sensor to collect reflectance spectrum characteristics of the weld surface.
3. The path planning method for a laser welding head according to claim 1, characterized in that: The weld quality submatrix in the welding gain matrix includes weld flatness index, weld continuity index, penetration uniformity index, porosity index, and inclusion content index; the heat affected zone characteristic submatrix includes heat affected zone width index, heat affected zone hardness distribution index, grain size index, and tissue uniformity index; the weld mechanical property submatrix includes tensile strength index, yield strength index, elongation index, impact toughness index, and fatigue strength index; the welding stress distribution submatrix includes longitudinal residual stress index, transverse residual stress index, deformation index, and stress concentration factor index.
4. The path planning method for a laser welding head according to claim 1, characterized in that: Extract the edge contour in the image information of the workpiece to be welded, segment the edge contour based on the singular value decomposition method to obtain multiple welding basic units, and extract the welding feature vector of each welding basic unit at the same time; the welding feature vector includes a weld geometry feature vector and a surface feature vector, the weld geometry feature vector includes a curvature parameter, an orientation angle parameter, and a line segment length parameter, the welding process feature vector includes a welding head abutment angle parameter, a welding thickness parameter, and a gap size parameter, and the surface feature vector includes a roughness parameter, an oxidation degree parameter, and a coating characteristic parameter.
5. The path planning method for a laser welding head according to claim 1, characterized in that: A corresponding welding process parameter space is established for each of the welding basic units, and the welding process parameter space includes welding angle parameters, welding head abutment angle parameters, welding power parameters, and welding speed parameters; the starting point coordinates, end point coordinates, welding angle parameters, welding head abutment angle parameters, welding power parameters, and welding speed parameters of the welding basic units are constructed into path nodes; continuous path segments are generated between adjacent path nodes through cubic spline interpolation; and all the continuous path segments are connected in a welding sequence to form a complete welding path.
6. The path planning method for a laser welding head according to claim 1, characterized in that: The path quality optimization function is used to optimize the continuity and smoothness of the welding path. The input includes the curvature parameter, direction angle parameter, and line segment length parameter in the weld geometric feature vector of the welding basic unit, and the output is the path quality score; the thermal map matching optimization function is used to optimize the matching degree between the welding effect and the expected target. The input includes the feature similarity calculation result between the real-time welding process image and the preset welding effect image, and the output is the thermal map matching score; the process parameter optimization function is used to optimize the welding process parameter combination. The input includes the welding angle parameter, welding head abutment angle parameter, welding power parameter, and welding speed parameter in the welding process parameter space, and the output is the process parameter score.
7. The path planning method for a laser welding head according to claim 1, characterized in that: The real-time welding process image is collected using a high-speed industrial camera with a frame rate of not less than 1000 frames per second. The welding quality thermogram uses a pseudo-color method to represent the distribution of weld quality parameters, specifically mapping the weld strength distribution to a red channel value, the red channel value range is 0 to 255; mapping the residual stress distribution to a green channel value, the green channel value range is 0 to 255; mapping the heat affected zone feature distribution to a blue channel value, the blue channel value range is 0 to 255.
8. The path planning method for a laser welding head according to claim 1, characterized in that: The initial welding path is iteratively optimized based on the feature similarity calculation result, specifically, the structural similarity index of the real-time welding process image and the preset welding effect image is calculated; the Euclidean distance between the welding quality thermogram and the welding quality thermogram in the preset welding effect image is calculated; when the structural similarity index is less than 0.85 or the Euclidean distance is greater than 0.2, a local search is performed on the welding process parameter space.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the path planning method for a laser welding head according to any one of claims 1 to 8.
10. A path planning system for a laser welding head, characterized in that: The system comprises the computer-readable storage medium as claimed in claim 9, wherein the system is any one of a computer, a server, and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
Citation Information
Cited By
Multi-product-line-oriented robot welding integration method, device and equipment and medium
CN120395050A
Dissimilar metal laser welding device based on swing light beam and molten pool state online monitoring
CN120516178A
Process parameter optimization method and equipment for ultrasonic metal welding
CN120662932A
Intelligent laser welding method based on CCD visual positioning
CN120807259A
Intelligent laser welding method based on CCD visual positioning
CN120807259B