Design of a correlation system for speed measurement of rail vehicles