Dynamics Of A Motor In A Mechanical System