WO2020090030A1 - Numerical control device, learning device, and learning method - Google Patents

Numerical control device, learning device, and learning method Download PDF

Info

Publication number
WO2020090030A1
WO2020090030A1 PCT/JP2018/040500 JP2018040500W WO2020090030A1 WO 2020090030 A1 WO2020090030 A1 WO 2020090030A1 JP 2018040500 W JP2018040500 W JP 2018040500W WO 2020090030 A1 WO2020090030 A1 WO 2020090030A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
machine tool
learning
temperature
thermal displacement
Prior art date
Application number
PCT/JP2018/040500
Other languages
French (fr)
Japanese (ja)
Inventor
一樹 高幣
佐藤 剛
俊博 東
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to CN201880098973.XA priority Critical patent/CN112912803A/en
Priority to DE112018008027.7T priority patent/DE112018008027T5/en
Priority to JP2019516736A priority patent/JP6556413B1/en
Priority to PCT/JP2018/040500 priority patent/WO2020090030A1/en
Publication of WO2020090030A1 publication Critical patent/WO2020090030A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/404Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by control arrangements for compensation, e.g. for backlash, overshoot, tool offset, tool wear, temperature, machine construction errors, load, inertia
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/0265Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric the criterion being a learning criterion
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/33Director till display
    • G05B2219/33034Online learning, training
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/49Nc machine tool, till multiple
    • G05B2219/49219Compensation temperature, thermal displacement

