Control method and control system for servo motor

文档序号:571589 发布日期:2021-05-18 浏览:15次 中文

阅读说明:本技术 伺服电机的控制方法以及控制系统 (Control method and control system for servo motor ) 是由 章健 骆鹏 于 2021-01-27 设计创作,主要内容包括:本申请涉及伺服电机的控制方法以及控制系统,所述方法包括:获取主轴和从轴的转矩差值、所述主轴和所述从轴的速度差值、所述主轴和所述从轴的位置差值以及所述主轴的目标位置值;根据所述主轴和所述从轴的转矩差值进行速度补偿;根据速度补偿值,以及所述主轴和所述从轴的速度差值进行位置补偿;根据位置补偿值,以及所述主轴与所述从轴的位置差值,生成位置偏差补偿值,并根据所述位置偏差补偿值与所述主轴的目标位置值,生成所述从轴的位置指令值。本申请解决了伺服电机的主从轴在位置、速度以及转矩都可以同步运行,进而提高伺服电机同步控制精度的技术问题。(The application relates to a control method and a control system of a servo motor, wherein the method comprises the following steps: acquiring a torque difference value of a main shaft and a driven shaft, a speed difference value of the main shaft and the driven shaft, a position difference value of the main shaft and the driven shaft and a target position value of the main shaft; performing speed compensation according to the torque difference value of the main shaft and the auxiliary shaft; performing position compensation according to the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft; and generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft, and generating a position command value of the auxiliary shaft according to the position deviation compensation value and the target position value of the main shaft. The servo motor synchronous control device and the servo motor synchronous control method solve the technical problem that the master shaft and the slave shaft of the servo motor can synchronously run in position, speed and torque, and further improve the synchronous control precision of the servo motor.)

1. A method of controlling a servo motor, the method comprising:

acquiring a torque difference value of a main shaft and a driven shaft, a speed difference value of the main shaft and the driven shaft, a position difference value of the main shaft and the driven shaft and a target position value of the main shaft;

performing speed compensation according to the torque difference value of the main shaft and the auxiliary shaft;

performing position compensation according to the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft;

generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft,

and generating a position command value of the slave axis according to the position deviation compensation value and the target position value of the master axis.

2. The control method of a servo motor according to claim 1,

the speed compensation according to the torque difference value of the main shaft and the auxiliary shaft comprises the following steps:

acquiring the difference value of the torque value of the main shaft at the first sampling moment and the torque value of the auxiliary shaft at the first sampling moment, generating a speed compensation value at the second sampling moment,

compensating for the speed of the second sampling instant,

the second sampling moment is the next sampling moment of the first sampling moment;

the position compensation according to the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft comprises the following steps:

acquiring a speed compensation value at the second sampling moment, acquiring a speed difference value between the main shaft and the auxiliary shaft at the second sampling moment, and generating a position compensation value at a third sampling moment,

the third sampling moment is the next sampling moment of the second sampling moment;

the generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft comprises:

acquiring a position compensation value of the third sampling moment, acquiring a position difference value of the main shaft and the auxiliary shaft at the third sampling moment, and generating a position deviation compensation value at a fourth sampling moment,

and acquiring a target position value of the main shaft at the fourth sampling time, and generating a position command value of the auxiliary shaft at the fourth sampling time.

3. The servo motor control method according to claim 1, wherein a synchronization period includes a plurality of the sampling timings,

the acquiring of the target position value of the spindle includes:

acquiring the sum of the input position command pulse number of the main shaft in the previous synchronization period;

acquiring the sum of the output position command pulse number of the main shaft in the last synchronization period;

acquiring a difference value between the sum of the input command pulse number and the output position command pulse number in the last synchronization period, wherein the difference value is the residual position command pulse number of the spindle in the last synchronization period;

acquiring the position increment of the current synchronization period of the main shaft according to the residual quantity of the position instruction pulses of the main shaft in the last synchronization period;

and acquiring a target position value of the current synchronization period of the main shaft according to the position increment of the current synchronization period of the main shaft and the current position of the main shaft.

4. The method of controlling a servo motor according to claim 1, further comprising:

the speed compensation according to the torque difference value of the main shaft and the auxiliary shaft comprises the following steps:

