The specific control flow is as follows: first, detect the required voltage and current; second, calculate the electromagnetic torque of the synchronous motor and the phase angle between the stator flux through the transformation of the coordinate system;