焊接机器人焊缝跟踪方法及路径规划研究

曹学鹏 脱帅华 张弓 吴月玉 张雨航 樊豪 赵睿英 冯艳丽

曹学鹏, 脱帅华, 张弓, 等. 焊接机器人焊缝跟踪方法及路径规划研究 [J]. 工程科学与技术, 2022, 54(2): 196-204. doi: 10.15961/j.jsuese.202100567
引用本文: 曹学鹏, 脱帅华, 张弓, 等. 焊接机器人焊缝跟踪方法及路径规划研究 [J]. 工程科学与技术, 2022, 54(2): 196-204. doi: 10.15961/j.jsuese.202100567
CAO Xuepeng, TUO Shuaihua, ZHANG Gong, et al. Research on Welding Seam Tracking Method and Path Planning of Welding Robot [J]. Advanced Engineering Sciences, 2022, 54(2): 196-204. doi: 10.15961/j.jsuese.202100567
Citation: CAO Xuepeng, TUO Shuaihua, ZHANG Gong, et al. Research on Welding Seam Tracking Method and Path Planning of Welding Robot [J]. Advanced Engineering Sciences, 2022, 54(2): 196-204. doi: 10.15961/j.jsuese.202100567

焊接机器人焊缝跟踪方法及路径规划研究

基金项目: 国家自然科学基金项目(62073092);陕西省重点研发计划项目(2021ZDLGY09−02);广东省自然科学基金项目(2021A1515012638);广州市基础研究计划项目(2020020303320)
详细信息
    • 收稿日期:  2021-06-17
    • 网络出版时间:  2021-11-05 10:13:43
  • 作者简介:

    曹学鹏(1982—),男,副教授,博士. 研究方向:机电控制系统及工业机器人应用. E-mail:tiepeng2001@chd.edu.cn

    通信作者:

    张弓, E-mail: gong.zhang@giat.ac.cn

  • 中图分类号: TP242.2

