The present application is based on PCT filing PCT/JP2018/025474, filed Jul. 5, 2018, which is incorporated herein by reference.
The present invention relates to a numerical control device for controlling a machine tool in accordance with a machining program.
When a machine tool performs machining, a driving force of a movable body may sometimes cause a relative displacement between the movable body and a non-movable body to be vibrational, thereby degrading machining accuracy and quality. To this problem, Patent Literature 1 proposes a technique in which a numerical control device predicts a relative displacement using a prediction model created in advance for predicting the relative displacement, and performs feedforward correction based on the predicted relative displacement. This technique can be used even when a drive direction is different from a vibration direction.
Patent Literature 1: Japanese Patent No. 6180688
However, in actual machining, the relative displacement between the tool and the workpiece changes due to a change in the inertia of the machine tool such as a change in the weight of the workpiece mounted or a change in the positional relationship between the tool and the workpiece. In the technique described in Patent Literature 1, a change in the inertia of the machine tool is not taken into consideration. Thus, when the inertia of the machine tool has changed, a proper correction cannot be made on a command from the numerical control device.
The present invention has been made in view of the above circumstances, and its object is to provide a numerical control device capable of suppressing the occurrence of vibration in a relative displacement between a tool and a workpiece when the inertia of a machine tool has changed.
In order to solve the above-described problem and achieve the object, the present invention provides a numerical control device for controlling a relative displacement between a tool and a workpiece in a machine tool using a command to a drive unit driving a motor, the numerical control device comprising: a tool-side displacement measurement unit to measure a physical quantity related to a displacement of the tool; a workpiece-side displacement measurement unit to measure a physical quantity related to a displacement of the workpiece; a drive signal measurement unit to measure a drive signal outputted from the drive unit to the motor; a relative displacement calculation unit to calculate a relative displacement between the tool and the workpiece from the physical quantity related to the displacement of the tool and the physical quantity related to the displacement of the workpiece; and a relative displacement prediction unit to calculate a relative displacement predicted value that is a predicted value of the relative displacement from the drive signal, based on a prediction model representing a relationship between the drive signal and the relative displacement. The numerical control device of the present invention further comprises: a model parameter operation unit to generate prediction model parameters constituting the prediction model, based on the drive signal, the relative displacement generated by the relative displacement calculation unit, and the relative displacement predicted value; and a command value correction unit to output as the command a post-correction position command obtained by correcting a position command to the drive unit using the prediction model parameters. The model parameter operation unit changes the prediction model parameters to reduce a difference between the relative displacement generated by the relative displacement calculation unit and the relative displacement predicted value.
The numerical control device according to the present invention has an advantageous effect of being able to suppress the occurrence of vibration in a relative displacement between the tool and the workpiece when the inertia of the machine tool has changed.
Hereinafter, a numerical control device according to embodiments of the present invention will be described in detail with reference to the drawings. Note that the invention is not necessarily limited by these embodiments.
The machine tool 1 includes a bed 2 serving as a base, a table 4 that is movable in a horizontal direction and is rotatable in a horizontal plane while holding a workpiece 3 to be machined, a head 6 movable in a vertical direction while holding a tool 5, and a column 7 that is fixed on the bed 2 and supports the head 6.
The numerical control device 8 is connected to the machine tool 1 and the drive unit 11 that drives a motor of the machine tool 1, with controlling the position and speed of the motor. The numerical control device 8 is a device that outputs movement commands to the drive unit 11, according to a machining program for machining the workpiece 3. According to an instruction from the numerical control device 8, in the machine tool 1, the table 4 moves in a horizontal direction or rotates in the horizontal plane, or the head 6 moves in a vertical direction, whereby the workpiece 3 is machined into an intended shape by the tool 5. In the machine tool 1, a driving force to move the table 4 propagates as a reaction force, thereby generating vibration in structures other than the workpiece 3. The structures in which vibration is generated include the column 7. When such vibration occurs, the relative position of the tool 5 with respect to the workpiece 3 vibrates.
The following describes the operation of the numerical control device 8 to prevent degradation of machining accuracy or work surface quality when vibration as described above has occurred.
The drive unit 11 generates a drive signal for moving the table 4 or the head 6, according to a movement command from the numerical control device 8, and outputs the generated drive signal to the motor of the machine tool 1. According to the drive signal, the motor mounted to the machine tool 1 is driven, thereby translationally driving or rotationally driving the table 4 or the head 6. As a result, the relative displacement between the tool 5 and the workpiece 3 in the machine tool 1 is controlled. The first embodiment describes a case where the table 4 is moved. In the description here, an object driven like the table 4 is referred to as a driven object, and an object not driven like the head 6 as a non-driven object.
The numerical control device 8 includes a tool-side displacement measurement unit 9, a workpiece-side displacement measurement unit 10, a drive signal measurement unit 12, a relative displacement calculation unit 13, a model parameter operation unit 14, a relative displacement prediction unit 15, a command value correction unit 16, and a position command generation unit 17.
The tool-side displacement measurement unit 9 acquires a physical quantity related to the displacement of the tool 5 from a sensor attached to the head 6 or the tool 5, and outputs the quantity to the relative displacement calculation unit 13. The displacement of the tool 5 means the amount of change in the position of the tool 5. The sensor may be any sensor capable of acquiring a physical quantity related to the displacement of the tool 5, such as an acceleration sensor, a speed sensor, or a displacement sensor.
The workpiece-side displacement measurement unit 10 acquires a physical quantity related to the displacement of the workpiece 3 from a sensor attached to the workpiece 3, the table 4, or the bed 2, and outputs the quantity to the relative displacement calculation unit 13. The displacement of the workpiece 3 means the amount of change in the position of the workpiece 3. The sensor may be any sensor capable of acquiring a physical quantity related to the displacement of the workpiece 3, such as an acceleration sensor, a speed sensor, or a displacement sensor.
The drive signal measurement unit 12 acquires a drive signal outputted from the drive unit 11, and outputs the drive signal to the relative displacement prediction unit 15 and the model parameter operation unit 14.
The relative displacement calculation unit 13 calculates the relative displacement between the tool 5 and the workpiece 3 from the physical quantity related to the displacement of the tool 5 acquired from the tool-side displacement measurement unit 9 and the physical quantity related to the displacement of the workpiece 3 acquired from the workpiece-side displacement measurement unit 10. The relative displacement between the tool 5 and the workpiece 3 means the amount of change in the position of the tool 5 with respect the position of the workpiece 3 or the amount of change in the position of the workpiece 3 with respect to the position of the tool 5, or a difference between the displacement of the tool 5 and the displacement of the workpiece 3. As a generation procedure, first, the difference between the physical quantity related to the displacement acquired from the tool-side displacement measurement unit 9 and the physical quantity related to the displacement acquired from the workpiece-side displacement measurement unit 10 is taken to obtain difference information on displacement. When the difference information corresponds to data in a dimension of acceleration, a relative displacement is calculated by performing second-order integration of the data with respect to time. When the difference information corresponds to data in a dimension of velocity, a relative displacement is calculated by performing first-order integration of the data with respect to time. When the difference information corresponds to data in a dimension of position, the data is generated as a relative displacement without performing integration operation on the data. The relative displacement generated by the relative displacement calculation unit 13 is outputted to the model parameter operation unit 14.
The model parameter operation unit 14 computes and generates a prediction model parameter based on the relative displacement acquired from the relative displacement calculation unit 13, the drive signal acquired from the drive signal measurement unit 12, and a relative displacement predicted value acquired from the relative displacement prediction unit 15 described later. A prediction model is a model expressed by a relational expression representing a correlation with the drive signal as an input and with the relative displacement in a three-dimensional space between the workpiece 3 and the tool 5 as an output. Parameters constituting the prediction model are referred to as prediction model parameters. A method of generating a prediction model parameter differs in processing procedure between before a machining operation and during a machining operation, details of which will be described later. The prediction model parameter determined by computation of the model parameter operation unit 14 is outputted to the relative displacement prediction unit 15 and the command value correction unit 16.
The relative displacement prediction unit 15 constructs a prediction model using the prediction model parameters acquired from the model parameter operation unit 14. Based on the constructed prediction model, the relative displacement prediction unit 15 calculates the relative displacement predicted value, which is a predicted value of the relative displacement, from the drive signal acquired from the drive signal measurement unit 12.
The position command generation unit 17 reads a machining program for machining the workpiece 3, and outputs a position command as a movement command for the drive unit 11 to the command value correction unit 16.
The command value correction unit 16 corrects the position command in a method described later, the position command being acquired from the position command generation unit 17, and determines a post-correction position command to cause the drive unit 11 to drive the machine tool 1 so that the relative displacement does not vibrate to output the post-correction position command to the drive unit 11.
Generation processing procedures of prediction model parameters before a machining operation and during a machining operation in the model parameter operation unit 14 will be described individually.
First, a generation processing procedure of prediction model parameters before a machining operation will be described. Before a machining operation, the drive unit 11 is caused to output a drive signal for vibrating the machine tool 1. The model parameter operation unit 14 acquires the drive signal at that time from the drive signal measurement unit 12, and the model parameter operation unit 14 acquires a relative displacement at that time from the relative displacement calculation unit 13. From the acquired drive signal and relative displacement, the model parameter operation unit 14 derives parameters of a prediction model that is a state space model capable of expressing the relationship between the drive signal and vibration generated in the relative displacement, that is, prediction model parameters. Here, the model parameter operation unit 14 derives the prediction model parameters, using a model obtained by a simulation based on the finite element method or a kinetic model, a model obtained by system identification, or a model approximated by order reduction or the like from a model obtained by system identification. However, the method of deriving the parameters of the prediction model is not necessarily limited to these methods. In this example, parameters of a prediction model of state-space representation are derived based on a model approximated by order reduction or the like from a model obtained by the system identification.
When the above preliminary preparation is completed, the user instructs the start of the generation processing of prediction model parameters, and an input device of the numerical control device 8 receives the instruction to start the generation processing of prediction model parameters (step S1).
Next, the drive unit 11 outputs a drive signal for vibrating the machine tool 1 (step S2). The drive signal is a vibration signal different from a signal used when actual machining is performed. The vibration signal may be any signal having a frequency band including the vibration frequency of vibration of a relative displacement generated between the tool 5 and the workpiece 3, for which a pseudorandom signal, a sine sweep signal, or the like is used.
Then, the model parameter operation unit 14 acquires the drive signal currently subjected to vibration from the drive signal measurement unit 12, and acquires a relative displacement at that time from the relative displacement calculation unit 13 (step S3).
The model parameter operation unit 14 produces a prediction model from the acquired drive signal and relative displacement using a system identification method. The model parameter operation unit 14 performs approximation by order reduction or the like on the produced prediction model, thereby producing a prediction model simulating vibration of the relative displacement that affects machining accuracy and quality (step S4). To produce a prediction model specifically means to determine prediction model parameters that are parameters representing the prediction model.
The model parameter operation unit 14 outputs the prediction model parameters constituting the prediction model produced in step S4 to the relative displacement prediction unit 15 and the command value correction unit 16 (step S5). In this example, those in the state-space representation of the produced prediction model are used as the prediction model parameters. However, the prediction model parameters are not necessarily limited to those in the state-space representation.
The command value correction unit 16 acquires a position command from the position command generation unit 17, acquires a relative displacement predicted value from the relative displacement prediction unit 15, and acquires prediction model parameters from the model parameter operation unit 14. Based on the acquired position command, relative displacement predicted value, and prediction model parameters, the command value correction unit 16 outputs a post-correction position command to cause the drive unit 11 to drive the machine tool 1 so that the relative displacement does not vibrate with respect to the position command.
A method of generating the post-correction position command in the command value correction unit 16 is as follows as described in Patent Literature 1. Specifically, the command value correction unit 16 predicts a relative displacement that is the amount of movement of the non-driven object, based on the prediction model constructed using the prediction model parameters acquired from the model parameter operation unit 14, and predicts the amount of movement of the driven object based on a predetermined model for predicting the amount of movement of the driven object. Then, the command value correction unit 16 calculates a feedback gain by the design of an optimum regulator, and calculates the amount of correction to the position command to reduce the amount of movement of the non-driven object, using the predicted amounts of movement of the non-driven object and the driven object and information including the feedback gain. The command value correction unit 16 outputs a post-correction position command obtained by correcting the position command with the calculated amount of correction as a command to the drive unit 11. However, the correction method in the command value correction unit 16 is not limited to this manner. The frequency of vibration of a relative displacement may be determined from a prediction model, and such a filter as to suppress vibration of that frequency may be set in the command value correction unit 16. By the correction of the position command as described above, it is possible to suppress vibration generated in the relative displacement between the tool 5 and the workpiece 3 when the table 4 is moved.
However, when the weight or the shape of the workpiece 3, a jig, a vise, a measuring instrument, the tool 5, or the like greatly changes, when the positional relationship between the tool 5 and the workpiece 3 greatly changes as a result of a translational drive or a rotational drive, or when an environmental change, degradation over time, or the like occurs, the inertia of the machine tool 1 changes. When the inertia of the machine tool 1 changes, the vibration characteristics of the relative displacement changes, so that it becomes difficult to correctly predict the relative displacement by the prediction model produced by the above-described method. As a result, the relative displacement can become vibrational.
Therefore, when the inertia of the machine tool 1 has changed, the numerical control device 8 according to the first embodiment executes prediction model parameter change processing for changing a prediction model parameter. The prediction model parameter change processing is performed by the model parameter operation unit 14 during a machining operation. The following describes the prediction model parameter change processing.
During a machining operation, the model parameter operation unit 14 determines a time when acceleration is ended or a time when deceleration is ended from a drive signal acquired from the drive signal measurement unit 12. Then, the model parameter operation unit 14 acquires from the relative displacement calculation unit 13 a relative displacement for an arbitrary period of time from the time when acceleration is ended or the time when deceleration is ended. The model parameter operation unit 14 acquires a relative displacement predicted value from the relative displacement prediction unit 15. Then, the model parameter operation unit 14 calculates the absolute value of a difference between the acquired relative displacement predicted value and the acquired relative displacement. This absolute value is regarded as a prediction error of relative displacement.
When the inertia of the machine tool 1 has not greatly changed at the time of vibration before the machining operation, the prediction error of relative displacement has a very small value near zero because the vibration of the relative displacement is suppressed by a post-correction position command. However, when the inertia of the machine tool 1 has greatly changed, the prediction error of relative displacement becomes vibrational, and so vibration at that time is predicted. Specifically, when the prediction error of relative displacement becomes larger than a threshold value, the model parameter operation unit 14 calculates the vibration frequency, the amplitude, the damping ratio, and the phase of vibration of the relative displacement acquired from the relative displacement calculation unit 13, using an optimization method. The threshold value is set to a predetermined proper positive value so that optimization is performed only when necessary. If the accuracy of the prediction model at the time of vibration is sufficiently good, the relative displacement predicted value has sufficiently reduced vibration. Therefore, the relative displacement predicted value is assumed to be zero here, and the vibration of the relative displacement is calculated by the optimization method. In this example, the description is made using particle swarm optimization (PSO) that is a publicly known method as an optimization method, but the optimization method for determining the vibration of a relative displacement is not necessarily limited to this method.
An optimization formula in particle swarm optimization is expressed by numerical formulas (1) and (2) below.
[Formula 1]
vik+1=w·vik+c1·rand1i·(pbestik−xik)+c2·rand2i·(gbest−xik) (1)
[Formula 2]
xik+1=xik+vik+1 (2)
A subscript i in numerical formulas (1) and (2) represents a particle number (the number of particles), a superscript k represents a search number, w, c1, and c2 represent weighting factors in their respective terms, rand1i and rand2i represent uniform random numbers from 0 to 1, xik represents a position vector at the current search number k of the i-th particle, vik represents a movement vector at the current search number k of the i-th particle, xik+1 represents a position vector at the next search number k+1 of the i-th particle, vik+1 represents a movement vector at the next search number k+1 of the i-th particle, pbesti represents the past best solution of the i-th particle, and gbest represents the past best solution of all particles.
The vibration of a relative displacement acquired by the model parameter operation unit 14 from the relative displacement calculation unit 13 is assumed to be able to be estimated as in the following numerical formula (3).
[Formula 3]
y=A·exp(−2·π·f·ζ)·sin(2·π·f·t+Φ) (3)
In numerical formula (3), y represents an estimated relative displacement, A represents an amplitude, f represents a vibration frequency, ζ represents a damping ratio, ϕ represents a phase, and t represents an amount of time from an acceleration ending or a deceleration ending. At this time, with setting a position vector xik=[A, f, ζ, ϕ], an amplitude, a vibration frequency, a damping ratio, and a phase are obtained such that the absolute value of the difference between the relative displacement y estimated by numerical formula (3) and the relative displacement acquired from the relative displacement calculation unit 13 is minimized.
First, the model parameter operation unit 14 sets initial values in particle swarm optimization (step S101). Specifically, what are properly set are a maximum value of the particle number i which is the total number of particles, a maximum value of the search number k which is the total search number, the weighting factors w, c1, and c2, an initial value xi0 of the position vector of each particle, an initial value vi0 of the movement vector of each particle, an initial value pbesti0 of the past best solution of the i-th particle, and an initial value of the past best solution gbest of all the particles.
Next, search number k=0 is set (step S102).
Next, particle number i=1 is set (step S103).
Next, according to numerical formula (1), the movement vector vik+1 at the next search number k+1 is calculated (step S104).
Next, according to numerical formula (2), the position vector xik+1 at the next search number k+1 is calculated (step S105).
Next, using the position vector xik+1 determined in step S105, the relative displacement y estimated by numerical formula (3) is calculated as yi (step S106).
Next, the current evaluation value Yik+1=|yi−yref| of the i-th particle is calculated (step S107), the evaluation value being the absolute value of the difference between the relative displacement yi estimated in step S106 and the relative displacement yref acquired from the relative displacement calculation unit 13.
It is determined whether or not the current evaluation value of the i-th particle calculated in step S107 is smaller than an evaluation value obtained in the past for the i-th particle (step S108). When it is determined that the current evaluation value is smaller than the past evaluation value (step S108: Yes), the process proceeds to step S109. Otherwise (step S108: No), the process proceeds to step S110.
By setting the position vector xik+1 determined in step S105 as the past best solution pbesti of the i-th particle, the past best solution pbesti of the i-th particle is updated (step S109). That is, pbesti=xik+1 is set.
It is determined whether or not the current evaluation value of the i-th particle calculated in step S107 is smaller than evaluation values obtained in the past for all the particles (step S110). When it is determined that the current evaluation value is smaller than the past evaluation values of all the particles (step S110: Yes), the process proceeds to step S111. Otherwise (step S110: No), the process proceeds to step S112.
By setting the past best solution pbesti of the i-th particle as the past best solution gbest of all the particles, the past best solution gbest of all the particles is updated (step S111). That is, gbest=pbesti is set.
The particle number i is incremented by one, with i=i+1, to be updated (step S112).
Next, it is determined whether or not the particle number i is larger than the total particle number set in step S101 (step S113). When it is determined that the particle number i is larger than the total particle number set in step S101 (step S113: Yes), the process proceeds to step S114. Otherwise (step S113: No), the process proceeds to step S104.
The search number k is incremented by one, with k=k+1, to be updated (step S114).
Next, it is determined whether or not the search number k is larger than the total search number set in step S101 (step S115). When it is determined that the search number k is larger than the total search number set in step S101 (step S115: Yes), the process proceeds to step S116. Otherwise (step S115: No), the process proceeds to step S103.
The past best solution gbest of all the particles is set as the final optimal solution (step S116). It is determined that this best solution gbest corresponds to the vibration frequency, the amplitude, the damping ratio, and the phase of vibration of the relative displacement acquired from the relative displacement calculation unit 13.
The model parameter operation unit 14 changes the prediction model by applying the vibration frequency and others determined as described above to portions of the prediction model corresponding to the vibration frequency and others.
Here, it is assumed that the prediction model is concretely expressed by a transfer function as in numerical formula (4) below.
In numerical formula (4), s represents a Laplace operator, N(s) represents a polynomial of s, λ represents an eigenvalue of the prediction model, and Δ˜ represents a conjugate complex number of λ. In general, a real part λreal and an imaginary part λimag of the eigenvalue A can be expressed as in numerical formulas (5) and (6) below using the vibration frequency f and the damping ratio ζ.
[Formula 5]
λreal=ζ·(2·π·f) (5)
[Formula 6]
λimag=√{square root over (1−ζ2)}·(2·π·f) (6)
By substituting the vibration frequency f and the damping ratio ζ determined in step S116 of the above-described optimization method into the vibration frequency f and the damping ratio ζ of numerical formulas (5) and (6), the eigenvalue is changed, and the model parameter operation unit 14 can change the prediction model to a model adapted to the vibration of the relative displacement acquired from the relative displacement calculation unit 13. By the state-space representation of the changed prediction model, the prediction model parameters can also be changed. Since the relative displacement calculation unit 13 calculates the relative displacement from the physical quantities related to the displacement acquired from the tool-side displacement measurement unit 9 and the workpiece-side displacement measurement unit 10, the prediction model parameters can be changed according to a change in the inertia of the machine tool 1. When the prediction model parameter is changed by the model parameter operation unit 14 as described above, the prediction model parameters used by the relative displacement prediction unit 15 are changed. Thereby, a difference between a relative displacement predicted value outputted by the relative displacement prediction unit 15 based on a drive signal using the prediction model parameters and a relative displacement generated by the relative displacement calculation unit 13 is minimized to be zero. More specifically, the model parameter operation unit 14 changes the prediction model parameters so that the vibration frequency, the amplitude, the damping ratio, and the phase of vibration of a relative displacement predicted value predicted by the relative displacement prediction unit 15 correspond to the vibration frequency, the amplitude, the damping ratio, and the phase of vibration of a relative displacement generated by the relative displacement calculation unit 13, respectively.
In
As described above, according to the numerical control device 8 of the first embodiment, a prediction model is optimized, that is, prediction model parameters are optimized, based on a relative displacement measured during a machining operation. This allows inhibition of occurrence of vibration in a relative displacement between the tool and the workpiece when the inertia of the machine tool 1 during a machining operation has changed.
The relative displacement calculation unit 131 includes a relative displacement operation unit 18 and a filtering unit 19. The relative displacement operation unit 18 performs the same processing as the relative displacement calculation unit 13 according to the first embodiment. In the second embodiment, a relative displacement between the tool and the workpiece, which is outputted from the relative displacement operation unit 18 is defined as a pre-filtering relative displacement. The pre-filtering relative displacement outputted from the relative displacement operation unit 18 is inputted to the filtering unit 19.
Specifically, when a prediction model expressed by numerical formula (4) can be constructed from the prediction model parameters, the vibration frequency of the relative displacement can be easily estimated from numerical formulas (5) and (6). If prediction model parameters have not yet been determined before a machining operation, in order for the pre-filtering relative displacement to be used directly as an output of the relative displacement calculation unit 131 without making filtering, the filter parameter setting unit 20 also performs setting to enable or disable the use of the band-pass filter 21. The band-pass filter 21 performs filtering on the pre-filtering relative displacement outputted from the relative displacement operation unit 18, based on the setting of the filter parameter setting unit 20, to remove a component corresponding to noise from the displacement, and outputs it as a relative displacement. The relative displacement outputted by the band-pass filter 21 is set as a relative displacement generated by the relative displacement calculation unit 131.
When the vibration frequency of vibration of a relative displacement is known in advance, the filter parameter setting unit 20 may set the passband of the band-pass filter 21, regardless of the input of prediction model parameters from the model parameter operation unit 14. The manner of setting the passband in the band-pass filter 21 is not particularly limited, and it may be a manner of setting plus or minus some tens of Hz of a predicted frequency as a passband, a manner of additionally setting frequency ranges of half and twice a predicted frequency for a passband, or some such manner, in so far as the manner allows passage of a frequency of a value close to the frequency of vibration of the relative displacement.
According to the numerical control device 81 of the second embodiment, the model parameter operation unit 14 performs optimization processing on a relative displacement outputted from the filtering unit 19 after unnecessary vibration is removed as described above, so that accuracy in changing prediction model parameters is improved. As a result, suppression capability against vibration of the relative displacement can be further improved.
The inertia change information prediction unit 22 acquires inertia information on the workpiece 3 outputted from the drive unit 11 or axis position information outputted from the position command generation unit 17, and outputs inertia change information indicating that a change has occurred in the inertia of the machine tool 1 to the model parameter operation unit 14.
The inertia information on the workpiece 3 is estimated inertia of the workpiece 3 placed on the table 4. As for the estimated inertia of the workpiece 3, it is known that the inertia of the workpiece 3 to be driven can be estimated based on a current that is a drive signal at the time of acceleration or deceleration of the motor and acceleration value. Therefore, the drive unit 11 outputs estimated inertia of the workpiece 3 placed on the table 4 based on a current as a drive signal at the time of acceleration or deceleration of the motor and acceleration value.
The position command generation unit 17 outputs a position command that is movement information on each drive axis of the machine tool 1 based on a machining program. Thus, the position command is outputted as axis position information.
The inertia change information prediction unit 22 stores acquired estimated inertia, and when determining that a change in the estimated inertia has become large, the inertia change information prediction unit 22 recognizes that the inertia of the machine tool 1 has changed and outputs inertia change information. A threshold value for the amount of change in the estimated inertia, which is required for the determination, is preset properly.
The inertia change information prediction unit 22 stores acquired axis position information, and when determining that the axis position information has changed greatly, the inertia change information prediction unit 22 recognizes that the inertia of the machine tool 1 has changed and outputs inertia change information. A threshold value for the amount of change in the position command, which is required for the determination, is preset properly.
Based on the inertia change information acquired from the inertia change information prediction unit 22, the model parameter operation unit 14 determines whether to enable or disable the prediction model parameter change processing. Specifically, when a workpiece 3 having a large weight is placed on the table 4, the inertia of the machine tool 1 changes greatly. Here, the inertia change information is binary information of on or off. The inertia change information prediction unit 22 detects that the inertia of the machine tool 1 has greatly changed, based on estimated inertia acquired from the drive unit 11 after acceleration or deceleration of the motor driving the table 4, and turns the inertia change information on and outputs it. Here, the inertia change information prediction unit 22 stores the acquired estimated inertia when it has detected the great change in the inertia of the machine tool 1. When the inertia change information is turned on, the model parameter operation unit 14 performs the prediction model parameter change processing. After the prediction model parameter change processing is performed, the inertia change information prediction unit 22 turns the inertia change information off.
The prediction model parameter change processing is processing required when the inertia of the machine tool 1 has greatly changed. According to the numerical control device 82 of the third embodiment, the change processing can be performed only when necessary to prevent unnecessary change of the prediction model parameters, so that unnecessary operation cost can be eliminated.
The model parameter operation unit 141 includes a machine learning device 100 that learns prediction model parameters and a decision-making unit 105. The machine learning device 100 includes a state observation unit 101 and a learning unit 102.
The state observation unit 101 observes a relative displacement acquired from the relative displacement calculation unit 13, a relative displacement predicted value acquired from the relative displacement prediction unit 15, and a drive signal acquired from the drive signal measurement unit 12 as state variables.
The learning unit 102 learns prediction model parameters according to a training data set that is produced based on the state variables of the relative displacement, the relative displacement predicted value, and the drive signal.
The learning unit 102 may use any learning algorithm. As an example thereof, a case where reinforcement learning is applied will be described. In the reinforcement learning, an agent (subject of an action) in a certain environment observes a current state and determines an action to take. The agent obtains a reward from the environment by selecting an action, and learns a policy to obtain the most reward through a series of actions. As typical methods of reinforcement learning, Q-learning and TD-learning are known. For example, in the case of Q learning, a typical update equation (action value table) of an action-value function Q(s,a) is expressed by numerical formula (7) below.
[Formula 7]
Q(st,at)←Q(st,at)+α*rt+1+γ maxa Q(st+1,at)−Q(st,at)) (7)
In numerical formula (7), st represents an environment at a time t, and at represents an action at the time t. By the action at, the environment changes to st+1. rt+1 represents a reward given by the environmental change, γ represents a discount factor, and a represents a learning rate. When Q learning is applied, prediction model parameters constitute the action at.
In the update equation represented by numerical formula (7), if the action value of the best action “a” at the time t+1 is larger than the action value Q of the action “a” performed at the time t, the action value Q is increased. If not, the action value Q is reduced. In other words, the action-value function Q(s,a) is updated such that the action value Q of the action a at the time t approaches the best action value at the time t+1. Consequently, the best action value in a certain environment is sequentially propagated to an action value in a previous environment.
The reward calculation unit 103 calculates a reward based on state variables.
Here, the absolute value of a difference between a relative displacement predicted value outputted from the relative displacement prediction unit 15 and a relative displacement outputted from the relative displacement calculation unit 13 is a prediction error of relative displacement. The prediction error of relative displacement is extracted according to a publicly known method. Specifically, the prediction error of relative displacement can be determined by measuring the relative displacement and the relative displacement predicted value after acceleration or deceleration driving of the motor for an axis along which the table 4 with the workpiece 3 having a large weight mounted thereon is driven.
The reward calculation unit 103 calculates a reward r, based on the prediction error of relative displacement. More specifically, when the absolute value of the difference between the vibration frequency of the relative displacement predicted value and the frequency of the relative displacement decreases as a result of changing the prediction model parameters, the reward calculation unit 103 increases the reward r. To increase the reward r, a reward of “1” is given. The value of the reward is not limited to “1”.
When the absolute value of the difference between the amplitude of the relative displacement predicted value and the amplitude of the relative displacement increases as a result of changing the prediction model parameters, the reward calculation unit 103 reduces the reward r. To reduce the reward r, a reward of “−1” is given. The value of the reward is not limited to “−1”.
The function update unit 104 updates the function for determining the prediction model parameters, according to the reward calculated by the reward calculation unit 103. The update of the function can be performed according to the training data set, specifically by updating the action value table. The action value table is a data set in which any given actions and their respective action values are associated and stored in the form of a table. For example, in the case of Q-learning, the action-value function Q(st,at) expressed by numerical formula (7) is used as the function for the prediction model parameters.
First, the state observation unit 101 determines an acceleration ending time or a deceleration ending time, based on a drive signal acquired from the drive signal measurement unit 12 (step S11).
The state observation unit 101 acquires state variables in any given period from the acceleration ending time or the deceleration ending time (step S12). The state variables include a relative displacement, a drive signal, and a relative displacement predicted value. Since the motor is driven after completion of acceleration, the relative displacement may contain unnecessary noise. It is thus desirable to use a relative displacement in a stopped state after completion of deceleration as a state variable.
The reward calculation unit 103 calculates a prediction error of relative displacement that is the absolute value of a difference between the relative displacement predicted value and the relative displacement (step S13).
The reward calculation unit 103 calculates a reward r, based on the prediction error of relative displacement (step S14).
According to the reward r determined in step S14, the function update unit 104 updates the action-value function Q(s,a) according to numerical formula (7) (step S15).
The function update unit 104 determines whether updating is no longer performed in step S15 and the action-value function Q has converged (step S16). When it is determined that the action-value function Q has not converged (step S16: No), the process returns to step S11. When it is determined that the action-value function Q has converged (step S16: Yes), learning by the learning unit 102 is ended. Learning may be continued by returning from step S15 immediately to step S11 without providing step S16.
The decision-making unit 105 selects prediction model parameters to obtain the most reward based on the results of learning of the learning unit 102, that is, the updated action-value function Q(s,a). By acquiring the prediction model parameters from the decision-making unit 105 and correcting a position command, the command value correction unit 16 can suppress vibration generated in a relative displacement in accordance with a change in the inertia of the machine tool 1.
The fourth embodiment has described the case where the learning unit 102 performs machine learning using reinforcement learning. However, the learning unit 102 may perform machine learning according to another publicly known method, a learning algorithm such as a neural network, genetic programming, functional logic programming, or a support vector machine.
The numerical control devices 8 and 81 to 83 according to the first to fourth embodiments are implemented by a computer system such as a personal computer or a general-purpose computer.
The configurations described in the above embodiments illustrate an example of the subject matter of the present invention, and can be combined with other publicly known arts and can be partly omitted and/or modified without departing from the scope of the present invention.
1 machine tool; 2 bed; 3 workpiece; 4 table; 5 tool; 6 head; 7 column; 8, 81 to 83 numerical control device; 9 tool-side displacement measurement unit; 10 workpiece-side displacement measurement unit; 11 drive unit; 12 drive signal measurement unit; 13, 131 relative displacement calculation unit; 14, 141 model parameter operation unit; 15 relative displacement prediction unit; command value correction unit; 17 position command generation unit; 18 relative displacement operation unit; filtering unit; 20 filter parameter setting unit; 21 band-pass filter; 22 inertia change information prediction unit; 100 machine learning device; 101 state observation unit; 102 learning unit; 103 reward calculation unit; 104 function update unit; 105 decision-making unit; 201 CPU; 202 memory; 203 storage device; 204 display device; 205 input device.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2018/025474 | 7/5/2018 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2020/008587 | 1/9/2020 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
4277880 | Utsumi | Jul 1981 | A |
4596066 | Inoue | Jun 1986 | A |
5341079 | Matsuura | Aug 1994 | A |
5432422 | Nagano et al. | Jul 1995 | A |
5523953 | Araie | Jun 1996 | A |
5619414 | Ishii | Apr 1997 | A |
5779405 | Aiso | Jul 1998 | A |
7082349 | Kawai | Jul 2006 | B2 |
7205743 | Iwashita et al. | Apr 2007 | B2 |
8093856 | Miyaji | Jan 2012 | B2 |
8682456 | Kimura | Mar 2014 | B2 |
9317029 | Morfino | Apr 2016 | B2 |
10108177 | Fujita | Oct 2018 | B2 |
20090222109 | Takagi | Sep 2009 | A1 |
20190163161 | Sonoda | May 2019 | A1 |
20190302729 | Azuma | Oct 2019 | A1 |
Number | Date | Country |
---|---|---|
4-340105 | Nov 1992 | JP |
6-113579 | Apr 1994 | JP |
3304484 | Jul 2002 | JP |
2006-198742 | Aug 2006 | JP |
4283214 | Jun 2009 | JP |
2009-205641 | Sep 2009 | JP |
6180688 | Aug 2017 | JP |
2018105085 | Jun 2018 | WO |
Entry |
---|
International Search Report and Written Opinion of the International Searching Authority dated Oct. 2, 2018 for PCT/JP2018/025474 filed on Jul. 5, 2018, 10 pages including English Translations. |
Number | Date | Country | |
---|---|---|---|
20200012253 A1 | Jan 2020 | US |