Motor control methods, servo drivers, storage media, and dual-axis servo systems

CN117424493BActive Publication Date: 2026-09-01SUZHOU GAOCHUANG MOTION CONTROL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311448650.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2026-09-01
Estimated Expiration
2043-11-02

AI Technical Summary

Technical Problem

但现有的电机控制方法对电机的响应并不及时,导致在对电机进行控制的过程中存在电机同步偏差较大,电机控制精度较低等技术问题

Benefits of technology

[0028]本发明的附加方面和优点将在下面的描述部分中变得明显,或通过本发明的实践了解到。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117424493B_ABST
    Figure CN117424493B_ABST
Patent Text Reader

Abstract

This invention proposes a motor control method, a servo driver, a storage medium, and a dual-axis servo system. The motor control method includes: acquiring first position feedback parameters and first speed feedback parameters of a first motor, and receiving second position feedback parameters, a target speed, and a target torque of a second motor sent by a second driver; determining speed feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target speed; determining torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque; and controlling the operation of the first motor based on the speed feedforward compensation parameters and the torque feedforward compensation parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control technology, and more specifically, to a motor control method, a servo driver, a storage medium, and a dual-axis servo system. Background Technology

[0002] In existing technical solutions, external bus communication is typically used to acquire motor position information in order to achieve gantry synchronization of two single-axis servo motors. However, existing motor control methods do not respond to motors in a timely manner, resulting in technical problems such as large motor synchronization deviations and low motor control accuracy during the motor control process. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.

[0004] Therefore, the first aspect of the present invention is to provide a method for controlling an electric motor.

[0005] A second aspect of the invention is to provide a servo driver.

[0006] A third aspect of the present invention is to provide a readable storage medium.

[0007] A fourth aspect of the present invention is to provide a dual-axis servo system.

[0008] In view of the above, according to a first aspect of the present invention, a motor control method is proposed, executed by a first driver connected to a second driver. The first driver drives a first motor, and the second driver drives a second motor. The motor control method includes: acquiring first position feedback parameters and first speed feedback parameters of the first motor; and receiving second position feedback parameters, a target speed, and a target torque of the second motor sent by the second driver; determining speed feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target speed; determining torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque; and controlling the operation of the first motor based on the speed feedforward compensation parameters and the torque feedforward compensation parameters.

[0009] The motor control method in this technical solution significantly reduces the synchronization deviation between the first motor and the second motor, while improving the control accuracy of the first motor and the second motor.

[0010] The motor control method according to the present invention may further include the following additional technical features:

[0011] Optionally, in some technical solutions, a motor control method is proposed, which determines speed feedforward compensation parameters based on a first position feedback parameter, a second position feedback parameter, and a target speed, including: determining the operating position difference based on the first position feedback parameter and the second position feedback parameter, wherein the operating position difference is the position difference between the first motor and the second motor; and determining the speed feedforward compensation parameters based on the operating position difference and the target speed.

[0012] The motor control method in this technical solution obtains the operating position difference between the first motor and the second motor by performing a difference calculation on the first position feedback parameter and the second position feedback parameter, and processes the operating position difference and the target speed to obtain the speed feedforward compensation parameter of the first motor, thereby improving the data accuracy of the speed feedforward compensation parameter of the first motor and thus improving the control precision of the first motor.

[0013] Optionally, in some technical solutions, a motor control method is proposed, which determines speed feedforward compensation parameters based on the operating position difference and the target speed, including: determining the speed feedforward coefficient based on the target speed; and determining the speed feedforward compensation parameters based on the speed feedforward coefficient and the operating position difference.

[0014] The motor control method in this technical solution determines the speed feedforward coefficient based on the target speed, and determines the speed feedforward compensation parameter based on the speed feedforward coefficient and the running position difference, thus ensuring the accuracy of the speed feedforward compensation parameter and thereby ensuring the accuracy of the control of the first motor.

[0015] Optionally, in some technical solutions, a motor control method is proposed, which determines torque feedforward compensation parameters based on a first speed feedback parameter, a second position feedback parameter, and a target torque. This includes: determining the operating speed of the second motor based on the second position feedback parameter; determining the operating speed difference based on the operating speed and the first speed feedback parameter, wherein the operating speed difference is the speed difference between the first motor and the second motor; and determining the torque feedforward compensation parameters based on the operating speed difference and the target torque.

[0016] The motor control method in this technical solution obtains the running speed of the second motor by processing the second position feedback parameters, determines the running speed difference based on the running speed and the first speed feedback parameters, and then processes the running speed difference and the target torque to obtain the torque feedforward compensation parameters. This ensures the accuracy of the torque feedforward compensation parameters, thereby ensuring the accuracy of the control of the first motor.

[0017] Optionally, in some technical solutions, a motor control method is proposed, which determines torque feedforward compensation parameters based on the operating speed difference and the target torque, including: obtaining a preset gain parameter, a first time constant and a second time constant, wherein the first time constant is the time constant of the first motor and the second time constant is the time constant of the second motor; and determining the torque feedforward compensation parameters based on the preset gain parameter, the first time constant, the second time constant, the operating speed difference and the target torque.

