Abnormal Conductive State Identiﬁcation of the Copper Rod in a Nickel Electrolysis Procedure Based on Infrared Image Features and Position Characteristics

: In the nickel electrolysis industry, detection of the conductive state of copper rods is an important part of production procedure management, as abnormal conductive states of the copper rod result in a decline in the quality of the electrodeposited nickel plate. Conventional treatment consists of manual detection and handing, which is inefﬁcient and induces more problems, such as the safety of the insulation. Because abnormal conductive states are only located between the copper rod and busbar, it has obvious position characteristics, and abnormal conductive states also induce a caloriﬁc difference in a particular area, which can be detected in an infrared image. We can use the infrared feature and position characteristics to identify the abnormal conductive faults. This paper introduces a method and practice for the identiﬁcation of abnormal conductive faults in a conductive copper rod in the nickel electrolysis procedure using computer vision theory, including infrared image segmentation with position characteristics, infrared feature extraction, and conductive fault identiﬁcation with SVM (support vector machine). The result shows that the method can divide the conductive states of the copper rod into abnormal heating conditions, normal operating conditions, and open circuit conditions, with a 90% accuracy rate on the obtained samples.


Introduction
In the nickel electrolysis industry, nickel products are mainly produced through the electrolytic refining process of the nickel sulfide anode in China. During the nickel electrolysis procedure, the running state of nickel electrolytic cells is closely related to the final quality of the cathode's nickel precipitation. The conductive state of the copper rod has a significant influence on the quality of the nickel plate. An abnormal conductive state of the copper rod is mainly caused by some factors, such as excessive local contact resistance, poor contact, and a short circuit, and it leads to differences in the surface temperature distribution, which are manifested as abnormal heating conditions and open circuit conditions. This exception can lead to a decline in the quality grade of the nickel plate. Thus, it is extremely important to rapidly detect and manage abnormal conductive states of the copper rods in the nickel electrolysis procedure.
Conventional manual inspection, which has low efficiency, high labor costs, and high labor intensity, is still widely used in the nickel electrolysis industry. Different conductive states lead to different surface temperature distributions of the copper rods, which can be detected and identified in an infrared image. A reasonable solution is to identify abnormal conductive states using infrared images and the AI (artificial intelligence) classification method. On this basis, non-contact measurement and automation can be applied in the nickel electrolysis industry In the field of nickel electrolysis, Wang [1] studied and simulated the relationship between the current and surface temperature of a cathode copper rod, and the simulation results verified the feasibility of detecting the conductive state of copper rods based on infrared images. In addition to this case, less research and applications have focused on fault identification in copper rods based on infrared images. However, this method is commonly used in other fields, especially in the copper electrolysis field and electric power field, which has important value as a reference for solving the problem about the identification of the conductive states of copper rods in nickel electrolysis procedures.
In the field of copper electrolysis, Hu [2] proposed a Faster R-CNN (region-based convolutional neural network) convolutional neural network based on the focal loss function to identify short-circuit faults in copper rods. The authors of [3] proposed an automatic inspection system for the copper electrolysis procedure based on infrared images, which can identify short-circuit faults using SVM (support vector machine) with infrared image features, such as the mean gray, standard deviation, and Hu moment. The authors of [4] used the differential LBP (local binary pattern) method for infrared image feature extraction to reduce the influence of seasonal transformation and other factors, which improved the robustness of the classification model. The authors of [5] collected infrared images of a cathode copper bar of an electrolytic cell, obtained the surface temperature value, and solved the current value with COMSOL. In the field of electric power, Liang [6] proposed a method to identify the fault types of substation equipment using the relative temperature difference method based on the relationship between the equipment failure and temperature performance. The authors of [7] introduced methods for image preprocessing and feature extraction based on the infrared image of an insulator string, and realized the classification of insulator contamination grades using SVM. Then, Fu [8] used the decision tree model, which has the advantages of fast learning and intuitive and accurate classification, to identify deteriorated insulators. The authors of [9] introduced a transmission line insulator fault diagnosis method based on the binary support vector machine classifier and Bayesian optimization, which was used for the classification and recognition of the infrared spectrum in the process of insulator flashover. The authors of [10] selected six components of reciprocating compressors from an infrared image, and the average grayscale values were calculated to form 6-dimension vectors to represent the temperature distribution. Then, SVM was sued to diagnose the faults, with more than a 99% classification accuracy. According to the existing research works, state identification using infrared image features has mostly been used in long-distance monitoring or static detection while applications for near-field online detection are rare. Fault identification using infrared image features can reflect the temperature distribution and further identify the conductive states of copper rods, which is feasible for the detection of the conductive state of copper rods based on infrared images. Therefore, in this paper, this method is applied to identify the conductive state of copper rods with near-field online detection.
A nickel electrolysis workshop contains a large number of nickel electrolytic cells. Cathode and anode copper rods are placed alternately and equidistantly, which suspend cathode and anode nickel plate, respectively, by hangers. The diameters of cathode and anode copper rods are 35 and 45 mm, respectively. Both sides of the electrolytic cell have insulated partitions and busbars. In the traditional manual detection procedure, workers need to detect the conductive state of copper rods periodically by touching the copper rods and observing sparks in the instantaneous short circuit between cathode and anode copper rods. Figure 1 shows the nickel electrolytic cells and the conventional manual detection.
The conventional manual method has many disadvantages, such as low efficiency, heavy workload, high labor intensity, insulating safety, and missed detection.

