In this paper, a spider monkey optimisation (SMO) algorithm is utilised to identify the parameters of the permanent magnet synchronous motor (PMSM), considering the parameters vary during the motor operation, which affects the sensorless control (SC) performance of the motor. An improved sliding mode observer (SOBS) is proposed for estimating the position and speed of the rotor. First, the SMO algorithm is used to identify the parameters of PMSM. Then, based on the identification results, an improved SOBS is proposed by a piecewise Sigmoid function. Furthermore, the stator position and speed are estimated by extended state observer (ESO) and phase-locked loop (PLL). Finally, a comparison simulation scenario is provided to demonstrate the efficacy of the suggested approach.