[0018] The motor control method in this technical solution obtains the running speed of the second motor by processing the second position feedback parameters, determines the running speed difference based on the running speed and the first speed feedback parameters, and then processes the running speed difference and the target torque to obtain the torque feedforward compensation parameters. This ensures the accuracy of the torque feedforward compensation parameters, thereby ensuring the accuracy of the control of the first motor.

[0019] Optionally, in some technical solutions, a motor control method is proposed, which acquires first position feedback parameters and first speed feedback parameters of a first motor, and receives second position feedback parameters, target speed, and target torque of a second motor sent by a second driver. The method includes: acquiring the first position feedback parameters and first speed feedback parameters according to a preset period, and receiving a data packet sent by the second motor, the data packet including the second position feedback parameters, target speed, and target torque; wherein, the first position feedback parameters and first speed feedback parameters are acquired and the data packet is received within a first duration after the start of the preset period.

[0020] The motor control method in this technical solution ensures the accuracy of the second position feedback parameter, thereby ensuring the accuracy of the control of the first motor and the second motor.

[0021] Optionally, in some technical solutions, a motor control method is proposed, which further includes controlling the first motor to decelerate when the data packet includes alarm information.

[0022] In this technical solution, the motor control method involves a first driver controlling the first motor to decelerate when the data packet includes alarm information, thus ensuring the safe operation of both the first and second motors and preventing malfunctions in either motor.

[0023] Optionally, in some technical solutions, a motor control method is proposed, which, before acquiring the first position feedback parameters and the first speed feedback parameters of the first motor, and receiving the second position feedback parameters, target speed, and target torque of the second motor sent by the second driver, further includes: sending the motor parameters of the first motor to the second driver, and receiving the motor parameters of the second motor sent by the second driver; wherein, the motor parameters include at least one of the following: encoder resolution and preset operating speed.

[0024] The motor control method in this technical solution ensures the accuracy of the parameters of the first motor and the second motor by sending the motor parameters of the first motor to the second driver and receiving the motor parameters of the second motor sent by the second driver, thereby ensuring the operating accuracy of the first motor and the second motor.

[0025] According to a second aspect of the present invention, a servo driver is provided, comprising a processor and a memory, wherein the memory stores a program or instructions that, when executed by the processor, implement the steps of the motor control method as described in any of the above-described technical solutions. Therefore, this servo driver possesses all the beneficial effects of the motor control method in any of the above-described technical solutions, which will not be elaborated further here.

[0026] According to a third aspect of the present invention, a readable storage medium is provided on which a program or instructions are stored, which, when executed by a processor, implement the motor control method as described in any of the above-described technical solutions. Therefore, this readable storage medium possesses all the beneficial effects of the motor control method in any of the above-described technical solutions, which will not be elaborated further here.

[0027] According to a fourth aspect of the present invention, a dual-axis servo system is provided, comprising: a first motor and a second motor; a first driver connected to the first motor for driving the first motor; a second driver connected to the first driver and the second motor for driving the second motor; the first driver and the second driver being communicatively connected via a serial peripheral interface; a first encoder connected to the first motor for acquiring a first position feedback parameter and a first speed feedback parameter of the first motor; and a second encoder connected to the second motor for acquiring a second position feedback parameter of the second motor. The first driver is used to execute the steps of the motor control method as described in any of the above technical solutions. Therefore, this dual-axis servo system possesses all the beneficial effects of the motor control method in any of the above technical solutions, which will not be elaborated further here.

[0028] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description

[0029] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0030] Figure 1 One of the schematic flowcharts of a motor control method according to an embodiment of the present invention is shown;

[0031] Figure 2 A second schematic flowchart of the motor control method in an embodiment of the present invention is shown;

[0032] Figure 3 The third schematic flowchart of the motor control method in an embodiment of the present invention is shown;

[0033] Figure 4 The fourth schematic flowchart of the motor control method in an embodiment of the present invention is shown;

[0034] Figure 5 Fifth of the flowcharts illustrating the motor control method in an embodiment of the present invention is shown;

[0035] Figure 6 A sixth schematic flowchart of the motor control method in an embodiment of the present invention is shown;

[0036] Figure 7 A flowchart of the motor control method in an embodiment of the present invention is shown as diagram number seven.

[0037] Figure 8 Eighth schematic flowchart of the motor control method in an embodiment of the present invention is shown;

[0038] Figure 9 A structural block diagram of a motor control device according to an embodiment of the present invention is shown;

[0039] Figure 10 A structural block diagram of a servo driver according to an embodiment of the present invention is shown;

[0040] Figure 11 One of the schematic diagrams of a dual-axis servo system according to an embodiment of the present invention is shown;

[0041] Figure 12 A second schematic diagram of a dual-axis servo system according to an embodiment of the present invention is shown;

[0042] Figure 13 A third schematic diagram of a dual-axis servo system in an embodiment of the present invention is shown;

