Welding thermal deformation compensation method based on double-channel time series prediction and ant colony algorithm

CN123015359APending Publication Date: 2026-10-30WUHAN TEXTILE UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610885837.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

传统的焊接轨迹生成方法主要分为离线编程和在线视觉跟踪两类,但均存在明显不足:离线编程依赖于工件的模型和理想坡口参数,无法适应实际装配误差和焊接过程中的热变形;在线视觉跟踪通过实时提取焊缝特征点引导机器人运动,但本质上是对当前偏差的被动响应,缺乏对焊接变形趋势的前瞻性补偿能力

Benefits of technology

1、通过结构光视觉与热成像分别获取焊缝的几何序列与热序列,构建双通道时序预测模型输出法向修正比例,实现对热变形趋势的前瞻性预测,以克服传统在线视觉跟踪仅能被动响应当前偏差的局限,将预测结果转化为预估偏差点并与实测点加权融合,从而量化预测不确定性并融入融合决策,在此基础上,构建改进蚁群算法,以预估偏差点作为先验信息融入启发函数,引导多项式系数搜索生成连续轨迹,避免了传统局部优化方法容易陷入局部最优的缺陷,同时设置滚动时域机制,每次仅执行前段轨迹,将后段对应实测点与新点合并迭代,实现轨迹的平滑衔接与连续自适应补偿;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015359A_ABST
    Figure CN123015359A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of welding monitoring, and proposes a welding thermal deformation compensation method based on double-channel time sequence prediction and ant colony algorithm, comprising the following steps: acquiring the geometric sequence and the thermal sequence of the weld seam by a structured light vision sensor and a thermal imager respectively, the geometric sequence being formed by a measured point set collected by the structured light vision sensor; constructing a double-channel time sequence prediction model, inputting the geometric sequence and the thermal sequence into the double-channel time sequence prediction model, and outputting the normal correction ratio corresponding to each measured point in the measured point set by the double-channel time sequence prediction model. The present application can overcome the limitation that the traditional online visual tracking can only respond to the current deviation passively, avoid the defect that the traditional local optimization method is easy to fall into local optimum, and set a rolling time domain mechanism, execute only the front trajectory each time, merge the corresponding measured points and new points in the rear section for iteration, so as to realize smooth connection and continuous adaptive compensation of the trajectory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of welding monitoring technology, and in particular to a welding thermal deformation compensation method based on dual-channel time-series prediction and ant colony algorithm. Background Technology

[0002] In the automated welding of large structural components, the accuracy of the welding trajectory directly determines the quality of the weld formation. Traditional welding trajectory generation methods are mainly divided into offline programming and online visual tracking, but both have significant shortcomings: offline programming relies on the workpiece model and ideal bevel parameters, and cannot adapt to actual assembly errors and thermal deformation during the welding process; online visual tracking guides robot movement by extracting weld feature points in real time, but it is essentially a passive response to current deviations and lacks the ability to proactively compensate for welding deformation trends. Trajectory deviations during the welding process are not random noise, but rather systematic deformations driven by multiple physical factors. The most important influencing factor is thermal cumulative deformation: welding with high heat input causes significant thermal expansion and subsequent shrinkage deformation of the workpiece; for long welds, welding shrinkage can reach several millimeters. The coupled effect of these factors makes the actual welding trajectory problem a complex physical-driven optimization problem.

[0003] In recent years, deep learning has made significant progress in the fields of time series prediction and image processing. Methods based on convolutional neural networks and recurrent neural networks have been used for weld seam tracking and molten pool monitoring. However, most existing studies use visual or thermal information alone, without deeply integrating the two for the direct prediction of thermal deformation offset. Furthermore, methods that simply use geometric trajectory extrapolation or least squares fitting often produce significant biases when dealing with thermal deformation. In trajectory optimization, traditional polynomial fitting, spline interpolation, or least squares methods are widely used due to their high computational efficiency, numerical stability, and clear geometric meaning; however, they are essentially local optimization methods, prone to getting trapped in local optima, and difficult to incorporate prior physical information such as thermal deformation. Summary of the Invention

[0004] In view of this, this invention proposes a welding thermal deformation compensation method based on dual-channel temporal prediction and ant colony algorithm. The method acquires the geometric and thermal sequences of the weld seam through structured light vision and thermal imaging, respectively. A dual-channel temporal prediction model is constructed to output a normal correction ratio, enabling forward-looking prediction of thermal deformation trends. This overcomes the limitation of traditional online visual tracking, which can only passively respond to current deviations. The prediction results are transformed into estimated deviation points and weighted and fused with measured points, thereby quantifying prediction uncertainty and incorporating it into the fusion decision. Based on this, an improved ant colony algorithm is constructed, using estimated deviation points as prior information incorporated into the heuristic function to guide the search of polynomial coefficients to generate a continuous trajectory. This avoids the defect of traditional local optimization methods easily getting trapped in local optima. Simultaneously, a rolling temporal domain mechanism is set up, executing only the first segment of the trajectory each time, merging the corresponding measured points of the subsequent segment with the new points for iteration, achieving smooth trajectory connection and continuous adaptive compensation. This allows the robotic welding torch to adaptively adjust during the welding process, adapting to actual assembly errors and thermal deformation during welding.

[0005] The technical solution of this invention is implemented as follows: In a first aspect, the present invention provides a welding thermal deformation compensation method based on dual-channel time-series prediction and ant colony algorithm, comprising the following steps: The geometric sequence and thermal sequence of the weld are obtained by a structured light vision sensor and a thermal imager, respectively. The geometric sequence is constructed from the set of measured points collected by the structured light vision sensor. A dual-channel time series prediction model is constructed. The geometric sequence and thermal sequence are input into the dual-channel time series prediction model, and the normal correction ratio corresponding to each measured point in the measured point set is output by the dual-channel time series prediction model. Based on the normal correction ratio, thermal deformation pre-compensation is performed on the preset reference trajectory to generate a set of predicted deviation points. The set of predicted deviation points is then weighted and fused with the set of measured points to obtain the set of points to be fitted. An improved ant colony algorithm is constructed, with the set of points to be fitted as the optimization objective. The predicted deviation set of points is used as prior information and incorporated into the heuristic function of the improved ant colony algorithm. The optimal polynomial coefficients are searched to generate a parameterized continuous trajectory. A rolling time-domain mechanism is adopted. After each continuous trajectory is generated, the first part of the continuous trajectory is cut off according to a preset ratio as the trajectory for the current welding execution. The measured points corresponding to the second part of the continuous trajectory are merged with the newly acquired measured points for the construction of the set of points to be fitted in the next iteration.

[0006] In one embodiment, acquiring the geometric and thermal sequences of the weld seam using a structured light vision sensor and a thermal imager, respectively, specifically includes: The three-dimensional coordinates of the weld center are acquired in real time by a three-line laser structured light vision unit, and a geometric sequence is constructed using the three-dimensional coordinates of the most recent predetermined number of historical moments. The thermal field parameters of the weld are acquired in real time using a high-speed thermal imager, and the thermal sequence is constructed using the thermal field parameters at the same historical moment. The thermal field parameters include the highest temperature of the molten pool, the average temperature of the heat-affected zone, the temperature gradient along the weld direction, and thermal cycle characteristic parameters; wherein, the thermal cycle characteristic parameters are the time difference between the arrival time of a fixed point on the weld from the molten pool and the time when it cools to the preset temperature.

