Utilizing PLC Data for Workpiece Flaw Detection in Machine Tools

Workpiece quality is one of the essential goals of every production company, due to the fact that it is strongly related to customer satisfaction and therefore to sales revenue and business success. While in single-part production every product can be checked for quality issues, this is inefficient in higher volume series production. Hence, random sampling is a widespread method for quality control in high-volume production. The problem with this method is that it just uses samples. Defect workpieces in between the samples are not recognized and therefore processed further on. In this chapter, an approach for monitoring systems for higher volume series production in machine tools is introduced to implement a 100% quality monitoring. It is utilizing the already implemented sensor network that is delivering its data to the machine PLC of the machine tool to indirectly measure the quality.


Introduction
Digitization is rapidly changing our entire economy and our society. The number of connected devices, like IT infrastructural connected objects, sensors and programmable logic controllers (PLCs) [1], is currently increasing rapidly [2]. Thus, until 2020 the number of devices connected to the Internet is expected to rise to eight billion [3]. This applies not only to the areas of household, traffic and mobility, infrastructure and buildings, but also to the industry. Data is currently considered the most valuable resource [4] and is even called "gold of the future" [5].
Larger industrial companies have recognized the value of their own production data and are using different analytic methods to improve the production process. Despite this, small-and medium-sized enterprises still have great difficulties in collecting and utilizing production data.
Internal machine data such as PLC and bus data can be used not only for process control, as is usually the case, but also for condition and quality monitoring, as well as energy efficiency [1]. In addition, data analysis can prevent high economic losses due to late detection of workpiece flaws. A diagnosis of insufficient workpiece quality on a machine tool can be categorized into the following five groups [6]: • Observations by the user of the machine, • Diagnosis by measuring and testing equipment, • Diagnosis by testing workpieces, • Diagnosis by additional sensors, • Model based or signal analytical diagnosis.
Conventional quality control systems can only be applied to randomly chosen samples and are cost-intensive and error-prone. As a consequence, monitoring systems are more and more automated. For these monitoring systems, only the diagnosis with additional sensors as well as model based or signal analytical diagnosis is utilizable [6]. These types of diagnosis allow an early detection of workpiece flaws as well as an identification of their causes [7]. As scrap is reduced, the safety, reliability and profitability of products are improved as well [8].
As described in [9], monitoring systems are divided into direct and indirect measuring systems, depending on whether the parameters to be monitored are observed directly (e.g. cutting force in machine tools) or indirectly via correlated data. For example, measurements of the spindle's power consumption can be correlated to the cutting forces [9][10][11]. Because the environmental influences and the usage of cooling lubricant impedes direct measurements in machine tools, indirect monitoring systems are usually used. As the costs for additional sensors have to be minimized [12], this article focuses on signal analysis diagnostics using machine internal sensors, such as those which are used within the drives.
Furthermore, there are some model-based prediction methods for surface roughness in machining processes [13,14], but there are no known methods for identifying typical workpiece flaws from pre-processing like moulding or forging. Typical flaws of these pre-processes are listed in [15,16]. Based on previous work, which showed that workpiece flaws can be detected through drive-based PLC data [1], this chapter outlines an automated method for monitoring workpiece quality using machine drivebased signals in machine tools. Because the analysed signals are sensitive to tool wear, this aspect is examined in the second part of this chapter.

Automated Quality Monitoring Using Drive-Based Data
In order to show the automated workpiece flaw detection method, a test series, which is subdivided into preliminary and main tests, is examined in this chapter. The preliminary tests investigate the face turning of a solid cylinder for various cutting parameters and are used to develop a statistical concept for automated flaw diagnosis. Within the main tests, the developed concept is applied to a real production process, in which different machining steps of a control disc for a hydraulic pump, which is manufactured at the ETA Factory, a model factory for energy and resource  Table 10.1 shows the relevant processing steps and parameters of the control disc manufacturing process which is examined in the main tests.

Information Flow and Evaluation Process
To control the movements of the axis, the actual values of the machine drives are constantly measured at the frequency inverter and transmitted to the PLC via the fast automation bus Sercos. The signal flow and the evaluation workflow are shown in  The drive-based signals are read out at a sampling rate of 2 ms with a software called MTX efficiency workbench (EWB). This data is buffered until the end of the measurement. In parallel, the Data Analytic Server (DAS, formerly Generic Data Server), a workflow-based software framework by Bosch Rexroth introduced in [1], detects the end of the recording with a filewatch trigger and executes a workflow consisting of the CNC-DataProvider and a computational activity. The CNC-DataProvider imports the buffered EWB data into the database used by the DAS called MongoDB. In the next step, the calculate activity evaluates this data using a precompiled MATLAB DLL which contains the necessary MATLAB functions for workpiece flaw diagnosis and writes the diagnostic results back into the Mon-goDB. This workflow-based evaluation method enables fully automated workpiece flaw analysis in parallel to the production.

