Research on Fault Detection Algorithm of Pantograph Based on Edge Computing Image Processing

Traditional pantograph detection technology has installed a large number of various types of sensors on the pantograph, which is not conducive to the ﬂow characteristics of the pantograph. Traditional detection technology can neither monitor the operation status of the pantograph in real time, nor guarantee the safe operation of the entire train. The existing schemes are only manual solutions, and intelligent real-time monitoring is performed without error, and a lot of labor costs are required. Focusing on the shortcomings of traditional pantographs in sliding plate wear and sliding plate crack detection, an improved mean ﬁltering algorithm is proposed to optimize the image of pantograph, and the adaptive Canny edge detection technology is used to accurately calculate the skateboard wear. Firstly, the improved image algorithm is used to pre-treat the pantograph slide wear and crack length, then the improved mean ﬁltering algorithm is combined with adaptive Canny operator for image optimization detection, and ﬁnally the edge calculation is used for crack identiﬁcation. An optimized real-time on-line detection technology is proposed, which can accurately measure the wear and tear of skateboards and cracks. For different experimental environments, the optimization algorithm proposed in this paper is used to detect pantographs in real time. The experimental results show that, compared with the traditional detection algorithm, the detection accuracy of sliding plate wear can reach 0.5 mm, and and that of sliding plate cracks can reach 0.4 mm. The crack recognition accuracy of skates is as high as 93%.


I. INTRODUCTION
With the rapid development of urban traffic track technology, safe and comfortable traffic has become a hot spot of concern [1]. The emergence of high-speed electrified trains has met people's needs to a certain extent. In order to ensure the safety and reliability of electrified trains, each train has zero. Realtime monitoring of components becomes very important [2].
The pantograph component is the only way for the train to obtain electrical energy [3]. Therefore, the state of the pantograph during operation determines the safety and reliability of the train operation. During the operation of the pantograph, it is necessary to consider the influence of its own structure, running path, train speed and weather conditions. As a result, the crack and loss of the pantograph slide is a common phe-The associate editor coordinating the review of this manuscript and approving it for publication was Rongbo Zhu . nomenon in train operation. The serious impact on the power supply stability of the train may even lead to the suspension of the train during operation [4]. Therefore, it is very important to monitor the operating state of the pantograph in real time and reduce its failure rate [5]. Edge computing refers to an open platform which is close to the object or data source and adopts core capabilities of network, computing, storage and application. The edge of the network can be any functional entity between the data source and the cloud computing center. These entities carry the edge computing platform that integrates the core capabilities of network, computing, storage and application, and provides real-time, dynamic and intelligent service computing for end users.
The traditional pantograph detection method is based on the manual scheme [6]. The disadvantage of this scheme is that the state of the pantograph cannot be monitored in real time, which requires a large amount of labor costs [7]. The image detection algorithm is based on high-speed industrial cameras, fill light and electric sensors. The laser detection algorithm based on laser displacement sensor detection has the advantages of strong anti-interference ability, accurate measurement and good consistency. However, this method has the disadvantages of complicated modeling and high price, which is not conducive to wide-scale promotion [8,9]. The ultrasonic detection algorithm is based on the ultrasonic sensor to detect the pantograph in real time. The disadvantage is that it is easily interfered by the external environment and has unstable problems [10], [11].This method easily leads to inaccurate detection and false alarms, increasing the cost of manual inspections. The laser detection algorithm proposed in this paper is based on laser displacement sensor detection [12], [13]. This method combines edge intelligent algorithms for image analysis and laser detection [14], [15]. It has the advantages of strong anti-interference, accurate measurement and good consistency [16], [17].
The edge mainly refers to the region where the local gray scale of the image to be processed is abrupt or the gray value changes sharply [18], [19]. Edge detection techniques are the key of image processing techniques [20], [21]. One of the main detection objects is to detect pixel points with sharp grayscale transformation in the image [22], [23]. The main links of the technology are as follows: image filtering processing, image enhancement processing, edge detection and edge connection, which are mainly solved in edge detection technology [24], [25]. The edge gray scale is discontinuous, and the diversity and complexity of the measured object cause the image edge to have uncertainty and ambiguity and noise interference. Based on the above discussion, the difficulties of edge detection technology can be summarized as follows [26], [27]: 1) The choice of filter size. As is proportional to the scale, the denoising ability of the algorithm depends on the size of the filter. However, if the filter is too large, the image details will be lost [28], [29]. On the contrary, if the size is too small, it will contain a lot of false edge information. Therefore, the choice of size is challenging in edge detection, which requires specific analysis to compromise [30].
2) The problem of edge connections. The noise of the image and the influence of the processing steps will cause the edge of the image to break. This type of edge is called a weak edge. The detection of a weak edge will bring a lot of false edges [31], [32]. How to accurately detect weak edges while bringing into the false edge is also one of the concerns [33].
3) The setting of the detection threshold. The main function of the detection threshold is to distinguish between edge points and non-edge points. If the threshold is too high, the real edge will be lost. If the threshold is too low, too many false edges will be introduced [34]. Therefore, a reasonable setting of the threshold size is also of significance [35], [36].
The specific contributions of this paper include: (1)An improved mean filtering algorithm is proposed to optimize pantograph images. (2)Adaptive canny edge detection is used to calculate the wear of slide accurately. (3)An optimized real-time on-line detection technique is proposed to accurately measure the wear and crack of the slide.
The rest of this paper is organized as follows. In Section 2, Edge detection technology and canny operator are discussed, followed by the optimal design of skateboard loss algorithm, optimized filtering algorithm, adaptive canny operator and second generation curvelet transform crack detection algorithm designed in Section 3. Experiment and analysis of results is discussed in Section 4. Section 5 concludes the paper with summary and future research directions.