[0007] In one embodiment, constructing the dual-channel time series prediction model specifically includes: A geometric convolution channel is set up, which sequentially passes through a one-dimensional dilated convolutional layer, a batch normalization layer, an activation function layer, and a channel attention module to extract the temporal features of the geometric sequence and output the geometric features. A thermal convolution channel is set up, which extracts the temporal features of the thermal sequence through the same structure as the geometric convolution channel and outputs the thermal features; Geometric features and thermal features are concatenated along the channel dimension to generate a fused feature; The fused features are input into the Transformer encoder for global temporal modeling to generate encoded features; The encoded features are mapped to normal correction ratios through a fully connected layer and a Sigmoid activation function.

[0008] In one embodiment, the weighted fusion of the estimated deviation point set and the measured point set specifically includes: Calculate the first confidence level for each measured point. The first confidence level is determined based on the consistency of multiple candidate points during the acquisition by the structured light vision sensor. Calculate the second confidence level for each predicted deviation point, which is determined based on the prediction variance of the normal correction ratio by the dual-channel time series prediction model; Based on the first confidence level and the second confidence level, a weighted average is calculated on the corresponding measured points and predicted deviation points to obtain the fusion point, and the sum of the first confidence level and the second confidence level is used as the fusion weight of the fusion point.

[0009] In one embodiment, the heuristic function includes a fitting error heuristic term and a deviation consistency heuristic term; the fitting error heuristic term is used to measure the fitting deviation of the candidate solution on the set of points to be fitted, the fitting deviation being measured by the distance between the trajectory point corresponding to the candidate solution and the point to be fitted; the deviation consistency heuristic term is used to measure the spatial proximity between the set of points to be fitted and the set of predicted deviation points, the spatial proximity being measured by the distance between the point to be fitted and the corresponding predicted deviation point; the improved ant colony algorithm guides ants to select candidate solutions according to the heuristic function during the search for optimal polynomial coefficients.

[0010] In one embodiment, the rolling time-domain mechanism specifically includes: After each continuous trajectory is generated, the first part of the continuous trajectory is cut off according to a predetermined ratio as the trajectory for the current welding execution; wherein, the predetermined ratio corresponds to the proportion of the total number of measured points covered by the current trajectory used for execution. The measured points corresponding to the latter part of the continuous trajectory are saved and merged with the newly acquired measured points in the next round to form the set of measured points for the next iteration. The number of points to be fitted remains constant in each iteration.

[0011] In one embodiment, after merging the measured points corresponding to the latter part of the continuous trajectory with the newly acquired measured points, the method further includes: A comprehensive quality score is calculated based on the trajectory segment of each welding operation. The comprehensive quality score includes at least a geometric accuracy score and a thermal deformation compensation effect score. The overall quality score is used as a feedback signal to fine-tune the dual-channel temporal prediction model online. The online fine-tuning only updates the last part of the network layer of the Transformer encoder, keeping the parameters of the geometric convolution channel and the thermal convolution channel unchanged. The prior bandwidth parameter in the deviation consistency heuristic is dynamically adjusted based on the overall quality score; the prior bandwidth parameter is increased when the overall quality score is lower than the preset threshold, and decreased when the overall quality score is higher than the preset threshold and stable.

[0012] Secondly, the present invention provides a welding thermal deformation compensation system based on dual-channel timing prediction and ant colony algorithm, used to implement the above-mentioned welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm, the system comprising: The data acquisition module is used to acquire the geometric sequence and thermal sequence of the weld seam through a structured light vision sensor and a thermal imager, respectively. The normal correction ratio prediction module is used to construct a dual-channel time series prediction model. The geometric sequence and thermal sequence are input into the dual-channel time series prediction model, and the dual-channel time series prediction model outputs the normal correction ratio corresponding to each measured point in the measured point set. The pre-compensation and fusion module is used to perform thermal deformation pre-compensation on the preset reference trajectory according to the normal correction ratio, generate a set of estimated deviation points, and perform weighted fusion of the set of estimated deviation points with the measured point set to obtain the set of points to be fitted. The global trajectory fitting module is used to construct an improved ant colony algorithm. It takes the set of points to be fitted as the optimization target, incorporates the estimated deviation point set as prior information into the heuristic function of the improved ant colony algorithm, searches for the optimal polynomial coefficients, and generates a parameterized continuous trajectory. The rolling execution and iteration module is used to adopt a rolling time domain mechanism. After each continuous trajectory is generated, the first part of the continuous trajectory is cut off according to a preset ratio as the trajectory for the current welding execution. The measured points corresponding to the second part of the continuous trajectory are merged with the newly acquired measured points for the construction of the set of points to be fitted in the next iteration.

[0013] Thirdly, the present invention provides an electronic device, including a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the above-mentioned welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm.

[0014] Fourthly, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm.

[0015] The welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm of the present invention has the following advantages over the prior art: 1. By acquiring the geometric and thermal sequences of the weld seam through structured light vision and thermal imaging respectively, a dual-channel time-series prediction model is constructed to output the normal correction ratio, thereby achieving a forward-looking prediction of the thermal deformation trend. This overcomes the limitation of traditional online visual tracking, which can only passively respond to the current deviation. The prediction results are transformed into estimated deviation points and weighted and fused with measured points, thereby quantifying the prediction uncertainty and incorporating it into the fusion decision. On this basis, an improved ant colony algorithm is constructed, which uses the estimated deviation points as prior information to incorporate into the heuristic function and guides the polynomial coefficient search to generate a continuous trajectory. This avoids the defect of traditional local optimization methods that are prone to getting trapped in local optima. At the same time, a rolling time domain mechanism is set up, which only executes the first segment of the trajectory each time and merges the corresponding measured points of the second segment with the new points for iteration, thereby achieving smooth connection and continuous adaptive compensation of the trajectory. 2. The three-dimensional coordinates of the weld center are acquired in real time by a three-line laser structured light vision unit, and a geometric sequence is constructed using the most recent predetermined number of historical moments. A high-speed thermal imager is used to acquire a thermal sequence including the highest temperature of the molten pool, the average temperature of the heat-affected zone, the temperature gradient along the weld direction, and thermal cycling characteristic parameters. This ensures that the geometric information and thermal information are precisely aligned in time. The thermal cycling characteristic parameters are directly acquired using the high frame rate of the thermal imager without the need for additional sensors, providing rich and synchronous input features for the dual-channel time-series prediction model, thereby effectively improving the prediction accuracy of the normal correction ratio. 3. After execution in the rolling time domain, a comprehensive quality score is calculated based on the trajectory segment of each welding execution. This score is used as a feedback signal to fine-tune the dual-channel time-series prediction model online. At the same time, the prior bandwidth parameter in the deviation consistency heuristic is dynamically adjusted, so that the prediction model can continuously adapt to the thermal deformation characteristics of specific workpieces according to the actual execution effect. Moreover, only the top-level network of the Transformer encoder is fine-tuned while the convolution channel parameters are fixed, achieving rapid adaptation while maintaining existing knowledge. The dynamic adjustment of the prior bandwidth parameter realizes the online optimization of the prediction prior confidence. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram illustrating the steps of the welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm of the present invention. Figure 2 The original image and stripe center extraction image of the three-line structure of the welding heat deformation compensation method based on dual-channel time-series prediction and ant colony algorithm of the present invention are shown. Figure 3 This is a schematic diagram of the thermal parameter extraction method for welding thermal deformation compensation based on dual-channel time-series prediction and ant colony algorithm of the present invention; Figure 4 This is a structural diagram of the dual-channel time-series prediction model for the welding thermal deformation compensation method based on dual-channel time-series prediction and ant colony algorithm of the present invention. Figure 5 This is a schematic diagram of the rolling time domain and closed-loop feedback mechanism of the welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm of the present invention. Figure 6 This is a schematic diagram showing the fusion of predicted deviation points and measured points in the welding thermal deformation compensation method based on dual-channel time-series prediction and ant colony algorithm of the present invention. Figure 7 The flowchart shows the improved ant colony algorithm of the welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0019] like Figure 1-7 As shown, the welding thermal deformation compensation method based on dual-channel time-series prediction and ant colony algorithm of the present invention includes steps S100-S500. Before performing step S100, the sensor system needs to be deployed.

