A servo motor control method, device, equipment and medium

By acquiring IO control signals and calculating target jerk and acceleration, instruction planning is performed, solving the mechanical vibration problem of servo products during startup and arrival phases, achieving smooth transition of acceleration and speed, reducing mechanical vibration, extending mechanical life and reducing system cost.

CN113965140BActive Publication Date: 2026-01-16PEITIAN ROBOTICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010692602.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2026-01-16
Estimated Expiration
2040-07-17

AI Technical Summary

Technical Problem

Existing servo products exhibit abrupt changes in speed or acceleration during startup and arrival phases, leading to mechanical vibrations that may damage the mechanical structure.

Method used

By acquiring I/O control signals, determining control parameters, calculating target jerk and acceleration, performing instruction planning, and controlling the movement of the servo motor, a smooth transition of acceleration and speed can be achieved.

Benefits of technology

Reduce the mechanical vibration of the servo motor, extend the service life of the machine, and reduce system costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113965140B_ABST
    Figure CN113965140B_ABST
Patent Text Reader

Abstract

The application discloses a servo motor control method, device, equipment and medium. The method comprises the following steps: acquiring an IO control signal; determining a control parameter according to the IO control signal and a current state parameter of a servo motor corresponding to a servo driver; determining a target jerk according to the control parameter; determining a target acceleration according to the target jerk and the control parameter; performing instruction planning based on the control parameter, the target jerk and the target acceleration to obtain a target control instruction; and controlling the motion of the servo motor by using the target control instruction. In this way, the jerk of the motion can be controlled, the smooth transition of the acceleration and the speed in the motion process is controlled, the mechanical vibration of the servo motor is reduced, and the mechanical damage is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of control, in particular to a servo motor control method, device, equipment and medium. BACKGROUND

[0002] At present, the smooth transition strategy commonly used in servo products is trapezoidal planning. The trapezoidal curve planning of speed and position can make the acceleration of the servo system controllable in the acceleration and deceleration process by planning the step command between positions or speeds as trapezoidal acceleration and deceleration commands, which can reduce the impact of the machine to a certain extent. However, there is a problem in trapezoidal acceleration and deceleration, that is, there is a step change in speed or acceleration in the servo start-up and reaching stage, which will cause mechanical vibration in the speed start-up stage and speed reaching stage, which may damage the mechanical structure. Therefore, how to control the smooth transition of speed and acceleration in the motion process of servo products to reduce mechanical vibration is the main problem to be solved in the field. SUMMARY

[0003] Therefore, the purpose of the present application is to provide a servo motor control method, device, equipment and medium, which can control the jerk in the motion process, thereby controlling the smooth transition of acceleration and speed in the motion process to reduce the mechanical vibration of the servo motor and ensure that the machine is not damaged. The specific scheme is as follows:

[0004] In a first aspect, the present application discloses a servo motor control method applied to a servo driver, comprising:

[0005] obtaining an IO control signal;

[0006] determining a control parameter according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver;

[0007] determining a target jerk according to the control parameter;

[0008] determining a target acceleration according to the target jerk and the control parameter;

[0009] performing command planning based on the control parameter, the target jerk and the target acceleration to obtain a target control command;

[0010] controlling the motion of the servo motor by using the target control command.

[0011] Optionally, the control parameter is determined according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver, comprising:

[0012] When the IO control signal is a speed control signal, a first parameter stored locally is read, wherein the first parameter comprises a smooth time parameter, an acceleration time parameter and a deceleration time parameter;

[0013] A target speed parameter is determined according to the IO control signal;

[0014] The first parameter, the target speed parameter and a current state parameter of a servo motor corresponding to the servo driver are determined as the control parameter, wherein the state parameter comprises a current initial speed parameter, an initial acceleration parameter and a current time parameter of the servo motor.

[0015] Optionally, the determining of the target jerk according to the control parameter comprises:

[0016] When the IO control signal is an acceleration control signal, the target jerk is determined according to the target speed parameter, the initial speed parameter, the smooth time parameter and the acceleration time parameter;

[0017] When the IO control signal is a deceleration control signal, the target jerk is determined according to the target speed parameter, the initial speed parameter, the smooth time parameter and the deceleration time parameter.

[0018] Optionally, the determining of the target acceleration according to the target jerk and the control parameter comprises:

[0019] When the IO control signal is an acceleration control signal, a time value of a first preset time point is determined according to the smooth time parameter and the acceleration time parameter;

[0020] A target acceleration of the first preset time point is determined according to the time value of the first preset time point and the target jerk;

[0021] Correspondingly, the instruction planning based on the control parameter, the target jerk and the target acceleration to obtain a target control instruction comprises:

[0022] A speed value of the first preset time point is determined by using the initial speed parameter, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk;

