SERVO MOTOR CONTROLLER, SERVO MOTOR CONTROL METHOD, AND NON-TRANSITORY COMPUTER-READABLE MEDIUM STORING COMPUTER PROGRAM
20180157237 ยท 2018-06-07
Inventors
Cpc classification
H02P6/06
ELECTRICITY
G05B19/404
PHYSICS
G05B19/416
PHYSICS
G05B2219/41084
PHYSICS
International classification
Abstract
A servo motor controller for performing more precise machining by calculating an appropriate compensation amount for a servo motor even in the case where the servo motor performs a reversal or the like. The controller includes a command calculation part for calculating a command for a position or a speed of a servo motor, a determining part for determining that the servo motor is performing reversal or movement from stop, an acceleration calculation part for obtaining the acceleration of the servo motor based on the determination result, and a compensation amount calculation part for calculating a compensation amount for compensation of delay of the servo motor. The acceleration calculation part obtains the acceleration even after the servo motor performs reversal or movement from stop. The compensation amount calculation part calculates the compensation amount according to the obtained acceleration, even after the servo motor performs reversal or movement from stop.
Claims
1. A servo motor controller for controlling a servo motor, the servo motor controller comprising: a command calculation part for calculating a command for a position or a speed of the servo motor at a predetermined cycle; a determining part for determining that the servo motor is performing reversal or movement from stop at a predetermined cycle; an acceleration calculation part for obtaining, when the determining part determines that the servo motor is performing reversal or movement from stop, the acceleration of the servo motor based on a result of the determination; and a compensation amount calculation part for calculating a compensation amount for compensation of delay of the servo motor when the servo motor performs reversal or movement from stop, wherein the acceleration calculation part obtains the acceleration even after the servo motor performs reversal or movement from stop, and the compensation amount calculation part calculates the compensation amount at every predetermined time according to the acceleration calculated by the acceleration calculation part, even after the servo motor performs reversal or movement from stop.
2. The servo motor controller according to claim 1, wherein the compensation amount calculation part calculates an overridden compensation amount by overriding the compensation amount.
3. The servo motor controller according to claim 2, wherein when the determining part determines that the servo motor is performing movement from stop, the compensation amount calculation part calculates the overridden compensation amount by multiplying the compensation amount by a coefficient smaller than 1.
4. A control method for controlling a servo motor, the control method comprising the steps of: calculating a command for a position or a speed of the servo motor at a predetermined cycle; determining that the servo motor is performing reversal or movement from stop at a predetermined cycle; calculating, when it is determined that the servo motor is performing reversal or movement from stop in the step of determining, the acceleration of the servo motor based on a result of the determination; and calculating a compensation amount for compensation of delay of the servo motor when the servo motor performs reversal or movement from stop, wherein in the step of calculating the acceleration, the acceleration is continued to be calculated even after the servo motor performs reversal or movement from stop, and in the step of calculating the compensation amount, the compensation amount is continued to be calculated at every predetermined time according to the acceleration obtained in the step of calculating the acceleration, even after the servo motor performs reversal or movement from stop.
5. A non-transitory computer-readable medium storing a computer program for operating a computer as the servo motor controller according to claim 1, the computer being configured to execute the steps of: calculating a command for a position or a speed of the servo motor at a predetermined cycle; determining that the servo motor is performing reversal or movement from stop at a predetermined cycle; calculating, when it is determined that the servo motor is performing reversal or movement from stop in the step of determining, the acceleration of the servo motor based on a result of the determination; and calculating a compensation amount for compensation of delay of the servo motor when the servo motor performs reversal or movement from stop, wherein in the step of calculating the acceleration, the acceleration is calculated even after the servo motor performs reversal or movement from stop, and in the step of calculating the compensation amount, the compensation amount is calculated at every predetermined time according to the acceleration obtained by the acceleration calculation part, even after the servo motor performs reversal or movement from stop.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0025]
[0026]
[0027]
[0028]
DETAILED DESCRIPTION OF THE INVENTION
[0029] An example of an embodiment of the present invention is described below. In the present embodiment, a servo motor controller 100 for a machine tool is described.
[0030] As shown in
[0031] It is noted that
[0032] The speed command calculation part 102 calculates a speed command Cv given to the servo motor 200. The speed command Cv, which is calculated based on a so-called machining program, may be calculated at a predetermined cycle. For example, the speed command calculation part 102 is capable of periodically calculating the speed command Cv given to the servo motor 200 to drive a machining tool for a workpiece, based on a machining program. In order to realize such processing, the speed command calculation part 102 is preferably configured with a program for reading a machining program and periodically obtaining a speed command Cv according to the program, and a CPU for executing the program. In the present embodiment, the speed command is described as a command, but other commands are applicable. For example, a position command may be used.
[0033] The reversal detection part 104 detects the reversal of the rotation of the servo motor 200 based on sign change of the speed command Cv calculated by the speed command calculation part 102. It is noted that the reversal detection part 104 may detect the reversal based on the actual detection speed Dv of the servo motor 200 obtained by the speed detection part 114 provided in the servo motor 200. The reversal detection part 104 may be configured with a program describing the operation thereof and a CPU for executing the program.
[0034] The acceleration calculation part 106 calculates an acceleration Ca of the servo motor 200 based on the speed command Cv calculated by the speed command calculation part 102. This calculation may be performed periodically as in the speed command calculation part 102. The acceleration Ca calculated by the acceleration calculation part 106 is supplied to the reversal compensation amount calculation part 108. The characteristic point in the present embodiment is to monitor the acceleration of the servo motor 200 even after the servo motor reverses, and obtain the compensation amount based on the acceleration. This allows for more precise control of the servo motor 200. The acceleration calculation part 106 calculates the acceleration Ca based on the speed command Cv calculated by the speed command calculation part 102 in the present embodiment. Alternatively, acceleration may be calculated based on the actually-detected detection speed Dv. The detection speed Dv is detected by the speed detection part 114 as described below. For example, the acceleration calculation part 106 may be configured with a program describing the operation for calculating acceleration by differentiating speed, and a CPU for executing the program.
[0035] The reversal compensation amount calculation part 108 calculates a reversal compensation amount A0 when the servo motor 200 reverses. This reversal compensation amount A0 is a compensation amount to be added to a command (for example, the speed command Cv) given to the servo motor 200, and is a compensation amount for compensation of delay of the servo motor 200. When the servo motor 200 reverses, a delay occurs in the rotation of the servo motor 200 due to backlash. In order to compensate such delay, the reversal compensation amount calculation part 108 calculates the reversal compensation amount A0 for the servo motor 200. As the reversal compensation amount A0, for example, a fixed value obtained based on various parameters or a value obtained by multiplying the fixed value by an override according to the acceleration of the servo motor 200 may be used. The reversal compensation amount calculation part 108 further calculates the reversal compensation amount A0 based on the acceleration calculated by the acceleration calculation part 106. The characteristic point in the present embodiment is that the reversal compensation amount calculation part 108 monitors (obtains) the acceleration even after the servo motor 200 reverses. The especially characteristic point in the present embodiment is the calculation of the reversal compensation amount A0 based on the acceleration which continues to be monitored (continues to be obtained). This allows for, even when the acceleration varies after the reversal, more appropriate calculation of the reversal compensation amount A0 based on the acceleration after the variation. As a result, the reversal compensation amount A0 can be calculated more precisely, as compared with the conventional method of calculating the compensation amount on the premise that the acceleration is constant between before and after the reversal. This allows for more precise control of the servo motor. For example, the reversal compensation amount calculation part 108 may be configured with a program describing the calculation operation thereof and a CPU for executing the program.
[0036] The first adder 110 adds the reversal compensation amount A0 calculated by the reversal compensation amount calculation part 108 to the speed command Cv to calculate a compensated speed command ACv. This allows for compensation of a response delay when the servo motor 200 reverses.
[0037] The speed detection part 114, which is provided in the servo motor 200, is a device for detecting the rotational speed of the servo motor 200. For example, the speed detection part 114 is preferably configured with an encoder or the like attached to the rotary axis of the servo motor 200. The speed detection part 114 detects the rotational speed of the servo motor 200, and supplies the detection speed Dv to the servo motor controller 100. In the case where the speed detection part 114 is configured with an encoder, a converter is preferably included to convert a signal output by the encoder into, for example, a digital signal. Alternatively, the encoder itself may output a digital signal indicating a rotational speed.
[0038] The second adder 112 obtains a final speed error dV by subtracting the detection speed Dv from the compensated speed command ACv obtained by the first adder 110. The obtained speed error dV is supplied to the speed control loop 116. The second adder 112 is an adder for performing feedback control for the servo motor 200 with respect to speed so as to rotate the servo motor 200 at a more accurate speed. For example, the first adder 110 or the second adder 112 may be configured with a digital adder (hardware) for adding a digital signal, or may be configured with a program for executing addition processing and a CPU for executing the program.
[0039] The speed control loop 116 calculates the current command I based on the speed error dV. Then, the speed control loop 116 drives and controls the servo motor 200 based on the current command I. Specifically, the speed control loop 116 calculates a speed control loop proportional term by multiplying the speed error dV by a speed control loop proportional gain. The speed control loop 116 further calculates a speed control loop integral term by multiplying the integral value of the speed error dV by a speed control loop integral gain. The current command I given to the servo motor 200 is calculated based on the sum of the speed control loop proportional term and the speed control loop integral term. The speed control loop 116 supplies current to the servo motor 200 based on the current command I, and drives the servo motor 200 at a rotational speed according to the speed command Cv. That is, the speed control loop 116 is typically configured with a program for calculating the current command I based on the speed error dV, and a CPU for executing the program. The speed control loop 116 further includes a power circuit (referred to as an amplifier circuit, a driver circuit, or the like) including a power control element for supplying current to the servo motor 200 based on the current command I.
[0040] The servo motor 200 is a servo motor conventionally used in a machine tool. The servo motor 200 is provided with the speed detection part 114, which is capable of detecting the speed of the servo motor 200.
[0041] The speed detection part 114 may be configured with any member capable of detecting the rotational speed of the servo motor 200. For example, a rotary encoder may be used. The rotational speed detected by the speed detection part 114, which is called a detection speed Dv, is supplied to the servo motor controller 100 for use in feedback control. Specifically, as shown in
[0042] Even in the case where the acceleration of the servo motor 200 varies after the servo motor 200 reverses, such a configuration enables calculation of the reversal compensation amount A0 according to the acceleration. Accordingly, the servo motor 200 can be controlled and driven more precisely.
[0043] The operation of the servo motor controller 100 according to the present embodiment is described below. In particular, the operation in the case of performing speed control for the servo motor 200 is described below. In the speed control, as shown in the configuration of
[0044] For example, as described above, the speed control loop 116 obtains the speed control loop proportional term by multiplying the speed error dV by the speed control loop proportional gain, and obtains the speed control loop integral term by multiplying the integral value of the speed error dV by the speed control loop integral gain. Then, the current command I is calculated based on the sum of both. Thereafter, in the present embodiment, the reversal detection part 104 determines that the servo motor 200 is performing reversal or movement from stop. When the reversal detection part 104 determines that the servo motor 200 is performing reversal or movement from stop, the reversal compensation amount calculation part 108 calculates the reversal compensation amount A0. The reversal compensation amount A0 is added to the speed command Cv, and thereby response delay of the servo motor 200 can be compensated.
[0045] In the present embodiment, the reversal compensation amount A0 is added to the speed command Cv. Alternatively, it is also preferable to add the reversal compensation amount A0 to the integral value of the speed error dV obtained by the speed control loop 116, which exerts similar effects. For example, in the case where the speed control loop 116 includes an integrating circuit for obtaining the integral value of the speed error dV, it is also preferable to insert an adder for adding the reversal compensation amount A0 to an output signal of the integrating circuit.
[0046] The servo motor controller 100 is preferably configured with an electronic circuit including a computer, as an example. The specific operation of the servo motor controller 100 configured with an electronic circuit including a computer is described below with reference to a flowchart.
[0047]
[0048] In Step S2-2, the reversal detection part 104 detects the reversal of the rotation of the servo motor 200 based on sign change of the speed command Cv calculated by the speed command calculation part 102. When the period of time after the reversal of the servo motor 200 is equal to or less than a predetermined period of time, the processing shifts to Step S2-3. In the case where the period of time after the reversal of the servo motor 200 exceeds a predetermined period of time, the processing shifts to Step S2-4b. The predetermined period of time herein is a period of time set in advance with parameters or the like. It is noted that the reversal may be detected based on the actual detection speed Dv of the servo motor 200 obtained by the speed detection part 114 (encoder) provided in the servo motor 200. Step S2-2 corresponds to a preferable example of a determining step according to the scope of the claims.
[0049] In Step S2-3, the acceleration calculation part 106 calculates the acceleration Ca of the servo motor at a predetermined cycle based on the speed command Cv calculated by the speed command calculation part 102. It is noted that the acceleration may be calculated based on the actually detected speed Dv. The characteristic point in the present embodiment is that the acceleration calculation in Step S2-3 continues to be performed even after the reversal. This allows for, even when machining processing is performed such that the acceleration varies after the reversal, calculation of a compensation amount according to the acceleration at the time. It is noted that the acceleration calculation in Step S2-3 may be configured to be performed after the detection of the reversal. Moreover, the acceleration calculation in Step S2-3 may be configured to be performed continuously from before the detection of the reversal (before the reversal). As shown in the flowchart of
[0050] In Step S2-4, the reversal compensation amount calculation part 108 calculates the reversal compensation amount A0 in the case where the servo motor 200 reverses. The reversal compensation amount A0 is calculated in the same manner as the above-described operation of the reversal compensation amount calculation part 108. The characteristic point in the present embodiment is that the acceleration calculation part 106 continues to calculate the acceleration after the servo motor 200 reverses, and in response, the reversal compensation amount calculation part 108 continues to calculate the reversal compensation amount A0 based on the calculated acceleration. This allows for, even when the acceleration varies after the reversal, more appropriate calculation of the reversal compensation amount A0 based on the acceleration after the variation. It is noted that Step S2-4 corresponds to a preferable example of a compensation amount calculation step according to the scope of the claims. On the other hand, in Step S2-4b, the reversal compensation amount calculation part 108 outputs 0 as the reversal compensation amount A0. The servo motor 200 is not reversed, and thus the compensation based on the reversal is not to be performed.
[0051] In Step S2-5, the first adder 110 obtains the compensated speed command AC0 by adding the compensation amount A0 to the speed command Cv. Therefore, in the case where the servo motor 200 reverses, the compensation is made. On the other hand, in the case where the servo motor 200 is not reversed, the first adder 110 adds 0 as the compensation amount, and thus no compensation is made substantially.
[0052] In Step S2-6, the second adder 112 obtains the so-called speed error dV by subtracting from the compensated speed command ACv the detection speed Dv which is the actual speed of the servo motor 200 detected by the speed detection part 114.
[0053] In Step S2-7, the speed control loop 116 obtains the current command I given to the servo motor 200 based on the above speed error dV. The speed control loop 116 further supplies predetermined current to the servo motor 200 based on the current command I, and controls and drives the servo motor. As described above, according to the present embodiment, in the case where the servo motor 200 reverses, the acceleration of the servo motor 200 is obtained, and the compensation amount to the speed command Cv is calculated based on the obtained acceleration. This allows for more precise control of the servo motor 200 even in the case where the acceleration varies after the servo motor 200 reverses. It is noted that a non-transitory computer-readable medium storing the various programs described in the present embodiment corresponds to a preferable example of a non-transitory computer-readable medium storing the computer programs according to the scope of the claims.
[0054] Although the embodiment of the present invention has been described in detail above, the above-described embodiment merely indicates a specific example for carrying out the present invention. The technical scope of the present invention is not limited to the above embodiment. The present invention may be modified in various ways without departing from the spirit thereof, and these modifications are also included in the technical scope of the present invention.
[0055] The case where the servo motor 200 performs reversal has been described mainly as an example. Alternatively, in the case where the servo motor 200 starts moving from a stopped state (referred to as movement from stop), the same processing as in the case of the reversal may be performed. In the above description, reversal can be replaced with movement from stop at any time. Also in the case of movement from stop, the servo motor 200 can be controlled more precisely as in the case described above. That is, the reversal detection part 104 may detect either reversal or movement from stop of the servo motor 200. The reversal detection part 104 may detect either one of them, or may detect both of them.
[0056] In the case where the reversal detection part 104 detects reversal or movement from stop, the reversal compensation amount calculation part 108 may calculate the reversal compensation amount A0 by the same processing as the above-described processing. In the case of movement from stop, the reversal compensation amount calculation part 108 preferably multiplies the acceleration of the servo motor 200 by an override which is smaller than 1. Also in the case where the reversal detection part 104 detects movement from stop, each of the acceleration calculation part 106, the first adder 110, the second adder 112, the speed detection part 114, and the speed control loop 116 performs the same operation as in the case of reversal.
[0057] In the example described above, the servo motor controller 100 has been described mainly with respect to speed control as an example. Alternatively, other control methods may be used. For example, in the case where position control, acceleration control or the like is performed, a compensation amount may be calculated by the same method so that the position or the like of a servo motor is controlled. For example, in the case of position control, a position command calculation part 102b may be used instead of the speed command calculation part 102. The position command calculation part 102b calculates a position command given to the servo motor 200 based on a machining program in the same manner as the speed command calculation part 102. The position command calculation part 102b may also be configured with a program for realizing the operation thereof and a CPU for executing the program, as in the speed command calculation part 102.
EXPLANATION OF REFERENCE NUMERALS
[0058] 100 SERVO MOTOR CONTROLLER [0059] 102 SPEED COMMAND CALCULATION PART [0060] 104 REVERSAL DETECTION PART [0061] 106 ACCELERATION CALCULATION PART [0062] 108 REVERSAL COMPENSATION AMOUNT CALCULATION PART [0063] 110 FIRST ADDER [0064] 112 SECOND ADDER [0065] 114 SPEED DETECTION PART [0066] 116 SPEED CONTROL LOOP [0067] A0 REVERSAL COMPENSATION AMOUNT [0068] ACv COMPENSATED SPEED COMMAND [0069] Ca ACCELERATION [0070] Cv SPEED COMMAND [0071] Dv DETECTION SPEED [0072] dV SPEED ERROR [0073] I CURRENT COMMAND [0074] P PROTRUSION