A driving method and device of a permanent magnet synchronous motor

By increasing the current loop execution frequency and PWM carrier frequency of the permanent magnet synchronous motor, the problem of insufficient encoder accuracy was solved, the control bandwidth and dynamic response speed of the current loop were improved, and the stability and accuracy of the servo system were enhanced.

CN121618904BActive Publication Date: 2026-05-05ZHEJIANG HECHUAN TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG HECHUAN TECH
Filing Date
2026-02-03
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In existing technologies, the encoders of permanent magnet synchronous motors have low accuracy, resulting in insufficient speed loop control accuracy and stability, which affects the performance of the servo system.

Method used

By increasing the execution frequency of the current loop relative to the speed loop and the PWM carrier frequency, and by employing high-frequency current loop regulation calculations and multiple updates of the PWM drive signal, the control bandwidth and dynamic response speed of the current loop are enhanced.

Benefits of technology

It significantly improves the control bandwidth and dynamic response speed of the current loop, and enhances the anti-disturbance capability and tracking accuracy of the servo system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121618904B_ABST
    Figure CN121618904B_ABST
Patent Text Reader

Abstract

This invention discloses a driving method and apparatus for a permanent magnet synchronous motor (PMSM). The method involves acquiring the actual speed feedback signal of the PMSM, performing speed loop adjustment calculations at a first control frequency based on the speed deviation between the speed command and the actual speed feedback signal, and generating a current command. Based on the current deviation between the current command and the actual current sampling value of the PMSM, performing current loop adjustment calculations at a second control frequency, and generating a voltage vector control signal. Since the second control frequency is N times the first control frequency and M times the PWM carrier frequency, the pulse width of the PWM drive signal can be updated M times within one PWM carrier cycle according to the voltage vector control signal to drive the PMSM. This application significantly improves the control bandwidth and dynamic response speed of the current loop by increasing the execution frequency of the current loop relative to the speed loop and the PWM carrier frequency, thereby enhancing the anti-disturbance capability and tracking accuracy of the entire servo system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control, and in particular to a driving method and apparatus for a permanent magnet synchronous motor. Background Technology

[0002] Permanent magnet synchronous motors (PMSMs), characterized by high efficiency, high power density, and excellent controllability, have become core actuators in the servo drive field. To achieve high-performance control of PMSMs, a three-loop closed-loop architecture based on field-oriented control is commonly adopted, including a position loop, a speed loop, and a current loop. This architecture relies on precise real-time rotor position and speed feedback. However, to control costs, many industrial applications typically use incremental encoders with low pulse counts per revolution as position sensors. However, these encoders have low accuracy, especially at low speeds. The sparse pulse count per unit time leads to significant quantization errors and update delays in real-time speed feedback, making it difficult to improve the control accuracy of the speed loop and consequently affecting the stability of the servo system. Summary of the Invention

[0003] The purpose of this invention is to provide a driving method and apparatus for a permanent magnet synchronous motor. By increasing the execution frequency of the current loop relative to the speed loop and the PWM carrier frequency, the control bandwidth and dynamic response speed of the current loop are significantly improved, thereby enhancing the anti-disturbance capability and tracking accuracy of the entire servo system.

[0004] To address the aforementioned technical problems, this invention provides a driving method for a permanent magnet synchronous motor, comprising: acquiring an actual speed feedback signal of the permanent magnet synchronous motor; performing speed loop adjustment calculation at a first control frequency based on the speed deviation between a speed command and the actual speed feedback signal, and generating a current command; performing current loop adjustment calculation at a second control frequency based on the current deviation between the current command and the actual current sampling value of the permanent magnet synchronous motor, and generating a voltage vector control signal; the second control frequency being N times the first control frequency, and the second control frequency being M times the PWM carrier frequency, where M and N are both integers greater than 1; and updating the pulse width of the PWM drive signal M times according to the voltage vector control signal within one PWM carrier cycle to drive the permanent magnet synchronous motor.

[0005] Preferably, the method further includes: acquiring the actual position feedback signal of the permanent magnet synchronous motor; performing position loop adjustment calculation at a third control frequency based on the position deviation between the position command and the actual position feedback signal, and generating the speed command; wherein the first control frequency is L times the third control frequency, and L is an integer greater than 1.

[0006] Preferably, before performing current loop regulation calculation at a second control frequency and generating a voltage vector control signal based on the current deviation between the current command and the actual current sample value of the permanent magnet synchronous motor, the method further includes: setting M current acquisition times within each PWM carrier cycle; acquiring the actual current sample value of the permanent magnet synchronous motor at each of the M current acquisition times; and after each acquisition of the actual current sample value, performing current loop regulation calculation at a second control frequency based on the current deviation between the current command and the actual current sample value of the permanent magnet synchronous motor, and generating a voltage vector control signal.

[0007] Preferably, the PWM carrier is a triangular wave; among the M updates performed within one PWM carrier cycle, at least two updates are performed at the peak and trough of the triangular wave.

[0008] Preferably, obtaining the actual speed feedback signal of the permanent magnet synchronous motor includes: obtaining an A-phase pulse signal and a B-phase pulse signal output by an encoder, wherein the A-phase pulse signal and the B-phase pulse signal are orthogonal signals; calculating a first actual speed feedback signal using a first T method based on a first pulse period of the A-phase pulse signal or the B-phase pulse signal; generating a composite pulse signal based on the A-phase pulse signal and the B-phase pulse signal, wherein the composite pulse frequency of the composite pulse signal is higher than the pulse frequency of the A-phase pulse signal or the B-phase pulse signal, and calculating a second actual speed feedback signal using a second T method based on a second pulse period of the composite pulse signal; if the speed command is greater than a preset speed threshold, then the first actual speed feedback signal is determined as the actual speed feedback signal; if the speed command is not greater than the preset speed threshold, then the second actual speed feedback signal is determined as the actual speed feedback signal.

[0009] Preferably, generating a composite pulse signal based on the A-phase pulse signal and the B-phase pulse signal includes: performing logical operations based on the edge changes of the A-phase pulse signal and the edge changes of the B-phase pulse signal to obtain the composite pulse signal.

