Multi-axis servo driver
By using the communication architecture of the master-slave control unit and the PWM waveform synchronization mechanism, the inefficient debugging and synchronization problems in traditional multi-axis drive systems are solved, and efficient and precise multi-axis servo motor control is achieved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CHINA LEADSHINE TECH CO LTD
- Filing Date
- 2025-06-11
- Publication Date
- 2026-07-02
AI Technical Summary
Traditional multi-axis drive systems are inefficient when debugging and controlling multiple servo motors, and the lack of a synchronization mechanism leads to insufficient motion control precision.
The communication architecture of master control unit and slave control unit is adopted. Synchronous serial communication (SPI) and asynchronous serial communication (RS232) are combined, and the PWM waveform is synchronized by periodic marker points to ensure coordinated control of each servo motor.
It enables efficient synchronous debugging and control of multi-axis servo motors, improves motion control accuracy, and supports simple expansion and maintenance.
Smart Images

Figure CN2025100370_02072026_PF_FP_ABST
Abstract
Description
A multi-axis servo drive
[0001] This application is based on and claims priority to Chinese Patent Application No. 202411952274.0, filed on December 27, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technology, specifically to a multi-axis servo drive. Background Technology
[0003] With the development of industrial automation technology, more and more application scenarios require support for multi-axis (servo motor) drive systems to achieve more efficient and flexible production processes. However, the main problem faced by traditional multi-axis drive systems is how to achieve efficient and synchronous debugging and monitoring across multiple axes. In traditional multi-axis systems, debugging software typically requires users to select specific axis numbers during connection. While this method is relatively simple in the initial design, as the complexity of multi-axis systems increases, selecting and debugging each axis number individually becomes very inefficient, especially when multiple axes need to be debugged, making the operation cumbersome and time-consuming.
[0004] In addition, in traditional multi-axis control solutions, the lack of built-in synchronization mechanisms between axes means that their control signals and sampling signals cannot be synchronized. Therefore, in multi-axis linkage debugging scenarios, the host computer's debugging software cannot continuously acquire motion waveforms of multiple axes, making it impossible to determine the motion deviation between multiple axes. Consequently, the motion control accuracy of the product cannot meet customer requirements. Application content
[0005] The main technical problem addressed in this application is to provide a multi-axis servo driver that can ensure coordinated synchronization of various servo motors.
[0006] According to the first aspect, one embodiment provides a multi-axis servo driver for driving a servo motor, including a main control unit and at least one slave control unit, wherein the main control unit is used to connect to a host computer for joint debugging of the various control units;
[0007] The main control unit and each slave control unit are connected in communication.
[0008] The main control unit outputs a first PWM wave to control a set number of servo motors; each slave control unit outputs a second PWM wave to control the set number of servo motors.
[0009] At the first cycle marker point of the first PWM wave, the main control unit sends a control signal to any selected slave control unit to coordinate the servo motor controlled by the selected slave control unit; wherein, the first cycle marker point is any waveform point of the first PWM wave;
[0010] The selected slave control unit adjusts the second PWM wave in response to the control signal to achieve synchronous and coordinated control of each servo motor.
[0011] In one embodiment, the selected second PWM wave output from the control unit has a waveform point corresponding to the first cycle marker point as the second cycle marker point;
[0012] When the second cycle marker point leads the first cycle marker point, the control unit extends the period of the second PWM wave until the time difference between the second cycle marker point and the first cycle marker point is less than a set value.
[0013] In one embodiment, the selected second PWM wave output from the control unit has a waveform point corresponding to the first cycle marker point as the second cycle marker point;
[0014] When the second cycle marker lags behind the first cycle marker, the control unit shortens the period of the second PWM wave until the time difference between the second cycle marker and the first cycle marker is less than a set value.
[0015] In one embodiment, the first period marker is the zero-crossing point of the first PWM wave, and the second period marker is the zero-crossing point of the second PWM wave.
[0016] In one embodiment, each control unit includes a capture unit, which calculates the time difference between the second period marker and the first period marker.
[0017] In one embodiment, the master control unit and the slave control unit communicate with each other via synchronous serial communication and asynchronous serial communication. The master control unit uses the synchronous serial communication to send a control signal to any selected slave control unit; each control unit uses the asynchronous serial communication to send asynchronous communication data for asynchronous communication.
[0018] In one embodiment, the asynchronous communication data includes flag data of the servo motors controlled by each control unit; each control unit acquires the asynchronous communication data and determines whether the flag data matches the servo motors controlled by each control unit. If it matches, the asynchronous communication data is parsed to perform asynchronous communication.
[0019] In one embodiment, the main control unit obtains the feedback signal sent by the selected slave control unit through the synchronous serial communication. The main control unit verifies the feedback signal. When the feedback signal is abnormal, the main control unit sends a reset signal to the selected slave control unit through the asynchronous serial communication to reset the selected slave control unit.
[0020] In one embodiment, the synchronous serial communication is SPI communication, and the asynchronous serial communication is RS232 communication.
[0021] In one embodiment, the control units are connected in a daisy chain for RS232 communication.
[0022] The multi-axis servo drive according to the above embodiment includes a master control unit and at least one slave control unit. The master control unit sends a control signal to the selected slave control unit at the first cycle marker point of the first PWM wave. The selected slave control unit adjusts the PWM wave of the slave control unit according to the control signal, thereby achieving synchronous coordination of the servo motors controlled by each control unit. This application uses cycle marker points to synchronize the PWM waveforms of the master control unit and the slave control unit, ensuring the coordination and consistency of the control signals and sampling signals of all servo motors. This allows for the acquisition of motion deviations between different servo motors, facilitating adjustments and improving product performance. Furthermore, in the case of multiple slave control units, synchronous control via cycle marker points simplifies the expansion of control units. If more servo motors need to be added, expansion can be performed according to the timing control mechanism currently in operation of the multi-axis servo drive, without needing to readjust the entire communication or control architecture of the multi-axis servo drive. Attached Figure Description
[0023] Figure 1 is a schematic diagram of the structure of a multi-axis servo driver in one embodiment;
[0024] Figure 2 is a flowchart of a method for RS232 communication in each control unit in one embodiment;
[0025] Figure 3 is a waveform diagram showing that, in one embodiment, the second period marker of the second PWM wave leads the first period marker of the first PWM wave.
[0026] Figure 4 is a waveform diagram showing that the second period marker of the second PWM wave lags behind the first period marker of the first PWM wave in one embodiment.
[0027] Figure 5 is a schematic diagram of the capture unit in each control unit in one embodiment. Detailed Implementation
[0028] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments. Similar elements in different embodiments are referred to by related similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the present application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present application are not shown or described in the specification. This is to avoid obscuring the core parts of the present application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.
[0029] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.
[0030] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).
[0031] A multi-axis servo drive is a control device used to control servo motor systems with multiple degrees of freedom. A degree of freedom refers to the ability of a mechanical system to move independently in space. For a six-axis servo system, each axis represents one degree of freedom, and each degree of freedom corresponds to a servo motor. These motors work together to control the movement of the system in different directions. A multi-axis servo drive is typically a six-axis servo drive, where three axes control position (translation: forward / backward, left / right, up / down), and three axes control direction (pitch, yaw, roll). However, in practical engineering, multi-axis servo drives are not limited to six axes; the specific number is set according to the actual engineering needs and is not limited here. Furthermore, multi-axis servo drives are not only suitable for controlling devices with multiple degrees of freedom to perform fine movements, but also for synchronous motion control devices with multiple steps, improving production efficiency.
[0032] Please refer to Figure 1. In one embodiment, in order to ensure that each servo motor works in a coordinated and synchronous manner, this application provides a multi-axis servo driver 100, including a main control unit 110 and at least one slave control unit 120. The main control unit 110 is used to connect to a host computer and the debugging software installed in the host computer to obtain debugging commands and realize the joint debugging of each control unit.
[0033] In one embodiment, since the purpose of each control unit is to control servo motors, in each control unit, the main control unit 110 outputs a first PWM wave to control a set number of servo motors, and the control unit 120 outputs a second PWM wave to control the same set number of motors.
[0034] It should be noted that in this application, both the master control unit 110 and the slave control unit 120 control two servo motors. Therefore, the multi-axis servo driver 100 requires one master control unit 110 and two slave control units 120. In actual engineering applications, the number of control units and the number of servo motors controlled by each control unit can be set according to the number of servo motors and the hardware conditions of the driver. For example, the master control unit 110 and the slave control unit 120 can each control one servo motor or three servo motors, or the master control unit 110 can control one servo motor and the slave control unit 120 can control three servo motors, etc., without limitation. This article uses a six-axis driver, where both the master control unit 110 and the slave control unit 120 control two servo motors as an example for illustration.
[0035] In one embodiment, to ensure the joint debugging of each control unit, the master control unit 110 and each slave control unit 120 are connected by communication. To improve real-time performance and reliability, the master control unit 110 and each slave control unit 120 communicate using two different methods: synchronous serial communication and asynchronous serial communication. Synchronous serial communication uses SPI communication, which allows for high-speed data exchange between control units, strong real-time performance, and accurate data transmission during communication. Asynchronous serial communication uses RS232 communication, which, although with a relatively lower transmission speed, offers better stability and anti-interference capabilities.
[0036] In one embodiment, SPI communication utilizes a four-wire system with MOSI (output of master control unit 110, input of slave control unit 120), MISO (input of master control unit 110, output of slave control unit 120), CLK (clock signal), and CS (chip select signal). The master control unit 110 selects which slave control unit 120 to communicate with by controlling the chip select signal; when the chip select signal is valid, that slave control unit 120 is selected. Therefore, the master control unit 110 can send control signals to any selected slave control unit 120 using SPI. The control commands obtained by the master control unit 110 from the host computer can then be used to coordinate the operation of the servo motors controlled by the master control unit 110 and the selected slave control unit 120. Specifically, the master control unit 110 sequentially selects slave control units 120, that is, it sequentially communicates with the first, second, and third slave control units 120 via SPI, thereby achieving coordinated operation of all control units.
[0037] It should be noted that, since the master control unit 110 and each slave control unit 120 in this application use SPI communication, any one of the control units can be designated as the master control unit 110. Any control unit selected by the master control unit 110 using the chip select signal in the SPI communication corresponds to a slave control unit 120. That is, the master control unit 110 is arbitrarily selected from all the control units, while the slave control units 120 are selected by the master control unit 110 according to the SPI communication.
[0038] In one embodiment, the control units are daisy-chained and connected by cables to achieve RS232 communication. Each control unit uses RS232 to send asynchronous communication data, thus performing asynchronous communication. Since data is transmitted bit-by-bit at both the sending and receiving ends in RS232 communication, it is typically asynchronous. Specifically, the sending end converts byte data into a string and transmits it via the TXD (Transmit Data) signal line; the receiving end receives these bits via the RXD (Receive Data) signal line and reassembles them into the original data. To ensure that each control unit can identify its own data from the asynchronous communication data being transmitted via RS232, the asynchronous communication data includes the flag data of the servo motors controlled by each control unit.
[0039] Please refer to Figure 2. In one embodiment, the shaft number information of the servo motor is used as the identification data of the servo motor. Each control unit determines whether it has received asynchronous communication data. If asynchronous communication data is received, it determines that it is the shaft number information of the servo motor controlled by its own control unit based on the shaft number information. If so, it parses the asynchronous communication data to perform the corresponding action and returns the response data. If not, it forwards the asynchronous communication data to the next control unit for judgment.
[0040] In one embodiment, SPI is used for communication between the master control unit 110 and each slave control unit 120. The data transmitted with high real-time requirements includes waveform data, special instructions, hardware signals, etc.
[0041] It should be noted that waveform data refers to the reference signal of the output signal (such as current, voltage or speed) of the multi-axis servo drive 100, such as the sine wave of a three-phase motor or the reference waveform of space vector modulation (SVPWM), which is used to generate PWM signals. These waveform data are transmitted between control units to ensure the synchronous operation of multiple servo motors.
[0042] Special commands refer to control commands that need to be shared or coordinated among multiple control units, such as synchronization commands, mode switching commands, and emergency stop commands. Synchronization commands are used to trigger the simultaneous start, stop, or mode change of multiple axes. Multiple servo motors may operate in different modes (such as position control, speed control, or torque control), requiring notification to other slave control units 120 to switch modes via SPI communication. When the master control unit 110 detects a fault (such as limit triggering or current overload), it immediately broadcasts an emergency stop command via SPI communication.
[0043] Hardware signals refer to sensor data or feedback signals that need to be transmitted in real time, such as encoder feedback, current / voltage sample values, limit / safety signals, and temperature data. Encoder feedback refers to the fact that each servo motor may be equipped with a rotary encoder, which samples position or speed data in real time. The main control unit 110 needs to acquire encoder data from all servo motors for global coordination. Current / voltage sample values are used to provide real-time feedback of current and voltage information for closed-loop control and protection. Limit / safety signals refer to the limit trigger signals of each servo motor being transmitted to the main control unit 110 via SPI communication for centralized processing. Temperature data refers to the information required to notify the main control unit 110 via SPI communication if the driver temperature of a servo motor is too high, prompting protection measures.
[0044] In one embodiment, to ensure the accuracy of this data, the main control unit 110 needs to verify the feedback signal, which includes this data, when it receives the feedback signal sent by the selected slave control unit 120. If the feedback signal is abnormal, the main control unit 110 sends a reset signal to the selected slave control unit 120 via RS232 to reset the SPI communication of the selected slave control unit 120.
[0045] It should be noted that if a serious anomaly occurs in SPI communication (such as timing issues or bus conflicts), the module in the slave control unit 120 used for SPI communication may fail to receive data or respond to commands. In this case, resending the reset signal via SPI may fail. RS232 communication, however, is independent of SPI communication and can reliably transmit the reset signal to the slave control unit 120, avoiding the risk of SPI communication failing to reset.
[0046] In one embodiment, CRC check is used when verifying the feedback signal. CRC (Cyclic Redundancy Check) is an error detection technique used to detect whether errors have occurred in data during transmission or storage. The basic principle of CRC check is to calculate the check code through polynomial division and append the check code to the end of the data for verification.
[0047] In one embodiment, although SPI communication itself is a high-speed synchronous serial communication protocol, it can be used in combination with a variety of communication protocols to support different application requirements, such as Modbus, CAN communication, I2C and Ethernet protocols.
[0048] In one embodiment, after completing the communication between the main control unit 110 and the slave control unit 120, in order to ensure the synchronization of the servo motors controlled by each control unit, the main control unit 110 sends a control signal to any selected slave control unit 120 at the first cycle marker of the first PWM wave output, so as to coordinate the servo motor controlled by the selected slave control unit 120. The selected slave control unit 120 responds to the control signal by adjusting the second PWM wave corresponding to it, thereby achieving synchronous and coordinated control of the servo motors.
[0049] It should be noted that the control signal in this application is a chip select signal. The selected slave control unit 120 adjusts its own PWM wave in response to the chip select signal sent by the master control unit 110. To ensure the synchronization of the PWM waves of each control unit, the master control unit 110 starts communication at a fixed time within one cycle of the PWM wave, that is, it pulls the chip select signal low at the first cycle marker of the first PWM wave. When the selected slave control unit 120 receives the chip select signal, it calculates the time difference between the time of the chip select signal and the second cycle marker in the selected slave control unit 120. If the time difference is within the set value, it means that the PWM waves of the master control unit 110 and the slave control unit 120 are synchronized. If the time difference exceeds the set value, then the second PWM wave of the selected slave control unit 120 needs to be adjusted.
[0050] In one embodiment, the first period marker of the first PWM wave and the second period marker of the second PWM wave can be any waveform point on the PWM wave. For example, if the first period marker is at 1 / 3 of the waveform point of the first PWM wave's period, then the second period marker is also at 1 / 3 of the waveform point of the second PWM wave's period. However, for the convenience of engineering practice, the first period marker and the second period marker are respectively taken as the zero-crossing points of the first and second PWM waves.
[0051] Please refer to Figure 3. In one embodiment, the main control unit 110 pulls down the chip select signal at the first cycle marker point of the first PWM wave, that is, at the zero-crossing point of the first PWM wave. That is, at point T, it sends a chip select signal to the selected slave control unit 120. The second cycle marker point of the second PWM wave of the selected slave control unit 120 is ahead of the first cycle marker point of the first PWM wave. That is, the zero-crossing point of the second PWM wave is ahead of the zero-crossing point of the first PWM wave. Therefore, in order to ensure the synchronization of the first PWM wave and the second PWM wave, it is necessary to extend the period length of the second PWM wave until the difference between the zero-crossing point of the first PWM wave and the zero-crossing point of the second PWM wave is less than a set value.
[0052] It should be noted that the chip select signal sent by the main control unit 110 is sent cyclically. After sending the signal to the first slave control unit 120, it is sent to the second slave control unit 120, and so on. After one cycle, the chip select signal is sent to the first slave control unit 120 again. The selected slave control unit 120 can then calculate the time difference between the first period marker of the first PWM wave and the second period marker of the second PWM wave each time it receives the chip select signal, until this time difference is less than a set value. The adjustment value for the period extension of the second PWM wave can be set according to engineering practice. Figure 3 shows a schematic diagram. In the third period 3T, the period of the second PWM wave is extended from T1 to T1', thus synchronizing the first period marker of the first PWM wave and the second period marker of the second PWM wave.
[0053] Referring to Figure 4, in one embodiment, the selected second period marker of the second PWM wave from the control unit 120 may lag behind the first period marker of the first PWM wave. That is, the zero-crossing point of the second PWM wave lags behind the zero-crossing point of the first PWM wave. Therefore, in order to ensure the synchronization of the first PWM wave and the second PWM wave, it is necessary to shorten the period length of the second PWM wave until the difference between the zero-crossing points of the first PWM wave and the second PWM wave is less than a set value. The adjustment value for extending the period of the second PWM wave can be set according to engineering practice. Figure 4 is a schematic diagram. In the third period 3T, the period of the second PWM wave is extended from T2 to T2'. In the third period 3T, the first period marker of the first PWM wave and the second period marker of the second PWM wave are synchronized.
[0054] Referring to Figure 5, in one embodiment, to calculate the time difference between the second cycle marker and the first cycle marker, a capture unit is provided in each control unit to expand the chip select signal and send it to the capture unit. Using the capture unit, the first cycle marker of the first PWM wave can be directly obtained, that is, the cap point in Figures 3 and 4 is the first cycle marker. The second cycle marker of the second PWM wave, which is known from the control unit 120, is then selected, allowing the calculation of the time difference between the second cycle marker and the first cycle marker.
[0055] It should be noted that the Capture Unit (CAP) is typically a peripheral module within the control unit, part of the timer / counter unit, specifically designed to capture edge events of the input signal. Since each slave control unit 120 obtains the first cycle marker of the first PWM wave to adjust its own second PWM wave, the capture unit only needs to be set in each slave control unit 120. SPI communication activates the slave control unit 120 via the falling edge of the chip select signal and terminates communication via the rising edge. The capture unit can quickly and accurately detect the edge event of the chip select signal, thereby determining the timing of the first cycle marker.
[0056] Therefore, the multi-axis servo driver 100 provided in this application can solve the problem of multiple servo motors not being able to be debugged simultaneously, while dividing the communication data in the entire communication process into high real-time data and low real-time data, and transmitting them respectively through SPI communication and RS232 communication, avoiding the blocking of high real-time data by low real-time data. Furthermore, the master control unit can obtain various data from other slave control units through SPI communication, while the host computer only needs to communicate with the master control unit to obtain various data from all control units. In addition, when controlling the servo motors of each control unit, the chip select signal is pulled low at the periodic marker point to achieve synchronization of each servo motor.
[0057] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.
[0058] The above examples illustrate this application only to aid understanding and are not intended to limit its scope. Those skilled in the art to which this application pertains can make various simple deductions, modifications, or substitutions based on the ideas presented.
Claims
1. A multi-axis servo driver for driving a servo motor, characterized in that, It includes a main control unit and at least one slave control unit, wherein the main control unit is used to connect to a host computer for joint debugging of each control unit; The main control unit and each slave control unit are connected in communication. The main control unit outputs a first PWM wave to control a set number of servo motors; each slave control unit outputs a second PWM wave to control the set number of servo motors. At the first cycle marker point of the first PWM wave, the main control unit sends a control signal to any selected slave control unit to coordinate the servo motor controlled by the selected slave control unit; wherein, the first cycle marker point is any waveform point of the first PWM wave; The selected slave control unit adjusts the second PWM wave in response to the control signal to achieve synchronous and coordinated control of each servo motor.
2. The multi-axis servo driver as described in claim 1, characterized in that, The selected second PWM wave output from the control unit corresponds to the waveform point of the first cycle marker point as the second cycle marker point; When the second cycle marker point leads the first cycle marker point, the control unit extends the period of the second PWM wave until the time difference between the second cycle marker point and the first cycle marker point is less than a set value.
3. The multi-axis servo driver as described in claim 1, characterized in that, The selected second PWM wave output from the control unit corresponds to the waveform point of the first cycle marker point as the second cycle marker point; When the second cycle marker lags behind the first cycle marker, the control unit shortens the period of the second PWM wave until the time difference between the second cycle marker and the first cycle marker is less than a set value.
4. The multi-axis servo drive as described in claim 2 or 3, characterized in that, The first cycle marker is the zero-crossing point of the first PWM wave, and the second cycle marker is the zero-crossing point of the second PWM wave.
5. The multi-axis servo driver as described in claim 4, characterized in that, Each control unit includes a capture unit, which is used to calculate the time difference between the second cycle marker and the first cycle marker.
6. The multi-axis servo driver as described in claim 1, characterized in that, The master control unit and the slave control unit communicate with each other through synchronous serial communication and asynchronous serial communication. The master control unit uses the synchronous serial communication to send control signals to any selected slave control unit; each control unit uses the asynchronous serial communication to send asynchronous communication data to perform asynchronous communication.
7. The multi-axis servo driver as described in claim 6, characterized in that, The asynchronous communication data includes the flag data of the servo motors controlled by each control unit; each control unit obtains the asynchronous communication data and determines whether the flag data matches the servo motors controlled by each control unit. If it matches, the asynchronous communication data is parsed to perform asynchronous communication.
8. The multi-axis servo drive as described in claim 7, characterized in that, The main control unit obtains the feedback signal sent by the selected slave control unit through the synchronous serial communication. The main control unit verifies the feedback signal. When the feedback signal is abnormal, the main control unit sends a reset signal to the selected slave control unit through the asynchronous serial communication to reset the selected slave control unit.
9. The multi-axis servo driver as described in claim 8, characterized in that, The synchronous serial communication is SPI communication, and the asynchronous serial communication is RS232 communication.
10. The multi-axis servo driver as described in claim 9, characterized in that, Each control unit is connected via a daisy chain for RS232 communication.