II. PROPOSED SCHEME A. OPTIMAL DESIGN OF THE SKATEBOARD LOSS ALGORITHM
In order to improve the accurate calculation of the skateboard loss value [37], the skateboard loss optimization algorithm proposed in this paper mainly uses two sets of CCD cameras to shoot the half bow and analyze the corresponding pictures. Based on the digital processing technology, the upper and lower edges of the electric bow skateboard are detected. Using the optimized camera calibration algorithm, the distance between the upper and lower edges of the skateboard is obtained to calculate the remaining thickness. In order to improve the detection accuracy under severe weather conditions, the distance between the upper edge of the skateboard and the lower edge of the bracket has been detected. The remaining slide thickness is obtained by subtracting the thickness of the slide bracket from the distance. The optimized detection scheme is shown in Figure 1: In the filtering technique of pantograph image detection, this paper proposes an optimized filtering algorithm, which is mainly based on advanced boundary distinguishing noise detection algorithm (ABDND) and mean filtering algorithm, as well as processing the pantograph image with ABDND algorithm. At the same time, the average filtering algorithm is used to process the Gaussian noise in the pantograph image, and the two filtering algorithms are combined to implement the comprehensive filtering processing of the pantograph image.

1) ADVANCED BOUNDARY DISTINGUISHING NOISE DETECTION ALGORITHM (ABDND)
The optimized ABDND filtering scheme proposed in this paper mainly aimed at dealing with the impulse noise in the pantograph picture, which is based on the improved and VOLUME 8, 2020 optimized version of the adaptive switch median filtering algorithm. It is mainly divided into three phases as follows: 1) Stage one In the noise pixel detection phase, the range of noise pixels is obtained by histogram processing, and the noise pixels and non-noise pixels are distinguished according to the basis.
2) Stage two In this stage, in order to verify the noise pixel stage, information statistics of peripheral pixel points are performed around the point that is initially determined to be a noise pixel, and the authenticity of the pixel point is judged at the same time. Otherwise, the signal would be immediately corrected to a non-noise point.
3) Stage three At this stage, the noise pixels are filtered, and the phase of the second phase is determined as the noise pixel by the adaptive switch median filtering algorithm.
The specific implementation process of the optimized ABDND algorithm proposed in this paper is as follows: 1) Pixel detection stage The difference between the obtained global gray histogram and the adjacent gray histogram can be obtained as: In which, H is the gray value,the maximum value and the minimum value of the above difference values are taken out, with the index values of the maximum value and the minimum value of the difference value being obtained according to the pixel boundary value: In which, T is the pixel value, the matrix filter window is used to scan the pixels of the pantograph image, and the center point of the filter window coincides with the pixel to be measured, with the maximum gray level and the minimum gray level in the window being counted. The arithmetic expression of the obtained identification matrix is as follows: In which, r is a matrix, whether the pixel is noise or nonnoise mainly depends on the gray value of r(i,j). If the gray value is 1, it is a noise pixel, otherwise it would be a non-noise pixel.
1) Noise pixel review stage If the phase 1 is judged as a temporary noise pixel, the pixel point needs to be further confirmed, and the temporary pixel noise point is taken as the center to make a w * w rectangular window, with the number of non-noise pixel points in the window being counted at the same time. Discussion of two situations are as follows: If the number is larger than the window w, calculate the pixel difference between the non-noise pixel and the center temporary noise pixel in the window, sum the sum as d, and determine the pixel by combining the maximum value and the minimum value of the image gray level. The noise point judgment threshold T3, if d < T 3, it is not a noise pixel point, otherwise it would be judged as a noise pixel point, and the value of T3 is calculated as: If the number is less than or equal to the window w, then w+2 is re-assigned to w, and the pre-determination noise pixel points are overwritten again.
(3) Noise pixel filtering stage The noise pixels judged in phase one and phase two are filtered, and the median filtering scheme is mainly adopted.

