Model-driven online correction welding robot automatic programming system

In the fields of aerospace and shipbuilding, there are a large number of small-batch, flexible components to manufacture by welding. The geometric models of these components and the actual components itself often have deviations, which makes the automatic programming system based on the traditional off-line programming difficult to apply. In view of this situation, this paper designs a model-driven online correction robot automatic programming system. Through the analysis of the digitized geometric model of the component to be processed, the processing plan is planned in advance and the robot program is automatically generated. The deviation between the geometric model and the actual component is measured by the sensor, and the robot program is corrected online. Results show that the system can eliminate the influence of the deviation between the real component and the geometric model, complete the corresponding welding task effectively, and provide the technical basis for the further automation of the robot processing.


Introduction
Industrial robots have an important position in the new generation of intelligent manufacturing technology formed by the deep integration of new generation artificial intelligence technology and advanced manufacturing technology. The preparation of traditional industrial robot programs is generally achieved through manual online teaching. This programming has the disadvantages of long programming cycle, low teaching accuracy, and difficulty in achieving complex trajectories [1]. When faced with a large number of small batches, flexible and complex components, such as aerospace and shipbuilding manufacturing, the time and economic costs of manual programming are far greater than the time and cost of manual construction. It is often difficult to get effective applications. Therefore, the research of robotic automatic programming system with less human participation has great significance for the promotion of intelligent manufacturing technology based on industrial robots.
The off-line programming method based on the digital geometric model is a relatively fast and mature automatic programming solution [2][3][4][5] developed in recent years. This method is based on the manual planning of the existing digital geometry model. And automatically generate a robot program. However, due to the positional error between the components to be machined and the components in the programming environment, it can be applied to fields where the position error requirements are not strict, such as spraying, cutting, and bending [6][7][8][9][10][11], or the position error can be ensured through fixtures. Within a reasonable range to ensure the availability of welding. However, fixtures are also difficult to use in applications where the components to be machined are difficult to move. In order to overcome this difficulty, people re-program by first detecting the position of the member being processed and then calibrating the original model data, or correct the generated program according to the detection result of the position of the processing member. The technique of YASKAWA's origin detection [12] and a series of non-repetitive robotic processing systems designed by KRANEDOCK of the Netherlands are typical examples. However, this method still requires exact correspondence between the actual components and the digital model, and there is no way to treat the deviation between the processed component itself and the digital model. In summary, the above methods have all achieved automatic programming of robot programs, improved the efficiency of job plannin g, and played an active role in the promotion of non-repetitive manufacturing in the field of intelligent manufacturing technology based on industrial robots.. However, in the welding manufacturing requirements in which more and more geometric models and components themselves deviate from each other, the systems using the above methods are difficult to perform.
In this paper, a robot autonomous programming system that can perform on-line correction of deviation according to component entities is designed for the welding manufacturing requirements of components that are themselves deviated from the digital geometry model. Through the analysis of the digitized geometric model of the component to be processed, the processing plan is planned in advance and the robot program is automatically generated. The deviation between the machining plan and the actual component is measured by the sensor, and the robot program is corrected online to eliminate the deviation between the component and the model. The impact of this will provide the technical basis for robots to produce efficient and high-quality programs.

System principle
The automatic programming system designed in this paper is driven by a digital geometric model. The source of the digital geometric model can be either manually designed or acquired by a threedimensional scanning system. In the automatic programming system, the geometric model is used for automatic system analysis, and the display and human-machine interaction of the HMI module. The core part of this automatic programming system consists of three parts: welds extraction, welding planning (including welding path planning and welding process planning), and online correction. The system block diagram is shown in Figure 1.

Welds extraction
The digital geometry model is generally represented by the B-Rep boundary method. With this notation, various complex structures can be represented as point and line information. Therefore, it is very suitable to use the topological graph to represent the geometric information of the component. The model of a component can also be expressed as an undirected connected graph G m as shown in Equation 1.
Where V m is the node set of the graph and corresponds to the vertex of the model; E m is the edge set of the graph and corresponds to the edge of the model. Welds extraction is the process of obtaining a subset G w of G m . Traditional off-line programming software extracts welds by manual interaction. This method, although universal, is inefficient in some specific situations. A series of geometric correlation features are defined for the edge e i . These features include the length l of the edge, the included angle θ of the edge surface, the angle φ of the edge and the gravity vector, the thickness t 1 of the edge body, and the thickness t 2 of the edge body. Their respective definitions are shown in Figure 2. In the corresponding context, a strategy for extracting feature vectors and their combinations is developed. The related algorithm can be used to automatically extract the weld subgraph G w . It satisfies the relationship that the weld subgraph G w is the true subgraph of the component map G m .

