Paper received: 2012-02-03, paper accepted: 2012-03-12 © 2012 Journal of Mechanical Engineering. All rights reserved. Online Monitoring, Analysis, and Remote Recording of Welding Parameters to the Welding Diary Andrej Lebar* - Luka Selak - Rok Vrabic - Peter Butala University of Ljubljana, Faculty of Mechanical Engineering, Slovenia In certain domains of production engineering we are faced with very small batch production as it is the case in the production of heavy hydro energy equipment. In this domain manual welding is one of the most time consuming operations. Monitoring of the welding process is essential from the point of work organization as well as from the point of process control. In this paper a novel concept of data acquisition and recording of welding parameters to the welding diary is presented. Several considerations on signal acquisition, sampling rate, processing, data aggregation, wireless information transfer, and presentation are discussed. Implementation of the concept is discussed on laboratory and industrial examples. Keywords: arc welding, monitoring, wireless sensor networks, ZigBee communication 0 INTRODUCTION In the production of water turbines and heavy hydro energy equipment, welding is one of the most time consuming operations. Due to the combination of small batch production and different workpiece sizes, high flexibility of welding equipment is a prerequisite. Consequently, a high level of manual labour is needed, which unavoidably leads to lower quality and longer waiting times between operations [1]. Monitoring of manual arc welding is important since it correlates with productivity and influences welders' skills and stress, which in turn influence the quality. This paper reports on a concept of welding process monitoring based on a microcontroller platform capable of data acquisition, aggregation, and wireless transfer to a data server and presentation in the form of a welding diary. The main welding parameters necessary to be recorded and stored are regulated by the ISO 15609-1 standard [2], which requires, among others, information on material thickness, parent materials, welding consumables, and electrical parameters. Based on this standard, a special document, i.e. a welding procedure specification (WPS) also known as a welding diary is to be used. The aim of the welding diary is to enable traceability of welds. In the welding diary the actual welding parameters and consumables for each run are to be written by the welder. The welding diary incorporates several details: run sequence, the welding process, the size of filler material, the type of current, wire feed speed, run out length, travel speed, and especially electric voltage and current. A note should be made that the term 'electric current' such as is used throughout this paper, is frequently substituted with a 'welding current', when it is used in the domain of welding technology. However, filling of the welding diary in a paper form is tedious and time consuming for the welder. Moreover, it was found that up to 15% of information in the welding diary is not filled in correctly. In order to improve the reliability of the welding diary creation, methods of online process monitoring should be applied. Research work covered by scientific papers focuses mainly on the measurement and analysis of electric voltage, current, emitted light and sound [3]. Sforza and Blasiis focus on the Fourier analysis of optical signals of visible, infrared and ultraviolet emission of the plasma. They managed to evaluate the quality of welding [4]. A system based on photo diodes to detect a wide variety of weld defects is presented by Mirapeix et al. [5]. Acoustic methods are mainly useful to assess welding process stability and to detect severe deviations in arc behaviour [6], [7]. An alternative approach of the groove geometry measurement based on laser triangulation is presented by Bracun et al. [8]. Rak et al. perform quality analysis immediately after welding by means of cyclographs and autocorrelation [9]. Due to the commercial importance of the welding domain, a lot of information related to monitoring and data transmission of welding process parameters is available in patent databases. For wireless data transmission two technologies are used. The first one uses transmission at frequency 131 kHz [10], while the second one uses ZigBee communication protocol at frequency 2.4 GHz [11]. Regarding real time monitoring of the welding process there are several patented solutions [12] to [14]. Signal processing can be performed at the site of data acquisition [12], which enables additional flexibility, or the data is transferred to a data server where the processing is done [13] and [14]. The presented concept is suitable for most types of welding, however this paper focuses on the shielded metal arc welding process (SMAW). 1 ONLINE MONITORING CONCEPT Welding stations are often repositioned, even several times a day due to specific requirements in production. Any kind of monitoring constrained to a particular location is therefore, not possible. Furthermore, if wireless technologies are used, transfer rates are limited in harsh industrial environments. This situation fits in the frame of the paradigm of smart environment, networked sensors, and ubiquitous manufacturing. The proposed concept of wireless welding monitoring is presented in Fig. 1 by means of a functional diagram. The key idea is that every welding station is equipped with a custom microcontroller, capable of acquisition, analogue to digital conversion (A/D) and digital data processing. Signal processing and aggregation is performed on-chip in order to avoid transfer rate limitations. The processed data are then transferred to a data server by means of ZigBee wireless communication. Four key steps are conceived: (1) signal acquisition and conditioning, where SMAW process signals, such as voltage and electric current are acquired and digitalised, (2) signal processing, where online aggregation of signals takes place, (3) information transfer by means of ZigBee communication, and (4) information presentation, where the results of signal acquisition are merged with the corresponding manufacturing execution system (MES) and enterprise resource planning (ERP) system data. In turn, they are presented in the form of a welding diary. In the remainder of this section, the steps are described in detail, focusing on the specifics of SMAW signals. 1.1 The SMAW Process In the SMAW process a consumable electrode with a dry flux coating and a metal core is used. An electric arc is established between the electrode and the workpiece. Energy released in the arc melts the workpiece, the solid metal core of the electrode, and the flux coating. As the flux coating burns away, an inert gas which protects the materials from chemical reaction with ambient air, is released. In addition to the gas, a layer of slag covering and protecting the welded area is produced from the burnt flux coating [15]. The elements of the SMAW process are schematically shown in Fig. 2. Slag which is liquid and lighter than the molten metal rises to the surface forming a protective layer over the hot metal. While the slag is cooling, it protects the weld from the influence of the ambient atmosphere and also slows down the cooling rate of the weld. A typical electric current signal observed in welding with inverter type power supply source is shown in Fig. 3. Burning of stable electrical arc is achieved by constant average consumption of electric Fig. 1. Functional diagram of the SMAW process monitoring concept current, which is in the modern inverter type of power supply achieved by a built-in controller. Cathode (-) Fig. 2. The SMAW welding process Time [s] Fig. 3. Welding current pulse occurs at the moment of contact between melted metal droplet and base material It can be observed in Fig. 3, that for the particular example short pulses with an amplitude of nearly 30 A are superpositioned on rather constant signal of electric current with value 70 A. The pulses can be explained by the process of metal droplets detachment, which occurs when the surface tension is no longer able to keep the drop attached to the electrode as can be observed in Fig. 4. The forces which determine the detachment process are gravity, force caused by electromagnetic induction, force caused by aerodynamic drag, and a momentum force accounting for the change of mass in the drop [15]. Fig. 4. Molten material drop formation Monitoring of process parameters can provide better insight into the process and, in the case of manually operated machining, also into the skills of a particular operator. 1.2 Signal Acquisition and Conditioning The welding process should be observed by means of continuous monitoring of the electric current and voltage. In the paragraphs below, materials and methods to acquire these quantities are described. Electric Current Acquisition Electric current can be measured by various methods, but due to high electric current, electric isolation, required resolution, and dynamical response characteristics, a Hall effect sensor is proposed for the presented application. A wire, which carries the current, runs through a magnetic flux collector, which is in the form of a wound core. The Hall sensor itself is integrated in this core (Fig. 5). Fig. 5. Hall effect sensor The Hall effect semiconductor sensor is based on the phenomenon that drifting charge carriers are deflected by a magnetic field, which results in an output voltage signal UH proportional to the external magnetic field B, originating in the measured electric current I. Voltage Modification The voltage signal should be digitised with the best possible resolution, therefore it's range must be adapted to the input range of an A/D converter optimally. For this, a voltage divider followed by an isolation amplifier is proposed. A suitable electric circuit is shown in Fig. 6. The circuit incorporates a voltage divider, an isolation amplifier and power supply electronics. The isolation amplifier provides electrical isolation and acts as an electrical safety barrier. The voltage division is chosen according to the A/D input range. Fig. 6. Simplified electronic circuit for voltage modification Considerations on Sampling Rate The concept of the welding monitoring system was developed gradually. At the beginning laboratory equipment was tested. Later, it was compared to a system based on a microcontroller, dedicated for implementation in industrial environment. During the simultaneous comparison of both systems an issue emerged that despite calibration some differences between signals acquired with the National Instruments laboratory equipment (/NI) and the Arduino microcontroller based system (IARD) were identified. In order to explain the differences between INI -IARD, a numerical simulation was created. The results of the simulation can be compared to the experimental example the Fig. 7. The simulated reference signal (Fig. 7a) was downsampled to two signals with different sampling rate frequencies, simulating e.g. the faster (INI) and the slower (IARD) DAQ system. The difference between simulated signals can be observed in Fig. 7b. Parameters used were low sampling rate frequency fL = 2 kHz, high sampling rate frequency fH = 5f and reference signal with frequency fU = 100xfH = 500xfL. In the phase of monitoring system development a similar comparison was made experimentally with identical sample rate frequencies fL and fH as in simulation (Fig. 7c) The difference between experimental signals can be observed in Fig. 7d. Although the average difference between the signals measured with both DAQ systems in Fig. 7d is zero, deviations arise from the rise time and fall time of the imperfect square wave signal. 0.03 0.05 Time [s] Fig. 7. a) Simulated and c) measured signal; corresponding difference between high rate and low rate sampled signal in case of b) simulation and d) measured signal 1.3 Signal Processing In order to achieve automatic welding diary generation during the welding process, the acquired signals should be processed fast enough. This means, that the measured signals should be mapped to statistically good conditioned estimators. Aggregation of acquired signals is necessary in order to achieve an acceptable data transmission rate for wireless transmission. An additional constraint is imposed by hardware capabilities. The number of data units, typical microcontrollers are able to store in random access memory (RAM) which is as low as a few thousand integer values, therefore the proper selection of numerical methods is of utmost significance. There is no ambiguity in the calculation of average signal values, which are calculated by the following equation: x - x (1) where xn is the new estimate for average value, xn_ is the old estimate for average value, xn is the current measurement and n is the number of measurements in the current time series. In probability theory the importance of standard deviation a originates from the central limit theorem, which states that the mean of sufficient large number of independent random variables will tend to be normally distributed and a is a parameter of normal distribution. Usually, it is calculated using the following equation: -4 i (^ - n -1 i=i x )2 (2) but this requires two passes through the data as can be observed in the following pseudocode: Function: calculate aref X - set of measurements xi - current measurement while experiment running append xi to X end calculate X for x c X accumulate (x - X )2 end calculate oref acc. to Eq. 2. In the first pass the average value x is calculated and in the second pass the squares of deviations from the mean value are added up. With large data sets two passes can be a serious issue if the available time or computer memory is limited. Unfortunately, this is the very case in the real time situations. Alternatively, a formula, which requires only one pass through data can be used [17]: 1 n -1 z x (3) The formula performs poorly if rounding errors are present [17], which is the case if single precision variables are used. In the literature it is advised that instead of accumulating X xt and X x2 it is favorable to accumulate quantities given by mathematical expressions Mk and Qk (Table 1) and calculate the standard deviation as: Q n -1 (4) Table 1. Mathematical expressions for Mk and Qk [17] M1 = x1 Mi X - Mi = m j + —-— i i = 2, ..., n 0! = 0 Q-- Q + (i - 1)(x - Mi-!)2 ' 1 i i = 2,..., n This principle can be implemented in the pseudocode as follows: Function: calculate oB xi - current measurement while experiment running renew Q value acc. to xi renew M value acc. to xi end calculate oB acc. to Eq. 4. 4 Time [s] Fig. 8. a) Signal of electric current I, comparison of differences between b) standard deviations calculated by aW and c) aB B = ref = 2 It can be clearly seen in Fig. 8 that the difference aW - oref (Eq. (3)) is significantly larger than the difference sB - o-ref (Eq. (4)). In both cases the reference standard deviation sref is calculated by standard Matlab function std() with double precision, whereas expressions are calculated with single precision. The double precision calculations are at least three orders better with respect to results. 1.4 Information Transfer The aggregated parameters of each weld need to be stored for future use. In turn, they have to be transferred to a data server and saved into a database. Several challenges are associated with this. Firstly, welding is done by both static and hand-held machine tools. The latter are movable and frequently change location, which makes data transfer by cable impractical. Wireless networks, which have the potential to solve this, have to deal with reliability and robustness issues in harsh industrial environments. Furthermore, if parameters are acquired from several welding stations, synchronisation of data has to be achieved. As a solution to the above mentioned challenges, ZigBee wireless protocol is proposed. ZigBee is based on IEEE 802.15.4 standard for low-rate wireless personal area networks and is targeted at radio-frequency applications that require low data rate, long battery life, and secure networking. What differs ZigBee from competing standards (Bluetooth, WiFi) is that newer solutions, such as ZigBee Pro, offer self-healing network capabilities, extended singlehop range of up to hundreds of metres using 2.4 GHz frequency band, fragmentation, frequency agility, and advanced support for networks of thousands of devices. These properties make ZigBee usable even in industrial environments, where problems of radio-frequency interference are common. The main limitation of the proposed protocol is that the data transfer rate is limited to 250 kbit/s in ideal conditions. Therefore, data aggregation of the previous step plays a very important role. The data are transferred by the ZigBee interface to the data server. The communication algorithm works as follows: when the welding node is turned on, the time of the module is synchronised with the time of the computer. When welding starts the module records welding start time stamp and starts calculating average welding current and voltage. When the welding stops, the welding node records the welding stop timestamp. These four pieces of data are then transferred to the data server and to the database. The procedure is presented in the pseudocode below: Function: monitor welding synchronize time while true if welding save time of start end while welding update averages update st. deviations end save time of end send data to server end 1.5 Information Presentation The standard [2] specifies technical content of welding procedure specification, which takes the form of a welding diary in practice. In order to fill the welding diary form, welding parameters information needs to be combined with manufacturing execution system (MES) data, which includes information about work orders, welding consumables, and operators. For example, average travel speed can be calculated by dividing the weld length specified in work order data with the welding time. The welding monitoring system is responsible for current, voltage, travel speed and heat input measurements. For information about welding consumables as well as welder data and documentation, MES may be used. ERP system can provide only high-level information, such as manufacturer data. By combining all the information sources, a complete picture of the process can be obtained. 2 CASE STUDY Two case studies are presented to illustrate the approach. Firstly, laboratory experiments are performed in order to verify the viability of the concept. A microcontroller is selected and compared to laboratory measurement equipment, which shows that a low cost microcontroller solution is adequate for SMAW signal acquisition and processing. Results of online signal analysis are discussed. Secondly, an industrial implementation of the concept is presented. 2.1 Laboratory Experiments Initially, a comparison between the microcontroller and the laboratory measuring system was made. Measurements were performed on the experimental setup schematically shown in Fig. 9. As a power source, a Fronius Magic wave 2000 was used, the consumable wire was electrode Jadran S = 2.5 mm with 0.08% C, 0.35% Si, 0.5% Mn). Structural steel with specimen thickness 4 mm was used in the experiment. The electric current was approximately 70 A, whereas the voltage supply was 21 V. The arc movement speed was 4 mm/s. Arduino microcontroller platform was selected for the development of welding monitoring system. The platform is based on open-source hardware and software. It uses ATmega328 microcontroller with 16 MHz clock speed, six analog inputs (10 bit) and 1 KB of EEPROM memory. The signal was sampled with a sampling rate of 2 kS/s and transmitted to a computer by USB serial communication. The time stamp was set by the microcontroller in microseconds. As a reference, data acquisition device National Instruments USB 6221 with a sampling rate of 10 kHz per channel and 16-bit resolution was employed. LabVIEW data acquisition software was used. Datalogging computer Fig. 9. Experimental setup of the SMAW process monitoring system during laboratory experiments Electric current was measured simultaneously by two Hall effect sensors. The measurement range of LEM LF 1005-S sensor is ±1000 A, while the measuring range of LEM HTFS 400 is ±600 A. Response characteristics dI/dt of both sensors is 100 A/^s. Let us refer back to Fig. 7c. The figure shows that electric current measured during welding by laboratory measuring system is in good correlation with the current measured by the Arduino microcontroller platform. Fig. 7d shows the difference between the signals. The difference is in the range of ±5% of the measured signal, therefore it may be confirmed that the Arduino platform is fast and accurate enough for the given task. Online Signal Analysis The algorithm for online standard deviation calculation was tested for a range of possible signals. For this, the influence of slag on electric current was studied, as slag influences the occurrence of electric current pulses (Fig. 3). The experiment was conducted as follows: on a clean steel surface three separate weld beads were deposited. After the deposition of the beads, the remaining slag should be completely cleaned, but in the experiment the first bead was left unaltered, the second was partially cleaned of slag and the third bead was completely cleaned. After the cleaning operation, the second welding pass was applied over all three beads. It was expected that due to the remaining slag the distance between the electrode and base material varies more apparently. This should be reflected in the occurrence of electric current pulses. Fig. 10. Three signals of electric current corresponding to experimental SMA welds - second pass.; a) slag not removed b) slag partially removed and c) slag removed During the second welding pass the signals were measured by laboratory measuring equipment and analysed online by the Arduino microcontroller platform. Signals were processed by the algorithms presented in section 1.3. The results were saved to EEPROM after each second of analysis. After the welding, the data were transmitted to the central computer by means of ZigBee wireless communication protocol. Despite the fact that signals look rather similar in the time domain (Fig. 10), their distributions (Figs. 11a to c) reveal significant differences which can be used to discriminate a stable and unstable process. The average value of the standard deviation is significantly different between not removed slag = 5.17 A and totally removed slag ac = 6.57 A. By using this method it is also possible to distinguish the share of stable and unstable process, e.g. if the arc is discontinued during welding. 2.2 Implementation in Industrial Environment The concept proposed in Fig. 1 is industrially implemented on the welding power station Lincoln Idealarc DC - 1500 (USA). It is a multi-process DC arc welding power source for automatic welding applications. The machine is designed for submerged arc welding with one welding wire. The operator can set the electric current, voltage, and travel speed of the welding head. The implemented system is based on the same Arduino microcontroller platform it was used for the laboratory experiments. XBee-PRO 60 mW ZigBee device (from Digi) is used for signal transmission and MSSQL database for data storage. The system was in operation in the industrial environment for half a year. During this time 1005 welds were made. The average welding time was 951 s. The total welding time was 263 h and 3.75 MWh of electric energy were used. The start and stop times of welding, average welding process voltage, and electric current are measured. The average voltage and current are calculated according to Eqs. (2) and (5). The measured data is combined with MES data. The results are shown in Fig. 12, where process parameters are combined with operator and warehouse events. d) b) c) 0.5 Q 0.4 0.3 S 0.2 Q 0.1 / /A Slag removed ---Slag partially removed ......Slag not removed N=10 0.4 N=10 1 I 0.4 N=10 1 .....//\...... Y \\ // \ -..... \ r1 ••. \ _____/V _\ /____ 0.3 0.3 ■ / X ^ 0.2 1 4'' X ' / 1 0.5 0.4 0.3 0.2 -0.1 0 12 3 4 5 6 7 Time [s] 9 10 6 4 2 0 6 4 2 0 8 6 4 2 0 dN dt Fig. 11. Standard deviation of electric current signals (d) for three welds presented in Fig. 10. Accompanying distributions are presented in; a) slag not removed, b) slag partially removed, and c) slag removed dN dt dN dt 15. Apr 2011 00:00 Logged 4.5h Logged |L 5h Welding wire & sand taken Welding wire taken Fig. 12. Welding diary graphical presentation Each voltage spike represents one welding run. Together with the operator and warehouse actions, this gives a complete overview of the welding operations. Energy consumption as well as wire and sand consumption are monitored, which enables accurate cost tracking. In this way, the welding diary is completely digitalised, allowing for a detailed analysis of welding on the process and operation levels. 3 CONCLUSION In this paper a new concept of monitoring, analysis and remote recording to the welding diary is presented. Based on the concept, a pilot system has been developed, tested in laboratory conditions and implemented in industrial environment. The system is based on the Arduino microcontroller platform, online signal processing algorithms, and ZigBee wireless communication. It has been shown that the presented system is appropriate for the monitoring task where the complete concept is capable of substituting the tedious manual fulfillment of the welding diary. Furthermore, it has been shown, that the system can be upgraded with a user friendly graphical presentation, which surpasses the conventional welding diary. 4 ACKNOWLEDGEMENTS This work is supported by the EUREKA: Pro factory UES (E! 4177), Slovenian Ministry of science (L2-2001), and Grant No. 1000-09-310150. Authors wish to thank to the members of Laboratory for Welding for providing assistance in performing and interpretations of measurements. 5 REFERENCES [1] Groover, M.P. (2010). Fundamentals of modern manufacturing, 4th Edition. John Wiley & Sons, Inc, New York. [2] ISO 15609-1:2004 (2004). Specification and qualification of welding procedures for metallic materials - Welding procedure specification. International Organisation for Standardization, Geneva. [3] Chen, Q., Wang, Y. (2002). Online quality monitoring in plasma-arc welding. Journal of Material Processing Technology, vol. 120, p. 270-274, D0I:10.1016/S0924-0136(01)01190-6. [4] Sforza, P., Blasiis, D. (2002). On-line optical monitoring system for arc welding. NDT&E International, vol. 35, p. 37-43, DOI:10.1016/S0963-8695(01)00021-4. [5] Mirapeix, J., Ruiz-Lombera, R., Valdiande, J.J., Rodriguez-Cobo, L., Anabitarte, F., Cobo, A. (2010). Defect detection with CCD-spectrometer and photodiode-based arc-welding monitoring systems. Journal of Materials Processing Technologies, p. 21322139. [6] Grad, L., Grum, J., Polajnar, I., Slabe, J.M. (2003). Feasibility study of acoustic signals for on-line monitoring in short circuit gas metal arc welding. Journal of Machine Tools&Manufacture, vol. 44, p. 555-561. [7] Horvat, J., Prezelj, J., Polajnar, I., Čudina, M. (2011). Monitoring gas metal arc welding process by using audible sound signal. Strojniški vestnik - Journal of Mechanical Engineering, vol. 57, no. 3, p. 267-278. [8] Bračun, D., Polajnar, I., Sluga, A. (2010). An approach to adaptive control of GMAW based on laser profile measurement. 63rd Annual Assembly of IIW, paper XII-2004-10. [9] Rak, I., Vuherer, T., Krepek, R., Koveš, A. (1999). Quality analysis by on-line monitoring of welding process during welding. Strojniški vestnik - Journal of Mechanical Engineering, Special Edition: Design to Manufacture in Modern Industry, p. 491-501. [10] Albrecht, B. (2008). Wireless system control and inventory monitoring for welding-type devices. United States patent US20080061049. [11] Yan, C., Jianfen, C., Hongxi, H., Gaoping, L., Jiayin, W., Guohoi, Z., Junjie, Z. (2010). Dynamic monitoring system of grouping welding equipment. Chinese patent CN 201010191688 A. [12] Hidrajama, T., Okumura, S., Takaoka, K., Ohsawa, N. (2000). Arc welding monitoring device. European patent EP 1027951 B1. [13] Ivkovich, S. (2001). Method and system for weld monitoring and tracking. United States patent US 6583386 A. [14] Davidson, R.R., Flank, J.K., Cleveland, P.W. (2009). Automatic weld arc monitoring system. United states patent US 350301 A. [15] Davies, A.C. (1993). The Science and Practice of Welding, vol. 2: The Practice of Welding, 10th ed., Cambridge University Press, Cambridge. [16] Donald, K. (1998). The Art of Computer Programming, vol. 2: Seminumerical Algorithms, Addison-Wesley, Boston. [17] Higham, N.J. (2002). Accuracy and stability of numerical algorithms. Society for Industrial and Applied Mathematics, Philadelphia, D0I:10.1137/1.9780898718027.