2) OPTIMIZED MEAN FILTERING ALGORITHM
For the Gaussian noise of the pantograph image, this paper proposes an optimized mean filtering algorithm based on the local depolarization weighted mean filtering algorithm. The basic principle is as follows: the filter window with N * N is centered on the pixel to be filtered, and all the points in the window are sorted by the gray value, the maximum value and the minimum value are removed, and the remaining pixels are weighted. The value is assigned and weighted, with the result being used as the new output gray value to achieve the purpose of noise reduction.
The specific implementation steps are as follows: The image processed by the impulse noise filtering is processed by the sliding window W , and the mean value in the set H is first obtained: Normalized pixel weight processing according to: D k is the absolute value of the difference between the gray value and the gray mean of each point in the set H , and its expression is as: H k is the mean of all D k in the set, which is used as the threshold for selecting the weight of each point. Its expression is as: All the points are multiplied and summed in the set H with the corresponding weights, and the value is used as the output gray value of the center point of the filtering window instead of the original gray value of the point, thereby achieving the purpose of denoising and calculating. The formula is: 84654 VOLUME 8, 2020 In this paper, an adaptive canny operator is proposed based on the canny operator. First, based on the noise filtering algorithm in Section 3.1, the pantograph image is filtered, and then is subjected to concavity analysis to obtain edge detection. In order to reduce the interference of image noise, the gradient calculation is performed by 3 * 3 convolution when calculating the image gradient, and the template is: Then the first derivative of the pixel in the horizontal vertical direction is as shown: Then the corresponding gradient magnitude M[i,j] can be defined as:  The gradient direction can be defined as: The relationship between the edge and the gradient is shown in Figure 3: In order to refine the edge of the edge of the existing ridge belt, this paper adopts the method of maximal value suppression to achieve the refinement of the marginalization. The second-generation curvelet crack detection algorithm proposed in this paper is based on the second-order curvelet decomposition of different characteristic cracks to obtain a set of cell coefficients of a matrix with different directions. The different crack features on the skateboard will be represented by different direction matrices. According to the analysis, each feature has a different distribution law and will be reflected in the curvelet coefficient. This paper will VOLUME 8, 2020   analyze the curvelet coefficient of a typical skateboard crack, as shown in Figure 5. The slider consists of the same size and size, but the second slider on the left has a crack: 3-layer curvelet decomposition is performed on the abovementioned skateboard image, and the detail layer is composed of 16 direction matrices, with the angle of the first matrix being −22.5-0, and the rear matrix being deduced by analogy, thereby depending on the directional characteristics of different images in the image. The corresponding coefficient matrix can be found. According to Figure 5, the key features of the two aspects are extracted as follows:

1) COEFFICIENT CHARACTERISTICS OF THE BAFFLE SKATEBOARD SCRATCH
The long-term contact line connection of the pantograph will cause scratches on the entire skateboard. This type of scratches are generally distributed in a strip shape. From a global perspective, the scratches are mainly distributed between 45 and 135. The gray value is larger than the normal gray value of the skateboard, but is smaller than the gray level of the edge of the skateboard. Therefore, the corresponding curvelet coefficient should be larger than the background coefficient and the distribution should be relatively balanced., and the distribution is relatively balanced.