[0043] Figure 14 A fourth schematic diagram of a dual-axis servo system in an embodiment of the present invention is shown;

[0044] Figure 15One of the control flowcharts of a dual-axis servo system according to an embodiment of the present invention is shown;

[0045] Figure 16 The second control flowchart of the dual-axis servo system in an embodiment of the present invention is shown. Detailed Implementation

[0046] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.

[0047] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0048] The following is combined Figures 1 to 16 The present application provides a detailed description of the motor control method, servo driver, storage medium, and dual-axis servo system provided in the embodiments of this application through specific implementation methods and application scenarios.

[0049] like Figure 1 As shown, an embodiment of the present invention provides a method for controlling a motor, the method comprising:

[0050] Step 102: Obtain the first position feedback parameters and the first speed feedback parameters of the first motor, and receive the second position feedback parameters, target speed and target torque of the second motor sent by the second driver;

[0051] Step 104: Determine the velocity feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target velocity;

[0052] Step 106: Determine the torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque;

[0053] Step 108: Control the operation of the first motor according to the speed feedforward compensation parameters and torque feedforward compensation parameters.

[0054] In this embodiment, a method for controlling a motor is provided, which is executed by a first driver. The motor includes a first motor and a second motor. The first driver is connected to the second driver. The first driver is a device for driving the first motor, and the second driver is a device for driving the second motor. The first motor and the second motor are independent motors.

[0055] For example, the first motor and the second motor may specifically be single-axis servo motors.

[0056] For example, the first motor and the second motor can be specifically motors on both sides of the gantry.

[0057] The first drive acquires the first position feedback parameters and the first speed feedback parameters of the first motor, and receives the second position feedback parameters, target speed and target torque of the second motor sent by the second drive. The first position feedback parameters are the position feedback parameters of the first motor, the first speed feedback parameters are the speed feedback parameters of the first motor, the second position feedback parameters are the position feedback parameters of the second motor, the target speed is the speed that the second motor needs to reach, and the target torque is the torque that the second motor needs to reach.

[0058] For example, the first position feedback parameter can be the real-time position feedback of the first motor, and the second position feedback parameter can be the real-time position feedback of the second motor.

[0059] For example, the target speed can be specifically a parameter determined by a speed command from the second motor.

[0060] For example, the target torque may be specifically a parameter determined by the torque command of the second motor.

[0061] The first driver determines the speed feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target speed. The feedforward compensation parameters are compensation parameters used to control the first motor.

[0062] For example, the feedforward compensation parameters may specifically include speed feedforward compensation and torque feedforward compensation.

[0063] The first driver determines the torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque. The torque feedforward compensation parameters are parameters used to feedforward compensate the torque of the first motor.

[0064] For example, the first driver can calculate the actual speed of the other party through the position feedback of the other party, adjust the speed deviation between the two axes through a PI controller, output a torque feedforward compensation amount, and add torque feedforward obtained according to the torque change rate of the other party.

[0065] The first driver controls the operation of the first motor based on speed feedforward compensation parameters and torque feedforward compensation parameters.

[0066] For example, the first driver can adjust the rotational speed and speed of the first motor based on speed feedforward compensation parameters and torque feedforward compensation parameters.

[0067] The motor control method in this embodiment is based on speed feedforward compensation parameters and torque feedforward compensation parameters to control the operation of the first motor so that the first motor and the second motor operate synchronously, ensuring the synchronization rate of the first motor and the second motor, significantly reducing the synchronization deviation between the first motor and the second motor, and improving the control accuracy of the first motor and the second motor.

[0068] In some embodiments, optionally, such as Figure 2 As shown, a motor control method is proposed, which determines speed feedforward compensation parameters based on a first position feedback parameter, a second position feedback parameter, and a target speed, including:

[0069] Step 202: Determine the operating position difference based on the first position feedback parameter and the second position feedback parameter;

[0070] Step 204: Determine the speed feedforward compensation parameters based on the operating position difference and the target speed.

[0071] In this embodiment, the first driver performs a difference calculation on the first position feedback parameter and the second position feedback parameter to obtain the operating position difference between the first motor and the second motor, wherein the operating position difference is the position difference between the first motor and the second motor.

[0072] For example, the operating position difference can be specifically the position difference generated by the first motor and the second motor during synchronous operation.

[0073] The first driver processes the operating position difference and target speed to obtain the speed feedforward compensation parameters for the first motor.

[0074] For example, the first driver can divide the operating position difference by the target speed to obtain the speed feedforward compensation parameters of the first motor.

[0075] The motor control method in this embodiment obtains the operating position difference between the first motor and the second motor by performing a difference calculation on the first position feedback parameter and the second position feedback parameter, and processes the operating position difference and the target speed to obtain the speed feedforward compensation parameter of the first motor, thereby improving the data accuracy of the speed feedforward compensation parameter of the first motor and thus improving the control precision of the first motor.

[0076] In some embodiments, optionally, such as Figure 3 As shown, a motor control method is proposed, which determines the speed feedforward compensation parameters based on the operating position difference and the target speed, including:

[0077] Step 302: Determine the velocity feedforward coefficient based on the target velocity;

[0078] Step 304: Determine the speed feedforward compensation parameters based on the speed feedforward coefficient and the operating position difference.

[0079] In this embodiment, the first driver determines the speed feedforward coefficient based on the target speed, and determines the speed feedforward compensation parameter based on the speed feedforward coefficient and the operating position difference, wherein the speed feedforward coefficient is the feedback coefficient corresponding to the first motor.

[0080] For example, the first driver can determine the speed feedforward coefficient by means of the speed command corresponding to the target speed.

[0081] In this embodiment, the motor control method determines the speed feedforward coefficient based on the target speed, and determines the speed feedforward compensation parameter based on the speed feedforward coefficient and the running position difference, thus ensuring the accuracy of the speed feedforward compensation parameter and thereby ensuring the accuracy of the control of the first motor.

[0082] In some embodiments, optionally, such as Figure 4 As shown, a motor control method is proposed, which determines torque feedforward compensation parameters based on a first speed feedback parameter, a second position feedback parameter, and a target torque, including:

[0083] Step 402: Determine the operating speed of the second motor based on the second position feedback parameters;

[0084] Step 404: Determine the running speed difference based on the running speed and the first speed feedback parameter;

[0085] Step 406: Determine the torque feedforward compensation parameters based on the operating speed difference and the target torque.

[0086] In this embodiment, the first driver processes the second position feedback parameters to obtain the operating speed of the second motor, wherein the operating speed is data of the second motor during operation.

[0087] For example, the operating speed can be specifically the real-time operating speed of the second motor.

[0088] For example, the moving distance of the second motor can be determined by the second position feedback parameter, and then the operating speed of the second motor can be determined.

[0089] The first driver determines the operating speed difference based on the operating speed and the first speed feedback parameter, wherein the operating speed difference is the speed difference between the first motor and the second motor.

[0090] For example, the first driver can perform a difference calculation on the operating speed and the first speed feedback parameter to obtain the operating speed difference.

[0091] The first driver processes the operating speed difference and the target torque to obtain torque feedforward compensation parameters.

[0092] For example, the first driver multiplies the operating speed difference and the target torque to obtain torque feedforward compensation parameters.

[0093] The motor control method in this embodiment obtains the running speed of the second motor by processing the second position feedback parameters, determines the running speed difference based on the running speed and the first speed feedback parameters, and then processes the running speed difference and the target torque to obtain the torque feedforward compensation parameters, thus ensuring the accuracy of the torque feedforward compensation parameters and thereby ensuring the accuracy of the control of the first motor.

[0094] In some embodiments, optionally, such as Figure 5 As shown, a motor control method is proposed, which determines torque feedforward compensation parameters based on the operating speed difference and the target torque, including:

[0095] Step 502: Obtain the preset gain parameter, the first time constant, and the second time constant;

[0096] Step 504: Determine the torque feedforward compensation parameters based on the preset gain parameters, the first time constant, the second time constant, the operating speed difference, and the target torque.

[0097] In this embodiment, the first driver acquires a preset gain parameter, a first time constant, and a second time constant, wherein the preset gain parameter is a pre-stored gain parameter, the first time constant is the time constant of the first motor, and the second time constant is the time constant of the second motor.

[0098] For example, the first time constant can be specifically 50 microseconds, and the second time constant can be specifically 60 microseconds.

[0099] The first driver processes the preset gain parameters, the first time constant, the second time constant, the operating speed difference, and the target torque to obtain the torque feedforward compensation parameters.

[0100] The motor control method in this embodiment obtains the running speed of the second motor by processing the second position feedback parameters, determines the running speed difference based on the running speed and the first speed feedback parameters, and then processes the running speed difference and the target torque to obtain the torque feedforward compensation parameters, thus ensuring the accuracy of the torque feedforward compensation parameters and thereby ensuring the accuracy of the control of the first motor.

[0101] In some embodiments, optionally, such as Figure 6 As shown, a motor control method is proposed, which includes:

[0102] Step 602: Obtain the first position feedback parameter and the first speed feedback parameter according to the preset cycle, and receive the data packet sent by the second motor;

[0103] Step 604: Determine the velocity feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target velocity;

[0104] Step 606: Determine the torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque;

[0105] Step 608: Control the operation of the first motor according to the speed feedforward compensation parameters and torque feedforward compensation parameters.

[0106] In this embodiment, the first driver acquires the first position feedback parameter and the first speed feedback parameter according to a preset period, and receives the data packet sent by the second motor. The first driver acquires the first position feedback parameter and the first speed feedback parameter and receives the data packet within a first duration after the start of the preset period. The preset period is a preset acquisition period, the first duration is a preset duration, and the data packet includes the second position feedback parameter, the target speed, and the target torque.

[0107] For example, the preset period can be the operating period of the servo position controller and the speed controller, specifically 62.5µs.

[0108] For example, the first duration can be specifically the first 7.2us of a preset period.