[0020] In some embodiments, the structured light vision unit employs a three-line laser structured light system, with three laser lines arranged in parallel at equal intervals. By projecting structured light onto the workpiece surface, the center lines of the laser stripes are extracted using the Steger algorithm. Combined with a pre-calibrated camera-laser triangulation model, the three-dimensional contour point cloud of the weld cross-section is calculated. For each laser line, weld feature points are extracted, resulting in three candidate points. The final weld center point coordinates are obtained through weighted averaging. The sampling frequency is 25Hz. The high-speed thermal imager uses an uncooled infrared focal plane detector with a frame rate of no less than 200Hz (e.g., FLIRA8580). An infrared transmission filter (narrow-band filter, center wavelength approximately 1.06μm or appropriately avoiding arc light peaks) is installed in front of the lens to eliminate welding arc light interference. The thermal imager is off-axis mounted and rigidly connected to the structured light vision system. The temperature image is pre-calibrated to register with the structured light image, ensuring a one-to-one spatial correspondence between temperature data and weld geometry data. The high-speed thermal imager can capture transient temperature changes in the molten pool and heat-affected zone with extremely high temporal resolution, providing richer time-series information for thermal deformation prediction.

[0021] Step S100: Obtain the geometric sequence and thermal sequence of the weld seam using a structured light vision sensor and a thermal imager, respectively. The geometric sequence is constructed from the set of measured points collected by the structured light vision sensor.

[0022] During the welding process, the geometric and thermal sequences of the weld are acquired by a structured light vision sensor and a thermal imager, respectively.

[0023] Specifically, the structured light vision sensor is installed in front of the welding torch and rigidly connected to the welding torch. The structured light strips it projects form light stripes on the surface of the weld. The stripe images are acquired by a camera, and the three-dimensional coordinates of the weld center are calculated using the principle of triangulation.

[0024] One measurement point is acquired at each sampling time, and the measurement points from multiple consecutive sampling times constitute a measurement point set. Based on this measurement point set, the measurement points from the most recent predetermined number of historical time moments, such as 10, are extracted in chronological order to construct a geometric sequence. This geometric sequence reflects the spatial position change of the weld center within a recent time window.

[0025] Meanwhile, the thermal imager is mounted off-axis and rigidly connected to the structured light vision sensor, and is calibrated to spatially register the temperature image with the structured light image.

[0026] The thermal imager continuously acquires the temperature distribution of the molten pool and heat-affected zone at a high frame rate. For each sampling moment, thermal field parameters reflecting the welding thermal state are extracted from the temperature image to form a thermal sequence. This thermal sequence is synchronized with the geometric sequence in time, meaning that the two have the same historical window length and sampling time correspondence.

[0027] Thermal field parameters may include, but are not limited to, physical quantities that characterize the heat input and heat accumulation state, such as the maximum temperature of the molten pool, the average temperature of the heat-affected zone, and the temperature gradient.

[0028] Step S200: Construct a dual-channel time series prediction model. Input the geometric sequence and thermal sequence into the dual-channel time series prediction model. The dual-channel time series prediction model outputs the normal correction ratio corresponding to each measured point in the measured point set.

[0029] A dual-channel time series prediction model is constructed. The model takes geometric and thermal sequences as inputs and outputs the normal correction ratio corresponding to each measured point after internal calculations.

[0030] The normal correction ratio is a dimensionless numerical value used to represent the magnitude of the offset adjustment of the reference trajectory in the normal direction.

[0031] Specifically, the dual-channel time-series prediction model has two parallel feature extraction channels, processing geometric and thermal sequences respectively. The geometric channel extracts positional change trends and local morphological features from the geometric sequence; the thermal channel extracts temperature change trends and heat accumulation effects from the thermal sequence. The features extracted by the two channels are fused within the model to form a joint feature that comprehensively considers both geometric and thermal information.

[0032] Subsequently, the joint feature is fed into the temporal modeling part of the model to capture the dependencies between different time points in the sequence.

[0033] Finally, the model outputs a normal correction ratio sequence of the same length as the input sequence, where each value corresponds to the normal correction ratio of the corresponding measured point in the set of measured points.

[0034] Step S300: Perform thermal deformation pre-compensation on the preset reference trajectory according to the normal correction ratio to generate a set of predicted deviation points, and then perform weighted fusion of the set of predicted deviation points and the measured point set to obtain the set of points to be fitted.

[0035] First, a reference trajectory is preset. This reference trajectory is the ideal weld centerline obtained by offline scanning or planning based on the workpiece model before welding begins, i.e., when the workpiece is in a cold state and without thermal deformation. It can be represented by the arc length parameter.

[0036] For each normal correction ratio, apply it to the corresponding point on the reference trajectory. Find the point on the reference trajectory that has the same arc length as the measured point, obtain the spatial coordinates and its normal unit vector of the point, and calculate the estimated deviation point based on the normal correction ratio and the reference offset scale. When the normal correction ratio is greater than 1, it indicates that thermal deformation causes the weld to expand in the positive direction of the normal, and the estimated deviation point is located in the positive direction of the normal of the reference trajectory; when the normal correction ratio is less than 1, it indicates that thermal deformation causes the weld to contract in the negative direction of the normal, and the estimated deviation point is located in the negative direction of the normal of the reference trajectory; when the normal correction ratio is equal to 1, it indicates that there is no thermal deformation, and the estimated deviation point coincides with the reference trajectory point.

[0037] Perform the above calculations on all measured points to generate a set of estimated deviation points, forming the estimated deviation point set. This point set reflects the expected position after offset compensation of the reference trajectory based solely on the thermal deformation prediction results.

[0038] Then, the predicted deviation point set and the measured point set are weighted and fused. For the same arc length position, there exists both a measured point and a predicted deviation point. The measured point is the current weld center acquired in real time by structured light vision, while the predicted deviation point is generated by the prediction model. Both have a certain degree of reliability: the reliability of the measured point depends on the sensor measurement quality, and the reliability of the predicted deviation point depends on the reliability of the prediction model.

[0039] By using a weighted average, the two data points are merged into a single integrated point. This merged point contains both real-time measurement information and forward-looking prediction information, exhibiting higher stability and accuracy compared to using measured points or predicted deviation points alone. All merged points constitute the set of points to be fitted, which is then used for subsequent trajectory generation.

[0040] Step S400: Construct an improved ant colony algorithm, taking the set of points to be fitted as the optimization objective, incorporating the predicted deviation set as prior information into the heuristic function of the improved ant colony algorithm, searching for the optimal polynomial coefficients, and generating a parameterized continuous trajectory.

[0041] An improved ant colony algorithm is constructed to fit a continuous and smooth trajectory from a set of points containing a finite number of discrete fusion points.

[0042] Ant colony optimization is a heuristic optimization algorithm that simulates the foraging behavior of ants. In this embodiment, each ant represents a set of polynomial coefficients, which define a parameterized continuous curve.

