This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2018-165176, filed on Sep. 4, 2018, the entire contents of which are incorporated herein by reference.
A certain aspect of embodiments described herein relates to a learning device, a determining device, a learning method, a determining method and a computer-readable non-transitory medium.
There is disclosed a technology in which it is determined whether sensor data of each sensor provided in a device such as a work device is abnormal or not, with use of a standard for abnormality determination (for example, see Japanese Patent Application Publication No. 2011-164950).
According to an aspect of the present invention, there is provided an apparatus including: a memory; and a processor coupled to the memory and the processor configured to execute a process, the process comprising: generating a probability distribution with respect to each of devices, from first sensor data for learning obtained from a sensor provided in each of the devices; calculating a difference degree among each group of the probability distributions; generating a probability model by synthesizing a group of which the difference degree is less than a threshold into a single probability distribution, multiplying each coefficient with each of the probability distributions, and adding resulting probability distributions to each other; and generating a standard for abnormality determination from the probability model.
According to an aspect of the present invention, there is provided a method including: generating a probability distribution with respect to each of devices, from first sensor data for learning obtained from a sensor provided in each of the devices; calculating a difference degree among each group of the probability distributions; generating a probability model by synthesizing a group of which the difference degree is less than a threshold into a single probability distribution, multiplying each coefficient with each of the probability distributions, and adding resulting probability distributions to each other; and generating a standard for abnormality determination from the probability model.
According to an aspect of the present invention, there is provided a computer-readable, non-transitory medium storing a program that causes a computer to execute a process, the process including: generating a probability distribution with respect to each of devices, from first sensor data for learning obtained from a sensor provided in each of the devices; calculating a difference degree among each group of the probability distributions; generating a probability model by synthesizing a group of which the difference degree is less than a threshold into a single probability distribution, multiplying each coefficient with each of the probability distributions, and adding resulting probability distributions to each other; and generating a standard for abnormality determination from the probability model.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
It is possible to make a standard for abnormality determination on the basis of machine learning by using sensor data of each sensor as data for learning. However, there may be a difference between distributions of the sensor data of devices. Therefore, if a new device is used, determination accuracy may be reduced when the standard for abnormality determination learned with respect to an old device is applied to the new device.
A description will be given of embodiments on the basis of drawings.
The device 10 is a work robot used in a manufacturing line. The device 10 has a robot hand 11 and so on. The robot hand 11 is a device for performing a predetermined work with respect to an object. A sensor 12 is a sensor for detecting force of the robot hand 11, displacement of the robot hand 11, and so on. As an example, the sensor 12 is a strain gauge, a force sensor, an acceleration sensor or the like. In the embodiment, the number of the sensor 12 is two or more. Therefore, a plurality of sensing results (sensor data) are obtained. The controller 20 is a control device for instructing a work of the device 10 at a predetermined timing. The camera 30 is an imaging sensor for capturing an image of working of the device 10. Mainly, the camera 30 captures an image of an object (work or the like). The number of the camera 30 may be two or more.
The learning device 40 makes a standard for abnormality determination by making a probability distribution from sensor data for learning. The making of the standard for abnormality determination is roughly classified into estimation of statistic data model, setting of abnormality degree, and setting of a threshold for abnormality determination. The learning device 40 acts as a sensor data storage 41, a probability distribution generator, 42 a similarity calculator 43, a mixed model generator 44, an abnormality degree setter 45, a threshold setter 46 and so on.
The determining device 50 calculates abnormality degree on the basis of definition of set abnormality degree from a difference (divergence) between sensor data for determination and the standard for abnormality determination after reading the sensor data for determination. The determining device 50 determines whether abnormality occurs or not, with use of the threshold for determination. The determining device 50 acts as a sensor data storage 51, an abnormality degree calculator 52, a determiner 53 and so on.
A description will be given of an example of generating (learning) of the standard for abnormality determination and abnormality determination.
Here, probability distributions which are made from the sensor data for learning are described.
Each of the devices performs the same work. However, the devices are different from each other. Therefore, as illustrated in
And so, as illustrated in
And so, as illustrated in
p(x|μi,Σi) [Formula 2]
It is possible to express the cluster assignment probability of the probability distribution i by πi. For example, the cluster assignment probability π1 is multiplied with the probability distribution 1. A cluster assignment probability π2 is multiplied with the probability distribution 2. It is possible to express the resulting probability distribution by the following formula (3). “θ” in the following formula (3) can be expressed by the following formula (4).
In this case, it is possible to weight the probability distribution with the cluster assignment probability. Therefore, the reduction of the accuracy of abnormality determination is suppressed, compared to the case of
And so, in the embodiment, as illustrated in
Here, a method for determining the threshold c is described. For example, the threshold c of the difference degree is estimated when an observation model p(x|λ) with respect the difference degree (KL divergence) is assumed, a predicted distribution of the difference degree is estimated by Bayesian approach. The KL divergence expressed by the following formula (8) is a positive value. And so, the predicted distribution is calculated when an exponential distribution Expo is used as the observation model, and a gamma distribution (Gam) is used as a prior distribution. It is possible to express the observation model by the following formula (9). It is possible to express the prior distribution by the following formula (10). “a” and “b” indicate a hyper parameter for determining a distribution shape of the gamma distribution. Here, it is possible to define the probability distribution as the following formula (11). Γ(·) is a gamma function.
It is possible to express the posterior distribution by the following formula 12).
It is possible to express the KL divergence by the following formula (13), from the posterior distribution and the observation model.
It is possible to determine the threshold c, when a statistic amount (for example, a standard deviation, an average, a median or the like) of the following formula (14) is determined as the threshold c of the difference degree. “Par II” is a class 2 Pareto distribution.
ParII(x|â,{circumflex over (b)}) [Formula 14]
(Learning Process)
Next, the probability distribution generator 42 calculates a normal distribution as a probability distribution expressed by the following formula (15), from the sensor data X1 for learning (Step S2).
p(x|μ1,Σ1) [Formula 15]
Next, the probability distribution generator 42 uses the L1 regularization term calculated in Step S2 and calculates a loose accuracy matrix expressed by the following formula (16) (Step S3).
{tilde over (Λ)}1 [Formula 16]
Next, the probability distribution generator 42 determines whether an additional learning is performed with respect to a new device (Step S4). When sensor data for learning of a new device which is not learned is accumulated, it is determined as “Yes” in Step S4. When it is determined as “Yes” in Step S4, the device number i is increased by 1 by calculating i=i+1 (Step S5).
Next, the probability distribution generator 42 reads sensor data Xi for learning of a device i from the sensor data storage 41 (Step S6). Next, the probability distribution generator 42 calculates a normal distribution expressed by the following formula (17) as a probability distribution from the sensor data Xi for learning (Step S7).
p(x|μi,Σi) [Formula 17]
Next, the similarity calculator 43 calculates each KL divergence between the normal distribution calculated in Step S7 and each of the normal distributions from the first to the (i−1)-th (the following formula (18) (Step S8).
p(x|μi,Σi) [Formula 18]
Next, the similarity calculator 43 calculates the posterior distribution of the KL divergence expressed by the following formula (19) (Step S9).
p(λ|Y)=Gam(λ|â,{circumflex over (b)}) [Formula 19]
Next, the similarity calculator 43 calculates a predicted distribution of the KL divergence expressed by the following formula (20) (Step S10). Here, a value yi of the KL divergence is a scholar. Y={yi to y1} is a vector.
p(y|Y)=ParII(y|â,{circumflex over (b)}) [Formula 20]
Next, the similarity calculator 43 updates the threshold c, on the basis of the predicted distribution calculated in Step S10 (Step S11). Next, the similarity calculator 43 determines whether the following formula (21) is satisfied or not (Step S12).
When it is determined as “Yes” in Step S12, the mixed model generator 44 adds the sensor data Xi for learning to the cluster j (Step S13). Overlapping is allowed. Next, the mixed model generator 44 calculates a loose accuracy matrix expressed by the following formula (22) from the cluster j to which the sensor data for learning is added (Step S14). After that, Step S4 is executed again.
{tilde over (Λ)}j [Formula 22]
When it is determined as “No” in Step S12, the mixed model generator 44 uses the sensor data Xi for learning as a new cluster i (Step S15). Next, the mixed model generator 44 calculates a loose accuracy matrix expressed by the following formula (23) from the new cluster i (Step S16). After that, Step S4 is executed again.
{tilde over (Λ)}i [Formula 23]
When it is determined as “No” in Step S4, all clusters have been made. And so, the mixed model generator 44 calculates a mixed model (probability model) expressed by the following formula (24) Step S17). Next, the abnormality degree setter 45 sets the abnormality degree. The abnormality degree is a parameter which gets larger when the divergence between the mixed model and the sensor data gets larger. The threshold setter 46 calculates an abnormality score a(x)=1np(x|θ) on the basis of the definition (Step S18). It is possible to use the abnormality score a(x) as the threshold for abnormality determination. With the processes, the flowchart is terminated.
In the embodiment, each probability distribution is made with respect to each of the devices 10, from the sensor data for learning obtained from the sensor 12 provided in each of the devices 10. Next, a difference degree among each group of the probability distributions is calculated. The probability distributions of which difference degree is less than the threshold are synthesized into a single probability distribution. Each coefficient is multiplexed with each of the probability distributions. After that, the probability distributions are added to each other. Thus, a mixed model (probability model) is generated. The standard for abnormality determination (the threshold for abnormality determination) is made from the probability model. With the structure, the degradation of the determination accuracy is suppressed when a new device is used. It is possible to reduce the number of the cluster when generating the mixed model. It is therefore possible to reduce the cost. When the number of the cluster is reduced, it is not necessary to reduce the number of the sensor data with respect to one cluster. Therefore, the determination accuracy is improved.
When the KL divergence is used, it is possible to calculate the difference degree between the probability distributions. It is possible to calculate the threshold of high accuracy, when an observation model of the difference degree is assumed, a distribution of the difference degree is predicted by Bayesian approach, and a statistic amount of the distribution is used as a value.
In the above-mentioned embodiment, the KL divergence is used as an example of indices for indicating the similarity degree. However, the index is not limited to the KL divergence. For example, JS (Jensen Shannon) divergence, Histgram Intersection, Lp norm (p is a positive integer), L0 norm or the like may be used as the index.
(Determining Process)
The determiner 53 determines whether the accumulated value of the abnormality degree exceeds a threshold (Step S23). When it is determined as “No” in Step S23, Step S22 is executed again. When it is determined as “Yes” in Step S23, the determiner 53 outputs information regarding abnormality (Step S24).
In the embodiment, the determination accuracy with respect to the sensor data for determining is improved when the threshold for abnormality determination obtained in the learning process is used.
The CPU 101 includes one or more core. The RAM 102 is a volatile memory temporally storing a program executed by the CPU 101, a data processed by the CPU 101, and so on. The memory device 103 is a nonvolatile memory device. The memory device 103 may be a SSD (Solid State Drive) such as a ROM (Read Only Memory) or a flash memory, or a hard disk driven by a hard disk drive. The memory device 103 stores a learning program and a determining program. The display device 104 is such as a liquid crystal display or an electroluminescence panel and shows results of the learning process or the determining process. In the embodiment, each function of the learning device 40 and the determining device 50 is achieved by the execution of the programs. However, each function of the learning device 40 and the determining device 50 may be a hardware such as a dedicated circuit.
In the above-mentioned embodiments, the probability distribution generator 42 acts as a probability distribution generator for generating a probability distribution with respect to each of devices, from sensor data for learning obtained from a sensor provided in each of the devices. The similarity calculator 43 acts as a similarity calculator for calculating a difference degree among each group of the probability distributions. The mixed model generator 44 acts as a probability model generator for generating a probability model by synthesizing a group of which the difference degree is less than a threshold into a single probability distribution, multiplying each coefficient with each of the probability distributions, and adding resulting probability distributions to each other. The abnormality degree setter 45 and the threshold setter 46 act as a standard generator for generating a standard for abnormality determination from the probability model. The determiner 53 acts as a determiner for determining whether abnormality occurs in sensor data for determining obtained from a sensor provided in a device, on a basis of a relationship between the standard for abnormality determination and the sensor data for determining.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various change, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2018-165176 | Sep 2018 | JP | national |