Keywords

1 Preface

In the past decades, China has made great progress in machine manufacturing industry. As an important part of machine manufacturing, welding technology plays a vital role in the development of manufacturing industry. Traditional quality monitoring method cannot obtain the defect information by non-destructive method and the timeliness is insufficient, which cannot meet the needs of society. People prefer to use external sensor science to realize online quality monitoring.

CMT (Cold Metal Transition) is a new technology developed by Fronius Company for continuous alternate welding of “hot-cold-hot”. Compared with traditional MIG/MAG welding technology, there are two different kinds: firstly, the wire feeding of CMT is for the reciprocating motion of feeding/retracting; secondly, the droplet transfer is performed under the condition of no current. CMT has the advantages of low heat input, stable arc, no spatter and high reliability. It effectively improves the defects of MIG/MAG and is widely used in various fields.

During the welding process, the electrical signal of the arc exhibits periodic fluctuations, and the electrical signal of the arc is closely related to the stability of the welding. The effective information of the arc electric signal is extracted by statistical method, and the relationship model between the welding quality and electric signal is established. For GMAW, Li et al. extracted the independent component of current and voltage signal matrix in the welding process, and realized the online quality detection of GMAW process [3]. According to the assessment on stability of aluminum alloy pulsed MIG welding, Shi et al. proposed an analytical method based on the probability density of arc voltage signal. The ratio of first peak value and second peak value in voltage signal probability density distribution was taken as the criterion to assess the pulsed MIG welding of aluminum alloy [4]. For the stability analysis of CO2 arc welding process, Gao et al. respectively adopted autocorrelation distribution, probability density distribution, time frequency distribution and other methods to quantitatively analysis the stability of welding process [5,6,7]. Aiming at the process stability of underwater wet electrodes arc welding, Hu et al. collected instantaneous value of arc voltage for underwater wet manual arc welding at different welding conditions, and then, the instantaneous value of voltage was processed statistically and evaluated quantitatively based on standard deviation [8]. However, these methods can not realize online detection in the welding process, lacking timeliness and cannot effectively find the causes of defects formation and adjust the parameters timely. Therefore, it is necessary to research online defect detection system to monitor welding defects and improve production efficiency.

In order to find out the hidden relationship between electrical signals of different shielding gas flow rates and realize online defect detection, this paper applies data mining algorithms to analyze electrical signal data. In the field of data mining algorithms, Apriori algorithm is a classic algorithm for mining frequent itemsets and association rules. The Apriori algorithm uses a priori knowledge or assumption to define the problem, and then mines frequent itemsets and potential rules. These rules will help us identify the cause of weld quality defects and adjust welding parameters timely.

This paper mainly research the difference of electrical signals in CMT welding process under different shielding gas flow rates. The Apriori data mining algorithm is used to mine different frequent sets of electrical signals in CMT welding process under different shielding gas flow rates. The FPGA is designed to automatically acquire frequent sets of CMT welding cycles and determine whether the confidence level is reached. Therefore the shielding gas flow rate levels are identified and use the mining result to control shielding gas flow rate.

2 Experimental Device

The ZYNQ7000 chip model is XC7Z020CLG400-2 from Xilinx. The AD conversion module is the AD7607. The CMT welding process was used in the experiment. The specific welding parameters are shown in Table 1. The physical diagram of system device is shown in Fig. 1.

Table 1. Welding parameters
Fig. 1.
figure 1

Physical diagram of system device

3 System Design

The online quality detection system designed in this paper adopts the Zynq7000 board based on ARM+FPGA SOC technology, which is responsible for data sampling, data analysis and processing, and Keypad communication with the welder control system. The overall block diagram of the system solution is shown in Fig. 2.

Fig. 2.
figure 2

System block diagram

3.1 Current Signal Sampling Module

Welding current signal sampling module includes AD conversion module and Gigabit network port transmission module. It can realize the real-time sampling and transmission of current signals.

The model of AD conversion module is AD7607, which supports the sampling rate of 8 channels at 200KSPS with 16 bits accuracy. The chip integrates input amplifier, over-voltage protection, filter and high-speed interface. It can satisfy requirement of the experiment. The converted data is stored in DDR3, and finally the Gigabit Ethernet port is controlled to upload the data in DDR3 to the PC for later analysis by the Apriori algorithm. The experimental network port transmission uses the LWIP protocol, which is a lightweight IP protocol that is applicable to both the operating system and stand-alone operation on FPGA.

