Abstract:As the traditional linear lumped parameter model of permanent magnet synchronous motor (PMSM) could not describe the harmonic current in the simulation stage, a distributed parameter model of PMSM based on fieldprogrammable gate array (FPGA) was constructed. The model reflected the characteristics of cogging torque and air gap magnetic field. The hardwareintheloop (HIL) platform was built to test the model. Through the analysis of the model formula, the model was discretized and compiled with Verilog language, and then run on FPGA. By connecting the model with a real controller, experiment was conducted to verify the response of the model to harmonic current at different operating points. The results showed that the simulation platform could better reflect the harmonic current of the motor.