Գրեք սա: An optimal algorithm for estimating angular speed using incremental encoders