Definitions

  • the present invention relates to a numerical control device, a learning device, and a learning method for estimating a thermal displacement amount of a machine tool.
  • Machine tools are processing devices that perform removal processing and bending processing by applying force or energy to the work using tools.
  • Machine tools generally have multiple drive shafts.
  • the drive shaft is composed of, for example, a motor and one or more structures connected to the motor.
  • a machine tool includes a main shaft that is a drive shaft for rotating a tool or a work, and a feed shaft that is a drive shaft that positions a relative position between the tool and the work.
  • Each drive shaft of the machine tool is controlled by a numerical controller.
  • the numerical control device instructs the relative position of the tool with respect to the work to the drive shaft, and the drive shaft operates based on the command, whereby the tool and the work come into contact with each other and machining is realized.
  • thermal displacement occurs between the tool and the workpiece.
  • Thermal displacement is an error in machine position caused by changes in temperature of a machine tool. Examples of typical factors that give a temperature change to a machine tool include a change in ambient temperature of the machine tool and heat generation of a motor. Due to these factors, if the temperature distribution of the structure including the column and the spindle head becomes uneven, the structure is distorted, and the parallelism and squareness of the machine tool decrease. Further, the main shaft shaft, the ball screw, and the like expand due to temperature changes, causing thermal displacement.
  • ⁇ Thermal displacement causes machining error.
  • measures for suppressing the thermal displacement of the machine tool there are measures such as installing the machine tool in a temperature-controlled room so as not to change the temperature of the machine tool, or providing the machine tool with a cooling device. By taking these measures, the temperature of the machine tool can be kept constant irrespective of the inside and outside conditions of the machine tool, but it is necessary to prepare a temperature-controlled room for the machine tool or cooling by a cooling device. If there is a structure that requires, there is a problem that the thermal displacement due to thermal deformation of the structure cooled by the cooling device cannot be prevented.
  • Patent Document 1 a calculation formula representing the relationship between the operation state data of the machine tool and the thermal displacement amount is learned, the thermal displacement amount is calculated using this calculation formula and the operation state data, and the calculated thermal displacement amount is calculated. There has been proposed a technique for correcting the machine position of a machine tool using.
  • the amount of thermal displacement is calculated by repeatedly learning calculation formulas for various operating states and summing the amount of thermal displacement estimated in sampling time units within a predetermined period.
  • the operation state data in a unit of a constant period is always used as the learning data without being synchronized with the operation of the machine tool. If data with different trends of displacement amount with time is included, learning will not be performed correctly.
  • the tendency of temperature change inside and outside the machine tool that affects thermal displacement also changes.
  • the tendency of temperature change inside and outside the machine tool that affects the thermal displacement is referred to as a thermal tendency.
  • Specific examples of the change in the condition that causes the change in the thermal tendency include the case where the motor changes from the rotating state to the stationary state, the case where the coolant for cooling changes from the discharge state to the stop state, and the like.
  • the present invention has been made in view of the above, and an object of the present invention is to obtain a numerical control device capable of accurately learning the relationship between temperature and thermal displacement.
  • a numerical control device for controlling a machine tool, wherein the numerical control device has a relationship between a temperature of the machine tool and a thermal displacement amount of the machine tool.
  • the first time length which is the time length of the learning data used for learning, is determined based on the operation data indicating the content of the operation operation of the machine tool, and the machine tool of the machine tool is determined based on the determined first time length.
  • a data generation unit that generates learning data including temperature data indicating temperature, displacement data indicating displacement of the machine tool, and operation data.
  • the numerical controller further includes a learning unit that uses the learning data to learn the relationship between the temperature of the machine tool and the amount of thermal displacement of the machine tool to generate a learning model.
  • the numerical control device has the effect of being able to accurately learn the relationship between temperature and thermal displacement.
  • Block diagram showing a configuration example of an embodiment of a numerical control device according to the present invention Diagram showing a configuration example of a machine tool Diagram showing a configuration example of the processing circuit Diagram showing changes in the state of typical machine elements that affect the thermal tendency of machine tools
  • Neural network model diagram Flowchart showing an example of a learning processing procedure in the numerical control device Flowchart showing an example of the procedure for estimating the thermal displacement amount in the numerical control device
  • a numerical control device, a learning device, and a learning method according to an embodiment of the present invention will be described below in detail with reference to the drawings.
  • the present invention is not limited to this embodiment.
  • FIG. 1 is a block diagram showing a configuration example of an embodiment of a numerical controller according to the present invention.
  • the numerical control device 1 of the present embodiment can be connected to the machine tool 2.
  • FIG. 1 shows a state in which the numerical control device 1 is connected to the machine tool 2.
  • the numerical controller 1 controls the machine tool 2 based on the machining program 3.
  • the machining program 3 is a series of command statements given to the numerical controller 1 for the machine tool 2 to execute a desired operation.
  • FIG. 1 shows an example in which the machining program 3 is given from the outside of the numerical controller 1, the present invention is not limited to this, and the machining program may be held inside the numerical controller 1.
  • FIG. 2 is a diagram showing a configuration example of the machine tool 2.
  • the machine tool 2 is a processing device that performs cutting
  • the machine tool 2 to which the learning method of the present embodiment is applied is not limited to a processing device that performs cutting.
  • the number of drive shafts of the machine tool 2 is not limited to the example shown in FIG.
  • the machine tool 2 includes a main shaft 21, feed shafts 22-1 to 22-3, a coolant device 27, a cooling device 28, a temperature sensor 29, and a displacement sensor 30.
  • the main spindle 21 rotates based on a command from the numerical controller 1, and the tool attached to the main spindle 21 rotates together with the rotation of the main spindle 21, so that the workpiece fixed on the table (not shown) is rotated.
  • the feed shafts 22-1 to 22-3 operate based on a command from the numerical control device 1 so that the relative position between the tool and the work becomes the commanded position.
  • the spindle 21 includes a mechanical element 23, which is one or more structures, and a spindle motor 24.
  • the mechanical element 23 is, for example, a gear, a shaft, a tooling system, or the like.
  • the feed shaft 22-1 includes a feed shaft mechanism 25-1 and a feed shaft motor 26-1.
  • the feed shaft 22-2 includes a feed shaft mechanism 25-2 and a feed shaft motor 26-2.
  • the feed shaft 22-3 includes a feed shaft mechanism 25-3 and a feed shaft motor 26-3.
  • each of the feed shafts 22-1 to 22-3 will be referred to as a feed shaft 22 when not individually distinguished, and each of the feed shaft mechanisms 25-1 to 25-3 will be described as a feed shaft mechanism 25 unless individually distinguished.
  • each of the feed shaft motors 26-1 to 26-3 will be referred to as the feed shaft motor 26 unless individually distinguished.
  • the feed shaft mechanism 25 is, for example, a coupling, a ball screw, or a table.
  • the feed shaft 22-1 is a drive shaft that determines a position in the X-axis direction
  • the feed shaft 22-2 is a drive shaft that determines a position in the Y-axis direction
  • the feed shaft 22-3 is a position in the Z-axis direction. Is the drive shaft that determines.
  • the tool axis direction is made to coincide with the Z axis
  • the tool advancing direction in a plane perpendicular to the tool axis direction is the X axis
  • the X axis and the Z axis are perpendicular to each other.
  • the direction is defined as the Y-axis.
  • the cooling device 28 cools at least a part of the spindle motor 24, the feed shaft motors 26-1 to 26-3, the mechanical element 23, and the feed shaft mechanisms 25-1 to 25-3.
  • the coolant device 27 cools the processing part.
  • the processing unit is a processing area in the machine tool 2 in which the tool processes a work.
  • the temperature sensor 29 periodically detects the temperature of the machine tool 2 and outputs temperature data indicating the detected temperature to the numerical controller 1.
  • the detection cycle of the data of the temperature sensor 29 is called a temperature detection cycle.
  • one temperature sensor 29 is shown in FIG. 2, generally, there are a plurality of temperature sensors 29, and the temperature sensors 29 are installed at a plurality of locations inside and outside the machine tool.
  • the temperature sensor 29 detects the temperature, for example, one or more of the main shaft motor 24, the feed shaft motors 26-1 to 26-3, the mechanical element 23, and the feed shaft mechanisms 25-1 to 25-3. Structure, the tank (not shown) of the coolant device 27, the periphery of the machine tool 2, and the like.
  • the temperature detected by the temperature sensor 29 is not the temperature of the structure itself of the machine tool 2, but in this specification, in such a case.
  • the temperature including the machine tool 2 is also called.
  • the location where the temperature of the temperature sensor 29 is to be detected is, for example, a table, bed, column, spindle head, or the like.
  • a plurality of temperature sensors 29 may be installed for one structure.
  • the displacement sensor 30 detects the amount of displacement that occurs between the tool and the workpiece in the machining section of the machine tool 2, and outputs the detection result to the numerical controller 1 as thermal displacement data.
  • the displacement sensor 30 is a sensor capable of detecting displacement in at least one axis direction.
  • a plurality of displacement sensors 30 may be installed to detect displacements in a plurality of axial directions.
  • the machine tool 2 is provided with one or more sensors (not shown) for detecting the operating state of the machine tool 2, and the sensor uses the detection result of the operating state of the machine tool 2 as operating state data to control the numerical controller 1.
  • the operating state data is information including at least one of the position and speed of each motor of the main shaft motor 24 and the feed shaft motors 26-1 to 26-3 and the current.
  • the thermal displacement amount is a displacement amount generated between the tool and the work due to the structure of the machine tool 2 being distorted or elongated due to the influence of temperature changes inside and outside the machine tool 2.
  • Factors that cause a temperature change in the machine tool 2 are heat generated by driving each motor of the machine tool 2, frictional heat of each drive shaft of the machine tool 2, cooling by the coolant device 27, cutting heat generated by cutting, cooling by the cooling device 28. , Ambient temperature, etc.
  • the numerical controller 1 estimates the thermal displacement amount of the machine tool 2 with respect to the control command for controlling the machine tool 2 and adds a correction amount that cancels the estimated thermal displacement amount to the thermal command.
  • a driving operation command which is a command for correcting the displacement amount, is output to the machine tool 2. If the amount of thermal displacement cannot be accurately estimated, the numerical control device 1 will also have a reduced accuracy of correction with respect to the command, resulting in a processing error.
  • the numerical controller 1 according to the present embodiment generates learning data for each operation unit described later and learns the thermal displacement amount so that the thermal displacement amount can be accurately estimated.
  • the operation unit is a time period in which the thermal tendency of the machine tool 2 is constant. Details of the operation unit will be described later.
  • the configuration and operation of the numerical control device 1 according to the present embodiment will be described.
  • the numerical control device 1 includes a data collection unit 11, a learning unit 12, a control unit 13, a data selection unit 14, a thermal displacement estimation unit 15, and a thermal displacement correction unit 16.
  • the data collection unit 11 which is a data generation unit, uses the first time length, which is the time length of the learning data used for learning the relationship between the temperature of the machine tool 2 and the thermal displacement amount of the machine tool 2, as the operation data. Based on the first time length, learning data including temperature data, displacement data, and operation data is generated.
  • the operation data is data indicating the content of the operation operation of the machine tool 2, and is information including the analysis result of the machining program 3, the operation state data, and the control command.
  • the data collection unit 11 receives the temperature data output from the temperature sensor 29 of the machine tool 2 and the thermal displacement data output from the displacement sensor 30 of the machine tool 2.
  • the data collection unit 11 also receives the operation data from the control unit 13.
  • the control command is a command for the tool and the work to perform a desired operation by each motor of the machine tool 2.
  • the analysis result of the machining program 3 is information indicating the operation of the machine tool 2, including the rotation speed of the spindle motor 24 and the speed of the feed shaft motor 26.
  • the analysis result includes, for example, a rotation speed command (rotation speed command) to the main shaft 21, a position command to the feed shaft 22, a speed command to the feed shaft 22, a tool number, a coolant injection command, and Information indicating at least one of the coolant stop command is included.
  • the data collection unit 11 generates learning data by using the temperature data, the thermal displacement data and the operation data, and outputs the learning data to the learning unit 12. Specifically, the data collection unit 11 uses the information of the operation data to divide the temperature data and the thermal displacement data into operation operation units to generate divided data, and the number of sampling points in the divided data having different time widths is constant.
  • the learning data is generated by performing resampling so that the number of sampling points becomes. Details of resampling will be described later. Here, it is assumed that all the cycles of inputting each data to the data collecting unit 11 are the same, and the times corresponding to each data input to the data collecting unit 11 are all the same in this cycle.
  • the data collection unit 11 monitors the driving data, and when there is a change in the driving data that satisfies the condition of the break of the driving operation unit, which will be described later, the changing point is set as the end of the learning data, and then the learning data.
  • the input temperature data, thermal displacement data, and operation data are set as the beginning of the next learning data.
  • the data collection unit 11 may hold the temperature data, the thermal displacement data, and the operation data together with the time. This time is the time attached to the data when each of the temperature data, the thermal displacement data, and the operation data is attached to the data, and the data collection unit when the time is not attached to the data. 11 is the time when the data is received.
  • the learning unit 12 uses the learning data received from the data collection unit 11 to learn the relationship between the temperature of the machine tool 2 and the thermal displacement amount of the machine tool 2, generates a learning model, and generates the learning model. Output to the thermal displacement estimation unit 15.
  • the control unit 13 analyzes the command described in the machining program 3. Further, the control unit 13 receives the operation state data from the machine tool 2, and based on the operation state data and the command described in the machining program 3, each of the spindle motor 24 and the feed axis motors 26-1 to 26-3. Generates a control command for performing an operation corresponding to the command described in the machining program 3.
  • a general method can be used as a method of generating a control command relating to the operation of each motor of the main shaft motor 24 and the feed shaft motors 26-1 to 26-3, and a detailed description thereof will be omitted.
  • the control unit 13 outputs the generated control command to the thermal displacement correction unit 16. Further, the control unit 13 outputs the operation data, which is information including the analysis result of the machining program 3, the operation state data, and the control command, to the data collection unit 11 and the data selection unit 14.
  • the data selection unit 14 determines a second time length, which is the time length of the estimation data used for estimating the thermal displacement, based on the operation data, and based on the determined second time length, the temperature data and the operation are calculated. Data for estimation including data and is generated. Specifically, the data selection unit 14 receives and acquires temperature data from the temperature sensor 29 of the machine tool 2. Further, the data collection unit 11 acquires operation data from the control unit 13. The data selection unit 14 temporally divides the temperature data in a section of a driving action unit analyzed from the driving data, and outputs the divided temperature data to the thermal displacement estimation unit 15 as estimation data. At this time, similarly to the data collection unit 11, the data selection unit 14 resamples so that the number of sampling points in the divided data having different time widths becomes a constant number of sampling points to generate estimation data.
  • the thermal displacement estimation unit 15 estimates the amount of thermal displacement generated in the machine tool 2 using the learning model generated by the learning unit 12 and the estimation data received from the data selection unit 14. Specifically, the thermal displacement estimation unit 15 calculates the thermal displacement amount by inputting the estimation data input from the data selection unit 14 to the calculation formula indicating the learning model generated by the learning unit 12. .. In addition, the thermal displacement estimation unit 15 performs the process opposite to the resampling performed by the data selection unit 14 on the calculated thermal displacement amount, so that the thermal displacement estimation unit 15 outputs the thermal displacement amount output cycle to the temperature sensor. The thermal displacement amount after the process opposite to the resampling is output to the thermal displacement correction unit 16 in accordance with the temperature detection period of 29.
  • the thermal displacement correction unit 16 corrects the control command to the machine tool 2 with the correction amount calculated from the thermal displacement amount estimated by the thermal displacement estimation unit 15. Specifically, the thermal displacement correction unit 16 adds a correction amount that cancels the thermal displacement amount estimated by the thermal displacement estimation unit 15 to the control command generated by the control unit 13, and the correction amount is added.
  • the control command is output to the machine tool 2 as a driving operation command. Specifically, the thermal displacement correction unit 16 multiplies the amount of thermal displacement in each axial direction estimated by the thermal displacement estimation unit 15 by ⁇ 1 with respect to the position command in each axial direction included in the control command. Is added as a correction amount.
  • the data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 illustrated in FIG. 1 are realized by a processing circuit.
  • the processing circuit may be a circuit including a processor or may be dedicated hardware.
  • FIG. 3 is a diagram illustrating a configuration example of the processing circuit.
  • the processing circuit 200 includes a processor 201 and a memory 202.
  • the processor 201 causes the memory 202 to operate. These are realized by reading and executing the program stored in. That is, when the data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 are realized by the processing circuit 200 shown in FIG. , Is realized by using a program that is software.
  • the memory 202 is also used as a work area of the processor 201.
  • the processor 201 is a CPU (Central Processing Unit) or the like.
  • the memory 202 corresponds to, for example, a RAM (Random Access Memory), a ROM (Read Only Memory), a nonvolatile or volatile semiconductor memory such as a flash memory, a magnetic disk, or the like.
  • the processing circuit that realizes the data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 is dedicated hardware
  • the processing circuit is, for example, an FPGA ( These are Field Programmable Gate Array) and ASIC (Application Specific Integrated Circuit).
  • the data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 may be realized by combining a processing circuit including a processor and dedicated hardware. ..
  • the data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 may be realized by a plurality of processing circuits.
  • FIG. 4 is a diagram showing changes in the states of typical machine elements that affect the thermal tendency of the machine tool 2.
  • FIG. 4 shows an example of a temporal transition between the operating state and the programmed operating state of each of the main shaft 21, the feed shaft 22, the coolant device 27, and the cooling device 28, which are the components of the machine tool 2.
  • the horizontal axis of FIG. 4 indicates time.
  • the program operating state indicates whether or not the program is operating.
  • the program operation is to operate the machine tool 2 under the control according to the machining program 3 by the numerical controller 1.
  • a program operation for performing a certain machining is performed by the machine tool 2, and when the program operation is completed, a worker performs work such as replacement of a work, and then a program for the next machining. Work is performed in a flow such as driving.
  • tool # 1 is mounted on the spindle 21, and the spindle motor 24 rotates at a rotation speed of 1000 rotations per minute.
  • a character represented by S and a number, such as “S1000”, indicates the rotation speed of the spindle motor 24, S indicates that the spindle motor 24, and the numerical value following S indicates the rotation speed. Is shown.
  • the rotation speed is indicated by the number of rotations, which is the number of rotations per minute. From time t1 to time t3, the shaft of the main shaft 21 expands due to heat generation of the main shaft motor 24 and friction heat of the bearing of the main shaft 21.
  • the spindle motor 24 is in a stationary state, so the spindle 21 itself does not generate heat.
  • the tool # 2 is attached to the spindle 21 and rotates at a rotation speed of 3000 rotations per minute.
  • the spindle 21 also generates heat from time t3 to t4, thermal displacement occurs, but the tendency of heat generation is different from time t1 to time t3 because of the different tool and different rotation speed from time t1 to time t3. Is different.
  • the thermal tendency of the main shaft 21 is not always constant, but varies depending on the mounted tool, the rotation speed, and the like.
  • the feed shaft 22, the coolant device 27, and the cooling device 28 also change the operating state, so that the thermal tendency differs depending on the operating action.
  • the feed shaft motor 26 rotates at a rotation speed of 100 revolutions per minute from the time t1 to the time t2, and the feed shaft motor 26 per minute from the time t2 to the time t3. It rotates at a rotation speed of 200 rotations.
  • a character represented by F and a number, such as “F100” indicates the rotation speed of the feed shaft motor 26, F is the feed shaft motor 26, and the numerical value following F is The rotation speed is shown.
  • the heat generation amount is different. Further, the temperature of the portion cooled by the coolant and its surroundings changes depending on whether or not the coolant device 27 is discharging the coolant. The temperature of the portion cooled by the cooling device 28 and its surroundings also change depending on whether or not the cooling device 28 is in operation.
  • the program operation is completed after the time t7, there is a possibility that setup change such as opening / closing of the door of the processing section and replacement of the work may be performed, and the thermal environment of the machine tool 2 is that the program operation is during the program operation. different. From the above, the tendency of thermal displacement generated in the machine tool 2 is different for each section from the time t1 to the time t2, the section from the time t2 to the time t3, ..., And the section where the program operation is stopped after the time t7. ..
  • the operation operation of the machine tool 2 such as the section from time t1 to time t2, the section from time t2 to time t3, ...
  • Each different section is defined as a driving operation unit.
  • the data collection unit 11 of the numerical control device 1 determines a section that is a driving operation unit based on the driving data received from the control unit 13. More specifically, the time at which the content of the driving action has changed is obtained from the driving data, and the section that is the driving action unit is determined by using this time as a delimiter. That is, the first time length, which is the time length of the learning data, is determined with the timing at which the operating state of at least one machine element of the machine tools 2 changes as a break. Then, the data collection unit 11 divides the temperature data, the thermal displacement data, and the operation data into section units that are operation operation units.
  • the operation data includes the analysis result of the machining program 3, the operation state data and the control command.
  • the rotation speed of the spindle motor 24 and the rotation speed of the feed shaft motor 26 are included in both the analysis result of the machining program 3, the control command, and the operation state data.
  • the rotation speed of the spindle motor 24 and the rotation speed of the feed shaft motor 26 can be obtained based on either the analysis result, the control command, or the operation state data.
  • the information indicating whether the coolant device 27 and the cooling device 28 are in operation is included in the operation state data.
  • the control command also includes commands relating to these operating states, so the data collecting unit 11 uses the control commands to determine the operating states of the coolant device 27 and the cooling device 28.
  • the operating states of the motors, the coolant device 27, and the cooling device 28 are included in the control command and also included in the operating state data as a result of the control. Only one of the command and the result may be used for learning, but by learning the command value together with the operating state data of the machine tool 2, it is expected to generate a learning model with higher performance.
  • FIG. 4 shows the state change for each type of the constituent elements of the machine tool 2
  • the machine tool 2 generally includes a plurality of feed shafts 22.
  • a plurality of cooling devices 28 may be provided according to the number of machine elements of the machine tool 2.
  • each data can be divided into driving operation units at the timing when the state of each component changes.
  • the length of the section that is the first time length is not constant for the data divided by section.
  • the time width Tw1 from time t1 to time t2 and the time width Tw2 from time t2 to time t3 are different.
  • the time width of the section is not constant, the number of sampling points of the data included in each section is also not constant. If the number of sampling points for each section is different, the learning process in the learning unit 12 becomes complicated.
  • the data collection unit 11 divides the temperature data and the thermal displacement divided into sections so that the learning data corresponding to each section has the same sampling points. Resampling the data to generate training data. That is, the data collection unit 11 resamples the temperature data and the displacement data to generate learning data so that the number of sampling points of the data forming the learning data is the same between the learning data.
  • FIG. 5 shows an example of re-sampling the temperature data in the section of time width Tw1 from time t1 to time t2
  • FIG. 6 resamples the temperature data in the section of time width Tw2 from time t2 to time t3. An example is shown.
  • the sampling score of the section from time t1 to time t2 shown in FIG. 5 is L1
  • the sampling score of the section from time t2 to time t3 shown in FIG. 6 is L2. Since the temperature data is detected at a constant cycle, the longer the time interval, the greater the number of sampling points of the temperature data included in the interval. Since the time width Tw2 is longer than the time width Tw1 as shown in FIGS. 4 to 6, L2 is a value larger than L1.
  • the data collection unit 11 performs resampling such that the sampling points in the section from time t1 to time t2 and the sampling points in the section from time t2 to time t3 are both L. I do.
  • a general method can be used as the resampling method, and the resampling method is not particularly limited.
  • the data collection unit 11 resamples the thermal displacement data as well as the temperature data.
  • the data collection unit 11 may resample the operation data as well, but since the operation data is used to determine the temperature data and the thermal displacement data for each content of the operation operation, the data is acquired in operation operation units. Does not need to be resampled.
  • the learning unit 12 uses the learning data received from the data collection unit 11 to generate a learning model regarding the thermal displacement amount.
  • the learning model is, for example, a mathematical polynomial shown in the following formula (1).
  • N is the number of the temperature sensor 29
  • L is the number of sampling points in one of the learning data
  • d x, d y, d z are each X, Y, Z axis direction Is the amount of thermal displacement of.
  • j represents the time discretized in units of sampling points and is represented by a number.
  • T i, j represents the temperature data of the i-th temperature sensor 29 at the time j
  • a i , b i , c. i , C 1 , C 2 , and C 3 are model parameters.
  • i indicates the number of the temperature sensor 29 for identifying the temperature sensor 29.
  • the learning unit 12 identifies the model parameter in the above formula (1) using the learning data.
  • a known identification method such as the least square method can be used.
  • the learning unit 12 divides the driving data into the same group having the same value of the data that determines the driving motion unit, and identifies the model parameter for each group using the corresponding learning data. Therefore, the learning model can be constructed for each content of the driving motion.
  • the mathematical polynomial that is the learning model is not limited to the above (1), and may be another mathematical expression.
  • FIG. 7 is a model diagram of the neural network.
  • FIG. 7 shows a network structure including an input layer that inputs temperature data, an output layer that outputs thermal displacement data, and one or more intermediate layers that propagate signals from the input layer to the output layer. ..
  • the input / output relationship of the nodes included in each layer is expressed by the following equation (2).
  • x m, k represents a signal input from the m-th node to the k-th node
  • y k represents a signal output from the k-th node.
  • w m, k is a weighting coefficient for the m-th node and the k-th node
  • b k is a bias for the k-th node
  • f is an activation function.
  • the activation function f for example, a sigmoid function or a normalized linear function can be used.
  • the neural network shown in FIG. 7 can learn the relationship between the temperature data included in the learning data and the thermal displacement amount by using the learning method based on the error back propagation method.
  • a convolutional neural network may be used.
  • a recurrent neural network may be used.
  • FIG. 8 is a flowchart showing an example of a learning processing procedure in the numerical controller 1.
  • the data collecting unit 11 of the numerical controller 1 collects temperature data, thermal displacement data, and operation data, and generates learning data (step S1). Specifically, the data collection unit 11 acquires temperature data and thermal displacement data from the machine tool 2 and operation data from the control unit 13. As described above, the data collection unit 11 divides each data in driving operation units and resamples the divided temperature data and thermal displacement data to generate learning data.
  • the learning unit 12 learns the relationship between the temperature data and the thermal displacement data from the learning data generated by the data collection unit 11 and generates a learning model (step S2). Through the above processing, a learning model that learns the relationship between the temperature data and the thermal displacement data is generated.
  • the numerical controller 1 executes the learning operation described above for various driving operations to build a learning model that learns the relationship between temperature data and thermal displacement data in various driving operations.
  • FIG. 9 is a flowchart showing an example of a thermal displacement amount estimation processing procedure in the numerical controller 1.
  • the data selection unit 14 of the numerical control device 1 acquires the temperature data and the operation data and generates estimation data (step S11). Specifically, the data selection unit 14 acquires temperature data from the machine tool 2 and operation data from the control unit 13. Then, similarly to the data collection unit 11, the data selection unit 14 determines the time length of the estimation data, which is the second time length, based on the operation data. The second time length is determined with the timing at which the operating state of at least one of the machine elements included in the machine tool 2 changes as a delimiter.
  • the data selection unit 14 divides the operation data and the temperature data by the operation operation unit, resamples the divided temperature data, and uses the resampled data and the divided operation data as estimation data, the thermal displacement estimation unit 15 Output to. That is, the data selection unit 14 resamples the temperature data and generates the estimation data so that the number of sampling points of the data forming the estimation data is the same between the estimation data.
  • the thermal displacement estimation unit 15 estimates the thermal displacement amount using the estimation data and the learning model (step S12).
  • the learning model is input from the learning unit 12 to the thermal displacement estimation unit 15.
  • the thermal displacement estimation unit 15 outputs the estimated thermal displacement amount to the thermal displacement correction unit 16.
  • the thermal displacement estimation unit 15 performs the process opposite to the resampling performed by the data selection unit 14 on the calculated thermal displacement amount so that the output cycle of the thermal displacement amount in the thermal displacement estimation unit 15 is calculated by the temperature sensor 29. Match the temperature detection cycle.
  • the thermal displacement estimation unit 15 adjusts the output cycle of the thermal displacement amount to the output cycle of the control command. The reverse process of resampling is performed.
  • the thermal displacement correction unit 16 adds a correction amount that cancels the thermal displacement amount to the control command (step S13). Specifically, the thermal displacement correction unit 16 adds a correction amount that cancels the thermal displacement amount to the control command received from the control unit 13, and adds the correction amount to the machine tool 2 as a driving operation command. Output.
  • the numerical control device 1 can perform the processing of correcting the thermal displacement amount with respect to the control command. Therefore, the numerical control device 1 can reduce a processing error caused by thermal displacement.
  • the data collecting unit 11 divides the temperature data and the thermal displacement data into driving operation units to generate learning data
  • the learning unit 12 performs learning. Learn the relationship between temperature and thermal displacement from the data.
  • the data selection unit 14 generates estimation data by dividing the temperature data into driving operation units
  • the thermal displacement estimation unit 15 uses the estimation data and the learning model. To estimate the amount of thermal displacement. Therefore, it is possible to generate a highly accurate learning model suitable for the content of the driving motion for each driving motion. That is, the numerical control device 1 according to the present embodiment can learn the relationship between the temperature and the thermal displacement amount with high accuracy, and thus can accurately estimate the thermal displacement amount.
  • the numerical control device 1 according to the present embodiment has a higher estimation accuracy of the thermal displacement amount as compared with the example in which the learning model is generated by using the data in a unit of a fixed period without considering the content of the driving operation. Can be improved. Therefore, the numerical control device 1 according to the present embodiment can correct the control command using the estimated value of the thermal displacement amount with high estimation accuracy, and can reduce the processing error.
  • the machine tool 2 configured to cut the work by rotating the tool has been described, but the machine tool to which the present invention is applicable is not limited to this.
  • a machine tool having a structure in which a tool is fixed and a work is rotated like a lathe can achieve the same effect as that of the present embodiment.
  • the relationship between the temperature and the thermal displacement amount is learned, and the thermal displacement amount is estimated using the detected temperature and the learning model.
  • the relationship between the temperature and at least one of the position and rotation speed of each drive shaft and the amount of thermal displacement is learned, and at least one of the temperature and the position and rotation speed of each drive shaft and the learning model are learned. May be used to estimate the thermal displacement amount.
  • the temperature sensor 29 and the displacement sensor 30 are components of the machine tool 2
  • at least a part of the temperature sensor 29 and the displacement sensor 30 is a component of the machine tool 2.
  • it may be a sensor provided later on the machine tool 2.
  • the numerical control device 1 is configured to generate the learning model, but the data collection unit 11 and the learning unit 12 may be provided in a learning device different from the numerical control device 1.
  • the learning device receives the operation data from the numerical control device 1 and the temperature data and the thermal displacement data from the machine tool 2.
  • the data collection unit 11 and the learning unit 12 in the learning device perform the same operation as in the above-described example.
  • the learning device outputs the learning model generated by the learning unit 12 to the numerical control device 1.
  • the learning unit 12 may be included in a learning device other than the numerical control device 1. In this case, the learning data is input to the learning device from the numerical control device 1, and the learning device outputs the learning model to the numerical control device 1.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Automatic Control Of Machine Tools (AREA)
  • Numerical Control (AREA)