[0043] First, an initial solution is generated based on the set of points to be fitted. For example, a set of initial polynomial coefficients can be obtained by using the weighted least squares method. Then, the search boundary is defined with the initial solution as the center. Each ant randomly selects a set of polynomial coefficients within the search boundary to form a candidate solution.

[0044] To guide ants to search for more promising areas, a heuristic function that integrates prior information was designed. This heuristic function not only considers the fitting deviation of the candidate solution on the set of points to be fitted, i.e., the closeness of the candidate curve to the fusion point, but also considers the consistency between the candidate solution and the predicted deviation set, i.e., whether the candidate curve is close to the predicted thermal deformation position.

[0045] By incorporating the predicted deviation point set as prior information into the heuristic function, the ant colony algorithm tends to select curves that can fit the fusion point and conform to the thermal deformation prediction trend during the search process.

[0046] The algorithm iterates as follows: Each ant selects a candidate solution based on the heuristic function and pheromone concentration, calculates the fitness of the candidate solution, and the higher the fitness, the better the curve quality. The pheromone is then updated, and elite solutions are retained.

[0047] After several iterations, the polynomial coefficients corresponding to the candidate solution with the highest fitness are output as the optimal solution. Using the optimal polynomial coefficients, a parameterized continuous trajectory is generated.

[0048] A continuous trajectory is mathematically represented as a polynomial function of the arc length parameter or the normalized parameter, and the coordinates of the trajectory points can be calculated at any position within the parameter interval.

[0049] In some embodiments, after generating a continuous trajectory, an adaptive Savitzky-Golay filter is also used for post-processing. Specifically, discrete points are sampled at equal intervals on the trajectory, and the length of the filter window is adaptively adjusted according to the average curvature of the trajectory: a small window is used where the curvature is large to preserve details, and a large window is used where the curvature is gentle to enhance smoothness.

[0050] Step S500: Using a rolling time-domain mechanism, after each generation of a continuous trajectory, the first part of the continuous trajectory is cut off according to a preset ratio as the trajectory for the current welding execution. The measured points corresponding to the second part of the continuous trajectory are merged with the newly acquired measured points for the construction of the set of points to be fitted in the next iteration.

[0051] A rolling time-domain mechanism is used to execute the previously generated continuous trajectory. Each time a continuous trajectory covering all points to be fitted within the current window is generated (e.g., covering 10 fusion points), the entire trajectory is not executed immediately. Instead, a segment from the beginning of the trajectory is selected as the current welding execution segment. For example, if the preset segment is 80%, only the curve segment corresponding to the first 80% of the trajectory is executed, and the robotic welding torch moves according to this segment to complete the current welding task.

[0052] The measured points corresponding to the latter part of the continuous trajectory, i.e., the remaining unexecuted portion—that is, the measured points at the arc length positions of the latter part of the trajectory—are saved and not executed immediately. In the next iteration, these saved measured points are merged with newly acquired measured points to form a new set of measured points. Then, steps S100 to S400 are repeated to generate a new continuous trajectory. This cycle continues until welding is completed.

[0053] Through the aforementioned rolling time-domain mechanism, there is an overlap between adjacent generated trajectory segments, thereby ensuring smooth connection between the preceding and following trajectory segments. At the same time, by executing only a short trajectory segment each time, subsequent trajectories can be adjusted in a timely manner based on the latest collected sensor data, achieving continuous adaptive compensation for thermal deformation.

[0054] In some embodiments, the step S100 of acquiring the geometric sequence and thermal sequence of the weld seam using a structured light vision sensor and a thermal imager, respectively, is described in more detail.

[0055] The three-dimensional coordinates of the weld center are acquired in real time by a three-line laser structured light vision unit, and a geometric sequence is constructed using the three-dimensional coordinates of the most recent predetermined number of historical moments.

[0056] A three-line laser structured light vision unit is employed, with three laser lines arranged in parallel at equal intervals. During welding, a laser projector projects the three-line structured light onto the weld surface, and an industrial camera captures images of the light stripes. For each laser line, the Steger algorithm is used to extract the center line of the laser stripe, obtaining the stripe center point with sub-pixel precision. Combined with a pre-calibrated camera-laser triangulation model, the image coordinates are converted into three-dimensional spatial coordinates, resulting in three candidate points. To suppress single-line noise, a weighted average is performed on the three candidate points to obtain the final three-dimensional coordinates of the weld center. The sampling frequency of the structured light vision unit is set to 25Hz, meaning that one measurement point is output every 40ms. All continuously acquired measurement points constitute the measurement point set.

[0057] Take the K most recent historical data points, arrange them chronologically, and construct a geometric sequence. Here, K is a predetermined number of historical window lengths. The mathematical form of the geometric sequence G is:

[0058]

[0059] The thermal field parameters of the weld are acquired in real time using a high-speed thermal imager, and the thermal sequence is constructed using the thermal field parameters at the same historical moment.

[0060] A high-speed thermal imager employing an uncooled infrared focal plane detector has a frame rate of no less than 200Hz and a spatial resolution of no less than 640×512 pixels. An infrared transmission filter is installed in front of the lens, for example, with a center wavelength of approximately 1.06μm or to avoid the arc light peak to suppress welding arc light interference. The thermal imager is mounted off-axis and rigidly connected to a structured light vision sensor. The temperature image is pre-aligned with the structured light image through registration calibration, ensuring a one-to-one spatial correspondence between the temperature data and the weld geometry data.

[0061] For each sampling time Extract from the registered temperature image: Maximum temperature of molten pool : Take the maximum pixel value in the melt pool region (the connected region with the highest brightness); Average temperature of the heat-affected zone Take the average temperature within a strip area 5mm from the weld centerline; Temperature gradient along the weld direction Calculate the temperature difference along the tangent of the weld and take the absolute value; Thermal cycling characteristic parameters Record the time difference between the arrival of the molten pool at a fixed point on the weld and the cooling to 200°C. This parameter can be accurately captured using the high frame rate characteristics of high-speed thermal imaging without the need for an additional thermocouple.

[0062] The sampling frequency for structured light vision is 25Hz, while the sampling frequency for high-speed thermal imagers is no less than 200Hz. To ensure precise temporal alignment between the geometric and thermal sequences, linear interpolation is used to resample all data to a uniform frequency, such as 50Hz. For each output time, the two nearest-neighbor original data points are used for linear interpolation, as shown in the following formula:

[0063]

[0064] Where t1 and t2 are adjacent times of the original data, and t is the target time.

[0065] Subsequently, Z-score normalization was performed on each component:

[0066] in These are the mean and standard deviation of the component on the training set, respectively. The normalization parameter is pre-calculated and saved during the offline training phase.

[0067] Take the hot state vectors with the same historical window length K as the geometric sequence, arrange them in chronological order, and construct the hot sequence H:

[0068] In one specific embodiment, the value of K is chosen to be 10 to construct the geometric sequence. and thermal sequence :

[0069] Through the above steps, the geometric sequence and thermal sequence can be obtained and constructed, providing aligned and normalized multi-source input data for the subsequent dual-channel time series prediction model.

[0070] In some embodiments, the construction of the dual-channel time series prediction model in step S200 can be configured in the following ways.

[0071] First, a geometric convolution channel is set up. The geometric convolution channel sequentially passes through a one-dimensional dilated convolutional layer, a batch normalization layer, an activation function layer, and a channel attention module to extract the temporal features of the geometric sequence and output the geometric features.