[0023] The instruction planning based on the speed value of the first preset time point, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk to obtain the target control instruction.

[0024] Optionally, the determining the control parameter according to the IO control signal and a current state parameter of a servo motor corresponding to the servo driver comprises:

[0025] When the IO control signal is a point control signal, a second parameter stored locally is read, wherein the second parameter comprises the first parameter and a maximum speed parameter;

[0026] A target point parameter is determined according to the IO control signal;

[0027] The second parameter, the target point parameter and a current state parameter of the servo motor corresponding to the servo driver are determined as the control parameter, wherein the state parameter comprises a current initial speed parameter, a current initial acceleration parameter, a current time parameter and a current initial point parameter of the servo motor.

[0028] Optionally, before the determining the target jerk according to the control parameter, the method further comprises:

[0029] A constant speed motion time corresponding to the maximum speed parameter is determined based on the target point parameter, the initial point parameter, the maximum speed parameter, the smooth time parameter, the acceleration time parameter and the deceleration time parameter.

[0030] Optionally, the determining the target acceleration according to the target jerk and the control parameter comprises:

[0031] A time value of a second preset time point is determined based on the smooth time parameter, the acceleration time parameter, the deceleration time parameter and the constant speed motion time;

[0032] A target acceleration of the second preset time point is determined according to the time value of the second preset time point and the target jerk;

[0033] Correspondingly, the performing instruction planning based on the control parameter, the target jerk and the target acceleration to obtain a target control instruction comprises:

[0034] A point of the second preset time point is determined based on the target jerk, the target acceleration of the second preset time point, the initial point parameter and the time value of the second preset time point;

[0035] The instruction planning is performed based on the time value of the second preset time point, the point of the second preset time point, the target jerk and the target acceleration of the second preset time point to obtain the target control instruction.

[0036] In a second aspect, the application discloses a servo motor control device applied to a servo driver, comprising:

[0037] a signal acquisition module, configured to acquire an IO control signal;

[0038] a first parameter determination module, configured to determine a control parameter according to the IO control signal and a current state parameter of a servo motor corresponding to the servo driver;

[0039] a second parameter determination module, configured to determine a target jerk according to the control parameter;

[0040] a third parameter determination module, configured to determine a target acceleration according to the target jerk and the control parameter;

[0041] an instruction planning module, configured to perform instruction planning based on the control parameter, the target jerk and the target acceleration to obtain a target control instruction;

[0042] a control module, configured to control movement of the servo motor by using the target control instruction.

[0043] In a third aspect, the present application discloses a servo driver, comprising:

[0044] a memory and a processor;

[0045] The memory is configured to store a computer program.

[0046] The processor is configured to execute the computer program to implement the servo motor control method disclosed above.

[0047] In a fourth aspect, the present application discloses a computer readable storage medium for saving a computer program, wherein the computer program is executed by a processor to implement the servo motor control method disclosed above.

[0048] As can be seen, this application first needs to acquire the IO control signal, then determine the control parameters based on the IO control signal and the current state parameters of the servo motor corresponding to the servo driver, then determine the target jerk based on the control parameters, then determine the target acceleration based on the target jerk and the control parameters, and finally perform instruction planning based on the control parameters, the target jerk, and the target acceleration to obtain the target control command. The movement of the servo motor can then be controlled using the target control command. Therefore, after acquiring the IO control signal, this application can determine the control parameters based on the IO control signal and the current state parameters of the servo motor corresponding to the servo driver, then determine the target jerk based on the control parameters, then determine the target acceleration based on the target jerk and the control parameters, then perform instruction planning based on the control parameters, the target jerk, and the target acceleration, and use the planned command to control the movement of the servo motor. This allows for control of the jerk during movement, thereby controlling the smooth transition of acceleration and speed during movement, reducing mechanical vibration of the servo motor, and ensuring that the machinery is not damaged. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0050] Figure 1 This is a flowchart of a servo motor control method disclosed in this application;

[0051] Figure 2 This is a schematic diagram of an S-curve planning method disclosed in this application;

[0052] Figure 3 This is a flowchart of a specific servo motor control method disclosed in this application;

[0053] Figure 4 This application discloses a speed control flowchart;

[0054] Figure 5 This is a flowchart of a specific servo motor control method disclosed in this application;

[0055] Figure 6 This application discloses a point control process;

[0056] Figure 7 This is a schematic diagram of the structure of a servo motor control device disclosed in this application;

[0057] Figure 8 A servo driver structure diagram is disclosed in the present application. DETAILED DESCRIPTION