[0010] Preferably, the first actual speed feedback signal is calculated using the first T method based on the first pulse period of the A-phase pulse signal or the B-phase pulse signal, including: counting the pulses of a high-frequency clock pulse signal between two adjacent rising edges of the A-phase pulse signal or the B-phase pulse signal, and determining a first high-frequency clock pulse count value; determining the first pulse period based on the ratio between the first high-frequency clock pulse count value and the high-frequency clock pulse frequency of the high-frequency clock pulse signal; determining a first unit mechanical rotation number based on the encoder resolution, wherein the first unit mechanical rotation number is the number of mechanical rotations of the rotor of the permanent magnet synchronous motor when the encoder generates one pulse of the A-phase pulse signal or the B-phase pulse signal; and determining the ratio between the first unit mechanical rotation number and the first pulse period as the first actual speed feedback signal.

[0011] Preferably, the second actual speed feedback signal is calculated using the second T method based on the second pulse period of the synthesized pulse signal, including: determining the frequency ratio between the synthesized pulse frequency and the pulse frequency of the A-phase pulse signal or the B-phase pulse signal; counting the pulses of the high-frequency clock pulse signal between two adjacent rising edges of the synthesized pulse signal, and determining a second high-frequency clock pulse count value; determining the second pulse period based on the ratio between the second high-frequency clock pulse count value and the high-frequency clock pulse frequency; determining a second unit mechanical rotation number based on the product between the encoder resolution and the frequency ratio, wherein the second unit mechanical rotation number is the number of mechanical rotations of the rotor of the permanent magnet synchronous motor when the synthesized pulse signal generates one pulse; and determining the ratio between the second unit mechanical rotation number and the second pulse period as the second actual speed feedback signal.

[0012] Preferably, the method further includes: if the first pulse period or the second pulse period is greater than a preset time threshold, then determining the actual operating speed of the permanent magnet synchronous motor as the minimum operating speed, and generating the actual speed feedback signal based on the minimum operating speed.

[0013] To solve the above-mentioned technical problems, the present invention provides a driving device for a permanent magnet synchronous motor, comprising: a memory for storing a computer program; and a processor for implementing the steps of the driving method for the permanent magnet synchronous motor as described above when executing the computer program.

[0014] This application provides a driving method and apparatus for a permanent magnet synchronous motor (PMSM). It acquires the actual speed feedback signal of the PMSM, performs speed loop adjustment calculations at a first control frequency based on the speed deviation between the speed command and the actual speed feedback signal, and generates a current command. Based on the current deviation between the current command and the actual current sampling value of the PMSM, it performs current loop adjustment calculations at a second control frequency, generating a voltage vector control signal. Since the second control frequency is N times the first control frequency and M times the PWM carrier frequency, the pulse width of the PWM drive signal can be updated M times within one PWM carrier cycle according to the voltage vector control signal to drive the PMSM. In summary, this application significantly improves the control bandwidth and dynamic response speed of the current loop by increasing the execution frequency of the current loop relative to the speed loop and the PWM carrier frequency, thereby enhancing the anti-disturbance capability and tracking accuracy of the entire servo system. Attached Figure Description

[0015] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A schematic flowchart illustrating a driving method for a permanent magnet synchronous motor provided in this application;

[0017] Figure 2 This application provides a schematic diagram of the connection between an MCU and an FPGA.

[0018] Figure 3 This application provides a schematic diagram of a PWM drive signal in a conventional technical means.

[0019] Figure 4 A timing diagram provided for this application;

[0020] Figure 5 A block diagram for calculating current loop regulation provided in this application;

[0021] Figure 6 A schematic diagram of an A-phase pulse signal, a B-phase pulse signal, and a synthesized pulse signal provided in this application;

[0022] Figure 7 A schematic diagram of the drive system for a permanent magnet synchronous motor provided in this application;

[0023] Figure 8 A schematic diagram of the structure of a drive device for a permanent magnet synchronous motor provided in this application;

[0024] Figure 9 This is a schematic diagram of the structure of a computer-readable storage medium provided in this application. Detailed Implementation

[0025] The core of this invention is to provide a driving method and device for a permanent magnet synchronous motor. By increasing the execution frequency of the current loop relative to the speed loop and the PWM carrier frequency, the control bandwidth and dynamic response speed of the current loop are significantly improved, thereby enhancing the anti-disturbance capability and tracking accuracy of the entire servo system.

[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] Please refer to Figure 1 , Figure 1 A flowchart illustrating a driving method for a permanent magnet synchronous motor provided in this application, the method comprising:

[0028] S11: Obtain the actual speed feedback signal of the permanent magnet synchronous motor.

[0029] Because the driving accuracy of a permanent magnet synchronous motor depends on the feedback accuracy of the actual speed, if the encoder resolution is low, leading to a decrease in the feedback accuracy of the actual speed, the calculation accuracy of the speed loop cannot be guaranteed, resulting in an inability to obtain accurate current commands and reduced stability of the servo system. For example, fancy sewing machines are used in the field of intelligent industrial sewing machines, and are automated sewing machines integrating mechanics, electronics, and control. They can be used in garment processing and bag and accessory manufacturing industries. The operation of a fancy sewing machine requires the precise coordination of its various internal systems. Among them, the spindle system, as the action reference of other systems, is a key part of the entire fancy sewing machine. The operational stability and speed control accuracy of the spindle system directly affect the overall performance and product quality of the fancy sewing machine. The spindle system includes the spindle driver and motor, as well as the feed mechanism, thread hooking mechanism, and thread take-up mechanism found in traditional sewing machines. The motor in the spindle system is usually an AC permanent magnet synchronous motor. Furthermore, the encoders used in pattern sewing machines have a relatively low resolution, typically 360-line incremental encoders. In contrast, the encoders used in AC permanent magnet synchronous motors in other applications usually have a resolution of at least 131072 or 2500 lines or higher. Therefore, improving the speed control accuracy of permanent magnet synchronous motors using 360-line incremental encoders presents a challenge.