Abstract

The numerical control device (1) according to the present invention is provided with: a data collection unit (11) which determines, on the basis of operation data representing the content of operational action of a machine tool (2), a first time length, which is a learning data time length used to learn the relationship between a temperature of the machine tool (2) and an amount of displacement of the machine tool (2), and generates, on the basis of the determined first time length, learning data that includes temperature data representing the temperature of the machine tool (2), displacement data representing displacement of the machine tool (2), and the operation data; and a learning unit (12) which learns the relationship between the temperature of the machine tool (2) and the amount of displacement of the machine tool (2) using the learning data, and generates a learning model.

Description

数値制御装置、学習装置および学習方法Numerical control device, learning device and learning method
 本発明は、工作機械の熱変位量を推定する数値制御装置、学習装置および学習方法に関する。 The present invention relates to a numerical control device, a learning device, and a learning method for estimating a thermal displacement amount of a machine tool.
 工作機械は、工具を用いてワークに力またはエネルギーを与えることで除去加工、折り曲げ加工の加工を行う加工装置である。工作機械は、一般に複数の駆動軸を有する。駆動軸は、例えば、モータとモータに接続された1つ以上の構造物とで構成される。工作機械は、工具またはワークを回転させるための駆動軸である主軸と、工具とワークの相対位置の位置決めを行う駆動軸である送り軸とを備える。工作機械の各駆動軸は数値制御装置によって制御される。数値制御装置は、ワークに対する工具の相対位置を駆動軸に指令し、駆動軸が指令に基づいて動作することで工具とワークが接触して加工が実現される。 Machine tools are processing devices that perform removal processing and bending processing by applying force or energy to the work using tools. Machine tools generally have multiple drive shafts. The drive shaft is composed of, for example, a motor and one or more structures connected to the motor. A machine tool includes a main shaft that is a drive shaft for rotating a tool or a work, and a feed shaft that is a drive shaft that positions a relative position between the tool and the work. Each drive shaft of the machine tool is controlled by a numerical controller. The numerical control device instructs the relative position of the tool with respect to the work to the drive shaft, and the drive shaft operates based on the command, whereby the tool and the work come into contact with each other and machining is realized.
 一方、工作機械の内外に存在する熱源によって、工作機械が熱変形を起こすと、工具とワークの間には熱変位が発生する。熱変位とは、工作機械の温度変化によって生じる機械位置の誤差である。工作機械に温度変化を与える代表的な要因の例として、工作機械の周囲温度の変化とモータの発熱が挙げられる。これらの要因により、コラムおよび主軸ヘッドをはじめとする構造物の温度分布が一様でなくなると、構造物が歪むので、工作機械の平行度および直角度が低下する。また、主軸シャフト、ボールねじ等が温度変化により伸長することで、熱変位が生じる。 On the other hand, when the machine tool undergoes thermal deformation due to the heat sources existing inside and outside the machine tool, thermal displacement occurs between the tool and the workpiece. Thermal displacement is an error in machine position caused by changes in temperature of a machine tool. Examples of typical factors that give a temperature change to a machine tool include a change in ambient temperature of the machine tool and heat generation of a motor. Due to these factors, if the temperature distribution of the structure including the column and the spindle head becomes uneven, the structure is distorted, and the parallelism and squareness of the machine tool decrease. Further, the main shaft shaft, the ball screw, and the like expand due to temperature changes, causing thermal displacement.
 熱変位は加工誤差の要因になる。工作機械の熱変位を抑制するための対策の例として、工作機械に温度変化を与えないように工作機械を恒温室に設置したり、工作機械に冷却装置を備えたりする対策がある。これらの対策を行うことで、工作機械の内外の状況によらずに工作機械の温度を一定に保つことができるが、工作機械のために恒温室を用意する必要があったり、冷却装置による冷却が必要な構造物がある場合、冷却装置により冷却される構造物の熱変形による熱変位を防げなかったりといった問題がある。 ▽ Thermal displacement causes machining error. As an example of measures for suppressing the thermal displacement of the machine tool, there are measures such as installing the machine tool in a temperature-controlled room so as not to change the temperature of the machine tool, or providing the machine tool with a cooling device. By taking these measures, the temperature of the machine tool can be kept constant irrespective of the inside and outside conditions of the machine tool, but it is necessary to prepare a temperature-controlled room for the machine tool or cooling by a cooling device. If there is a structure that requires, there is a problem that the thermal displacement due to thermal deformation of the structure cooled by the cooling device cannot be prevented.
 工作機械の熱変位を抑制するための別の対策として、数値制御装置が生成する指令値を予め熱変位分だけ補正する方法がある。この方法では、工作機械の運転データ、センサデータ等を用いて熱変位を相殺する補正量を求めて指令値に加算することで、工作機械の設置環境および機械構造の制約を受けることなく、熱変位による加工誤差を低減できるという利点がある。 As another measure for suppressing the thermal displacement of the machine tool, there is a method of previously correcting the command value generated by the numerical control device by the thermal displacement. In this method, the operation data of the machine tool, the sensor data, etc. are used to calculate the correction amount that offsets the thermal displacement, and the correction amount is added to the command value. There is an advantage that a processing error due to displacement can be reduced.
 特許文献1には、工作機械の動作状態データと熱変位量との関係を表す計算式を学習し、この計算式と動作状態データとを用いて熱変位量を算出し、算出した熱変位量を用いて、工作機械の機械位置を補正する技術が提案されている。特許文献1の方法では、種々の動作状態の計算式を繰り返し学習し、サンプリング時間単位で推定した熱変位量を所定期間内で合計することで、熱変位量を算出している。 In Patent Document 1, a calculation formula representing the relationship between the operation state data of the machine tool and the thermal displacement amount is learned, the thermal displacement amount is calculated using this calculation formula and the operation state data, and the calculated thermal displacement amount is calculated. There has been proposed a technique for correcting the machine position of a machine tool using. In the method of Patent Document 1, the amount of thermal displacement is calculated by repeatedly learning calculation formulas for various operating states and summing the amount of thermal displacement estimated in sampling time units within a predetermined period.
特開2018-111145号公報JP, 2008-111145, A
 しかしながら、特許文献1に記載の方法では、工作機械の運転動作に同期せずに、常に一定の期間を単位とした動作状態データを学習用データとしているので、1つの学習用データの中に熱変位量の時間変化の傾向が異なるデータが含まれると、学習が正しく行われない。例えば、熱変位量を決定する条件が変わると、熱変位に影響を与える工作機械内外の温度変化の傾向も変わる。熱変位に影響を与える工作機械内外の温度変化の傾向を、以下、熱的傾向と呼ぶ。熱的傾向の変化の要因となる条件の変化の具体例は、モータが回転状態から静止状態へ変化する場合、冷却のためのクーラントが吐出状態から停止状態に変化する場合などである。このように条件の変化が生じる状況下では、工作機械の機械要素に発生する熱的傾向も変化する。熱的傾向が変化している期間内の、該期間より期間の短い複数の学習用データを用いる場合、これらの学習用データからは、熱的傾向が変化する期間全体の計算式を学習することはできない。したがって、特許文献1に記載の方法では、このような学習用データを用いて熱変位量を求める計算式を求めるため、温度と熱変位量の関係を精度良く学習することができないという問題がある。 However, in the method described in Patent Document 1, the operation state data in a unit of a constant period is always used as the learning data without being synchronized with the operation of the machine tool. If data with different trends of displacement amount with time is included, learning will not be performed correctly. For example, when the condition that determines the amount of thermal displacement changes, the tendency of temperature change inside and outside the machine tool that affects thermal displacement also changes. Hereinafter, the tendency of temperature change inside and outside the machine tool that affects the thermal displacement is referred to as a thermal tendency. Specific examples of the change in the condition that causes the change in the thermal tendency include the case where the motor changes from the rotating state to the stationary state, the case where the coolant for cooling changes from the discharge state to the stop state, and the like. Under such a situation where the conditions change, the thermal tendency generated in the machine element of the machine tool also changes. When using multiple learning data within a period in which the thermal tendency is changing and a period shorter than the period, learn the calculation formula for the entire period in which the thermal tendency is changing from these learning data. I can't. Therefore, in the method described in Patent Document 1, since the calculation formula for obtaining the thermal displacement amount is obtained using such learning data, there is a problem that the relationship between the temperature and the thermal displacement amount cannot be learned accurately. ..
 本発明は、上記に鑑みてなされたものであって、温度と熱変位量の関係を精度良く学習することができる数値制御装置を得ることを目的とする。 The present invention has been made in view of the above, and an object of the present invention is to obtain a numerical control device capable of accurately learning the relationship between temperature and thermal displacement.
 上述した課題を解決し、目的を達成するために、本発明にかかる数値制御装置は、工作機械を制御する数値制御装置であって、工作機械の温度と工作機械の熱変位量との関係の学習に用いられる学習用データの時間長である第1の時間長を、工作機械の運転動作の内容を示す運転データに基づいて決定し、決定した第1の時間長に基づいて、工作機械の温度を示す温度データと工作機械の変位を示す変位データと運転データとを含む学習用データを生成するデータ生成部、を備える。数値制御装置は、さらに、学習用データを用いて、工作機械の温度と工作機械の熱変位量との関係を学習して学習モデルを生成する学習部、を備える。 In order to solve the above-mentioned problems and to achieve the object, a numerical control device according to the present invention is a numerical control device for controlling a machine tool, wherein the numerical control device has a relationship between a temperature of the machine tool and a thermal displacement amount of the machine tool. The first time length, which is the time length of the learning data used for learning, is determined based on the operation data indicating the content of the operation operation of the machine tool, and the machine tool of the machine tool is determined based on the determined first time length. A data generation unit that generates learning data including temperature data indicating temperature, displacement data indicating displacement of the machine tool, and operation data. The numerical controller further includes a learning unit that uses the learning data to learn the relationship between the temperature of the machine tool and the amount of thermal displacement of the machine tool to generate a learning model.
 本発明にかかる数値制御装置は、温度と熱変位量の関係を精度良く学習することができるという効果を奏する。 The numerical control device according to the present invention has the effect of being able to accurately learn the relationship between temperature and thermal displacement.
本発明にかかる数値制御装置の実施の形態の構成例を示すブロック図Block diagram showing a configuration example of an embodiment of a numerical control device according to the present invention 工作機械の構成例を示す図Diagram showing a configuration example of a machine tool 処理回路の構成例を示す図Diagram showing a configuration example of the processing circuit 工作機械の熱的傾向に影響を与える代表的な機械要素の状態の変化を表す図Diagram showing changes in the state of typical machine elements that affect the thermal tendency of machine tools 時刻t1から時刻t2までの時間幅Tw1の区間の温度データをリサンプリングした例を示す図The figure which shows the example which resampled the temperature data of the area of time width Tw1 from time t1 to time t2. 時刻t2から時刻t3までの時間幅Tw2の区間の温度データをリサンプリングした例を示す図The figure which shows the example which resampled the temperature data of the area of time width Tw2 from time t2 to time t3. ニューラルネットワークのモデル図Neural network model diagram 数値制御装置における学習処理手順の一例を示すフローチャートFlowchart showing an example of a learning processing procedure in the numerical control device 数値制御装置における熱変位量の推定処理手順の一例を示すフローチャートFlowchart showing an example of the procedure for estimating the thermal displacement amount in the numerical control device
 以下に、本発明の実施の形態にかかる数値制御装置、学習装置および学習方法を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。 A numerical control device, a learning device, and a learning method according to an embodiment of the present invention will be described below in detail with reference to the drawings. The present invention is not limited to this embodiment.
