MFL_PIG (Magnetic Flux Leakage detector) is the most widely used long-range pipeline inspection equipment to detect corrosion condition of the pipeline and thus to avoid serious pipeline accidents. In order to collect the diameter information of the pipeline, geometry pig (also called diameter analyzing system) is used before applying the MFL_PIG. In this paper, the hardware design of a new modern smart diameter analyzing system which is suitable for detecting cracks and corrosions in the pipeline with different diameters is introduced. Miles round system,as one of important part of the system, is investigated in detail. A pulse optimum algorithm for miles round system is put forward and its principle and realization method is discussed. Reverse time algorithm is adopted in miles round system to solve the problem of location precision. In the end, one of the verification tests is given to measure reliability of the system and results showed that the optimum algorithm works well when frequency of the analog block wave is in the range of 100Hz to 1MHz.