carrying out proportional integral derivative adjustment on the torque difference value of the main shaft and the driven shaft to generate a speed compensation value;

the position compensation according to the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft comprises the following steps:

adding the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft, and then performing proportional integral derivative adjustment to generate the position compensation value;

the generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft comprises:

and adding the position compensation value and the position difference value of the main shaft and the auxiliary shaft, and then performing proportional integral derivative adjustment to generate the position deviation compensation value.

5. The method of claim 1, wherein the master shaft and the slave shaft are in the same operation mode.

6. A control method of a servo motor, characterized in that the servo motor includes at least one slave axis, the control method further comprising:

sequentially executing the control method according to any one of claims 1 to 5 in a preset order of the slave axis in the current synchronization period;

alternatively, the first and second electrodes may be,

the slave axis simultaneously executes the control method according to any one of claims 1 to 5 in the current synchronization period.

7. A control system for a servo motor, the control system comprising:

the parameter acquisition module is used for acquiring a torque difference value of the main shaft and the driven shaft, a speed difference value of the main shaft and the driven shaft, a position difference value of the main shaft and the driven shaft and a target position value of the main shaft;

the torque deviation adjusting module is used for receiving the torque difference value of the main shaft and the driven shaft, performing speed compensation according to the torque difference value of the main shaft and the driven shaft and generating a speed compensation value;

the speed deviation adjusting module is used for receiving the speed compensation value, receiving a speed difference value of the main shaft and the driven shaft, and performing position compensation according to the speed compensation value and the speed difference value of the main shaft and the driven shaft to generate a position compensation value;

the position deviation adjusting module is used for receiving the position compensation value, receiving a position difference value of the main shaft and the auxiliary shaft, and generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft;

and the slave shaft position instruction generating module is used for receiving the position deviation compensation value, receiving a target position value of the main shaft and generating a position instruction value of the slave shaft according to the position deviation compensation value and the target position value of the main shaft.

8. The control system of claim 7, further comprising:

the parameter obtaining module is further configured to obtain a sum of input position instruction pulse numbers of the main shaft in the previous synchronization period, and further configured to obtain a sum of output position instruction pulse numbers of the main shaft in the previous synchronization period,

and is further configured to obtain a difference between a sum of the input command pulse numbers and a sum of the output position command pulse numbers in the previous synchronization cycle, where the difference is a remaining number of position command pulses of the spindle in the previous synchronization cycle,

the parameter acquisition module is further used for acquiring the position increment of the current synchronization period of the main shaft and the current position of the main shaft according to the residual quantity of the position instruction pulses of the main shaft, and sending the position increment of the current synchronization period of the main shaft and the current position of the main shaft to the main shaft position instruction generation module;

the main shaft position instruction generating module is configured to receive a position increment of the main shaft in the current synchronization period and the current position of the main shaft, and generate a target position value of the main shaft in the current synchronization period according to the position increment of the main shaft in the current synchronization period and the current position of the main shaft.

9. The control system of claim 7, further comprising:

the torque deviation adjusting module is further used for performing proportional-integral-derivative adjustment on a torque difference value of the main shaft and the driven shaft to generate a speed compensation value;

the speed deviation adjusting module is further configured to add the speed compensation value and the speed difference value between the main shaft and the driven shaft, and then perform proportional-integral-derivative adjustment to generate the position compensation value;

the position deviation adjusting module is further configured to add the position compensation value and the position difference value between the main shaft and the driven shaft, and then perform proportional-integral-derivative adjustment to generate the position deviation compensation value.

10. The control system of claim 7, further comprising:

and the mode determining module is used for setting the main shaft and the auxiliary shaft of the current synchronization period in the same operation mode.

Technical Field

The present disclosure relates to the field of automatic control, and in particular, to a control method and a control system for a servo motor.

Background

With the continuous development of electronic power technology and computer technology, a multi-axis synchronous control technology is greatly promoted, and the application of the multi-axis synchronous control technology enables a plurality of multi-axis systems such as advanced numerical control machines, industrial robots and the like to have better control effect and higher control precision.

Disclosure of Invention

In order to solve the technical problem or at least partially solve the technical problem, the present application provides a control method and a control system of a servo motor.

In a first aspect, the present application provides a control method for a servo motor, the control method comprising:

acquiring a torque difference value of a main shaft and a driven shaft, a speed difference value of the main shaft and the driven shaft, a position difference value of the main shaft and the driven shaft and a target position value of the main shaft;

performing speed compensation according to the torque difference value of the main shaft and the auxiliary shaft;

performing position compensation according to the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft;

generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft,

and generating a position command value of the slave axis according to the position deviation compensation value and the target position value of the master axis.

Optionally, the speed compensation according to the torque difference between the main shaft and the auxiliary shaft comprises:

acquiring the difference value of the torque value of the main shaft at the first sampling moment and the torque value of the auxiliary shaft at the first sampling moment, generating a speed compensation value at the second sampling moment,

compensating for the speed of the second sampling instant,

the second sampling moment is the next sampling moment of the first sampling moment;

the position compensation according to the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft comprises the following steps:

acquiring a speed compensation value at the second sampling moment, acquiring a speed difference value between the main shaft and the auxiliary shaft at the second sampling moment, and generating a position compensation value at a third sampling moment,

the third sampling moment is the next sampling moment of the second sampling moment;

the generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft comprises:

acquiring a position compensation value of the third sampling moment, acquiring a position difference value of the main shaft and the auxiliary shaft at the third sampling moment, and generating a position deviation compensation value at a fourth sampling moment,

and acquiring a target position value of the main shaft at the fourth sampling time, and generating a position command value of the auxiliary shaft at the fourth sampling time.

Optionally, the synchronization cycle includes a plurality of the sampling moments, and the acquiring the target position value of the spindle includes:

acquiring the sum of the input position command pulse number of the main shaft in the previous synchronization period;

acquiring the sum of the output position command pulse number of the main shaft in the last synchronization period;

acquiring a difference value between the sum of the input command pulse number and the output position command pulse number in the last synchronization period, wherein the difference value is the residual position command pulse number of the spindle in the last synchronization period;

acquiring the position increment of the current synchronization period of the main shaft according to the residual quantity of the position instruction pulses of the main shaft in the last synchronization period;

and acquiring a target position value of the current synchronization period of the main shaft according to the position increment of the current synchronization period of the main shaft and the current position of the main shaft.

Optionally, the method further comprises:

the speed compensation according to the torque difference value of the main shaft and the auxiliary shaft comprises the following steps:

carrying out proportional integral derivative adjustment on the torque difference value of the main shaft and the driven shaft to generate a speed compensation value;

the position compensation according to the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft comprises the following steps:

adding the speed compensation value and the speed difference value of the main shaft and the auxiliary shaft, and then performing proportional integral derivative adjustment to generate the position compensation value;

the generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft comprises:

and adding the position compensation value and the position difference value of the main shaft and the auxiliary shaft, and then performing proportional integral derivative adjustment to generate the position deviation compensation value.

Optionally, the primary shaft and the secondary shaft are in the same mode of operation.

In a second aspect, the present application provides a control method of a servo motor, the servo motor including at least one slave axis, the control method further including:

in the current synchronization period, sequentially executing any one of the control methods according to the preset sequence of the slave axis;

alternatively, the first and second electrodes may be,

and in the current synchronization period, the slave axis simultaneously executes the control method of any one of the above items.

In a third aspect, the present application provides a control system for a servo motor, the control system comprising:

the parameter acquisition module is used for acquiring a torque difference value of the main shaft and the driven shaft, a speed difference value of the main shaft and the driven shaft, a position difference value of the main shaft and the driven shaft and a target position value of the main shaft;

the torque deviation adjusting module is used for receiving the torque difference value of the main shaft and the driven shaft, performing speed compensation according to the torque difference value of the main shaft and the driven shaft and generating a speed compensation value;

the speed deviation adjusting module is used for receiving the speed compensation value, receiving a speed difference value of the main shaft and the driven shaft, and performing position compensation according to the speed compensation value and the speed difference value of the main shaft and the driven shaft to generate a position compensation value;

the position deviation adjusting module is used for receiving the position compensation value, receiving a position difference value of the main shaft and the auxiliary shaft, and generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft;

and the slave shaft position instruction generating module is used for receiving the position deviation compensation value, receiving a target position value of the main shaft and generating a position instruction value of the slave shaft according to the position deviation compensation value and the target position value of the main shaft.

