Copyright © IFAC Control Science and T echnology (8th Triennial W orld Congress) Kyoto. J apan. 1981
COMPONENTS AND INSTRUMENTS
TRACKING CONTROL SYSTEM FOR ARC WELDING USING IMAGE SENSOR M. Kawahara and H. Matsui Technical Research Institute, Hitachi Shtpbuilding and Engineering Co. Ltd., Osaka, Japan
Abstract. This p~per details a highly accurate and widely applicable tracking control system wh~ch guides a welding torch along a joint line. The control system includes a servomechanism, a solid-state image sensor and an image processor. The solid-state image sensor detects the cross sectional pattern of th~ welding groove with a He-Ne gas laser. The image processor, consisting ma~nly of a micro-computer, processes video information and estimates the position of the welding groove center on a statistical basis. This method of tracking control has been employed in the welding apparatus for penstocks with advantageous practical results. Keywords . Image processing; Microprocessors; Least squares approximations; Sensors; Tracking systems; Welding; Industrial control. tion techniques that utilize an image sensor such as ITV and a computer to process the video data obtained have been developed recently (see for example Arata, 1977; Hyosha, 1977). Most of these techniques calculate the position of welding groove edges based on the image processing and have an overall tracking accuracy on 0.5 mm order.
INTRODUCTION Gas-cut or premachined steel materials for welding are often of insufficient accuracies in terms of the straightness, flatness and bending curvatures. In addition to these preprocessing errors, there are other errors introduced into the welding process, including setting errors of the rails of a welding machine or the plates or blocks to be welded, and errors arising from thermal distortion during the welding and deflection of the materials due to their own weights. To take care of all these accumulated errors, automatic tracking of the welding line on actual materials is indispensable.
The detection method proposed in this paper is also optical, but unique in detecting the sectional pattern of a welding groove from a distance of some ten to tens of centimeters by the Light Sectioning Technique and in estimating the groove position accurately from the detected pattern data through the image processing with some statistical techniques introduced.
In tracking control the welding torch positioning control itself is relatively easy, but the problem is how to detect the welding line accurately following its variations. According to early investigators (Arata, 1972), the detection methods are usually either a contact type or a non-contact type, and the existing methods, while retaining a number of merits, have limitations in application due to the following reasons: (1) the contact type is subject to wear and deformation, (2) the offset between two metal surfaces affects adversely the detection, (3) a special machining of the welding grooves is required for increased detection accuracy, (4) increasing the sensitivity usually results in increased errors due to friction between the metal and touch sensor, and (5) both contact and non-contact type sensors are located close to the welding arc and adversely affected by the welding heat and spatters.
This paper discusses the topics in the following order: the construction of our tracking control system; the image processing technique that is the heart of our system; the detection and tracking accuracies based on the experimental results, and application examples of our system to automatic welding for penstocks in tunnels. CONSTRUCTION OF TRACKING CONTROL SYSTEM Principle of System Figure 1 shows a basic set-up of our tracking control system. The groove pattern detection is based on a method generally called the "light sectioning technique": a beam fanning out from the laser beam projector irradiates the welding groove from above and at right angles to the welding
In order to solve the above problems, detec-
2117
2118
M. Kawahara and H. Matsui
line and the image sensor is directed toward this irradiated groove area at a suitable angle from the beam direction to take the picture of the groove section. The image processor processes the image data from the image sensor and computes the position of the groove center (root or abscissa "X" of V-groove shown in Fig. 1) necessary for controlling the welding torch. Since the point of detection is ahead of the torch by the distance L, the detected information is delayed by the corresponding length of time, then fed to the servomechanism as the control target.
Welding
direc llOn/
Fig.1. Basic structure of the tracking control system. Make-up of System The tracking control system consists mainly of a groove detector, an image processor, and a servomechanism. Some parts of the groove detector and servomechanism are mounted on the welding machine, while the image processor is installed together with the welding power supply, etc. at somewhere a little away from the welding machine. {.r oo '~ dd n lo r ;- --------------1
~ :
W dd~~~' --~ I [tJO(l\,·
:
I I I l _______________ ...1
automatically set through averaging the analog video signal itself; this design permits to generate a normal binary image even if the general illumination level of the detection area by external light changes from 0 to 13,000 Ix. The binary image also contains tracks of spatters and, to remove these, a suitable number of consecutive binary images are overlapped (AND processing). The main processor incorporates software to process the preprocessed image data and to compute the groove center position (CPU used is INTEL 8080). Details on the software are discussed in Chapter 3. The interrupt signal to the microcomputer is produced from a train of pulses generated by a rotary encoder directly coupled to the driving gear of the travelling cart, so that in synchronization with this signal, the groove pattern detection and torch positioning control will be performed. This interrupt signal is also fed to a counter for addressing the positions along the welding line and to correspond these addresses to those of the data memory in the image processor. Our tracking control system performs the control function in two modes. In the first mode, the torch positioning control is performed by successively scanning the groove surfaces in synchronization with the interrupt signal. Since the detection is made some distance ahead of the torch, the target control value at a particular point is delayed until the torch reaches that point, while storing all the target control values. In the second mode, the torch positioning control is made by reading out the stored groove position information one after another in synchronization with the interrupt signal. (Playback Control Mode) In addition to the above control modes, manual setting of the position is also possible even under the automatic control mode through bias adjustments. This function is useful to give a certain deviation from the groove center to the torch when one layer is formed by a number of passes in multi-layer welding, and also in emergency cases. The magnification of the detector optical system should be selected as appropriate for the size of groove and the range of welding line variations and, according to the magnification, the response rate of the servomechanism should be set.
Fig.2. Block diagram of the tracking control system. IMAGE PROCESSING METHOD Figure 2 shows a block diagram of the tracking control system. The groove detector head contains a solid-state image sensor with a two-dimensional matrix array of 32 x 32 photo-diodes (RETICON RA 32 x 32A TYPE). The image processor comprises a pre-processor and a main processor. The pre-processor converts analog video signal into binary signal, for which the threshold level is
This section describes how the microcomputer processes the information from the image sensor. Kawahara (1979) developed the image processing method which is based on the following concept. Computing the coordinate (abscissa) of the root of a V-groove from its detected 32 x 32 dot matrix pattern gives the result only with a resolution of 1/32
Tracking Control System for Arc Welding of the full detection span. In order to achieve a higher resolution, therefore, two straight lines are assumed from dot data that represent the right and left sloped surfaces of the V-groove and the coordinate of the root is computed as that of the crossing point of these two lines. The software that controls these arithmetic operations is designed to remove any control errors due to noisy pictures and to provide the result with maximum accuracy and minimum computing time.
(4)
(5)
2119
since all data whose Y < Y should be 3 B = 32. B ~ Xo + e: or B3 ~ 32 - Xo + e: (e:2 and Xo as defined in (2) above) the data should be removed. The data at Y Y or Ys of Fig. 3 corresponds to this 4 case, wfiose most possible cause is strong reflection of light at the plate surfaces and the resultant blurring of the image. If Bl + Dl + B2 + D2 + B3 < 32, the data shou d be removed as noise-ridden. The data at Y = Ys of Fig. 3 is an example.
rt
Compression of Image Information The image information from the image sensor is two-dimensional and large, and processing the image data as they are requires very complex operations. In our processing method, the image information on each ordinate level is reduced into a form of (B , D , l l B2 , D2 , B3 , Y) to simplify the operations, where: number of blanks as counted from the Bl most left of the image matrix until the first signal dot appears; number of signal dots following Bl number of blanks following D ; number of signal dots following B2 number of blanks following D2 ; ordinate or level of the above information with respect to Y-axis (our coordinate system sets the upper left corner as the origin, from which X-axis extends horizontally to the right and Y-axis vertically downward). Removal or Correction of the Compressed Data Each set of data in the reduced form of (B , l Dl , B2 , D2 , B3 , Y) is retained as necessary information, removed as noise-ridden, or corrected according to the following five criteria : (1) If Bl = 32, the data should be removed. This is the case where there are no signal dots, such as the data at Y = Yl in Fig. 3. (2) If Bl + Dl + B2 = 32, the data should be corrected. Examples in Fig. 3 are the data at Y = Y ' Y6 and Y7 ' and it is first deterZ whether Dl represents the right m1ned side or left side sloped surface as follows : let the abscissa of the groove center or root estimated in the previous cycle be X ' then it is the O left side i f Bl :;; XO' otherwise i t is the right side. If judged to be the right side, the data are corrected as foIl ows : B3 +- B2' D2 +- Dl' B2 +- B1 ' and Bl = Dl = O. (3) If Dl ~ <5 or D2 ~ <5 ( <5 = 3 ), the data should be removed because, in many cases, it represents either the plate surfaces or the groove root. In Fig. 3, the data at Y = Y represents the plate surfaces and da~a such as at Y = Y are also rejected simultaneously 2
x,, YI
--------- .... -----------
Y2 y,
-- -o--- -----~---------
x
2=~ }'
Fig.3. picture to be processed. Line Fitting to Extracted Data Two straight line curves that represent the right side and left side sloped surfaces of the groove are fitted to the valid data obtained through extraction or correction as outlined above. First, the valid sets of (B , D , B , D2 , B , Y) type data are conl 3 l 2 verted and divided into n sets of (X, Y) data to represent the lef~ side and n sets R of (X, Y) data to represent the right side, to which two straight line curves : Y
a
Y
a
L X + bL
(1)
X+ b
(2)
R
R
are then fitted. In our method, since the groove angle can be known in advance if not very accurate and to estimate as accurately as possible the abscissa Xo of the groove center from a limited number of data, a , a R are treated as known parameters. Throukh a least-squares fit, the unknown parameters b L and b are estimated as follows: R (3)
(4)
Testing of Extracted Data Before the value of Xo is estimated, the sets of data extracted or corrected and transformed into the (Xi' Y ) form as mentioned in previous paragrap~s are tested if they satisfy the following: I bL -
(Y i
-
aL X) I.;; a
(5)
M. Kawahara and H. Matsui
2120
bR
-
(Yj -
3
R
X) I .;; a
(6)
Any data that does not satisfy the corresponding inequality above is removed, then b L and b R are re-estimated from the remaining data. The criterion 0 should ideally be determined from the variance, but set to a constant value of 0 = 2 in our method to simplify the arithmetic operations. (a) Original picture Groove Cent er Estimation and Error Check The abscissa X of the groove center is estimated as tRat of the crossing point of the two straight-line curves expressed by Eqs. (1) and (2), and is given by Xo =
(b R -
bL)/(a L - a R)
(7)
The estimated value of Xo is produced in the form of an 8-bit signal and fed to the servomechanism as the control target. Since the variations of the welding line are usually smooth, there should be no abrupt change in the Xo values estimated one after the other. In view of this, each X value is checked for error by comparing i~s deviation from the previous X value against a predetermined criterion ?about 2% of the full scale is appropriate according to the experimental results). If the deviation is greater than the criterion, that value is discarded and replaced by the previous value. EXPERIMENTAL RESULTS ON GROOVE CENTER DETECTION Figure 4 shows the images of a V-groove on CRT display: (a) is the image direct from the image sensor, indicating a continuous brightness level except for the root area where the brightness is extremely high due to the light from the arc, tracks of spatters are also seen; (b) is the image obtained after binary conversion of (a), revealing the root area clearly thanks to the automatic threshold level control for binary conversion under highly changing hackground light, but the spatter tracks are still seen; (c) is the image obtained from AND processing of binary images, showing the groove more clearly with noises such as spatter tracks removed. The detection error has been determined as follows. A groove sample is securely mounted on a precision sliding table, so that the groove can be moved horizontally in perpendicular directions to the welding line. Operating the sliding table, the groove is moved by the distance X and the output value Xo of the image processor is measured. The X and X data obtained in this way should hold a 2inear relationship, but, in actuality, it is not so because of the quantization error, estimation error, etc. For this reason, a linear regression of X on X is estimated and a distribution of ~eviations
(b) Binary picture
(c) Binary picture (after AND processing) Fig.4. Examples of original and pre-processed data. of the individual X values from this regression line is ~reated as the detection error distribution. The spread of this error distribution is +0.5 ~X if only the quantization error is involved, where ~X is a minimum unit when Xo is expressed in the form of digits. Figure 5 shows a distribution of detection errors by our method, indicating its spread is +1.1 ~X.
Fig.5. The distribution of detection error. In our method, Xo is a number in 8-bit binary notation and this gives ~X = 1/256 of the detection span. Since the image sensor used has 32 picture elements, or pixels, in one line, the spacing between every two pixels is 8 ~X. The results of Fig. 5 suggest that Xo can be estimated as correct to the spacing between two pixels divided by 8/1.1. In other words, it is reasonable to quantize Xo into 8N where N is the number of pixels in one line. In the case of N = 32, particularly, expressing Xo in 8-bit binary number is convenient both from the microcomputer functioning
Tracking Control System for Arc Welding and from the number of significant figures of the expressed number. Assume we ta~e the picture of a groove area ofAx A (mm ) in the surface plane with an image sensor of N x N pixel matrix, then we have 6X = A/8N (mm). By applying this to the error spread of Fig. 5, and let A = 12.8 mm, N = ·32, the detection error is +5.5 x 10- 2 mm maximum and, without the im~ge proce~~ing, this would be as large as ~4.0 x 10 mm since the resolution is 12.8 mm divided by 32. The time required for one detection, as measured, is 23 ms for image detection plus 147 ms for image processing. EXPERIMENTAL RESULTS ON TRACKING CONTROL The overall tracking error including both groove center detection and torch positioning control has been determined quantitatively as follows. A V-groove is machine cut so as to have a good, straight welding line. Next, letting the automatic welding machine incorporating our tracking control system track this groove, the distance of its cart travel along the welding line and the torch movement X perpendicular to this travelling direction are recorded. If the control is ideal without any errors, recording this X on ordinate with the travelling distance on abscissa should form a straight line curve and, therefore, a straight line is fitted by least squares method to the obtained curve on the record. A distribution of deviations of the data X from this straight line is then obtained to determine the maximum tracking error.
2121
mm ~
L() bt la\(>r
- 1st 13}"er Iweldlnf,O .:. ~nd la\"er .. 2nd la~'er Iweldm~)
0:, 1.0 Scale faclOr S,
C5 Imm
Fig.7. Tracking errors. e
that is an overall error from the
d~~~~tion to the final servomechanism drive, with e on ordinate and the scale factor, S = A~x(mm), on abscissa. For both the ffrst and second layer data the difference in e between with and without welding is verym~~all, indicating that the groove image detection and processing was effectively performed even under the presence of intense arc light, the strongest external light. For the first layer e (mm), from the data max of Fig. 7, we have e
max
=
0.113 Sf + 0.168
(8)
APPLICATION TO ACTUAL WELDING MACHINE Our tracking control system was applied to an all-position automatic welding machine, that welds circular butt joints of penstocks in tunnels from the inside.
POSitIOn along the hne of a
butt JOint
Fig.8. Experimental result.
Fig.6. Experimental results (Sf
=
0.84).
Figure 6 shows an example of the results obtained in this way with X on ordinate and the travelling distance on abscissa : (a) tracking a groove without welding, and (b) tracking the same while welding it. Also shown as "e" on these records is the voltage applied to the servo motor. Both (a) and (b) curves are fairly straight-lined and the difference between them is very small. Figure 7 summarizes the experimental results in terms of the maximum tracking error,
Figure 8 shows the result of an experiment on the butt joint of a model penstock line 45°-inclined and 4 m in pipe diameter, where a half of this circular joint was tracked from the bottom 6 o'clock position to the top 0 o'clock position; the torch movement X is on ordinate and the distance of travel along the butt joint line is on abscissa with positions marked in o'clocks. This suggests that the torch position was controlled over a range of about 9 mm responding to a deviation of the welding line from the travelling direction. You will note sudden changes of X at 5, 3 and 1 o'clock positions; these are not the changes of the welding line, but those of the travelling direction due to less smooth connections of the rails for the welding machine. This means our tracking control system ensures high-quality welding even when the rails are
2122
M. Kawahara and H. Matsui
less accurately mounted. Also shown in Fig. 8 as "e" is the voltage applied to the tracking servo motor, indicating a high frequency of foward-reverse control operations.
described in the second chapter). As a result, a considerable saving of the welding operators' labor and improv~ment of the welding quality were achieved. CONCLUSIONS
Fig.9. External appearance of the tracking control apparatus. Figure 9 is the external appearance of our tracking control apparatus. This control apparatus has been applied to the installation work of a large surge tank (cylindrical tank of 14 m diameter and about 80 m high) in the construction of a hydroelectric power plant. In this work, two welding machines were set on the rails along the circular welding line of butt joint inside the tank so that they go half round each and run independently as controlled from our apparatus simultaneously.
(1) This non-contact type detection method permits a groove sensing at a distance as large as from some ten to tens of centimeters, thus preventing the sensor head from being affected by the heat and greatly reducing the limitations on the shapes and sizes of the sensor head. Another feature is the binary conversion and processing of the groove image information, which ensures a robust detection even under varying external light and plate surface conditions. (2) This tracking control system uses a microcomputer to process the detected video information and to statistically estimate the groove root position, achieving a much higher detection accuracy than the resolution of the image sensor. (3) The experiment of application to an all-position automatic welding machine for penstocks in tunnels has shown this system to be very useful and practical. This system also permits tracking control in multi-layer welding by manually setting the initial welding electrode position for each layer. In welding the final layer there is no groove to detect, but the tracking control can be continued based on the past groove cent er data detected and stored in the system. The image processing is not disturbed even if tack welds exist in the groove. (4) When this tracking control system is used, the attaching work of the rails on which welding machines run becomes easy because the allowance for attaching accuracy is large enough. (5) This system can cover a variety of groove shapes and, in addition to the groove cent er detection, may have multiple function including monitoring of the bead shape, and detection of the root gap and the offset between plate surfaces. REFERENCES
Fig.lO. One of automatic welding machines controlled by the apparatus of Fig.9. Figure 10 is the external appearance of one of the automatic welding machines used in the above-mentioned work. These machines were connected via 30-m long cables to the control apparatus shown in Fig. 9. In this application example, the control apparatus first let the two welding machines run before welding to cover a total of about 44-m long butt-joint line and store the groove center data, then, during the welding, simultaneous tracking control of the two welding machines was performed according to the stored data (using the playback control mode
Arata, Y., and K. Inoue (1972). Automatic control of arc welding. J. Jap. Welding Soc., 41, 613-647. Arat~.,-and K. Inoue (1977). Application of digital computer to pattern measurement and processing in automatic control system of welding. J. Jap. Welding Soc., 46, 129-134. Hyosha, K. (1977). Welding control system using ITV. R&D Kobe Steel Engineering Reports, ~, 81-84. Kawahara, M., and K. Taki (1979). Tracking control for guiding electrodes along joints by pattern detection of welding groove. Trans. Soc. Instrum. & Control ~, .!2., 492-497.
For Discussion see page 2153