| Levitation gap signal detection is an important part of the magnetic levitation control system.The study of gap sensor technology can improve the performance and accuracy of the detection system.The levitation gap detection is characterized by the inability to measure in direct contact.Machine vision detection based on deep learning has achieved great success in non-contact measurement in recent years,so this paper uses it in levitation gap detection.This paper studies the visual sensor based on the experimental platform of the levitation ball system.The main work of this research is to design a visual detection scheme and a binary neural network model.The algorithm is reorganized and optimized.This model is applied to the FPGA with limited hardware resources,and the accurate measurement of the levitation gap is realized through the design of software and hardware.The model is tested and validated.Firstly,the vision detection scheme is proposed by analyzing the working principle of the machine vision levitation ball system.A suitable image processing development platform is selected according to the characteristics of the scheme.The collection method and steps of the levitation ball clearance samples are designed,and the levitation ball clearance samples are preprocessed.Then the levitation ball gap sample dataset is calibrated and collected.Two gap models,conventional BNN and Gap BNN,are built based on the binarized neural network algorithm.The structural design and parameter optimization of the two gap models are completed through experiments.The different models are compared and validated through the regression model evaluation index.Experiments show that the detection error of the model can be controlled within ±0.3mm,and the average error of the Gap BNN model is 0.105 mm and the linearity is 1.67%.Finally,,the levitation gap data transmission and memory models are designed according to the characteristics of the FPGA platform.The optimal solution is obtained by analyzing the transmission efficiency and resource consumption at different degrees of parallelism.The XNOR operation,accumulation operation and threshold judgment are used to replace the convolution operation,batch normalization operation and activation operation to realize the reorganization and optimization of the structure.The resource usage of various optimization strategies is compared and analyzed.The accuracy,noise interference effect and speed of the levitation gap visual detection system are tested and analyzed by building test environment.It is verified that the performance index of the levitation gap visual detection sensor meets the requirements of the levitation ball control system. |