Nonlinear position control using microprocessor