Optionally, the system further comprises:

the parameter obtaining module is further configured to obtain a sum of input position instruction pulse numbers of the main shaft in a previous synchronization period, and further configured to obtain a sum of output position instruction pulse numbers of the main shaft in the previous synchronization period,

and is further configured to obtain a difference between a sum of the input command pulse numbers and a sum of the output position command pulse numbers in the previous synchronization cycle, where the difference is a remaining number of position command pulses of the spindle in the previous synchronization cycle,

the parameter acquisition module is further used for acquiring the position increment of the current synchronization period of the main shaft and the current position of the main shaft according to the residual quantity of the position instruction pulses of the main shaft, and sending the position increment of the current synchronization period of the main shaft and the current position of the main shaft to the main shaft position instruction generation module;

the main shaft position instruction generating module is configured to receive a position increment of the main shaft in the current synchronization period and the current position of the main shaft, and generate a target position value of the main shaft in the current synchronization period according to the position increment of the main shaft in the current synchronization period and the current position of the main shaft.

Optionally, the system further comprises:

the torque deviation adjusting module is further used for performing proportional-integral-derivative adjustment on a torque difference value of the main shaft and the driven shaft to generate a speed compensation value;

the speed deviation adjusting module is further configured to add the speed compensation value and the speed difference value between the main shaft and the driven shaft, and then perform proportional-integral-derivative adjustment to generate the position compensation value;

the position deviation adjusting module is further configured to add the position compensation value and the position difference value between the main shaft and the driven shaft, and then perform proportional-integral-derivative adjustment to generate the position deviation compensation value.

Optionally, the system further comprises:

and the mode determining module is used for setting the main shaft and the auxiliary shaft of the current synchronization period in the same operation mode.

The application provides a control method of a servo motor, which carries out speed compensation according to a torque difference value of a main shaft and a driven shaft, carries out position compensation according to the speed compensation value and the speed difference value of the main shaft and the driven shaft, generates a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the driven shaft, generates a position instruction value of the driven shaft according to the position deviation compensation value and a target position value of the main shaft, realizes sequential compensation from an inner ring to an outer ring of a servo motor control system, namely from a current ring to the speed ring and then to the position ring, finally realizes all synchronization of the torque, the speed and the position of the main shaft and the driven shaft of the servo motor, and improves the synchronous control precision and the operation reliability of the servo motor.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.

FIG. 1 is a flow chart illustrating a servo control method according to an embodiment of the present invention;

FIG. 2 is a schematic diagram illustrating a three-loop control process of a servo motor according to the prior art;

FIG. 3 is a flow chart of a control system according to an embodiment of the present invention;

FIG. 4 is a flow chart of a control system according to an embodiment of the present invention;

FIG. 5 is a flow chart of a control system according to an embodiment of the present invention;

fig. 6 is a schematic structural diagram of a control system according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

As shown in fig. 1, in an embodiment of the present application, a control method of a servo motor is provided.

Step 101: acquiring a torque difference value of a main shaft and a driven shaft, a speed difference value of the main shaft and the driven shaft, a position difference value of the main shaft and the driven shaft and a target position value of the main shaft;

step 102: performing speed compensation according to the torque difference value of the main shaft and the driven shaft;

step 103: performing position compensation according to the speed compensation value and the speed difference value of the main shaft and the driven shaft;

step 104: generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the driven shaft;

step 105: and generating a position command value of the slave axis according to the position deviation compensation value and the target position value of the master axis.

As shown in fig. 2, in the prior art, the control method of the servo motor including the main shaft and the driven shaft generally adopts a compensation method from an outer ring to an inner ring, i.e. from a position ring to a speed ring, and finally to a current ring: on one side of the main shaft, a position controller receives the position deviation of the main shaft to form a position ring, and the position deviation is compensated to a speed ring; the speed measuring device obtains the speed deviation of the main shaft, the speed controller receives the speed deviation of the main shaft to form a speed ring, and the speed deviation is compensated to the current ring; the current sampling device obtains the current deviation of the main shaft, namely the torque deviation, and the current deviation is finally compensated to a current loop through a current controller.