Before experiment, we should verify the correctness of the current signal sampling module. Signal generator is used to provide a sinusoidal signal with a frequency of 1 kHz, a high level of 5 V, and a low level of 0 V to the CH1 channel of AD7607. The ZYNQ board is connected to the PC through the network port and opens the PC software. The waveform data displayed is shown in Fig. 3.

Fig. 3.
figure 3

Waveform simulation diagram of current signal sampling module

It can be seen from Fig. 3 that the period of the waveform diagram is 1 ms, the high level is 5 V, and the low level is 0 V. The current sampling module satisfies the experimental requirements.

3.2 Apriori Algorithm Processing Module

The Apriori algorithm processing module includes a data analysis processing module and an LED display module. The data analysis processing module first arranges the collected current data into an m × n matrix L on the PC (n represents the number of samples in a CMT cycle, and m represents the number of CMT cycles. Due to the instability of the CMT cycle, the shortest CMT duration is taken as a CMT period). Then discretize the sampled current data and obtain matrix D. The specific process is as follows:

Each column of the matrix corresponds to the same time in the CMT cycles, and each column of current data can be equally divided, and expressed as follows:

$$ z_{j} = \left[ {MAX\left( {L_{j} } \right) - MIN\left( {L_{j} } \right)} \right]/N $$
(1)

In Eq. (5), Lj is all current data in j-th column; zj is the interval value in the j-th column current data N is equally divided. MAX (Lj) is the maximum value in j-th column current data, MIN (Lj) is the minimum value in j-th column current data.

Discretizing the current data of each column, the current data has different chronological order, that is, the same current value belongs to different items at different period. So the interval of the values after discretization of each column current data is different. The equation is expressed as follows:

