An Embedded System for Position and Speed Measurement Adopting Incremental Encoders