motor regulation with encoder output