[0058] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0059] At present, the speed and position planning in the servo product generally adopts trapezoidal curve planning. The trapezoidal planning can make the acceleration of the servo system controllable in the acceleration and deceleration process, which can reduce the impact of the machine to a certain extent, but there is a step change in speed or acceleration in the servo starting and reaching stage, which can cause mechanical vibration in the speed starting stage and the speed reaching stage, which can damage the mechanical structure. In view of this, the present application proposes a servo motor control method, which can control the jerk of movement, so as to control the smooth transition of acceleration and speed in the movement process, so as to reduce the mechanical vibration of the servo motor and ensure that the machine is not damaged.

[0060] Referring to Figure 1 The embodiments of the present application disclose a servo motor control method applied to a servo driver, and the method comprises the following steps:

[0061] Step S11: acquiring an IO control signal.

[0062] In actual application, an IO (Input\Output) control signal needs to be acquired first, wherein the IO control signal comprises a speed control signal and a point position control signal. The IO control signal comprises a target speed parameter or a target point position parameter, so as to determine the speed or point position to be reached by the servo motor.

[0063] Step S12: determining a control parameter according to the IO control signal and a current state parameter of a servo motor corresponding to the servo driver.

[0064] Correspondingly, after the IO control signal is acquired, a control parameter also needs to be determined according to the IO control signal and a current state parameter of a servo motor corresponding to the servo driver.

[0065] The target parameter can be determined according to the IO control signal. Specifically, when the IO control signal is a speed control signal, the target speed parameter can be determined according to the IO control signal, and the target speed parameter is the speed required by the IO control signal for the servo motor to reach. The specific target speed parameter can be included in the IO control signal, or different speed parameters can be stored in the servo controller, and each speed parameter can be numbered. When the speed needs to be adjusted, the IO control signal including the number of the target speed parameter is sent, and the target speed parameter can be determined according to the number of the target speed parameter in the IO control signal. Correspondingly, if the IO control signal is a point control signal, the target point parameter can also be determined in the same way.

[0066] The current state parameter of the servo motor is determined to determine the initial parameter of the local motion control. The state parameter includes but is not limited to the current initial speed parameter, initial acceleration parameter, initial point parameter and current time parameter of the servo motor.

[0067] In addition, after the IO control signal is obtained, some parameters saved locally need to be read, including but not limited to the smoothing time parameter, acceleration time parameter, deceleration time parameter and maximum speed parameter, so as to accurately control the speed or point in each time period. The smoothing time parameter represents the time of uniform acceleration change.

[0068] The target parameter determined according to the IO control signal, the current state parameter of the servo motor and the parameters saved locally are used as the control parameter to control the motion of the servo motor.

[0069] Step S13: determining the target jerk according to the control parameter.

[0070] After the target parameter is determined, the target jerk can be determined by using the control parameter. Specifically, the initial speed parameter, the target speed parameter, the smoothing time parameter, the acceleration time parameter and / or the deceleration time parameter and the kinematic formula can be used to determine the target jerk.

[0071] Step S14: determining the target acceleration according to the target jerk and the control parameter.

[0072] After the target jerk is obtained, the target acceleration can be determined by using the target jerk and the control parameters. Specifically, the target acceleration at the preset time point is determined by using the target jerk, the smoothing time parameter, the acceleration time parameter and / or the deceleration time parameter, so as to control the speed or the point position of the servo motor, and to ensure smooth transition of the speed or the acceleration.

[0073] Step S15: instruction planning is performed based on the control parameters, the target jerk and the target acceleration, to obtain a target control instruction.

[0074] After the target acceleration is obtained, instruction planning can be performed based on the control parameters, the target jerk and the target acceleration, to obtain a target control instruction.

[0075] Specifically, when the IO control signal is a speed control signal, the speed value at the preset time point is determined according to the initial speed parameter, the time value at the preset time point, the target acceleration at the preset time point and the target jerk, and then the control formula of the speed in each time period is determined according to the speed value at the preset time point, the time value at the preset time point, the target acceleration at the preset time point and the target jerk, and then the target control instruction is determined according to the control formula of the speed in each time period and the corresponding time.

[0076] When the IO control signal is a point position control signal, the speed value at the preset time point is determined according to the initial speed parameter, the time value at the preset time point, the target acceleration at the preset time point and the target jerk, and then the point position at the preset time point is determined based on the target jerk, the target acceleration at the preset time point, the initial point position parameter, the speed value at the preset time point and the time value at the preset time point, and then the point position control formula in each time period is determined based on the time value at the preset time point, the point position at the preset time point, the target jerk and the target acceleration, and then the target control instruction can be determined according to the point position control formula in each time period and the corresponding time.

[0077] Step S16: the movement of the servo motor is controlled by using the target control instruction.

[0078] It can be understood that after the target control instruction is determined, the movement of the servo motor can be controlled by using the target control instruction.

[0079] In this way, the jerk and acceleration during the movement are controlled, an S-shaped curve planning is obtained, the speed and acceleration change in each time period are smoothly transitioned, the vibration of the machine during the movement is reduced, and the service life of the machine is prolonged.