Sensitivity Analysis and Signal Processing Steps
A sensitivity analysis was carried out to select appropriate drive-based signals for evaluation. Available signals include the current values of position, speed, power, force and momentum of each axis. In addition to the actual position of the spindle, which is needed to locate the flaw on the workpiece, the following five signals form a feature vector that represents the input for the analysis: • The current position value of the x-axis • The current position value of the y-axis • The current position value of the z-axis • The current spindle power value • The process force of the x-axis, which is the only feed axis during the tests.
While the current position of the axis is measured directly at the engine encoder and the process force is derived from a model, the actual power of the axis is calculated by measuring the DC link voltage and current at the frequency inverter [17]. As a result, it was found that the interference caused by the flaw can be detected in a better way in the five signals by analysing the difference between the averaged last three signals and the currently measured signal. This formula is represented in Eq. 10.1, where i is the number of the currently measured signal. The resulting calculated signal calc.signal oscillates about zero and is not affected by the scale of the signal's trend.
The peaks of the signals caused by the flaws can be easily detected in the calculated signal, as depicted in Fig. 10.2. The calculated signal for the five analysed characteristics is plotted over the radius of the workpiece for the facing process of the full cylinder, whose bores have a diameter of 2.0, 1.5 and 1.0 mm, respectively, at a distance of 9, 18 and 27 mm to the workpiece centre. Three empirically chosen tolerance bands, which are divided into multiple sections, mark a certain standard deviation to the mean value of the currently measured signal. The advantage of dividing the tolerance bands into equidistant sections is the ability to detect small flaws even if the noise's amplitude varies over the workpiece radius.

Workpiece Flaw Detection
A diagnosis of workpiece flaws includes an identification of the flaw, a localization on the workpiece and a quantification of the flaw.
Possible workpiece flaws are detected if the calculated signal exceeds the narrowest tolerance bands. With the corresponding actual position information of the feed and spindle axis, the potential workpiece flaws are localized in the next step. In order to quantify the potential workpiece flaw, a new parameter called intensity of diagnosis IoD was introduced. The IoD indicates the accuracy of the flaw diagnosis and the distribution of the IoD over the workpiece's surface can give more detailed insight into the flaw's size. According to Eq. (10.2), the IoD is the quotient of the number of features F that simultaneously manifest a trespass of the smallest tolerance band and the total number of features F tot multiplied by the quotient of the number of the largest tolerance band T of all features that was trespassed and the total number of tolerance bands T tot times one hundred. If the workpiece shows frequent and locally concentrated of measurements with a high IoD, After the evaluation of the drive-based data, the results of the workpiece flaw analysis, their position and quantification are combined and transferred onto a virtual image of the workpiece, which is displayed in Fig. 10.3. If a potential flaw is identified, because its corresponding data points trespass one of the tolerance bands, the information of its location and its intensity of the diagnosis is mapped on the virtual workpiece image. Areas on the workpiece that show both a locally concentrated high frequency of flaw identifications and an IoD above 75% are thus caused by strong variations between the currently measured and previously measured signals, which clearly indicates a potential workpiece flaw. Areas on the workpiece surface with IoDs below 20% can be correlated to noise in the signal. High IoDs on the outer boards of the workpiece are due to deviations from a perfectly circular workpiece rotation, which is explained in greater detail in the following paragraphs. The virtual image is later transmitted to the machine operator and supports the quality control and source inspection process. As shown in a close-up view of the repartition of the IoD on the virtual image of the workpiece in Fig. 10.4, it is even possible to derive the diameter of the boreholes.

Evaluation and Limits of the Presented Concept
A diagnosis is considered to be accurate if the displayed intensities of the diagnosis at the corresponding locations of the virtual workpiece image match well with the size and position of the actual borehole. As explained in this section, the choice of the analysed process steps impacts whether the diagnosis delivers accurate results or not. A high-precision diagnosis was achieved both for the examined face turning process of the full cylinder and for the face scrubbing of the forged unmachined part of the control disc. The analysis of the face finishing process and the exterior scrubbing of the unmachined part resulted in an inaccurate diagnosis.
These differences in the accuracy of the diagnosis for the different process steps result from the great influence of the relation between the selected cutting parameters and the accuracy of the diagnosis. The diagnosis becomes less accurate at high cutting speeds and feed rates because less data is recorded over the workpiece surface. In addition, the quality of the diagnosis deteriorates at cutting depth of less than 1 mm because the plastic deformation of previous cutting steps reduces the effective size of boreholes.
The face scrubbing of the unmachined workpiece is characterized by moderate cutting speeds and feed rates with simultaneously high cutting depths. Therefore, the  accuracy of the diagnosis proved to be better than with the finishing steps, which use high cutting speeds, low feed rates and very small cutting depths.
Flaws on the side surface of the unmachined part were not detected during the exterior scrubbing, because the flaw's influence on the signal is negligible compared to that of the initially not perfectly round rotating unmachined part. At each revolution of the workpiece, the signals of the five features show large oscillations due to the fact that the flaw, which is located at a covered distance of 7.7 mm form the exterior scrubbing process, cannot be identified. This is seen in Fig. 10.5, which shows the relation between the actual position and the power of the spindle. The flaw could have been detected in the second turning step if the exterior scrubbing process of the unmachined part was divided into two steps each with half of the current cutting depth.
Although the tool wear influence is reduced by focusing on the calculated signals based on the average of the last three cutting processes, noise from progressive tool wear is added to the signal. The noise increases the standard deviation of the signal and thus the size of the tolerance bands. This makes it more difficult to detect flaws in the workpiece.

