This paper proposes an optimal controller design for a sensorless position control system of an interior permanent magnet synchronous motor. First, a novel rotor position estimation technique is proposed. This estimation technique only relates to the slopes of the stator currents, and does not relate to the parameters or operating conditions of the motor. Next, a velocity estimator is proposed to obtain the velocity of the motor. The proposed position and velocity estimators work well in transient, steady state, and standstill conditions. To improve the performance of the position control system, an optimal controller is proposed. By using this controller, a fast transient response, good load disturbance rejection capability, and satisfactory tracking ability can be achieved. A digital signal processor, TMS-320-LF-2407 is used to execute the rotor position/velocity estimation, the current-loop control, the velocity-loop control, and the optimal position-loop control. As a result, a fully digital position control system is achieved.