Welding planning
When the welding subgraph is determined, the welding planning mainly consists of two aspects: 1) the planning of the welding path; 2) the planning of the welding process parameters; 2.2.1. Welding path planning. The planning of the welding path is based on the working point at the end of the welding torch, and the sequence of the movement of the welding torch can be divided into two parts: 1) the welding sequence planning of the welding seam; 2) the welding torch movement planning between the welding seams. Weld sequence planning means that each weld is welded only once, and the welding sequence of the weld is determined according to certain principles. Because the weld subgraph G w can't be guaranteed to be an Euler diagram, that is, one passage can guarantee the passage of each weld. Therefore, we must factorize G w and ensure that each factor is a semi-Eulathian. That is, the decomposition result satisfies Equation 2, where H s is the decomposed result of the decomposition result G i .
Since the exported subgraph Gi is semi-Eulerian, the graph has a trace that contains all the welds in the graph and is contained only once. This trace can be represented as an ordered set of points . This set of ordered points is the sequence of the working points of the robot when welding this weld. Then generate a set of ordered sets of points according to certain principles, such as to ensure the shortest welding time and consider the shortest distance between each arc extinguishing point and the arcing point, or in the case of some welding deformations need to consider the cooling time of the weld and the principle of maximum distance.
The movement planning of the welding torch between the welds is the path planning of the welding torch from an arc extinguishing point of the welding seam to the arcing point of the next welding seam

2.2.2.
Welding process planning. The welding process parameters can be determined through manual interaction, and can also be determined by matching the welding parameter process library with the set of geometric features defined in the edge of the weld joint after specifying the component materials.  Suppose a certain component is shown in Figure 3. Take a welding point P on the component as an example. This point consists of three surfaces F 1 , F 2 , and F 3 . If the normal vectors and constant terms of three faces are known, then there is Equation 4:

Online correction
Where x p , y p , z p are the coordinate values of the intersection P; elements N x1 , N y1 , N z1 in the matrix are the normal vector components of the surface F 1 , and D 1 is the constant term of the equation of the surface F 1 ; N x2 , N y2 , N z2 are the normal vector components of the surface F 2 , and D 2 is the constant term of the equation of the surface F 2 ; N x3 , N y3 , N z3 are the normal vector components of the surface F 3 , and D 3 is the constant term of the equation of the surface F 3 ; Taking the surface F 1 as an example, in order to obtain the normal vector component elements N x1 , N y1 , N z1 and the equation constant term D 1 of the surface F 1 , three sampling points P 1 , P 2 , P 3 may be taken on the surface. Then, according to  The three sampling points on the surface and the starting position of the sampling point are generated based on the digital model. For a particularly narrow surface, such as the thickness of a thin plate, a contact point in which the direction of the welding torch is parallel to the surface is generated according to the lateral position of the thin plate to ensure that the sampling point can be collected.
The online correction is online calibration of the corresponding ordered point set V gi . Take the point v gij in V gi as an example. This point uses the robot coordinate system as the reference coordinate system. It can be expressed as a six-dimensional vector. The first three elements in the vector, x j , y j , and z j , are the position of the reference coordinate system after the model calibration. The last three elements n xj , n yj , n zj are the direction vectors for this point, which is a unit vector. This point is shown in Equation 6.

Experiment
In order to verify the effectiveness of the automatic programming system, an experimental system as shown in Figure 4 is built. A three-dimensional sensor is installed on the gantry to perform threedimensional reconstruction of the components. The two welding robots are flipped onto the top of the gantry and their working space covers the entire workbench through coordinated movement with the movable gantry. A contact sensor is installed on the welding torch at the end of the welding robot. The contact point coordinates are instantaneously acquired through contact between the tip point of the welding wire and the surface of the component. It eliminates the need for any extra equipment at the end of the welding torch, so robot accessibility can be unaffected. The computer running the automatic programming system is connected to the robot controller via Ethernet. First, the experimental components are scanned and modeled using a three-dimensional reconstruction system developed in the experimental system. The experimental component is a rib structure with a curved surface and a straight surface. This structure is common in the manufacturing of ships and steel structures. The physical component and its digital model obtained through 3D  Figure 5a and Figure 5b. After setting the weld conditions and corresponding process parameters through human-computer interaction, the automatic programming system automatically extracts the weld and performs the welding planning. The results are shown in Figure 5c. The figure shows the welds extracted automatically and the corresponding welding direction and welding sequence. Then the online correction is performed according to the position of the physical component and its own structure, and finally the operation program is generated and downloaded to the robot controller for operation.
a. The physical structure of the experimental components.
b. The geometry model of the experimental components.
c. The welding plan result of the experimental components. In order to verify the correction method used by the system, the Euclidean distance between two points in the spatial position is used as a measure of the deviation. First, use the robot's TCP point to measure the actual position of the key points of the component. These key positions are the key points that make up the weld. They are shown in Figure 6. After obtaining the position data of these key points, the deviation between the actual components and the corresponding key points of the geometric model is then calculated. Then calculate the deviation between the corresponding key points and the actual components in the corrected robot operation program. The comparison between the two is shown in Figure 7. After the key points of the model are corrected by the correction method used by the system, the peak value of the deviation is reduced from the original 20 mm to 4 mm. The correction deviation of key points 11-16 and key points 31-36 are less than 2mm and the variance is also smaller than other key points. This shows that when the critical point of the component is on the plane, its correction result is better than the key point on the surface.  Figure 6. Key points in the welding procedure.

Conclusions
This paper designs an automatic programming system for welding robots, which is driven by digital geometric models and can correct machining plan online. The constitution and working principle of the automatic programming system are introduced; and the core algorithms involved are studied, including the computer representation of the components, the automatic extraction of welds, the planning of welding paths, and the online correction of welding paths. The experimental results show that the system can program effectively and automatically for the components with deviations from the digital models, and can make corresponding corrections online according to the deviations. The welding quality can therefore be ensured.