In recent years, the need has continually risen for the introduction of AI and the internet of things (IoT) on manufacturing floors. It allows manufacturers to contain the impact of skilled worker shortages and surging labor costs, while simultaneously increasing equipment utilization and achieving stable production of quality products. OMRON has developed a machine automation controller equipped with a machine learning artificial intelligence (AI) algorithm.
Conventionally, in order to realize anomaly detection of a machine, it was necessary to analyze data based on the cause-effect relation of the device, and to generate an anomaly detection model by data scientists. Dependence on individual skills is an issue to be solved. In order to solve the issue, we have developed tools to realize automatic generation of an anomaly detection model by utilizing a machine learning algorithm.
Recently, the manufacturing sector has been undergoing a rapid shift toward multi-product small-lot production and optimally located global production. Meanwhile, manufacturers are trying to improve equipment availability and continue the stable production of high-quality products while reducing the impact of skilled worker shortages and rising labor costs. Thus, needs have been increasing for AI and Internet-of-things (IoT) technologies on shop floors.
OMRON has developed an AI-equipped machine automation controller (hereafter “AI Controller”) as an example of an AI technology application. An AI Controller controls a machine or line safely before an anomaly occurs by monitoring the constantly changing line/machine conditions in real-time microseconds, and predicts “unusual behaviors” of the machine or line on the basis of an “anomaly detection model” learned by its built-in AI.1）-3）
To make anomaly detection and predictive maintenance available on the shop floor, a clear understanding of the cause-and-effect relationship between manufacturing machine anomalies and measurable sensor data is necessary. The problem at present is that it takes time to acquire statistical processing skills and to perform various necessary analyses.
Moreover, shop-floor engineers, who operate AI Controllers, tend and prefer to place importance on clear traceability of the generation process of any anomaly detection model.
With such issues and operator preferences in mind, we examined a tool that automatically generates anomaly detection models necessary for an AI Controller. The following presents the results of our investigation.
2. Problem set
2.1 Flow of AI Controller-based anomaly detection
An AI Controller detects anomalies in real-time control data (servo motor torque values, fiber optic sensor logic signals, etc.) on various programmable logic controller (PLC)-controlled devices for repetitive cycle manufacturing machinery. As shown in Fig. 1, the AI Controller-based anomaly detection process starts with dividing the collected machine control data into production cycle units (takt times, cycles, etc.). Then, the AI Controller calculates the feature quantities for the waveforms corresponding to the divided intervals. The AI Controller can handle six different types of feature quantities (average, standard deviation, skewness, kurtosis, maximum, and minimum) as distribution pattern attributes and hence can obtain up to 6 feature quantities per waveform. The feature quantities thus obtained are then subjected to Isolation Forest (hereafter “I-Forest”)4）, a type of anomaly detection algorithm, to obtain scores indicative of the degree of anomaly (hereafter “anomaly scores”) as the results. Finally, the AI Controller makes a threshold judgment for each anomaly score to determine the occurrence of an anomaly during the production cycle unit time.
Using this anomaly detection method, the AI Controller provides high detection performance and high-speed processing.5）,6） To make this anomaly detection method work in practice, however, the following two steps must be taken beforehand:
- A）Selection of variables and feature quantities useful for anomaly detection; and
- B）Threshold setting.
Accordingly, the AI Controller operator performs a threephase process consisting of data collection, analysis, and utilizing, as shown in Fig. 2, to enable anomaly detection.
The AI Controllerʼs model generation tool described herein is used at the analysis phase of this process and has the role of generating an anomaly detection model from the machine control data collected at the data collection phase.
2.2 Realization of shop-floor anomaly detection model
To make anomaly detection work on the shop floor, one must know the cause-and-effect relationship between machine anomaly-inducing events and measurable sensor data. Conventionally, this prerequisite could only be met through a time-consuming, complicated statistical analysis process in which various data are repetitively processed and analyzed, including manual trial and error, on the basis of the knowledge and expertise specific to the manufacturing machine until the cause-and-effect relationship with the machine becomes clear to the data scientist. In addition, there are other problems such as: critical information hidden in data that may be overlooked owing to improper use of an analysis technique(s); or inaccurate analysis results may be derived owing to insufficient consideration of the behavior of the machine concerned. Thus, the accuracy of analysis results depends on the level of expertise of the data scientist involved.
Generally speaking, to obtain from available data a required anomaly detection model reflecting a cause-and-effect relationship, the KDD (Knowledge Discovery in Databases)7） process shown in Fig. 3 must be repeated many times by highly specialist data scientists.
The AI Controller may also be operated by machine maintenance personnel and hence must allow those unfamiliar with statistical processing to create optimal anomaly detection models through a small number of steps. Therefore, the key is how easily this KDD process can be performed.
In the AI Controller-based anomaly detection process mentioned above, our model generation tool performs the analysis phase and generates a required anomaly detection model from pre-collected control data. To realize the flow of this analysis phase using the model generation tool, we modified the analysis flow to suit the KDD process, so that we could provide the maximum level of automation for the easy execution of individual processes.
An automated analysis phase, however, would make the model generation process opaque and might not be wellreceived where the shop floor wants the generation process to be transparent. To satisfy these mutually contradictory needs, we solved the following challenges:
- 1. Analysis phase automation by model generation tool
- 2. Anomaly detection user interface (UI) more explanatory of model generation process
The technology developed to solve these two challenges is described in the next and subsequent chapters.
3. Technical details
3.1 Automated analysis phase
We automated the processes (data cleansing, feature quantity calculation, feature quantity selection, and threshold setting) performed by the anomaly detection model generation tool in the analysis phase to eliminate dependence on individual skills in the analysis phase. The specifics are as follows:
- A）Data cleansing
Data obviously unusable for analysis (missing values and zero-variance data) are eliminated from the collected data set.
- B）Feature quantity calculation
As explained in 2.1, the AI Controller can handle six different types of feature quantities. The anomaly detection model generation tool automatically calculates all these feature quantities for the waveform of each collected data item.
- C）Feature quantity selection
Decision tree8） and logistic-regression8） are used as variable selection methods to efficiently search for feature quantities suitable for inlier/outlier discrimination.
Fig. 4 shows the flow of feature quantity selection:
First, using inlier/outlier labels assigned to the collected data items as target variables and all obtained feature quantities as explanatory variables, the decision tree and logistic regression methods are executed to calculate the importance of each feature quantity (a measure for determining the suitability for inlier/outlier discrimination). These two analysis methods select high-importance feature quantities from all obtained feature quantities to narrow down the list of feature quantities.
A decision tree is a machine learning tool that uses a tree structure to perform classification or run a regression. Its advantage is its applicability to non-linear problems. The importance value determined by the decision tree in our technique is the difference in the Gini coefficient of each feature quantity between before and after discrimination. The magnitude of this value is the proportional indicator of the suitability of a feature quantity for use as an inlier/outlier discrimination variable.
A logistic regression is a regression to a logistic function that takes a value between 0 and 1. In our technique, the algorithm is applied to each variable one by one. In addition, the likelihood of a good fit to a response variable (=inlier/outlier label) is interpreted as importance value, the magnitude of which is the proportional indicator of the suitability for use as an inlier/outlier discrimination variable. Being applied to each variable one by one, our algorithm has the advantage of being highly explainable, but the disadvantage of non-applicability to non-linear problems.
We combined these two variable selection methods, mutually different in strengths and weaknesses, into an unbiased method of narrowing down feature quantities.
I-Forest, which is adopted as the anomaly detection algorithm of the AI Controller, is then applied to search for the combination of feature quantities actually having the highest discrimination ability. All combinations of the feature quantities selected by the decision tree and logistic regression in the preceding step are exhaustively examined to measure their discrimination ability at the time of the application of I-Forest. Area under the Curve (AUC)9） is adopted here as the indicator of the modelʼs discrimination ability. AUC here means the area under an ROC curve. An ROC curve is a plot of changes in the relationship that occur between the false positive rate (probability of false-positive anomaly detection) and the true positive rate (probability of true-positive anomaly detection) as the threshold is changed. A model with high discrimination ability is understood as one with a high true positive rate at points where the false positive rate is low. The indicator based on this idea is AUC. Our technique runs an exhaustive search to identify the combination of feature quantities with the highest AUC and uses it as a variable for the anomaly detection model, thereby providing a method of automatic search.
- D）Threshold setting
The point with the highest correct detection rate (ratio of correct inlier/outlier discriminations) is set as the initial threshold value.
Thus, a method is now made available for automatically generating anomaly detection models with high discrimination ability by running the above Steps A) to D) on a collected data set.
3.2 UI more explanatory of model generation process
Through the efforts described in 3.1, we successfully automated the anomaly detection model generation process. This automation, however, resulted in a new problem, the loss of transparency of the model generation process. Accordingly, we added the following improvements to the model generation tool to make the model generation process more explainable.
The first is an improvement made to the operation flow. More specifically, a prompt was included to appear at the final step in the automatic anomaly detection model generation process to ask the user to check the generated model for its discrimination ability, the selected combination of feature quantities, and the set threshold. We also made it possible for the user to go backward through the individual steps of the anomaly detection model generation process to check the details or history of the process, if unsure about the modelʼs discrimination ability or the selected feature quantities, and to adjust the settings, if not convinced of them.
Fig. 5 shows a typical screenshot of the model generation tool. This tool is equipped with: a navigation bar for moving through each step of anomaly detection model generation; a screen for checking the current anomaly detection model for its discrimination ability and its content, i.e., the combination of feature quantities and the threshold; and an operation history check screen. With the above operation flow and UI, the user can check what processing occurred at which step of the anomaly detection model generation process and can check the ultimately generated model for its discrimination ability and content (combination of feature quantities and threshold). Thus, we consider that the tool makes the model generation process more explainable.
Another improvement is that more than one indicator of the modelʼs discrimination ability was provided to make it easier to change the combination of feature quantities or adjust the threshold.
Fig. 6 shows a typical screenshot of the screen for checking the current anomaly detection model for its discrimination ability. The plot in the center shows the relationship between the anomaly scores and the threshold. Meanwhile, the upper and bottom parts of the screen contain the false-positive and falsenegative detection rates as well as the correct detection rate to help check in detail the discrimination ability of the current anomaly detection model. The false-positive detection rate indicates the ratio of inliers falsely determined as outliers, whereas the false-negative detection rate shows the ratio of outliers falsely determined as inliers. Each circle (○) on the plot represents an inlier, while each cross (×) represents an outlier. The case shown in Fig. 6 contains points representing data items incorrectly discriminated by the threshold.
There are some shop floors where false-negative (missed) detections are not tolerated. On the other hand, there are also shop floors where the concern is that frequent false-positive (phantom) detections may result in operators reluctant to trust monitoring results.
Sometimes, the results of a generated anomaly detection model may contain overlaps of inlier and outlier regions as in Fig. 6, thereby making complete discrimination impossible. In such cases, the three indicators of discrimination ability should be checked to make adjustments reflecting shop-floor judgements.
4. Verification test
This chapter uses as an example an Omron-manufactured PLCcontrolled horizontal pillow packing machine (Fig. 7) to describe the results of an on-site verification test on the model generation function of the model generation tool. Horizontal pillow packing is a method of wrapping products with a wrapping material such as resin film into pillow-like forms. General speaking, a horizontal pillow packing machine mainly consists of the following four functions: wrapping material feeding; product feeding; wrapping of products and heat-sealing of wrapping bodies; and heat-sealing and cutting of wrapping ends. These functions are performed by servo motors installed in the packing machine. The failure event most likely to occur to this horizontal pillow packing machine is foreign matter inclusions. Hence, we selected this event for our verification test. Foreign matter inclusions are anomalies that occur as incomplete sealing owing to foreign material included into the heat-sealed seam(s) of the wrapping material. This problem is serious enough to significantly affect product quality.
The AI Controller installed in the packing machine collects measured values of the torque, velocity, and location of each of the four servo motors (on the conveyor shaft, film feed main shaft, and sub-shaft, and top seal shaft) at a constant cycle (2 ms) while receiving logical signals from the three fiber optic sensors every 2 ms. When performing wrapping at the rate of one item per second, the AI Controller collects 500 samples worth of data per package. Fig. 8 shows parts of the torque and velocity data collected from the servo motors.
These collected data are entered into the model generation tool to generate an anomaly detection model. Obtained first are feature-quantity data in up to 90 dimensional spaces, which are calculated from a collected data set (collected data in up to 15 dimensional spaces ×6 different types of feature quantities).
Fig. 9 shows the time series plots (Y axis=feature quantities; X axis=elapsed time) for 6 different types of feature-quantity data obtained from the measured values of the top seal shaft torque. Each circle (○) on the plot represents an inlier, while each cross represents an outlier (×).
Feature quantities useful for anomaly detection are then selected from the feature-quantity data in up to 90 dimensional spaces, obtained by feature quantity calculation. Table 1 shows the importance (likelihood) of each of the feature quantities calculated by the model generation tool. The suitability of each feature quantity for inlier/outlier discrimination increases with the importance (likelihood) in the decision tree and logistic regression columns.
The results in Table 1 reveal that the average and standard deviation of the top seal shaft torque and the maximum value of the top seal shaft velocity are the variables most useful for anomaly detection. As is clear from the plots shown above in Fig. 9 for the feature quantities, the average values of the top seal shaft torque are divided into an inlier region and an outlier region. This also indicates that the average of the top seal shaft torque is useful for anomaly detection.
|Name of feature quantity||Importance (likelihood)|
|Decision tree||Logistic regression|
|Average of top seal shaft torque||67.1||0|
|Std deviation of top seal shaft torque||67.1||0|
|Max. of top seal shaft velocity||67.1||0|
|Max. of top seal shaft torque||63.2||−6.13|
|Kurtosis of top seal shaft torque||61.2||−7.79|
Finally, the anomaly detection algorithm (I-Forest) is actually applied to the high-importance feature quantities to select the combination of feature quantities likely to achieve the highest anomaly detection accuracy; and then the threshold is set. Fig. 10 is a screenshot of the screen that shows that the ultimately selected combination of feature quantities, the results of threshold setting, the behavior of the corresponding anomaly scores, and the discrimination performance values.
The checked items in the variable list on the left side of the screen are the selected feature quantities. The average and standard deviation of the top seal shaft torque are shown selected in the above screenshot. The graph pane on the right side of the screen shows the anomaly scores calculated by I-Forest (circles (○) and crosses (×) representing inliers and outliers, respectively, as in Fig. 9) and the threshold (red straight line). One can see that the threshold is set at a point where the correct detection rate, the false-negative detection rate, and the false-positive detection rate are 100%, 0%, and 0%, respectively. These results verify that the model is generated properly.
The ultimately selected feature quantities are the average and standard deviation of the top seal shaft torque. The reason is that the combination of these two feature quantities results in a correct detection rate of 100%. Among the high-importance feature quantities, the maximum value of the top seal shaft velocity and the variables thereafter are not adopted.
This paper examined a tool used to generate anomaly detection models necessary for an AI Controller. It also explored a technique that can automate anomaly detection model generation and another technique that can make model generation process more explainable.
Accordingly, we conducted a verification test on the tool, using the packing machine described in Section 4. The test demonstrated that the tool can automatically generate proper anomaly detection models, the discrimination performance of which was a correct detection rate of 100%.
This anomaly detection model generation tool has been used by our in-house engineers for verification. This tool has been well received for its performance in anomaly detection model generation and for its operational advantages, such as model generation process traceability and a user interface for adjusting thresholds and selected feature quantities.
Our technique uses decision tree and logistic regression to automate the feature quantity selection process for anomaly detection model generation. Results thus derived are, however, entirely dependent on collected data. Hence, a real cause-and-effect relationship with a machine may be better reflected by feature quantities other than the selected ones. It is difficult for our current tool to generate models representing a real cause-and-effect relationship with a machine as long as its algorithms depend entirely on data for anomaly detection model generation. In the future, we intend to use shop-floor information and other non-digital data to identify cause-and-effect relationships more consistent with shop-floor knowledge and to further improve the anomaly detection model generation process.
- OMRON Corporation. -Fusion of machine control and AI in real time- Development of “machine automation controller with AI”.http://www.omron.co.jp/press/2017/04/c0425.html,（accessed 2018-11-01）.
- Mioki, T.; Deki, J. “Development of AI-equipped Machine Automation Controller (1) Implementation of AI system usable by maintenance personnel and installation of AI function in machine automation controller”
- Ota, M.; Nishiyama, Y. “Development of AI-equipped Machine Automation Controller (2) Data collection synchronized with machine control and realization of Time-Series database”
- Liu, F. T.; Ting, K. M.; Zhou, Z.-H. Isolation-based anomaly detection. ACM Transactions on Knowledge Discovery from Data(TKDD). 2012, Vol.6, No.1, p.3.
- Tsuruta, K.; Minemoto, T.; Hirohashi, Y. Development of AI Technology for Machine Automation Controller (1) Anomaly Detection Method for Manufacturing Equipment by Utilizing Machine Data. OMRON TECHNICS. 2018, Vol.50, No.1, p.6-11.
- Abe, Y., Ueyama, Y.; Sakatani, N.; Fujii, T. Development of AI Technology for Machine Automation Controller (2) The Insight Gained Through Implementation of Anomaly Detection AIs to the Machine Controller. OMRON TECHNICS. 2018, Vol.50, No.1, p.12-17.
- Fayyad, U. M.; Piatetsky-Shapiro, G.; Piatetsky-Shapiro, P. “From Data Mining to Knowledge Discovery: An Overview”. Advances in Knowledge Discovery and Data Mining. Fayyad, U. M.; Piatetsky-Shapiro, G.; Smyth, P.; Uthurusamy, R., eds. AAAI Press/The MIT Press, 1996, p. 495-515.
- Hirai, Y. First Step for Pattern Recognition, Morikita Publishing,2012, p.88-89, 176.
- Ide, T.; Sugiyama, M. Anomaly Detection and Change Detection, Kodansha, 2015, p.11.
The names of products in the text may be trademarks of each company.