MACHINE LEARNING DEVICE AND THERMAL DISPLACEMENT COMPENSATION DEVICE
20180276570 ยท 2018-09-27
Inventors
Cpc classification
G05B19/404
PHYSICS
G05B19/182
PHYSICS
G05B2219/49209
PHYSICS
G05B2219/49307
PHYSICS
G05B2219/49206
PHYSICS
International classification
G06N99/00
PHYSICS
Abstract
A calculation formula learning unit sets a coefficient relating to a time lag element in a thermal displacement estimation calculation formula by machine learning while fixing a coefficient relating to measured data except the coefficient relating to the time lag element at a predetermined value based on a difference between a thermal displacement estimated value about a machine element calculated by substituting a measured data group into the thermal displacement estimation calculation formula and a thermal displacement actual measured value about the machine element; sets the coefficient relating to the measured data except the coefficient relating to the time lag element in the thermal displacement estimation calculation formula by machine learning based on the difference while fixing the coefficient relating to the time lag element at a predetermined value; and repeats the machine learning.
Claims
1. A machine learning device that optimizes, by machine learning, a calculation formula used for estimating the thermal displacement of a machine element to be thermally expanded in a machine tool based on a measured data group containing temperature data about the machine element and its surroundings and/or operating state data about the machine element, the machine learning device comprising: a measured data acquisition unit that acquires the measured data group; a thermal displacement acquisition unit that acquires a thermal displacement actual measured value about the machine element; a storage unit that uses the measured data group acquired by the measured data acquisition unit as input data, uses the thermal displacement actual measured value about the machine element acquired by the thermal displacement acquisition unit as a label, and stores the input data and the label in association with each other as teaching data; and a calculation formula learning unit that performs machine learning based on the measured data group and the thermal displacement actual measured value about the machine element, thereby setting a thermal displacement estimation calculation formula used for calculating the thermal displacement of the machine element based on the measured data group, wherein the thermal displacement estimation calculation formula uses a time lag element in measured data, and the calculation formula learning unit comprises: a first learning unit that sets a coefficient relating to the time lag element in the thermal displacement estimation calculation formula by machine learning while fixing a coefficient relating to the measured data except the coefficient relating to the time lag element at a predetermined value based on a difference between a thermal displacement estimated value about the machine element calculated by substituting the measured data group stored as the teaching data in the storage unit into the thermal displacement estimation calculation formula and the thermal displacement actual measured value about the machine element stored as the label in the storage unit; a second learning unit that sets the coefficient relating to the measured data except the coefficient relating to the time lag element in the thermal displacement estimation calculation formula by machine learning based on the difference while fixing the coefficient relating to the time lag element at a predetermined value; and a repetition unit that repeats machine learning by the first learning unit and machine learning by the second learning unit in such a manner that the second learning unit performs the machine learning while fixing the coefficient relating to the time lag element in the thermal displacement estimation calculation formula set by the machine learning by the first learning unit, and that the first learning unit performs the machine learning while fixing the coefficient relating to the measured data except the coefficient relating to the time lag element in the thermal displacement estimation calculation formula set by the machine learning by the second learning unit.
2. The machine learning device according to claim 1, wherein the measured data acquisition unit further acquires a second measured data group by adding measured data to the measured data group and/or by excluding measured data from the measured data group, the measured data acquisition unit stores the second measured data group as input data into the storage unit, and the calculation formula learning unit further sets a second thermal displacement estimation calculation formula used for calculating the thermal displacement of the machine element based on the second measured data group.
3. The machine learning device according to claim 1, wherein the time lag element is a first-order lag element in measured data in the measured data group.
4. The machine learning device according to claim 1, wherein the time lag element is a time shift element in measured data in the measured data group.
5. The machine learning device according to claim 1, wherein the second learning unit performs the machine learning of the thermal displacement estimation calculation formula set based on a multiple regression analysis model.
6. The machine learning device according to claim 1, wherein the machine learning device is incorporated in a controller for the machine tool.
7. A thermal displacement compensation device for a machine tool, comprising: a compensation value calculation unit, wherein, based on the thermal displacement estimation calculation formula set by the machine learning device according to claim 1, the compensation value calculation unit calculates a compensation value corresponding to the thermal displacement of the machine element calculated from the measured data group; and a compensation unit that compensates the machine position of the machine element based on the compensation value about the machine element calculated by the compensation value calculation unit.
8. The thermal displacement compensation device according to claim 7, wherein the thermal displacement compensation device is incorporated in a controller for the machine tool.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
DETAILED DESCRIPTION OF THE INVENTION
First Embodiment
[0030] A first embodiment of the present invention will be described below based on the drawings.
<Configuration of Thermal Displacement Compensation System 100>
[0031] The configuration of a thermal displacement compensation system 100 according to this embodiment is described first. As shown in
[0032] One controller 30 and one machine tool 35 form a pair and are connected in a manner that allows communication therebetween. Multiple pairs each including one controller 30 and one machine tool 35 may be installed in the same factory or different factories, for example.
[0033] The machine learning device 10, the thermal displacement compensation device 20, the controller 30, and the machine tool 35 are connected to the network 40 and are allowed to communicate with each other through the network 40. For example, the network 40 is a local area network (LAN) constructed in a factory, the Internet, a public telephone network, or a combination of these networks. There is no particular limitation on the communication through the network 40 in terms of a specific communication system or in terms of whether the communication is established via wires or without wires. The thermal displacement compensation device 20 and the controller 30 may not be configured to communicate with each other using the network 40 but may be configured to be directly connected through a connection unit. The machine learning device 10 and the controller 30 may be directly connected through a connection unit.
[0034] The functions of these devices in the thermal displacement compensation system 100 will be described next based on
[0035] As shown in
[0036] As shown in
[0037] As shown in
[0038] The measured data acquisition unit 11 acquires a measured data group from the controller 30. The measured data mentioned herein may contain temperature data about a machine element in the machine tool 35 and its surroundings measured by a temperature sensor. The measured data may also contain operating state data about a machine element in the machine tool 35, more specifically, a physical value such as a spindle speed, the flow rate of a coolant to the spindle, or the amount of a lubrication oil to the spindle bearing in the machine tool 35 measured at a place where a temperature sensor cannot be attached, for example.
[0039] The thermal displacement acquisition unit 12 acquires a thermal displacement actual measured value about a machine element in the machine tool 35 measured with a probe, for example.
[0040] The storage unit 13 uses the measured data group acquired by the measured data acquisition unit 11 as input data, uses the thermal displacement actual measured value about the machine element acquired by the thermal displacement acquisition unit 12 as a label, and stores the input data and the label in association with each other as teaching data.
[0041] The calculation formula learning unit 14 performs machine learning based on the measured data group and the thermal displacement actual measured value about the machine element, thereby setting a thermal displacement estimation calculation formula used for calculating the thermal displacement of the machine element based on the measured data group. The thermal displacement estimation calculation formula is formulated by giving consideration to a time lag element in measured data. More specifically, due to the presence of multiple independent variables in the measured data group, a thermal displacement estimation calculation formula to be used is formulated by adding a time lag element in measured data to a polynomial set based on multiple regression analysis of a generalized linear model, for example. For example, the time lag element may be a first-order lag element in measured data or a time shift element in the measured data.
[0042] Assuming that a thermal displacement estimated value at time t is Y(t) and a measured value from a sensor X.sub.k at the time t is X.sub.k(t), a thermal displacement estimation calculation formula using a first-order lag element in measured data as a time lag element is expressed by the following formula (1):
[Formula 1]
Y(t)=.sub.k=1a.sub.k(.sub.=0.sup.T.sup.
In this formula, a.sub.1, a.sub.2, . . . , a.sub.n are coefficients determined by multiple regression analysis, and b.sub.1, b.sub.2, . . . , b.sub.n and T.sub.k are coefficients corresponding to lags. Further, t.sub.k is sampling time of a measured value from the sensor X.sub.k.
[0043] Assuming that a thermal displacement estimated value at the time t is Y(t) and a measured value from the sensor X.sub.k at the time t is X.sub.k(t), a thermal displacement estimation calculation formula using a time shift element in measured data as a time lag element is expressed by the following formula (2):
[Formula 2]
Y(t)=.sub.k=1.sup.na.sub.k(.sub.=0.sup.T.sup.
[0044] In this formula, a.sub.0, a.sub.1, . . . , a.sub.n are coefficients determined by multiple regression analysis, and T.sub.k and b.sub.k0, b.sub.k1, . . . , b.sub.kTk are coefficients corresponding to lags. Further, t.sub.k is sampling time of a measured value from the sensor X.sub.k.
[0045] The calculation formula learning unit 14 sets a thermal displacement estimation calculation formula to be obtained. Based on a difference between a thermal displacement estimated value about the machine element calculated by substituting the measured data group in a predetermined period stored as teaching data in the storage unit 13 into the thermal displacement estimation calculation formula and the thermal displacement actual measured value about the machine element in the predetermined period stored as a label in the storage unit 13, the calculation formula learning unit 14 sets the thermal displacement estimation calculation formula so as to minimize this difference by the least-square method, for example. More specifically, on the assumption that measured data (input data) is X.sub.1, X.sub.2, . . . , X.sub.n, a thermal displacement estimated value about each component forming the machine tool 35 such as a spindle, a bed, or a column is f (X.sub.1, X.sub.2, . . . , X.sub.n) (n is a natural number), and a thermal displacement actual measured value is Y.sub.L, the calculation formula learning unit 14 sets the thermal displacement estimation calculation formula that minimizes a difference between f (X.sub.1, X.sub.2, . . . , X.sub.n) and Y.sub.L.
[0046]
[0047] On the assumption that measured data (input data) is X.sub.1, X.sub.2, . . . , X.sub.n, a thermal displacement estimated value about each component forming the machine tool 35 such as a spindle, a bed, or a column is f (X.sub.1, X.sub.2, . . . , X.sub.n) (n is a natural number), and a thermal displacement actual measured value is Y.sub.L, the first learning unit 14A sets a coefficient relating to a time lag element in a thermal displacement estimation calculation formula by machine learning while fixing a coefficient relating to measured data except the coefficient relating to the time lag element at a predetermined value so as to minimize a difference between f (X.sub.1, X.sub.2, . . . , X.sub.n) and Y.sub.L.
[0048] On the assumption that measured data (input data) is X.sub.1, X.sub.2, . . . , X.sub.n, a thermal displacement estimated value about each component forming the machine tool 35 such as a spindle, a bed, or a column is f (X.sub.1, X.sub.2, . . . , X.sub.n) (n is a natural number), and a thermal displacement actual measured value is Y.sub.L, the second learning unit 14B sets the coefficient relating to the measured data except the coefficient relating to the time lag element in the thermal displacement estimation calculation formula by machine learning while fixing the coefficient relating to the time lag element at a predetermined value so as to minimize a difference between f (X.sub.1, X.sub.2, . . . , X.sub.n) and Y.sub.L. The machine learning will be described in detail later.
[0049] The repetition unit 14C repeats the machine learning by the first learning unit 14A and the machine learning by the second learning unit 14B. More specifically, in a thermal displacement estimation calculation formula initially set, for example, the repetition unit 14C fixes the coefficient relating to the measured data except the coefficient relating to the time lag element in the thermal displacement estimation calculation formula. Then, the repetition unit 14C makes the first learning unit 14A perform the machine learning, thereby temporarily setting the coefficient relating to the time lag element in the thermal displacement estimation calculation formula. Next, in a thermal displacement estimation calculation formula temporarily set in this way, the repetition unit 14C fixes the coefficient relating to the time lag element in the thermal displacement estimation calculation formula. Then, the repetition unit 14C makes the second learning unit 14B perform the machine learning. As a result of the machine learning by the second learning unit 14B, the coefficient relating to the measured data except the coefficient relating to the time lag element in the thermal displacement estimation calculation formula is set temporarily. In a thermal displacement estimation calculation formula temporarily set in this way, the repetition unit 14C again fixes the coefficient relating to the measured data except the coefficient relating to the time lag element in the thermal displacement estimation calculation formula. Then, the repetition unit 14C makes the first learning unit 14A perform the machine learning. In this way, the repetition unit 14C repeats the machine learning by the first learning unit 14A and the machine learning by the second learning unit 14B. The repetition unit 14C finishes this repeat if a predetermined condition for the finish is satisfied. The finish condition may be satisfied if an error between a thermal displacement estimated value calculated using a thermal displacement estimation calculation formula temporarily set at that point and a thermal displacement actual measured value becomes a threshold or less and the accuracy of this thermal displacement estimation calculation formula becomes a predetermined value or more, for example. In this way, even in the case of a complicated thermal displacement estimation calculation formula, the calculation formula learning unit 14 repeats the machine learning by the first learning unit 14A and the machine learning by the second learning unit 14B. This makes it possible to reduce the number of calculations to be made simultaneously to allow installation of the calculation formula learning unit 14 on a relatively inexpensive device.
[0050] As shown in
<Operation of Machine Learning>
[0051] The operation of machine learning in the thermal displacement compensation system 100 according to this embodiment will be described next.
[0052] In step S11, the measured data acquisition unit 11 of the machine learning device 10 acquires a measured data group from the controller 30. More specifically, the measured data acquisition unit 11 acquires temperature data about a machine element in the machine tool 35 and its surroundings and/or operating state data. The operating state data may contain a spindle speed, the flow rate of a coolant, and the flow rate of a lubrication oil, for example. The measured data to be acquired may not be data about a temperature itself but may be data about a temperature change, for example. The data about a temperature change to be acquired may be data about a temperature change from an initial temperature or may be data about a temperature change from a previously measured temperature to a currently measured temperature. The operating state data may also contain the amount of heat absorbed by a coolant or the amount of heat absorbed by a lubrication oil.
[0053] In step S12, the thermal displacement acquisition unit 12 of the machine learning device 10 acquires a thermal displacement actual measured value about the machine element in the machine tool 35 measured with a probe, for example. As a specific example, the thermal displacement acquisition unit 12 may measure a component in an X-axis direction, a component in a Y-axis direction, and a component in a Z-axis direction of the thermal displacement, and acquire a group of resultant measured values as the actual measured value.
[0054] In step S13, the storage unit 13 of the machine learning device 10 uses the measured data group acquired by the measured data acquisition unit 11 as input data, uses the thermal displacement actual measured value about the machine element acquired by the thermal displacement acquisition unit 12 as a label, and stores the input data and the label in a pair associated with each other as teaching data. The machine learning device 10 is capable of continuously acquiring the teaching data online and then performing machine learning described later. The machine learning device 10 is also capable of acquiring every teaching data in advance as batch data and then performing the machine learning described later using the acquired batch data. The machine learning device 10 is also capable of acquiring mini batch data by dividing this batch data into small groups and then performing the machine learning described later using the mini batch data.
[0055] In step S14, the calculation formula learning unit 14 of the machine learning device 10 performs machine learning based on the teaching data. Step S14 will be described in detail later.
[0056] In step S15, the calculation formula learning unit 14 of the machine learning device 10 determines whether to finish the machine learning or to repeat the machine learning. As described above, a condition for finishing the machine learning can be determined arbitrarily. If the machining learning is determined to be finished (S15: YES), the flow goes to step S16. If the machining learning is determined to be repeated (S15: NO), the flow returns to step S11 and the same processing is repeated.
[0057] In step S16, the machine learning device 10 transmits a thermal displacement estimation calculation formula set by the machine learning having been performed before step S16 to each thermal displacement compensation device 20 through the network 40.
[0058] The storage unit 13 of the machine learning device 10 stores the thermal displacement estimation calculation formula. By doing so, if a thermal displacement estimation calculation formula is requested from a newly installed thermal displacement compensation device 20, the stored thermal displacement estimation calculation formula can be transmitted to this new thermal displacement compensation device 20. If new teaching data is acquired, further machine learning can be performed with the new teaching data.
<Detail of Machine Learning Method>
[0059] As described above, in step S14 of
[0060] As a first method, a coefficient that minimizes a square error between a thermal displacement estimated value and a thermal displacement actual measured value can be inferred and set by machine learning using the least-square method. This thermal displacement estimated value is calculated using the formula (1), specifically, a thermal displacement estimation calculation formula using a first-order lag element in measured data.
[0061] More specifically, assuming that measured data is X.sub.k and a label is Y.sub.L,
[0062] a group of a coefficient a.sub.k, a coefficient b.sub.k, and a coefficient T.sub.k is determined that minimizes a total of values about multiple teaching data pieces obtained from the following formula 3. In this formula, n is a natural number and means the number of measurement points of teaching data used for learning.
[Formula 3]
(Y.sub.LY(t)).sup.2=(Y.sub.L.sub.k=1.sup.na.sub.k(.sub.=0.sup.T.sup.
[0063] As a second method, a coefficient that minimizes a square error between a thermal displacement estimated value and a thermal displacement actual measured value can be inferred and set by machine learning using the least-square method. This thermal displacement estimated value is calculated using the formula (2), specifically, a thermal displacement estimation calculation formula using a time shift element in measured data.
[0064] More specifically, assuming that measured data is X.sub.k and a label is Y.sub.L,
a group of a coefficient a.sub.k, a coefficient b.sub.k, and a coefficient T.sub.k is determined that minimizes a total of values about multiple teaching data pieces obtained from the following formula 4. In this formula, n is a natural number and means the number of measurement points of teaching data used for learning.
[Formula 4]
(Y.sub.LY(t)).sup.2=(Y.sub.L.sub.k=1.sup.na.sub.k(.sub.=0.sup.T.sup.
[0065] Regarding a.sub.k, b.sub.k, and T.sub.k in the formula (1) according to the first method, a group of a.sub.k, b.sub.k, and T.sub.k is determined by repeating setting of the parameters b.sub.k and T.sub.k relating to time by machine learning while fixing the parameter a.sub.k not relating to time, and setting of the parameter a.sub.k not relating to time by machine learning while fixing the parameters b.sub.k and t.sub.k relating to time.
[0066] In step S14A, the first learning unit 14A sets b.sub.k and T.sub.k by machine learning using teaching data while fixing only a.sub.k.
[0067] In step S14B, the repetition unit 14C switches the subject of machine learning to the second learning unit 14B. Then, the second learning unit 14B sets only a.sub.k by machine learning using teaching data while fixing b.sub.k and T.sub.k at values set in step S14A.
[0068] In step S14C, if an error between a thermal displacement estimated value calculated using a thermal displacement estimation formula using a.sub.k, b.sub.k, and T.sub.k set at that point and a thermal displacement actual measured value is a threshold or less (S14C: YES), specifically, if the accuracy of the thermal displacement estimation formula at that point becomes a predetermined value or more, the flow is finished. If this error exceeds the threshold (S14C: NO), the flow returns to step S14A. More specifically, in step S14A, the repetition unit 14C switches the subject of machine learning to the first learning unit 14A. Then, the first learning unit 14A sets b.sub.k and T.sub.k by machine learning while fixing only a.sub.k at a value set in step S14B.
[0069] Regarding a.sub.k, b.sub.k, and T.sub.k in the formula (2) according to the second method, a.sub.k, b.sub.k, and T.sub.k are determined by repeating setting of the parameters b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k relating to time by machine learning while fixing the parameter a.sub.k not relating to time, and setting of the parameter a.sub.k not relating to time by machine learning while fixing the parameters b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k relating to time.
[0070] In step S14D, the first learning unit 14A sets b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k by machine learning using teaching data while fixing a.sub.k.
[0071] In step S14E, the repetition unit 14C switches the subject of machine learning to the second learning unit 14B. Then, the second learning unit 14B sets only a.sub.k by machine learning using teaching data while fixing b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k at values set in step S14D.
[0072] In step S14F, if an error between a thermal displacement estimated value calculated using a thermal displacement estimation formula using a.sub.k, b.sub.k, and T.sub.k set at that point and a thermal displacement actual measured value is a threshold or less (S14F: YES), specifically, if the accuracy of the thermal displacement estimation formula at that point becomes a predetermined value or more, the flow is finished. If this error exceeds the threshold (S14F: NO), the flow returns to step S14D. More specifically, in step S14D, the repetition unit 14C switches the subject of machine learning to the first learning unit 14A. Then, the first learning unit 14A sets b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k by machine learning while fixing a.sub.k at a value set in step S14E.
<Operation of Compensation>
[0073] The operation of compensation in the thermal displacement compensation system 100 according to this embodiment will be described next.
[0074] In step S21, based on a thermal displacement estimation calculation formula set by the machine learning device 10, the compensation value calculation unit 22 calculates a compensation value corresponding to the thermal displacement of a machine element calculated from a measured data group.
[0075] In step S22, the compensation unit 24 compensates the machine position of the machine element based on the compensation value about the machine element calculated by the compensation value calculation unit 22, thereby offsetting the thermal displacement. Unlike the illustration in
Effect Achieved by First Embodiment
[0076] As described above, in this embodiment, machine learning is divided by learning by the first learning unit and learning by the second learning unit. The first learning unit sets a coefficient relating to a time lag element. The second learning unit sets a coefficient relating to measured data except the coefficient relating to the time lag element. By doing so, a highly accurate compensation formula can be derived using a small number of calculations.
[0077] In this embodiment, if a sensor is added or the position of the sensor is changed, a measurement result obtained from this addition or position change is added to a thermal displacement estimation calculation formula and a variable in a compensation formula based on this thermal displacement estimation calculation formula. Then, machine learning is performed to automatically determine a thermal displacement estimation calculation formula and a compensation formula, thereby increasing accuracy in a simple way.
[0078] In this embodiment, the aforementioned time lag element can be a first-order lag element in measured data in a measured data group. This allows compensation by giving consideration to time for heat measured by a temperature sensor to be transferred and to cause thermal expansion.
[0079] In this embodiment, the aforementioned time lag element can be a time shift element in measured data in a measured data group. This allows compensation by giving consideration to time for heat measured by the temperature sensor to be transferred and to cause thermal expansion.
[0080] In this embodiment, a thermal displacement estimation calculation formula can be set based on a multiple regression analysis model. Using multiple variables in the multiple regression analysis model allows setting of a easily-available and precise thermal displacement estimation calculation formula.
[0081] In this embodiment, the aforementioned machine learning device can be incorporated in the controller 30 for the machine tool 35. By doing so, a single inexpensive controller becomes available for realizing compensation based on a highly accurate thermal displacement estimation calculation formula.
[0082] The thermal displacement compensation device 20 of this embodiment performs compensation based on a thermal displacement estimation calculation formula set by the aforementioned machine learning device 10. This allows implementation of highly accurate compensation.
[0083] In this embodiment, the aforementioned machine learning device 10 can be incorporated in the thermal displacement compensation device 20. By doing so, a single inexpensive thermal displacement compensation device becomes available for deriving a highly accurate compensation formula using a small number of calculations, thereby realizing highly accurate compensation.
[0084] A thermal displacement estimation calculation formula and a compensation formula based on the thermal displacement estimation calculation formula can be provided with increased accuracy by means of tuning in response to the operating environment of the machine tool 35 or the type of the machine tool 35.
Second Embodiment
[0085] The configuration of a machine learning device 10A according to a second embodiment is the same as that of the machine learning device 10 according to the first embodiment. Thus, the configuration of the machine learning device 10A and the function of a component in the machine learning device 10A will not be described.
[0086] In the first embodiment, regarding a.sub.k, b.sub.k, and T.sub.k in the formula (1), setting of b.sub.k and T.sub.k by machine learning with a.sub.k being fixed, and setting of a.sub.k by machine learning with b.sub.k and T.sub.k being fixed are repeated. Using a pair of a.sub.k, b.sub.k and T.sub.k at a time when an error between a thermal displacement estimated value calculated using a thermal displacement estimation formula and a thermal displacement actual measured value becomes a threshold or less, the thermal displacement estimation formula is determined. Regarding a.sub.k, b.sub.k, and T.sub.k in the formula (2), setting of b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k by machine learning with a.sub.k being fixed, and setting of a.sub.k by machine learning with b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k being fixed are repeated. Using a group of a.sub.k, b.sub.k, and T.sub.k at a time when an error between a thermal displacement estimated value calculated using a thermal displacement estimation formula and a thermal displacement actual measured value becomes a threshold or less, the thermal displacement estimation formula is determined. In the second embodiment, regarding a.sub.k, b.sub.k, and T.sub.k in the formula (1), repeat of the setting of b.sub.k and T.sub.k by machine learning with a.sub.k being fixed and the setting of a.sub.k by machine learning with b.sub.k and T.sub.k being fixed is finished on condition that the number of times this repeat is made reaches a predetermined value. Using a group of a.sub.k, b.sub.k, and T.sub.k at a time when this condition is satisfied, a thermal displacement estimation formula is determined.
[0087] In step S14G, a repeat count j is set at an initial value 0.
[0088] In step S14H, the first learning unit 14A sets b.sub.k and T.sub.k by machine learning using teaching data while fixing only a.sub.k.
[0089] In step S14I, the repetition unit 14C switches the subject of machine learning to the second learning unit 14B. Then, the second learning unit 14B sets only a.sub.k by machine learning using teaching data while fixing b.sub.k and T.sub.k at values set in step S14H.
[0090] In step S14J, j is incremented by one.
[0091] In step S14K, if j reaches a predetermined value (S14K: YES), specifically, if step S14H and step S14I have been repeated a predetermined number of times, the flow is finished. If j does not reach the predetermined value (S14K: NO), specifically, if step S14H and step S14I have not been repeated the predetermined number of times, the flow returns to step S14H. More specifically, in step S14H, the repetition unit 14C switches the subject of machine learning to the first learning unit 14A. Then, the first learning unit 14A sets b.sub.k and T.sub.k by machine learning while fixing a.sub.k at a value set in step S14I.
[0092] Regarding a.sub.k, b.sub.k, and T.sub.k in the formula (2), repeat of the setting of b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k by machine learning with only a.sub.k being fixed and the setting only of a.sub.k by machine learning with b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k being fixed is finished on condition that the number of times this repeat is made reaches a predetermined value. Using a group of at, b r, and T.sub.k at a time when this condition is satisfied, a thermal displacement estimation formula is determined.
[0093] In step S14L, the repeat count j is set at an initial value 0.
[0094] In step S14M, the first learning unit 14A sets b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k by machine learning using teaching data while fixing a.sub.k.
[0095] In step S14N, the repetition unit 14C switches the subject of machine learning to the second learning unit 14B. Then, the second learning unit 14B sets only a.sub.k by machine learning using teaching data while fixing b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k at values set in step S14M.
[0096] In step S14O, j is incremented by one.
[0097] In step S14P, if j reaches a predetermined value (S14P: YES), specifically, if step S14M and step S14N have been repeated a predetermined number of times, the flow is finished. If j does not reach the predetermined value (S14P: NO), specifically, if step S14M and step S14N have not been repeated the predetermined number of times, the flow returns to step S14M. More specifically, in step S14M, the repetition unit 14C switches the subject of machine learning to the first learning unit 14A. Then, the first learning unit 14A sets b.sub.k0, b.sub.k1, . . . , b.sub.kTk and T.sub.k by machine learning while fixing only a.sub.k at a value set in step S14N.
Effect Achieved by Second Embodiment
[0098] As described above, the second embodiment achieves an effect comparable to that achieved by the first embodiment.
Other Embodiments
[0099] While the foregoing embodiments are preferred embodiments of the present invention, these embodiments do not limit the scope of the present invention. The present invention is feasible as embodiments to which various changes are added within a range not deviating from the substance of the present invention.
[0100] [First Modification]
[0101] In the embodiments, a thermal displacement estimation calculation formula is described as a polynomial formulated based on multiple regression analysis of a generalized linear model. However, this is not the only case but the thermal displacement estimation calculation formula may be formulated based on multiple regression analysis of a non-linear model.
[0102] [Second Modification]
[0103] A configuration may also be such that, if the degree of accuracy of a thermal displacement estimation calculation formula set as a result of machine learning is less than a threshold, a measured data group is optimized by adding measured data and/or by excluding measured data. If a sensor is added and/or a sensor is excluded by a maintenance operator or an end user of a machine tool, the accuracy of thermal displacement compensation is increased by means of automatic tuning of a compensation formula based on a thermal displacement estimation calculation formula. In order to increase the accuracy of thermal displacement compensation, for example, machine learning may be performed using a measured data group obtained by changing the position of a temperature sensor, for example. In this case, a determination can also be made as to whether accuracy is increased, for example, by evaluating a difference between an error between a thermal displacement estimated value calculated using a thermal displacement estimation formula obtained after the position change and a thermal displacement actual measured value, and an error between a thermal displacement estimated value calculated using a thermal displacement compensation formula obtained based on machine learning using a measured data group before the position change and a thermal displacement actual measured value.
[0104] [Third Modification]
[0105] In the foregoing embodiments, the machine tool 35 is described as a cutting machine. However, the machine tool 35 is not limited to the cutting machine. The machine tool 35 may also be a wire discharge machine or a laser machine, for example.
[0106] [Fourth Modification]
[0107] The controller 30 may be configured to include the thermal displacement compensation device 20. The controller 30 may alternatively be configured to include the machine learning device 10.
[0108] [Fifth Modification]
[0109] Each of the machine learning devices 10 and 10A in the foregoing embodiments may be configured as a computer system including a CPU. In this case, the CPU reads a program from a storage unit such as a ROM, for example, and follows the read program, thereby causing the computer to function as the measured data acquisition unit 11, the thermal displacement acquisition unit 12, the storage unit 13, and the calculation formula learning unit 14.
EXPLANATION OF REFERENCE NUMERALS
[0110] 10 10A Machine learning device [0111] 11 Measured data acquisition unit [0112] 12 Thermal displacement acquisition unit [0113] 13 Storage unit [0114] 14 Calculation formula learning unit [0115] 14A First learning unit [0116] 14B Second learning unit [0117] 14C Repetition unit [0118] 20 Thermal displacement compensation device [0119] 22 Compensation value calculation unit [0120] 24 Compensation unit [0121] 30 Controller [0122] 35 Machine tool [0123] 40 Network [0124] 100 Thermal displacement compensation system