[0030] A pattern sewing machine system mainly includes, but is not limited to, an operation panel, a controller, a driver, a drive motor, and a sewing machine head. The operation panel provides the user with an interface for editing sewing parameters; the controller receives control parameters from the operation panel and sends position commands to the drivers of each motor to coordinate the movement of each axis. The driver, drive motor, and sewing machine head can be further divided into a main spindle system, a moving frame system, a presser foot system, and a thread-cutting system. The moving frame system, presser foot system, and thread-cutting system work in coordination with the main spindle system to achieve free sewing in the pattern sewing machine. The main spindle system includes a permanent magnet synchronous motor driver, an AC permanent magnet synchronous motor, a piercing mechanism, a thread-hooking mechanism, and a thread-taking mechanism. The piercing mechanism, thread-hooking mechanism, and thread-taking mechanism are connected by cranks, connecting rods, and cams. The piercing mechanism pierces the fabric, forms the needle-thread loop required for the stitch near the needle hole, and exits the fabric, forming the stitch with the help of other structures. For every revolution of the AC permanent magnet synchronous motor in the main spindle system, the needle in the piercing mechanism moves up and down once. In the main spindle system of a pattern sewing machine, an AC permanent magnet synchronous motor drives the hook-and-loop mechanism via gears or a transmission shaft. This mechanism guides the hook-and-loop tip into the needle loop, enlarging it and allowing the needle thread and shuttle thread to interweave to form a stitch. The take-up mechanism supplies and retrieves needle thread to the fabric feeding and hook-and-loop mechanisms during sewing. The moving frame feeding system clamps the fabric and feeds it according to a preset program, driven by X and Y axis motors. These X and Y axis motors are typically stepper motors. During the pattern sewing process, the presser foot applies pressure to the fabric through up-and-down movement. After sewing, the thread trimming system completes the thread trimming. The presser foot's up-and-down movement is also typically driven by a stepper motor, usually referred to as the Z-axis.

[0031] The working principle of a fancy sewing machine is as follows: The operator inputs the fancy pattern command through the control panel. The controller decodes the command, converting the coordinates of the pattern into the displacement required for the moving frame, and then sends the displacement command to each driver to move the motors. Simultaneously, the permanent magnet synchronous motor in the spindle system drives the needle insertion mechanism, thread hooking mechanism, and thread take-up mechanism to sew. The speed of the needle's up-and-down movement in the needle insertion mechanism and the direction, displacement, and speed of the moving frame must be closely coordinated. At the same time, the presser foot system applies pressure to the fabric during sewing to ensure the smoothness and integrity of the fancy sewing stitches.

[0032] Since all systems in a fancy sewing machine work together based on the spindle system, the spindle system is the control core of the fancy sewing machine. The steady-state performance and speed control accuracy of the spindle system will affect the sewing quality of the fancy sewing machine. Therefore, the stable control of the permanent magnet synchronous motor in the spindle system is a prerequisite for the normal operation of the fancy sewing machine.

[0033] Therefore, when driving a permanent magnet synchronous motor (PMSM), obtaining the actual speed feedback signal of the PMSM is fundamental for speed loop regulation calculations. Specifically, an incremental encoder or resolver mounted on the motor shaft of the PMSM is typically used as a position sensor to detect the rotor position of the motor in real time. By performing differential or derivative calculations on the position signal, such as calculating the position increment per unit time, the actual speed feedback signal of the PMSM can be obtained.

[0034] S12: Based on the speed deviation between the speed command and the actual speed feedback signal, perform speed loop adjustment calculation at the first control frequency and generate current command.

[0035] By comparing the speed command with the actual speed feedback signal, the speed deviation is obtained. The speed deviation is then input to the speed loop regulator at the first control frequency for speed loop regulation calculation. Based on the speed deviation, the current command corresponding to the torque output of the permanent magnet synchronous motor required to achieve the speed command is calculated.

[0036] S13: Based on the current deviation between the current command and the actual current sampling value of the permanent magnet synchronous motor, perform current loop regulation calculation at the second control frequency and generate a voltage vector control signal; the second control frequency is N times the first control frequency and M times the PWM carrier frequency, where M and N are both integers greater than 1.

[0037] The actual current of the permanent magnet synchronous motor is sampled to obtain actual current sample values. Specifically, the stator phase currents of the permanent magnet synchronous motor, such as the U-phase current and V-phase current, can be sampled and converted into actual current sample values ​​in the synchronous rotating coordinate system using Clarke and Park transformations, i.e., q-axis actual current sample values ​​and d-axis actual current sample values. The current command calculated by the speed loop regulation is compared with these actual current sample values ​​to obtain the current deviation. For example, if the current command is a q-axis current command and a d-axis current command, the q-axis current command is compared with the q-axis actual current sample value to obtain the q-axis current deviation, and the d-axis current command is compared with the d-axis actual current sample value to obtain the d-axis current deviation. Current loop regulation calculation is performed at a second control frequency higher than the first control frequency used in the speed loop regulation calculation, the current deviation is calculated, and the output is used for voltage vector control signals. Since the second control frequency is N times that of the first control frequency, the bandwidth and response speed of the current loop are significantly improved. This enables the current loop to accurately track the current command given by the speed loop with high dynamic performance, that is, to execute the current command of the current loop quickly, thereby quickly suppressing the current fluctuation caused by back EMF, parameter changes or load disturbances, thus ensuring the improvement of the dynamic performance of the entire system.

[0038] S14: Within one PWM carrier cycle, the pulse width of the PWM drive signal is updated M times according to the voltage vector control signal to drive the permanent magnet synchronous motor.

[0039] Since the second control frequency for performing current loop regulation calculations is M times the PWM (Pulse Width Modulation) carrier frequency, and M is an integer greater than 1, then within one PWM carrier cycle, M current loop regulation calculations can be performed, and the pulse width of the PWM drive signal can be updated M times accordingly. The updated PWM signal drives the power switching transistors of the three-phase inverter, ultimately controlling the motor operation. Because the update frequency of the current loop regulation calculation and the pulse width of the PWM drive signal, i.e., the second control frequency, is M times the PWM carrier frequency, multiple updates of the PWM drive signal pulse width are achieved within the same PWM carrier cycle. This not only minimizes the control delay of the current loop (as in traditional current loop regulation calculations, where only one current loop regulation calculation is performed per PWM carrier cycle and the PWM drive signal pulse width is updated only after 1.5 PWM carrier cycles), but when M is 2, two current loop regulation calculations can be performed per PWM carrier cycle, and the PWM drive signal pulse width can be updated only after 0.5 PWM carrier cycles. This improves the execution efficiency of the current command generated by the speed loop regulation calculation, thereby improving the tracking efficiency of the speed command and enhancing the dynamic response capability of the system. Furthermore, multiple updates of the PWM drive signal pulse width within the same PWM carrier cycle ensure a smoother current waveform and smaller torque ripple when driving the permanent magnet synchronous motor, resulting in smoother operation and lower noise for the permanent magnet synchronous motor.

[0040] In summary, by increasing the execution frequency of the current loop relative to the speed loop and the PWM carrier frequency, this application significantly improves the control bandwidth and dynamic response speed of the current loop, thereby enhancing the anti-disturbance capability and tracking accuracy of the entire servo system.