As shown in fig. 3, in the embodiment of the present application, based on the above conventional compensation method, the servo motor control method sequentially compensates from the inner ring to the outer ring in a feed-forward manner, that is, compensates the torque deviation between the main shaft and the slave shaft to the speed ring, compensates the speed deviation between the main shaft and the slave shaft to the position ring, and finally generates the compensated position command value of the slave shaft, thereby realizing information interaction between the main shaft and the slave shaft, correcting the synchronization error in time, realizing complete synchronization of the main shaft and the slave shaft of the servo motor on the torque, the speed and the position, and improving the synchronization accuracy and the system reliability of the system.

In the embodiment of the present application, the time length of the synchronization period of the main shaft and the slave shaft of the servo motor may be preset, and the sequential compensation and data interaction from the inner ring to the outer ring of the above steps 101 to 105 are completed between the main shaft and the slave shaft in one synchronization period; and a synchronization period comprises a plurality of sampling instants, for example: the first sampling time, the second sampling time, the third sampling time and the fourth sampling time form a synchronous period, wherein the second sampling time is the next time of the first sampling time, the third sampling time is the next time of the second sampling time, and the fourth sampling time is the next time of the third sampling time.

In an embodiment of the present application, the control method of the servo motor further includes: acquiring a difference value between a torque value of a main shaft of the current loop at a first sampling moment and a torque value of a driven shaft at the first sampling moment, and generating a speed compensation value at a second sampling moment; feeding forward the speed compensation value to a speed loop to compensate the speed loop, and acquiring a speed difference value of a main shaft and a driven shaft at a second sampling moment to generate a position compensation value at a third sampling moment; the position compensation value is fed forward to the position loop, a position difference value of the main shaft and the driven shaft at the third sampling time is obtained at the same time, a position deviation compensation value at the fourth sampling time is generated, a target position value of the main shaft at the fourth sampling time is obtained, a position instruction value of the driven shaft at the fourth sampling time after final compensation is generated, and synchronous operation of the position, the speed and the torque of the main shaft and the driven shaft is achieved.

In the embodiment of the application, the sum of the number of the position command pulses of the last synchronization period from the upper computer or the servo motor is obtained,

acquiring the sum of the output position instruction pulse number of the main shaft in the last synchronous period through an encoder;

obtaining the difference value of the sum of the input command pulse number and the output position command pulse number in the last synchronization period, wherein the difference value is the residual position command pulse number of the main shaft in the last synchronization period;

because the servo motor is positioned according to the pulses, the servo motor can rotate an angle corresponding to one pulse after receiving one pulse to realize displacement, and therefore, the position increment of the current synchronization period of the spindle can be obtained according to the position command pulse residual quantity of the spindle in the last synchronization period;

and according to the position increment of the current synchronization period of the main shaft and the current position of the main shaft, acquiring a target position value of the current synchronization period of the main shaft, realizing the re-planning of a main shaft target instruction, generating a new position instruction of the slave shaft according to the re-planned main shaft target position and the position deviation compensation values obtained by the sequential compensation, and realizing the synchronous following of the slave shaft on the premise that the position of the main shaft is timely corrected.

In the embodiment of the application, the torque difference value of the main shaft and the driven shaft is subjected to proportional-integral-derivative adjustment to generate a speed compensation value:

and (3) taking the difference between the main shaft torque feedback value (recorded as MstTrqFdb) and the driven shaft torque feedback value (recorded as SlvTrqFdb) as a torque difference, and performing deviation adjustment on the torque difference to generate a speed compensation value (recorded as SpdCom):

adding the speed compensation value and the speed difference value of the main shaft and the driven shaft, and then performing proportional-integral-derivative adjustment to generate a position compensation value:

and (3) taking the difference value between the main shaft speed feedback value (recorded as MstSpdFdb) and the driven shaft speed feedback value (recorded as SlvSpdFdb) as a speed difference value, and performing deviation adjustment on the speed difference value to generate a position compensation value (recorded as PosCom):

adding the position compensation value and the position difference value of the main shaft and the auxiliary shaft, and then carrying out proportional integral derivative adjustment to generate a position deviation compensation value:

and taking the difference value between the position feedback value (recorded as MstPosfdb) of the main shaft and the position feedback value (SlvPosfdb) of the driven shaft as a position difference value, and performing deviation adjustment on the position difference value to generate a position deviation compensation value (recorded as PosSourcCom):