Solution Method
In nickel electrolysis, cells are supplied by 12V-DC power. DC currents start from anode busbars; pass through the anode hangers, anode plate, electrolyte, cathode plate, and cathode hangers; and finally reach the cathode busbars. Figure 2 shows the current distribution of conductive copper rods. We define the contact site between the copper rod and busbars as the "conductive end", and the contact site between the copper rod and the insulated partition as the "isolated end". Due to the current shunt of the anode hangers and the current converge of cathode hangers, the current gradually decreases to 0 in the copper rod from the conductive end to the isolated end. According to the simulation results of the relationship between the current and temperature in conductive copper rods, which was studied by Wang [1] and Zhao [3], from the conductive end to the isolated end, the temperature gradually decreases and approaches the environmental temperature. Figure 3 shows the temperature distribution of conductive copper rods. In nickel electrolysis, there are three main kinds of conductive states of copper rods, namely the abnormal heating condition, normal operating condition, and open circuit condition. Different thermal effects caused by the actual current lead to different conductive states, which lead to different surface temperatures of the copper rods. Figure 4 shows infrared images of copper rods in different conductive states. It can be seen that under the normal conductive state, the cathode rod presents a uniform brightness in the infrared image, which is brighter than the anode rod; a lower brightness in the open circuit state; and a higher brightness in the short circuit state. Due to the difference in the temperature of the background (electrolytic area), misjudgment of the direct temperature reaction of the conductive states may occur. It is more reasonable to judge the conductive states by comparing the differences between adjacent areas.
In Figure 4, all copper rods are placed vertically in the infrared image, and the anode rods are coarser than the cathode rods. As the background, the electrolytic zone consists of electrolytes and pipes in cells, the mean temperature of which is higher than the copper rods, busbars, and isolated partitions.

Infrared Image Segmentation
To reduce background interference, and ensure the effectiveness of infrared image feature extraction, it is necessary to segment copper rod areas from raw infrared images.

Copper Rod Segmentation Based on the Otsu Algorithm
In the raw infrared images, obvious brightness differences between the copper rods and electrolyte area exist, with obvious edges and contour features. Therefore, this paper attempts to use global threshold methods for infrared image segmentation. The Otsu algorithm is one of the most common global threshold methods and it searches for the best global threshold by traversing the gray histogram, which maximizes the variance between the background and foreground [11]. Figure 5 shows the results of the copper rod segmentation in different conductive states based on the Otsu algorithm. In Figure 5, some pipe areas are classified as foreground in the infrared image. Moreover, the copper rod under the abnormal heating condition is not segmented well because it is much brighter than the other copper rods and easily regarded as the electrolyte background.
However, the contour and edge of the cell wall area can be segmented well using the Otsu method. So, the approximate vertical position of the cell wall edge can be located by searching for the position of the white-black jump points in a certain range from the bottom of the binary image [12,13]. Figure 6 shows the searching result. In Figure 6, the black lines represent the approximate vertical position of the cell wall edge in the grayscale image. It only covers the areas of the copper rods, insulated partitions, and busbars, and avoids the electrolyte areas being covered as much as possible. The areas of the conductive states that we are focused on are below the cell wall edge lines.