[0041] Based on the above embodiments:

[0042] As a preferred embodiment, the method further includes: acquiring the actual position feedback signal of the permanent magnet synchronous motor; performing position loop adjustment calculation at a third control frequency based on the position deviation between the position command and the actual position feedback signal, and generating a speed command; wherein the first control frequency is L times the third control frequency, and L is an integer greater than 1.

[0043] In this embodiment, when driving the permanent magnet synchronous motor, position loop adjustment calculation is also introduced, that is, the speed command in the speed loop adjustment calculation is obtained through position loop adjustment calculation.

[0044] Specifically, the actual position feedback signal can be, but is not limited to, the actual position of the permanent magnet synchronous motor rotor acquired in real time by a high-precision position sensor, such as a photoelectric incremental encoder, an absolute encoder, or a rotary transformer. Then, the pulse signal output by the encoder is processed by a decoding and counting circuit and converted into digital position information, such as mechanical angle or linear displacement, thereby providing an accurate and continuous actual position feedback signal for position loop adjustment calculation.

[0045] Furthermore, the position command can be, but is not limited to, a target position command issued by the host computer. During the position loop adjustment calculation, the position command is compared with the actual position feedback signal to obtain the position deviation. This position deviation is input to the position loop regulator, and the position loop adjustment calculation is executed at a third control frequency, thereby outputting the speed command. The speed command defines the magnitude and direction of the target motion speed required to eliminate the position deviation and serves as the input for the speed loop adjustment calculation, ensuring that the permanent magnet synchronous motor smoothly and accurately approaches and stabilizes at the target position corresponding to the position command.

[0046] Since the position loop is the outer loop of the velocity loop and the velocity loop is the inner loop of the position loop, the system stability is ensured by ensuring that the first control frequency when performing the velocity loop adjustment calculation is L times the third control frequency when performing the position loop adjustment calculation, thus ensuring that the inner loop frequency is higher than the outer loop frequency.

[0047] As a preferred embodiment, before performing current loop regulation calculation at a second control frequency and generating a voltage vector control signal based on the current deviation between the current command and the actual current sampling value of the permanent magnet synchronous motor, the method further includes: setting M current acquisition times within each PWM carrier cycle; acquiring the actual current sampling value of the permanent magnet synchronous motor at each of the M current acquisition times; and after each acquisition of the actual current sampling value, performing current loop regulation calculation at a second control frequency based on the current deviation between the current command and the actual current sampling value of the permanent magnet synchronous motor, and generating a voltage vector control signal.

[0048] In this embodiment, M current acquisition times are preset within each PWM carrier cycle. The setting of each current acquisition time needs to be synchronized with the PWM carrier waveform. For example, when the PWM carrier is a centrally symmetrical triangular wave carrier and M=2, the two current acquisition times are set before the trough and the peak of the triangular wave, respectively, and avoid the switching moment of the power switching device, so as to avoid the huge voltage change generated at the moment of the power switching device being turned on or off, which would interfere with the accuracy of current sampling.

[0049] Before each pre-set current acquisition time, such as at the current sampling time, the system's sampling circuit, triggered by the control logic, synchronously samples the phase current of the permanent magnet synchronous motor, such as the U-phase current and the V-phase current. Since M current samples are performed within one PWM carrier cycle, and M operations are performed to acquire the actual current sample value, the accuracy of the obtained actual current sample value is improved by M times compared to the accuracy of the current sample value obtained by performing current sampling once per PWM carrier cycle in the traditional way.

[0050] Furthermore, a complete current loop regulation calculation is immediately triggered after each acquisition of an actual current sample value. That is, the current loop regulation calculation is synchronized with the M current acquisition times. Specifically, at the k-th current acquisition time, the actual current sample value is acquired, immediately compared with the current command to obtain the current deviation, and the current loop regulation calculation is run at the second control frequency to generate a voltage vector control signal corresponding to that current acquisition time. This ensures the accuracy and real-time performance of the actual current sample value during the current loop regulation calculation process, reduces the delay from the acquisition of the actual current sample value to the current loop regulation calculation and the subsequent generation of the voltage vector control signal, and improves the current loop bandwidth and dynamic response. This allows the current loop regulation calculation process to compensate for load changes and back EMF disturbances in real time, thereby outputting a more accurate voltage vector control signal.

[0051] In a preferred embodiment, the PWM carrier is a triangular wave; among the M updates performed within one PWM carrier cycle, at least two updates are performed at the peak and trough of the triangular wave.

[0052] In this embodiment, the PWM carrier is a triangular wave, which can be, but is not limited to, generated by the timer hardware inside the microcontroller or digital signal processor. The frequency of the triangular wave is the PWM carrier frequency. The M updates performed within one PWM carrier cycle include at least two updates at the trough and peak of the triangular wave, respectively. Specifically, during the half-cycle in which the triangular wave linearly rises from the trough to the peak, before the triangular wave reaches the peak, the pulse width of the PWM drive signal is updated for the first time based on the voltage vector control signal obtained from the current loop adjustment. The PWM drive signal with the updated pulse width is used to drive the permanent magnet synchronous motor during the next half-cycle from the peak to the trough. Similarly, when the triangular wave reaches the trough, the pulse width of the PWM drive signal is updated for the second time based on the voltage vector control signal obtained from the current loop adjustment. The PWM drive signal with the updated pulse width is used to drive the permanent magnet synchronous motor during the next rising half-cycle. Based on this, the current acquisition time can be set before the peak and trough of the triangular wave, respectively, to ensure that the current loop regulation calculation is completed before the peak or trough of the triangular wave, and to ensure that the PWM drive signal after pulse update can be immediately applied to the next half of the PWM carrier cycle, reducing drive delay and greatly improving dynamic response speed.

[0053] In a preferred embodiment, the current loop regulation calculation is performed by a field-programmable gate array (FPGA); the speed loop regulation calculation and the position loop regulation calculation are performed by a microcontroller unit (MCU).

