{'fraction_non_alphanumeric': 0.02668346312414109, 'fraction_numerical': 0.011108566193311955, 'mean_word_length': 4.993822923816061, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Computer diagnostics of resistance spot welding based on Hamming neural network

The article deals with utilizing the method of qualitative assessment of welding zone dynamic resistance based on a Hamming neural network to increase versatility and reliability of computer diagnostics for resistance spot welding. We propose a mechanism for encoding information on dynamic resistance into bipolar signals required for the neural network tuning and operation. The algorithm of welding diagnostics was developed and implemented with specialized software. The results of the neural network training and testing are presented. As the analysis shows, the relative error in predicting destruction force does not exceed 10%. The approach proposed in this article complies with the requirements of ISO 9000:2015 standard for continuous monitoring and documentation of each welded connection and allows for increased accuracy of computer diagnostics of welds.


Introduction
In mass production of permanent connections, resistance welding holds leading positions due to high technical and economic rates in comparison with other welding methods [1].
Thus, in the global automotive industry, billions of welded spot connections are made annually. As a rule, to prevent possible negative consequences of poor product quality, the number of welds produced significantly exceeds the required value [2].
As evidenced from practice, the quality of welded connections is influenced by such factors as current shunting, wear of welding electrodes, heating of the secondary circuit, presence of ferromagnetic inclusions, etc. To improve the quality of welding through adjusting the parameters of the welding process, automatic control systems are utilized [3].
It should be noted that the formation of a welded connection is fully characterized by dynamic resistance Rd of the welding zone (the "electrode-to-electrode" section), which includes its own resistances of parts, as well as resistances of contacts "part-to-part" and "electrode-to-part" [4,5].
The change of this resistance is described with high accuracy by simple mathematical models that allow us to assess the quality of the surfaces of welded parts and the accuracy of their assembly and, therefore, to predict the quality of welding [6]. At the same time, low Rd value and electrical disturbances make it difficult to conduct measurements and analyze their results without computer technologies.
To solve this problem, intelligent computational methods were applied, including neural networks, which increase the diagnostics accuracy of resistance spot welding by automatically adjusting Rd quantification algorithms that are implemented with specialized software [7]. However, they are not universal and require time-consuming reconfiguration to weld a new type of parts [8,9]. Thus, it is necessary to develop a universal method for computer diagnostics of resistance spot welding ensuring the reliability of the obtained results.

Methodological approach
To increase the versatility and reliability of computer diagnostics of resistance spot welding, we suggest using the method of qualitative assessment of the welding zone dynamic resistance based on a Hamming neural network [10]. Figure 1 shows a Hamming neural network that is a two-layer neural network with feedback [11,12]. The bipolar signals X1, X2,…, Xn are fed to the input of the neural network corresponding to the graph of the measured dynamic resistance Rd(t).
The first layer of the neural network contains information about pattern graphs Rd(t) in the amount of m corresponding to different welding results depending on the adopted quality criterion (bond strength, diameter of the cast core, effective heat release rate, etc.).
The second layer of the neural network is used to search for a pattern as close as possible to the set of input signals X1, X2,…, Xn. At the output of the neural network, there is one of the signals Y1, Y2,…, Ym corresponding to the number of the selected pattern. Further, we assume that the characteristics of the diagnosed connection correspond to the characteristics of the selected pattern.
To obtain bipolar signals X1, X2,…, Xn, the values of which are -1 or +1, the Rd(t) graph is transformed into a matrix of dimension [n1], for which the Rd(t) graph is rationed by linear conversion to the range [0, 1]. A rectangular grid ab = n with the same cells is imposed on the result of the transformation. If the rationed graph crosses the corresponding cell, a value of this cell is assumed to be +1 and otherwise equals -1 ( Figure 2). The cell values of the bipolar matrix obtained in this way are transmitted to the corresponding inputs of the neural network.

Welding diagnostics algorithm
The welding diagnostics algorithm based on the Hamming neural network consists of the following steps: In the process of welding diagnostics, a bipolar matrix X is fed to the neural network input. Then the state of the axons (outputs) of the first layer neurons is calculated using the formula: ( p -the iteration number of the neural network functioning.  Step 4. The output signal from each second layer neuron is calculated using the formula: fan activation function with a threshold F = m: With further functioning of the neural network, the output signals from the second layer of neurons are checked out for the presence of changes during the last iteration. If there are changes, the signals are fed through feedback to the inputs of the second layer of neurons. From this point on, the next iteration of the neural network functioning begins, and using equations (2) and (3) new output signals are calculated. If the output signals of the second layer of neurons for the last iteration have not changed, they are transmitted to the output Y of the neural network: The number of the neuron at the output Y of the neural network, the signal of which is greater than 0, corresponds to the number of the pattern closest to the input signal X.

Software implementation of the algorithm
The proposed algorithm was implemented with specialized software that allows us to automate the process of obtaining Rd(t) graphs and their conversion into bipolar matrices (Figure 3). In addition, this program provides training and functioning of the neural network and contains means of the work results visualization.
The connection of the computer with the resistance welding machine is carried out with a galvanic isolation unit, adapting interface, and a controller.
Characteristics of the network training process on a welded machine are: The welding current varied in the range of 5.5 ÷ 10.5 kA. After welding, a shear testing of the samples on the tensile machine H50KT (Tinius Olsen TMC) was performed [13].
Subject to the measurements results of 50 samples using the least squares method, the dynamics of change in destruction force of the samples depending on the welding conditions was defined [14]. 7 welding current ranges from 6.5 kA to 10 kA with 0.5 kA step were allocated, for which the Rd(t) patterns as the arithmetic mean of all experimental graphs obtained for the corresponding welding current values were built.
Then, for each Rd(t) pattern bipolar matrices were obtained and inserted into the neural network subject to formula (1).
For each pattern, its own range of destruction force was defined.
Testing of the neural network in the welding process was carried out at the welding current of 6.5, 8 and 9.5 kA for the diameter of the electrode 5, 6 and 7 mm.
The neural network compared the bipolar matrices of the test welds with previously obtained pattern matrices. As characteristics of the bond strength of the studied welded connection, the parameters of the pattern closest to it were taken. The value of the destruction force of experimental samples in most cases was found within a range of destruction force values of the corresponding pattern, while the relative error did not exceed 10%.

Conclusion
The approach proposed in article complies with the requirements of ISO 9000:2015 standard for continuous monitoring and documentation of each welded connection. To store the bipolar matrix of each weld point at the enterprise data warehouse, 24 bytes are required. It should also be noted that the stored information allows the enterprise engineers to restore formation dynamics of each point and use this data to analyze and optimize technological welding processes.
Thus, a possibility to utilize a Hamming neural network for accurate diagnostics of resistance spot welding using dynamic resistance of the welding zone is confirmed.

Acknowledgments
This work was supported by the Russian Foundation of Basic Research (Grant Agreement № NK 15-08-03125).