wherein, KpIs a proportionality coefficient, TiFor integration time, TdIs the differential time, s is the Laplace transform factor.

In the examples of the present application, KpCoefficient of proportionality, TiIntegration time, TdThe parameter of the differential time is set in the operation process of the servo motor control system according to the actual load state, so that the parameter optimization is finally realized, and the synchronous precision of the system operation and the system reliability are improved.

In the embodiment of the application, the main shaft and the slave shaft of the servo motor are set in the same operation mode, for example, as shown in fig. 4, a speed compensation value is generated by performing PID adjustment on the torque deviation of the main shaft and the slave shaft, a speed value of the slave shaft is obtained according to the speed compensation value and the speed value of the main shaft, and the main shaft and the slave shaft are set to operate in the speed mode, so that the torque synchronous operation of the main shaft and the slave shaft is realized; for example, as shown in fig. 5, the speed compensation value is added to the speed deviation of the main shaft and the auxiliary shaft to perform PID adjustment, so as to generate a position compensation value, and the position of the auxiliary shaft is obtained from the position compensation value and the position of the main shaft, so that the main shaft and the auxiliary shaft are set to operate in a position mode, and the synchronous operation of the torque and the speed of the main shaft and the auxiliary shaft is realized.

In an embodiment of the present application, there is provided a control method of a servo motor, which is applied to a servo motor including at least one slave axis:

in the current synchronization period, the control methods are sequentially executed according to the preset sequence of the slave shafts, for example, a first slave shaft starts to execute the control methods at a preset time, and after the synchronization with the main shaft is completed, a second slave shaft starts to execute the control methods, and the synchronization with the main shaft is completed until all the slave shafts finish the synchronization with the main shaft; since the synchronous adjustment of the next slave axis is readjusted on the basis of the feedback and feedforward compensation of the control method of the previous slave axis and the main axis, the master-slave synchronous precision of the final system is improved.

Alternatively, the first and second electrodes may be,

in the current synchronization period, the multiple slave shafts simultaneously execute the control method, for example, a bus control mode is adopted, the multiple slave shafts are given the same priority, the torque values, the speed values and the position values of the multiple slave shafts can be simultaneously acquired, data interaction is simultaneously carried out with the main shaft, synchronization between the multiple slave shafts and the main shaft is realized, and the real-time performance and the flexibility of the system are improved.

In an embodiment of the present application, as shown in fig. 6, there is provided a control system of a servo motor, the control system including:

a parameter obtaining module 1001 for obtaining a torque difference value of the main shaft and the driven shaft, a speed difference value of the main shaft and the driven shaft, a position difference value of the main shaft and the driven shaft, and a target position value of the main shaft;

the torque deviation adjusting module 100 is used for receiving a torque difference value of the main shaft and the auxiliary shaft, performing speed compensation according to the torque difference value of the main shaft and the auxiliary shaft, and generating a speed compensation value;

a speed deviation adjusting module 200, configured to receive the speed compensation value, receive a speed difference between the main shaft and the driven shaft, perform position compensation according to the speed compensation value and the speed difference between the main shaft and the driven shaft, and generate a position compensation value;

a position deviation adjusting module 300 for receiving the position compensation value, receiving a position difference value of the main shaft and the auxiliary shaft, and generating a position deviation compensation value according to the position compensation value and the position difference value of the main shaft and the auxiliary shaft;

and a slave axis position command generating module 400, configured to receive the position deviation compensation value, receive the target position value of the master axis, and generate a slave axis position command value according to the position deviation compensation value and the target position value of the master axis.

In the embodiment of the application, the control system performs a compensation mode in the opposite direction to the traditional three-loop control mode through the torque deviation adjusting module 100, the speed deviation adjusting module 200 and the position deviation adjusting module 300 on the basis of the traditional three-loop control mode, that is, the compensation is sequentially fed forward from inside to outside in the process of replacing the current loop with the speed loop, and finally a position command value of the compensated slave shaft is generated.

In an embodiment of the present application, the control system further includes:

the torque deviation adjusting module 100 for performing speed compensation according to a torque difference between the main shaft and the auxiliary shaft includes:

the torque deviation adjusting module 100 is configured to obtain a difference between a torque value of the main shaft at a first sampling time and a torque value of the auxiliary shaft at the first sampling time, generate a speed compensation value at a second sampling time, and compensate for a speed at the second sampling time, where the second sampling time is a next sampling time of the first sampling time;

