APPROXIMATION ERROR DETECTION DEVICE AND NON-TRANSITORY COMPUTER-READABLE MEDIUM STORING AN APPROXIMATION ERROR DETECTION PROGRAM
20250362206 ยท 2025-11-27
Assignee
Inventors
Cpc classification
G05B2219/41254
PHYSICS
G05B19/404
PHYSICS
G01M99/005
PHYSICS
G06F3/14
PHYSICS
International classification
Abstract
The present invention makes it possible to detect an approximation error amount in approximating and encoding axis-dependent data that depends on the coordinate value of each axis of an industrial machine. An approximation error detection device 1 comprises an approximation error amount detection unit 11 that detects an approximation error amount with an absolute value greater than or equal to a predetermined threshold among approximation error amounts in performing model approximation encoding of axis-dependent data on the basis of a part of the axis-dependent data that depends on the coordinate value of each axis of an industrial machine, and on a linear combination model that approximates the axis-dependent data as a linear combination of data on each axis of the industrial machine.
Claims
1. An approximation error detection device that detects an approximation error, the approximation error detection device comprising an approximation error amount detector that detects, based on a portion of axis-dependent data depending on coordinates of each axis of an industrial machine and a linear combination model that approximates the axis-dependent data as a linear combination of data of each axis of the industrial machine, an approximation error amount having an absolute value equal to or greater than a predetermined value, from among approximation error amounts obtained by performing model approximation encoding on the axis-dependent data.
2. The approximation error detection device according to claim 1, further comprising a numerical value display unit that displays an approximation error amount detected by the approximation error amount detector as a numerical value.
3. The approximation error detection device according to claim 1, further comprising a graphic display unit that displays an approximation error amount detected by the approximation error amount detector as graphics.
4. A non-transitory computer-readable medium storing an approximation error detection program for detecting an approximation error, the non-transitory computer-readable medium storing the program causing a computer to execute a step of detecting, based on a portion of axis-dependent data depending on coordinates of each axis of an industrial machine and a linear combination model that approximates the axis-dependent data as a linear combination of data of each axis of the industrial machine, an approximation error amount having an absolute value equal to or greater than a predetermined value, from among approximation error amounts obtained by performing model approximation encoding on the axis-dependent data.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
PREFERRED MODE FOR CARRYING OUT THE INVENTION
[0043] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. In the description of the second and subsequent embodiments, the description of the configuration common to the first embodiment will be omitted as appropriate.
FIRST EMBODIMENT
[0044] An approximation error detection device according to a first embodiment is a device capable of detecting an approximation error when axis-dependent data depending on coordinate values of each axis of an industrial machine is approximated and encoded. As described above, the axis-dependent data depending on coordinate values of each axis of an industrial machine is difficult to compress by a conventional entropy encoding technique. On the contrary, the inventor of the present invention has studied a data encoding technique capable of compressing, through approximating and encoding, the axis-dependent data depending on coordinate values of each axis of an industrial machine. However, when the axis-dependent data is approximated and encoded, an approximation error amount may still remain. When the approximation error amount is larger than that in the normal state, there may be an issue at the time of measuring the error amount or at the time of error compensation, and it is not possible to perform the error compensation with high accuracy. In view of the above, an approximation error detection device according to embodiments of the present application is capable of detecting such an approximation error, whereby the user can notice such a decrease in accuracy of error compensation.
[0045]
[0046] The approximation error detection device 1 may be provided in, for example, a numerical control device (CNC: Computerized Numerical Control) or a robot control device corresponding to a control device of a machine tool or an industrial machine such as a robot. Alternatively, the approximation error detection device 1 may be provided in an external computer or the like so as to be able to communicate with these control devices.
[0047] Before describing the configuration of the approximation error detection device 1 according to the present embodiment, a data encoding device 10 that generates an approximation error amount after model approximation encoding inputted to the approximation error detection device 1 according to the present embodiment will be described in detail.
[0048] The data encoding device 10 is a data encoding device capable of encoding and compressing axis-dependent data depending on coordinate values of each axis of an industrial machine such as an error amount or the like for use in error compensation of each axis of the industrial machine. Since the axis-dependent data depending on the coordinate values of each axis of the industrial machine may have a white noise-like property in which the appearance frequency as a whole is uniform, it is difficult to compress the data by the conventional entropy encoding technique using the bias of the appearance frequency of the values on the data, that is, the smallness of the information entropy. On the contrary, the data encoding device 10 according to the present embodiment is capable of encoding and compressing axis-dependent data depending on coordinate values of each axis of an industrial machine.
[0049] As shown in
[0050] As a data encoding technique, for example, an entropy encoding technique such as Huffman coding is conventionally known. The entropy encoding technique compresses data by utilizing bias in the appearance frequency of values on the data, i.e., the smallness of information entropy.
[0051] Herein,
[0052] On the other hand,
[0053] By the way, examples of the static error compensation of each axis of the industrial machine include pitch error compensation, straightness error compensation, and three-dimensional error compensation. The pitch error compensation is compensation of an error in a direction along the axial direction. The straightness error compensation is compensation of an error in a direction orthogonal to the axial direction. The three-dimensional error compensation is compensation of a three-dimensional spatial error. These error compensations are executed by inputting the amount of error (hereinafter, referred to as each axis error) measured for each coordinate value of each axis to the control device for the number of axes. As the number of input points increases, the accuracy of error compensation improves, but there is an upper limit to the size of data that can be inputted.
[0054]
[0055]
[0056] Here, in the error compensation of each axis, it is assumed that each axis error is linearly independent. That is, assuming that the error amount in each of the coordinate values X.sub.1 . . . X.sub.L (vector E[X.sup.1] . . . [X.sup.L]) is a linear combination of each axis error, the error amount is expressed by the following Expression (1).
[0057] In Expression (1) above, L represents the number of target axes subjected to error compensation. Further, X.sup.1 represents the first compensation target axis.
[0058] There are many situations where the above Expression (1) based on the above assumption holds, and conventionally, error compensation for each axis is widely used. For example,
[0059] However, when viewed as a whole, the appearance frequency of the value in each axis error (vector E.sub.X[X], vector E.sub.Y[Y]) or the appearance frequency of the value in the error amount (vector E[X][Y]) may be uniform in a white noise-like manner. In this case, it is difficult to compress the data by the conventional entropy encoding technique using the bias of the appearance frequency of the values on the data, that is, the smallness of information entropy.
[0060] In addition, each axis error may not be linearly independent, or the error amount (vector E[X.sup.1] . . . [X.sup.L]) may be determined by correlation between a plurality of axes. That is, the error amount (vector E[X.sup.1] . . . [X.sup.L]) includes the correlation term (vector [X.sup.1] . . . [X.sup.L]) as represented by the following Expression (3), and may not be represented by a linear combination of each axis error.
[0061]
[0062] Here, the present inventor has found that the spatial error cannot be expressed as a linear combination of each axis error as a whole, but can be locally regarded as a linear combination of each axis error as in the case of each axis error. For example,
[0063] However, when viewed as a whole, the appearance frequency of values in the spatial error (vector E[X][Y]) may be uniform in a white noise-like manner, and thus it is difficult to compress the data by a conventional entropy encoding technique using the smallness of information entropy. For example,
[0064] In view of the above, in the data encoding device 10, even for axis-dependent data depending on coordinate values of each axis of an industrial machine such as an error amount or the like for use in error compensation of each axis of the industrial machine, the property is utilized which can be locally regarded as a linear combination of each axis error as represented by the above-described Expression (1). As a result, it is possible for the data encoding device 10 to encode and compress the axis-dependent data, which has been difficult in the related art.
[0065] Referring back to
[0066] The data encoding device 10 according to the present embodiment may be provided in, for example, a numerical control device (CNC: Computerized Numerical Control) or a robot control device corresponding to a control device of a machine tool or an industrial machine such as a robot. Alternatively, the data encoding device 10 may be provided in an external computer or the like so as to be able to communicate with these control devices.
[0067] The model approximation encoder 101 included in the data encoding device 10 generates encoded axis-dependent data obtained by encoding the axis-dependent data based on a portion of the axis-dependent data depending on coordinate values of each axis of the industrial machine and a linear combination model that approximates the axis-dependent data as a linear combination of data of each axis (each axis error) of the industrial machine. The axis-dependent data is inputted from, for example, the above-described control device or the like. Further, the linear combination model is stored in, for example, the storage of the data encoding device 10.
[0068] Here, each axis of the industrial machine indicates, for example, each axis of the machine tool, that is, the X axis, the Y axis, and the Z axis. Further, examples of the axis-dependent data include the error amount for use in the error compensation of each axis of the industrial machine and, for example, an installation error amount of a relatively large workpiece whose displacement is different for each coordinate value due to the influence of deflection due to its own weight. Each of the error amount and the installation error amount of the workpiece is data depending on coordinate values of each axis of the industrial machine.
[0069] Hereinafter, the model approximation encoding using a linear combination model by the model approximation encoder 101 will be described in detail with reference to
[0070]
[0071]
[0072] In Expression (5), X.sup.1 and X.sup.L are represented by Expression (6) below, and a vector c is defined as an average value as represented by Expression (7) below. The vector Ea.sub.X.sup.1[X.sup.1] is expressed by the following Expression (8). Further, L represents the number of target axes subjected to error compensation, X.sup.1 represents the first compensation target axis, and N.sup.1 represents the error amount point of the first compensation target axis.
[0073] In Expression (8), while X represents a one-dimensional axial space, x represents an element belonging to the space. The symbol p is any value from 1 to L. For example, x.sup.3 indicates a certain value that can be taken by the axis X.sup.3.
[0074] When the vector c is defined as in the above Expression (7), the approximation model (vector Ea[X.sub.1] . . . [X.sub.L]) as the linear combination model becomes a maximum likelihood estimation model that minimizes the evaluation function J expressed by the following Expression (9). That is, the evaluation function J is expressed as the sum of squares of the difference between the original error amount before approximation (vector E[X.sup.1] . . . [X.sup.L]) and the error amount after approximation (vector Ea[X.sup.1] . . . [X.sup.L]), as represented by the following Expression (9), and the approximation model (vector Ea[X.sub.1] . . . [X.sub.L]) as the linear combination model is determined so that the evaluation function J is minimized. The approximation model as the linear combination model thus determined is stored in, for example, the storage of the data encoding device 10, and is used for model approximation encoding by the model approximation encoder 101.
[0075] As described above, in the data encoding device 10, it is possible to encode and compress the axis-dependent data, which has been conventionally difficult to compress, by approximating a portion of the axis-dependent data as a linear combination of each axis data (each axis error). Therefore, it is possible to increase data such as the error amount that is inputtable to the control device or the like of the industrial machine without increasing the storage capacity, and it is possible to more accurately compensate for the error of the industrial machine.
[0076] With reference to
[0077] As described above, when the error amount is expressed by the approximation model (vector Ea[X.sup.1] . . . [X.sup.L]) as the linear combination model expressed by the above-described Expression (5), the approximation errors (vectors [X.sup.1] . . . [X.sup.L]) are expressed by the following Expression (10).
[0078] In Expression (10), vectors E[X.sup.1] . . . [X.sup.L] are original error amounts before model approximation, and vectors Ea[X.sup.1] . . . [X.sup.L] are error amounts after model approximation. It can be seen from Expression (10) that these differences are approximation errors (vectors [X.sup.1] . . . [X.sup.L]).
[0079] Here, since the approximation model (vector Ea[X.sup.1] . . . [X.sup.L]) is the maximum likelihood estimation model, the approximation errors (vectors [X.sup.1] . . . [X.sup.L]) are minimized and become only very small values. In addition, only small values of the approximation errors (vectors [X][Y]) are unevenly distributed, and the frequency distribution of the values is also unevenly distributed. Therefore, data can be compressed by encoding the approximation errors (vectors [X.sup.1] . . . [X.sup.L]).
[0080] Therefore, the approximation error amount after the model approximation encoding by the model approximation encoder 101 is basically well approximated by the linear combination of data of each axis. However, the approximation error amount may still remain in model approximation encoding by the model approximation encoding by the model approximation encoder 101. Here,
[0081]
[0082] As described above, when the error compensation is performed using an inappropriate approximation error amount, the accuracy of the error compensation decreases. However, conventionally, there is no measure for prompting the user to notice the decrease in the accuracy of the error compensation. In view of the above, the approximation error amount detector 11 of the approximation error detection device 1 according to the present embodiment has a function of detecting the approximation error amount, whereby the user can notice a decrease in the accuracy of error compensation.
[0083] Specifically, the approximation error amount detector 11 detects, based on a portion of axis-dependent data depending on coordinate values of each axis of an industrial machine and a linear combination model that approximates the axis-dependent data as a linear combination of data of each axis of the industrial machine, an approximation error amount having an absolute value equal to or greater than a predetermined threshold value, from among approximation error amounts obtained by performing model approximation encoding on the axis-dependent data. The approximation error amount detected by the approximation error amount detector 11 is outputted to the outside or the like. With such a configuration, the user of the industrial machine can notice that the approximation error amount after the model approximation encoding is equal to or larger than the predetermined threshold.
[0084] In addition, the approximation error amount after the model approximation encoding when the axis-dependent data is subjected to the model approximation encoding is generated by the model approximation encoder 101 of the data encoding device 10 described above, and inputted to the approximation error amount detector 11. In addition, the threshold value of the approximation error amount is set to an appropriate value based on the approximation error amount in the normal state by performing a test or the like in advance, and is stored in storage or the like of the approximation error detection device 1, and is acquired from the storage. For example, 0 may be set as the predetermined threshold, and in this case, all approximation error amounts are detected.
[0085] According to the present embodiment, the following advantageous effects are achieved.
[0086] The approximation error detection device 1 according to the present embodiment includes the approximation error amount detector 11 that detects, based on a portion of axis-dependent data depending on coordinate values of each axis of an industrial machine and a linear combination model that approximates the axis-dependent data as a linear combination of data of each axis of the industrial machine, an approximation error amount having an absolute value equal to or greater than a predetermined threshold value, from among approximation error amounts obtained by performing model approximation encoding on the axis-dependent data. With such a configuration, it is possible to detect an approximation error amount larger than that in the normal state, from among approximation error amounts obtained by approximating and encoding axis-dependent data depending on coordinate values of each axis of the industrial machine. Therefore, the user of the industrial machine can notice that the approximation error amount after the model approximate encoding is equal to or larger than the predetermined threshold value, and can take measures to eliminate some problem occurring at the time of measurement of the approximation error amount or at the time of error compensation, and can perform the appropriate error compensation.
Modification Example
[0087] A modification example in which the configuration of the data encoding device is different from that of the approximation error detection device 1 according to the first embodiment will be described.
[0088] The above-described data encoding device 10 performs model approximation encoding of a linear combination model on the assumption that a portion of axis-dependent data having a uniform appearance frequency in a white noise-like manner as a whole can be regarded as a linear combination of data of each axis (each axis error). On the other hand, the data encoding device 20 actively divides the axis-dependent data into a plurality of regions to generate a plurality of regions that can be regarded as the linear combination of data of each axis (each axis error), thereby enabling the execution of the model approximation encoding of the linear combination model more reliably.
[0089] The axis-dependent data divider 202 divides the axis-dependent data to generate a plurality of divided axis-dependent data. Here,
[0090] The method of dividing the axis-dependent data by the axis-dependent data divider 202 is not particularly limited, but it is preferable to divide the axis-dependent data so as to generate a plurality of regions that can be regarded as the linear combination of data of each axis (each axis error). In particular, it is preferable that the axis-dependent data divider 202 divides the axis-dependent data into a plurality of regions that can be best approximated (compressed).
[0091]
[0092] The model approximation encoder 201 generates encoded axis-dependent data based on the plurality of divided axis-dependent data and the linear combination model. As described above, in each region of the plurality of divided sections 1 to 5, the axis-dependent data can be regarded as a linear combination of data of each axis (each axis error). Therefore, the model approximation encoder 201 performs model approximation encoding of the linear combination model on each of the divided axis-dependent data to generate the encoded axis-dependent data that are model-approximated and compressed.
[0093] Although not shown in
[0094] As described above, according to the data encoding device 20, by actively dividing the axis-dependent data into a plurality of regions, it is possible to generate each of the plurality of regions that can be regarded as a linear combination of data of each axis (each axis error), and by performing the model approximation encoding of the linear combination model for each region, it is possible to more reliably compress the axis-dependent data, which has been difficult to compress conventionally.
[0095]
[0096] In the above-described data encoding device 20, the method of dividing the axis-dependent data is not particularly limited, but in the data encoding device 30, the axis-dependent data is divided using a dynamic programming method. That is, by using the dynamic programming method, the optimal division of the axis-dependent data can be executed, and the axis-dependent data can be best approximated and compressed.
[0097] As shown in
[0098] Here, the dynamic programming method executed by the dynamic programming processor 303 will be described in detail.
[0099] The dynamic programming method is a generic algorithm for solving optimized problems. The dynamic programming method is an algorithm having the following two features. The first feature is to solve recursively. That is, the first feature is characterized in that a problem is divided into partial problems of a small scale, the partial problems are recursively optimized, and the optimization results of the partial problems are combined to obtain a solution of the original problem of a larger scale. The second feature is that the processing load can be reduced by recording the optimization results. That is, the second feature is characterized in that, although the same problems may appear many times in the process of recursively solving the problems, in order to omit the calculation of a problem which has been solved, the optimization result of the problem which has been solved once is recorded and reused.
[0100] Therefore, the dynamic programming processor 303 includes an optimality evaluator 304 after model approximation encoding as a means for evaluating the optimality of the result. That is, the optimality evaluator 304 after the model approximation encoding evaluates the optimality of the encoded axis-dependent data. The evaluation of the optimality of the encoded axis-dependent data can be performed based on, for example, whether an approximation error amount after the model approximation encoding is within a predetermined constraint tolerance. In addition, as described above, the approximation error amount after the model approximation encoding is a difference between the original error amount before the model approximation encoding and the error amount after the model approximation encoding. The constraint tolerance may be, for example, an allowable approximation error value or an allowable number of points of data exceeding the allowable approximation error value.
[0101] In addition, the dynamic programming processor 303 according to the present embodiment includes the partial divider 305 of axis-dependent data as a means for dividing a problem into partial problems. The partial divider 305 of the axis-dependent data divides the axis-dependent data into a plurality of portions to generate partial axis-dependent data. For example, the partial divider 305 of the axis-dependent data divides the axis-dependent data into predetermined designated sections in accordance with a predetermined division criterion stored in advance, and reduces the resultant data by one point in each of the positive direction and the negative direction of each axis such as the X axis and the Y axis to optimize the resultant data, thereby obtaining a plurality of portions of the axis-dependent data. The division of the axis-dependent data by the partial divider 305 of the axis-dependent data will be described later in detail.
[0102] In addition, the dynamic programming processor 303 includes the optimization result combiner 306 for the partial axis-dependent data as a means for combining the optimization results of the partial problems. The optimization result combiner 306 for the partial axis-dependent data expands and combines the partial axis-dependent data to generate optimal divided axis-dependent data. The optimization result combiner 306 for the partial axis-dependent data optimizes the partial axis-dependent data generated by dividing the axis-dependent data by the partial divider 305 of the above-described axis-dependent data by expanding the partial axis-dependent data by one point in each of the positive direction and the negative direction of each axis such as the X axis and the Y axis. The generation of the optimal divided axis-dependent data by the optimization result combiner 306 for the partial axis-dependent data will be described later in detail.
[0103] Hereinafter, the division of the axis-dependent data by the dynamic programming processor 303 will be described in detail with reference to
[0104] As shown in
[0105]
[0106] In Step S1, the axis-dependent data is divided into predetermined designated sections. However, in a case of a region in which the division processing of the axis-dependent data has been performed by the dynamic programming processor 303, the held processing result may be reflected in this step. Thereafter, the processing proceeds to Step S2.
[0107] In Step S2, an approximation model of each of the regions of the designated sections (designated regions) divided in Step S1 is generated. Specifically, an approximation model (vectors Ea[X.sub.1] . . . [X.sub.L]) as a linear combination model described in the first embodiment is generated for each designated region. Thereafter, the processing proceeds to Step S3.
[0108] In Step S3, it is determined whether the approximation models of the designated regions generated in Step S2 satisfy the constraint of all points. Examples of the constraint include whether the approximation errors of all points are within the allowable value, and whether the number of points at which the approximation errors are not within the allowable value is within the allowable number of points. When it is determined as YES, it is determined that the axis-dependent data has been optimally divided and optimally divided axis-dependent data has been obtained, and the processing is ended. On the other hand, if it is determined as NO, the processing proceeds to Step S4.
[0109] In Step S4, n is set to the initial value 1. Here, the value of n represents each axis and, for example, in a case where the axis configuration is a total of the two axes of the X axis and the Y axis, the value of n represents the X axis when n is 1, and the value of n represents the Y axis when n is 2. Thereafter, the processing proceeds to Step S5.
[0110] In Step S5, it is determined whether n is larger than L. Here, L is the number of axes in the designated section of the axis-dependent data. For example, in a case of the two axes of the X axis and the Y axis, L is 2. When it is determined as YES, the processing proceeds to Step S11. On the other hand, if it is determined as NO, the processing proceeds to Step S6.
[0111] The processing of Steps S6 to S10 is a case where n is equal to or less than L, and when the number of axes is the two axes of the X axis and the Y axis, and when n is 1, it indicates processing for the X axis, and when n is 2, it indicates processing for the Y axis.
[0112] In Step S6, the axis-dependent data is divided into designated sections in which data of each axis (each axis error) is narrowed by one row in the X.sup.n positive direction from the designated sections of Step S1. That is, a new divided section is executed in which data of each axis (each axis error) is reduced by one row in the X.sup.n positive direction. The X.sup.n positive direction indicates the X-axis positive direction when n is 1. The result is outputted as an optimization result nP. When n is 1, the optimization result 1P is outputted. Thereafter, the processing proceeds to Step S7.
[0113] In Step S7, the optimization result nP obtained in Step S6 is expanded in the X.sup.n positive direction by one row of data of each axis (each axis error). The result is outputted as an optimization result nP.sup.+. When n is 1, the optimization result 1P.sup.+ is outputted. Since n can be in the range of 1 to L, the optimization results 1P to LP.sup.+ can be obtained by this step. Thereafter, the processing proceeds to Step S8.
[0114] In Step S8, the axis-dependent data is divided into designated sections in which the data of each axis (each axis error) is narrowed by one row in the X.sup.n negative direction from the designated sections in Step S1. That is, a new divided section is executed which is reduced by one row of data of each axis (each axis error) in the negative X.sup.n direction. The X.sup.n negative direction indicates the X-axis negative direction when n is 1. The result is outputted as an optimization result nM. When n is 1, the optimization result 1M is outputted. Thereafter, the processing proceeds to Step S9.
[0115] In Step S9, the optimization result nM obtained in Step S8 is expanded in the X.sup.n negative direction by one row of data of each axis (each axis error). The result is outputted as an optimization result nM.sup.+. When n is 1, the optimization result 1M.sup.+ is outputted. Since n can be in the range of 1 to L, this step results in optimization results 1M to LM.sup.+. Thereafter, the processing proceeds to Step S10.
[0116] In Step S10, n is incremented by 1. Thereafter, the processing returns to Step S5.
[0117] In addition, Step S11 is processing when n is larger than L, and when the number of axes is two axes, i.e., the X axis and the Y axis, Step S11 is performed after the processing for the X axis and the Y axis is completed in Steps S6 to S10. In Step S11, among the optimization results 1P to LP.sup.+ and 1M to LM.sup.+ obtained in Steps S6 to S10, those having the smallest number of points that cannot be approximated are outputted. That is, for each of the optimization results 1P to LP.sup.+ and 1M to LM.sup.+, the number of points that cannot be approximated for which the approximation model generated in Step S3 does not satisfy the above-described constraint is calculated, and those having the minimum number of points that cannot be approximated, approximated best, and compressed most are obtained, and then the processing is ended.
[0118] Here, the procedure of expanding one row of data of each axis (each axis error) in the X positive direction in the above-described Step S7 will be described in more detail with reference to the specific examples shown in
[0119] As shown in
[0120] Then, each of the extracted sections 1 to 5 is expanded by one row of data of each axis (each axis error) to generate expanded sections 1 to 5, as shown in
[0121] Next, for each of the expanded sections 1 to 5, it is checked whether the above-described approximation model satisfies the above-described constraint. If the constraint is satisfied, the expanded sections are set as the new sections. In the example shown in
[0122] If the constraint is not satisfied, the sections of the expansion amount are set as undetermined sections. In the example shown in
[0123] When each of the undetermined sections is equal to or larger than a predetermined area (for example, 22), it is checked whether the above-described approximation model satisfies the above-described constraint. In the example shown in
[0124] In addition, in a case where the section before expansion is an NG section, that is, a section that does not satisfy the constraint and cannot be approximated, the section of the expansion amount is an undetermined section. In the example shown in
[0125] As described above, there is a case where an undetermined section remains until the end. Such a section may finally be an NG section, that is, a section that does not satisfy the constraint and cannot be approximated.
[0126] As described above, according to the data encoding device 30, since the axis-dependent data can be divided into the optimal divided axis-dependent data that can be compressed while reducing the number of pieces of data to the most, it is possible to generate an optimal plurality of regions that can each be regarded as a linear combination of data of each axis (each axis error), and by executing the model approximation encoding of the linear combination model for each region, it is possible to further compress the axis-dependent data, which has been difficult to compress conventionally.
[0127]
[0128] The machine learning device 9 performs reinforcement learning for optimal division processing of axis-dependent data. In reinforcement learning by the machine learning device 9 according to the present embodiment, when the machine learning device 9 as an agent acquires axis-dependent data such as an error amount of an industrial machine as a state of an environment, and selects divided axis-dependent data as an action, the environment changes based on the action. As the environment changes, the number of points that cannot be approximated and the amount of data after approximation obtained by performing model approximation encoding on the divided axis-dependent data are obtained as determination data. Then, some reward is given according to the obtained determination data, and the machine learning device 9 as an agent selects a better action, i.e., learns the divided axis-dependent data optimal for decision making. The machine learning device 9 as an agent learns to select an action that maximizes the sum of rewards in the future.
[0129] Any learning method can be used for reinforcement learning. For example, Q learning, which is a method of learning a value Q(s, a) for selecting a certain action a under a certain state s of a certain environment, can be used. In the Q learning, in a certain state s, an action a having the highest value Q(s, a) is selected as an optimal action from among possible actions a. However, the correct value of the value Q(s, a) is not known at all for the combination of the state s and the action a at the time when the Q learning is started first. Therefore, the machine learning device 9 as an agent selects various actions a under a certain state s, and learns a correct value Q(s, a) by selecting a better action based on a reward given to the action a at that time.
[0130] In addition, in order to maximize the sum of rewards obtained in the future, the machine learning device 9 aims to finally obtain Q(s, a)=E[(.sup.t)r.sub.t]. Here, E[ ] represents an expected value, t is a time, is a parameter of a discount rate to be described later, r.sub.t is a reward at the time t, and is a total at the time t. The expected value in this expression is an expected value when the state is changed according to the optimal action. However, since it is unknown what the optimal action is in the process of Q-learning, reinforcement learning is performed while searching for various actions. Such an update expression of the value Q(s, a) can be expressed by, for example, the following Expression (11).
[0131] In Expression (11), s.sub.t represents the state of the environment at time t, and at represents the action at time t. The state is changed to s.sub.t+1 by the action at. The term r.sub.t+1 represents a reward obtained by a change in the state. The term with max is obtained by multiplying, by , the Q value in a case where the action a having the highest Q value known at that time is selected under the state s.sub.t+1. Here, is a parameter of 0<1, and is referred to as a discount rate. Further, a is a learning coefficient, and is in a range of 01.
[0132] Expression (11) above represents a method of updating the value Q(s.sub.t, a.sub.t) of the action a.sub.t in the state s.sub.t based on the reward r.sub.t+1 returned as a result of the trial a.sub.t. This update expression indicates that, if the value max.sub.a Q(s.sub.t+1, a) of the best action in the next state s.sub.t+1 by the action a.sub.t is larger than the value Q (s.sub.t, a.sub.t) of the action a.sub.t in the state s.sub.t, Q (s.sub.t, a.sub.t) is increased, and if it is smaller, Q(s.sub.t, a.sub.t) is decreased. That is, the value of a certain action in a certain state is made closer to the value of the best action in the next state. However, although the difference varies depending on the discount rate and the reward r.sub.t+1, basically, the value of the best action in a certain state propagates to the value of the action in the immediately preceding state.
[0133] Here, in the Q learning, there is a method of creating a table of Q(s, a) for all the state action pairs (s, a) and performing learning. However, there is a case where the number of states is too large to obtain the values of Q(s, a) of all the state action pairs, and it would take a long time for the Q learning to converge.
[0134] Therefore, a known technique called Deep Q-Network (DQN) may be used. Specifically, the value function Q may be configured using an appropriate neural network, parameters of the neural network may be adjusted, and the value function Q may be approximated with an appropriate neural network, such that the value of the value Q(s, a) is calculated. By using the DQN, it is possible to shorten the time required for the Q-learning to converge. The DQN is described in detail in, for example, the Non-patent Document of Human-level control through deep reinforcement learning, Volodymyr Mnihl, [online], [searched on Jan. 17, 2017], the Internet <URL: http://files.davidqiu.com/research/nature14236.pdf>.
[0135] Therefore, in order to execute the reinforcement learning described above, the machine learning device 9 includes a state observer 91, a determination data acquirer 92, a learner 93, and a decision-maker 94, as shown in
[0136] The state observer 91 acquires axis-dependent data as state data from the data encoding device 7. In addition, the state observer 91 outputs the acquired axis-dependent data to the learner 93.
[0137] The determination data acquirer 92 acquires, as determination data from the data encoding device 7, the number of points that cannot be approximated and the approximated data amount obtained by performing model approximation encoding on the divided axis-dependent data. The divided axis-dependent data is obtained by dividing the axis-dependent data into predetermined designated sections in accordance with a predetermined division criterion stored in advance. In addition, the determination data acquirer 92 outputs the acquired number of points that cannot be approximated and the approximated data amount to the learner 93.
[0138] The reward calculator 95 of the learner 93 calculates a reward based on the acquired axis-dependent data, the number of points that cannot be approximated and the approximated data amount. Specifically, the reward calculator 95 increases the reward when the number of points that cannot be approximated decreases, and decreases the reward when the number of points that cannot be approximated increases. In addition, the reward calculator 95 increases the reward when the approximated data amount decreases, and decreases the reward when the approximated data amount increases.
[0139] The value function updater 96 of the learner 93 updates the stored value function by performing the above-described Q learning based on the axis-dependent data as the state data, the number of points that cannot be approximated and the approximated data amount obtained by performing the model approximation encoding on the divided axis-dependent data as the determination data, and the value of the reward. In addition, the value function stored in the value function updater 96 can be shared by a plurality of machine learning devices communicably connected to each other, for example.
[0140] The decision-maker 94 acquires the updated value function from the value function updater 96. In addition, the decision-maker 94 outputs the optimal divided axis-dependent data as an action output to the data encoding device 40 based on the acquired value function.
[0141]
[0142] In Step S21, first, the machine learning device 9 outputs the divided axis-dependent data as an action output to the data encoding device 40. The divided axis-dependent data outputted in this step is obtained by dividing the axis-dependent data into predetermined designated sections in accordance with a predetermined division criterion stored in advance. The data encoding device 40 performs model approximation encoding on the divided axis-dependent data to generate the number of points that cannot be approximated and the approximated data amount. Thereafter, the processing proceeds to Step S22.
[0143] In Step S22, the machine learning device 9 acquires axis-dependent data as state data from the data encoding device 40. Thereafter, the processing proceeds to Step S23.
[0144] In Step S23, the machine learning device 9 acquires, as determination data from the data encoding device 40, the number of points that cannot be approximated and the approximated data amount after model approximation encoding of the divided axis-dependent data generated in Step S21. Thereafter, the processing proceeds to Step S24.
[0145] In Step S24, as a determination condition 1, it is determined whether the number of points that cannot be approximated when the data encoding device 40 performs model approximation encoding on the divided axis-dependent data has decreased. If it is determined as YES, the processing proceeds to Step S25, where the reward is increased. On the other hand, if it is determined as NO, the processing proceeds to Step S26, where the reward is reduced. Thereafter, the processing proceeds to Step S27.
[0146] In Step S27, as a determination condition 2, it is determined whether the amount of data after the model approximation encoding when the model approximation encoding is performed on the divided axis-dependent data by the data encoding device 40 is decreased. If it is determined as YES, the processing proceeds to Step S28, where the reward is increased. On the other hand, if it is determined as NO, the processing proceeds to Step S29, where the reward is decreased. Thereafter, the processing proceeds to Step S30.
[0147] In Step S30, the value function stored in the value function updater 96 is updated. Specifically, the value function updater 96 updates the stored value function by performing the above-described Q-learning based on the axis-dependent data as the state data, the number of points that cannot be approximated and the approximated data amount obtained by performing the model approximation encoding on the divided axis-dependent data as the determination data, and the value of the reward. Thereafter, the processing proceeds to Step S31.
[0148] In Step S31, it is determined whether to continue the present learning process. When it is determined as YES, the processing returns to Step S21. On the other hand, if it is determined as NO, the present processing is ended.
[0149] As described above, according to the data encoding device 40, since the axis-dependent data can be divided into the optimal divided axis-dependent data that can be compressed while reducing the number of data by the reinforcement learning by the machine learning device 9, it is possible to generate an optimal plurality of regions that can be regarded as the linear combination of data of each axis (each axis error), and by performing the model approximation encoding of the linear combination model for each region, it is possible to further compress the axis-dependent data, which has conventionally been difficult to compress.
[0150] In the present modification example, the machine learning device 9 is provided separately from the data encoding device 40, but the present invention is not limited thereto, and a machine learning device may be provided inside the data encoding device 40.
[0151] In the first embodiment described above, it is also possible to provide a data encoding program for causing the approximation error detection device 1 to execute processing. That is, it is also possible to provide an approximation error detection program for detecting an approximation error, the approximation error detection program causing a computer to execute a step of detecting, based on a portion of axis-dependent data depending on coordinate values of each axis of an industrial machine and a linear combination model that approximates the axis-dependent data as a linear combination of data of each axis of the industrial machine, an approximation error amount having an absolute value equal to or greater than a predetermined threshold value, from among approximation error amounts obtained by performing model approximation encoding on the axis-dependent data.
Second Embodiment
[0152]
[0153] The numerical value display unit 22 of the approximation error amount acquires an approximation error amount equal to or larger than a predetermined threshold value detected by the approximation error amount detector 21. Further, the numerical value display unit 22 of the approximation error amount displays the approximate error amount as a numerical value on the display screen of the display device 100 by outputting the acquired approximation error amount equal to or larger than the predetermined threshold value to the display device 100.
[0154] Here,
[0155]
[0156]
[0157] According to the present embodiment, the following advantageous effects are achieved.
[0158] The approximation error detection device 2 of the present embodiment further includes the numerical value display unit 22 that displays the approximation error amount detected by the approximation error amount detector 21 as a numerical value. Thus, the user of the industrial machine can easily visually grasp the approximation error amount equal to or larger than the threshold value displayed as a numerical value on the display device 100.
Third Embodiment
[0159]
[0160] The graphic display unit 32 of the approximation error amount acquires an approximation error amount equal to or larger than a predetermined threshold detected by the approximation error amount detector 31. Further, the graphic display unit 32 of the approximation error amount displays the approximation error amount on the display screen of the display device 100 as graphics by outputting the acquired approximation error amount equal to or larger than the predetermined threshold to the display device 100.
[0161] Here,
[0162] Further,
[0163]
[0164] According to the present embodiment, the following advantageous effects are achieved.
[0165] The approximation error detection device 3 of the present embodiment further includes the graphic display unit 32 that displays the approximation error amount detected by the approximation error amount detector 31 as graphics. With such a configuration, the user of the industrial machine can easily visually grasp the approximation error amount equal to or larger than the threshold value displayed on the display device 100 as graphics.
[0166] It should be noted that the present disclosure is not limited to the above-described embodiments, and modifications and improvements within a scope in which the object of the present disclosure can be achieved are included in the present disclosure.
[0167] In each of the above-described embodiments, each model approximation encoder is configured to include the approximation error calculator. However, for example, a configuration may be adopted in which the model approximation encoded axis-dependent data encoded by each of the data encoding devices is decoded by the data decoding device, and the approximation error amount is calculated based on the difference between the decoded axis-dependent data and the original axis-dependent data.
EXPLANATION OF REFERENCE NUMERALS
[0168] 1, 2, 3 approximation error detection device [0169] 9 machine learning device [0170] 10, 20, 30, 40 data encoding device [0171] 11, 21, 31 approximation error amount detector [0172] 22 numerical value display unit of approximation error amount (numerical value display unit) [0173] 32 graphic display unit of approximation error amount (graphic display unit) [0174] 100 display device [0175] 101, 201, 301 model approximation encoder [0176] 102 approximation error calculator [0177] 202, 302 axis-dependent data divider [0178] 303 dynamic programming processor [0179] 304 optimality evaluator after model approximation encoding [0180] 305 partial divider of axis-dependent data [0181] 306 optimization result combiner of partial axis-dependent data