[0109] In this embodiment, the motor control method acquires the first position feedback parameter and the first speed feedback parameter according to a preset cycle, and receives the data packet sent by the second motor, thereby ensuring the accuracy of the second position feedback parameter and thus ensuring the accuracy of the control of the first motor and the second motor.

[0110] In some embodiments, optionally, such as Figure 7 As shown, a motor control method is proposed, which includes:

[0111] Step 702: Obtain the first position feedback parameter and the first speed feedback parameter according to the preset cycle, and receive the data packet sent by the second motor;

[0112] Step 704: If the data packet includes alarm information, control the first motor to decelerate.

[0113] Step 706: Determine the velocity feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target velocity;

[0114] Step 708: Determine the torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque;

[0115] Step 710: Control the operation of the first motor according to the speed feedforward compensation parameters and torque feedforward compensation parameters.

[0116] In this embodiment, if the data packet includes alarm information, it indicates that the second motor has a problem, and the first driver controls the first motor to decelerate. The alarm information is the alarm information corresponding to the second motor.

[0117] For example, the alarm information is generated when the second motor malfunctions.

[0118] In this embodiment, when the data packet includes alarm information, the motor control method uses a first driver to control the first motor to decelerate, ensuring the safe operation of both the first and second motors and preventing malfunctions in both motors.

[0119] In some embodiments, optionally, such as Figure 8 As shown, a motor control method is proposed, which includes:

[0120] Step 802: Send the motor parameters of the first motor to the second driver, and receive the motor parameters of the second motor sent by the second driver;

[0121] Step 804: Obtain the first position feedback parameters and the first speed feedback parameters of the first motor, and receive the second position feedback parameters, target speed and target torque of the second motor sent by the second driver;

[0122] Step 806: Determine the velocity feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target velocity;

[0123] Step 808: Determine the torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque;

[0124] Step 810: Control the operation of the first motor according to the speed feedforward compensation parameters and torque feedforward compensation parameters.

[0125] In this embodiment, the first driver sends the motor parameters of the first motor to the second driver and receives the motor parameters of the second motor sent by the second driver. The motor parameters include at least one of the following: the encoder resolution and the preset operating speed. The encoder resolution is the position data output by the encoder in one revolution, and the preset operating speed is a preset motor speed.

[0126] For example, the motor parameters of the first motor may include the encoder resolution and the preset operating speed.

[0127] For example, the motor parameters of the second motor may include the encoder resolution and the preset operating speed.

[0128] The motor control method in this embodiment ensures the accuracy of the parameters of the first motor and the second motor by sending the motor parameters of the first motor to the second driver and receiving the motor parameters of the second motor sent by the second driver, thereby ensuring the operating accuracy of the first motor and the second motor.

[0129] like Figure 9 As shown, an embodiment of the present invention provides a motor control device, the motor control device 900 comprising:

[0130] The acquisition module 902 is used to acquire the first position feedback parameters and the first speed feedback parameters of the first motor, and to receive the second position feedback parameters, target speed and target torque of the second motor sent by the second driver;

[0131] The determination module 904 is also used to determine the velocity feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target velocity;

[0132] The determination module 904 is also used to determine the torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque;

[0133] The control module 906 is also used to control the operation of the first motor based on the speed feedforward compensation parameters and the torque feedforward compensation parameters.

[0134] In this embodiment, a motor control device 900 is provided, which is executed by a first driver. The motor includes a first motor and a second motor. The first driver is connected to the second driver. The first driver is a device for driving the first motor, and the second driver is a device for driving the second motor. The first motor and the second motor are independent motors.

[0135] For example, the first motor and the second motor may specifically be single-axis servo motors.

[0136] For example, the first motor and the second motor can be specifically motors on both sides of the gantry.

[0137] The first drive acquires the first position feedback parameters and the first speed feedback parameters of the first motor, and receives the second position feedback parameters, target speed and target torque of the second motor sent by the second drive. The first position feedback parameters are the position feedback parameters of the first motor, the first speed feedback parameters are the speed feedback parameters of the first motor, the second position feedback parameters are the position feedback parameters of the second motor, the target speed is the speed that the second motor needs to reach, and the target torque is the torque that the second motor needs to reach.

[0138] For example, the first position feedback parameter can be the real-time position feedback of the first motor, and the second position feedback parameter can be the real-time position feedback of the second motor.

[0139] For example, the target speed can be specifically a parameter determined by a speed command from the second motor.

[0140] For example, the target torque may be specifically a parameter determined by the torque command of the second motor.

[0141] The first driver determines the speed feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target speed. The feedforward compensation parameters are compensation parameters used to control the first motor.

[0142] For example, the feedforward compensation parameters may specifically include speed feedforward compensation and torque feedforward compensation.

[0143] The first driver determines the torque feedforward compensation parameters based on the first speed feedback parameters, the second position feedback parameters, and the target torque. The torque feedforward compensation parameters are parameters used to feedforward compensate the torque of the first motor.

[0144] For example, the first driver can calculate the actual speed of the other party through the position feedback of the other party, adjust the speed deviation between the two axes through a PI controller, output a torque feedforward compensation amount, and add torque feedforward obtained according to the torque change rate of the other party.