Research on Welding Seam Tracking Method and Path Planning of Welding Robot

  • 摘要: 焊缝自主跟踪是机器人焊接智能化的关键,其精度是评价焊接质量的重要指标。焊接对象或条件的改变对精度的影响最为直接,尤其当焊件表面存在缺陷时会产生较大的跟踪误差。为此,开展焊接机器人焊缝跟踪方法及路径规划研究,提出焊缝跟踪的4步法:1)利用激光传感器扫描坡口,获取轮廓数据。2)接着通过组合滤波算法,运用限幅滤波和高斯滤波处理数据以平滑噪声。3)采用导数法初步定位特征点,通过寻找第1阶和第2导数极值点以定位第1类和第2类特征点;以初步定位获得的特征点为分界点,分段拟合坡口轮廓数据,计算各拟合线段的交点进而得到精确定位的特征点。4)通过传感器位姿标定,确定其相对末端坐标系的位置,借助转换矩阵将传感器检测到的焊缝特征点转化到基座标系下,得到机器人的空间定位点;运用3次样条插值法生成焊枪末端轨迹,并驱动机器人按照预定轨迹运行,进而实现焊缝的有效跟踪。通过实验验证直线与曲线焊缝的跟踪效果,结果表明:初步定位时,跟踪误差约为0.628 mm、0.736 mm,经精确定位后,误差降为0.387 mm、0.429 mm,提升幅度分别超过38.4%、41.7%;且焊枪的抖动现象得到减弱,达到自动焊接误差≤0.5 mm的精度要求,表明了文中所提出跟踪方法的有效性,可为焊缝的高精度跟踪和自动焊接研究提供有益参考。

     

    Abstract: Autonomous tracking of weld seams is a key technology to robot welding intelligence, and its accuracy is an important indicator for evaluating welding quality. Changes in welding objects or conditions have the most direct impact on accuracy, especially when there are defects on the surfaces of the weldment, which will cause a large tracking error. This paper proposes a four-step method for welding seam tracking, which uses laser sensor to obtain contour data; the combined filtering algorithm which contains the limit filter and Gaussian filter is used to smooth the noise; the derivative method is used to initially locate the feature points, and by finding extreme points of the first derivative to locate the first type of feature points, and the second type feature points are located by finding the maximum points of the second derivative; the feature points obtained from the preliminary positioning is used as the dividing points, the groove contour data is fitted segmentally, the intersection points of the fitted lines accurately locates the feature points; through sensor calibration, the position of the sensor relative to the end coordinate system is obtained, and the feature points obtained by the sensor are transformed into the base frame with the help of the transformation matrix, then the positioning points of the robot are obtained; use the cubic spline interpolation method to generate the trajectory of the end of the welding torch, and drive the robot to run according to the predetermined trajectory to realize the tracking of the welding seam. Experiments have been conducted to verify the tracking effect of straight and curved welds. The results show that the tracking errors are approximately 0.628 mm and 0.736 mm during the initial positioning. After precise positioning, the errors are reduced to 0.387 mm and 0.429 mm, and the increase rate exceeds 38.4% and 41.7% respectively. In addition, the jitter phenomenon of the welding gun is reduced, and the accuracy requirement of automatic welding error ≤0.5 mm is reached, which shows an effectiveness of the tracking method proposed in the article and can provide reference for the research of high-precision tracking and automatic welding.

     

  • 焊接机器人因其高效性在先进制造业中应用广泛,焊缝跟踪技术具有非接触、速度快、精度高等优点,是实现焊接自动化与智能化的关键[1-2]。目前,大多数焊接机器人仍采用“示教–再现”的工作方式,难以满足焊接对象或其他条件改变时的要求[3]

    基于激光视觉的焊缝跟踪结合了激光测量与计算机视觉技术,具有获取信息丰富、焊缝特征明显、抗干扰能力强等优点[4-5],适用于实时跟踪系统。邹焱飚等[6]通过设计传感器的机械结构,推导出由激光特征点像素坐标转换到焊缝特征点3维坐标的数学模型;Chen等[7]提出一种只需两次轮廓扫描的特征点定位方法,可有效计算出焊缝的初始位置;Chang[8]和Lei[9]等对焊缝轮廓数据进行滤波、求导及卷积处理后,通过寻找局部最值来定位特征点;Wang[10]和He[11]等分别提出基于NURBS−Snake与视觉注意模型的焊缝轮廓检测与特征点提取算法,并验证了其有效性;Hou等[12]将传统图像处理方法与扩展Kalman滤波算法相结合提取焊缝特征点。以上方法可实现对目标焊件特征点的提取,但在定位精度上会因焊缝类型改变或焊件表面缺陷等因素而存在一定局限性。

    作者提出焊缝跟踪的4步法:首先,利用激光传感器扫描焊件坡口采集轮廓数据;接着,通过组合滤波算法处理数据以平滑噪声;然后,在2阶导数法初步定位特征点的基础上,通过线性拟合对特征点精确定位;最后,根据传感器位姿标定的结果,由图像特征点的2维坐标计算出机器人基坐标系下的3维坐标,完成路径规划,并针对Y型坡口的直线与曲线焊缝进行跟踪方法的实验验证。

    焊缝跟踪系统主要由焊接机器人及其控制器、激光传感器、工控机等组成,如图1所示。该系统通过焊件扫描、数据滤波、特征点定位与焊接路径规划等4步实现焊缝跟踪。

    图  1  焊缝跟踪系统
    Fig.  1  Seam tracking system
    下载: 全尺寸图片

    激光传感器搭载于机器人末端,通过扫描焊件采集焊缝坡口的轮廓信息。将获取的信息传输给工控机进行滤波以平滑噪声,将2阶导数法与线性拟合相结合来定位焊缝特征点的坐标。通过标定传感器将特征点转换到焊枪坐标系下,转换机器人的运行轨迹,以位姿信号的形式发送给机器人控制柜。控制柜通过驱动机器人移动来引导焊枪运动,实现焊缝的实时跟踪。焊缝跟踪4步法的工作流程如图2所示。

    图  2  焊缝跟踪4步法的工作流程
    Fig.  2  Process of four-step seam tracking method
    下载: 全尺寸图片

    扫描的目的是获取焊件坡口轮廓的原始数据,这是实现焊缝跟踪的基础[13]。激光传感器基于三角测量原理获得被测物的距离信息,通过处理扫描数据即可得到被测物的轮廓特征。

    扫描时,激光传感器固定于机器人末端并与焊枪平行,以保证线激光垂直入射被测物[5],最大程度地覆盖坡口,同时不断移动机器人,获得焊缝的整体形貌特征。

    采用限幅滤波与高斯滤波相结合的方式处理所得的坡口轮廓数据,前者用于去除因偶然因素引起的脉冲干扰,后者用于平滑数据[14]。限幅滤波通过比较相邻两次采样值之差的绝对值与阈值的大小来筛选数据,其原理如式(1)所示[15]

    $$ y=\left\{ {\begin{array}{*{20}{c}} {{y_n},\left| {{y_n} - {y_{n - 1}}} \right| \le \Delta T}; \\ {{y_{n - 1}},\left| {{y_n} - {y_{n - 1}}} \right| > \Delta T} \end{array}} \right. $$ (1)

    式中,ynyn-1分别为本次与上次采样信号值, $\Delta T$ 为指定阈值。

    高斯滤波是一类根据高斯函数的形状来选择权值的线性平滑滤波方式,对于抑制服从正态分布的噪声非常有效[16],且高斯函数具有对称、可微和可积的良好性质,能够准确识别信号的间断点,这对于后续的特征点提取十分有利,1维高斯函数的表达式如下[17]

    $$ f(x)=\frac{1}{{\sigma \sqrt {2\text{π} } }}\mathop {\text{e}}\nolimits^{ - \frac{{{{(x - \mu )}^2}}}{{2{\sigma ^2}}}} $$ (2)

    式中:μ为均值,决定函数的位置;σ为标准差,决定分布的幅度。

    为了检验限幅滤波与高斯滤波对坡口轮廓数据滤波的适应性和有效性,对Ⅰ型坡口剖面的数据求1阶导数并进行限幅滤波,如图3所示。

    图  3  对Ⅰ型坡口剖面数据1阶导数的限幅滤波
    Fig.  3  Limiting filtering of the first derivative of Ⅰ-type groove profile data
    下载: 全尺寸图片

    图3(a)可以看出,在1阶导数极值点附近,数据点比较稀疏,而且原始数据中存在干扰点。由图3(b)可见:限幅滤波后,原始数据中的干扰点得到有效去除;同时,数据的分布更加均匀。对Ⅰ型坡口的剖面数据进行高斯滤波,结果如图4所示。

    图  4  对Ⅰ型坡口剖面数据的高斯滤波
    Fig.  4  Gaussian filtering of profile data of Ⅰ-type groove
    下载: 全尺寸图片

    图4(a)中,两个相邻的幅度突变点间数据点较少,不利于后续的差分运算。由图4(b)可知,经高斯滤波后,原始数据的各个部分都获得了很好的平滑效果。

    1.2.1   特征点定义

    焊件的特征点一般是坡口截面的角点,其包含的信息能反映坡口轮廓的整体情况[18],故需进行特征点提取。表1展示了连续函数在间断点处的性质,是坡口特征点定义的依据。

    表  1  函数间断点分类及其性质
    Table  1  Classification and properties of function discontinuities
    间断点类别 函数在间断点处的性质
    函数值 1阶导数 2阶导数
    第1类 连续 阶跃突变 极值
    第2类 阶跃突变 极值 不存在

    根据2阶导数存在与否将特征点分为两类:2阶导数存在的特征点称为第1类特征点,否则称为第2类特征点。图5描述了坡口特征点的分类,图5中,ABEF为第1类特征点,CD为第2类特征点。

    图  5  坡口特征点的分类
    Fig.  5  Classification of groove feature points
    下载: 全尺寸图片

    因大多数坡口的截面一般为规则的几何图形,特征点多为第1类与第2类的组合,故可基于前述定义来确定坡口所包含的特征点类型,进而对其定位。

    1.2.2   特征点定位

    因Y型坡口同时包含第1、第2类特征点,具有代表性,故以此为例阐述特征点定位方法,其流程如图6所示。

    图  6  特征点的定位流程
    Fig.  6  Positioning process of feature points
    下载: 全尺寸图片

    1)初步定位

    先对原始数据进行限幅滤波,而后对其向前差分求1阶导数并寻找极值点,再通过高斯滤波平滑数据,确定第1类特征点。

    2)精确定位

    因机械加工使焊件表面存在缺陷,初步定位得到的特征点不准确。图7为焊件表面缺陷示意图,从图7中可以看出,左边坡口存在一处缺陷,经初步定位得到特征点为bc两点,而真实的点为a点。显然两者间存在一定偏差,因此,需在初步定位的基础上,采用符合坡口特点的方法进行精确定位。

    图  7  焊件表面缺陷示意图
    Fig.  7  Defects on the surface of the weldment
    下载: 全尺寸图片

    分析焊件坡口形状知,其截面轮廓由多条线段组成,特征点为各线段的交点。缺陷部分在整个坡口表面占比较小,即传感器采集的轮廓数据中,大部分是直线段数据,少量为缺陷部分的数据,这一特点符合线性拟合的条件。

    因此,以初步定位所得的特征点为分界点,将坡口轮廓的数据分段并对每段分别进行线性拟合,求得各拟合直线的交点来精确定位特征点。

    设任一待拟合的直线方程为y=ax+b,拟合方程参数的计算如式(3)所示[19]

    $$ \left[ {\begin{array}{*{20}{c}} {{a}} \\ {{b}} \end{array}} \right]={\left[ {\begin{array}{*{20}{c}} {\displaystyle\sum\limits_{i=1}^n {x_i^2} }&{\displaystyle\sum\limits_{i=1}^n {{x_i}} } \\ {\displaystyle\sum\limits_{i=1}^n {{x_i}} }&n \end{array}} \right]^{ - 1}} \cdot \left[ {\begin{array}{*{20}{c}} {\displaystyle\sum\limits_{i=1}^n {{x_i}{y_i}} } \\ {\displaystyle\sum\limits_{i=1}^n {{y_i}} } \end{array}} \right] $$ (3)

    式中,a为斜率,b为截距,(xiyi)为经过该直线的点,n为点的个数。

    在定位出坡口的特征点后,将所得数据转换到焊枪坐标系下,为焊缝跟踪的实现奠定基础。

    1.3.1   标定激光传感器

    机器人各坐标系间的关系如图8所示,通过传感器的位姿标定将其测量所得特征点转换至基坐标系下[20]

    图  8  各坐标系间的关系
    Fig.  8  Relationships between the coordinate systems
    下载: 全尺寸图片

    本文采用多点法进行传感器位姿标定,如图9所示。

    图  9  传感器的标定
    Fig.  9  Calibration of sensors
    下载: 全尺寸图片

    图9中,{S}为传感器坐标系,{B}为基坐标系,BP是点P在基坐标系下的坐标值,SP是点P在传感器坐标系下的坐标值。传感器位姿标定的目的,是确定传感器坐标系{S}相对于末端坐标系{E}的变换矩阵 $ {}_{{S}}^{{E}}{\boldsymbol{T}} $ [21] ${}_{{S}}^{{E}}{\boldsymbol{T}} $ 的计算步骤如下:

    1)选取焊件上某点P,使焊枪末端触碰该点,记录P在{B}下的位置BP=(xByB $ {\textit{z}}_B$ ,1)T,如图9(a)所示。

    2)移动机器人,使传感器的激光线经过该点,记录P在{S}下的位置SP=(xS,0 $ {\textit{z}}_S$ ,1)T,如图9(b)所示。

    3)切换机器人当前的工具坐标系为{E},记录此时{E}的位姿数据,由欧拉旋转公式求得旋转矩阵 ${}_{{E}}^{{B}}{\boldsymbol{R}}$ ,如式(4)[22]所示:

    $$\begin{aligned}[b] {}_{{E}}^{{B}}{\boldsymbol{R}}=&\left[ {\begin{array}{*{20}{c}} {\cos\; \alpha }&{ - \sin\; \alpha }&0 \\ {\sin\; \alpha }&{\cos\; \alpha }&0 \\ 0&0&1 \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {\cos\; \beta }&0&{\sin\; \beta } \\ 0&1&0 \\ { - \sin\; \beta }&0&{\cos\; \beta } \end{array}} \right].\\ &\left[ {\begin{array}{*{20}{c}} 1&0&0 \\ 0&{\cos\; \gamma }&{ - \sin\; \gamma } \\ 0&{\sin\; \gamma }&{\cos\; \gamma } \end{array}} \right]=\left[ {\begin{array}{*{20}{c}} {{r_{11}}}&{{r_{12}}}&{{r_{13}}} \\ {{r_{21}}}&{{r_{22}}}&{{r_{23}}} \\ {{r_{31}}}&{{r_{32}}}&{{r_{33}}} \end{array}} \right] \end{aligned}$$ (4)

    式中: ${}_{{E}}^{{B}}{\boldsymbol{R}} $ 为旋转矩阵,用以描述{E}相对于{B}的方位;r ${}_{{E}}^{{B}}{\boldsymbol{R}} $ 的元素,αβγ分别为机器人末端坐标系{E}的XY $ {\textit{Z}}$ 轴转动的角度。

    进一步求得 ${}_{{E}}^{{B}}{\boldsymbol{T}}$ ,如式(5)所示:

    $$ {}_{{E}}^{{B}}{\boldsymbol{T}}=\left[ {\begin{array}{*{20}{c}} {{}_{{E}}^{{B}}{\boldsymbol{R}}}&{{}^{{E}}{\boldsymbol{P}}} \\ {\begin{array}{*{20}{c}} 0&0&0 \end{array}}&1 \end{array}} \right] $$ (5)

    式中,EP=(xEyE $ {\textit{z}}_E$ )T,即切换坐标系后的P点在{E}下的位置。

    4)根据P点在空间中的变换关系有:

    $$ {}^{{B}}{\boldsymbol{P}}={}_{{E}}^{{B}}{\boldsymbol{T}}{}_{{S}}^{{E}}{\boldsymbol{T}}{}^{{S}}{\boldsymbol{P}} $$ (6)

    式中,各参数的定义与上文所述一致。

    ${}_{{S}}^{{E}}{\boldsymbol{T}}$ 包含12个未知数,需选取最少3个不同的固定点进行求解,本文的标定结果如下:

    $$ {}_{{S}}^{{E}}{\boldsymbol{T}}=\left[ {\begin{array}{*{20}{c}} {0.998}&{ - 0.423}&{ - 0.590}&{75.098} \\ { - 0.014}&{0.278}&{ - 0.026}&{6.693} \\ {0.002}&{0.865}&{ - 0.814}&{303.131} \\ 0&0&0&1 \end{array}} \right] $$ (7)

    至此,完成传感器的位姿标定,对于其坐标系下的任一已知点 ${}^{{S}}{\boldsymbol{Q}} $ ,将其变换到机器人基坐标系下的公式为:

    $$ {}^{{B}}{\boldsymbol{Q}}={}_{{E}}^{{B}}{\boldsymbol{T}}{}_{{S}}^{{E}}{\boldsymbol{T}}{}^{{S}}{\boldsymbol{Q}} $$ (8)

    式中, ${}^{{B}}{\boldsymbol{Q}} $ ${}^{{S}}{\boldsymbol{Q}} $ 为点Q在{B}与{S}的位置坐标, ${}_{{S}}^{{E}}{\boldsymbol{T}}$ 为式(7)的计算结果, ${}_{{E}}^{{B}}{\boldsymbol{T}}$ 为式(5)的计算结果。

    1.3.2   确定焊接路径中间点

    焊接路径规划的实质是确定焊枪中心点TCP在运动中的一系列中间位置。因此,需根据特征点坐标确定焊枪中心点的位置。

    记TCP坐标为 $ {}^{{S}}{{\boldsymbol{P}}_{{\bf{TCP}}}}={\left[ {{x_{{\rm{TCP}}}},0,{{\textit{z}}_{{\rm{TCP}}}},1} \right]^{\rm{T}}} $ ,以Y型坡口为例建立焊枪中心点的数学模型,如图10所示。图10中,AF各点为Y型坡口的特征点,TCP代表焊枪的中心点,横纵坐标分别为激光传感器坐标系的X $ {\textit{Z}}$ 轴。

    图  10  焊枪中心点坐标的数学模型
    Fig.  10  Mathematical model of welding torch center point coordinate
    下载: 全尺寸图片

    图10可知,坡口的钝边h可表示为, ${{\textit{z}}_C} - {{\textit{z}}_B}$ ${{\textit{z}}_D} - $ $ {{\textit{z}}_E}$ ,取其均值得:

    $$ h=\frac{{\left( {{{\textit{z}}_C} - {{\textit{z}}_B}} \right)+\left( {{{\textit{z}}_D} - {{\textit{z}}_E}} \right)}}{2} $$ (9)

    偏移量f为从焊丝到焊接对象的间距,具体取值参照《焊接工程师手册》[23],根据Y型坡口尺寸,取f=1.5 mm。经上述分析,可得焊枪中心点坐标的计算公式为:

    $$ \left\{ \begin{array}{l} {x_{{\rm{TCP}}}}=\dfrac{{{x_A}+{x_B}+{x_E}+{x_F}}}{4}, \\ {{\textit{z}}_{{\rm{TCP}}}}=\dfrac{{\left( {{{\textit{z}}_C}+{{\textit{z}}_D}} \right)}}{2} - h - f \end{array} \right. $$ (10)

    式中,xAxBxExF分别为ABEF 4点的横坐标,h为钝边,f为偏移量。

    将定位所得某一剖面的特征点坐标代入式(10)中,可得该剖面的焊枪中心点坐标。

    传感器扫描焊件获得多组剖面数据,进行上述处理后得到多个TCP坐标。通过传感器与焊枪的标定矩阵,将TCP坐标由{S}转换至{T}下并依次连接,得到一系列焊接路径中间点的坐标,即构成焊枪的运动轨迹。

    由焊枪中心点坐标计算焊接路径中间点坐标的公式为:

    $$ {}^{{T}}{{\boldsymbol{P}}_{\rm{TCP}}}{\boldsymbol=}{}_{{E}}^{{T}}{\boldsymbol{T}}{}_{{S}}^{{E}}{\boldsymbol{T}}{}^{{S}}{{\boldsymbol{P}}_{\rm{TCP}}} $$ (11)

    式中, ${}^{{S}}{{\boldsymbol{P}}_{\rm{TCP}}}$ 为焊枪中心点在传感器坐标系{S}下的坐标, $ {}_{{S}}^{{E}}{\boldsymbol{T}} $ 为激光传感器的位姿标定矩阵, $ {}_{{E}}^{{T}}{\boldsymbol{T}} $ 为焊枪位姿标定矩阵 $ {}_{{E}}^{{T}}{\boldsymbol{T}} $ 的逆矩阵。

    选取两种典型焊缝为研究对象,焊件材质分别为Q235与铝,其实物与坡口参数分别如图11表2所示。

    图  11  两种典型焊缝
    Fig.  11  Two typical grooves
    下载: 全尺寸图片
    表  2  焊件坡口参数
    Table  2  Groove parameters of weldment
    坡口参数 尺寸/mm 厚度/mm 坡口角/(°) 间隙/mm 钝边/mm
    直线焊缝 100×60 8 45 3 2.0
    曲线焊缝 130×80 10 60 3 2.5

    实验系统主要由IRB 1410焊接机器人、IRC5控制器、LS–100CN激光传感器和工控机组成,如图12所示。系统基于前文所述的焊缝跟踪4步法,经扫描、滤波、特征点提取与路径规划,引导焊枪移动。

    图  12  焊缝跟踪实验系统
    1.送丝机;2.焊接机器人;3.保护气瓶;4.示教器;5.控制柜;6.焊枪;7.激光传感器;8.焊件夹具;9.焊接工作台;10.工控机;11.弧焊电源。
    Fig.  12  Experiment system of welding seam tracking
    下载: 全尺寸图片

    初步定位结果如图13所示,横、纵坐标分别代表特征点在传感器坐标系的X $ {\textit{Z}}$ 轴上的取值。

    图  13  特征点初定位
    Fig.  13  Rough location of feature points
    下载: 全尺寸图片

    图13可知,1阶导数的最值点落在线段BCDE间,未能与BE准确对应,这是由于焊件坡口经加工后,其钝边并非理想状态的竖直线,而是一条斜线。可对1阶导数继续差分,求得2阶导数并寻找最值点,定位所有特征点,如图13(b)所示。至此,梯形坡口的6个特征点均已初步确定,其位置信息见表3

    表  3  特征点的初步定位结果
    Table  3  Results of feature point rough location
    特征点 x/mm z/mm 特征点 x/mm z/mm
    A –6.37 –1.71 D 0.47 5.82
    B –3.89 2.84 E 0.55 2.81
    C –3.28 5.61 F 3.38 –1.40

    Y型坡口的线性拟合结果如图14所示。

    图  14  线性拟合结果
    Fig.  14  Linear fitting result
    下载: 全尺寸图片

    图14中,拟合直线段1~7的拟合参数如表4所示。表4中:和方差一项用来计算线性拟合的误差平方和,其值越小则效果越好;确定系数表征拟合的好坏,其值越接近1则效果越好。由表4易知,各直线拟合效果均较好。

    表  4  各直线的拟合参数
    Table  4  Parameters of fitting straight line
    拟合直线 斜率 截距 和方差 确定系数
    1 0.024 –1.247 0.079 0.846
    2 1.843 9.173 0.444 0.996
    3 10.740 38.630 0.388 0.953
    4 0.001 5.984 0.149 0.867
    5 –8.551 12.600 0.500 0.969
    6 –1.657 5.041 0.154 0.999
    7 0.022 –1.262 0.209 0.812

    由直线两两相交可求得特征点精确定位的结果,具体见表5,至此完成对梯形坡口截面轮廓特征点的提取。

    表  5  特征点的精确定位结果
    Table  5  Results of feature point precise positioning
    特征点 x/mm ${\textit{z}}$/mm 特征点 x/mm ${\textit{z}}$/mm
    A 5.73 1.39 D 0.78 6.09
    B –3.31 3.07 E 1.10 3.22
    C 3.04 5.98 F 3.76 –1.18

    对比表3表5可知,精确定位前后所得特征点坐标存在一定偏差,主要是焊件表面缺陷与传感器的温度漂移属性共同影响所致。因此,在对特征点初步定位的基础上,可通过线性拟合实现精确定位。

    选取25组传感器扫描的剖面数据,计算得到焊接路径中间点。采用多项式、高斯及3次样条插值等3种方法分别规划焊接路径,拟合结果如图15所示。

    图  15  采用3种方法的焊接路径规划结果
    Fig.  15  Welding path planning results using three methods
    下载: 全尺寸图片

    最小二乘法突出强调数据点的整体趋势,对于有序离散点数据的拟合效果较差。高斯拟合法迭代收敛的平均计算量大,系统响应时间长,因此适用性不好。三次样条插值函数的曲线经过所有的拟合数据点,拟合系数可以调整曲线的曲度和点的重合度,可以得到较好的拟合结果。三种路径规划方法的拟合参数如表6所示,由表6可知,三次样条插值法的拟合度最高,均方根误差最小,因此该方法比较适用。

    表  6  3种路径规划方法的拟合结果
    Table  6  Fitting results of the three path planning methods
    规划方法 R2 RMSE
    多项式拟合 0.9706 3.3368
    高斯拟合 0.9804 2.8076
    三次样条插值 0.9956 1.4776

    在实际焊接中,考虑到存在焊缝形状复杂、采集数据量大及误差等因素的影响,最小二乘法生成的曲线拟合效果较差,而高斯拟合的计算量过大且过程复杂,故选择三次样条插值法来规划焊接路径。

    实验前,先在焊件上标记焊接路径的起点与终点,而后驱动机器人以示教方式运动,记录此过程中焊枪中心的位姿坐标值,作为对比基准。实验时,机器人带动传感器扫描焊件,通过软件实时采集末端坐标系的位姿数据,采集周期与传感器的扫描周期一致,即每道坡口的截面数据对应机器人的一个位姿数据;然后,提取特征点并将其转换至基坐标系下,与基准进行对比,结果如图16所示。

    图  16  焊缝跟踪实验结果
    Fig.  16  Experimental results of welding seam tracking
    下载: 全尺寸图片

    通过比较计算所得的焊接中心点与实际焊枪末端点之间的偏差,来评价特征点定位方法的准确性。其中:平均偏差记为a,表示每个焊接中心点与焊枪末端点坐标值之差的平均值,单位为mm;偏差度记为d,表明在该方向上所产生的偏差相对于整个坡口的偏移程度,无量纲。两者的计算公式分别为:

    $$ \left\{ {\begin{array}{*{20}{c}} {{a_x} = \dfrac{{\displaystyle\sum\limits_{i = 1}^n {\left( {{x_{{\rm{TCP}}\left( i \right)}} - {x_{t\left( i \right)}}} \right)} }}{n}},\;{{d_x} = \dfrac{{{a_x}}}{l}};\\ {{a_{\textit{z}}} = \dfrac{{\displaystyle\sum\limits_{i = 1}^n {\left( {{{\textit{z}}_{{\rm{TCP}}\left( i \right)}} - {{\textit{z}}_{t\left( i \right)}}} \right)} }}{n}},\;{{d_{\textit{z}}} = \dfrac{{{a_{\textit{z}}}}}{h}} \end{array}} \right.$$ (12)

    式中: $ {a_x} $ $ {a_{\textit{z}}} $ X $ {\textit{Z}}$ 方向上的平均偏差; ${d_x}$ ${d_{\textit{z}}}$ X $ {\textit{Z}}$ 方向上的偏差度; ${x_{{\rm{TCP}}\left( i \right)}}$ ${{\textit{z}}_{{\rm{TCP}}\left( i \right)}}$ 为焊接中心点的坐标; ${x_{t\left( i \right)}}$ ${{\textit{z}}_{t\left( i \right)}}$ 为轨迹基准点的坐标;n为焊接中心点的个数,文中n=130;l为坡口的长度,计算得l=9.39 mm;h为坡口的深度,计算得h=8.03 mm。

    由上述公式计算实验偏差,结果见表7

    表  7  焊缝跟踪的实验结果
    Table  7  Experimental results of seam tracking
    焊缝类型 第1组(初步定位) 第2组(精确定位)
    ax//mm az/mm dx/% dz/% ax/mm az/mm dx/% dz/%
    直线 0.628 0.214 6.688 2.665 0.387 0.251 4.121 3.126
    曲线 0.736 0.185 7.838 2.303 0.429 0.230 4.569 2.864

    实验的误差分析主要计算特征点相对于基准的平均偏差a以及偏差程度d,分析表7中的数据可知:

    1) 两组实验中,两类焊缝在 $ {\textit{Z}}$ 方向的平均偏差 $ {a_{\textit{z}}} $ 均较小。初步定位时,曲线焊缝的 $ {a_{\textit{z}}} $ 取得最小值0.185 mm。经精确定位后,两类焊缝的 $ {a_{\textit{z}}} $ 分别增加0.037、0.045 mm,但其最大值0.251 mm<0.5 mm,仍然满足精度要求。

    2)第1组实验中,即只进行初步定位时,两类焊缝在X方向的平均偏差 $ {a_x} $ 均较大。其中,曲线焊缝的 $ {a_x} $ 最大,达0.736 mm。经精确定位后,两类焊缝的 $ {a_x} $ 分别降为0.387、0.429 mm,提升幅度分别超过38.4%、41.7%,达到<0.5 mm的精度要求。

    由以上分析知,经精确定位后两类焊缝特征点的平均偏差均小于0.5 mm[24],达到自动焊接的精度要求。

    1)设计了一套基于激光传感与视觉信息提取的焊缝跟踪系统,采用扫描、滤波、特征点提取与路径规划的方法实现焊缝跟踪。

    2)通过传感器采集坡口信息并对数据进行滤波处理,由图像特征点的2维坐标计算出传感器坐标系下相应的3维坐标值。

    3)解决了焊件表面存在缺陷时特征点定位的精度问题。经实验验证,精确定位后的两类焊缝特征点的平均偏差均小于0.5 mm。

  • 图  1   焊缝跟踪系统

    Fig.  1   Seam tracking system

    下载: 全尺寸图片

    图  2   焊缝跟踪4步法的工作流程

    Fig.  2   Process of four-step seam tracking method

    下载: 全尺寸图片

    图  3   对Ⅰ型坡口剖面数据1阶导数的限幅滤波

    Fig.  3   Limiting filtering of the first derivative of Ⅰ-type groove profile data

    下载: 全尺寸图片

    图  4   对Ⅰ型坡口剖面数据的高斯滤波

    Fig.  4   Gaussian filtering of profile data of Ⅰ-type groove

    下载: 全尺寸图片

    图  5   坡口特征点的分类

    Fig.  5   Classification of groove feature points

    下载: 全尺寸图片

    图  6   特征点的定位流程

    Fig.  6   Positioning process of feature points

    下载: 全尺寸图片

    图  7   焊件表面缺陷示意图

    Fig.  7   Defects on the surface of the weldment

    下载: 全尺寸图片

    图  8   各坐标系间的关系

    Fig.  8   Relationships between the coordinate systems

    下载: 全尺寸图片

    图  9   传感器的标定

    Fig.  9   Calibration of sensors

    下载: 全尺寸图片

    图  10   焊枪中心点坐标的数学模型

    Fig.  10   Mathematical model of welding torch center point coordinate

    下载: 全尺寸图片

    图  11   两种典型焊缝

    Fig.  11   Two typical grooves

    下载: 全尺寸图片

    图  12   焊缝跟踪实验系统

    1.送丝机;2.焊接机器人;3.保护气瓶;4.示教器;5.控制柜;6.焊枪;7.激光传感器;8.焊件夹具;9.焊接工作台;10.工控机;11.弧焊电源。

    Fig.  12   Experiment system of welding seam tracking

    下载: 全尺寸图片

    图  13   特征点初定位

    Fig.  13   Rough location of feature points

    下载: 全尺寸图片

    图  14   线性拟合结果

    Fig.  14   Linear fitting result

    下载: 全尺寸图片

    图  15   采用3种方法的焊接路径规划结果

    Fig.  15   Welding path planning results using three methods

    下载: 全尺寸图片

    图  16   焊缝跟踪实验结果

    Fig.  16   Experimental results of welding seam tracking

    下载: 全尺寸图片

    表  1   函数间断点分类及其性质

    Table  1   Classification and properties of function discontinuities

    间断点类别 函数在间断点处的性质
    函数值 1阶导数 2阶导数
    第1类 连续 阶跃突变 极值
    第2类 阶跃突变 极值 不存在

    表  2   焊件坡口参数

    Table  2   Groove parameters of weldment

    坡口参数 尺寸/mm 厚度/mm 坡口角/(°) 间隙/mm 钝边/mm
    直线焊缝 100×60 8 45 3 2.0
    曲线焊缝 130×80 10 60 3 2.5

    表  3   特征点的初步定位结果

    Table  3   Results of feature point rough location

    特征点 x/mm z/mm 特征点 x/mm z/mm
    A –6.37 –1.71 D 0.47 5.82
    B –3.89 2.84 E 0.55 2.81
    C –3.28 5.61 F 3.38 –1.40

    表  4   各直线的拟合参数

    Table  4   Parameters of fitting straight line

    拟合直线 斜率 截距 和方差 确定系数
    1 0.024 –1.247 0.079 0.846
    2 1.843 9.173 0.444 0.996
    3 10.740 38.630 0.388 0.953
    4 0.001 5.984 0.149 0.867
    5 –8.551 12.600 0.500 0.969
    6 –1.657 5.041 0.154 0.999
    7 0.022 –1.262 0.209 0.812

    表  5   特征点的精确定位结果

    Table  5   Results of feature point precise positioning

    特征点 x/mm ${\textit{z}}$/mm 特征点 x/mm ${\textit{z}}$/mm
    A 5.73 1.39 D 0.78 6.09
    B –3.31 3.07 E 1.10 3.22
    C 3.04 5.98 F 3.76 –1.18

    表  6   3种路径规划方法的拟合结果

    Table  6   Fitting results of the three path planning methods

    规划方法 R2 RMSE
    多项式拟合 0.9706 3.3368
    高斯拟合 0.9804 2.8076
    三次样条插值 0.9956 1.4776

    表  7   焊缝跟踪的实验结果

    Table  7   Experimental results of seam tracking

    焊缝类型 第1组(初步定位) 第2组(精确定位)
    ax//mm az/mm dx/% dz/% ax/mm az/mm dx/% dz/%
    直线 0.628 0.214 6.688 2.665 0.387 0.251 4.121 3.126
    曲线 0.736 0.185 7.838 2.303 0.429 0.230 4.569 2.864
  • [1] Lei Ting,Rong Youmin,Wang Hui,et al.A review of vision-aided robotic welding[J].Computers in Industry,2020,123(2):103326. doi: 10.1016/j.compind.2020.103326
    [2] Zhang Gong,Zhang Yuhang,Tuo Shuaihua,et al.A novel seam tracking technique with a four-step method and experimental investigation of robotic welding oriented to complex welding seam[J].Sensors,2021,21(9):1–14. doi: 10.3390/s21093067
    [3] Shao Wenjun,Huang Yu,Zhang Yong.A novel weld seam detection method for space weld seam of narrow butt joint in laser welding[J].Optics & Laser Technology,2018,99:39–51.
    [4] 郭吉昌,朱志明,于英飞,等.焊接领域激光结构光视觉传感技术的研究及应用[J].中国激光,2017,44(12):7–16. doi: 10.3788/CJL201744.1200001

    Guo Jichang,Zhu Zhiming,Yu Yingfei,et al.Research and application of visual sensing technology based on laser structured light in welding industry[J].Chinese Journal of Lasers,2017,44(12):7–16 doi: 10.3788/CJL201744.1200001
    [5] 杨国威,闫树明,王以忠.基于方向梯度直方图粒子滤波的V型焊缝跟踪[J].中国激光,2020,47(7):330–338. doi: 10.3788/CJL202047.0702002

    Yang Guowei,Yan Shuming,Wang Yizhong.V-shaped seam tracking based on particle filter with histogram of oriented gradient[J].Chinese Journal of Lasers,2020,47(7):330–338 doi: 10.3788/CJL202047.0702002
    [6] 邹焱飚,王研博,周卫林.基于高斯核相关的线激光焊缝跟踪方法研究[J].应用激光,2016,36(5):578–584. doi: 10.14128/j.cnki.al.20163605.578

    Zou Yanbiao,Wang Yanbo,Zhou Weilin.Research on line laser seam tracking method based on guassian kernelized correlation filters[J].Applied Laser,2016,36(5):578–584 doi: 10.14128/j.cnki.al.20163605.578
    [7] Chen Xiaohan,Dharmawan A G,Foong S,et al.Seam tracking of large pipe structures for an agile robotic welding system mounted on scaffold structures[J].Robotics and Computer-Integrated Manufacturing,2018,50:242–255. doi: 10.1016/j.rcim.2017.09.018
    [8] Chang D,Son D,Lee J,et al.A new seam-tracking algorithm through characteristic-point detection for a portable welding robot[J].Robotics and Computer-Integrated Manufacturing,2012,28(1):1–13. doi: 10.1016/j.rcim.2011.06.001
    [9] 雷正龙,吕涛,陈彦宾,等.基于扫描激光视觉传感的焊缝图像特征信息识别[J].焊接学报,2013,34(5):54–58. https://www.cnki.com.cn/Article/CJFDTOTAL-HJXB201305015.htm

    Lei Zhenglong,Lv Tao,Chen Yanbin,et al.Features extraction for weld image of scanning laser sensing[J].Transactions of the China Welding Institution,2013,34(5):54–58 https://www.cnki.com.cn/Article/CJFDTOTAL-HJXB201305015.htm
    [10] Wang Nianfeng,Zhong Kaifan,Shi Xiaodong,et al.A robust weld seam recognition method under heavy noise based on structured-light vision[J].Robotics and Computer-Integrated Manufacturing,2020,61:101821. doi: 10.1016/j.rcim.2019.101821
    [11] He Yinshui,Xu Yanling,Chen Yuxi,et al.Weld seam profile detection and feature point extraction for multi-pass route planning based on visual attention model[J].Robotics and Computer Integrated Manufacturing,2016,37:251–261. doi: 10.1016/j.rcim.2015.04.005
    [12] Hou Zhen,Xu Yanling,Xiao Runquan,et al.A teaching-free welding method based on laser visual sensing system in robotic GMAW[J].The International Journal of Advanced Manufacturing Technology,2020,109(5/6):1755–1774. doi: 10.1007/s00170-020-05774-0
    [13] Zhou Guanghao,Xu Guocheng,Gu Xiaopeng,et al.Simulation and experimental study on the quality evaluation of laser welds based on ultrasonic test[J].The International Journal of Advanced Manufacturing Technology,2017,93(9/10/11/12):3897–3906. doi: 10.1007/s00170-017-0816-x
    [14] He Yinshui,Yu Zhuohua,Li Jian,et al.Discerning weld seam profiles from strong arc background for the robotic automated welding process via visual attention features[J].Chinese Journal of Mechanical Engineering,2020,33(3/4):799–816. doi: 10.1186/s10033-020-00438-2
    [15] Zou Yanbiao,Wang Yanbo,Zhou Weilin,et al.Real-time seam tracking control system based on line laser visions[J].Optics & Laser Technology,2018,103:182–192. doi: 10.1016/j.optlastec.2018.01.010
    [16] Shao Wenjun,Liu Xiufeng,Wu Zijun.A robust weld seam detection method based on particle filter for laser welding by using a passive vision sensor[J].The International Journal of Advanced Manufacturing Technology,2019,104(5/6/7/8):2971–2980. doi: 10.1007/s00170-019-04029-x
    [17] 陈维杰. 基于条纹式激光传感器的焊缝轨迹测量系统研究[D].广州:华南理工大学,2018.

    Chen Weijie.Research on seam track measuring system based on stripe type laser sensor[D].Guangzhou:South China University of Technology,2018.
    [18] Wang Xinyun,Zhu Zhenmin,Zhou Fuqiang,et al.Complete calibration of a structured light stripe vision sensor through a single cylindrical target[J].Optics and Lasers in Engineering,2020,131(12):106096. doi: 10.1016/j.optlaseng.2020.106096
    [19] Li Lin,Lin Bingqiang,Zou Yanbiao.Study on seam tracking system based on stripe type laser sensor and welding robot[J].Chinese Journal of Lasers,2015,42(5):0502005. doi: 10.3788/cjl201542.0502005
    [20] Muhammad J,Altun H,Abo−Serie E.Welding seam profiling techniques based on active vision sensing for intelligent robotic welding[J].The International Journal of Advanced Manufacturing Technology,2017,88(1/2/3/4):127–145. doi: 10.1007/s00170-016-8707-0
    [21] 乔贵方,孙大林,宋光明,等.串联机器人标定系统的坐标系快速转换方法[J].机械工程学报,2020,56(14):1–8. doi: 10.3901/JME.2020.14.001

    Qiao Guifang,Sun Dalin,Song Guangming,et al.A rapid coordinate transformation method for serial robot calibration system[J].Journal of Mechanical Engineering,2020,56(14):1–8 doi: 10.3901/JME.2020.14.001
    [22] Lei Ting,Huang Yu,Wang Hui,et al.Automatic weld seam tracking of tube-to-tubesheet TIG welding robot with multiple sensors[J].Journal of Manufacturing Processes,2021,63:60–69. doi: 10.1016/j.jmapro.2020.03.047
    [23] 陈祝年.焊接工程师手册[M].机械工业出版社,2010.
    [24] Zhang S B,Zhang Y M,Kovacevic R.Noncontact ultrasonic sensing for seam tracking in arc welding processes[J].Journal of Manufacturing Science and Engineering,1998,120(3):600–608. doi: 10.1115/1.2830164
图(16)  /  表(7)

本文结构

    /

    返回文章
    返回