[0072] Specifically, a one-dimensional dilated convolutional layer (Conv1D) is used, with 3 input channels, 64 output channels, a kernel size of 3, a dilation rate of 1, and padding of 'same', maintaining a sequence length of 10. This is followed by a BatchNorm layer and a ReLU activation function. Then, a second one-dimensional dilated convolutional layer is used, with 64 input and 64 output channels, a kernel size of 3, a dilation rate of 2, and padding of 'same', followed by BatchNorm and ReLU. Finally, an ECANet channel attention module is connected, with 64 channels and an adaptive kernel size determined by the formula:

[0073]

[0074] in Actual Output geometric features

[0075] The receptive field of two dilated convolutions is It can cover most of the historical window, and when combined with the subsequent global modeling of Transformer, it can effectively extract thermal deformation trend features.

[0076] Then, a thermal convolution channel is set up. The thermal convolution channel extracts the temporal features of the thermal sequence through the same structure as the geometric convolution channel and outputs the thermal features.

[0077] enter Through the same structure: Conv1D(4→64, kernel 3, dilation=1, padding='same')+BatchNorm+ReLU; Conv1D(64→64, kernel 3, dilation=2, padding='same')+BatchNorm+ReLU; ECANet(channel 64, k=3).

[0078] Output thermal characteristics This channel is used to extract dynamic features of the thermal state, such as abrupt changes in temperature gradients and the phase of thermal cycling. Thanks to the high frame rate of the high-speed thermal imager, transient changes in the thermal sequence (such as temperature spikes in the molten pool) can be effectively captured.

[0079] The geometric features and thermal features are then spliced ​​together along the channel dimension to generate a fused feature.

[0080] Geometric features thermal characteristics By splicing along the channel dimensions, the fusion feature is obtained. .

[0081] Subsequently, the fused features are input into the Transformer encoder for global temporal modeling to generate encoded features.

[0082] A standard Transformer encoder is used, but only two layers are employed to reduce computational cost. Each layer contains:

[0083] Multi-head self-attention: number of heads Embedded dimensions Each head dimension Employ full attention.

[0084] Feedforward network: two fully connected layers, 2048 hidden dimensions, GELU activation function, and a Dropout layer (p=0.1).

[0085] Residual connectivity and layer normalization (PostLN).

[0086] Position encoding uses learnable position encoding parameters It is trained along with the network. Encoder output. .

[0087] Finally, the encoded features are mapped to normal correction ratios through a fully connected layer and a Sigmoid activation function.

[0088] Predict the normal correction ratio independently for each time step: a fully connected layer (128→1), followed by a Sigmoid activation, and output the value. Then linearly map to :

[0089]

[0090] That is, take directly ,scope When the output is 0.5 No correction is indicated; a value greater than 1 indicates a positive offset (expansion), and a value less than 1 indicates a negative offset (contraction).

[0091] The following settings can be used to train the model.

[0092] Loss function: Mean squared error ; Optimizer: Adam, initial learning rate 0.001, weight decay 1e-5, cosine annealing scheduling; Batch size 32, training 100 rounds, early stopping (validation set loss does not decrease for 10 consecutive rounds). Data: No fewer than 5000 window sequences, each containing geometric and thermal data for 10 consecutive time points, as well as the real data calculated later. Label.

[0093] In some embodiments, it is necessary to perform weighted fusion of the estimated deviation point set and the measured point set, which can be divided into sub-steps S301-S303. Before performing weighted fusion, it is also necessary to perform thermal deformation pre-compensation on the preset reference trajectory according to the normal correction ratio to generate the estimated deviation point set.

[0094] First, a baseline trajectory needs to be defined. The ideal weld centerline, obtained from offline scanning before welding, is represented by the arc length parameter. express.

[0095] For each historical moment in the current window (corresponding arc length) Given: Normal correction ratio predicted by the model ; Points on the baseline trajectory and its normal unit vector (by tangent vector) (Obtained by rotating 90°) Reference offset scale (Take 1mm or the 95th percentile of the training set).

[0096] Calculate the predicted deviation point:

[0097] After obtaining the predicted deviation point set, the predicted deviation point set and the measured point set can be weighted and fused.

[0098] Step S301: Calculate the first confidence level for each measured point. The first confidence level is determined based on the consistency of multiple candidate points during the acquisition by the structured light vision sensor.

[0099] For each measured point q in the obtained set of measured points j meas The first confidence level c is determined based on the consistency of multiple candidate points acquired by the structured light vision sensor. j In this embodiment, a three-line laser structured light vision unit is used, which can obtain three candidate points P at each time step. t (1) P t (2) P t (3) Calculate the standard deviation σ of these three candidate points. j A smaller standard deviation indicates greater consistency among candidate points, and a higher confidence level for the measured points. The confidence level is calculated using the following formula:

[0100] c j =exp(-α*σ j ) Where α is a preset adjustment coefficient, for example, α = 5~10, used to control the rate at which the confidence level decays with the standard deviation. After calculation, c j Normalizing to the interval [0,1] yields the first confidence level. σ is calculated when all candidate points are identical. j =0, c j =1; when the candidate points are highly discrete, c j Approaching 0.

[0101] Step S302: Calculate the second confidence level for each predicted deviation point. The second confidence level is determined based on the prediction variance of the normal correction ratio by the dual-channel time series prediction model.

[0102] For each predicted deviation point q in the generated set of predicted deviation points j prior The normal correction ratio λ is based on the dual-channel time series prediction model. n The prediction variance determines the second confidence level p. j This embodiment employs the MC Dropout method, keeping the Dropout layer active during testing. It performs T forward propagations on the same input sequence, for example, T=20, to obtain T different predicted normal correction ratios λ. n (1) ,λ n (2) ,…,λ n (T) Calculate the variance Var(λ) of these T predicted values.n A larger variance indicates higher model prediction uncertainty, and a lower confidence level for the corresponding prediction bias. The confidence level is calculated as follows:

[0103]

[0104] Where β is a preset adjustment coefficient, for example, β = 5~10. To prevent excessively high or low confidence levels from affecting fusion stability, p can be adjusted. j The confidence level is limited to a preset range, such as [0.1, 0.9]. This ultimately yields the second confidence level p. j This characterizes the reliability of the predicted deviation point.

[0105] Step S303: Based on the first confidence level and the second confidence level, perform a weighted average of the corresponding measured points and predicted deviation points to obtain the fusion point, and use the sum of the first confidence level and the second confidence level as the fusion weight of the fusion point.

[0106] For the same arc length position j, there exists a measured point q. j meas And the predicted deviation point q j prior And the corresponding first confidence level c j Second confidence level p j The two are combined using a weighted average method, as shown in the following formula:

[0107] Where q j fused This is the fused point. The fusion weight w for this point is... j Defined as the sum of the first confidence level and the second confidence level: , fusion weight w j The magnitude of w reflects the overall reliability of the fusion point: when both the measured point and the predicted deviation point are reliable, w j Larger; when either is unreliable, w j The value is relatively small. This weight will be used as a weighting coefficient for the fitting accuracy term in the subsequent ant colony fitness function.

[0108] For all arc length positions j=1,2,…,K within the current window, where K is the length of the historical window (e.g., K=10), repeat the above steps to obtain all fusion points q. j fused and its fusion weight w j These fusion points are arranged in order to form a set of points to be fitted. The corresponding weight set is .

[0109] The fusion method described above quantifies the uncertainty of sensor measurements and the uncertainty of model predictions, and dynamically adjusts the fusion weights accordingly, so that the final set of points to be fitted achieves a balance between real-time measurement and forward prediction, thereby improving the robustness and accuracy of subsequent trajectory fitting.

