The dynamic performance of a permanent magnet synchronous motor (PMSM) is influenced practically by uncertainties in parameters including external load disturbance and inertia variation. This paper presents robust control to maintain dynamic performance of a PMSM with system inertia variation and external disturbance effects. The proposed algorithm used an extended Kalman filter (EKF) to identify system inertia accurately and then tuned the parameters of the speed controller. Furthermore, the estimated inertia is sent to adjust the reference model of the disturbance observer, and the estimated disturbance torque is fed forward to adjust the electromagnetic torque reference simultaneously. Both control units, system identification and disturbance observer, adaptively correct each other's estimated parameters. The proposed speed control scheme is implemented on a PMSM driver by a digital signal processor (DSP) platform, and the performance effectiveness is verified through MATLAB/Simulink simulations and experiments. To confirm its validity, the proposed speed controller is also compared with an industrial PMSM controller in real-time experiments under different practical conditions.