[0054] Traditional motor drivers are typically implemented using a DSP (Digital Signal Processor), and perform current loop regulation calculations only once per triangular wave carrier cycle. The PWM drive signal pulse width is also updated only once. This makes it difficult to increase the current loop bandwidth, thus affecting speed loop performance. This approach is simply called a single current loop scheme, with a current loop closed-loop bandwidth of [missing information]. Here, Td represents the pulse width update delay time of the PWM drive signal. If two current loop adjustment calculations and two PWM drive signal pulse width updates are performed within one PWM carrier cycle, then Td is half that of the single current loop scheme. Therefore, performing two current loop adjustment calculations and two PWM drive signal pulse width updates within one PWM carrier cycle can double the current loop bandwidth. However, because MCUs (Microcontroller Units) use serial processing, or due to insufficient MCU clock speeds or limited peripheral functions, current MCUs cannot easily implement this dual current loop strategy. High-end MCUs are expensive, affecting product costs, and their software design is more complex. FPGAs (Field Programmable Gate Arrays), as field programmable gate arrays, excel at parallel computing and can implement the dual current loop strategy.

[0055] In this embodiment, the speed loop adjustment calculation and position loop adjustment calculation are executed in the microcontroller unit, while the current loop adjustment calculation is executed in a field-programmable gate array (FPGA). An FPGA is a semiconductor device whose internal logic circuits can be configured through programming. When performing the current loop adjustment calculation, the operator uses a hardware description language to program the Clarke transform, Park transform, current PI / PID regulator, inverse Park transform, and space vector pulse width modulation (SPWM) into dedicated digital circuits within the FPGA. Once configured, these circuits can be executed in parallel, synchronously, and at the hardware level. Their execution speed is determined only by the logic gate delay and wiring delay, typically on the nanosecond level. The hardware parallelism of the FPGA allows complex coordinate transformations and adjustment algorithms to be completed in a very short time, thus providing the system with a high current loop bandwidth. Furthermore, the execution time of the FPGA is fixed and predictable, unaffected by interrupts, task scheduling, or memory access conflicts, ensuring absolute determinism of the delay between current sampling and the pulse width update of the PWM drive signal. This achieves the effect of maintaining the stability of high-frequency control and suppressing oscillations.

[0056] Corresponding to the high-frequency current loop adjustment calculations, the speed loop and position loop adjustment calculations, which have relatively complex algorithms but lower execution frequencies, are handled by the microcontroller unit (MCU). The MCU is a general-purpose computing unit that executes software instructions sequentially based on a processor core. Within the MCU, the software program running on it reads the actual speed feedback signal at a first control frequency to perform speed loop adjustment calculations, and reads the actual position feedback signal at a third control frequency to perform position loop adjustment calculations, thereby improving the efficiency of both frequency loop and position loop adjustment calculations.

[0057] Specifically, the MCU and FPGA can be connected via, but are not limited to, a parallel bus, such as... Figure 2 As shown, Figure 2 This application provides a schematic diagram of the connection between an MCU and an FPGA. The FPGA is mainly used for: (1) counting the position pulses issued by the controller as position commands and storing them in a register; (2) counting the encoder pulses to obtain the actual position feedback signal and the actual speed feedback signal, and storing them in a register respectively; (3) acquiring the U-phase sampling current and V-phase sampling current of the permanent magnet synchronous motor at each current acquisition moment; (4) sending an interrupt signal to the MCU once in each PWM carrier cycle so that the MCU can determine whether to perform speed loop adjustment calculation and position loop adjustment calculation after receiving the interrupt signal, and feed back the current command to the FPGA; (5) the FPGA performs current loop adjustment calculation to obtain the voltage vector control signal; (6) the FPGA generates a triangular wave and generates a PWM pulse width value based on the voltage vector control signal, compares the PWM pulse width value with the triangular wave, and outputs the PWM signal after pulse width update; (7) the FPGA processes the overcurrent protection function in real time; and (8) processing digital input signals.

[0058] The MCU is mainly used for: (1) responding to the interrupt signal issued by the FPGA to read the position command, actual position feedback signal and actual speed feedback signal from the FPGA to perform speed loop adjustment calculation and position loop adjustment calculation, and output current loop command to the FPGA. Specifically, it reads the position command, actual position feedback signal and actual speed feedback signal from the FPGA through the parallel bus, performs speed loop adjustment calculation based on the speed command output during the most recent position loop adjustment calculation and the actual speed feedback signal obtained the most recent time, outputs current command and writes it into the register of the FPGA. The MCU performs speed loop adjustment calculation every time it receives the interrupt signal issued by the FPGA, and counts the rising edge of the interrupt signal issued by the FPGA. If L is 2, when the count is even, it performs position loop adjustment calculation based on the position command and actual position feedback signal read from the FPGA, and outputs speed command to the speed loop; (2) performing overvoltage and overload protection; (3) performing USB or RS485 interface debugging; (4) controlling the bus voltage buffer circuit and the braking circuit.

[0059] In summary, a specific embodiment will be used for illustration:

[0060] The PWM carrier wave can be, but is not limited to, a triangular wave, and the PWM carrier frequency can be, but is not limited to, 12.5 kHz. Therefore, the first control frequency can be, but is not limited to, 12.5 kHz, the second control frequency can be, but is not limited to, 25 kHz, and the third control frequency can be, but is not limited to, 6.25 kHz, which means N is 2, M is 2, and L is 2.

[0061] like Figure 3 As shown, Figure 3This is a schematic diagram of a PWM drive signal in a conventional technique provided in this application. In the conventional technique, current is sampled at time k of the triangular wave, then current loop adjustment calculation is performed, and the pulse width of the PWM drive signal is updated at time k+1. It can be seen that the pulse width update of the PWM drive signal in the conventional technique is delayed by one PWM carrier cycle compared to the current loop adjustment calculation.

[0062] like Figure 4 As shown, Figure 4 The timing diagram provided in this application uses arrow colors to illustrate the process within the first PWM carrier cycle: the first arrow is brown, the second is red, the third is black, the fourth is purple, the fifth is brown, the sixth is red, the seventh is yellow, the eighth is black, and the ninth is purple. The black arrow indicates the start of current sampling, which is performed twice per PWM carrier cycle. The brown arrow indicates the moment of current acquisition, i.e., the completion of current sampling and acquisition of real-time current sample values. The red arrow indicates reading the encoder single-turn value, calculating the electrical angle, and performing current loop adjustment calculations, which are also performed twice per PWM carrier cycle. The yellow arrow indicates that the FPGA sends an interrupt signal to the MCU, which is sent once per PWM carrier cycle. The purple arrow indicates the moment of updating the pulse width of the PWM drive signal, updating it once at the peak and once at the trough of the triangular wave. This achieves two current loop adjustment calculations and two updates of the PWM drive signal pulse width within one PWM carrier cycle.