[0080] In addition, compared with using a high-level PLC (Programmable Logic Controller) to plan instructions, the instructions are directly planned in the servo driver, and the system cost is saved.

[0081] It can be seen that the IO control signal is first acquired, then the control parameter is determined according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver, then the target jerk is determined according to the control parameter, then the target acceleration is determined according to the target jerk and the control parameter, then the instruction planning is performed based on the control parameter, the target jerk and the target acceleration, the target control instruction is obtained, and the movement of the servo motor is controlled by using the target control instruction. It can be seen that after the IO control signal is acquired, the control parameter is determined according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver, then the target jerk is determined according to the control parameter, then the target acceleration is determined according to the target jerk and the control parameter, then the instruction planning is performed based on the control parameter, the target jerk and the target acceleration, and the movement of the servo motor is controlled by using the planned instruction. In this way, the jerk of the movement is controlled, the smooth transition of the acceleration and the speed during the movement is controlled, the mechanical vibration of the servo motor is reduced, and the mechanical damage is prevented.

[0082] Referring to Figure 2As shown, it is an S-shaped curve planning schematic diagram. In the figure, Vs represents an initial speed parameter, Vm represents a maximum speed parameter, and Ve represents a target speed parameter. J1 and J2 represent jerk values of the variable acceleration section and the variable deceleration section, respectively. Tsl is defined as a smoothing time parameter, Tacc is defined as an acceleration time parameter, and Tdec is defined as a deceleration time parameter. As can be seen, Tacc is the time difference between the intersection of the extension line of the uniform acceleration section and the extension line of the maximum speed parameter and the intersection of the extension line of the uniform acceleration section and the abscissa, and Tdec is the time difference between the intersection of the extension line of the uniform acceleration section and the extension line of the maximum speed parameter and the intersection of the extension line of the uniform acceleration section and the abscissa. t0-t1 represents a uniform acceleration increasing time period, t1-t2 represents a uniform acceleration time period, t2-t3 represents a uniform deceleration increasing time period, t3-t4 represents a uniform motion time period, t4-t5 represents a uniform deceleration increasing time period, t5-t6 represents a uniform deceleration time period, t6-t7 represents a uniform deceleration decreasing time period, #1 represents the t0-t1 time period, #2 represents the t1-t2 time period, #3 represents the t2-t3 time period, #4 represents the t3-t4 time period, #5 represents the t4-t5 time period, #6 represents the t5-t6 time period, and #7 represents the t6-t7 time period.

[0083] Referring to Figure 3 As shown, the embodiment of the application discloses a specific method for obtaining an IO control signal, which is applied to a servo driver. The method comprises the following steps:

[0084] Step S21: obtaining an IO control signal.

[0085] Step S22: when the IO control signal is a speed control signal, reading a first parameter saved locally, wherein the first parameter comprises a smoothing time parameter, an acceleration time parameter and a deceleration time parameter.

[0086] After the IO control signal is obtained, if the IO control signal is a speed control signal, a first parameter saved locally needs to be read, wherein the first parameter comprises a smoothing time parameter, an acceleration time parameter and a deceleration time parameter.

[0087] Step S23: determining a target speed parameter according to the IO control signal.

[0088] A target speed parameter also needs to be determined according to the IO control signal. Specifically, the target speed parameter in the IO control signal can be directly obtained, or the number of the target speed parameter in the IO control signal is obtained, and the target speed parameter is determined according to the number of the target speed parameter, the speed parameter saved locally and the correspondence between the numbers.

[0089] Step S24: determining the control parameter as the first parameter, the target speed parameter and a current state parameter of the servo motor corresponding to the servo driver, wherein the state parameter comprises a current initial speed parameter, a current initial acceleration parameter and a current time parameter of the servo motor.

[0090] Step S25: determining the target jerk according to the control parameter.

[0091] After the control parameter is determined, the target jerk can be determined according to the control parameter. When the IO control signal is an acceleration control signal, the target jerk is determined according to the target speed parameter, the initial speed parameter, the smooth time parameter and the acceleration time parameter. Specifically, the target jerk is determined according to a first operation formula, the target speed parameter, the initial speed parameter, the smooth time parameter and the acceleration time parameter, wherein the first operation formula is

[0092]

[0093] When the IO control signal is a deceleration control signal, the target jerk is determined according to the target speed parameter, the initial speed parameter, the smooth time parameter and the deceleration time parameter. The specific calculation can refer to the calculation method in acceleration.

[0094] Step S26: when the IO control signal is an acceleration control signal, determining the time value of the first preset time point according to the smooth time parameter and the acceleration time parameter.

[0095] In actual application, when the IO control signal is an acceleration control signal, the time value of the first preset time point is determined according to the smooth time parameter and the acceleration time parameter. The first preset time point is time point t0, t1, t2, t3. Specifically, the time value of the first preset time point is shown in Table 1.

