Design and Implementation of Monitoring Controller for Switch Machine Gap Based on Image Processing

The switch machine is a vital device for operating railway turnouts and plays an important role in safe running of train. Abnormal working state of switch machine will affect safety of railway transportation. Therefore, it is necessary to monitor the working state of switch machine timely. The switch machine gap is an important indication of its working state, due to the complicated external environment, the traditional methods and the image-based methods for monitoring switch machine gap are hard to satisfy the application demands. To solve this problem, this paper proposes a new detection algorithm for switch machine gap. Firstly, the raw image is downsampled and the detection region of the gap is determined by matching the characteristic of the detection column and indication rod in the downsampled image. Secondly, multiple image processing techniques and the RANSAC (Random Sample Consultation) algorithm are used to obtain the gap’s pixel distance in the detection region. Finally, the gap’s real distance is calculated by the mathematical relationship between its pixel distance and its real distance. Based on the proposed algorithm, a monitoring controller for the switch machine gap is designed and evaluated on the ZD(J)9 switch machine. The experimental results show that the performance of the monitoring controller satisfies the application requirements, and the switch machine gap can be monitored in real-time and accurately, which makes the railway transportation more reliable and safety.