[0063] Please refer to Figure 5 , Figure 5 This application provides a block diagram for current loop regulation calculation. The diagram shows that the U-phase current is sampled to obtain the U-phase sampled current, and the V-phase current is sampled to obtain the V-phase sampled current. The U-phase and V-phase sampled currents are the actual current sample values. The Clark transform, Park transform, and inverse Park transform are coordinate transformations in electrical machinery. The SVPWM module performs vector quadrant division and voltage vector PWM pulse width calculation on the voltage vector amplitude and angle in the voltage vector control signal output by the inverse Park transform module, so as to output a PWM drive signal with updated pulse width. The q-axis current command and d-axis current command in the diagram are the current commands output by the MCU after speed loop regulation calculation.

[0064] In a preferred embodiment, obtaining the actual speed feedback signal of the permanent magnet synchronous motor includes: obtaining the A-phase pulse signal and the B-phase pulse signal output by the encoder, wherein the A-phase pulse signal and the B-phase pulse signal are orthogonal signals; calculating the first actual speed feedback signal using the first T method based on the first pulse period of the A-phase pulse signal or the B-phase pulse signal; generating a synthesized pulse signal based on the A-phase pulse signal and the B-phase pulse signal, wherein the synthesized pulse frequency of the synthesized pulse signal is higher than the pulse frequency of the A-phase pulse signal or the B-phase pulse signal, and calculating the second actual speed feedback signal using the second T method based on the second pulse period of the synthesized pulse signal; if the speed command is greater than a preset speed threshold, then the first actual speed feedback signal is determined as the actual speed feedback signal; if the speed command is not greater than the preset speed threshold, then the second actual speed feedback signal is determined as the actual speed feedback signal.

[0065] In traditional technical solutions, the M / T method is typically used to measure the actual speed feedback signal of a permanent magnet synchronous motor (PMSM). The M / T method calculates the rotational speed by measuring the number of encoder pulses within a fixed sampling period. Higher PSM speeds result in more encoder pulses per sampling period, leading to more accurate results. Higher encoder resolution and longer sampling periods also improve accuracy, but excessively long periods can hinder speed loop response. The T method calculates the rotational speed by measuring the time interval between two encoder pulses, specifically by counting high-frequency clock pulses. At lower speeds, longer time intervals result in higher accuracy using the T method. Therefore, to balance accuracy at both high and low speeds, the M / T method is combined. Within a specified sampling period, both encoder pulse count and high-frequency clock pulse count are simultaneously calculated, maintaining strict synchronization between the two counts. The formula for the M / T method is: n=(60×f×M1) / (Z×M2), where f is the frequency of the high-frequency clock pulse signal in MHz, M1 is the number of encoder output pulses within the specified sampling period, M2 is the number of high-frequency clock pulses within the specified sampling period, Z is the number of pulses emitted by the encoder in one revolution of the rotor, and n is the actual speed feedback signal in revolutions per minute.

[0066] However, since the encoder of the permanent magnet synchronous motor in the spindle system of the pattern sewing machine uses a 360-line incremental encoder, its resolution is very low, so the M-method speed measurement is no longer applicable. In addition, the speed of the permanent magnet synchronous motor in the spindle system generally supports a maximum of 4000 rpm. If the T-method is used for speed measurement, taking a high-frequency clock pulse frequency of 100MHz as an example, the high-frequency clock pulse count value at 4000 rpm can reach 4166, which causes a sharp increase in the amount of calculation.

[0067] In this embodiment, when measuring speed to determine the actual speed feedback signal, the orthogonal A-phase pulse signal and B-phase pulse signal output by the encoder are first acquired. For example, for a 360-line incremental encoder, the output signal is two orthogonal signals, A and B. For each revolution of the permanent magnet synchronous motor rotor, the number of pulses of the A-phase pulse signal and the B-phase pulse signal are 360.

[0068] During speed measurement, two methods are employed. One method involves directly performing T-method speed measurement on either the A-phase or B-phase pulse signal. This means that based on the first pulse period of either the A-phase or B-phase pulse signal, the first actual speed feedback signal is calculated using the first T-method, where the first pulse period is the time interval between two pulses output by the encoder. The other method generates a composite pulse signal based on the A-phase and B-phase pulse signals. The composite pulse signal has a higher frequency than either the A-phase or B-phase pulse signals. Compared to the A-phase and B-phase pulse signals, the time interval between two adjacent pulses of the composite pulse signal, i.e., the second pulse period, is shorter than the first pulse period. Using the second T-method to calculate the second actual speed feedback signal reduces the computational load.

[0069] Based on this, after obtaining the first actual speed feedback signal and the second actual speed feedback signal through two testing methods respectively, if the speed command is greater than the preset speed threshold, the first pulse period is shorter. In order to improve the speed measurement accuracy, the first actual speed feedback signal is determined as the actual speed feedback signal; if the speed command is not greater than the preset speed threshold, the first pulse period is longer and the second pulse period is shorter. In order to improve the speed measurement accuracy and speed measurement efficiency, the second actual speed feedback signal is determined as the actual speed feedback signal.

[0070] The preset speed threshold in this application may be, but is not limited to, 80 revolutions per minute.

[0071] It should be noted that the rotation speed command in this application may be, but is not limited to, the speed command generated after the MCU performs speed loop adjustment calculation. The MCU sends the speed command to the FPGA via the bus. The FPGA calculates the actual speed feedback signal based on the speed command and stores the actual speed feedback signal in a register so that the MCU can read it and perform speed loop adjustment calculation. It should be noted that each time the position loop adjustment calculation, speed loop adjustment calculation, or current loop adjustment calculation is performed, the actual position feedback signal, actual speed feedback signal, actual current sample value, position command, speed command, and current command are all newly generated signals.

[0072] As a preferred embodiment, generating a composite pulse signal based on phase A pulse signal and phase B pulse signal includes: performing logical operations based on the edge changes of phase A pulse signal and phase B pulse signal to obtain composite pulse signal.

[0073] In this embodiment, the determination of the synthesized pulse signal is specifically based on logical operations performed on the edge signals of the A-phase pulse signal and the B-phase pulse signal. Specifically, the rising and falling edges of the A-phase and B-phase pulse signals are detected respectively. When either edge is detected, an XOR operation is performed on the current levels of the A-phase and B-phase pulse signals to obtain a synthesized pulse signal with a frequency four times that of either the A-phase or B-phase pulse signal. That is, an XOR operation is performed on each rising and falling edge of the A-phase and B-phase pulse signals, ensuring that the synthesized pulse signal improves test accuracy and speed measurement efficiency when the speed command does not exceed a preset speed threshold. Please refer to... Figure 6 , Figure 6 This is a schematic diagram of an A-phase pulse signal, a B-phase pulse signal, and a synthesized pulse signal provided in this application.

