Numerical controller for controlling feed rate based on spindle load
10488849 ยท 2019-11-26
Assignee
Inventors
Cpc classification
International classification
Abstract
A numerical controller performs PID control to control the move speed of an axis for driving a spindle such that a load value of the spindle becomes constant. When the spindle load value exceeds a threshold value, a speed calculation unit of the numerical controller calculates an override for the feed rate of the axis instructed by command data such that the load value of the spindle becomes constant, and, at the start of the speed calculation process, assigns the override just before the start of the speed calculation process to an initial value of an integral term or an offset for PID control.
Claims
1. A numerical controller which, in controlling a machine including a tool, a spindle motor for driving the tool and a servo motor for driving the machine along an axis, based on a programmed command, performs PID control for controlling the servo motor to control move speed of the machine along the axis such that a spindle load value of the spindle motor becomes constant, the numerical controller comprising: a processor configured to: analyze the programmed command and generate command data for providing instructions on driving the machine along the axis with the servo motor; control the servo motor to drive the machine along the axis based on the command data; and determine the spindle load value as the machine is driven along the axis, and in response to determining that the spindle load value exceeds the preset threshold value: set an override for a feed rate of the machine along the axis to an initial value of an integral term with an offset of zero for the PID control, and then start a speed calculation process for calculating the override such that the spindle load value becomes constant.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The forgoing and other objects and feature of the invention will be apparent from the following description of preferred embodiments of the invention with reference to the accompanying drawings, in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
(12) An overview of the configuration of a numerical controller according to one embodiment of the present invention will be described with reference to a functional block diagram of
(13) A numerical controller 1 according to this embodiment includes a command program analysis unit 10, a speed calculation unit 11, an interpolation unit 12, an after-interpolation acceleration/deceleration unit 13, a servo motor control unit 14, and a spindle load measurement unit 15.
(14) The command program analysis unit 10 sequentially reads and analyzes blocks, which provide instructions on the operation of a machine as a controlled object, of a program or the like stored in memory (not shown), creates command data for providing instructions on the motion of an axis driven by a servo motor 2 based on results of the analysis, and outputs the created command data to the speed calculation unit 11.
(15) The speed calculation unit 11 calculates an override for a feed rate in the command data inputted from the command program analysis unit 10 based on a spindle load on a spindle motor 3 measured by the spindle load measurement unit 15 such that the spindle load becomes constant. Then, command data obtained by adjusting a speed based on the calculated override is outputted to the interpolation unit 12.
(16) The interpolation unit 12 generates points (interpolation data) for respective interpolation periods on a commanded path instructed by the command data, based on the command data after speed adjustment inputted from the speed calculation unit 11, and outputs the interpolation data to the after-interpolation acceleration/deceleration unit 13.
(17) The after-interpolation acceleration/deceleration unit 13 calculates the speed of each axis for each interpolation period based on the interpolation data inputted from the interpolation unit 12, and outputs a result of the calculation to the servo motor control unit 14. Then, the servo motor control unit 14 controls the servo motor 2 for driving an axis of the machine as a controlled object, based on the output from the after-interpolation acceleration/deceleration unit 13.
(18) Next, the calculation of speed carried out by the speed calculation unit 11 will be described. In the present invention, general PID control is used with the following extensions. Moreover, PID control in the present invention is assumed to exclude PID control relating to the prior art technique and include the following extensions. Extension 1: e.sub.L(t) includes not only the difference between a desired value and a present value of a controlled object but also all of functions satisfying the following conditions:
e.sub.L(t1)=0 when L(t1)=L.sub.iCondition 1:
e.sub.L(t1)e.sub.L(t2) when L(t1)L(t2)Condition 2:
where L.sub.i is the desired value of the controlled object, and L(t) is the present value (time t) of the controlled object. Extension 2: The gain of each term includes 0. In other words, any combination of P, I, and D, such as P control or PI control, is included. Extension 3: For an integral term, any initial value can be set at the start of control (t=t.sub.0) if necessary. In the calculation of the integral term for the case where an initial value is set, a value obtained by adding the initial value to a result of general integration over the interval from to to t is used as a result of the calculation of the integral term. Moreover, such an integral term is expressed as an integral term with a lower limit omitted. Further, the initial value of the integral term is expressed as an integral term in which an upper limit is to and in which the lower limit is omitted. Extension 4: Any value can be assigned to an offset at the start of control.
(19) Based on the above-described extensions, the following equation (2) is used as an equation for PID control in the present invention:
(20)
(21) First, a first example of the calculation of speed carried out by the speed calculation unit 11 of the numerical controller in
(22) When the spindle load on the spindle motor 3 measured by the spindle load measurement unit 15 exceeds a preset load value, the speed calculation unit 11 starts controlling an override for the servo motor 2 by PID control using the above-described equation (2). In the speed calculation unit 11, the override just before the start of PID control is assigned to the initial value of the integral term or the offset in the above-described equation (2) when PID control is started (time t=t.sub.0). This reduces variations in the override and can prevent a steep decrease in the override at the start of PID control. Processing procedures performed by the speed calculation unit 11 at the start of PID control are as follows: Procedure 1-1: At the start of PID control (when the spindle load reaches a control-effective load), the override just before the start of PID control is assigned to the integral term or the offset, and control is started. Procedure 1-2: In the case where the override just before the start of PID control, which is denoted by Ob, is assigned to the integral term, the following equation (3) is satisfied; and, in the case where Ob is assigned to the offset, the following equation (4) is satisfied. In the case where the override Ob is assigned to the integral term, the initial value of the offset is set to 0. Similarly, in the case where the override Ob is assigned to the offset, the initial value of the integral term is set to 0.
.sup.t.sup.
C=O.sub.b(4)
(23)
(24) Next, a second example of the calculation of speed carried out by the speed calculation unit 11 of the numerical controller in
(25) When the spindle load on the spindle motor 3 measured by the spindle load measurement unit 15 exceeds a preset load value, the speed calculation unit 11 starts controlling an override for the servo motor 2 by PID control using the above-described equation (2). In the speed calculation unit 11, a value which makes an override to be outputted equal to the override just before the start of PID control is assigned to the initial value of the integral term or the offset in the above-described equation (2) when PID control is started (time t=t.sub.0). This eliminates variations in the override and can prevent a steep decrease in the override at the start of PID control. Processing procedures performed in the speed calculation unit 11 at the start of PID control are as follows: Procedure 2-1: At the start of PID control (when the spindle load reaches a control-effective load), a value which makes the override continuous is assigned to the integral term or the offset, and control is started. Procedure 2-2: By deforming the above-described equation (2) as an equation for PID control, the output value satisfies equation (5) below in the case where the above-described value is assigned to the integral term and satisfies equation (6) below in the case where the above-described value is assigned to the offset. In the case where the above-described value is assigned to the integral term, the initial value of the offset is set to 0; and, in the case where the above-described value is assigned to the offset, the initial value of the integral term is set to 0.
(26)
(27) It should be noted that if this is applied to the above-described equation (2), O(t0)=Ob is obtained, and an integral over one period is not calculated. Accordingly, the output may be calculated after an integral over one period is calculated.
(28)
(29)
(30) [Step SA01] The speed calculation unit 11 determines whether or not the present spindle load Ln on the spindle motor 3 measured by the spindle load measurement unit 15 is not less than a preset spindle load value Lm at which PID control becomes effective. If the spindle load Ln is not less than the spindle load value Lm, the processing proceeds to step SA02; otherwise the processing proceeds to step SA06.
(31) [Step SA02] The speed calculation unit 11 checks the PID-controlling flag and determines whether PID control is currently being performed or not. If PID control is currently being performed, the processing proceeds to step SA05; and, if PID control is not currently being performed, the processing proceeds to step SA03.
(32) [Step SA03] The speed calculation unit 11 carries out assignment to the initial value of the integral term or the offset in the equation (2) described above.
(33) [Step SA04] The speed calculation unit 11 sets the PID-controlling flag to ON and starts a process for the calculation of the override for the servo motor 2 by PID control.
(34) [Step SA05] The speed calculation unit 11 executes the process for the calculation of the override for the servo motor 2 by PTD control using equation (2).
(35) [Step SA06] The speed calculation unit 11 sets the PID-controlling flag to OFF (reset) and ends the process for the calculation of the override for the servo motor 2 by PID control.
(36) While embodiments of the present invention have been described above, the present invention is not limited only to the above-described examples of embodiments, but can be carried out in various aspects by making appropriate modifications thereto.