working closed-looped control of the motor