[0110] In some embodiments, the fitness function of the ant colony algorithm is defined as:

[0111] The first term is the weighted fitting accuracy, the second term is the curvature smoothness penalty, the third term is the tangential continuity penalty at the connection point with the previous trajectory, and λ1 and λ2 are preset weight coefficients.

[0112] In some embodiments, the heuristic function includes a fitting error heuristic term and a deviation consistency heuristic term; the fitting error heuristic term is used to measure the fitting deviation of the candidate solution on the set of points to be fitted, the fitting deviation being measured by the distance between the trajectory point corresponding to the candidate solution and the point to be fitted; the deviation consistency heuristic term is used to measure the spatial proximity between the set of points to be fitted and the set of predicted deviation points, the spatial proximity being measured by the distance between the point to be fitted and the corresponding predicted deviation point; the improved ant colony algorithm guides ants to select candidate solutions according to the heuristic function during the search for optimal polynomial coefficients.

[0113] Specifically, the heuristic function of the improved ant colony algorithm consists of two parts: a fitting error heuristic term and a bias consistency heuristic term. For the i-th dimension coefficient, corresponding to the j-th candidate value of a certain term of the polynomial, the total heuristic information... Defined as the product of two terms: ,in This is a heuristic term for the fitting error. This is the bias consistency heuristic term. This product-form heuristic function ensures that candidate solutions are guided by both fitting accuracy and prior consistency.

[0114] The fitting error heuristic term measures the fitting deviation of the candidate solution on the set of points to be fitted. Let the coefficients of the candidate polynomial carried by the current ant be a, which defines a parameterized continuous trajectory S(η;a), where η∈[0,1] is the normalized arc length parameter. For the j-th point q in the set of points to be fitted... j fused Its corresponding parameter value is η j The corresponding point on the trajectory is S(ηj;a). The fitting bias is measured using Euclidean distance, i.e. .

[0115] The formula for calculating the fitting error heuristic term is:

[0116] This formula guarantees that the smaller the fitting bias, the better. The larger the value, the stronger the heuristic effect; the larger the fitting bias, the stronger the heuristic effect. Approaching 0 weakens the guidance for this candidate solution.

[0117] The bias consistency heuristic measures the spatial proximity between the set of points to be fitted and the estimated bias set. The estimated bias set q j prior The preceding generation represents the expected weld location obtained solely based on thermal deformation prediction. For the same arc length location j, the point to be fitted is q. j fused Deviation point q from the prediction j prior The distance between them reflects the degree to which the fusion result retains prior information. The formula for calculating the bias consistency heuristic is:

[0118]

[0119] Where σ prior The prior bandwidth parameter is initially set to 0.5 mm. This parameter controls the sensitivity of the heuristic function to prior bias: when the distance between the point to be fitted and the predicted bias point is very small, ≈1, indicating strong prior consistency heuristics; as the distance increases, It exhibits exponential decay, and the prior consistency heuristic weakens.

[0120] In each iteration of the improved ant colony algorithm, each ant needs to select a candidate value for each dimension of the polynomial coefficients. The set of candidate values ​​is determined by an adaptive search boundary. When an ant selects the j-th candidate value in the i-th dimension, its state transition probability is determined by the pheromone concentration τ. ij and heuristic function η ij Joint decision:

[0121]

[0122] Where α and β are the relative importance coefficients of the pheromone and heuristic function, respectively, and can be set to α=1, β=2, which is allowed. i Let η be the set of candidate values ​​in the i-th dimension, and let η be the heuristic function. ij The higher the value, the greater the probability that the ant will choose that candidate value.

[0123] In this way, the heuristic function incorporates the predicted set of deviation points as prior information into the ant's search process. In each generation, all ants construct a complete candidate solution, i.e., a set of polynomial coefficients, based on the heuristic function and pheromone concentration. The fitness of this candidate solution is calculated, and then the pheromone is updated. After multiple iterations, for example, when the maximum number of iterations G=15 or the fitness change is less than a threshold for three consecutive generations, the algorithm converges to the optimal polynomial coefficients, thereby generating a continuous trajectory.

[0124] In some embodiments, the search boundary of the improved ant colony algorithm is determined adaptively. Specifically, the initial solution coefficient vector a is obtained using the weighted least squares method, with the weights being the fusion weights of each fusion point. lsq Then for each coefficient a i Define the search boundaries:

[0125]

[0126] in, For the average fusion weight, since w j ∈[0,2], Therefore, when the average fusion weight is high, the search boundary shrinks, accelerating convergence; conversely, the boundary expands, allowing the ant colony to explore more freely.

[0127] In some embodiments, the rolling time-domain mechanism is used to implement segmented execution and iterative updates of continuous trajectories, ensuring smooth connection between adjacent trajectory segments and the system's real-time adaptive capability. Specifically, it includes sub-steps S501-S503.

[0128] Step S501: After each generation of a continuous trajectory, the first part of the continuous trajectory is cut off according to a predetermined ratio as the trajectory for the current welding execution; wherein, the predetermined ratio corresponds to the proportion of the number of points used for execution out of the total number of measured points covered by the current trajectory.

[0129] Each time, a complete continuous trajectory is generated through step S400. This continuous trajectory covers all the points to be fitted in the current window. The number of points to be fitted is denoted as L, which can be set to L=10. The first part of the trajectory is cut off according to a predetermined ratio as the trajectory segment for the current welding execution.

[0130] The predetermined ratio corresponds to the proportion of points used for execution out of the total number of measured points covered by the current trajectory, that is, the ratio of the number of measured points covered by the execution trajectory segment to the total number L.

[0131] In practice, the predetermined ratio can be set to a fixed value, such as 80%, meaning that only the first L layers are covered each time. exec =0.8L measured points, such as L exec =8 corresponds to the trajectory segment. The robot controller receives the discrete points or parameterized curves of the trajectory segment and drives the welding torch to move along the trajectory segment to complete the current welding task.

[0132] Step S502: Save the measured points corresponding to the latter part of the continuous trajectory and merge them with the newly acquired measured points in the next round to form the set of measured points for the next iteration.

[0133] The latter part of the continuous trajectory, i.e., the unexecuted remaining portion, corresponds to the last LL within the window. exec A measured point, for example, LL exec =2, these measured points are saved from the current window and not immediately used for trajectory execution.

[0134] At the start of the next iteration, the saved post-measured points will be combined with the newly acquired L data from the structured light vision sensor. exec The measured points are merged to form a new set of measured points.

[0135] In this way, the number of measured points in the new window is restored to L(LL). exec Gejiu Point + L exec (A new point).

[0136] Step S503: Keep the number of points to be fitted constant in each iteration.

[0137] Since the set of measured points is reconstructed in each round by merging the "save the measured points in the later stage" and the "newly acquired measured points", the number of points to be fitted in each iteration is always kept at the initially set L. This fixed number design facilitates the unification of the input dimension of the dual-channel time series prediction model and the stability of the optimization scale of the ant colony algorithm. Maintaining the number of points to be fitted does not restrict the arc length position of the points in the actual space. In each round, the window slides forward along the weld, realizing continuous coverage of the entire weld.