Copper Rod Segmentation Based on the Region Growing Algorithm
The global threshold method has certain limitations because of the gray properties of some areas, such as copper rods, pipes, and electrolytes, in grayscale images. The gray properties in each copper rod area are similar. We can use the local region growing algorithm to segment each of the copper rods in grayscale images.

Selection of Initial Seeds
In the grayscale image, all copper rods with a fixed width are placed vertically and equidistantly, which are darker than the electrolyte area. The vertical gray mean shows differences in x-axis direction and the copper rod areas have the characteristics of a low gray mean. So, the initial seed selection for each copper rod can be determined by analyzing the mean, variance, and jump-edge of the pixel set in the copper rod area [14].
In this paper, we trim a 320 × 100 captured image from an original 320 × 320 grayscale image without isolated partitions and busbars. There are obvious differences between wide copper rod areas and electrolyte areas. Figure 7 shows the trimming procedure and distribution of vertical gray mean along x axis. The initial seed selection for wide copper rods can be determined by traversing the vertical gray mean on the x axis and analyzing the mean, variance, and jump-edge in the scatter plot [15]. The algorithm steps used to search for the initial seed for the wide copper rod is described as follows: (1) Traverse all horizontal positions in the captured image, calculate the vertical gray mean at each position, and store it in array named verticalMean. (2) According to the width of the wide copper rod, set a variable named WinSlideSize for the sliding window length and initialize WinSlideSize to be equal to 20. (3) Traverse array verticalMean, enter step (4), and start to search for the position of the wide copper rod in the valley when the traversal results meet the following conditions: (4) Traverse array verticalMean from the index i, and calculate the variance in the sliding window named verticalMean [j:j+WinSlideSize]. When the variance is less than 5 for the first time, record the position as the start. When the variance is greater than 5 for the first time, the position is recorded as the end. (5) The positions of the initial seed for the wide copper rod are (start + end)/2, which are recorded in the array named WideRodPos. Then, return to step (3) and continue to traverse until all initial seeds of all wide copper rods are found. Figure 8 shows an illustration of all initial seeds for the wide copper rod after applying the above algorithm. It also shows the initial seeds for narrow copper rods, which can be selected using the same method.

Growing Criteria and Stopping Condition
The growth criterion of the region growing algorithm is a comparison rule used to determine the similarity between the seed and adjacent pixels or regions for extension to a larger region [16,17]. The stopping condition is a condition used for stopping regional growth if it does not match the growth criteria or exceeds the growth range [18,19]. In this paper, the gray difference discrimination method is used as the growth criterion and the limiting growth range condition is used as the stopping condition to segment each of the copper rods in the infrared image.

Gray Difference Discrimination Method
The gray difference discrimination method is used to calculate the absolute value of the gray value difference between the seed pixel and the neighborhood pixel. If it is less than a threshold T, the pixel is classified in the region where the seed is located for neighborhood extension at the seed position. Usually, four-neighborhood or eightneighborhood expansion methods are used [20][21][22]. Figure 9 shows an illustration of the neighborhood expansion methods.

Limiting Growth Range Condition
Because, in infrared images, copper rods with a fixed width are placed vertically and equidistantly, the growth area can be limited to roughly cover a single copper rod width. Therefore, the position of pixel I(i, j) in different growth areas should match the following conditions: In Equation (2), x is the position of the initial seed for the copper rod on the x-axis, and EdgePos is the position of the cell wall edge on the y-axis. Figure 10 shows an illustration of the limiting growth range condition.