実施の形態.
 図1は、本発明にかかる数値制御装置の実施の形態の構成例を示すブロック図である。本実施の形態の数値制御装置1は、工作機械2に接続可能である。図1では、数値制御装置1が工作機械2に接続された状態を示している。数値制御装置1は、加工プログラム3に基づいて工作機械2を制御する。加工プログラム3は、工作機械2が所望の運転を実行するために数値制御装置1に対して与えられる一連の命令文である。図1では、加工プログラム3は、数値制御装置1の外部から与えられる例を図示しているが、これに限定されず、加工プログラムは、数値制御装置1の内部に保持されていてもよい。
Embodiment.
FIG. 1 is a block diagram showing a configuration example of an embodiment of a numerical controller according to the present invention. The numerical control device 1 of the present embodiment can be connected to the machine tool 2. FIG. 1 shows a state in which the numerical control device 1 is connected to the machine tool 2. The numerical controller 1 controls the machine tool 2 based on the machining program 3. The machining program 3 is a series of command statements given to the numerical controller 1 for the machine tool 2 to execute a desired operation. Although FIG. 1 shows an example in which the machining program 3 is given from the outside of the numerical controller 1, the present invention is not limited to this, and the machining program may be held inside the numerical controller 1.
 図2は、工作機械2の構成例を示す図である。以下、本実施の形態では、工作機械2が切削加工を行う加工装置である例を説明するが、本実施の形態の学習方法を適用する工作機械2は、切削加工を行う加工装置に限定されず、工作機械2の駆動軸の数も図2に示した例に限定されない。 FIG. 2 is a diagram showing a configuration example of the machine tool 2. Hereinafter, in the present embodiment, an example in which the machine tool 2 is a processing device that performs cutting will be described, but the machine tool 2 to which the learning method of the present embodiment is applied is not limited to a processing device that performs cutting. Moreover, the number of drive shafts of the machine tool 2 is not limited to the example shown in FIG.
 工作機械2は、主軸21と、送り軸22-1~22-3と、クーラント装置27と、冷却装置28と、温度センサ29と、変位センサ30とを備える。工作機械2では、数値制御装置1からの指令に基づいて主軸21が回転し、主軸21に取り付けられた工具が主軸21の回転とともに回転することで、図示しないテーブル上に固定されたワークに対して切削加工を行う。送り軸22-1~22-3は、数値制御装置1からの指令に基づいて工具とワークの相対位置が、指令された位置となるように動作する。 The machine tool 2 includes a main shaft 21, feed shafts 22-1 to 22-3, a coolant device 27, a cooling device 28, a temperature sensor 29, and a displacement sensor 30. In the machine tool 2, the main spindle 21 rotates based on a command from the numerical controller 1, and the tool attached to the main spindle 21 rotates together with the rotation of the main spindle 21, so that the workpiece fixed on the table (not shown) is rotated. And perform cutting. The feed shafts 22-1 to 22-3 operate based on a command from the numerical control device 1 so that the relative position between the tool and the work becomes the commanded position.
 主軸21は、1つ以上の構造物である機構要素23と、主軸モータ24とを備える。機構要素23は、例えば、ギア、シャフト、ツーリングシステムなどである。送り軸22-1は、送り軸機構25-1と送り軸モータ26-1とを備える。送り軸22-2は、送り軸機構25-2と送り軸モータ26-2とを備える。送り軸22-3は、送り軸機構25-3と送り軸モータ26-3とを備える。以下、送り軸22-1~22-3のそれぞれを、個別に区別しないときには送り軸22と記載し、送り軸機構25-1~25-3のそれぞれを、個別に区別しないときには送り軸機構25と記載し、送り軸モータ26-1~26-3のそれぞれを、個別に区別しないときには送り軸モータ26と記載する。送り軸機構25は、例えば、カップリング、ボールねじ、テーブルである。 The spindle 21 includes a mechanical element 23, which is one or more structures, and a spindle motor 24. The mechanical element 23 is, for example, a gear, a shaft, a tooling system, or the like. The feed shaft 22-1 includes a feed shaft mechanism 25-1 and a feed shaft motor 26-1. The feed shaft 22-2 includes a feed shaft mechanism 25-2 and a feed shaft motor 26-2. The feed shaft 22-3 includes a feed shaft mechanism 25-3 and a feed shaft motor 26-3. Hereinafter, each of the feed shafts 22-1 to 22-3 will be referred to as a feed shaft 22 when not individually distinguished, and each of the feed shaft mechanisms 25-1 to 25-3 will be described as a feed shaft mechanism 25 unless individually distinguished. And each of the feed shaft motors 26-1 to 26-3 will be referred to as the feed shaft motor 26 unless individually distinguished. The feed shaft mechanism 25 is, for example, a coupling, a ball screw, or a table.
 送り軸22-1は、X軸方向の位置を定める駆動軸であり、送り軸22-2は、Y軸方向の位置を定める駆動軸であり、送り軸22-3は、Z軸方向の位置を定める駆動軸である。X軸、Y軸、Z軸の定義については、例えば、工具軸方向をZ軸に一致させ、工具軸方向に垂直な平面内における工具進行方向をX軸とし、X軸とZ軸にそれぞれ垂直な方向をY軸とする。 The feed shaft 22-1 is a drive shaft that determines a position in the X-axis direction, the feed shaft 22-2 is a drive shaft that determines a position in the Y-axis direction, and the feed shaft 22-3 is a position in the Z-axis direction. Is the drive shaft that determines. Regarding the definitions of the X-axis, the Y-axis, and the Z-axis, for example, the tool axis direction is made to coincide with the Z axis, the tool advancing direction in a plane perpendicular to the tool axis direction is the X axis, and the X axis and the Z axis are perpendicular to each other. The direction is defined as the Y-axis.
 冷却装置28は、主軸モータ24、送り軸モータ26-1~26-3、機構要素23および送り軸機構25-1~25-3のうちの少なくとも一部を冷却する。クーラント装置27は、加工部を冷却する。加工部は、工具がワークを加工する工作機械2内の加工エリアである。 The cooling device 28 cools at least a part of the spindle motor 24, the feed shaft motors 26-1 to 26-3, the mechanical element 23, and the feed shaft mechanisms 25-1 to 25-3. The coolant device 27 cools the processing part. The processing unit is a processing area in the machine tool 2 in which the tool processes a work.
 温度センサ29は、周期的に、工作機械2の温度を検出し、検出した温度を示す温度データを数値制御装置1に出力する。温度センサ29のデータの検出周期を温度検出周期と呼ぶ。図2では、温度センサ29を1つ図示しているが、一般には温度センサ29は、複数であり、工作機械内外の複数箇所に設置される。温度センサ29の温度の検出対象となる箇所は、例えば、主軸モータ24、送り軸モータ26-1~26-3、機構要素23および送り軸機構25-1~25-3を構成する1つ以上の構造物、クーラント装置27の図示しないタンク、工作機械2の周囲などである。温度センサ29の温度の検出対象が工作機械2の周囲などの場合は、温度センサ29で検出される温度は工作機械2の構造物自体の温度ではないが、本明細書では、このような場合も含めて工作機械2の温度と呼ぶ。具体的には、温度センサ29の温度の検出対象となる箇所は、例えば、テーブル、ベッド、コラム、主軸頭などである。温度センサ29は1つの構造物に対して複数個設置されてもよい。 The temperature sensor 29 periodically detects the temperature of the machine tool 2 and outputs temperature data indicating the detected temperature to the numerical controller 1. The detection cycle of the data of the temperature sensor 29 is called a temperature detection cycle. Although one temperature sensor 29 is shown in FIG. 2, generally, there are a plurality of temperature sensors 29, and the temperature sensors 29 are installed at a plurality of locations inside and outside the machine tool. The temperature sensor 29 detects the temperature, for example, one or more of the main shaft motor 24, the feed shaft motors 26-1 to 26-3, the mechanical element 23, and the feed shaft mechanisms 25-1 to 25-3. Structure, the tank (not shown) of the coolant device 27, the periphery of the machine tool 2, and the like. When the temperature sensor 29 detects temperature around the machine tool 2 or the like, the temperature detected by the temperature sensor 29 is not the temperature of the structure itself of the machine tool 2, but in this specification, in such a case. The temperature including the machine tool 2 is also called. Specifically, the location where the temperature of the temperature sensor 29 is to be detected is, for example, a table, bed, column, spindle head, or the like. A plurality of temperature sensors 29 may be installed for one structure.
 変位センサ30は、工作機械2の加工部内の工具とワークの間に生じる変位量を検出し、検出結果を熱変位データとして数値制御装置1に出力する。変位センサ30は少なくとも1軸方向の変位の検出が可能なセンサである。変位センサ30を複数個設置し、複数軸方向の変位を検出する構成としてもよい。 The displacement sensor 30 detects the amount of displacement that occurs between the tool and the workpiece in the machining section of the machine tool 2, and outputs the detection result to the numerical controller 1 as thermal displacement data. The displacement sensor 30 is a sensor capable of detecting displacement in at least one axis direction. A plurality of displacement sensors 30 may be installed to detect displacements in a plurality of axial directions.
 また、工作機械2には、工作機械2の運転状態を検出する図示しない1つ以上のセンサが設けられており、センサは工作機械2の運転状態の検出結果を運転状態データとして数値制御装置1へ出力する。運転状態データは、主軸モータ24および送り軸モータ26-1~26-3の各モータの位置および速度および電流のうちの少なくとも1つを含む情報である。 Further, the machine tool 2 is provided with one or more sensors (not shown) for detecting the operating state of the machine tool 2, and the sensor uses the detection result of the operating state of the machine tool 2 as operating state data to control the numerical controller 1. Output to. The operating state data is information including at least one of the position and speed of each motor of the main shaft motor 24 and the feed shaft motors 26-1 to 26-3 and the current.
 ここで、温度と熱変位の関係について述べる。熱変位量とは、工作機械2の内外の温度変化の影響で工作機械2の構造物が歪んだり伸長したりすることにより、工具とワークの間に生じる変位量である。工作機械2に温度変化を与える要因として、工作機械2の各モータの駆動による発熱、工作機械2の各駆動軸の摩擦熱、クーラント装置27による冷却、切削により生じる切削熱、冷却装置28による冷却、周囲温度等が挙げられる。 Here, the relationship between temperature and thermal displacement will be described. The thermal displacement amount is a displacement amount generated between the tool and the work due to the structure of the machine tool 2 being distorted or elongated due to the influence of temperature changes inside and outside the machine tool 2. Factors that cause a temperature change in the machine tool 2 are heat generated by driving each motor of the machine tool 2, frictional heat of each drive shaft of the machine tool 2, cooling by the coolant device 27, cutting heat generated by cutting, cooling by the cooling device 28. , Ambient temperature, etc.
 本実施の形態の数値制御装置1は、工作機械2を制御する制御指令に対して、工作機械2の熱変位量を推定し、推定した熱変位量を相殺する補正量を加算することにより熱変位量を補正した指令である運転動作指令を工作機械2に出力する。熱変位量が精度良く推定できないと、数値制御装置1は、指令に対する補正精度も低下し、加工誤差が生じることになる。本実施の形態の数値制御装置1は、熱変位量を精度良く推定できるように、後述する運転動作単位で学習用データを生成して熱変位量に関する学習を行う。運転動作単位とは、工作機械2の熱的な傾向が一定である時間区間を表す。運転動作単位の詳細については後述する。以下、本実施の形態の数値制御装置1の構成および動作について説明する。 The numerical controller 1 according to the present embodiment estimates the thermal displacement amount of the machine tool 2 with respect to the control command for controlling the machine tool 2 and adds a correction amount that cancels the estimated thermal displacement amount to the thermal command. A driving operation command, which is a command for correcting the displacement amount, is output to the machine tool 2. If the amount of thermal displacement cannot be accurately estimated, the numerical control device 1 will also have a reduced accuracy of correction with respect to the command, resulting in a processing error. The numerical controller 1 according to the present embodiment generates learning data for each operation unit described later and learns the thermal displacement amount so that the thermal displacement amount can be accurately estimated. The operation unit is a time period in which the thermal tendency of the machine tool 2 is constant. Details of the operation unit will be described later. Hereinafter, the configuration and operation of the numerical control device 1 according to the present embodiment will be described.
 図1に示すように、数値制御装置1は、データ収集部11、学習部12、制御部13、データ選択部14、熱変位推定部15および熱変位補正部16を備える。 As shown in FIG. 1, the numerical control device 1 includes a data collection unit 11, a learning unit 12, a control unit 13, a data selection unit 14, a thermal displacement estimation unit 15, and a thermal displacement correction unit 16.
 データ生成部であるデータ収集部11は、工作機械2の温度と工作機械2の熱変位量との関係の学習に用いられる学習用データの時間長である第1の時間長を、運転データに基づいて決定し、第1の時間長に基づいて、温度データと変位データと運転データとを含む学習用データを生成する。運転データは、工作機械2の運転動作の内容を示すデータであり、加工プログラム3の解析結果と運転状態データと制御指令とを含む情報である。詳細には、データ収集部11は、工作機械2の温度センサ29から出力される温度データと、工作機械2の変位センサ30から出力される熱変位データを受け取る。また、データ収集部11は、制御部13から運転データを受け取る。制御指令とは、工作機械2の各モータによって工具とワークが所望の動作を行うための指令である。加工プログラム3の解析結果は、主軸モータ24の回転速度である回転数、送り軸モータ26の速度をはじめとした工作機械2の運転動作を示す情報である。具体的には、解析結果には、例えば、主軸21への回転数指令(回転速度指令)、送り軸22への位置指令、送り軸22への速度指令、工具番号、クーラントの射出指令、およびクーラントの停止指令、のうちの少なくとも1つを表す情報が含まれる。 The data collection unit 11, which is a data generation unit, uses the first time length, which is the time length of the learning data used for learning the relationship between the temperature of the machine tool 2 and the thermal displacement amount of the machine tool 2, as the operation data. Based on the first time length, learning data including temperature data, displacement data, and operation data is generated. The operation data is data indicating the content of the operation operation of the machine tool 2, and is information including the analysis result of the machining program 3, the operation state data, and the control command. Specifically, the data collection unit 11 receives the temperature data output from the temperature sensor 29 of the machine tool 2 and the thermal displacement data output from the displacement sensor 30 of the machine tool 2. The data collection unit 11 also receives the operation data from the control unit 13. The control command is a command for the tool and the work to perform a desired operation by each motor of the machine tool 2. The analysis result of the machining program 3 is information indicating the operation of the machine tool 2, including the rotation speed of the spindle motor 24 and the speed of the feed shaft motor 26. Specifically, the analysis result includes, for example, a rotation speed command (rotation speed command) to the main shaft 21, a position command to the feed shaft 22, a speed command to the feed shaft 22, a tool number, a coolant injection command, and Information indicating at least one of the coolant stop command is included.
 さらに、データ収集部11は、温度データ、熱変位データおよび運転データを用いて学習用データを生成し、学習用データを学習部12へ出力する。詳細には、データ収集部11は、運転データの情報を用いて、温度データおよび熱変位データを運転動作単位で分割して分割データを生成し、時間幅が異なる分割データ内のサンプリング点数が一定のサンプリング点数となるようリサンプリングすることにより学習用データを生成する。リサンプリングの詳細は後述する。ここでは、データ収集部11へ各データが入力される周期は全て同一とし、データ収集部11へ入力される各データに対応する時刻は、この周期を単位として全て等しいとする。したがって、データ収集部11は、運転データを監視し、運転データに、後述する運転動作単位の区切りの条件を満たす変化があった場合に、その変化点を学習用データの最後とし、その次に入力された温度データ、熱変位データおよび運転データを次の学習用データの最初とする。または、データ収集部11は、温度データ、熱変位データおよび運転データを、時刻とともに保持してもよい。この時刻は、温度データ、熱変位データおよび運転データの各データに時刻が付されている場合にはデータに付されている時刻であり、データに時刻が付されていない場合にはデータ収集部11がデータを受け取った時刻とする。 Further, the data collection unit 11 generates learning data by using the temperature data, the thermal displacement data and the operation data, and outputs the learning data to the learning unit 12. Specifically, the data collection unit 11 uses the information of the operation data to divide the temperature data and the thermal displacement data into operation operation units to generate divided data, and the number of sampling points in the divided data having different time widths is constant. The learning data is generated by performing resampling so that the number of sampling points becomes. Details of resampling will be described later. Here, it is assumed that all the cycles of inputting each data to the data collecting unit 11 are the same, and the times corresponding to each data input to the data collecting unit 11 are all the same in this cycle. Therefore, the data collection unit 11 monitors the driving data, and when there is a change in the driving data that satisfies the condition of the break of the driving operation unit, which will be described later, the changing point is set as the end of the learning data, and then the learning data. The input temperature data, thermal displacement data, and operation data are set as the beginning of the next learning data. Alternatively, the data collection unit 11 may hold the temperature data, the thermal displacement data, and the operation data together with the time. This time is the time attached to the data when each of the temperature data, the thermal displacement data, and the operation data is attached to the data, and the data collection unit when the time is not attached to the data. 11 is the time when the data is received.
 学習部12は、データ収集部11から受け取った学習用データを用いて、工作機械2の温度と工作機械2の熱変位量との関係を学習して学習モデルを生成し、生成した学習モデルを熱変位推定部15へ出力する。制御部13は、加工プログラム3に記述された指令を解析する。また、制御部13は、工作機械2から運転状態データを受け取り、運転状態データと加工プログラム3に記述された指令とに基づいて、主軸モータ24および送り軸モータ26-1~26-3のそれぞれが加工プログラム3に記述された指令に対応した動作をするための制御指令を生成する。主軸モータ24および送り軸モータ26-1~26-3の各モータの動作に関する制御指令の生成方法は、一般的なものを用いることができるため詳細な説明は省略する。制御部13は、生成した制御指令を熱変位補正部16へ出力する。また、制御部13は、加工プログラム3の解析結果と運転状態データと制御指令とを含む情報である運転データをデータ収集部11およびデータ選択部14へ出力する。 The learning unit 12 uses the learning data received from the data collection unit 11 to learn the relationship between the temperature of the machine tool 2 and the thermal displacement amount of the machine tool 2, generates a learning model, and generates the learning model. Output to the thermal displacement estimation unit 15. The control unit 13 analyzes the command described in the machining program 3. Further, the control unit 13 receives the operation state data from the machine tool 2, and based on the operation state data and the command described in the machining program 3, each of the spindle motor 24 and the feed axis motors 26-1 to 26-3. Generates a control command for performing an operation corresponding to the command described in the machining program 3. A general method can be used as a method of generating a control command relating to the operation of each motor of the main shaft motor 24 and the feed shaft motors 26-1 to 26-3, and a detailed description thereof will be omitted. The control unit 13 outputs the generated control command to the thermal displacement correction unit 16. Further, the control unit 13 outputs the operation data, which is information including the analysis result of the machining program 3, the operation state data, and the control command, to the data collection unit 11 and the data selection unit 14.
 データ選択部14は、運転データに基づいて熱変位の推定に用いられる推定用データの時間長である第2の時間長を決定し、決定した第2の時間長に基づいて、温度データと運転データとを含む推定用データを生成する。詳細には、データ選択部14は、工作機械2の温度センサ29から温度データを受け取り、取得する。さらに、データ収集部11は、制御部13から運転データを取得する。データ選択部14は、運転データから解析される運転動作単位の区間で温度データを時間的に分割し、分割した温度データを推定用データとして熱変位推定部15に出力する。このとき、データ選択部14は、データ収集部11と同様に、時間幅が異なる分割データ内のサンプリング点数が一定のサンプリング点数となるようリサンプリングすることにより推定用データを生成する。 The data selection unit 14 determines a second time length, which is the time length of the estimation data used for estimating the thermal displacement, based on the operation data, and based on the determined second time length, the temperature data and the operation are calculated. Data for estimation including data and is generated. Specifically, the data selection unit 14 receives and acquires temperature data from the temperature sensor 29 of the machine tool 2. Further, the data collection unit 11 acquires operation data from the control unit 13. The data selection unit 14 temporally divides the temperature data in a section of a driving action unit analyzed from the driving data, and outputs the divided temperature data to the thermal displacement estimation unit 15 as estimation data. At this time, similarly to the data collection unit 11, the data selection unit 14 resamples so that the number of sampling points in the divided data having different time widths becomes a constant number of sampling points to generate estimation data.
 熱変位推定部15は、学習部12で生成された学習モデルと、データ選択部14から受け取った推定用データとを用いて、工作機械2に生じる熱変位量を推定する。具体的には、熱変位推定部15は、学習部12で生成された学習モデルを示す計算式に、データ選択部14から入力される推定用データを入力することにより、熱変位量を算出する。また、熱変位推定部15は、算出した熱変位量に対してデータ選択部14で行ったリサンプリングと逆の処理を行うことで、熱変位推定部15における熱変位量の出力周期を温度センサ29の温度検出周期に合わせ、リサンプリングと逆の処理後の熱変位量を熱変位補正部16へ出力する。 The thermal displacement estimation unit 15 estimates the amount of thermal displacement generated in the machine tool 2 using the learning model generated by the learning unit 12 and the estimation data received from the data selection unit 14. Specifically, the thermal displacement estimation unit 15 calculates the thermal displacement amount by inputting the estimation data input from the data selection unit 14 to the calculation formula indicating the learning model generated by the learning unit 12. .. In addition, the thermal displacement estimation unit 15 performs the process opposite to the resampling performed by the data selection unit 14 on the calculated thermal displacement amount, so that the thermal displacement estimation unit 15 outputs the thermal displacement amount output cycle to the temperature sensor. The thermal displacement amount after the process opposite to the resampling is output to the thermal displacement correction unit 16 in accordance with the temperature detection period of 29.
 熱変位補正部16は、熱変位推定部15で推定した熱変位量から算出した補正量で工作機械2への制御指令を補正する。詳細には、熱変位補正部16は、制御部13で生成された制御指令に対して、熱変位推定部15で推定された熱変位量を相殺する補正量を加え、補正量が加えられた制御指令を運転動作指令として工作機械2に出力する。具体的には、熱変位補正部16は、制御指令に含まれる各軸方向の位置指令に対して、熱変位推定部15で推定された各軸方向の熱変位量に-1を乗じた値を補正量として加える。別の例として、熱変位推定部15で推定された各軸方向の熱変位量に対して、予め熱変位補正部16に設定されている負の係数を乗じた値を補正量として算出する例も挙げられる。さらに、別の例として、予め熱変位補正部16に設定されている対応表に基づき、推定された熱変位量に対応する補正量を算出する例も挙げられる。 The thermal displacement correction unit 16 corrects the control command to the machine tool 2 with the correction amount calculated from the thermal displacement amount estimated by the thermal displacement estimation unit 15. Specifically, the thermal displacement correction unit 16 adds a correction amount that cancels the thermal displacement amount estimated by the thermal displacement estimation unit 15 to the control command generated by the control unit 13, and the correction amount is added. The control command is output to the machine tool 2 as a driving operation command. Specifically, the thermal displacement correction unit 16 multiplies the amount of thermal displacement in each axial direction estimated by the thermal displacement estimation unit 15 by −1 with respect to the position command in each axial direction included in the control command. Is added as a correction amount. As another example, an example in which a value obtained by multiplying the thermal displacement amount in each axial direction estimated by the thermal displacement estimation unit 15 by a negative coefficient preset in the thermal displacement correction unit 16 is calculated as the correction amount. Can also be mentioned. Further, as another example, there is also an example in which a correction amount corresponding to the estimated thermal displacement amount is calculated based on a correspondence table set in the thermal displacement correction unit 16 in advance.
 次に、数値制御装置1のハードウェア構成について説明する。図1に示したデータ収集部11、学習部12、制御部13、データ選択部14、熱変位推定部15および熱変位補正部16は処理回路により実現される。処理回路は、プロセッサを備える回路であってもよいし、専用ハードウェアであってもよい。 Next, the hardware configuration of the numerical control device 1 will be described. The data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 illustrated in FIG. 1 are realized by a processing circuit. The processing circuit may be a circuit including a processor or may be dedicated hardware.
 処理回路がプロセッサを備える回路である場合、処理回路は例えば図3に示した構成の処理回路である。図3は、処理回路の構成例を示す図である。処理回路200は、プロセッサ201およびメモリ202を備える。データ収集部11、学習部12、制御部13、データ選択部14、熱変位推定部15および熱変位補正部16が図3に示した処理回路200によって実現される場合、プロセッサ201が、メモリ202に格納されたプログラムを読み出して実行することにより、これらが実現される。すなわち、データ収集部11、学習部12、制御部13、データ選択部14、熱変位推定部15および熱変位補正部16が図3に示した処理回路200によって実現される場合、これらの機能は、ソフトウェアであるプログラムを用いて実現される。メモリ202はプロセッサ201の作業領域としても使用される。プロセッサ201は、CPU(Central Processing Unit)等である。メモリ202は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリー等の不揮発性または揮発性の半導体メモリ、磁気ディスク等が該当する。 When the processing circuit is a circuit including a processor, the processing circuit has the configuration shown in FIG. 3, for example. FIG. 3 is a diagram illustrating a configuration example of the processing circuit. The processing circuit 200 includes a processor 201 and a memory 202. When the data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 are realized by the processing circuit 200 illustrated in FIG. 3, the processor 201 causes the memory 202 to operate. These are realized by reading and executing the program stored in. That is, when the data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 are realized by the processing circuit 200 shown in FIG. , Is realized by using a program that is software. The memory 202 is also used as a work area of the processor 201. The processor 201 is a CPU (Central Processing Unit) or the like. The memory 202 corresponds to, for example, a RAM (Random Access Memory), a ROM (Read Only Memory), a nonvolatile or volatile semiconductor memory such as a flash memory, a magnetic disk, or the like.
 データ収集部11、学習部12、制御部13、データ選択部14、熱変位推定部15および熱変位補正部16を実現する処理回路が専用ハードウェアである場合、処理回路は、例えば、FPGA(Field Programmable Gate Array)、ASIC(Application Specific Integrated Circuit)である。なお、データ収集部11、学習部12、制御部13、データ選択部14、熱変位推定部15および熱変位補正部16は、プロセッサを備える処理回路および専用ハードウェアを組み合わせて実現されてもよい。データ収集部11、学習部12、制御部13、データ選択部14、熱変位推定部15および熱変位補正部16は、複数の処理回路により実現されてもよい。 When the processing circuit that realizes the data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 is dedicated hardware, the processing circuit is, for example, an FPGA ( These are Field Programmable Gate Array) and ASIC (Application Specific Integrated Circuit). The data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 may be realized by combining a processing circuit including a processor and dedicated hardware. .. The data collection unit 11, the learning unit 12, the control unit 13, the data selection unit 14, the thermal displacement estimation unit 15, and the thermal displacement correction unit 16 may be realized by a plurality of processing circuits.
 次に、本実施の形態の数値制御装置1の動作について説明する。まず、運転動作単位について説明する。図4は、工作機械2の熱的傾向に影響を与える代表的な機械要素の状態の変化を表す図である。図4には、工作機械2の構成要素である主軸21、送り軸22、クーラント装置27および冷却装置28のそれぞれの稼動状態とプログラム運転状態との時間的な推移の例が示されている。図4の横軸は時間を示している。プログラム運転状態は、プログラム運転中であるか否かを示している。プログラム運転は、数値制御装置1による加工プログラム3に従った制御の下で工作機械2が動作することである。切削加工では、例えば、工作機械2がある加工をするためのプログラム運転を行い、このプログラム運転が終了すると、作業者によってワークの取り換えなどの作業が行われ、その後、次の加工のためのプログラム運転が行われるといったような流れで作業が行われる。 Next, the operation of the numerical control device 1 according to the present embodiment will be described. First, the driving operation unit will be described. FIG. 4 is a diagram showing changes in the states of typical machine elements that affect the thermal tendency of the machine tool 2. FIG. 4 shows an example of a temporal transition between the operating state and the programmed operating state of each of the main shaft 21, the feed shaft 22, the coolant device 27, and the cooling device 28, which are the components of the machine tool 2. The horizontal axis of FIG. 4 indicates time. The program operating state indicates whether or not the program is operating. The program operation is to operate the machine tool 2 under the control according to the machining program 3 by the numerical controller 1. In the cutting process, for example, a program operation for performing a certain machining is performed by the machine tool 2, and when the program operation is completed, a worker performs work such as replacement of a work, and then a program for the next machining. Work is performed in a flow such as driving.
 図4に示した例では、時刻t1から時刻t3の間は、主軸21には工具#1が装着され、主軸モータ24は1分あたり1000回転の回転速度で回転する。図4において、「S1000」のように、Sと数字で表される文字は主軸モータ24の回転速度を示しており、Sが主軸モータ24であることを示し、Sの後に続く数値が回転速度を示している。図4では、回転速度は、1分あたりの回転回数である回転数により示されている。時刻t1から時刻t3の間に主軸21のシャフトは、主軸モータ24の発熱および主軸21のベアリングの摩擦熱によって伸長する。 In the example shown in FIG. 4, from time t1 to time t3, tool # 1 is mounted on the spindle 21, and the spindle motor 24 rotates at a rotation speed of 1000 rotations per minute. In FIG. 4, a character represented by S and a number, such as “S1000”, indicates the rotation speed of the spindle motor 24, S indicates that the spindle motor 24, and the numerical value following S indicates the rotation speed. Is shown. In FIG. 4, the rotation speed is indicated by the number of rotations, which is the number of rotations per minute. From time t1 to time t3, the shaft of the main shaft 21 expands due to heat generation of the main shaft motor 24 and friction heat of the bearing of the main shaft 21.
 時刻t3から時刻t4の間では、主軸モータ24は静止状態であるために、主軸21自体は発熱しない。時刻t4から時刻t7までの間では、主軸21には工具#2が装着され、1分あたり3000回転の回転速度で回転する。時刻t3からt4の間でも主軸21は発熱するので熱変位が発生するが、時刻t1から時刻t3とは異なる工具および異なる回転速度であるため、発熱の傾向は時刻t1から時刻t3までの間とは異なる。このように、主軸21の熱的な傾向は必ずしも一定ではなく、装着される工具、回転数等によって異なることがわかる。 Between time t3 and time t4, the spindle motor 24 is in a stationary state, so the spindle 21 itself does not generate heat. From time t4 to time t7, the tool # 2 is attached to the spindle 21 and rotates at a rotation speed of 3000 rotations per minute. Although the spindle 21 also generates heat from time t3 to t4, thermal displacement occurs, but the tendency of heat generation is different from time t1 to time t3 because of the different tool and different rotation speed from time t1 to time t3. Is different. As described above, it is understood that the thermal tendency of the main shaft 21 is not always constant, but varies depending on the mounted tool, the rotation speed, and the like.
 主軸21と同様に、送り軸22、クーラント装置27および冷却装置28においても運転状態の変化が生じるので、運転動作に応じて熱的な傾向は異なる。例えば、送り軸22では、時刻t1から時刻t2の間は、送り軸モータ26は1分あたり100回転の回転速度で回転し、時刻t2から時刻t3の間は、送り軸モータ26は1分あたり200回転の回転速度で回転する。図4において、「F100」のように、Fと数字で表される文字は送り軸モータ26の回転速度を示しており、Fが送り軸モータ26であることを示し、Fの後に続く数値が回転速度を示している。送り軸22では、時刻t1から時刻t2の間と時刻t2から時刻t3の間とでは、送り軸モータ26の回転速度が異なるので、発熱量が異なる。また、クーラント装置27がクーラントを吐出中であるか否かによりクーラントにより冷却される部分およびその周辺の温度が変化する。冷却装置28が稼動中であるか否かによっても、冷却装置28により冷却される部分およびその周辺の温度が変化する。 Like the main shaft 21, the feed shaft 22, the coolant device 27, and the cooling device 28 also change the operating state, so that the thermal tendency differs depending on the operating action. For example, in the feed shaft 22, the feed shaft motor 26 rotates at a rotation speed of 100 revolutions per minute from the time t1 to the time t2, and the feed shaft motor 26 per minute from the time t2 to the time t3. It rotates at a rotation speed of 200 rotations. In FIG. 4, a character represented by F and a number, such as “F100”, indicates the rotation speed of the feed shaft motor 26, F is the feed shaft motor 26, and the numerical value following F is The rotation speed is shown. In the feed shaft 22, since the rotation speed of the feed shaft motor 26 is different between time t1 and time t2 and between time t2 and time t3, the heat generation amount is different. Further, the temperature of the portion cooled by the coolant and its surroundings changes depending on whether or not the coolant device 27 is discharging the coolant. The temperature of the portion cooled by the cooling device 28 and its surroundings also change depending on whether or not the cooling device 28 is in operation.
 さらに、時刻t7以後はプログラム運転が終了しているので、加工部のドアの開閉、ワークの取り換えといった段取り替えが行われる可能性があり、工作機械2の熱的な環境は、プログラム運転中と異なる。以上から、工作機械2に発生する熱変位の傾向は、時刻t1から時刻t2までの区間、時刻t2から時刻t3までの区間、・・・、時刻t7以降のプログラム運転停止中の区間ごとに異なる。 Further, since the program operation is completed after the time t7, there is a possibility that setup change such as opening / closing of the door of the processing section and replacement of the work may be performed, and the thermal environment of the machine tool 2 is that the program operation is during the program operation. different. From the above, the tendency of thermal displacement generated in the machine tool 2 is different for each section from the time t1 to the time t2, the section from the time t2 to the time t3, ..., And the section where the program operation is stopped after the time t7. ..
 本実施の形態では、時刻t1から時刻t2までの区間、時刻t2から時刻t3までの区間、・・・、時刻t7以降のプログラム運転停止中の区間などのように、工作機械2の運転動作の異なる各区間を運転動作単位と定義する。本実施の形態の数値制御装置1のデータ収集部11は、制御部13から受け取った運転データをもとに、運転動作単位となる区間を決定する。詳細には、運転データから、運転動作の内容に変化のあった時刻を求め、この時刻を区切りとして運転動作単位となる区間を決定する。すなわち、学習用データの時間長である第1の時間長は、工作機械2に含まれる機械要素の内、少なくとも1つの機械要素の動作状態が変化するタイミングを区切りとして決定される。そして、データ収集部11は、温度データ、熱変位データおよび運転データを、運転動作単位となる区間単位で分割する。 In the present embodiment, the operation operation of the machine tool 2, such as the section from time t1 to time t2, the section from time t2 to time t3, ... Each different section is defined as a driving operation unit. The data collection unit 11 of the numerical control device 1 according to the present embodiment determines a section that is a driving operation unit based on the driving data received from the control unit 13. More specifically, the time at which the content of the driving action has changed is obtained from the driving data, and the section that is the driving action unit is determined by using this time as a delimiter. That is, the first time length, which is the time length of the learning data, is determined with the timing at which the operating state of at least one machine element of the machine tools 2 changes as a break. Then, the data collection unit 11 divides the temperature data, the thermal displacement data, and the operation data into section units that are operation operation units.
 運転データには、前述したように、加工プログラム3の解析結果、運転状態データおよび制御指令が含まれる。一般に、主軸モータ24の回転速度および送り軸モータ26の回転速度については、加工プログラム3の解析結果、制御指令および運転状態データのいずれにも含まれるので、データ収集部11は、加工プログラム3の解析結果、制御指令および運転状態データのいずれかに基づいて、主軸モータ24の回転速度および送り軸モータ26の回転速度を求めることができる。クーラント装置27および冷却装置28が稼動中であるか否かを示す情報は、運転状態データに含まれる。または、数値制御装置1がこれらの装置を制御する場合には、制御指令にこれらの稼動状態に関する指令も含まれるので、データ収集部11は、制御指令からクーラント装置27および冷却装置28の稼動状態を把握してもよい。なお、学習させる上で、各モータ、クーラント装置27および冷却装置28の動作の状態は制御指令にも含まれ、制御の結果として運転状態データにも含まれる。指令と結果とのどちらかだけを学習に用いてもよいが、工作機械2の運転状態データに加えてその指令値も一緒に学習させることで、より性能の高い学習モデルの生成が期待できる。 As described above, the operation data includes the analysis result of the machining program 3, the operation state data and the control command. Generally, the rotation speed of the spindle motor 24 and the rotation speed of the feed shaft motor 26 are included in both the analysis result of the machining program 3, the control command, and the operation state data. The rotation speed of the spindle motor 24 and the rotation speed of the feed shaft motor 26 can be obtained based on either the analysis result, the control command, or the operation state data. The information indicating whether the coolant device 27 and the cooling device 28 are in operation is included in the operation state data. Alternatively, when the numerical control device 1 controls these devices, the control command also includes commands relating to these operating states, so the data collecting unit 11 uses the control commands to determine the operating states of the coolant device 27 and the cooling device 28. You may grasp. For learning, the operating states of the motors, the coolant device 27, and the cooling device 28 are included in the control command and also included in the operating state data as a result of the control. Only one of the command and the result may be used for learning, but by learning the command value together with the operating state data of the machine tool 2, it is expected to generate a learning model with higher performance.
 なお、図4では工作機械2の構成要素の種類毎の状態変化について示したが、一般に工作機械2は複数の送り軸22を備える。また、工作機械2の機械要素の数に応じて冷却装置28を複数台備える場合がある。このような場合、各々の構成要素の状態が変化したタイミングで、各データを運転動作単位に分割することができる。 In addition, although FIG. 4 shows the state change for each type of the constituent elements of the machine tool 2, the machine tool 2 generally includes a plurality of feed shafts 22. Further, a plurality of cooling devices 28 may be provided according to the number of machine elements of the machine tool 2. In such a case, each data can be divided into driving operation units at the timing when the state of each component changes.
 区間単位で分割したデータは、第1の時間長である区間の長さすなわち時間幅が一定ではない。例えば、図4に示した例では、時刻t1から時刻t2までの時間幅Tw1と、時刻t2から時刻t3までの時間幅Tw2とは異なっている。区間の時間幅が一定でない場合、各区間に含まれるデータのサンプリング点数も一定ではない。区間ごとのサンプリング点数が異なると、学習部12における学習の処理が煩雑となる。 ∙ The length of the section that is the first time length, that is, the time width, is not constant for the data divided by section. For example, in the example shown in FIG. 4, the time width Tw1 from time t1 to time t2 and the time width Tw2 from time t2 to time t3 are different. When the time width of the section is not constant, the number of sampling points of the data included in each section is also not constant. If the number of sampling points for each section is different, the learning process in the learning unit 12 becomes complicated.
 したがって、本実施の形態では、データ収集部11は、図5,6に示すように、各区間に対応する学習用データが同じサンプリング点数になるように、区間単位で分割した温度データおよび熱変位データをリサンプリングして学習用データを生成する。すなわち、データ収集部11は、学習用データを構成するデータのサンプリング点数が学習用データ間で同一となるように、温度データおよび変位データをリサンプリングして学習用データを生成する。図5は、時刻t1から時刻t2までの時間幅Tw1の区間の温度データをリサンプリングした例を示し、図6は、時刻t2から時刻t3までの時間幅Tw2の区間の温度データをリサンプリングした例を示している。図5に示した時刻t1から時刻t2までの区間のサンプリング点数はL1であり、図6に示した時刻t2から時刻t3までの区間のサンプリング点数はL2である。温度データは一定周期で温度検出を行っているため、時間幅が長い区間ほど、該区間に含まれる温度データのサンプリング点数は多くなる。図4から図6に示したように時間幅Tw2は時間幅Tw1より長いため、L2はL1より大きな値である。 Therefore, in the present embodiment, as shown in FIGS. 5 and 6, the data collection unit 11 divides the temperature data and the thermal displacement divided into sections so that the learning data corresponding to each section has the same sampling points. Resampling the data to generate training data. That is, the data collection unit 11 resamples the temperature data and the displacement data to generate learning data so that the number of sampling points of the data forming the learning data is the same between the learning data. FIG. 5 shows an example of re-sampling the temperature data in the section of time width Tw1 from time t1 to time t2, and FIG. 6 resamples the temperature data in the section of time width Tw2 from time t2 to time t3. An example is shown. The sampling score of the section from time t1 to time t2 shown in FIG. 5 is L1, and the sampling score of the section from time t2 to time t3 shown in FIG. 6 is L2. Since the temperature data is detected at a constant cycle, the longer the time interval, the greater the number of sampling points of the temperature data included in the interval. Since the time width Tw2 is longer than the time width Tw1 as shown in FIGS. 4 to 6, L2 is a value larger than L1.
 データ収集部11は、図5,6に示すように、時刻t1から時刻t2までの区間のサンプリング点数と時刻t2から時刻t3までの区間のサンプリング点数とが、いずれもLになるようにリサンプリングを行う。なお、リサンプリングの方法は一般的な方法を用いることができ、リサンプリングの方法に特に制約はない。データ収集部11は、温度データと同様に熱変位データもリサンプリングする。データ収集部11は、運転データについてもリサンプリングしてもよいが、運転データは温度データおよび熱変位データを運転動作の内容ごとに判別するために用いられるものであるため、運転動作単位でデータが存在すればよくリサンプリングする必要はない。 As shown in FIGS. 5 and 6, the data collection unit 11 performs resampling such that the sampling points in the section from time t1 to time t2 and the sampling points in the section from time t2 to time t3 are both L. I do. A general method can be used as the resampling method, and the resampling method is not particularly limited. The data collection unit 11 resamples the thermal displacement data as well as the temperature data. The data collection unit 11 may resample the operation data as well, but since the operation data is used to determine the temperature data and the thermal displacement data for each content of the operation operation, the data is acquired in operation operation units. Does not need to be resampled.
 次に、学習部12による学習について説明する。学習部12は、データ収集部11から受け取った学習用データを用いて、熱変位量に関する学習モデルを生成する。学習モデルは、例えば、以下の式(1)に示す数理多項式である。 Next, learning by the learning unit 12 will be described. The learning unit 12 uses the learning data received from the data collection unit 11 to generate a learning model regarding the thermal displacement amount. The learning model is, for example, a mathematical polynomial shown in the following formula (1).
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 式(1)において、Nは、温度センサ29の数であり、Lは、1つの学習用データ内のサンプリング点数であり、d,d,dは、それぞれX,Y,Z軸方向の熱変位量である。また、jは、時刻をサンプリング点単位で離散化して番号で表したものであり、Ti,jは、時刻jにおけるi番目の温度センサ29の温度データを示し、a,b,c,C,C,Cはモデルパラメータである。iは温度センサ29を識別するための温度センサ29の番号を示す。 In the formula (1), N is the number of the temperature sensor 29, L is the number of sampling points in one of the learning data, d x, d y, d z are each X, Y, Z axis direction Is the amount of thermal displacement of. In addition, j represents the time discretized in units of sampling points and is represented by a number. T i, j represents the temperature data of the i-th temperature sensor 29 at the time j, and a i , b i , c. i , C 1 , C 2 , and C 3 are model parameters. i indicates the number of the temperature sensor 29 for identifying the temperature sensor 29.
 学習部12は、学習用データを用いて上記式(1)内のモデルパラメータを同定する。モデルパラメータの同定の方法としては、最小二乗法などの公知の同定方法を用いることができる。学習部12は、運転データ内の運転動作単位を決定するデータの値が同じものが同じグループとなるように、グループ分けし、グループごとに、対応する学習用データを用いてモデルパラメータを同定することで、運転動作の内容ごとに、学習モデルを構築することができる。なお、学習モデルである数理多項式は、上記(1)に限定されるものではなく、別の数式であってもよい。 The learning unit 12 identifies the model parameter in the above formula (1) using the learning data. As a method of identifying the model parameter, a known identification method such as the least square method can be used. The learning unit 12 divides the driving data into the same group having the same value of the data that determines the driving motion unit, and identifies the model parameter for each group using the corresponding learning data. Therefore, the learning model can be constructed for each content of the driving motion. The mathematical polynomial that is the learning model is not limited to the above (1), and may be another mathematical expression.
 学習方法の別の例として、機械学習手法の一つであるニューラルネットワークを用いる方法がある。ニューラルネットワークを用いる場合、運転動作の内容ごとに学習モデルを構築することなく、運転動作の内容に関わらず、単一の学習モデルで温度データと熱変位データの関係を表現することができる。図7は、ニューラルネットワークのモデル図である。図7では、温度データを入力とする入力層と、熱変位データを出力する出力層と、入力層から出力層に信号を伝播する1層以上の中間層から構成されるネットワーク構造を示している。各層に含まれるノードの入出力関係は以下の式(2)で表される。 Another example of a learning method is a method that uses a neural network, which is one of machine learning methods. When the neural network is used, the relationship between the temperature data and the thermal displacement data can be expressed by a single learning model regardless of the content of the driving operation, without constructing a learning model for each content of the driving operation. FIG. 7 is a model diagram of the neural network. FIG. 7 shows a network structure including an input layer that inputs temperature data, an output layer that outputs thermal displacement data, and one or more intermediate layers that propagate signals from the input layer to the output layer. .. The input / output relationship of the nodes included in each layer is expressed by the following equation (2).
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
 式(2)において、xm,kは、m番目のノードからk番目のノードに入力される信号を示し、yは、k番目のノードから出力される信号を示す。また、wm,kは、m番目のノードとk番目のノードとの重み係数であり、bは、k番目のノードのバイアスであり、fは活性化関数を示す。活性化関数fには、例えばシグモイド関数、または正規化線形関数を用いることができる。図7に示すニューラルネットワークは、誤差逆伝播法による学習法を用いることで、学習用データに含まれる温度データと熱変位量の関係を学習することができる。なお、ここでは、図7に示したような多層パーセプトロン型のニューラルネットワークを用いた学習モデルについて述べたが、畳み込みニューラルネットワークを用いてもよい。別の例として、リカレントニューラルネットワークを用いてもよい。 In Expression (2), x m, k represents a signal input from the m-th node to the k-th node, and y k represents a signal output from the k-th node. Also, w m, k is a weighting coefficient for the m-th node and the k-th node, b k is a bias for the k-th node, and f is an activation function. As the activation function f, for example, a sigmoid function or a normalized linear function can be used. The neural network shown in FIG. 7 can learn the relationship between the temperature data included in the learning data and the thermal displacement amount by using the learning method based on the error back propagation method. Although a learning model using a multilayer perceptron type neural network as shown in FIG. 7 has been described here, a convolutional neural network may be used. As another example, a recurrent neural network may be used.
 次に、数値制御装置1の学習処理と熱変位の補正処理とについて説明する。図8は、数値制御装置1における学習処理手順の一例を示すフローチャートである。数値制御装置1のデータ収集部11は、温度データと熱変位データと運転データとを収集し、学習用データを生成する(ステップS1)。具体的には、データ収集部11は、工作機械2から温度データおよび熱変位データを取得し、制御部13から運転データを取得する。前述したように、データ収集部11は、運転動作単位で各データを分割し、分割した温度データおよび熱変位データをリサンプリングすることにより学習用データを生成する。 Next, the learning process and the thermal displacement correction process of the numerical controller 1 will be described. FIG. 8 is a flowchart showing an example of a learning processing procedure in the numerical controller 1. The data collecting unit 11 of the numerical controller 1 collects temperature data, thermal displacement data, and operation data, and generates learning data (step S1). Specifically, the data collection unit 11 acquires temperature data and thermal displacement data from the machine tool 2 and operation data from the control unit 13. As described above, the data collection unit 11 divides each data in driving operation units and resamples the divided temperature data and thermal displacement data to generate learning data.
 学習部12は、データ収集部11で生成された学習用データから温度データと熱変位のデータの関係を学習し、学習モデルを生成する(ステップS2)。以上の処理により、温度データと熱変位のデータの関係を学習した学習モデルが生成される。数値制御装置1は、上記の学習動作を種々の運転動作に対して実行することで、種々の運転動作における温度データと熱変位データの関係を学習した学習モデルを構築する。 The learning unit 12 learns the relationship between the temperature data and the thermal displacement data from the learning data generated by the data collection unit 11 and generates a learning model (step S2). Through the above processing, a learning model that learns the relationship between the temperature data and the thermal displacement data is generated. The numerical controller 1 executes the learning operation described above for various driving operations to build a learning model that learns the relationship between temperature data and thermal displacement data in various driving operations.
 次に、熱変位の補正処理について説明する。図9は、数値制御装置1における熱変位量の推定処理手順の一例を示すフローチャートである。数値制御装置1のデータ選択部14は、温度データと運転データを取得し、推定用データを生成する(ステップS11)。具体的には、データ選択部14は、工作機械2から温度データを取得し、制御部13から運転データを取得する。そして、データ選択部14は、データ収集部11と同様に、運転データに基づいて、第2の時間長である推定用データの時間長を決定する。第2の時間長は、工作機械2に含まれる機械要素の内、少なくとも1つの機械要素の動作状態が変化するタイミングを区切りとして決定される。データ選択部14は、運転動作単位で運転データおよび温度データを分割し、分割した温度データをリサンプリングし、リサンプリングされたデータと分割された運転データとを推定用データとして熱変位推定部15へ出力する。すなわち、データ選択部14は、推定用データを構成するデータのサンプリング点数が推定用データ間で同一となるように、温度データをリサンプリングして推定用データを生成する。 Next, the thermal displacement correction process will be described. FIG. 9 is a flowchart showing an example of a thermal displacement amount estimation processing procedure in the numerical controller 1. The data selection unit 14 of the numerical control device 1 acquires the temperature data and the operation data and generates estimation data (step S11). Specifically, the data selection unit 14 acquires temperature data from the machine tool 2 and operation data from the control unit 13. Then, similarly to the data collection unit 11, the data selection unit 14 determines the time length of the estimation data, which is the second time length, based on the operation data. The second time length is determined with the timing at which the operating state of at least one of the machine elements included in the machine tool 2 changes as a delimiter. The data selection unit 14 divides the operation data and the temperature data by the operation operation unit, resamples the divided temperature data, and uses the resampled data and the divided operation data as estimation data, the thermal displacement estimation unit 15 Output to. That is, the data selection unit 14 resamples the temperature data and generates the estimation data so that the number of sampling points of the data forming the estimation data is the same between the estimation data.
 熱変位推定部15は、推定用データと学習モデルを用いて、熱変位量を推定する(ステップS12)。学習モデルは、学習部12から熱変位推定部15へ入力される。熱変位推定部15は、推定した熱変位量を熱変位補正部16に出力する。熱変位推定部15は、算出した熱変位量に対してデータ選択部14で行ったリサンプリングと逆の処理を行うことで、熱変位推定部15における熱変位量の出力周期を温度センサ29の温度検出周期に合わせる。ここでは、温度センサ29の温度検出周期と制御指令の出力周期が同じであることを前提としており、熱変位推定部15は、熱変位量の出力周期を制御指令の出力周期にあわせるために、リサンプリングと逆の処理を行っている。 The thermal displacement estimation unit 15 estimates the thermal displacement amount using the estimation data and the learning model (step S12). The learning model is input from the learning unit 12 to the thermal displacement estimation unit 15. The thermal displacement estimation unit 15 outputs the estimated thermal displacement amount to the thermal displacement correction unit 16. The thermal displacement estimation unit 15 performs the process opposite to the resampling performed by the data selection unit 14 on the calculated thermal displacement amount so that the output cycle of the thermal displacement amount in the thermal displacement estimation unit 15 is calculated by the temperature sensor 29. Match the temperature detection cycle. Here, it is premised that the temperature detection cycle of the temperature sensor 29 and the output cycle of the control command are the same, and the thermal displacement estimation unit 15 adjusts the output cycle of the thermal displacement amount to the output cycle of the control command. The reverse process of resampling is performed.
 次に、熱変位補正部16が、制御指令に対して熱変位量を相殺する補正量を加える(ステップS13)。具体的には、熱変位補正部16は、制御部13から受け取った制御指令に対して、熱変位量を相殺する補正量を加え、補正量を加えた結果を運転動作指令として工作機械2に出力する。以上の処理により、数値制御装置1は、制御指令に対して熱変位量を補正する処理を施すことができる。このため、数値制御装置1は、熱変位によって生じる加工誤差を低減することができる。 Next, the thermal displacement correction unit 16 adds a correction amount that cancels the thermal displacement amount to the control command (step S13). Specifically, the thermal displacement correction unit 16 adds a correction amount that cancels the thermal displacement amount to the control command received from the control unit 13, and adds the correction amount to the machine tool 2 as a driving operation command. Output. Through the above processing, the numerical control device 1 can perform the processing of correcting the thermal displacement amount with respect to the control command. Therefore, the numerical control device 1 can reduce a processing error caused by thermal displacement.
 以上説明したように、本実施の形態の数値制御装置1は、データ収集部11が温度データと熱変位データを運転動作単位に分割することで学習用データを生成し、学習部12が学習用データから温度と熱変位の関係を学習する。さらに、本実施の形態の数値制御装置1は、データ選択部14が温度データを運転動作単位に分割することで推定用データを生成し、熱変位推定部15が推定用データと学習モデルを用いて熱変位量を推定するようにした。このため、運転動作単位で運転動作の内容に適した精度の高い学習モデルを生成することができる。すなわち、本実施の形態の数値制御装置1は、温度と熱変位量の関係を精度良く学習することができ、これにより、精度良く熱変位量を推定することができる。したがって、本実施の形態の数値制御装置1は、運転動作の内容を考慮せずに一定の期間を単位としたデータを用いて学習モデルを生成する例に比べて、熱変位量の推定精度を向上させることができる。このため、本実施の形態の数値制御装置1は、推定精度の高い熱変位量の推定値を用いて制御指令を補正することができるため、加工誤差を低減することができる。 As described above, in the numerical control device 1 according to the present embodiment, the data collecting unit 11 divides the temperature data and the thermal displacement data into driving operation units to generate learning data, and the learning unit 12 performs learning. Learn the relationship between temperature and thermal displacement from the data. Further, in the numerical control device 1 according to the present embodiment, the data selection unit 14 generates estimation data by dividing the temperature data into driving operation units, and the thermal displacement estimation unit 15 uses the estimation data and the learning model. To estimate the amount of thermal displacement. Therefore, it is possible to generate a highly accurate learning model suitable for the content of the driving motion for each driving motion. That is, the numerical control device 1 according to the present embodiment can learn the relationship between the temperature and the thermal displacement amount with high accuracy, and thus can accurately estimate the thermal displacement amount. Therefore, the numerical control device 1 according to the present embodiment has a higher estimation accuracy of the thermal displacement amount as compared with the example in which the learning model is generated by using the data in a unit of a fixed period without considering the content of the driving operation. Can be improved. Therefore, the numerical control device 1 according to the present embodiment can correct the control command using the estimated value of the thermal displacement amount with high estimation accuracy, and can reduce the processing error.
 なお、本実施の形態では、工具の回転によりワークを切削する構成の工作機械2について述べたが、本発明が適用できる工作機械はこれに限定されない。例えば、旋盤のように工具は固定され、ワークが回転する構成の工作機械でも本実施の形態と同等の効果を奏することができる。 In the present embodiment, the machine tool 2 configured to cut the work by rotating the tool has been described, but the machine tool to which the present invention is applicable is not limited to this. For example, a machine tool having a structure in which a tool is fixed and a work is rotated like a lathe can achieve the same effect as that of the present embodiment.
 また、本実施の形態では、温度と熱変位量の関係を学習し、検出された温度と学習モデルとを用いて熱変位量を推定した。これに限らず、温度に加え各駆動軸の位置および回転速度のうちの少なくとも1つと熱変位量の関係を学習し、温度と各駆動軸の位置および回転速度のうちの少なくとも1つと学習モデルとを用いて熱変位量を推定してもよい。 In addition, in the present embodiment, the relationship between the temperature and the thermal displacement amount is learned, and the thermal displacement amount is estimated using the detected temperature and the learning model. Not limited to this, the relationship between the temperature and at least one of the position and rotation speed of each drive shaft and the amount of thermal displacement is learned, and at least one of the temperature and the position and rotation speed of each drive shaft and the learning model are learned. May be used to estimate the thermal displacement amount.
 また、以上の説明では、温度センサ29および変位センサ30が工作機械2の構成要素である例を説明したが、温度センサ29および変位センサ30のうちの少なくとも一部が、工作機械2の構成要素ではなく、工作機械2に後から設けられるセンサであってもよい。 Further, in the above description, an example in which the temperature sensor 29 and the displacement sensor 30 are components of the machine tool 2 has been described, but at least a part of the temperature sensor 29 and the displacement sensor 30 is a component of the machine tool 2. Instead, it may be a sensor provided later on the machine tool 2.
 また、以上の説明では、数値制御装置1が学習モデルを生成するようにしたが、データ収集部11および学習部12を、数値制御装置1とは別の学習装置が備えるようにしてもよい。この場合、学習装置が、数値制御装置1から運転データを受け取り、工作機械2から温度データおよび熱変位データを受け取ることになる。学習装置内のデータ収集部11および学習部12は、上述した例と同様の動作を行う。学習装置は、学習部12が生成した学習モデルを数値制御装置1へ出力する。また、学習部12を、数値制御装置1とは別の学習装置が備えるようにしてもよい。この場合、学習装置には、数値制御装置1から運転データおよび学習用データが入力され、学習装置は、学習モデルを数値制御装置1へ出力する。 Further, in the above description, the numerical control device 1 is configured to generate the learning model, but the data collection unit 11 and the learning unit 12 may be provided in a learning device different from the numerical control device 1. In this case, the learning device receives the operation data from the numerical control device 1 and the temperature data and the thermal displacement data from the machine tool 2. The data collection unit 11 and the learning unit 12 in the learning device perform the same operation as in the above-described example. The learning device outputs the learning model generated by the learning unit 12 to the numerical control device 1. The learning unit 12 may be included in a learning device other than the numerical control device 1. In this case, the learning data is input to the learning device from the numerical control device 1, and the learning device outputs the learning model to the numerical control device 1.
 以上の実施の形態に示した構成は、本発明の内容の一例を示すものであり、別の公知の技術と組み合わせることも可能であるし、本発明の要旨を逸脱しない範囲で、構成の一部を省略、変更することも可能である。 The configurations described in the above embodiments show an example of the content of the present invention, and can be combined with another known technique, and the configurations of the configurations are possible without departing from the gist of the present invention. It is also possible to omit or change parts.
 1 数値制御装置、2 工作機械、3 加工プログラム、11 データ収集部、12 学習部、13 制御部、14 データ選択部、15 熱変位推定部、16 熱変位補正部、21 主軸、22-1~22-3 送り軸、23 機構要素、24 主軸モータ、25-1~25-3 送り軸機構、26-1~26-3 送り軸モータ、27 クーラント装置、28 冷却装置、29 温度センサ、30 変位センサ。 1 numerical control device, 2 machine tools, 3 machining programs, 11 data collection unit, 12 learning unit, 13 control unit, 14 data selection unit, 15 thermal displacement estimation unit, 16 thermal displacement correction unit, 21 spindle, 22-1 ~ 22-3 feed shaft, 23 mechanical elements, 24 spindle motor, 25-1 to 25-3 feed shaft mechanism, 26-1 to 26-3 feed shaft motor, 27 coolant device, 28 cooling device, 29 temperature sensor, 30 displacement Sensor.