[0096] Table 1

[0097]

[0098] Step S27: determining the target acceleration of the first preset time point according to the time value of the first preset time point and the target jerk.

[0099] After the time value of the first preset time point is determined, the target acceleration of the first preset time point can be determined according to the time value of the first preset time point and the target jerk. Specifically, the target acceleration of the first preset time point is determined according to a second operation formula, the time value of the first preset time point and the target jerk, wherein the second operation formula is a=a0+Jt, wherein a0 represents an initial acceleration, J represents a jerk, t represents time, and a represents acceleration. If the initial acceleration parameter is 0, the acceleration value of the first preset time point is shown in Table 2 below.

[0100] Table 2

[0101]

[0102] Wherein a0 represents the target acceleration of t0 time point, a1 represents the target acceleration of t1 time point, a2 represents the target acceleration of t2 time point, and a3 represents the target acceleration of t3 time point.

[0103] Step S28: determining the speed value of the first preset time point by using the initial speed parameter, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk.

[0104] After the target acceleration of the first preset time point is determined, the speed value of the first preset time point can be determined by using the initial speed parameter, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk. Specifically, the speed value of the first preset time point is determined by using a third operation formula, the initial speed parameter, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk, wherein the third operation formula is V=V c +at, wherein Vc represents an initial speed and V represents speed.

[0105] Specifically, the speed value of the first preset time point is shown in Table 3 below.

[0106] Table 3

[0107]

[0108] Wherein V0 represents the speed of t0 time point, V1 represents the speed of t1 time point, V2 represents the speed of t2 time point, and V2 represents the speed of t3 time point.

[0109] Step 29: performing instruction planning based on the speed value of the first preset time point, the time value of the first preset time point, the target acceleration of the first preset time point, and the target jerk to obtain a target control instruction.

[0110] After the speed value of the first preset time point is determined, the target control instruction can be obtained by performing instruction planning based on the speed value of the first preset time point, the time value of the first preset time point, the target acceleration of the first preset time point, and the target jerk. Specifically, the speed control formula of each time period corresponding to the first preset time point is determined based on the speed value of the first preset time point, the time value of the first preset time point, the target acceleration of the first preset time point, and the target jerk, and then the target control instruction is determined according to the speed control formula in each time period and the corresponding time. The speed control formula in each time period can be seen from Table 4.

[0111] Table 4

[0112]

[0113] Correspondingly, when the IO control signal is a deceleration control signal, the determination process of the target control instruction is the same as that when accelerating.

[0114] In the specific implementation process, the settings of the smoothing time parameter Tsl and the acceleration time parameter Tacc need to meet certain requirements, that is, Tacc > Tsl, otherwise, the S-shaped speed curve cannot be correctly planned.

[0115] Correspondingly, the settings of the smoothing time parameter Tsl and the deceleration time parameter Tdec also need to meet certain requirements, that is, Tdec > Tsl.

[0116] Referring to FIG. 4, Figure 4 the speed control flowchart is shown. Taking acceleration as an example, the jerk J1 is calculated first, then the time nodes of each planning interval are calculated, the acceleration of each time node is calculated, then the speed of each time node is calculated, and then the S-shaped curve planning speed timing calculation is started.

[0117] Referring to FIG. 5, Figure 5 the embodiment of the application discloses a specific servo motor control method, which is applied to a servo driver, and the method comprises the following steps:

[0118] Step S301: acquiring an IO control signal.

[0119] Step S302: when the IO control signal is a point control signal, a second parameter saved locally is read, wherein the second parameter comprises the first parameter and a maximum speed parameter.

[0120] After the IO control signal is acquired, if the IO control signal is a point control signal, a second parameter is read from a local storage, wherein the second parameter includes the first parameter and a maximum speed parameter. That is, the second parameter includes the smoothing time parameter, the acceleration time parameter, the deceleration time parameter and the maximum speed parameter.

[0121] Step S303: determining a target point parameter according to the IO control signal.

[0122] It is also necessary to determine a target point parameter according to the IO control signal. Specifically, the target point parameter in the IO control signal can be directly acquired, or the number of the target point parameter in the IO control signal is acquired, and the target point parameter is determined according to the number of the target point parameter, the point parameter and the corresponding number stored locally.

[0123] Step S304: determining the second parameter, the target point parameter and a current state parameter of a servo motor corresponding to the servo driver as the control parameter, wherein the state parameter includes a current initial speed parameter, an initial acceleration parameter, a current time parameter and an initial point parameter of the servo motor.

[0124] Step S305: determining a constant speed motion time corresponding to the maximum speed parameter based on the target point parameter, the initial point parameter, the maximum speed parameter, the smoothing time parameter, the acceleration time parameter and the deceleration time parameter.