[0138] The rolling time-domain mechanism ensures that only the first segment of the trajectory is executed in each round, while the corresponding measured points in the latter segment are retained and merged with new points. This results in overlapping areas between trajectory segments generated in adjacent rounds. This overlapping design effectively avoids abrupt changes at trajectory junctions, ensuring the continuity and smoothness of the welding process. Furthermore, because only a short trajectory segment is executed in each round, the system can adjust subsequent trajectories in a timely manner based on the latest acquired sensor data, thereby achieving continuous and adaptive compensation for thermal deformation.

[0139] In some embodiments, after merging the measured points corresponding to the latter part of the continuous trajectory with the newly acquired measured points, a closed-loop feedback step is further included. This step is performed after merging the measured points corresponding to the latter part of the continuous trajectory with the newly acquired measured points, and is used to optimize the prediction model online and dynamically adjust the prior confidence level based on the actual welding effect. Specifically, it can be divided into steps S601-S603.

[0140] Step S601: Calculate the comprehensive quality score based on the trajectory segment of each welding operation. The comprehensive quality score includes at least a geometric accuracy score and a thermal deformation compensation effect score.

[0141] After each welding operation completes the current trajectory segment, a comprehensive quality score is calculated based on the actual data collected during the process. This comprehensive quality score includes at least a geometric accuracy score and a thermal deformation compensation effect score, and may further include a curvature continuity score and a dynamic feasibility score. This embodiment provides a complete calculation method for the four scores:

[0142] (1) Geometric accuracy score Q geo Geometric accuracy scoring measures the degree of agreement between the generated trajectory and the actual weld location. Let the currently executed trajectory segment cover the previous L... exec 100 measured points, with L exec Taking η = 8 as an example, the corresponding parameter η on the trajectory j The point at is S(η) j The measured point is q. j meas The geometric accuracy score is defined as follows:

[0143]

[0144] The higher the score, the closer the trajectory is to the measured point; the value ranges from 0 to 1.

[0145] (2) Curvature continuity score Q curv The curvature continuity score measures the smoothness of the third derivative of a trajectory, reflecting its dynamic quality. The calculation formula is:

[0146]

[0147] in Let be the third derivative of the trajectory. The smaller the integral value, the closer the score is to 1, indicating that the curvature of the trajectory changes gently.

[0148] (3) Dynamic feasibility score Q dyn The dynamic feasibility score is used to determine whether the velocities and accelerations of each joint in the robot's inverse kinematics solution exceed the allowable range. If the velocities and accelerations of all joints are within the limits, then Q... dyn =1; if any joint exceeds the limit, then Q dyn =0.5. This score ensures that the generated trajectory is within the robot's actual motion capabilities.

[0149] (4) Score for thermal deformation compensation effect Q comp The thermal deformation compensation effect score is used to measure the deviation between the predicted deviation point and the actual measured point, reflecting the effectiveness of the prediction model in pre-compensating for thermal deformation. The calculation formula is:

[0150]

[0151] The higher the score, the closer the predicted deviation point is to the actual measurement point, and the more accurate the thermal deformation estimation of the prediction model is.

[0152] The final overall quality score, Qscore, is the product of the four scores mentioned above:

[0153] Q score The value range is [0,1], and the closer it is to 1, the better the welding effect.

[0154] Step S602: Use the comprehensive quality score as a feedback signal to fine-tune the dual-channel temporal prediction model online; wherein, the online fine-tuning only updates the last part of the network layer of the Transformer encoder, keeping the parameters of the geometric convolution channel and the thermal convolution channel unchanged.

[0155] The calculated comprehensive quality score is used as a feedback signal to fine-tune the dual-channel time series prediction model online.

[0156] Specifically, after accumulating a predetermined number of trajectory segments, mini-batch gradient descent is performed using a stored historical window sequence and its corresponding comprehensive quality score as a reward or loss weight. During fine-tuning, all parameters of the geometric convolutional and hot convolutional channels remain unchanged; only the parameters of the last part of the Transformer encoder network layers, such as the last layer and the output layer, are updated. The learning rate is set to a small value, such as 0.0001, to prevent catastrophic forgetting.

[0157] Through this online fine-tuning mechanism, the prediction model can continuously adapt to the thermal deformation characteristics of specific workpieces based on the actual welding performance, and gradually improve the prediction accuracy of the normal correction ratio.

[0158] Step S603: Dynamically adjust the prior bandwidth parameter in the deviation consistency heuristic based on the overall quality score; increase the prior bandwidth parameter when the overall quality score is lower than the preset threshold, and decrease the prior bandwidth parameter when the overall quality score is higher than the preset threshold and stable.

[0159] The prior bandwidth parameter σ in the deviation consistency heuristic is dynamically adjusted based on the comprehensive quality score. prior This parameter controls the degree of trust in the predicted deviation point set in the ant colony algorithm's heuristic function. The adjustment strategy is as follows:

[0160] If the overall quality score of M consecutive trajectory segments is lower than the preset lower threshold (e.g., Qscore < 0.7, M = 5), it indicates that the current prediction model is ineffective and the reliability of the predicted deviation points is low. In this case, σ should be increased. prior To a larger value, such as 1.0 mm, make the deviation consistency heuristic term. The slower decay of distance reduces the influence of prior information on ant colony search, making the algorithm more reliant on fitting of actual data.

[0161] If the overall quality scores of M consecutive trajectory segments are all above the preset upper limit threshold and remain stable (e.g., Qscore > 0.9 with no significant fluctuations), it indicates that the current prediction model has high accuracy and the predicted deviation points are reliable. In this case, σ should be reduced. prior To a smaller value, such as 0.3 mm, the deviation consistency heuristic term becomes more sensitive to deviations, enhancing the guiding role of prior information and accelerating the convergence of the ant colony towards a direction consistent with thermal deformation prediction.

[0162] If the overall quality score is between the upper and lower limits, then maintain σ. prior Either remain unchanged or adjust gradually according to a smoothing strategy.

[0163] After completing the online fine-tuning and prior bandwidth parameter adjustment, the system enters the next iteration. The newly acquired measured points are merged with the measured points corresponding to the saved subsequent trajectory to form a new set of measured points, and steps S100 to S500 are repeated. In each loop, the state of the prediction model and the prior bandwidth parameters are updated based on the execution effect of the previous round, thereby achieving full closed-loop adaptive compensation.

[0164] The welding thermal deformation compensation system based on dual-channel time-series prediction and ant colony algorithm of the present invention is used to implement the above-mentioned welding thermal deformation compensation method based on dual-channel time-series prediction and ant colony algorithm. The system includes a data acquisition module, a normal correction ratio prediction module, a pre-compensation and fusion module, a global trajectory fitting module, and a rolling execution and iteration module.

[0165] The data acquisition module is used to acquire the geometric and thermal sequences of the weld seam using a structured light vision sensor and a thermal imager, respectively.

[0166] The normal correction ratio prediction module is used to construct a dual-channel time series prediction model. The geometric sequence and thermal sequence are input into the dual-channel time series prediction model, and the dual-channel time series prediction model outputs the normal correction ratio corresponding to each measured point in the measured point set.

[0167] The pre-compensation and fusion module is used to perform thermal deformation pre-compensation on the preset reference trajectory according to the normal correction ratio, generate a set of estimated deviation points, and perform weighted fusion of the set of estimated deviation points with the measured point set to obtain the set of points to be fitted.

[0168] The global trajectory fitting module is used to construct an improved ant colony algorithm. It takes the set of points to be fitted as the optimization objective, incorporates the estimated deviation set as prior information into the heuristic function of the improved ant colony algorithm, searches for the optimal polynomial coefficients, and generates a parameterized continuous trajectory.