Claims (11)

  1.  工作機械を制御する数値制御装置であって、
     前記工作機械の温度と前記工作機械の熱変位量との関係の学習に用いられる学習用データの時間長である第1の時間長を、前記工作機械の運転動作の内容を示す運転データに基づいて決定し、決定した前記第1の時間長に基づいて、前記工作機械の温度を示す温度データと前記工作機械の変位を示す変位データと前記運転データとを含む前記学習用データを生成するデータ生成部と、
     前記学習用データを用いて、前記工作機械の温度と前記工作機械の熱変位量との関係を学習して学習モデルを生成する学習部と、
     を備えることを特徴とする数値制御装置。
    A numerical control device for controlling a machine tool,
    The first time length, which is the time length of the learning data used for learning the relationship between the temperature of the machine tool and the amount of thermal displacement of the machine tool, is based on the operation data indicating the content of the operation of the machine tool. Data for generating the learning data including temperature data indicating the temperature of the machine tool, displacement data indicating the displacement of the machine tool, and the operation data based on the determined first time length. A generator,
    A learning unit that learns the relationship between the temperature of the machine tool and the amount of thermal displacement of the machine tool by using the learning data, and generates a learning model;
    A numerical control device comprising:
  2.  前記運転データに基づいて熱変位の推定に用いられる推定用データの時間長である第2の時間長を決定し、決定した前記第2の時間長に基づいて、前記温度データと前記運転データとを含む前記推定用データを生成するデータ選択部と、
     前記学習部で生成された前記学習モデルと前記推定用データとを用いて、前記工作機械に生じる熱変位量を推定する熱変位推定部と、
     前記熱変位推定部で推定した熱変位量から算出した補正量で前記工作機械への制御指令を補正する熱変位補正部と、
     を備えることを特徴とする請求項1に記載の数値制御装置。
    A second time length, which is the time length of the estimation data used for estimating the thermal displacement, is determined based on the operation data, and the temperature data and the operation data are determined based on the determined second time length. A data selection unit that generates the estimation data including
    Using the learning model and the estimation data generated by the learning unit, a thermal displacement estimation unit that estimates the amount of thermal displacement that occurs in the machine tool,
    A thermal displacement correction unit that corrects a control command to the machine tool with a correction amount calculated from the thermal displacement amount estimated by the thermal displacement estimation unit,
    The numerical controller according to claim 1, further comprising:
  3.  前記第2の時間長は、前記工作機械に含まれる機械要素の内、少なくとも1つの機械要素の動作状態が変化するタイミングを区切りとして決定されることを特徴とする請求項2に記載の数値制御装置。 The numerical control according to claim 2, wherein the second time length is determined using a timing at which an operation state of at least one machine element among machine elements included in the machine tool changes as a delimiter. apparatus.
  4.  前記データ選択部は、前記推定用データを構成するデータのサンプリング点数が前記推定用データ間で同一となるように、前記温度データをリサンプリングして前記推定用データを生成することを特徴とする請求項2または3に記載の数値制御装置。 The data selection unit resamples the temperature data so as to generate the estimation data so that the number of sampling points of the data forming the estimation data is the same between the estimation data. The numerical controller according to claim 2.
  5.  前記第1の時間長は、前記工作機械に含まれる機械要素の内、少なくとも1つの機械要素の動作状態が変化するタイミングを区切りとして決定されることを特徴とする請求項1から4のいずれか1つに記載の数値制御装置。 5. The first time length is determined using a timing at which an operation state of at least one machine element of machine elements included in the machine tool changes as a delimiter. Numerical control device according to one.
  6.  前記データ生成部は、前記学習用データを構成するデータのサンプリング点数が前記学習用データ間で同一となるように、前記温度データおよび前記変位データをリサンプリングして前記学習用データを生成することを特徴とする請求項1から3のいずれか1つに記載の数値制御装置。 The data generation unit resamples the temperature data and the displacement data to generate the learning data so that the number of sampling points of the data forming the learning data is the same between the learning data. The numerical controller according to any one of claims 1 to 3, characterized in that.
  7.  前記工作機械を制御するための制御指令を生成する制御部、
     を備え、
     前記運転データは、前記制御指令と、加工プログラムを解析した結果である解析結果と、前記工作機械の動作状態の検出結果を示す運転状態データとを含むことを特徴とする請求項1から6のいずれか1つに記載の数値制御装置。
    A control unit for generating a control command for controlling the machine tool,
    Equipped with
    7. The operation data includes the control command, an analysis result that is a result of analyzing a machining program, and operation state data that indicates a detection result of an operation state of the machine tool. Numerical control device described in any one.
  8.  前記運転状態データは、前記工作機械が備えるモータの位置および速度および電流のうちの少なくとも1つを含むことを特徴とする請求項7に記載の数値制御装置。 The numerical control device according to claim 7, wherein the operating state data includes at least one of a position, a speed, and a current of a motor included in the machine tool.
  9.  前記解析結果は、主軸への回転数指令、送り軸への位置指令、送り軸への速度指令、工具番号、クーラントの射出指令、およびクーラントの停止指令、のうちの少なくとも1つを表す情報を含むことを特徴とする請求項7または8に記載の数値制御装置。 The analysis result includes information indicating at least one of a rotation speed command to the spindle, a position command to the feed axis, a speed command to the feed axis, a tool number, a coolant injection command, and a coolant stop command. 9. The numerical control device according to claim 7, further comprising:
  10.  工作機械の温度と工作機械の熱変位量との関係の学習に用いられる学習用データの時間長である第1の時間長を、前記工作機械の運転動作の内容を示す運転データに基づいて決定し、決定した前記第1の時間長に基づいて、前記工作機械の温度を示す温度データと前記工作機械の変位を示す変位データと前記運転データとを含む前記学習用データを生成するデータ生成部と、
     前記学習用データを用いて、前記工作機械の温度と前記工作機械の熱変位量との関係を学習して学習モデルを生成する学習部と、
     を備えることを特徴とする学習装置。
    The first time length, which is the time length of the learning data used for learning the relationship between the temperature of the machine tool and the thermal displacement of the machine tool, is determined based on the operation data indicating the content of the operation of the machine tool. Then, based on the determined first time length, a data generation unit that generates the learning data including temperature data indicating the temperature of the machine tool, displacement data indicating the displacement of the machine tool, and the operation data. When,
    A learning unit that learns the relationship between the temperature of the machine tool and the amount of thermal displacement of the machine tool by using the learning data, and generates a learning model;
    A learning device comprising:
  11.  工作機械を制御する数値制御装置における学習方法であって、
     前記工作機械の温度と前記工作機械の熱変位量との関係の学習に用いられる学習用データの時間長である第1の時間長を、前記工作機械の運転動作の内容を示す運転データに基づいて決定し、前記第1の時間長に基づいて、前記工作機械の温度を示す温度データと前記工作機械の変位を示す変位データと前記運転データとを含む前記学習用データを生成するデータ生成ステップと、
     前記学習用データを用いて、前記工作機械の温度と前記工作機械の熱変位量との関係を学習して学習モデルを生成する学習ステップと、
     を含むことを特徴とする学習方法。
    A learning method in a numerical control device for controlling a machine tool, comprising:
    The first time length, which is the time length of the learning data used for learning the relationship between the temperature of the machine tool and the amount of thermal displacement of the machine tool, is based on the operation data indicating the content of the operation of the machine tool. And a data generating step of generating the learning data including temperature data indicating the temperature of the machine tool, displacement data indicating the displacement of the machine tool, and the operation data based on the first time length. When,
    A learning step of generating a learning model by learning the relationship between the temperature of the machine tool and the amount of thermal displacement of the machine tool using the learning data;
    A learning method characterized by including.
