Machine Learning Equipment
The machine learning device optimizes swing conditions for oscillating cutting by using supervised or reinforcement learning to improve surface roughness and roundness, addressing the challenges of deteriorated evaluation data in oscillating cutting methods.
Patent Information
- Application Number
- JP2022575565
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-01-14
- Filing Date
- 2022-01-07
- Publication Date
- 2024-08-21
- Estimated Expiration
- 2042-01-07
AI Technical Summary
Oscillating cutting methods result in deteriorated evaluation data such as surface roughness and dimensional accuracy due to complex mechanisms involving vibration and changes in cutting amount, making it difficult to set optimal swing conditions for the tool and workpiece.
A machine learning device that learns swing conditions for a machine tool through supervised or reinforcement learning, using setting conditions and evaluation data to optimize surface roughness or roundness by constructing a learning model that outputs optimal swing conditions.
The machine learning device automates the setting of swing conditions, reducing operator burden and improving evaluation data quality by optimizing surface roughness and roundness, while also considering chip shredding and upper limit conditions.
Smart Images

Figure 0007538258000008 
Figure 0007538258000006 
Figure 0007538258000010
Abstract
Description
[Technical field]
[0001] The present invention relates to a machine learning device. [Background technology]
[0002] Conventionally, there is known an oscillating cutting method in which cutting is performed while feeding the workpiece and the cutting tool in the machining direction, and at the same time, the workpiece and the cutting tool are relatively reciprocatedly vibrated (see, for example, Patent Document 1). In the oscillating cutting process, it is necessary to set the oscillation conditions such as frequency and amplitude so that the tool makes an air cut against the workpiece at a constant cycle in order to shred the chips.
[0003] The operator then checks the waveform of the set oscillation conditions to see whether a tolerance has occurred between the previous pass and the current pass, that is, whether chip breakage has occurred. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2019-28597 A Summary of the Invention [Problem to be solved by the invention]
[0005] For example, evaluation data on the finish of a machined workpiece, such as surface roughness, roundness, and dimensional accuracy, of a machined workpiece machined by orbital cutting often deteriorates compared to when orbital cutting is not applied. This is due to vibrations and changes in the cutting amount during orbital cutting, but the mechanism by which the evaluation data deteriorates is very complex. Therefore, it is necessary to calculate the orbital conditions that cause the tool to miss and achieve good evaluation data for the machined workpiece. [Means for solving the problem]
[0006] A machine learning device according to one aspect of the present disclosure is a machine learning device that learns the swing conditions of a machine tool that performs swing machining while swinging a tool and a workpiece relative to one another, and includes a setting condition acquisition unit that acquires setting conditions for the swing machining, a label acquisition unit that acquires evaluation data of a workpiece machined by the machine tool as a label, and a learning unit that performs supervised learning using a pair of the setting conditions and the labels as teacher data, and the learning unit includes a learning model that learns the swing conditions that optimize the evaluation data of the machined workpiece.
[0007] A machine learning device according to one aspect of the present disclosure is a machine learning device that learns the swing conditions of a machine tool that performs swing machining while swinging a tool and a workpiece relative to one another, and includes a setting condition acquisition unit that acquires setting conditions for the swing machining as state information, a judgment information acquisition unit that acquires evaluation data of a workpiece machined by the machine tool as judgment information, a behavior information output unit that outputs behavior information indicating how the swing conditions should be changed relative to the current state, a reward calculation unit that calculates a reward value in reinforcement learning based on the judgment information, a value function update unit that updates a value function that determines the value of the swing conditions of the machine tool based on the state information, the behavior information, and the reward, and a swing condition output unit that outputs optimal swing conditions that optimize the evaluation data of the machined workpiece based on the value function. Effect of the Invention
[0008] According to the present invention, it is possible to calculate the swing conditions that cause the tool to miss a cut and achieve good evaluation data of the machined workpiece. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a diagram showing an overview of a control system according to a first embodiment. [Diagram 2] 4 is a flowchart showing the flow of a learning model construction process performed by the machine learning device according to the first embodiment. [Diagram 3] 4 is a flowchart showing a flow of a process of outputting a fluctuation condition by the machine learning device according to the first embodiment. [Figure 4] FIG. 11 is a diagram showing an overview of a control system according to a second embodiment. [Diagram 5] 13 is a flowchart showing the flow of a value function update process performed by the machine learning device according to the second embodiment. [Figure 6] 13 is a flowchart showing a flow of processing for outputting fluctuation conditions by a machine learning device according to the second embodiment. [Figure 7] FIG. 13 is a diagram showing an overview of a control system according to a third embodiment. [Figure 8] 13 is a flowchart showing the flow of a learning model construction process performed by a machine learning device according to the third embodiment. [Figure 9] 13 is a flowchart showing the flow of a process for outputting a fluctuation condition by a machine learning device according to a third embodiment. [Figure 10] FIG. 13 is a diagram showing an overview of a control system according to a fourth embodiment. [Figure 11] 13 is a flowchart showing the flow of a value function update process performed by the machine learning device according to the fourth embodiment. [Figure 12] 13 is a flowchart showing a flow of a process for outputting a fluctuation condition by a machine learning device according to a fourth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] [First embodiment] An example of an embodiment of the present invention will be described below. Fig. 1 is a diagram showing an overview of a control system 1 according to a first embodiment. The control system 1 aims to calculate oscillation conditions using machine learning, thereby calculating oscillation conditions that cause tool whiffs in the machine tool 100 and can realize good evaluation data of a machined workpiece. In particular, the control system 1 according to the first embodiment aims to calculate oscillation conditions using machine learning, thereby calculating oscillation conditions that cause tool whiffs in the machine tool 100 and can realize good surface roughness data.
[0011] The control system 1 includes a machine tool 100, a numerical control device 200, a machining surface analysis device 300, and a machine learning device 400. Here, the machine tool 100 and the numerical control device 200 are paired one-to-one and connected to be able to communicate with each other. Note that the machine tool 100 and the numerical control device 200 may be directly connected via a connection interface, or may be connected via a network such as a LAN (Local Area Network).
[0012] The numerical control device 200, the machining surface analysis device 300, and the machine learning device 400 are directly connected to each other via a connection interface, or are connected to each other via a network, and can communicate with each other. The network is, for example, a LAN constructed in a factory, the Internet, a public telephone network, or a combination of these. There are no particular limitations on the specific communication method in the network, whether it is a wired connection or a wireless connection, etc.
[0013] Machine tool 100 machines a workpiece using swing cutting under the control of numerical control device 200. Machine tool 100 has a general configuration for performing swing cutting, including a tool, a spindle, a feed axis, and the like.
[0014] The numerical control device 200 is a device for controlling the machine tool 100. The numerical control device 200 includes a machining condition setting unit 210 and a swing condition setting unit 220.
[0015] The machining condition setting unit 210 sets setting conditions including machining conditions and oscillation conditions for performing oscillation machining in the machine tool 100. The machining condition setting unit 210 outputs the set setting conditions to the machine learning device 400. Here, the setting conditions include machining conditions including at least one of the feed rate of the tool in the machine tool 100, the spindle rotation speed, the coordinate value, the cutting edge of the tool, the type of the tool, and the material of the workpiece, and oscillation conditions including at least one of the oscillation frequency and the oscillation amplitude of the machine tool 100.
[0016] The oscillation condition setting unit 220 sets the oscillation conditions output from the machine learning device 400 in the numerical control device 200 and outputs the oscillation conditions to the machine tool 100.
[0017] The machined surface analysis device 300 measures and calculates surface roughness data of a machined workpiece machined by the machine tool 100, and outputs the calculated surface roughness data to the machine learning device 400. The surface roughness data includes at least one of, for example, arithmetic mean roughness, maximum height, maximum peak height, maximum valley depth, average height, maximum cross-sectional height, and load length ratio.
[0018] In addition, in oscillating cutting, the tool vibrates periodically, so the surface roughness changes at various points on the workpiece (e.g., cylindrical shape). Therefore, when measuring surface roughness data, it is necessary to measure the line roughness multiple times on the cylindrical side surface of the workpiece. In addition, the surface roughness data can be calculated using methods such as measuring the line roughness at multiple points on the cylindrical side surface and calculating the average surface roughness (arithmetic mean roughness Ra), or measuring the line roughness at multiple points on the cylindrical side surface and calculating the maximum line roughness (maximum height Rz).
[0019] The machine learning device 400 performs machine learning using the setting conditions received from the numerical control device 200 and the surface roughness data received from the machining surface analysis device 300. Then, the machine learning device 400 constructs a learning model for outputting oscillation conditions by performing machine learning. The machine learning device 400 includes a setting condition acquisition unit 410, a label acquisition unit 420, a learning unit 430, a learning model storage unit 440, and an oscillation condition output unit 450.
[0020] The set condition acquisition unit 410 acquires set conditions including machining conditions and oscillation conditions for oscillation machining from the numerical control device 200.
[0021] Label acquisition unit 420 acquires surface roughness data of a workpiece machined by machine tool 100 as a label from machined surface analysis device 300. Here, a label is a correct output that should correspond to an input in machine learning.
[0022] In this way, the setting conditions for the oscillation machining to be learned and the labels of the surface roughness data are paired and input to the learning unit 430. The pair of the setting conditions and the labels corresponds to the teacher data in machine learning. Here, it is desirable to prepare a large amount of teacher data for machine learning.
[0023] The learning unit 430 constructs a learning model by performing machine learning based on the input teacher data. That is, the learning unit 430 learns the oscillation conditions that optimize the surface roughness of the machined workpiece. The learning model constructed by the learning unit 430 is output to the learning model storage unit 440.
[0024] The learning model storage unit 440 stores the learning model learned by the learning unit 430. The learning model stored in the learning model storage unit 440 is used by the oscillation condition output unit 450. When new teacher data is acquired after the learning model is constructed, the learning unit 430 may further perform supervised learning on the learning model stored in the learning model storage unit 440, thereby updating the constructed learning model.
[0025] Furthermore, the machine learning device 400 may share the learning model stored in the learning model storage unit 440 with other machine learning devices. If the learning model is shared by a plurality of machine learning devices, it becomes possible to further perform supervised learning in a distributed manner among the machine learning devices, thereby improving the efficiency and accuracy of supervised learning.
[0026] The oscillation condition output unit 450 outputs optimal oscillation conditions that optimize the surface roughness of the machined workpiece based on the learning model stored in the learning model storage unit 440. The oscillation condition output unit 450 also has a chip shredding condition calculation unit 451 and an oscillation condition upper limit calculation unit 452 .
[0027] The chip shredding condition calculation unit 451 calculates chip shredding oscillation conditions under which chips of the workpiece can be shredded by the oscillation machining of the machine tool 100. Then, the oscillation condition output unit 450 outputs optimal oscillation conditions that satisfy the chip shredding oscillation conditions based on the learning model. Here, the chip shredding oscillation conditions may be calculated by previously storing a combination of oscillation conditions that enable chip shredding as table data, or by calculating a relational expression for each oscillation condition such that an overlap occurs between the previous pass and the current pass in the machining path calculated based on the oscillation conditions.
[0028] The oscillation condition upper limit calculation unit 452 calculates an upper limit oscillation condition that does not exceed a preset upper limit value. Then, the oscillation condition output unit 450 outputs an optimal oscillation condition that satisfies the upper limit oscillation condition based on the learning model. Here, the preset upper limit value indicates, for example, an upper limit value of the frequency or amplitude in the oscillation processing, or an upper limit value of the speed or acceleration in the oscillation processing. Determining whether the upper limit oscillation condition is satisfied can be realized, for example, by storing various upper limit values in parameters or specifying them in the processing program, or by calculating the speed and acceleration from the oscillation conditions (frequency and amplitude).
[0029] Next, the process of constructing a learning model by the machine learning device 400 will be described with reference to the flowchart in FIG. FIG. 2 is a flowchart showing the flow of a learning model construction process performed by the machine learning device 400 according to the first embodiment.
[0030] In step S1, the set condition acquisition unit 410 acquires set conditions including machining conditions and oscillation conditions for oscillation machining from the numerical control device 200.
[0031] In step S2, label acquisition unit 420 acquires surface roughness data of a workpiece machined by machine tool 100 from machined surface analysis device 300 as a label.
[0032] In step S3, when the training data, which is a set of setting conditions and labels, is input, the learning unit 430 executes machine learning based on the input training data. The learning unit 430 executes machine learning using the input training data. The learning unit 430 executes supervised learning by, for example, regression analysis, neural network, least squares method, stepwise method, or the like.
[0033] Supervised learning may be performed by online learning, batch learning, or mini-batch learning. Online learning is a learning method in which supervised learning is performed immediately each time features are extracted from voice data, labels are input, and teacher data is created. Batch learning is a learning method in which, while features are extracted from voice data, labels are input, and teacher data is created repeatedly, multiple pieces of teacher data corresponding to the repetitions are collected, and supervised learning is performed using all of the collected teacher data.
[0034] Furthermore, mini-batch learning is a learning method that is intermediate between online learning and batch learning, in which supervised learning is performed each time a certain amount of training data is accumulated.
[0035] In step S4, the learning unit 430 determines whether or not to end the supervised learning. Here, the condition for ending the supervised learning can be arbitrarily determined. For example, the learning unit 430 may end the supervised learning when the value of the error between the output of the neural network and the label becomes equal to or less than a predetermined value. The learning unit 430 may also end the supervised learning when the supervised learning has been repeated a predetermined number of times. If the supervised learning is to be ended (YES), the process proceeds to step S5. On the other hand, if the supervised learning is not to be ended (NO), the process proceeds to step S3.
[0036] In step S5, the learning unit 430 outputs the learning model constructed by the supervised learning up to that point to the learning model storage unit 440 for storage. When new teacher data is acquired, the machine learning device 400 can perform further machine learning on the learning model. After that, the machine learning device 400 ends this process.
[0037] Next, the process of outputting the fluctuation conditions by the machine learning device 400 will be described with reference to the flowchart of FIG. FIG. 3 is a flowchart showing the flow of a process of outputting a fluctuation condition by the machine learning device 400 according to the first embodiment.
[0038] In step S11, the set condition acquisition unit 410 acquires set conditions including machining conditions and oscillation conditions for the oscillation machining from the numerical control device 200.
[0039] In step S12, the chip shredding condition calculation unit 451 calculates chip shredding oscillation conditions under which the chips of the workpiece can be shredded by the oscillation processing of the machine tool 100. In step S13, the oscillation condition upper limit calculation unit 452 calculates an upper limit oscillation condition that does not exceed a preset upper limit value.
[0040] In step S14, the oscillation condition output unit 450 outputs optimal oscillation conditions that optimize the surface roughness of the machined workpiece based on the set conditions acquired in step S11 and the learning model stored in the learning model memory unit 440.
[0041] In step S15, the oscillation condition output unit 450 judges whether or not the optimal oscillation conditions output in step S13 satisfy the chip chopping oscillation conditions calculated in step S12. If the optimal oscillation conditions satisfy the chip chopping oscillation conditions (YES), the process proceeds to step S16. On the other hand, if the optimal oscillation conditions do not satisfy the chip chopping oscillation conditions (NO), the process proceeds again to step S14.
[0042] In step S16, the oscillation condition output unit 450 judges whether the optimal oscillation condition output in step S13 satisfies the upper limit oscillation condition calculated in step S13. If the optimal oscillation condition satisfies the upper limit oscillation condition (YES), the process proceeds to step S16. On the other hand, if the optimal oscillation condition does not satisfy the upper limit oscillation condition (NO), the process proceeds to step S14 again.
[0043] In step S17, the oscillation condition output unit 450 outputs the optimal oscillation conditions to the numerical control device 200, and then ends the process.
[0044] As described above, the machine learning device 400 according to the first embodiment includes a setting condition acquisition unit 410 that acquires setting conditions for oscillation machining, a label acquisition unit 420 that acquires surface roughness data of a workpiece machined by the machine tool 100 as a label, and a learning unit 430 that performs supervised learning using a pair of the setting conditions and the label as teacher data, and the learning unit 430 includes a learning model that learns oscillation conditions that optimize the surface roughness of the machined workpiece.
[0045] As a result, the machine learning device 400 can learn optimal oscillation conditions that are optimized taking surface roughness into consideration, compared to conventional techniques in which it was difficult to set oscillation conditions that took surface roughness into consideration.
[0046] Moreover, the machine learning device 400 further includes an oscillation condition output unit 450 that outputs optimal oscillation conditions that optimize the surface roughness of the machined workpiece based on the learning model. As a result, the machine learning device 400 can output optimal oscillation conditions that are optimized in consideration of surface roughness, compared to conventional techniques in which it was difficult to set oscillation conditions in consideration of surface roughness. Furthermore, the machine learning device 400 can automate the setting of oscillation conditions, thereby reducing the burden on the operator.
[0047] The oscillation condition output unit 450 includes a chip shredding condition calculation unit 451 that calculates chip shredding oscillation conditions under which the chips of the workpiece can be shredded, and the oscillation condition output unit 450 outputs optimal oscillation conditions that satisfy the chip shredding oscillation conditions based on the learning model. This allows the machine learning device 400 to set optimal oscillation conditions that shred the chips and are optimized in consideration of surface roughness.
[0048] The oscillation condition output unit 450 includes an oscillation condition upper limit calculation unit 452 that calculates an upper limit oscillation condition that does not exceed a preset upper limit value, and the oscillation condition output unit 450 outputs optimal oscillation conditions that satisfy the upper limit oscillation condition based on the learning model. This allows the machine learning device 400 to set optimal oscillation conditions that shred chips, do not exceed the upper limit of the oscillation condition, and are optimized in consideration of surface roughness.
[0049] [Second embodiment] Next, a control system 10 according to a second embodiment will be described. In the description of the second embodiment, the same components as those in the first embodiment will be denoted by the same reference numerals, and the description thereof will be omitted or simplified. The control system 10 according to the second embodiment is mainly different from the first embodiment in that reinforcement learning is used instead of supervised learning, and other components are the same as those in the first embodiment.
[0050] 4 is a diagram showing an overview of a control system 10 according to the second embodiment. The control system 10 aims to calculate oscillation conditions using machine learning, thereby calculating oscillation conditions that cause a tool to miss-swing in the machine tool 100 and can achieve good surface roughness data.
[0051] The control system 1 includes a machine tool 100, a numerical control device 200, a machining surface analysis device 300, and a machine learning device 500. Here, the machine tool 100 and the numerical control device 200 are paired one-to-one and connected to be able to communicate with each other. Note that the machine tool 100 and the numerical control device 200 may be directly connected via a connection interface, or may be connected via a network such as a LAN (Local Area Network).
[0052] The numerical control device 200, the machining surface analysis device 300, and the machine learning device 500 are directly connected to each other via a connection interface, or are connected to each other via a network, and can communicate with each other. The network is, for example, a LAN constructed in a factory, the Internet, a public telephone network, or a combination of these. There are no particular limitations on the specific communication method in the network, whether it is a wired connection or a wireless connection, etc.
[0053] As described above, the machine tool 100, the numerical control device 200 and the machined surface analyzing device 300 have the same configurations as those in the first embodiment.
[0054] The machine learning device 500 is a device that performs reinforcement learning. Prior to describing each functional block included in the machine learning device 500, a basic mechanism of reinforcement learning will be described first. An agent (corresponding to the machine learning device 500 in this embodiment) observes the state of the environment, selects an action, and the environment changes based on the action. As the environment changes, some kind of reward is given, and the agent learns to select a better action (decision making). While supervised learning provides a perfect answer, rewards in reinforcement learning are often fractional values based on partial changes in the environment. Thus, the agent learns to choose actions that maximize the sum of future rewards.
[0055] In this way, in reinforcement learning, by learning actions, appropriate actions are learned based on the interaction that the actions have with the environment, that is, a method of learning to maximize future rewards is learned. In this embodiment, this means that it is possible to acquire actions that affect the future, such as shortening the delivery time T and selecting action information to further shorten the release time T2.
[0056] Any learning method can be used as reinforcement learning, but in the following explanation, we will use as an example the case of using Q-learning, which is a method of learning the value Q(s, a) of selecting an action a in a certain environmental state s. In Q-learning, the objective is to select the optimal action a with the highest value Q(s, a) from among the possible actions a when in a certain state s.
[0057] However, when Q-learning is first started, the correct value Q(s, a) for a combination of state s and action a is not known at all. Therefore, the agent learns the correct value Q(s, a) by selecting various actions a in a certain state s and choosing the better action based on the reward given for the action a at that time.
[0058] Also, we want to maximize the total rewards we can get in the future, so we ultimately want the value Q(s,a)=E[Σ(γ t )r t Here, E[] represents the expected value, t is time, γ is a parameter called the discount rate, which will be described later, and r t is the reward at time t, and Σ is the sum at time t. The expected value in this equation is the expected value when the state changes according to the optimal action. However, in the process of Q-learning, since it is unknown what the optimal action is, reinforcement learning is performed while exploring by performing various actions. The update equation for such value Q(s,a) can be expressed, for example, by the following equation (1).
[0059]
number
[0060] In the above formula (1), s t represents the state of the environment at time t, and a t represents the action at time t. Action a t Therefore, the state is s t+1 Changes to r t+1 represents the reward obtained by changing the state. Also, the term with max represents the reward obtained by changing the state s t+1 It is calculated by multiplying the Q value of the action a with the highest Q value known at that time by γ. Here, γ is a parameter with a range of 0<γ≦1 and is called the discount rate. Also, α is a learning coefficient with a range of 0<α≦1.
[0061] The above formula (1) is t As a result, the reward r t+1 Based on the state s t Actions in a t The value of Q(s t ,a t ) is updated. This update formula is t Actions in a t The value of Q(s t ,a t ) rather than Action a t Next state by s t+1 The value of the best action in max a Q(s t+1 ,a) is larger, then the value Q(s t ,a t ) is large, and conversely, if it is small, the value Q(s t ,a t ) is reduced. In other words, the value of a certain action in a certain state is brought closer to the value of the best action in the next state. However, the difference is determined by the discount rate γ and the reward r t+1 Although this varies depending on the state of affairs, essentially, the value of the best action in a given state is transmitted to the value of the action in the state prior to that state.
[0062] Here, in Q-learning, there is a method of creating a table of values Q(s,a) for all state-action pairs (s,a) and performing learning. However, there are cases where the number of states is too large to find values Q(s,a) for all state-action pairs, and it takes a long time for Q-learning to converge.
[0063] Therefore, a known technology called DQN (Deep Q-Network) may be used. Specifically, the value function Q may be configured using an appropriate neural network, and the value Q(s, a) may be calculated by approximating the value function Q with an appropriate neural network by adjusting the parameters of the neural network. By using DQN, it is possible to shorten the time required for Q-learning to converge. For example, the following non-patent document describes DQN in detail.
[0064] <Non-Patent Literature> "Human-level control through deep reinforcement learning", by Volodymyr Mnih1 [online], [searched on December 15, 2020], Internet <URL: http: / / files.davidqiu.com / research / nature14236.pdf>
[0065] The machine learning device 500 performs the Q-learning described above. Specifically, the machine learning device 500 learns a value function Q to be selected by taking the setting conditions (machining conditions, oscillation conditions, etc.) set in the numerical control device 200 as a state s and changing the oscillation conditions in the numerical control device 200 related to the state s as an action a.
[0066] The machine learning device 500 observes state s, such as setting conditions (machining conditions, oscillation conditions, etc.) set in the numerical control device 200, and determines action a. The machine learning device 500 receives a reward every time it performs action a. The machine learning device 500 searches for an optimal action a by trial and error so that the total reward into the future is maximized. In this way, the machine learning device 500 becomes able to select an optimal action a for state s, such as setting conditions (machining conditions, oscillation conditions, etc.) set in the numerical control device 200.
[0067] In other words, based on the value function Q learned by the machine learning device 500, by selecting, from among the actions a to be applied to the set conditions (machining conditions, oscillation conditions, etc.) related to a certain state s, an action a that maximizes the value of the value function Q, it is possible to select an action a that minimizes (optimizes) the surface roughness data.
[0068] In order to perform the above reinforcement learning, the machine learning device 500 includes a setting condition acquisition unit 510, a judgment information acquisition unit 520, a behavior information output unit 530, a learning unit 540, a value function memory unit 550, and a fluctuation condition output unit 560.
[0069] The set condition acquisition unit 510 acquires the set conditions (machining conditions, oscillation conditions, etc.) set in the numerical control device 200 as state information (state s) from the numerical control device 200. This state s corresponds to the state s of the environment in Q-learning.
[0070] Specifically, state s in the second embodiment indicates setting conditions (machining conditions, oscillation conditions, etc.) set in numerical control device 200. The setting conditions include machining conditions including the spindle rotation speed, feed rate, etc. of machine tool 100, and oscillation conditions including the oscillation amplitude, oscillation frequency, etc. of machine tool 100.
[0071] The judgment information acquisition unit 520 acquires judgment information for calculating a reward for performing Q-learning. Specifically, the judgment information acquisition unit 520 acquires surface roughness data of a workpiece machined by the machine tool 100 as judgment information for calculating a reward for performing Q-learning.
[0072] The action information output unit 530 transmits the action information (action a) generated by the learning unit 540 to the numerical control device 200. As described above, the numerical control device 200 changes the current state s, i.e., the currently set setting conditions, based on this action a, to transition to the next state s' (i.e., the state when the changed swing conditions are executed in the machine tool 100).
[0073] The learning unit 540 learns a value Q(s, a) when a certain action a is selected under a certain environmental state s. Specifically, the learning unit 540 includes a reward calculation unit 541, a value function update unit 542, and a behavioral information generation unit 543.
[0074] The reward calculation unit 541 calculates a reward when an action a is selected under a certain state s based on the judgment information. Here, the reward calculation unit 541 sets the reward to a positive value when the surface roughness data of the machined workpiece is less than a predetermined threshold, and sets the reward to a negative value when the surface roughness data exceeds the predetermined threshold.
[0075] In addition, the remuneration calculation unit 541 determines the predetermined threshold value based on the approximation formula of the theoretical surface roughness. Specifically, the remuneration calculation unit 541 determines the value obtained by multiplying the approximation formula of the theoretical surface roughness by the correction coefficient a as the predetermined threshold value. Here, the predetermined threshold value is a·F 2 / 8R, where F is the feed rate [mm] and R is the tool radius.
[0076] Value function update unit 542 updates value function Q stored in value function memory unit 550 by performing Q-learning based on state s, action a, state s' when action a is applied to state s, and the reward value calculated as described above.
[0077] The value function Q may be updated by online learning, batch learning, or mini-batch learning. Online learning is a learning method in which the value function Q is updated immediately each time state s transitions to a new state s' by applying an action a to the current state s.
[0078] Furthermore, batch learning is a learning method in which learning data is collected by repeatedly applying a certain action a to the current state s, causing the state s to transition to a new state s', and all of the collected learning data is used to update the value function Q. Furthermore, mini-batch learning is a learning method that is intermediate between online learning and batch learning, in which the value function Q is updated each time a certain amount of learning data is accumulated.
[0079] The behavior information generating unit 543 generates behavior a in the process of Q-learning and outputs the generated behavior a to the behavior information output unit 530. Specifically, the behavior information generating unit 543 selects behavior a in the process of Q-learning for the current state s. The behavior a in the second embodiment includes how to change the oscillation conditions for the current state s.
[0080] Furthermore, the behavior information generation unit 543 may take a measure to select behavior a' by a known method such as a greedy method that selects behavior a' with the highest value Q(s, a) among the currently estimated values of behavior a, or an ε-greedy method that randomly selects behavior a' with a certain small probability ε and otherwise selects behavior a' with the highest value Q(s, a).
[0081] Value function storage unit 550 is a storage device that stores value function Q. Value function Q stored in value function storage unit 550 is updated by value function update unit 542.
[0082] In addition, based on the value function Q updated by the value function update unit 542 through Q-learning, the machine learning device 500 generates an action a (hereinafter referred to as "optimized action information") as an oscillation condition for causing the machine tool 100 to perform oscillation machining that maximizes the value Q(s, a).
[0083] The oscillation condition output unit 560 acquires the value function Q stored in the value function storage unit 550. As described above, this value function Q is updated by the value function update unit 542 performing Q learning. Then, the oscillation condition output unit 560 generates optimal oscillation conditions for optimizing the surface roughness of the machined workpiece as optimization action information based on the value function Q, and outputs the generated optimal oscillation conditions (optimization action information) to the numerical control device 200.
[0084] The oscillation condition output unit 560 also has a chip shredding condition calculation unit 561 and an oscillation condition upper limit calculation unit 562 .
[0085] The chip shredding condition calculation unit 561 calculates chip shredding oscillation conditions under which chips of a workpiece can be shredded by the oscillation processing of the machine tool 100. Then, the oscillation condition output unit 560 outputs optimal oscillation conditions that satisfy the chip shredding oscillation conditions.
[0086] The oscillation condition upper limit calculation unit 562 calculates an upper limit oscillation condition that does not exceed a preset upper limit value, and the oscillation condition output unit 560 outputs an optimal oscillation condition that satisfies the upper limit oscillation condition.
[0087] The numerical control device 200 modifies the currently set oscillation conditions based on these optimal oscillation conditions (optimization behavior information) and generates operation commands, thereby enabling the machine tool 100 to operate in such a way that the surface roughness of the machined workpiece is minimized (optimized).
[0088] Next, the process of updating a value function performed by the machine learning device 500 will be described with reference to the flowchart in Fig. 5. Fig. 5 is a flowchart showing the flow of the process of updating a value function performed by the machine learning device 500 according to the second embodiment.
[0089] First, in step S21, setting condition acquisition unit 510 acquires setting conditions as state information from numerical control device 200. The acquired setting conditions are output to value function update unit 542 and behavior information generation unit 543. As described above, this setting condition (state information) is information equivalent to state s of the environment in Q-learning.
[0090] In step S22, the behavior information generating unit 543 generates oscillation conditions as new behavior information, and outputs the generated new behavior information (behavior a) to the numerical control device 200 via the behavior information output unit 530. The numerical control device 200, which has received the behavior information, drives the machine tool 100 in state s' in which the oscillation conditions related to the current state s have been changed based on the received behavior information, and performs oscillation machining of the workpiece. As described above, this behavior information corresponds to behavior a in Q-learning.
[0091] In step S23, judgment information acquisition unit 520 acquires surface roughness data of a workpiece machined by machine tool 100 as judgment information for calculating a reward for performing Q-learning.
[0092] In step S24, the remuneration calculation unit 531 calculates the remuneration based on the input judgment information (surface roughness of the machined workpiece). The remuneration calculation unit 541 judges whether the surface roughness data of the machined workpiece is less than a predetermined threshold value. If the surface roughness data is less than the predetermined threshold value (YES), the process proceeds to step S25. On the other hand, if the surface roughness data exceeds the predetermined threshold value (NO), the process proceeds to step S26.
[0093] In step S25, the remuneration calculation unit 541 calculates the remuneration value as a positive value. In step S26, the remuneration calculation unit 541 calculates the remuneration value as a negative value.
[0094] In step S27, value function update unit 542 updates value function Q stored in value function storage unit 550 based on the reward value calculated as described above. Learning unit 640 then returns to step S21 again, and repeats the above-mentioned process, causing value function Q to converge to an appropriate value. Note that learning unit 640 may end the above-mentioned process on the condition that it has been repeated a predetermined number of times or for a predetermined period of time. The operation of machine learning device 500 has been described above, but the process of calculating the reward value is merely an example and is not limited thereto.
[0095] FIG. 6 is a flowchart showing the flow of processing for outputting fluctuation conditions by the machine learning device 500 according to the second embodiment. In step S31, oscillation condition output unit 560 acquires value function Q stored in value function storage unit 550. This value function Q is updated by value function update unit 542 performing Q learning as described above.
[0096] In step S32, the oscillation condition output unit 560 generates optimal oscillation conditions (optimized action information) by selecting, based on the value function Q, the action a with the highest value Q(s, a) from among the possible actions a in, for example, the currently set state s, as the optimal action.
[0097] In step S33, the chip shredding condition calculation unit 561 calculates chip shredding oscillation conditions under which the chips of the workpiece can be shredded by the oscillation processing of the machine tool 100.
[0098] In step S34, the oscillation condition upper limit calculation unit 562 calculates an upper limit oscillation condition that does not exceed a preset upper limit value.
[0099] In step S35, the oscillation condition output unit 560 determines whether the optimal oscillation conditions generated in step S32 satisfy the chip chopping oscillation conditions calculated in step S33. If the optimal oscillation conditions satisfy the chip chopping oscillation conditions (YES), the process proceeds to step S35. On the other hand, if the optimal oscillation conditions do not satisfy the chip chopping oscillation conditions (NO), the process proceeds to step S31 again.
[0100] In step S36, the oscillation condition output unit 560 judges whether the optimal oscillation condition output in step S32 satisfies the upper limit oscillation condition calculated in step S34. If the optimal oscillation condition satisfies the upper limit oscillation condition (YES), the process proceeds to step S37. On the other hand, if the optimal oscillation condition does not satisfy the upper limit oscillation condition (NO), the process proceeds to step S31 again.
[0101] In step S32, the oscillation condition output unit 560 outputs the generated optimal oscillation conditions (optimization action information) to the numerical control device 200.
[0102] As described above, the numerical control device 200 modifies the currently set state s (i.e., the currently set oscillation conditions) based on the optimal oscillation conditions, and generates an operation command. Then, the numerical control device 200 sends the generated operation command to the machine tool 100, whereby the machine tool 100 can operate so that the surface roughness data of the machined workpiece becomes optimal (minimum).
[0103] As described above, the machine learning device 500 of the second embodiment includes a setting condition acquisition unit 510 that acquires setting conditions for swing machining as state information, a judgment information acquisition unit 520 that acquires surface roughness data of a workpiece machined by the machine tool 100 as judgment information, a behavior information output unit 530 that outputs behavior information indicating how the swing conditions should be changed relative to the current state, a reward calculation unit 541 that calculates a reward value in reinforcement learning based on the judgment information, a value function update unit 542 that updates a value function that determines the value of the swing conditions of the machine tool 100 based on the state information, behavior information and reward, and a swing condition output unit 560 that outputs optimal swing conditions that optimize the surface roughness of the machined workpiece based on the value function.
[0104] As a result, the machine learning device 500 can output optimal oscillation conditions that are optimized by taking surface roughness into consideration, compared to conventional techniques in which it was difficult to set oscillation conditions that took surface roughness into consideration. Furthermore, the machine learning device 500 can automate the setting of oscillation conditions, thereby reducing the burden on the operator.
[0105] Furthermore, the reward calculation unit 541 sets the reward to a positive value when the surface roughness data of the machined workpiece is less than a predetermined threshold, and sets the reward to a negative value when the surface roughness data exceeds the predetermined threshold. This allows the machine learning device 500 to determine the reward value taking into account the surface roughness data.
[0106] Furthermore, the reward calculation unit 541 determines a predetermined threshold value based on an approximation formula for the theoretical surface roughness, which enables the machine learning device 500 to determine a reward value that takes the theoretical surface roughness into consideration.
[0107] The oscillation condition output unit 560 also includes a chip shredding condition calculation unit 561 that calculates chip shredding oscillation conditions under which the chips of the workpiece can be shredded, and the oscillation condition output unit 560 outputs optimal oscillation conditions that satisfy the chip shredding oscillation conditions. This allows the machine learning device 500 to set optimal oscillation conditions that shred the chips and are optimized in consideration of surface roughness.
[0108] The oscillation condition output unit 560 includes an oscillation condition upper limit calculation unit 562 that calculates upper limit oscillation conditions that do not exceed a preset upper limit value, and the oscillation condition output unit 560 outputs optimal oscillation conditions that satisfy the upper limit oscillation conditions. This allows the machine learning device 500 to set optimal oscillation conditions that shred chips, do not exceed the upper limit of the oscillation conditions, and are optimized in consideration of surface roughness.
[0109] [Third embodiment] Next, a control system 20 according to a third embodiment will be described. In the description of the third embodiment, the same components as those in the first embodiment are given the same reference numerals, and the description thereof will be omitted or simplified. The control system 10 according to the third embodiment is mainly different from the first embodiment in that the roundness of the machined workpiece is used instead of the surface roughness data of the machined workpiece, and other configurations are the same as those of the first embodiment.
[0110] 7 is a diagram showing an overview of a control system 20 according to a third embodiment. The purpose of the control system 20 is to calculate a swing condition using machine learning, so as to calculate a swing condition that causes a tool to miss-swing in the machine tool 100 and can realize good roundness data.
[0111] Control system 20 includes machine tool 100, numerical control device 200, machining surface analysis device 600, and machine learning device 700. Here, machine tool 100 and numerical control device 200 are paired one-to-one and connected to be able to communicate with each other. Note that machine tool 100 and numerical control device 200 may be directly connected via a connection interface, or may be connected via a network such as a LAN (Local Area Network).
[0112] The numerical control device 200, the machining surface analysis device 600, and the machine learning device 700 are directly connected to each other via a connection interface, or are connected to each other via a network, and can communicate with each other. The network is, for example, a LAN constructed in a factory, the Internet, a public telephone network, or a combination of these. There are no particular limitations on the specific communication method in the network, whether it is a wired connection or a wireless connection, etc.
[0113] As described above, the machine tool 100 and the numerical control device 200 have the same configuration as in the first embodiment. The machined surface analysis device 600 measures and calculates roundness data of a machined workpiece machined by the machine tool 100, and outputs the calculated surface roughness data to the machine learning device 700.
[0114] The machine learning device 700 performs machine learning using the setting conditions received from the numerical control device 200 and the roundness data received from the machining surface analysis device 600. Then, the machine learning device 700 constructs a learning model for outputting oscillation conditions by performing machine learning. The machine learning device 700 includes a setting condition acquisition unit 710, a label acquisition unit 720, a learning unit 730, a learning model storage unit 740, and an oscillation condition output unit 750.
[0115] The set condition acquisition unit 710 acquires set conditions including machining conditions and oscillation conditions for oscillation machining from the numerical control device 200.
[0116] The label acquisition unit 720 acquires the roundness data of the workpiece machined by the machine tool 100 as a label from the machined surface analysis device 600. Here, the label is a correct output that should correspond to an input in machine learning.
[0117] In this way, the setting conditions for the orbital machining to be learned and the labels of the roundness data are paired and input to the learning unit 430. The pair of the setting conditions and the labels corresponds to training data in machine learning. Here, it is desirable to prepare a large amount of training data for machine learning.
[0118] The learning unit 730 constructs a learning model by performing machine learning based on the input teacher data. That is, the learning unit 730 learns the oscillation conditions that optimize the roundness of the machined workpiece. The learning model constructed by the learning unit 730 is output to the learning model storage unit 740.
[0119] The learning model storage unit 740 stores the learning model learned by the learning unit 730. The learning model stored in the learning model storage unit 740 is used by the oscillation condition output unit 750. When new teacher data is acquired after the learning model is constructed, the learning unit 730 may further perform supervised learning on the learning model stored in the learning model storage unit 740, thereby updating the constructed learning model.
[0120] Furthermore, the machine learning device 700 may share the learning model stored in the learning model storage unit 740 with other machine learning devices. If the learning model is shared by a plurality of machine learning devices, it becomes possible to further perform supervised learning in a distributed manner among the machine learning devices, thereby improving the efficiency and accuracy of supervised learning.
[0121] The swing condition output unit 750 outputs optimal swing conditions that optimize the roundness of the machined workpiece based on the learning model stored in the learning model storage unit 740. The oscillation condition output unit 750 also has a chip shredding condition calculation unit 751 and an oscillation condition upper limit calculation unit 752 .
[0122] The chip shredding condition calculation unit 751 calculates chip shredding oscillation conditions under which chips of a workpiece can be shredded by the oscillation processing of the machine tool 100. Then, the oscillation condition output unit 750 outputs optimal oscillation conditions that satisfy the chip shredding oscillation conditions based on the learning model.
[0123] The oscillation condition upper limit calculation unit 752 calculates an upper limit oscillation condition that does not exceed a preset upper limit value. Then, the oscillation condition output unit 750 outputs an optimal oscillation condition that satisfies the upper limit oscillation condition based on the learning model.
[0124] Next, the process of constructing a learning model by the machine learning device 700 will be described with reference to the flowchart in FIG. FIG. 8 is a flowchart showing the flow of a learning model construction process performed by the machine learning device 700 according to the third embodiment.
[0125] In step S41, the set condition acquisition unit 710 acquires set conditions including machining conditions and oscillation conditions for oscillation machining from the numerical control device 200.
[0126] In step S42, label acquisition unit 720 acquires the roundness data of the workpiece machined by machine tool 100 from machined surface analysis device 600 as a label.
[0127] In step S43, when the training data, which is a set of setting conditions and labels, is input, the learning unit 730 executes machine learning based on the input training data. The learning unit 730 executes machine learning using the input training data. The learning unit 730 executes supervised learning by, for example, regression analysis, neural network, least squares method, stepwise method, or the like.
[0128] In step S4, the learning unit 730 determines whether or not to end the supervised learning. Here, the condition for ending the supervised learning can be arbitrarily determined. For example, the learning unit 730 may end the supervised learning when the value of the error between the output of the neural network and the label becomes equal to or less than a predetermined value. The learning unit 730 may also end the supervised learning when the supervised learning has been repeated a predetermined number of times. If the supervised learning is to be ended (YES), the process proceeds to step S45. On the other hand, if the supervised learning is not to be ended (NO), the process proceeds to step S43.
[0129] In step S45, the learning unit 730 outputs the learning model constructed by the supervised learning up to that point to the learning model storage unit 740 for storage. Furthermore, when new teacher data is acquired, the machine learning device 700 can perform further machine learning on the learning model. After that, the machine learning device 700 ends this process.
[0130] Next, the output process of the oscillation conditions by the machine learning device 700 will be described with reference to the flowchart of FIG. FIG. 9 is a flowchart showing the flow of a process of outputting a fluctuation condition by the machine learning device 700 according to the third embodiment.
[0131] In step S51, the set condition acquisition unit 710 acquires set conditions including machining conditions and oscillation conditions for oscillation machining from the numerical control device 200.
[0132] In step S52, the chip shredding condition calculation unit 751 calculates chip shredding oscillation conditions under which the chips of the workpiece can be shredded by the oscillation processing of the machine tool 100. In step S53, the fluctuation condition upper limit calculation unit 752 calculates an upper limit fluctuation condition that does not exceed a preset upper limit value.
[0133] In step S54, the oscillation condition output unit 750 outputs optimal oscillation conditions that optimize the roundness of the machined workpiece based on the set conditions acquired in step S51 and the learning model stored in the learning model storage unit 740.
[0134] In step S55, the oscillation condition output unit 750 judges whether or not the optimal oscillation conditions output in step S53 satisfy the chip chopping oscillation conditions calculated in step S52. If the optimal oscillation conditions satisfy the chip chopping oscillation conditions (YES), the process proceeds to step S56. On the other hand, if the optimal oscillation conditions do not satisfy the chip chopping oscillation conditions (NO), the process proceeds again to step S54.
[0135] In step S56, the oscillation condition output unit 750 judges whether the optimal oscillation condition output in step S53 satisfies the upper limit oscillation condition calculated in step S53. If the optimal oscillation condition satisfies the upper limit oscillation condition (YES), the process proceeds to step S56. On the other hand, if the optimal oscillation condition does not satisfy the upper limit oscillation condition (NO), the process proceeds to step S54 again.
[0136] In step S57, the oscillation condition output unit 750 outputs the optimal oscillation conditions to the numerical control device 200, and then ends the process.
[0137] As described above, the machine learning device 700 according to the third embodiment includes a setting condition acquisition unit 710 that acquires setting conditions for swing machining, a label acquisition unit 720 that acquires roundness data of a workpiece machined by the machine tool 100 as a label, and a learning unit 730 that performs supervised learning using a pair of the setting conditions and the label as teacher data, and the learning unit 730 includes a learning model that learns swing conditions that optimize the roundness of the machined workpiece.
[0138] As a result, the machine learning device 700 can learn optimal oscillation conditions that are optimized taking into account circularity, compared to conventional techniques in which it was difficult to set oscillation conditions that took into account circularity.
[0139] Moreover, the machine learning device 700 further includes a swing condition output unit 750 that outputs optimal swing conditions that optimize the roundness of the machined workpiece based on the learning model. As a result, the machine learning device 700 can output optimal swing conditions that are optimized in consideration of roundness, compared to conventional techniques in which it was difficult to set swing conditions in consideration of roundness. Furthermore, the machine learning device 700 can automate the setting of swing conditions, thereby reducing the burden on the operator.
[0140] The oscillation condition output unit 750 includes a chip shredding condition calculation unit 751 that calculates chip shredding oscillation conditions under which the chips of the workpiece can be shredded, and the oscillation condition output unit 750 outputs optimal oscillation conditions that satisfy the chip shredding oscillation conditions based on the learning model. This allows the machine learning device 700 to set optimal oscillation conditions that shred the chips and are optimized in consideration of surface roughness.
[0141] The oscillation condition output unit 750 also includes an oscillation condition upper limit calculation unit 752 that calculates an upper limit oscillation condition that does not exceed a preset upper limit value, and the oscillation condition output unit 750 outputs optimal oscillation conditions that satisfy the upper limit oscillation condition based on the learning model. This allows the machine learning device 700 to set optimal oscillation conditions that shred chips, do not exceed the upper limit of the oscillation condition, and are optimized in consideration of surface roughness.
[0142] [Fourth embodiment] Next, a control system 30 according to a fourth embodiment will be described. In the description of the fourth embodiment, the same components as those in the third embodiment are denoted by the same reference numerals, and the description thereof will be omitted or simplified. The control system 30 according to the fourth embodiment is mainly different from the third embodiment in that reinforcement learning is used instead of supervised learning, and other configurations are the same as those in the third embodiment.
[0143] 10 is a diagram showing an overview of a control system 30 according to a fourth embodiment. The purpose of the control system 30 is to calculate a swing condition using machine learning, so as to calculate a swing condition that causes a tool miss in the machine tool 100 and can realize good roundness data.
[0144] Control system 30 includes machine tool 100, numerical control device 200, machining surface analysis device 600, and machine learning device 800. Here, machine tool 100 and numerical control device 200 are paired one-to-one and connected to be able to communicate with each other. Note that machine tool 100 and numerical control device 200 may be directly connected via a connection interface, or may be connected via a network such as a LAN (Local Area Network).
[0145] The numerical control device 200, the machining surface analysis device 600, and the machine learning device 800 are directly connected to each other via a connection interface, or are connected to each other via a network, and can communicate with each other. The network is, for example, a LAN constructed in a factory, the Internet, a public telephone network, or a combination of these. There are no particular limitations on the specific communication method in the network, whether it is a wired connection or a wireless connection, etc.
[0146] The machine tool 100, the numerical control device 200 and the machined surface analyzing device 600 have the same configurations as those in the third embodiment as described above.
[0147] The machine learning device 800 is a device that performs reinforcement learning. Note that the process related to reinforcement learning is similar to that of the machine learning device 500 according to the second embodiment, and therefore a description thereof will be omitted. In order to perform reinforcement learning, the machine learning device 800 includes a setting condition acquisition unit 810, a judgment information acquisition unit 820, a behavior information output unit 830, a learning unit 840, a value function storage unit 850, and a fluctuation condition output unit 860.
[0148] The set condition acquisition unit 810 acquires set conditions (machining conditions, oscillation conditions, etc.) set in the numerical control device 200 as state information (state s) from the numerical control device 200. This state s corresponds to the state s of the environment in Q-learning.
[0149] Specifically, state s in the fourth embodiment indicates setting conditions (machining conditions, oscillation conditions, etc.) set in numerical control device 200. The setting conditions include machining conditions including the spindle rotation speed, feed rate, etc. of machine tool 100, and oscillation conditions including the oscillation amplitude, oscillation frequency, etc. of machine tool 100.
[0150] The judgment information acquisition unit 820 acquires judgment information for calculating a reward for performing Q-learning. Specifically, the judgment information acquisition unit 820 acquires circularity data of a workpiece machined by the machine tool 100 as judgment information for calculating a reward for performing Q-learning.
[0151] The action information output unit 830 transmits the action information (action a) generated by the learning unit 840 to the numerical control device 200. As described above, the numerical control device 200 changes the current state s, i.e., the currently set setting conditions, based on this action a, and transitions to the next state s' (i.e., the state when the changed swing conditions are executed in the machine tool 100).
[0152] The learning unit 840 learns a value Q(s, a) when a certain action a is selected in a certain environmental state s. Specifically, the learning unit 840 includes a reward calculation unit 841, a value function update unit 842, and a behavioral information generation unit 843.
[0153] The reward calculation unit 841 calculates a reward when an action a is selected in a certain state s based on the judgment information. Here, the reward calculation unit 841 sets the reward to a positive value when the circularity data of the machined workpiece is less than a predetermined threshold, and sets the reward to a negative value when the circularity data exceeds the predetermined threshold.
[0154] Value function update unit 842 updates value function Q stored in value function memory unit 850 by performing Q-learning based on state s, action a, state s' when action a is applied to state s, and the reward value calculated as described above.
[0155] The value function Q may be updated by online learning, batch learning, or mini-batch learning.
[0156] The behavior information generating unit 843 generates behavior a in the process of Q-learning and outputs the generated behavior a to the behavior information output unit 830. Specifically, the behavior information generating unit 843 selects behavior a in the process of Q-learning for the current state s. The behavior a in the fourth embodiment includes how to change the oscillation conditions for the current state s.
[0157] Furthermore, the behavior information generation unit 843 may take a measure to select behavior a' using a known method such as a greedy method that selects behavior a' with the highest value Q(s, a) among the currently estimated values of behavior a, or an ε-greedy method that randomly selects behavior a' with a certain small probability ε and otherwise selects behavior a' with the highest value Q(s, a).
[0158] Value function storage unit 850 is a storage device that stores value function Q. Value function Q stored in value function storage unit 850 is updated by value function update unit 842.
[0159] In addition, the machine learning device 800 generates an action a (hereinafter referred to as "optimized action information") as an oscillation condition for causing the machine tool 100 to perform oscillation machining that maximizes the value Q(s, a) based on the value function Q updated by the value function update unit 842 through Q-learning.
[0160] The oscillation condition output unit 860 acquires the value function Q stored in the value function storage unit 850. As described above, this value function Q is updated by the value function update unit 842 performing Q learning. Then, the oscillation condition output unit 860 generates optimal oscillation conditions for optimizing the surface roughness of the machined workpiece as optimization action information based on the value function Q, and outputs the generated optimal oscillation conditions (optimization action information) to the numerical control device 200.
[0161] The oscillation condition output unit 860 also has a chip shredding condition calculation unit 861 and an oscillation condition upper limit calculation unit 862 .
[0162] The chip shredding condition calculation unit 861 calculates chip shredding oscillation conditions under which chips of a workpiece can be shredded by the oscillation processing of the machine tool 100. Then, the oscillation condition output unit 860 outputs optimal oscillation conditions that satisfy the chip shredding oscillation conditions.
[0163] The oscillation condition upper limit calculation unit 862 calculates an upper limit oscillation condition that does not exceed a preset upper limit value, and the oscillation condition output unit 860 outputs an optimal oscillation condition that satisfies the upper limit oscillation condition.
[0164] The numerical control device 200 modifies the currently set swing conditions based on these optimal swing conditions (optimized behavior information) and generates operation commands, thereby enabling the machine tool 100 to operate in a manner that optimizes the roundness of the machined workpiece.
[0165] Next, the process of updating a value function performed by the machine learning device 800 will be described with reference to the flowchart in Fig. 11. Fig. 11 is a flowchart showing the flow of the process of updating a value function performed by the machine learning device 800 according to the fourth embodiment.
[0166] First, in step S61, the setting condition acquisition unit 810 acquires setting conditions as state information from the numerical control device 200. The acquired setting conditions are output to the value function update unit 842 and the behavior information generation unit 843. As described above, the setting conditions (state information) are information equivalent to the state s of the environment in Q-learning.
[0167] In step S62, the behavior information generation unit 843 generates oscillation conditions as new behavior information, and outputs the generated new behavior information (behavior a) to the numerical control device 200 via the behavior information output unit 830. The numerical control device 200, which has received the behavior information, drives the machine tool 100 in state s' in which the oscillation conditions related to the current state s have been changed based on the received behavior information, and performs oscillation machining of the workpiece. As described above, this behavior information corresponds to behavior a in Q-learning.
[0168] In step S63, judgment information acquisition unit 820 acquires the circularity data of the workpiece machined by machine tool 100 as judgment information for calculating the reward for performing Q-learning.
[0169] In step S64, the remuneration calculation unit 831 calculates the remuneration based on the input judgment information (roundness data of the machined workpiece). The remuneration calculation unit 841 judges whether the roundness data of the machined workpiece is less than a predetermined threshold value. If the roundness data is less than the predetermined threshold value (YES), the process proceeds to step S65. On the other hand, if the roundness data exceeds the predetermined threshold value (NO), the process proceeds to step S66.
[0170] In step S65, the remuneration calculation unit 841 calculates the remuneration value as a positive value. In step S66, the remuneration calculation unit 841 calculates the remuneration value as a negative value.
[0171] In step S67, value function update unit 842 updates value function Q stored in value function storage unit 850 based on the reward value calculated as described above. Learning unit 840 then returns to step S61 again, and repeats the above-mentioned process, causing value function Q to converge to an appropriate value. Note that learning unit 840 may end the above-mentioned process on the condition that it has been repeated a predetermined number of times or for a predetermined period of time. The operation of machine learning device 800 has been described above, but the process of calculating the reward value is merely an example and is not limited thereto.
[0172] FIG. 12 is a flowchart showing the flow of processing for outputting fluctuation conditions by the machine learning device 800 according to the fourth embodiment. In step S71, the oscillation condition output unit 860 acquires the value function Q stored in the value function storage unit 850. This value function Q is updated by the value function update unit 842 performing Q learning as described above.
[0173] In step S72, the oscillation condition output unit 860 generates optimal oscillation conditions (optimized action information) by selecting, based on the value function Q, the action a with the highest value Q(s, a) from among the possible actions a in, for example, the currently set state s, as the optimal action.
[0174] In step S73, the chip shredding condition calculation unit 861 calculates chip shredding oscillation conditions under which the chips of the workpiece can be shredded by the oscillation processing of the machine tool 100.
[0175] In step S74, the oscillation condition upper limit calculation unit 862 calculates an upper limit oscillation condition that does not exceed a preset upper limit value.
[0176] In step S75, the oscillation condition output unit 860 judges whether or not the optimal oscillation conditions generated in step S72 satisfy the chip chopping oscillation conditions calculated in step S73. If the optimal oscillation conditions satisfy the chip chopping oscillation conditions (YES), the process proceeds to step S75. On the other hand, if the optimal oscillation conditions do not satisfy the chip chopping oscillation conditions (NO), the process proceeds to step S71 again.
[0177] In step S76, the oscillation condition output unit 860 judges whether the optimal oscillation condition output in step S72 satisfies the upper limit oscillation condition calculated in step S74. If the optimal oscillation condition satisfies the upper limit oscillation condition (YES), the process proceeds to step S77. On the other hand, if the optimal oscillation condition does not satisfy the upper limit oscillation condition (NO), the process proceeds to step S71 again.
[0178] In step S72, the oscillation condition output unit 860 outputs the generated optimal oscillation conditions (optimization action information) to the numerical control device 200.
[0179] As described above, the numerical control device 200 modifies the currently set state s (i.e., the currently set swing conditions) based on the optimal swing conditions, and generates an operation command. Then, the numerical control device 200 sends the generated operation command to the machine tool 100, so that the machine tool 100 can operate so as to optimize the roundness data of the machined workpiece.
[0180] As described above, the machine learning device 800 of the fourth embodiment includes a setting condition acquisition unit 810 that acquires setting conditions for swing machining as state information, a judgment information acquisition unit 820 that acquires roundness data of a machined workpiece by the machine tool 100 as judgment information, a behavior information output unit 830 that outputs behavior information indicating how the swing conditions should be changed relative to the current state, a reward calculation unit 841 that calculates a reward value in reinforcement learning based on the judgment information, a value function update unit 842 that updates a value function that determines the value of the swing conditions of the machine tool 100 based on the state information, behavior information and reward, and a swing condition output unit 860 that outputs optimal swing conditions that optimize the roundness of the machined workpiece based on the value function.
[0181] As a result, the machine learning device 800 can output optimal oscillation conditions that are optimized in consideration of roundness, compared to conventional techniques in which it was difficult to set oscillation conditions in consideration of surface roughness. Furthermore, the machine learning device 800 can automate the setting of oscillation conditions, thereby reducing the burden on the operator.
[0182] Furthermore, the reward calculation unit 841 sets the reward to a positive value when the roundness data of the machined workpiece is less than a predetermined threshold, and sets the reward to a negative value when the roundness data exceeds the predetermined threshold. This allows the machine learning device 800 to determine the reward value taking into account the surface roughness data.
[0183] The oscillation condition output unit 860 also includes a chip shredding condition calculation unit 861 that calculates chip shredding oscillation conditions under which the chips of the workpiece can be shredded, and the oscillation condition output unit 860 outputs optimal oscillation conditions that satisfy the chip shredding oscillation conditions. This allows the machine learning device 800 to set optimal oscillation conditions that are optimized in consideration of the surface roughness and allow for chip shredding.
[0184] The oscillation condition output unit 860 includes an oscillation condition upper limit calculation unit 862 that calculates upper limit oscillation conditions that do not exceed a preset upper limit value, and the oscillation condition output unit 860 outputs optimal oscillation conditions that satisfy the upper limit oscillation conditions. This allows the machine learning device 800 to set optimal oscillation conditions that shred chips, do not exceed the upper limit of the oscillation conditions, and are optimized in consideration of surface roughness.
[0185] [Other embodiments] In the above-described embodiment, the machine learning devices 400, 500, 700, and 800 use the surface roughness data and the roundness data of the machined workpiece, but the machine learning devices according to other embodiments may use other data as the evaluation data of the machined workpiece. For example, in the machine learning devices according to other embodiments, the evaluation data of the machined workpiece may include surface roughness, roundness, or dimensional accuracy. Here, the dimensional accuracy indicates whether the workpiece is machined to the dimensions of the shape instructed by the machining program.
[0186] That is, when supervised learning is used, a machine learning device according to another embodiment is a machine learning device that learns the swing conditions of a machine tool that performs swing machining while swinging a tool and a workpiece relative to each other, and includes a setting condition acquisition unit that acquires setting conditions for swing machining, a label acquisition unit that acquires evaluation data of a workpiece machined by the machine tool as a label, and a learning unit that performs supervised learning using a set of the setting conditions and the label as teacher data, and the learning unit includes a learning model that learns the swing conditions that optimize the evaluation data of the machined workpiece. The machine learning device may further include a swing condition output unit that outputs optimal swing conditions that optimize the evaluation data of the machined workpiece based on the learning model.
[0187] As a result, the machine learning device can output optimal oscillation conditions that are optimized by taking into account the evaluation data of the machined workpiece, compared to the conventional technology in which it was difficult to set oscillation conditions that took into account the evaluation data of the machined workpiece. In addition, the machine learning device can automate the setting of the oscillation conditions, thereby reducing the burden on the worker.
[0188] In addition, when using reinforcement learning, a machine learning device according to another embodiment is a machine learning device that learns the swing conditions of a machine tool that performs swing machining while swinging a tool and a workpiece relative to each other, and includes a setting condition acquisition unit that acquires setting conditions for swing machining as state information, a judgment information acquisition unit that acquires evaluation data of a workpiece machined by the machine tool as judgment information, a behavior information output unit that outputs behavior information indicating how the swing conditions should be changed with respect to the current state, a reward calculation unit that calculates a reward value in reinforcement learning based on the judgment information, a value function update unit that updates a value function that determines the value of the swing conditions of the machine tool based on the state information, the behavior information, and the reward, and a swing condition output unit that outputs optimal swing conditions that optimize the evaluation data of the machined workpiece based on the value function. In addition, the reward calculation unit sets the reward to a positive value when the evaluation data of the machined workpiece is less than a predetermined threshold, and sets the reward to a negative value when the evaluation data exceeds the predetermined threshold.
[0189] As a result, the machine learning device can output optimal oscillation conditions that are optimized by taking into account the evaluation data of the machined workpiece, compared to the conventional technology in which it was difficult to set oscillation conditions that took into account the evaluation data of the machined workpiece. In addition, the machine learning device can automate the setting of the oscillation conditions, thereby reducing the burden on the worker.
[0190] Moreover, the setting conditions according to the first to fourth embodiments include machining conditions including at least one of the feed rate of the tool in the machine tool 100, the spindle rotation speed, the coordinate value, the cutting edge of the tool, the type of the tool, and the material of the workpiece, and oscillation conditions including at least one of the oscillation frequency and the oscillation amplitude of the machine tool 100. This enables the machine learning devices 400, 500, 700, 800 to acquire setting conditions including appropriate machining conditions and oscillation conditions.
[0191] The surface roughness data according to the first and second embodiments includes at least one of the arithmetic mean roughness, the maximum height, the maximum peak height, the maximum valley depth, the average height, the maximum cross-sectional height, and the load length ratio, which allows the machine learning devices 400 and 500 to acquire the surface roughness data by an appropriate method.
[0192] Furthermore, the machine learning devices 400, 500, 700, and 800 may be shared by a plurality of numerical control devices 200. This allows the machine learning devices 400, 500, 700, and 800 to share and update the learning model, value function, and the like by the plurality of numerical control devices 200.
[0193] Furthermore, the machine learning devices 400, 500, 700, and 800 may be provided on a cloud server, which allows the machine learning devices 400 and 500 to share and update learning models, value functions, and the like on the cloud server.
[0194] The above-mentioned numerical control device 200 and machine learning devices 400, 500, 700, and 800 include a calculation processing device such as a CPU (Central Processing Unit). The numerical control device 200 and machine learning devices 400, 500, 700, and 800 also include a main storage device such as an auxiliary storage device such as an HDD (Hard Disk Drive) that stores various control programs such as application software and an OS (Operating System), and a RAM (Random Access Memory) for storing data temporarily required for the calculation processing device to execute a program.
[0195] In the numerical control device 200 and the machine learning device 400, 500, 700, 800, the arithmetic processing device reads application software and the OS from the auxiliary storage device, and while expanding the read application software and the OS in the main storage device, performs arithmetic processing based on these application software and the OS. In addition, the numerical control device 200 and the machine learning device 400, 500, 700, 800 control various hardware provided in each device based on the calculation result. In this way, the functional blocks of this embodiment are realized. In other words, the above-mentioned embodiment can be realized by the cooperation of hardware and software.
[0196] As a specific example, the numerical control device 200 can be realized by incorporating application software for realizing the embodiment into the control device of a general machine tool 100. Also, the machine learning devices 400, 500, 700, and 800 can be realized by incorporating application software for realizing the embodiment into a general personal computer.
[0197] However, for the machine learning devices 400, 500, 700, and 800, since the amount of calculations involved in machine learning is large, for example, a personal computer equipped with a GPU (Graphics Processing Units) and using the GPU for the calculation processing involved in machine learning by a technology called GPGPU (General-Purpose computing on Graphics Processing Units) can be used to achieve high-speed processing. Furthermore, in order to perform faster processing, the machine learning devices 400 and 500 may be configured to construct a computer cluster using multiple computers equipped with such GPUs, and perform parallel processing on multiple computers included in the computer cluster.
[0198] Although the embodiments of the present invention have been described above, the above control systems 1, 10, 20, and 30 can be realized by hardware, software, or a combination of these. In addition, the control methods performed by the above control systems 1, 10, 20, and 30 can also be realized by hardware, software, or a combination of these. Here, being realized by software means being realized by a computer reading and executing a program.
[0199] The program can be stored and provided to a computer using various types of non-transitory computer readable media. The non-transitory computer readable media includes various types of tangible storage media. Examples of the non-transitory computer readable media include magnetic recording media (e.g., hard disk drives), magneto-optical recording media (e.g., magneto-optical disks), CD-ROM (Read Only Memory), CD-R, CD-R / W, and semiconductor memory (e.g., mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, and RAM (random access memory)).
[0200] Although the above-described embodiments are preferred embodiments of the present invention, the scope of the present invention is not limited to the above-described embodiments. The present invention can be embodied in various modified forms without departing from the spirit of the present invention. [Explanation of symbols]
[0201] 1. Control System 10. Control System 100 Machine tools 200 Numerical Control Device 300 Machining surface analysis device 400 Machine Learning Device 410 Setting condition acquisition unit 420 Label Acquisition Department 430 Learning Department 440 Learning Model Memory Unit 450 Oscillation condition output section 500 Machine Learning Device 510 Setting condition acquisition unit 520 Judgment information acquisition unit 530 Behavioral Information Output Unit 540 Learning Department 550 Value Function Memory Unit 560 Oscillation condition output section
Claims
1. A machine learning device that learns swing conditions of a machine tool that performs swing machining while swinging a tool and a workpiece relative to each other, A setting condition acquisition unit that acquires setting conditions for the swing machining; a label acquisition unit that acquires evaluation data of a workpiece machined by the machine tool as a label; a learning unit that performs supervised learning using a set of the setting condition and the label as training data, The learning unit is provided with a learning model that learns oscillation conditions that optimize the evaluation data of the machined workpiece. Machine learning device.
2. The machine learning device according to claim 1 , further comprising an oscillation condition output unit that outputs optimal oscillation conditions that optimize the evaluation data of the machined workpiece based on the learning model.
3. The swing condition output unit includes a chip shredding condition calculation unit that calculates chip shredding swing conditions under which the chips of the workpiece can be shredded, The machine learning device according to claim 2 , wherein the oscillation condition output unit outputs the optimal oscillation condition that satisfies the chip chopping oscillation condition based on the learning model.
4. The oscillation condition output unit includes an oscillation condition upper limit calculation unit that calculates an upper limit oscillation condition that does not exceed a preset upper limit value, The machine learning device according to claim 2 , wherein the fluctuation condition output unit outputs the optimal fluctuation condition that satisfies the upper limit fluctuation condition based on the learning model.
5. The machine learning device according to claim 1 , wherein the evaluation data of the machined workpiece includes data on surface roughness, roundness or dimensional accuracy of the machined workpiece.
6. A machine learning device that learns swing conditions of a machine tool that performs swing machining while swinging a tool and a workpiece relative to each other, A setting condition acquisition unit that acquires setting conditions for the swing machining as state information; a judgment information acquisition unit that acquires evaluation data of a workpiece machined by the machine tool as judgment information; a behavior information output unit that outputs behavior information indicating how the oscillation conditions should be changed with respect to a current state; A reward calculation unit that calculates a reward value in reinforcement learning based on the determination information; a value function update unit that updates a value function that determines a value of a swing condition of the machine tool based on the state information, the action information, and the reward; an oscillation condition output unit that outputs optimal oscillation conditions that optimize the evaluation data of the machined workpiece based on the value function; A machine learning device comprising:
7. The machine learning device of claim 6, wherein the reward calculation unit sets the reward to a positive value when the evaluation data of the machined work is less than a predetermined threshold, and sets the reward to a negative value when the evaluation data exceeds the predetermined threshold.
8. The swing condition output unit includes a chip shredding condition calculation unit that calculates chip shredding swing conditions under which the chips of the workpiece can be shredded, The machine learning device according to claim 7 , wherein the oscillation condition output unit outputs the optimal oscillation condition that satisfies the chip chopping oscillation condition.
9. The oscillation condition output unit includes an oscillation condition upper limit calculation unit that calculates an upper limit oscillation condition that does not exceed a preset upper limit value, The machine learning device according to claim 7 or 8, wherein the fluctuation condition output unit outputs the optimal fluctuation condition that satisfies the upper limit fluctuation condition.
10. The machine learning device according to claim 7 , wherein the evaluation data of the machined workpiece includes data on surface roughness, roundness, or dimensional accuracy of the machined workpiece.
11. The machine learning device according to claim 10 , wherein when the evaluation data is surface roughness data of the machined workpiece, the reward calculation unit determines the predetermined threshold value based on an approximation formula of a theoretical surface roughness.
12. The machine learning device of claim 11 , wherein the surface roughness data includes at least one of an arithmetic mean roughness, a maximum height, a maximum peak height, a maximum valley depth, an average height, a maximum profile height, and a load length ratio.
13. The set conditions are: Machining conditions including at least one of a feed rate of the tool in the machine tool, a spindle rotation speed, a coordinate value, a cutting edge of the tool, a type of the tool, and a material of the workpiece; The oscillation conditions include at least one of an oscillation frequency and an oscillation amplitude of the machine tool; The machine learning device according to claim 1 , further comprising:
14. The machine learning device according to claim 1 , wherein the machine learning device is shared by a plurality of numerical control devices.
15. The machine learning device according to claim 1 , wherein the machine learning device is provided on a cloud server.
Citation Information
Patent Citations
Acceleration / deceleration control apparatus
JP2018181217A
Control device for machine tool executing swing cutting
JP2019028597A
Support device for grinding machine and support method therefor
JP2020157425A
JPP6739690B
JPP6775720B
