Aiming at the problem that the extended Kalman filter (EKF) estimation algorithm has insufficient anti-interference performance when the load is sudden, a permanent magnet synchronous motor (PMSM) inertia compensation method based on EKF is proposed. Using EFM to obtain the state parameters such as the position and speed of the motor, a load disturbance observer is established to identify and compensate the disturbance inertia. Compared with sensorless speed PMSM vector control based on EKF, the simulation results show that PMSM inertia compensation based on EKF has better anti-interference performance and robustness.