PCT/JP2018/040500 2018-10-31 2018-10-31 Numerical control device, learning device, and learning method WO2020090030A1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201880098973.XA CN112912803A (en) 2018-10-31 2018-10-31 Numerical control device, learning device, and learning method
DE112018008027.7T DE112018008027T5 (en) 2018-10-31 2018-10-31 Numerical control device, learning device and learning method
JP2019516736A JP6556413B1 (en) 2018-10-31 2018-10-31 Numerical control device, learning device, and learning method
PCT/JP2018/040500 WO2020090030A1 (en) 2018-10-31 2018-10-31 Numerical control device, learning device, and learning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/040500 WO2020090030A1 (en) 2018-10-31 2018-10-31 Numerical control device, learning device, and learning method

Publications (1)

Publication Number Publication Date
WO2020090030A1 true WO2020090030A1 (en) 2020-05-07

Family

ID=67539869

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/040500 WO2020090030A1 (en) 2018-10-31 2018-10-31 Numerical control device, learning device, and learning method

Country Status (4)

Country Link
JP (1) JP6556413B1 (en)
CN (1) CN112912803A (en)
DE (1) DE112018008027T5 (en)
WO (1) WO2020090030A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023228253A1 (en) * 2022-05-23 2023-11-30 三菱電機株式会社 Thermal displacement model training device, thermal displacement estimation device, processing system, and processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003094291A (en) * 2001-09-27 2003-04-03 Kanto Seiki Kk Thermal displacement correction method and device for machine tool
JP2016221593A (en) * 2015-05-27 2016-12-28 ブラザー工業株式会社 Machine tool, arithmetic method, and computer program
JP2018111145A (en) * 2017-01-10 2018-07-19 ファナック株式会社 Mechanical learning device of machine tool and thermal displacement correction device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3413068B2 (en) * 1997-08-19 2003-06-03 オークマ株式会社 Estimation method of thermal displacement of machine tools
JP4488564B2 (en) * 1999-11-17 2010-06-23 関東精機株式会社 Method for suppressing thermal deformation of machine tool and temperature control device
JP3405965B2 (en) * 2000-07-06 2003-05-12 ファナック株式会社 Thermal displacement compensation method for machine tools
JP2009214283A (en) * 2008-03-13 2009-09-24 Brother Ind Ltd Thermal displacement correction method of machine tool, thermal displacement correction device and program for thermal displacement correction of the same
JP4917665B1 (en) * 2010-11-11 2012-04-18 ファナック株式会社 Thermal displacement correction method and thermal displacement correction apparatus for machine tool
JP6001211B1 (en) * 2014-10-29 2016-10-05 ヤマザキマザック株式会社 Machine tool with thermal displacement correction amount setting change device
JP6564412B2 (en) * 2017-03-21 2019-08-21 ファナック株式会社 Machine learning device and thermal displacement correction device
JP6464220B2 (en) * 2017-03-21 2019-02-06 ファナック株式会社 Machine learning device and thermal displacement correction device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003094291A (en) * 2001-09-27 2003-04-03 Kanto Seiki Kk Thermal displacement correction method and device for machine tool
JP2016221593A (en) * 2015-05-27 2016-12-28 ブラザー工業株式会社 Machine tool, arithmetic method, and computer program
JP2018111145A (en) * 2017-01-10 2018-07-19 ファナック株式会社 Mechanical learning device of machine tool and thermal displacement correction device