Result of the Copper Rod Segmentation
To segment the border of the copper rod and eliminate the interference in the electrolyte area as much as possible, the width of the boundary rectangle can be appropriately contracted. Figure 12 shows the result of the copper rod segmentation.

Fault Identification
After infrared image segmentation, we can analyze and extract infrared image features, which are constructed as an infrared feature vector of the conductive copper rod. Then, a classification model is chosen to identify the abnormal conductive states.

Infrared Feature Extraction
We obtained 120 rod sample segmentations from the obtained samples through infrared image segmentation, which were regrouped in 40 sample sets. Each set includes three different samples and reflects three different conductive states.
In each set, brightness differences of the three sample segmentations exist, and uneven gray distributions and gray gradient distributions under the abnormal heating condition are observed. These different items can be described as follows: (1) Gray mean (mean) The gray mean reflects the average temperature of the copper rod. The higher the gray mean is, the higher the temperature of the copper rod: where M and N are the number of rows and columns of the copper rod sample gray image I.
(2) Gray standard deviation (std) The gray standard deviation reflects the discrete degree of the surface temperature distribution of the copper rod. The larger the value of the gray standard deviation, the higher the dispersion degree of the temperature: The mean gradient reflects the gradient variation of the copper rod surface temperature. From the conductive end to the isolated end, the temperature in the copper rod gradually decreases and approaches the environmental temperature. Gray gradient variation can be quantified in rod sample segmentations and this gradient variation is obvious under the abnormal heating condition but not clear under the other conditions. Figure 13 shows the gradient variation in different directions. In Figure 13, the gradient variation in the y-axis direction is not obvious in all conductive states, but in the x-axis direction, gradient variation is more obvious under the abnormal heating condition than the others. So, the mean gradient of the sample segmentations in the x-axis direction can be used as an infrared image feature and is defined as follows: To reduce the computation burden of the mean gradient, the result of the square root is approximately replaced by the absolute value: With the properties of translation, rotation, and scale invariant, the Hu moment is calculated and used as an image feature to identify copper rods under different conductive states [20]. For discrete two-dimensional images of M × N, the p + q order discretization origin moment is defined as follows: To offset the influence of the change in the positon on the moment calculation in the target area and make it translation invariant, the p + q order center moment is defined as follows: In Equation (8), (x c , y c ) is the gray centroid coordinate of the image target, x c = m 10 /m 00 , y c = m 01 /m 00 .
The normalized center moments are defined as follows: On the basis of two-order and three-order normalized center moments, Hu moments can be defined as follows (the first three of seven) [22]: Actually, conventional Hu moments include seven invariant moments, but after comparing all rod sample segmentations, it is found that only the first three Hu moments (Φ 1 , Φ 2 , Φ 3 ) show obvious differences, which are used for the image feature in this paper. Hu moments always have a large range and can be negative values. The parameter H i is defined, which is the natural logarithm value of the absolute values of Hu moments: (5) Gray difference between the target copper rod and the isolated end of the adjacent copper rod (D) To reduce the influence of the environmental temperature on the identification results, the gray difference can be used to identify differences in the infrared feature between the target copper rod and the isolated end of the adjacent copper rod because the mean gray in the area of the isolated end represents the current environmental temperature. D is defined as follows: where mean1 is the gray mean of the target copper rod area; M 1 and N 1 are the number of rows and columns; mean2 is the gray mean of the adjacent copper rod area, which is used for comparison; N 1 is the number of columns; and the number of rows is limited to 40. Figure 14 shows an illustration of the calculation method for the infrared feature D.  Table 1 shows the results of infrared feature extraction and the fault labels for part of the rod sample segmentations. The fault labels for the abnormal heating state, normal operation state, and short circuit state are set to 0, 1, and 2, respectively.