[0125] After the control parameter is determined, the constant speed motion time corresponding to the maximum speed parameter can be determined based on the target point parameter, the initial point parameter, the maximum speed parameter, the smoothing time parameter, the acceleration time parameter and the deceleration time parameter. The constant speed motion time corresponding to the maximum speed parameter is determined based on a fourth operation formula, wherein the fourth operation formula is:

[0126] S = Vs * (Tsl + Tacc) + 0.5 * Vm * (Tsl + Tacc) + Vm * t m + Ve * (Tsl + Tdec) + 0.5 * Vm * (Tsl + Tdec)

[0127] wherein t m represents the constant speed motion time corresponding to the maximum speed parameter, and S represents the difference between the target point parameter and the initial point parameter.

[0128] Step S306: determining a target jerk according to the control parameter.

[0129] After the control parameter is determined, a target jerk can be determined according to the control parameter. The target jerk parameter includes a jerk value J1 of a variable acceleration segment and a jerk value J2 of a variable deceleration segment. The jerk value J1 of the variable acceleration segment is determined by using a fifth operation formula, and the jerk value J2 of the variable deceleration segment is determined by using a sixth operation formula. The fifth operation formula and the sixth operation formula are respectively as follows:

[0130]

[0131]

[0132] Step S307: Time values of second preset time points are determined based on the smooth time parameter, the acceleration time parameter, the deceleration time parameter, and the uniform motion time.

[0133] In actual application, time values of second preset time points also need to be determined based on the smooth time parameter, the acceleration time parameter, the deceleration time parameter, and the uniform motion time. The second preset time points are time points t0, t1, t2, t3, t4, t5, t6, and t7. Specifically, the time values of the second preset time points are shown in Table 5.

[0134] Table 5

[0135]

[0136] Step S308: Target accelerations of the second preset time points are determined according to the time values of the second preset time points and the target jerk.

[0137] The target accelerations of the second preset time points also need to be determined according to the time values of the second preset time points and the target jerk. If the initial acceleration parameter is 0, the acceleration values of the second preset time points are shown in Table 6.

[0138] Table 6

[0139]

[0140] a4 represents a target acceleration at the t4 time point, a5 represents a target acceleration at the t5 time point, a6 represents a target acceleration at the t6 time point, and a7 represents a target acceleration at the t7 time point.

[0141] Step S309: Point positions of the second preset time points are determined based on the target jerk, the target accelerations of the second preset time points, the initial point position parameter, and the time values of the second preset time points.

[0142] After the target acceleration of the second preset time point is determined, the point position of the second preset time point can be determined based on the target jerk, the target acceleration of the second preset time point, the initial point position parameter and the time value of the second preset time point.

[0143] Specifically, the speed value of the second preset time point needs to be determined based on the initial speed parameter, the time value of the second preset time point, the target acceleration of the second preset time point and the target jerk. In actual process, the determination formula of the speed value can refer to the third operation formula mentioned above. After calculation, the speed value of each second preset time point can be obtained. The speed value of the second preset time point is shown in Table 7.

[0144] Table 7

[0145]

[0146] After the speed value of the second preset time point is determined, the point position of the second preset time point can be determined based on the target jerk, the target acceleration of the second preset time point, the initial point position parameter, the time value of the second preset time point and the speed value of the second preset time point.

[0147] Specifically, the point position of each second preset time point can be calculated according to the displacement calculation formula in kinematics. After calculation, the point position value of each second preset time point can be obtained. The point position of the second preset time point is shown in Table 8.

[0148] Table 8

[0149]

[0150] Step S310: performing instruction planning based on the time value of the second preset time point, the point position of the second preset time point, the target jerk and the target acceleration of the second preset time point to obtain a target control instruction.

[0151] After the speed value of each time point is determined, the target control instruction can be obtained by performing instruction planning based on the time value of the second preset time point, the point position of the second preset time point, the target jerk and the target acceleration of the second preset time point.

[0152] In specific implementation process, the settings of the smooth time parameter Tsl and the acceleration time parameter Tacc need to meet certain requirements, i.e. Tacc>Tsl, otherwise, the S-shaped speed curve cannot be correctly planned.

[0153] Correspondingly, the setting of the smooth time parameter Tsl and the deceleration time parameter Tdec also needs to meet certain requirements, that is, Tdec > Tsl. In addition, the duration t m > 0, otherwise, the point S-shaped curve will also not be correctly planned.

[0154] Specifically, the point position control formula in each time period is determined based on the time value of the preset time point, the point position of the preset time point, the target jerk and the target acceleration of the preset time point, and then the target control instruction can be determined according to the point position control formula in each time period and the corresponding time. The point position control formula in each time period can refer to the displacement calculation formula in kinematics. After the point position control formula in each time period is determined by using the displacement calculation formula, the point position control formula in each time period is obtained, as shown in Table 9.