Also Published As

Publication number Publication date
JPWO2020090030A1 (en) 2021-02-15
DE112018008027T5 (en) 2021-06-17
CN112912803A (en) 2021-06-04
JP6556413B1 (en) 2019-08-07

Similar Documents

Publication Publication Date Title
US9956660B2 (en) Controller for a machine tool to perform efficient warm-up control
JP6469065B2 (en) Machine learning device and machining time prediction device
US9945799B2 (en) Thermal displacement correction device for machine tool
JP5905158B2 (en) Numerical controller
EP3168001B1 (en) Machine tool equipped with device for changing setting of thermal displacement correction amount
EP1650620B1 (en) Method and apparatus for correcting thermal displacement of machine tool
JP4469325B2 (en) Thermal displacement correction device
JP6443311B2 (en) Control device, control program, and recording medium
JP5803261B2 (en) Thermal displacement correction method and thermal displacement correction apparatus for machine tool
JP2018111145A (en) Mechanical learning device of machine tool and thermal displacement correction device
CN111052015B (en) Numerical control system and motor control device
JP2011072178A (en) Controller of electric motor having function of estimating inertia and friction simultaneously
JP2012254499A (en) Device and method for detecting abnormal machining of machine tool
JP2019146421A (en) Failure predicting device and mechanical learning device
JP7303065B2 (en) Machine learning device, control system and machine learning method
WO2019244638A1 (en) Positioning system, monitor device, monitor method, and program
JP2019152936A (en) Machine tool machining simulation device
WO2020090030A1 (en) Numerical control device, learning device, and learning method
JP6743238B1 (en) Variation amount estimating device and correction amount calculating device in machine tool
JP2019150932A (en) Collison position estimation device and machine learning device
JP2018043317A (en) Machine tool
WO2023228253A1 (en) Thermal displacement model training device, thermal displacement estimation device, processing system, and processing method
JP2018067210A (en) Numerical control
JP6378249B2 (en) Numerical control device with machining time prediction function considering servo control and machine motion delay
Tan et al. Calibration of single-axis nanopositioning cell subjected to thermal disturbance

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019516736

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18939029

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 18939029

Country of ref document: EP

Kind code of ref document: A1