Abstract:Currently,small-and medium-power Permanent Magnet Synchronous Motor(PMSM)are confronted with issues such as poor versatility,limited scalability,low cost-effectiveness,and insufficient precision. To address these challenges,a low-power permanent magnet synchronous motor control system based on the STM32F103C6T6 is proposed in this paper. Thissystem is applicable to various driving scenarios of low-power permanent magnet synchronous motors and supports both PMSMmotors with sensors and BLDC motors equipped with Hall sensors. During the system's computational process,the 32-bit fixed-point arithmetic mathematical library IQmath is introduced, significantly enhancing the system's computational speed. Moreover,the feasibility of the algorithm is verified through the integration of an inverted pendulum system,with a combination of theoretical validation and physical testing being employed. This system is characterized by significant advantages,including high precision,low cost,strong scalability,and broad applicability.