[0074] In a preferred embodiment, based on the first pulse period of the A-phase pulse signal or the B-phase pulse signal, the first actual speed feedback signal is calculated using the first T method, including: counting the pulses of the high-frequency clock pulse signal between two adjacent rising edges of the A-phase pulse signal or the B-phase pulse signal, and determining the first high-frequency clock pulse count value; determining the first pulse period based on the ratio between the first high-frequency clock pulse count value and the high-frequency clock pulse frequency of the high-frequency clock pulse signal; determining the first unit mechanical rotation number based on the encoder resolution, wherein the first unit mechanical rotation number is the number of mechanical rotations of the rotor of the permanent magnet synchronous motor when the encoder generates one pulse of the A-phase pulse signal or the B-phase pulse signal; and determining the ratio between the first unit mechanical rotation number and the first pulse period as the first actual speed feedback signal.

[0075] When calculating the first actual speed feedback signal, the pulses of the high-frequency clock pulse signal between the rising edges of two adjacent pulses in the A-phase pulse signal or B-phase pulse signal are counted first to determine the first high-frequency clock pulse count value as M3. Then the first pulse period is M3 / f, where f is the high-frequency clock pulse frequency of the high-frequency clock pulse signal. The first unit mechanical rotation is 1 / Z, where Z is the encoder resolution. The first unit mechanical rotation is the number of mechanical rotations of the rotor of the permanent magnet synchronous motor when the encoder generates one pulse of the A-phase pulse signal or B-phase pulse signal. For example, for a 360-line incremental encoder, its resolution is 360, which means the first unit mechanical rotation is 1 / 360. When the encoder generates 360 pulses of the A-phase pulse signal or B-phase pulse signal, it can be determined that the rotor has rotated one revolution. Based on this, the first actual speed feedback signal is f / (M3×Z). Since the unit of the preset speed threshold is usually revolutions per minute, in order to unify the units, the first actual speed feedback signal is (60×f) / (M3×Z).

[0076] As a preferred embodiment, the second actual speed feedback signal is calculated using the second T method based on the pulse period of the synthesized pulse signal, including: determining the frequency ratio between the synthesized pulse frequency and the pulse frequency of the A-phase pulse signal or the B-phase pulse signal; counting the pulses of the high-frequency clock pulse signal between two adjacent rising edges of the synthesized pulse signal and determining the second high-frequency clock pulse count value; determining the second pulse period based on the ratio between the second high-frequency clock pulse count value and the high-frequency clock pulse frequency; determining the second unit mechanical rotation number based on the product between the encoder resolution and the frequency ratio, wherein the second unit mechanical rotation number is the number of mechanical rotations of the permanent magnet synchronous motor rotor when the synthesized pulse signal generates one pulse; and determining the ratio between the second unit mechanical rotation number and the second pulse period as the second actual speed feedback signal.

[0077] When calculating the second actual speed feedback signal, a composite pulse signal is first generated based on the A-phase pulse signal and the B-phase pulse signal to reduce the second pulse period of the composite pulse signal, and the frequency ratio between the composite pulse frequency and the pulse frequency of the A-phase pulse signal or the B-phase pulse signal is determined. For example, when the composite pulse signal is obtained by XORing the rising and falling edges of the A-phase pulse signal and the B-phase pulse signal, the frequency ratio is 4. The pulses of the high-frequency clock pulse signal between the rising edges of two adjacent pulses in the synthesized pulse signal are counted to determine the second high-frequency clock pulse count value as M4. Then the second pulse period is M4 / f, where f is the high-frequency clock pulse frequency of the high-frequency clock pulse signal. The second unit mechanical rotation is 1 / (4×Z), where Z is the encoder resolution. The second unit mechanical rotation is the number of mechanical rotations of the permanent magnet synchronous motor rotor when the synthesized pulse signal generates one pulse. For example, for a 360-line incremental encoder, its resolution is 360 and the frequency ratio is 4, which means the second unit mechanical rotation is 1 / (4×360). When the encoder generates 360 A-phase pulse signals or B-phase pulse signals, the synthesized pulse signal generates 4×360 pulses, which means the rotor has rotated one revolution. Based on this, the second actual speed feedback signal is f / (M4×4×Z). Since the unit of the preset speed threshold is usually revolutions per minute, in order to unify the units, the second actual speed feedback signal is (15×f) / (M4×Z).

[0078] As a preferred embodiment, the method further includes: if the first pulse period or the second pulse period is greater than a preset time threshold, then determining the actual operating speed of the permanent magnet synchronous motor as the minimum operating speed, and generating an actual speed feedback signal based on the minimum operating speed.

[0079] In this embodiment, if the first pulse period or the second pulse period is greater than a preset time threshold, that is, if the first high-frequency clock pulse count value or the second high-frequency clock pulse count value between two adjacent pulses in any one of the A-phase pulse signal, B-phase pulse signal and composite pulse signal is greater than a preset count value, it can be determined that the first pulse period or the second pulse period is greater than the preset time threshold. Then, the actual operating speed of the permanent magnet synchronous motor can be determined as the minimum operating speed, and an actual speed feedback signal can be generated based on the minimum operating speed. The minimum operating speed can be, but is not limited to, 0.

[0080] Please refer to Figure 7 , Figure 7This application provides a schematic diagram of a drive system for a permanent magnet synchronous motor. The system includes: an acquisition unit 71 for acquiring the actual speed feedback signal of the permanent magnet synchronous motor; a first execution unit 72 for performing speed loop adjustment calculation at a first control frequency based on the speed deviation between the speed command and the actual speed feedback signal, and generating a current command; a second execution unit 73 for performing current loop adjustment calculation at a second control frequency based on the current deviation between the current command and the actual current sampling value of the permanent magnet synchronous motor, and generating a voltage vector control signal; the second control frequency is N times the first control frequency and M times the PWM carrier frequency, where M and N are both integers greater than 1; and an update unit 74 for updating the pulse width of the PWM drive signal M times according to the voltage vector control signal within one PWM carrier cycle to drive the permanent magnet synchronous motor.

[0081] For a description of the drive system for the permanent magnet synchronous motor provided by this invention, please refer to the above method embodiments; the invention itself will not be described in detail here.