States Identification Based on Support Vector Machine
In Table 1, there are obvious differences in the infrared feature for the mean, std, and D, and setting a threshold seems to be an effective way to identify the conductive state types of the copper rod. However, when we apply this method to the obtained samples, the threshold identifying method cannot achieve an adequate accuracy. In general, SVM is more suitable for applications to limited samples and multidimensional image features [23,24].
SVM is a classical machine learning model with strict mathematical proof and strong interpretability, which has an excellent generalization ability on limited samples and has been widely used in infrared image recognition [25]. For fault identification in the conductive copper rod, SVM can reasonably predict and estimate the unknown dependency between the infrared feature input and fault label output, which tries to search for the best separating hyperplane in the infrared feature space.
This paper uses the soft margin support vector machine with RBF (radial basis function) to accomplish the fault identification task. SVM can tolerate some misclassification samples and avoid overfitting to a certain extent [26]. The original constraint problem for soft margin support vector machines is defined as follows: where x is the input sample feature vector, y is the classification label, w is the weight distribution of SVM through iterative calculation, ξis the relaxation variable introduced for each sample point, C is the adjustable penalty coefficient, and a is the Lagrange coefficient. The dual problem of soft margin support vector machines is defined as follows: As a kernel function, with the characteristics of less super-parameters, less calculation, and a strong learning ability, RBF can not only implicitly map sample data points to an infinite dimensional space but also calculate the product of high-dimensional feature vectors in a low-dimensional feature space. RBF is defined as follows: In the SVM classification model, the parameter γ of RBF and the penalty coefficient C of the soft interval SVM need to be adjusted. The parameter γ affects the distribution of the sample data in the high-dimensional feature space. Moreover, the penalty coefficient C is used to balance the size of the classification margin and accuracy of the model. To obtain an SVM model with a strong generalization ability, in this paper, the grid search method and kfold cross validation method are used to identify the optimal super-parameter combination. Figure 15 shows the accuracy distribution map of the SVM model with the 5-fold cross validation method under different super parameter combinations. When C * = 1.4 and γ * = 0.1, the classification accuracy of SVM reaches 92.1%.
Finally, this paper selects the above optimal hyper-parameter combination to verify the performance of the SVM model for state identification using the obtained samples. Each state type contains 40 sample data, in which 30 are selected as training sets. The remaining samples form the test sets. After training, the classification accuracy of SVM reaches 90% using the test sets. Table 2 and Figure 16 show the classification results of the models using the test sets.   Only three copper rod samples under the abnormal heating condition are misclassified. Due to copper rust on the surface of the conductive copper rod and an insufficient infrared transmission effect, some sample images show irregular dark patches or texture, resulting in similar infrared feature distances. Figure 17 shows the comparison chart of one misclassified sample and the other two samples with the correct prediction.  Table 3 shows the results of the infrared feature extraction of these three samples. Further infrared feature distances are observed between sample a and b, but the infrared feature sample a is closer to that of sample c in the feature space, so the fault state of sample a can easily be misclassified as a normal operating condition. At present, this method of conductive state identification can achieve a 90% accuracy on the obtained samples, so it has a certain practical significance for engineering applications. However, this method still has some defects and cannot identify individual samples well due to the close feature distance among these samples. For infrared image feature extraction, this paper mainly focuses on the global features of the sample while ignoring the local features. In the future, we can make full use of the obvious gradient change in the copper rod, and then introduce local features, such as the fluctuation amplitude, to increase the discrimination between samples. Moreover, to improve the generalization ability of the classification model, we need to expand the sample set and we can attempt to use models, such as the deep learning network, to achieve a higher accuracy.

Conclusions
This study used the infrared image features and position characteristics of the copper rod as much as possible, and realized image segmentation based on the local region growing algorithm. After infrared feature extraction, SVM was trained to identify the conductive state types, and the accuracy reached 90% on the obtained samples and matched the automatic detection requirements. However, this method still has some defects because the sample types are not comprehensive enough. Some misclassifications were identified due to the close feature distance among individual samples. In the future, to improve the generalization ability of the classification model, we need to expand the sample set and attempt to introduce local features, such as the fluctuation amplitude, to increase the discrimination between samples.