the speed deviation adjusting module 200 is used for performing position compensation according to the speed compensation value and the speed difference value of the main shaft and the driven shaft, and comprises the following steps:

the speed deviation adjusting module 200 is configured to obtain a speed compensation value at a second sampling time, obtain a speed difference value between a main shaft and a driven shaft at the second sampling time, and generate a position compensation value at a third sampling time, where the third sampling time is a next sampling time of the second sampling time; generating a position deviation compensation value according to the position compensation value and a position difference value of the main shaft and the auxiliary shaft comprises the following steps:

the position deviation adjusting module 300 is configured to obtain a position compensation value at a third sampling time, obtain a position difference between the main shaft and the driven shaft at the third sampling time, generate a position deviation compensation value at a fourth sampling time, obtain a target position value of the main shaft at the fourth sampling time, and generate a position instruction value of the driven shaft at the fourth sampling time.

In an embodiment of the present application, the control system further includes:

the parameter obtaining module 1001 is further configured to obtain a sum of input position instruction pulse numbers of the spindle in the previous synchronization period, obtain a sum of output position instruction pulse numbers of the spindle in the previous synchronization period, and obtain a difference between the sum of the input instruction pulse numbers and the sum of the output position instruction pulse numbers in the previous synchronization period, where the difference is a remaining number of position instruction pulses of the spindle in the previous synchronization period;

the parameter obtaining module 1001 is further configured to obtain a position increment of the main shaft in the current synchronization period and a current position of the main shaft according to the remaining number of position instruction pulses of the main shaft, and send the position increment of the main shaft in the current synchronization period and the current position of the main shaft to the main shaft position instruction generating module;

the main shaft position instruction generating module 500 is configured to receive the position increment of the main shaft in the current synchronization period and the current position of the main shaft, and generate a target position value of the main shaft in the current synchronization period according to the position increment of the main shaft in the current synchronization period and the current position of the main shaft.

In the implementation of the present application, the parameter obtaining module 1001 obtains the remaining number of position instruction pulses of the spindle in the previous synchronization period, and further obtains the position increment of the current synchronization period of the spindle, and obtains the target position value of the current synchronization period of the spindle according to the current position of the spindle, and the main spindle position instruction generating module replans the target instruction of the spindle, and generates a new position instruction of the slave axis according to the replanned target position of the spindle and the position deviation compensation value sequentially compensated in the control system, and realizes synchronous following of the slave axis in the control system on the premise that the position of the spindle is timely corrected.

In the embodiment of the present application, the torque deviation adjusting module 100 is further configured to perform a proportional-integral-derivative adjustment on the torque difference between the main shaft and the driven shaft to generate a speed compensation value;

the speed deviation adjusting module 200 is further configured to add the speed compensation value and the speed difference value between the main shaft and the driven shaft, and then perform proportional-integral-derivative adjustment to generate a position compensation value;

the position deviation adjusting module 300 is further configured to add the position compensation value and the position difference between the main shaft and the driven shaft, and then perform proportional-integral-derivative adjustment to generate a position deviation compensation value.

In the embodiment of the application, the torque deviation adjusting module 100, the speed deviation adjusting module 200 and the position deviation adjusting module 300 are used for performing PID operation, and setting is performed according to an actual load state in the operation process of the servo motor control system, so that optimal parameters are finally realized, and the synchronization precision and the system reliability of the system operation are improved.

In an embodiment of the present application, the control system further includes:

and the mode determining module is used for setting the main shaft and the slave shaft of the current synchronization period in the same operation mode.

In an embodiment of the present application, the control system further includes: the servo motor in the control system comprises at least one slave axis,

in the current synchronization period, sequentially executing the control methods contained in the control system according to the preset sequence of the slave axis; alternatively, the slave axis executes the control methods included in the control system at the same time in the current synchronization cycle. The synchronization of torque, speed and position between a main shaft and multiple shafts of the multi-shaft servo motor control system is realized, and the synchronization precision and the system stability of the system are improved.

FIG. 1 is a flowchart illustrating a servo motor control method according to an embodiment. It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种双绕组直流无刷电机冗余控制系统的操作方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!