[0082] Please refer to Figure 8 , Figure 8 The present application provides a schematic diagram of a drive device for a permanent magnet synchronous motor. The device includes: a memory 81 for storing a computer program; and a processor 82 for implementing the steps of the drive method for the permanent magnet synchronous motor as described above when executing the computer program.

[0083] For a description of the drive device for the permanent magnet synchronous motor provided by the present invention, please refer to the above method embodiments; the present invention will not be described again here.

[0084] Please refer to Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer-readable storage medium provided in this application. The computer-readable storage medium 91 stores a computer program 92. When the computer program 92 is executed by the processor 82, it implements the steps of the driving method of the permanent magnet synchronous motor as described above.

[0085] For a description of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments; the present invention will not be described again here.

[0086] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0087] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A driving method for a permanent magnet synchronous motor, characterized in that, include: Obtain the actual speed feedback signal of the permanent magnet synchronous motor; Based on the speed deviation between the speed command and the actual speed feedback signal, a speed loop adjustment calculation is performed at a first control frequency, and a current command is generated. Based on the current deviation between the current command and the actual current sampling value of the permanent magnet synchronous motor, a current loop regulation calculation is performed at a second control frequency, and a voltage vector control signal is generated; the second control frequency is N times the first control frequency, and the second control frequency is M times the PWM carrier frequency, where M and N are both integers greater than 1. Within one PWM carrier cycle, the pulse width of the PWM drive signal is updated M times according to the voltage vector control signal to drive the permanent magnet synchronous motor. Obtain the actual speed feedback signal of the permanent magnet synchronous motor, including: The A-phase pulse signal and the B-phase pulse signal output by the encoder are obtained, wherein the A-phase pulse signal and the B-phase pulse signal are orthogonal signals; Based on the first pulse period of the A-phase pulse signal or the B-phase pulse signal, the first actual speed feedback signal is calculated using the first T method. A composite pulse signal is generated based on the A-phase pulse signal and the B-phase pulse signal. The composite pulse frequency of the composite pulse signal is higher than the pulse frequency of the A-phase pulse signal or the B-phase pulse signal. Based on the second pulse period of the composite pulse signal, the second actual speed feedback signal is calculated using the second T method. If the speed command is greater than the preset speed threshold, then the first actual speed feedback signal is determined as the actual speed feedback signal; If the speed command is not greater than the preset speed threshold, then the second actual speed feedback signal is determined as the actual speed feedback signal.

2. The driving method for a permanent magnet synchronous motor as described in claim 1, characterized in that, Also includes: Obtain the actual position feedback signal of the permanent magnet synchronous motor; Based on the position deviation between the position command and the actual position feedback signal, position loop adjustment calculation is performed at a third control frequency, and the speed command is generated. The first control frequency is L times the third control frequency, where L is an integer greater than 1.

3. The driving method for a permanent magnet synchronous motor as described in claim 1, characterized in that, Before performing current loop regulation calculations at a second control frequency and generating a voltage vector control signal based on the current deviation between the current command and the actual current sampling value of the permanent magnet synchronous motor, the process further includes: M current acquisition times are set within each PWM carrier cycle; At M current acquisition times, the actual current sampling value of the permanent magnet synchronous motor is acquired respectively. After each acquisition of the actual current sampling value, the current loop regulation calculation is performed at a second control frequency based on the current deviation between the current command and the actual current sampling value of the permanent magnet synchronous motor, and a voltage vector control signal is generated.

4. The driving method for a permanent magnet synchronous motor as described in claim 1, characterized in that, The PWM carrier is a triangular wave; among the M updates performed within one PWM carrier cycle, at least two updates are performed at the peak and trough of the triangular wave.

5. The driving method for a permanent magnet synchronous motor as described in claim 1, characterized in that, A composite pulse signal is generated based on the A-phase pulse signal and the B-phase pulse signal, including: The synthesized pulse signal is obtained by performing logical operations based on the edge changes of the A-phase pulse signal and the B-phase pulse signal.

6. The driving method for a permanent magnet synchronous motor as described in claim 1, characterized in that, Based on the first pulse period of the A-phase pulse signal or the B-phase pulse signal, the first actual speed feedback signal is calculated using the first T method, including: The pulses of the high-frequency clock pulse signal between two adjacent rising edges of the A-phase pulse signal or the B-phase pulse signal are counted, and a first high-frequency clock pulse count value is determined. The first pulse period is determined based on the ratio between the first high-frequency clock pulse count value and the high-frequency clock pulse frequency of the high-frequency clock pulse signal. The first unit mechanical rotation number is determined based on the resolution of the encoder. The first unit mechanical rotation number is the number of mechanical rotations of the rotor of the permanent magnet synchronous motor when the encoder generates one pulse of the A-phase pulse signal or the B-phase pulse signal. The ratio between the first unit mechanical rotation number and the first pulse period is determined as the first actual speed feedback signal.

7. The driving method for a permanent magnet synchronous motor as described in claim 6, characterized in that, Based on the second pulse period of the synthesized pulse signal, the second actual velocity feedback signal is calculated using the second T method, including: Determine the frequency ratio between the synthesized pulse frequency and the pulse frequency of the A-phase pulse signal or the B-phase pulse signal; The pulses of the high-frequency clock pulse signal between two adjacent rising edges of the synthesized pulse signal are counted, and the second high-frequency clock pulse count value is determined. The second pulse period is determined based on the ratio between the second high-frequency clock pulse count value and the high-frequency clock pulse frequency. The second unit mechanical rotation number is determined based on the product between the encoder resolution and the frequency ratio. The second unit mechanical rotation number is the number of mechanical rotations of the rotor of the permanent magnet synchronous motor when the synthesized pulse signal generates one pulse. The ratio between the second unit mechanical rotation number and the second pulse period is determined as the second actual speed feedback signal.

8. The driving method for a permanent magnet synchronous motor as described in claim 1, characterized in that, Also includes: If the first pulse period or the second pulse period is greater than a preset time threshold, the actual operating speed of the permanent magnet synchronous motor is determined to be the minimum operating speed, and the actual speed feedback signal is generated based on the minimum operating speed.

9. A drive device for a permanent magnet synchronous motor, characterized in that, include: Memory, used to store computer programs; A processor, configured to, when executing a computer program, implement the steps of the driving method for a permanent magnet synchronous motor as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Permanent magnet synchronous motor current loop optimization control method based on MCU

    CN118694251A