[0155] Table 9

[0156]

[0157] Referring to Figure 6 Fig. 9 is a point position control flowchart. First, the uniform speed running time is determined according to the displacement stroke and the maximum speed, then the jerk J1 of the acceleration section and the jerk J2 of the deceleration section are calculated, then the time nodes of each planning interval are calculated, then the acceleration of each time node is calculated, then the speed of each time node is calculated, then the position of each time node is calculated, and then the S-shaped curve planning position timing calculation is started.

[0158] Referring to Figure 7 Fig. 10 shows that the embodiment of the application discloses a servo motor control device applied to a servo driver, which comprises:

[0159] The signal acquisition module 11 is configured to acquire an IO control signal.

[0160] The first parameter determination module 12 is configured to determine a control parameter according to the IO control signal and a current state parameter of a servo motor corresponding to the servo driver.

[0161] The second parameter determination module 13 is configured to determine a target jerk according to the control parameter.

[0162] The third parameter determination module 14 is configured to determine a target acceleration according to the target jerk and the control parameter.

[0163] The instruction planning module 15 is configured to plan an instruction based on the control parameter, the target jerk and the target acceleration, and obtain a target control instruction.

[0164] A control module 16 is configured to control the motion of the servo motor by using the target control instruction.

[0165] It can be seen that, according to the present application, the IO control signal is acquired first, then the control parameter is determined according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver, then the target jerk is determined according to the control parameter, then the target acceleration is determined according to the target jerk and the control parameter, and the target control instruction is obtained by performing instruction planning based on the control parameter, the target jerk and the target acceleration, so as to control the motion of the servo motor by using the target control instruction. It can be seen that, according to the present application, after the IO control signal is acquired, the control parameter is determined according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver, then the target jerk is determined according to the control parameter, then the target acceleration is determined according to the target jerk and the control parameter, then the target control instruction is obtained by performing instruction planning based on the control parameter, the target jerk and the target acceleration, and the motion of the servo motor is controlled by using the planned instruction, so that the jerk of the motion can be controlled, so as to control the smooth transition of the acceleration and the speed in the motion process, to reduce the mechanical vibration of the servo motor and ensure that the machine is not damaged.

[0166] Further, referring to Figure 8 It is disclosed that the embodiment of the present application further discloses a servo driver, comprising: a processor 21 and a memory 22.

[0167] The memory 22 is configured to store a computer program, and the processor 22 is configured to execute the computer program to realize the servo motor control method disclosed in the foregoing embodiments.

[0168] The specific process of the servo motor control method can refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0169] Further, the embodiment of the present application further discloses a computer readable storage medium for saving a computer program, wherein the computer program is executed by a processor to realize the servo motor control method disclosed in any of the foregoing embodiments.

[0170] The specific process of the servo motor control method can refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0171] The various embodiments described in this specification are intended to be exemplary only. The various embodiments were chosen and described in order to best explain the principles of the application and its best mode of operation. The methods and devices disclosed herein are applicable in any embodiment of the application. Unless otherwise indicated, the same reference numerals are used throughout the description and figures to refer to same or like parts.

[0172] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, hard disk can be used as a storage medium.

[0173] Finally, it should be noted that the terms "first", "second", and the like, herein do not denote any order, quantity, combination, or importance, but rather are used to distinguish one element from another, and do not imply singular or plural. Moreover, the terms "include", "have", or any other variant thereof are intended to encompass non-exclusive inclusions, such that processes, methods, articles, or apparatuses that comprise a series of elements are not required to comprise only those elements that are explicitly listed, or that other elements not explicitly listed are optional. An element proceeded by "comprises... a", "has... a", or "includes... a" does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0174] The above provides a kind of servo motor control method, device, equipment, medium provided by the present application in detail, the principle and implementation mode of the present application are described in this paper, the above example is only for helping understanding the method of the present application and its core idea;For the general technical personnel in the art, according to the idea of the present application, there will be changes in specific implementation mode and application range, and the above description should not be understood as the limitation of the present application.

Claims