[0145] The first driver controls the operation of the first motor based on speed feedforward compensation parameters and torque feedforward compensation parameters.

[0146] For example, the first driver can adjust the rotational speed and speed of the first motor based on speed feedforward compensation parameters and torque feedforward compensation parameters.

[0147] In this embodiment, the motor control device 900 controls the operation of the first motor based on speed feedforward compensation parameters and torque feedforward compensation parameters, so that the first motor and the second motor operate synchronously, ensuring the synchronization rate of the first motor and the second motor, greatly reducing the synchronization deviation between the first motor and the second motor, and improving the control accuracy of the first motor and the second motor.

[0148] In some embodiments, the motor control device 900 may optionally further include:

[0149] The control module 906 is also used to determine the operating position difference based on the first position feedback parameter and the second position feedback parameter, wherein the operating position difference is the position difference between the first motor and the second motor;

[0150] The control module 906 is also used to determine the speed feedforward compensation parameters based on the operating position difference and the target speed.

[0151] In this embodiment, the motor control device 900 calculates the difference between the first and second motors by performing a difference calculation on the first and second position feedback parameters. It then processes the operating position difference and the target speed to obtain the speed feedforward compensation parameters of the first motor, thereby improving the accuracy of the speed feedforward compensation parameters of the first motor and thus improving the control precision of the first motor.

[0152] In some embodiments, the motor control device 900 may optionally further include:

[0153] The determination module 904 is also used to determine the velocity feedforward coefficient based on the target velocity;

[0154] The determination module 904 is also used to determine the speed feedforward compensation parameters based on the speed feedforward coefficient and the operating position difference.

[0155] In this embodiment, the motor control device 900 determines the speed feedforward coefficient based on the target speed, and determines the speed feedforward compensation parameter based on the speed feedforward coefficient and the running position difference, thereby ensuring the accuracy of the speed feedforward compensation parameter and thus ensuring the control accuracy of the first motor.

[0156] In some embodiments, the motor control device 900 may optionally further include:

[0157] The determination module 904 is also used to determine the operating speed of the second motor based on the second position feedback parameters;

[0158] The determination module 904 is also used to determine the running speed difference based on the running speed and the first speed feedback parameter, wherein the running speed difference is the speed difference between the first motor and the second motor;

[0159] The determination module 904 is also used to determine the torque feedforward compensation parameters based on the operating speed difference and the target torque.

[0160] In this embodiment, the motor control device 900 processes the second position feedback parameters to obtain the running speed of the second motor. Based on the running speed and the first speed feedback parameters, it determines the running speed difference. Then, it processes the running speed difference and the target torque to obtain the torque feedforward compensation parameters, ensuring the accuracy of the torque feedforward compensation parameters and thus ensuring the accuracy of the control of the first motor.

[0161] In some embodiments, the motor control device 900 may optionally further include:

[0162] The determination module 904 is also used to obtain preset gain parameters, a first time constant and a second time constant, wherein the first time constant is the time constant of the first motor and the second time constant is the time constant of the second motor;

[0163] The determination module 904 is also used to determine the torque feedforward compensation parameters based on the preset gain parameters, the first time constant, the second time constant, the running speed difference, and the target torque.

[0164] In this embodiment, the motor control device 900 processes the second position feedback parameters to obtain the running speed of the second motor. Based on the running speed and the first speed feedback parameters, it determines the running speed difference. Then, it processes the running speed difference and the target torque to obtain the torque feedforward compensation parameters, ensuring the accuracy of the torque feedforward compensation parameters and thus ensuring the accuracy of the control of the first motor.

[0165] In some embodiments, the motor control device 900 may optionally further include:

[0166] The acquisition module 902 is further configured to acquire the first position feedback parameter and the first speed feedback parameter according to a preset period, and to receive a data packet sent by the second motor, the data packet including the second position feedback parameter, the target speed and the target torque;

[0167] Specifically, the first position feedback parameter and the first speed feedback parameter are acquired and the data packet is received within a first duration after the start of the preset period.

[0168] In this embodiment, the motor control device 900 acquires the first position feedback parameter according to a preset cycle and receives the data packet sent by the second motor, ensuring the accuracy of the second position feedback parameter, thereby ensuring the accuracy of the control of the first motor and the second motor.

[0169] In some embodiments, the motor control device 900 may optionally further include:

[0170] The control module 906 is also used to control the first motor to decelerate when the data packet includes alarm information.

[0171] In this embodiment, when the data packet includes alarm information, the motor control device 900 controls the first motor to decelerate, ensuring the safe operation of the first and second motors and preventing malfunctions in the first and second motors.

[0172] In some embodiments, the motor control device 900 may optionally further include:

[0173] The acquisition module 902 is also used to send the motor parameters of the first motor to the second driver, and to receive the motor parameters of the second motor sent by the second driver;

[0174] The motor parameters include at least one of the following: encoder resolution and preset operating speed.