[0169] The rolling execution and iteration module is used to adopt a rolling time domain mechanism. After each continuous trajectory is generated, the first part of the continuous trajectory is cut off according to a preset ratio as the trajectory for the current welding execution. The measured points corresponding to the second part of the continuous trajectory are merged with the newly acquired measured points for the construction of the set of points to be fitted in the next iteration.

[0170] The electronic device of the present invention includes a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the above-described welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm.

[0171] The present invention provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm.

[0172] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0173] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0174] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.

[0175] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0176] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0177] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0178] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A welding thermal deformation compensation method based on dual-channel time-series prediction and ant colony algorithm, characterized in that, Includes the following steps: The geometric sequence and thermal sequence of the weld are obtained by a structured light vision sensor and a thermal imager, respectively. The geometric sequence is constructed from the set of measured points collected by the structured light vision sensor. A dual-channel time series prediction model is constructed. The geometric sequence and thermal sequence are input into the dual-channel time series prediction model, and the normal correction ratio corresponding to each measured point in the measured point set is output by the dual-channel time series prediction model. Based on the normal correction ratio, thermal deformation pre-compensation is performed on the preset reference trajectory to generate a set of predicted deviation points. The set of predicted deviation points is then weighted and fused with the set of measured points to obtain the set of points to be fitted. An improved ant colony algorithm is constructed, with the set of points to be fitted as the optimization objective. The predicted deviation set of points is used as prior information and incorporated into the heuristic function of the improved ant colony algorithm. The optimal polynomial coefficients are searched to generate a parameterized continuous trajectory. A rolling time-domain mechanism is adopted. After each continuous trajectory is generated, the first part of the continuous trajectory is cut off according to a preset ratio as the trajectory for the current welding execution. The measured points corresponding to the second part of the continuous trajectory are merged with the newly acquired measured points for the construction of the set of points to be fitted in the next iteration.

2. The welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in claim 1, characterized in that, The process of acquiring the geometric and thermal sequences of the weld seam using a structured light vision sensor and a thermal imager, respectively, specifically includes: The three-dimensional coordinates of the weld center are acquired in real time by a three-line laser structured light vision unit, and a geometric sequence is constructed using the three-dimensional coordinates of the most recent predetermined number of historical moments. The thermal field parameters of the weld are acquired in real time using a high-speed thermal imager, and the thermal sequence is constructed using the thermal field parameters at the same historical moment. The thermal field parameters include the highest temperature of the molten pool, the average temperature of the heat-affected zone, the temperature gradient along the weld direction, and thermal cycle characteristic parameters; wherein, the thermal cycle characteristic parameters are the time difference between the arrival time of a fixed point on the weld from the molten pool and the time when it cools to the preset temperature.

3. The welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in claim 1, characterized in that, The construction of the dual-channel time series prediction model specifically includes: A geometric convolution channel is set up, which sequentially passes through a one-dimensional dilated convolutional layer, a batch normalization layer, an activation function layer, and a channel attention module to extract the temporal features of the geometric sequence and output the geometric features. A thermal convolution channel is set up, which extracts the temporal features of the thermal sequence through the same structure as the geometric convolution channel and outputs the thermal features; Geometric features and thermal features are concatenated along the channel dimension to generate a fused feature; The fused features are input into the Transformer encoder for global temporal modeling to generate encoded features; The encoded features are mapped to normal correction ratios through a fully connected layer and a Sigmoid activation function.

4. The welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in claim 1, characterized in that, The weighted fusion of the predicted deviation point set and the measured point set specifically includes: Calculate the first confidence level for each measured point. The first confidence level is determined based on the consistency of multiple candidate points during the acquisition by the structured light vision sensor. Calculate the second confidence level for each predicted deviation point, which is determined based on the prediction variance of the normal correction ratio by the dual-channel time series prediction model; Based on the first confidence level and the second confidence level, a weighted average is calculated on the corresponding measured points and predicted deviation points to obtain the fusion point, and the sum of the first confidence level and the second confidence level is used as the fusion weight of the fusion point.

5. The welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in claim 1, characterized in that, The heuristic function includes a fitting error heuristic term and a deviation consistency heuristic term; the fitting error heuristic term is used to measure the fitting deviation of the candidate solution on the set of points to be fitted, and the fitting deviation is measured by the distance between the trajectory points corresponding to the candidate solution and the points to be fitted. The deviation consistency heuristic is used to measure the spatial proximity between the set of points to be fitted and the set of predicted deviation points, and the spatial proximity is measured by the distance between the points to be fitted and the corresponding predicted deviation points. The improved ant colony algorithm guides ants to select candidate solutions based on a heuristic function during the search for optimal polynomial coefficients.

6. The welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in claim 1, characterized in that, The rolling time-domain mechanism specifically includes: After each continuous trajectory is generated, the first part of the continuous trajectory is cut off according to a predetermined ratio as the trajectory for the current welding execution; wherein, the predetermined ratio corresponds to the proportion of the total number of measured points covered by the current trajectory used for execution. The measured points corresponding to the latter part of the continuous trajectory are saved and merged with the newly acquired measured points in the next round to form the set of measured points for the next iteration. The number of points to be fitted remains constant in each iteration.

7. The welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in claim 3, characterized in that, After merging the measured points corresponding to the latter part of the continuous trajectory with the newly acquired measured points, the method further includes: A comprehensive quality score is calculated based on the trajectory segment of each welding operation. The comprehensive quality score includes at least a geometric accuracy score and a thermal deformation compensation effect score. The overall quality score is used as a feedback signal to fine-tune the dual-channel temporal prediction model online. The online fine-tuning only updates the last part of the network layer of the Transformer encoder, keeping the parameters of the geometric convolution channel and the thermal convolution channel unchanged. The prior bandwidth parameter in the deviation consistency heuristic is dynamically adjusted based on the overall quality score; the prior bandwidth parameter is increased when the overall quality score is lower than the preset threshold, and decreased when the overall quality score is higher than the preset threshold and stable.

8. A welding thermal deformation compensation system based on dual-channel time-series prediction and ant colony algorithm, characterized in that, The system is used to implement the welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in any one of claims 1-7, the system comprising: The data acquisition module is used to acquire the geometric sequence and thermal sequence of the weld seam through a structured light vision sensor and a thermal imager, respectively. The normal correction ratio prediction module is used to construct a dual-channel time series prediction model. The geometric sequence and thermal sequence are input into the dual-channel time series prediction model, and the dual-channel time series prediction model outputs the normal correction ratio corresponding to each measured point in the measured point set. The pre-compensation and fusion module is used to perform thermal deformation pre-compensation on the preset reference trajectory according to the normal correction ratio, generate a set of estimated deviation points, and perform weighted fusion of the set of estimated deviation points with the measured point set to obtain the set of points to be fitted. The global trajectory fitting module is used to construct an improved ant colony algorithm. It takes the set of points to be fitted as the optimization target, incorporates the estimated deviation point set as prior information into the heuristic function of the improved ant colony algorithm, searches for the optimal polynomial coefficients, and generates a parameterized continuous trajectory. The rolling execution and iteration module is used to adopt a rolling time domain mechanism. After each continuous trajectory is generated, the first part of the continuous trajectory is cut off according to a preset ratio as the trajectory for the current welding execution. The measured points corresponding to the second part of the continuous trajectory are merged with the newly acquired measured points for the construction of the set of points to be fitted in the next iteration.

9. An electronic device, characterized in that, It includes a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the welding thermal deformation compensation method based on dual-channel timing prediction and ant colony algorithm as described in any one of claims 1-7.