$$ \left\{ {\begin{array}{*{20}c} {l_{ij} < MIN\left( {L_{j} } \right);c = 1} \\ {MIN\left( {L_{j} } \right) + \left( {c - 2} \right) \times z_{j} < l_{ij} \le MIN\left( {L_{j} } \right) + \left( {c - 1} \right) \times z_{j} ;c \in \left[ {2,N + 1} \right]} \\ {l_{ij} > MAX\left( {L_{j} } \right);c = N + 2} \\ \end{array} } \right. $$
(2)
$$ d_{ij} = \left( {N + 2} \right) \times \left( {j - 1} \right) + c $$
(3)

In Eq. (6), \( {\text{l}}_{\text{ij}} \left( {{\text{i}}\, = \,1,\,2\, \ldots \,{\text{m}};\,{\text{j}}\, = \,1,\,2\, \ldots \,{\text{n}}} \right) \) is the real current value in matrix L, and in Eq. (7), dij is the discretized value in matrix D.

For each lij, we use Eq. (6) to obtain c, and the used Eq. (7) to obtain the discretized value dij. Finally, we set appropriate support and confidence for data mining, and obtain the classification results.

When carry out online welding experiment, firstly, the interval thresholds of several correlation points in the classification result are set on the ZYNQ board, and the number of periods satisfying the correlation points is counted, and the ratio of the period of the correlation point to the total count of the CMT period is used as the judgment index. According to the obtained classification result, the corresponding LED light is lighted.

3.3 Keypad Communication Module

In this device, Keypads on ZYNQ board are used to send a signal to IO port to control shielding gas flow rate. Keyboard KEY1 sends 01 to IO port to increase the shielding gas flow rate, and key KEY2 sends 10 to IO port to reduce it. The welder can select the applicable shielding gas flow rate, according to the classified result.

4 Association Rules and Definition of Apriori Algorithm

  1. (1)

    Items and ItemSets

    $$ {\text{I}} = \left\{ {i_{1} ,i_{2} , \ldots \ldots i_{n} } \right\} $$
    (4)

In Eq. (1), I is a set of all items, called itemset. Among them, ik (k = 1, 2 … , n) is called item, and the set of items containing K items is called K itemset.

  1. (2)

    Transactions and transaction sets

Each transaction T consists of several items, and T belongs to a subset of itemset I. Each independent transaction T has a unique identifier TID to identify. A transaction set D is composed by all independent transactions together.

  1. (3)

    Association Rules

Association rules can be expressed as an implication of X => Y (\( ^{{\prime }} \Rightarrow^{{\prime }} \) is called Association operation), where X and y are subsets of itemset I, but not empty sets, however the intersection of X and Y is empty sets. The equation is expressed as follows:

$$ \left\{ {\begin{array}{*{20}c} {X \subset I} \\ {Y \subset I} \\ {X \cap Y =\Phi } \\ \end{array} } \right. $$
(5)
  1. (4)

    Support and Confidence

The support degree sup of association rules is defined as follows:

$$ \sup \left( {{\text{X}} \Rightarrow {\text{Y}}} \right) = {\text{P}}\left( {{\text{X}} \cup {\text{Y}}} \right) $$
(6)

Represents the probability of a transaction containing \( {\text{X}} \cup {\text{Y}} \) in transaction set D. That is, the ratio of the transaction containing the item sets X and Y to the transaction set D, and the degree of support represents the frequency of occurrence in rules.

The confidence con of association rules is defined as follows:

$$ {\text{con}}\left( {{\text{X}} \Rightarrow {\text{Y}}} \right) = \frac{{SUP\left( {X \cup Y} \right)}}{{{ \sup }\left( X \right)}} $$
(7)

Represents the probability that in transaction set D, a transaction that contains X will contain Y. Confidence reflects the probability that another event will appear at the same time after an event occurs. The higher the confidence, the higher the credibility of the rule and the more trustworthy it is.

Apriori algorithm is a classical data mining algorithm for mining frequent itemsets and association rules. Apriori algorithm extracts frequently occurring data sets from a large data set, and then deriving strong rules based on these frequent itemsets. The process consists of connection (class matrix operation) and pruning (removal of intermediate items that do not conform to support). The goal of Apriori algorithm is to find the largest itemset. It uses an iterative method to first count the set of 1 items that satisfy the support, which is the set of frequent 1 items. Then connect the frequent 1 itemsets, remove those 2 itemsets that do not satisfy the support degree, and the frequent 2 itemsets are obtained. Iterating these processing until no maximum frequent candidate set is produced.

5 Experimental Design and Analysis

5.1 Current Signal Sampling and Analysis

First sample current data under three different shielding gas flow rates and the result is shown in Fig. 4. It can be seen from the figure that there is a significant difference among the electrical signals under different shielding gas flow rates, and the length of the CMT welding cycle is also inconsistent. The result shows one CMT phase is larger than 16 ms and the corresponding sample point is 800.

Fig. 4.
figure 4

Current signal under different shielding gas flow rates

In order to use Apriori algorithm to mine the relationship between current data under different shielding gas flow rates, it is necessary to discretize the current data, and divide the data of each column into 18 intervals. The first value of the current rising edge and the current value greater than 100 A is taken as the first sampling point. We set different identifiers for the three shielding gas flow rates, for 25 L/min, the identifier is defined as 20000, for 10 L/min, the identifier is defined as 20001, for 0 L/min, the identifier is defined as 20002. The current data after discretization is shown in Table 2.

Table 2. Discrete transformed current data

In the specific mining classification process, we firstly mine the association rules under the shielding gas flow rate of 25 L/min. After data mining, the effective correlation points are analyzed and compared, as shown in Fig. 5.

Fig. 5.
figure 5

Effective correlation point under 25 L/min of shielding gas flow rate

The shielding gas flow rate of the mid-range is 10 L/min. After data mining, the effective correlation points are analyzed and compared, as shown in Fig. 6.

Fig. 6.
figure 6

Effective correlation points under 107 L/min of shielding gas flow rate

The shielding gas flow rate of the low gear position is 0 L/min. After data mining, the effective correlation points are analyzed and compared, as shown in Fig. 7.

Fig. 7.
figure 7

Effective correlation point under 0 L/min of shielding gas flow rate

Thus, the shielding gas flow rate 10 L/min can be distinguished from the shielding gas flow rate 0 L/min and 25 L/min by the effective correlation points shown in Fig. 8, and the six correlation points are 170th, 175th, 199th, 201th, 240th and 273th, namely Rule 1. The current value intervals of these six points are derived, as shown in Table 3. However, Rule 1 cannot distinguish the shielding gas flow rate of 25 L/min and the shielding gas flow rate of 0 L/min, thus we need further analysis.

Fig. 8.
figure 8

Rule 1

Table 3. Current intervals of Rules 1 and 2

Then, we should distinguish the shielding gas flow rate of 25 L/min and 0 L/min. According to the above method, the data of each column is re-divided into 8 intervals, and the obtained effective correlation points are as shown in Figs. 9 and 10 respectively. Therefore, the six associated points including 105th, 110th, 113th, 114th, 115th, and 131th that distinguish the shielding gas flow rate of 25 L/min and 0 L/min can be determined, namely Rule 2. As shown in Fig. 11. The current value intervals of these six points are derived, as shown in Table 3.

Fig. 9.
figure 9

New effective correlation point under 25 L/min of shielding gas flow rate

Fig. 10.
figure 10

New effective correlation point under 0 L/min of shielding gas flow rate

Fig. 11.
figure 11

Rule 2

5.2 Testing and Verification of Different Shielding Gas Flow Rates on Line

After obtaining the classification rule, the accuracy of the rule needs to be verified on the ZYNQ board, and the current signals after the AD conversion are simultaneously judged by the Rules 1 and 2, that is to say, the CMT periods satisfying the associated points are respectively counted. Since the minimum confidence is set as 0.75 during data mining on the PC side. Therefore, for every 100 CMT cycles, if 75 CMT cycles can satisfy the associated points, they are considered to be in compliance with the rules. If it satisfies Rule 1, the shielding gas flow rate can be directly judged to be 10 L/min, and the LED 2 is lighted. If it satisfies Rule 2, it can be judged that the shielding gas flow rate is 25 L/min and the LED 1 is lighted. If the two rules are not satisfied, it can be judged that the shielding gas flow rate is 0 L/min and the LED 3 is lighted.

In the online welding experiment, after abundant experiments, the LED lights can be lighted correctly. In order to increase the accuracy of the conclusion, 15 channels of shielding gas flow rate are selected. The current of each welding is exported through the Gigabit Network port, and the confidence of the correlation points is calculated at PC. The confidence of Rule 1 and Rule 2 is shown in Table 4.

Table 4. Confidence of Rules 1 and 2

In Table 4, the confidence of the current data with the shielding gas flow rate of 10 L/min is greater than the minimum confidence set by the Apriori algorithm (0.75), and the confidence of the current data of the shielding gas flow rate of 25 L/min and 0 L/min is less than the minimum confidence degree. That is to say Rule 1 is able to distinguish the shielding gas flow rate of 10 L/min from the shielding gas flow rate of 25 L/min and 0 L/min.

At the same time, the confidence of the current data with the shielding gas flow rate of 25 L/min is greater than the minimum confidence level set by the Apriori algorithm of 0.75, and the confidence of the current data of the shielding gas flow rate of 0 L/min is less than the minimum confidence. That is to say Rule 2 is able to distinguish the shielding gas flow rate of 25 L/min and 0 L/min.

In addition, similar shielding gas flow experiments were carried out with spectral data under TIG welding process. In the experiments, the shielding gas flow rates were 25 L/min, 10 L/min and 3 L/min respectively. Through data mining, three kinds of rules for shielding gas flow were found. The confidence levels of Rule 1 and Rule 2 are shown in Table 5. Rule 1 can distinguish the shielding gas flow rate of 25 L/min from the shielding gas flow rate of 10 L/min and 3 L/min. Rule 2 can the shielding gas flow rate of 25 L/min 3 L/min. The experimental results demonstrated the effectiveness of using data mining to distinguish shielding gas flow rate.

Table 5. Spectral confidence of Rules 1 and 2

6 Conclusion

In this paper, in order to overcome the drawbacks of traditional welding quality detection methods, an online quality detection method based on Apriori data mining algorithm is proposed. The ZYNQ board is used as a carrier to distinguish the welding electrical signals under different shielding gas flow rates. The following conclusions are obtained:

  1. (1)

    In the CMT process, the electrical signals have different rules under different shielding gas flow rates.

  2. (2)

    A novel current data mining algorithm based on Apriori algorithm is proposed. The experimental results show that the algorithm can successfully identify the differences of current data under three different shielding gas flow rates, and the ZYNQ board is used to realize online identification of shielding gas flow rate.

  3. (3)

    The conclusion of the experiment has been demonstrated by abundant experiments, and the current data is collected for offline verification, which has good accuracy and robustness.