[0175] In this embodiment, the motor control device 900 ensures the accuracy of the parameters of the first motor and the second motor by sending the motor parameters of the first motor to the second driver and receiving the motor parameters of the second motor sent by the second driver, thereby ensuring the operating accuracy of the first motor and the second motor.

[0176] In some embodiments, optionally, such as Figure 10 As shown, a servo driver 1000 is proposed. The servo driver 1000 includes a processor 1002 and a memory 1004. The memory 1004 stores a program or instructions, which, when executed by the processor 1002, implement the steps of the motor control method as described in any of the above-described technical solutions. Therefore, the servo driver 1000 possesses all the beneficial effects of the motor control method in any of the above-described technical solutions, which will not be elaborated further here.

[0177] In some embodiments, optionally, a readable storage medium is provided having a program stored thereon, which, when executed by a processor, implements the motor control method as described in any of the above embodiments, and thus has all the beneficial technical effects of the motor control method in any of the above embodiments.

[0178] Among them, readable storage media include read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0179] In some embodiments, optionally, a dual-axis servo system is provided, comprising:

[0180] First motor and second motor;

[0181] The first driver is connected to the first motor and is used to drive the first motor;

[0182] The second driver is connected to the first driver and the second motor, and is used to drive the second motor;

[0183] The first driver and the second driver are connected via a serial peripheral interface;

[0184] The first encoder is connected to the first motor and is used to collect the first position feedback parameters and the first speed feedback parameters of the first motor.

[0185] The second encoder is connected to the second motor and is used to collect the second position feedback parameters of the second motor.

[0186] The first driver is used to perform the steps of the motor control method as described in any of the above embodiments.

[0187] For example, such as Figure 11 As shown, the dual-axis servo system can specifically include a dual-axis servo motor, including MCU1 (microprocessor) and MCU2 (microprocessor). MCU1 and MCU2 communicate with each other via high-speed SPI (serial port). MCU1 and Encoder1 communicate via RS485 (a communication protocol). MCU2 and Encoder2 also communicate via RS485.

[0188] For example, such as Figure 12 As shown, the dual-axis servo system can specifically include a gantry synchronous controller 1 and a gantry synchronous controller 2. The gantry synchronous controller 1 controls the motor 1 through position loop 1, speed loop 1, current loop 1 and inverter bridge 1, and the gantry synchronous controller 2 controls the motor 2 through position loop 2, speed loop 2, current loop 2 and inverter bridge 2.

[0189] For example, such as Figure 13 As shown, during operation, the dual-axis servo system can determine speed feedforward and current feedforward based on the position feedback of motor 1, the position feedback of motor 2, the speed command of motor 2, the speed feedback of motor 1, and the current command of motor 1. Here, K1 is the speed feedforward coefficient, d / dt is the derivative of the speed command of motor 2, PI is a first-order low-pass filter, K is the filter gain, and T... 1s is the time constant.

[0190] For example, such as Figure 14 As shown, the dual-axis servo system may include Encoder1 and Encoder2, and the operating cycle of the servo position controller and speed controller can be 62.5us.

[0191] For example, such as Figure 15 and Figure 16As shown, a dual-axis servo system can include two controllers, each controlling one motor. The two controllers communicate via an SPI bus with a communication rate of 10 Mbit / s. Figure 15 SVPWM stands for Space Vector Width Modulation.

[0192] The two controllers exchange a data packet in 62.5µs. The exchanged data includes 32 bits of position information, 16 bits of speed command information, 16 bits of torque information, and 8 bits of alarm and status bits, totaling 72 bits of data, with a transmission time of 7.2µs. After receiving the data from MCU1, MCU2 performs timing synchronization of the dual-axis servo and calculations for the gantry synchronous controller.

[0193] The servo position controller and speed controller have an operating cycle of 62.5us. At the beginning of each 62.5us timing phase, a command is sent to the encoder to request position feedback. At the same time, data interaction is completed with another MCU via SPI communication. After the data interaction is completed, the gantry synchronous controller is triggered to obtain the speed feedforward and torque feedforward values, and then the position controller and speed controller are executed to complete the servo position loop and speed loop control.

[0194] The dual-axis gantry synchronous controller requires the following input variables: its own position feedback, the other axis's position feedback, its own speed feedback, the other axis's speed command, and the other axis's torque command. A PI controller adjusts the position deviation between the two axes, outputting a speed feedforward compensation. Simultaneously, based on the derivative of the other axis's speed command, an acceleration feedforward is applied and added to the speed command. The other axis's actual speed is calculated using its position feedback. A PI controller adjusts the speed deviation between the two axes, outputting a torque feedforward compensation, which is then added to the torque feedforward calculated based on the other axis's torque change rate. The gantry synchronous controller operates at the same frequency as the position controller, maximizing the real-time synchronization of the gantry.

[0195] During the initialization phase of a dual-axis servo drive, the two MCUs (microprocessors) first read the information of the motors they are connected to, and then share the information with each other via SPI.

