The invention provides a method for improving speed control precision by optimizing an FOC
algorithm, and relates to the technical field of
motor control, and the method comprises the following steps: S1, obtaining a speed PI controller and a
magnetic flux PI controller in the FOC
algorithm; s2, the speed ring PI controller calculates and outputs Uq through the target speed given value and the angular speed; s3, the flux PI controller calculates and outputs Ud through the
flux weakening given value and the feedback value; and S4, after the Uq and the Ud are subjected to PARK inverse transformation, the Uq and the Ud are input to CLARK inverse transformation or SVPWM, a
control signal is modulated and output through a
microcontroller, and a three-phase motor is driven to operate. According to the method, on the basis of a traditional FOC
algorithm, calculation of a
current loop Iq is removed, and Uq is directly calculated and output through a
speed loop PI, so that the influence of current sampling interference on speed control precision can be effectively avoided, the calculation time of the
current loop is effectively shortened, the
system control delay is reduced, and the motor operation stability is improved.