2) CHARACTERISTICS OF THE CRACK OF THE PANTOGRAPH SLIDE
Under the impact of the external force, the crack of the sliding plate is generally vertical, showing a prominent boundary. The distribution of cracks has a certain regularity, being mainly distributed between 45 and 135.
Based on the above analysis, the graphical elements of the skateboard image can be divided into three typical types: cracks, gaps, and spurious faults. According to these characteristics, this paper proposes a second generation curvelet transform crack identification algorithm, the specific algorithm is as follows: Assuming that the size of the skateboard image is M * N, it is divided into n layers, wherein the n−1 layer is composed of 1 direction matrix, and each direction matrix represents different decomposition directions, with 135 direction corresponding to the curve decomposition curve. For the lkth direction matrix, the matrix can be represented as c{n−1}{k}, and the matrix size is M' * N'. As shown in FIG. 3.5, a window composed of parallelograms of two directions 135 is constructed. Wherein the width of the quadrilateral is 2b+1, the vertical height is the number of matrix columns N , the spacing of adjacent parallelograms is a, the shaded portion of the matrix is set to 1, and the rest is set to 0, and the corresponding formula is as follows.
The parallel window is used to process the matrix of the curvelet decomposition coefficient direction: The rectangular window is started from the first column of the curve decomposition direction matrix, and is shifted to the right by the length of step=1, and the energy and SPW of the window are respectively obtained. In this way, a onedimensional vector of an element is obtained, and the extreme value is obtained according to: (16) The position of the crack of the sliding plate can be quickly located according to the position of the detected extreme value.

A. NOISE FILTERING EXPERIMENT
Based on the noise filtering optimization algorithm proposed in this paper, the traditional filtering scheme is compared with the experimental algorithm in this paper under the same experimental condition. The variance is 0.1 in Figure 6(a), 8(b) and 8(c). The pulse noise image, the traditional median filter effect map and the optimized ABDND filter effect diagram are proposed in this paper. Figure 7 (a), 9(b) and 9(c) show an impulse noise image with a variance of 0.2 and the corresponding traditional median filtering effect map and optimized ABDND renderings.
As shown in the figure, when the noise variance reaches 0.3, the ABDND algorithm proposed in this paper is obviously advantageous. In order to compare the two algorithms more intuitively, the advantages of the proposed algorithm are reflected, and the filtered image is MSE and PSNR. The calculation results are shown in Table 1:   As can be seen from the data in the figure, the ABDND optimization algorithm used in this paper is significantly better than the traditional median filtering method.
For a single Gaussian noise filter, the image obtained by the optimized mean algorithm in the same experimental conditions and the traditional mean filtering process are shown in Figure 8, Figure 9: The MSE and PSNR calculations for image are shown in Table 2; The stereogram display is shown in Figure 10.

B. EDGE DETECTION EXPERIMENT
Edge detection experiments were performed on the left half of the pantograph under the same condition. The traditional canny detection algorithm and the optimized adaptive canny detection algorithm proposed in this paper were used respectively. In order to reflect the advantages of the proposed algorithm more objectively, the MSSIM value is calculated for the edge-detected graph. The relevant indicators are shown in Table 3: The edge detection diagram is shown in Figure 11.
As can be seen from Figure 11 above, all index values of the adaptive canny edge detection algorithm proposed in this  paper are greater than the index values of the traditional canny edge detection algorithm.

C. SKATE CRACK DETECTION EXPERIMENT
The second-generation curvelet crack detection algorithm proposed in this paper is applied to crack detection in Figure 4, and the detected image is shown in the Figure 11 below. As shown in the Figure12, the position and length of the crack can be well detected by the algorithm proposed in this paper.

IV. CONCLUSION
The detection accuracy of the pantograph real-time detection algorithm in the skateboard wear and the crack length of the skateboard has great advantages compared with the traditional algorithm. In the image noise filtering, this paper proposes an ABDND-based optimized mean noise detection method. The optimization algorithm makes the image of the pantograph cleaner. Edge computing enables real-time or faster data processing and analysis,which brings data processing closer to the source than to an external data center or cloud, thereby reducing latency. In the edge detection technology, an adaptive canny operator is used to replace the traditional canny operator, which has a great performance improvement in edge detection. In summary, the optimization algorithm proposed in this paper is more advantageous than the traditional optimization algorithm.
HONGSHENG LI received the Master of Engineering degree in information communication engineering from the Huazhong University of Science and Technology, China, in 2008. He is currently a Lecturer with the School of Intelligent Manufacturing, Huanghuai University. His current research interests include embedded systems and information communication networks. VOLUME 8, 2020