1. A method of controlling a servo motor, characterized by, The application is applied to a servo driver, comprising: acquiring an IO control signal; determining a control parameter according to the IO control signal and a current state parameter of a servo motor corresponding to the servo driver; determining a target jerk according to the control parameter; determining a target acceleration according to the target jerk and the control parameter; performing instruction planning based on the control parameter, the target jerk and the target acceleration to obtain a target control instruction; controlling movement of the servo motor by using the target control instruction; the determination of the control parameter according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver comprises: when the IO control signal is a speed control signal, reading a first parameter saved locally, wherein the first parameter comprises a smoothing time parameter, an acceleration time parameter and a deceleration time parameter; determining a target speed parameter according to the IO control signal; determining the first parameter, the target speed parameter and the current state parameter of the servo motor corresponding to the servo driver as the control parameter, wherein the state parameter comprises a current initial speed parameter, a current initial acceleration parameter and a current time parameter of the servo motor; the determination of the target acceleration according to the target jerk and the control parameter comprises: when the IO control signal is an acceleration control signal, determining a time value of a first preset time point according to the smoothing time parameter and the acceleration time parameter; determining a target acceleration of the first preset time point according to the time value of the first preset time point and the target jerk; correspondingly, the instruction planning based on the control parameter, the target jerk and the target acceleration to obtain the target control instruction comprises: determining a speed value of the first preset time point by using the initial speed parameter, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk; performing instruction planning based on the speed value of the first preset time point, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk to obtain the target control instruction.

2. The servo motor control method of claim 1, wherein the determination of the target jerk according to the control parameter comprises: when the IO control signal is the acceleration control signal, determining the target jerk according to the target speed parameter, the initial speed parameter, the smoothing time parameter and the acceleration time parameter; when the IO control signal is a deceleration control signal, determining the target jerk according to the target speed parameter, the initial speed parameter, the smoothing time parameter and the deceleration time parameter.

3. The method of claim 1, wherein the determination of the control parameter according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver comprises: when the IO control signal is a point position control signal, reading a second parameter saved locally, wherein the second parameter comprises the first parameter and a maximum speed parameter; determining a target point position parameter according to the IO control signal; The second parameter, the target point parameter, and a current state parameter of a servo motor corresponding to the servo driver are determined as the control parameter, where the state parameter includes a current initial speed parameter, an initial acceleration parameter, a current time parameter, and an initial point parameter of the servo motor.

4. The method of claim 3, wherein Before the target jerk is determined according to the control parameter, the method further includes: A constant speed motion time corresponding to the maximum speed parameter is determined based on the target point parameter, the initial point parameter, the maximum speed parameter, the smooth time parameter, the acceleration time parameter, and the deceleration time parameter.

5. The method of claim 4, wherein, The target acceleration is determined according to the target jerk and the control parameter, including: A time value of a second preset time point is determined based on the smooth time parameter, the acceleration time parameter, the deceleration time parameter, and the constant speed motion time; A target acceleration of the second preset time point is determined according to the time value of the second preset time point and the target jerk; Correspondingly, the target control instruction is obtained by performing instruction planning based on the control parameter, the target jerk, and the target acceleration, including: A point of the second preset time point is determined based on the target jerk, the target acceleration of the second preset time point, the initial point parameter, and the time value of the second preset time point; The target control instruction is obtained by performing instruction planning based on the time value of the second preset time point, the point of the second preset time point, the target jerk, and the target acceleration of the second preset time point.

6. A servo motor control device characterized by comprising: The application is applied to a servo driver, including: A signal acquisition module is configured to acquire an IO control signal. A first parameter determination module is configured to determine a control parameter according to the IO control signal and a current state parameter of a servo motor corresponding to the servo driver. A second parameter determination module is configured to determine a target jerk according to the control parameter. A third parameter determination module is configured to determine a target acceleration according to the target jerk and the control parameter. An instruction planning module is configured to perform instruction planning based on the control parameter, the target jerk, and the target acceleration to obtain a target control instruction. A control module is configured to control motion of the servo motor by using the target control instruction. The control parameter is determined according to the IO control signal and the current state parameter of the servo motor corresponding to the servo driver, including: When the IO control signal is a speed control signal, a first parameter saved locally is read, where the first parameter includes a smooth time parameter, an acceleration time parameter, and a deceleration time parameter. A target speed parameter is determined according to the IO control signal. The first parameter, the target speed parameter, and the current state parameter of the servo motor corresponding to the servo driver are determined as the control parameter, where the state parameter includes a current initial speed parameter, an initial acceleration parameter, and a current time parameter of the servo motor. The target acceleration is determined according to the target jerk and the control parameter, including: When the IO control signal is an acceleration control signal, a time value of a first preset time point is determined according to the smooth time parameter and the acceleration time parameter; a target acceleration of the first preset time point is determined according to the time value of the first preset time point and the target jerk; Correspondingly, the target control instruction is obtained by performing instruction planning based on the control parameter, the target jerk and the target acceleration, including: a speed value of the first preset time point is determined by using the initial speed parameter, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk; the target control instruction is obtained by performing instruction planning based on the speed value of the first preset time point, the time value of the first preset time point, the target acceleration of the first preset time point and the target jerk.

7. A servo driver, characterized by comprising: including: a memory and a processor; The memory is used to store a computer program. The processor is used to execute the computer program to realize the servo motor control method in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, A computer program is used to save, and the computer program is executed by a processor to realize the servo motor control method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Control device, control system and control method

    CN103180791A