Influence of Tool Wear on Machine Drive-Based Signals
In order to investigate the influence of the process parameters on the tool wear and to better understand the resulting surface roughness, further experimental series were executed. A face turning process is, therefore, conducted multiple times with different combinations of cutting parameters and analysed for their influence on tool wear, surface roughness and specific energy consumption. The investigated cylinder consists of 42CrMoS4 and GARANT CNMG120408-SG HB7035 inserts are used with a PCLNR 2525 M12 AFR231 tool holder. In these experiments, the already mentioned EMAG VLC100Y machine tool is used, and the surface roughness is measured after each test run with a mobile MarSurf Perthometer M2 measuring device. The process parameters are selected with regard to the face scrubbing process of the hydraulic control disc in order to examine ten different cutting parameter combinations. Based on the basic process parameters listed in Table 10.1, one parameter is modified within a certain range, and the other two parameters are maintained constant (Table 10.2). Considering the differences between the material of the cylinder and the hydraulic control disc, a cutting depth (a p ) of 1.5 mm is used as basis.
As also [18,19] describe, the main influence on tool wear results from an increasing cutting speed. An increase of the feed rate leads to an increase of the surface roughness but has no essential impact on the tool wear, which corresponds with the results of [18,20]. By increasing the cutting depth neither the surface roughness nor the tool wear is affected significantly, as is also the case with [18,21]. In accordance with [21,22] an increase in each of the analysed cutting parameters leads to a reduction in specific energy consumption by increasing the material removal rate.
Furthermore, the impact of tool wear on the power consumption of the spindle is compared for two different combinations of cutting parameters. For this purpose, the cutting parameter combination A with a cutting speed of 180 m/min, a cutting depth of 1.5 mm and a feed rate of 0.3 mm/rev plus the cutting parameter combination B with a cutting speed of 220 m/min, a cutting depth of 1.5 mm and a feed rate of 0.3 mm/rev are chosen. For cutting parameter combination A, representative data rows of the face turning process after a different number of cuts of an insert are shown in Fig. 10.6. It is observable that the spindle power increases with increasing material removal due to tool wear.
In Fig. 10.6, the corresponding spindle power consumption for cutting parameter combination B is displayed. It is obvious that the power consumption varies between the first and 56th cut. Also, this cut represents the last cut for the tool before the test is completed. The latter is associated with a clearly higher power consumption, and the pattern shows irregularities which do not occur with an unworn cutting edge. Figure 10.6 also indicates that the processes with the cutting parameter combination B are shorter because of the higher cutting speed, but also have a higher power consumption because of the higher required spindle speed.
Besides the signals analysed in Sect. 2.2, the power consumption of the axis drives was evaluated for tool wear analysis. It is visible that a change is detected in the power consumption of the x-axis, y-axis and z-axis with increasing tool wear. The corresponding power consumption of the drives of these axes is shown in Fig. 10.7 for cutting parameter combination B. A significant deviation can be determined for  the last cut of the x-axis. The curve shows both deviating and a higher level of the characteristic curves with a peak at the beginning of the process. Additionally, the power consumption curve of the y-axis changes with increasing tool wear. There is a shift to the right and when the tool wear is higher, the curve is at a higher level of power consumption. In contrast, the z-axis does not have higher power consumption, but in that case higher fluctuations in power consumption occur with increasing tool wear.
The data is collected in one measurement and is available both for improving the flaw detection algorithm by automatically adjusting the barriers as tool wear and with it signal noise increases, and for automatic and proactive identification of worn inserts.

Conclusions
This paper presents an automated approach to component failure diagnosis. For this, drive-based data are measured at high frequency and evaluated after completion of the recording. Workpiece flaws, like shrink holes, which are represented by boreholes of different diameters, can, therefore, be reliably detected, located and quantified. Following diagnosis, quality assurance is supported by purposefully prepared data as the display of a virtual image of the workpiece with the intensity of the diagnosis plotted at the corresponding position. In addition, investigations of cutting parameter combinations have shown that the cutting speed has a significant impact on tool wear. The increasing tool wear is clearly identifiable in the power consumption of the axis drives and the main spindle power. This information is useful for both, automated proactive tool replacement and improved flaw detection. The limitations of the concept, like the influence of process parameters and tool wear have been pointed out and offer starting points for future research.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.