[0196] When the servo triggers an alarm, disables, or performs other actions requiring a shutdown, it promptly informs the other party of its status through interactive 8-bit alarm and status bits. Both gantry axes simultaneously enter deceleration mode and exchange information such as position, speed, and torque between the two axes in real time. Based on the other party's real-time information, it can quickly complete synchronous stopping.

[0197] When the encoder of one shaft in the gantry shaft fails, the faulty shaft obtains the encoder feedback information of the normal shaft, completes closed-loop control, and achieves controlled stopping after the fault.

[0198] It should be clarified that in the claims, description, and accompanying drawings of this invention, the term "plural" refers to two or more. Unless otherwise explicitly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description process, not to indicate or imply that the device or element referred to must have the described specific orientation, or be constructed and operated in a specific orientation. Therefore, these descriptions should not be construed as limiting the invention. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection between multiple objects, a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects or an indirect connection between multiple objects through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in this invention can be understood based on the specific circumstances of the above data.

[0199] In the claims, description, and accompanying drawings of this invention, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the invention. In the claims, description, and accompanying drawings of this invention, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0200] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for controlling an electric motor, characterized in that, The control method for the motors, executed by a first driver connected to a second driver, wherein the first driver drives a first motor and the second driver drives a second motor, includes: The system acquires the first position feedback parameters and the first speed feedback parameters of the first motor, and receives the second position feedback parameters, target speed, and target torque of the second motor from the second driver. Determine the velocity feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target velocity; Based on the first speed feedback parameter, the second position feedback parameter, and the target torque, determine the torque feedforward compensation parameter; The first motor is controlled to operate based on the speed feedforward compensation parameters and the torque feedforward compensation parameters.

2. The motor control method according to claim 1, characterized in that, The step of determining the velocity feedforward compensation parameters based on the first position feedback parameters, the second position feedback parameters, and the target velocity includes: The operating position difference is determined based on the first position feedback parameter and the second position feedback parameter, wherein the operating position difference is the position difference between the first motor and the second motor; The speed feedforward compensation parameters are determined based on the operating position difference and the target speed.

3. The motor control method according to claim 2, characterized in that, The step of determining the speed feedforward compensation parameters based on the operating position difference and the target speed includes: Determine the velocity feedforward coefficient based on the target velocity; The speed feedforward compensation parameters are determined based on the speed feedforward coefficient and the operating position difference.

4. The motor control method according to claim 1, characterized in that, The step of determining the torque feedforward compensation parameters based on the first speed feedback parameter, the second position feedback parameter, and the target torque includes: The operating speed of the second motor is determined based on the second position feedback parameters; The operating speed difference is determined based on the operating speed and the first speed feedback parameter, wherein the operating speed difference is the speed difference between the first motor and the second motor; The torque feedforward compensation parameters are determined based on the operating speed difference and the target torque.

5. The motor control method according to claim 4, characterized in that, The step of determining the torque feedforward compensation parameters based on the operating speed difference and the target torque includes: Obtain a preset gain parameter, a first time constant, and a second time constant, wherein the first time constant is the time constant of the first motor, and the second time constant is the time constant of the second motor; The torque feedforward compensation parameters are determined based on the preset gain parameters, the first time constant, the second time constant, the operating speed difference, and the target torque.

6. The motor control method according to any one of claims 1 to 5, characterized in that, The step of acquiring the first position feedback parameters and the first speed feedback parameters of the first motor, and receiving the second position feedback parameters, target speed, and target torque of the second motor sent by the second driver, includes: The first position feedback parameter and the first speed feedback parameter are acquired according to a preset period, and a data packet sent by the second motor is received. The data packet includes the second position feedback parameter, the target speed, and the target torque. Specifically, the first position feedback parameter and the first speed feedback parameter are acquired and the data packet is received within a first duration after the start of the preset period.

7. The motor control method according to claim 6, characterized in that, The motor control method further includes: If the data packet includes alarm information, the first motor is controlled to decelerate.

8. The motor control method according to any one of claims 1 to 5, characterized in that, Before acquiring the first position feedback parameters and first speed feedback parameters of the first motor, and receiving the second position feedback parameters, target speed, and target torque of the second motor sent by the second driver, the method further includes: Send the motor parameters of the first motor to the second driver, and receive the motor parameters of the second motor sent by the second driver; The motor parameters include at least one of the following: encoder resolution and preset operating speed.

9. A servo driver, characterized in that, include: A processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as claimed in any one of claims 1 to 8.

10. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 8.

11. A dual-axis servo system, characterized in that, include: First motor and second motor; A first driver is connected to the first motor and is used to drive the first motor; The second driver is connected to the first driver and the second motor, and is used to drive the second motor; The first driver and the second driver are connected via a serial peripheral interface; The first encoder is connected to the first motor and is used to collect the first position feedback parameter and the first speed feedback parameter of the first motor. The second encoder is connected to the second motor and is used to collect the second position feedback parameters of the second motor; The first driver is used to perform the steps of the motor control method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Servo motor control method and control system

    CN112821810A

  • High-voltage current transformer error approximation evaluation method and system based on initial error

    CN117421546A