Cyber-Physical Quality Systems in Manufacturing

Article History: Received: 10 November 2020; Revised: 12 January 2021; Accepted: 27 January 2021; Published online: 05 April 2021 Abstract: Digital Twin-based Cyber-Physical Quality System (DT-CPQS) concept involves automated quality checking, simulation, and prediction of manufacturing operations to improve production efficiency and flexibility as part of Industrie4.0 initiatives. DT-CPQS will provide the basis for the manufacturing process to march towards an autonomous quality platform for zero defect manufacturing in the future. Analysing sensor data from the CNC machine and vision monitoring system it was concluded that there was enough signal data to detect quality issues in a part being machined in advance using statistical/mathematical models (Smart PLS) and using machine learning algorithms. This allows the operator to take corrective actions before the resultant part ends in a quality failure and reduces the inspection time. The proposed approach forms the basis in expanding this concept to a large machine shop wherein by monitoring various parameters of the machines and state variables of the tools we can detect quality issues and develop an automated quality system using machine learning techniques.


Introduction
Self-optimization is now possible with the advent of Cyber-Physical Systems (CPS) which composes of networks of software /hardware components (Wright, 2013) that control physical processes. This complex manufacturing system that monitors and triggers actions based on decentralized decisions in real-time for the physical processes is called Cyber-Physical Production Systems (CPPS) (Lu et.al, 2020). With the internet of things and a host of sensors being available CPPS now is used in the plug-and-play type of manufacturing plants that have the predefined plant modules and machine components including robots, Computer Numeric Control (CNC) machines, etc. (Wan et al, 2018). The data generated from these plants together with the in-process machine vision system are analysed with mathematical/statistical models and machine learning techniques, to detect problems during the design phase and fix them at the model level, thereby ensuring productivity in terms of quality, reduced cycle time, and increased output per tool change (Zhu et al 2018). The steps involved in CPPS include the acquisition of data, processing the data, analysing the data, decision making and control (Leitao et al, 2016) and specific functions/customization of CPPS is achieved through plug-and-play components (Barbosa et al, 2016). Data interoperability ensures the integration of heterogeneous manufacturing inputs/outputs, and provisions are made for resilience, redundancy, and reliability of critical systems (Zhang& Luttervelt 2011). In this paper, we intend to implement a Cyber-Physical Quality System (CPQS) that can predict the quality of a part being manufactured using an unsupervised machine learning algorithm based on the correlation of the data from various machines on the shop floor and in-process machine vision monitoring systems (Miranda, 2017). This would lead to a reconfigurable quality inspection mechanism wherein depending on the condition of the machine /tools the quality process for the product can be changed on the fly thereby reducing the cycle time required to manufacture the components thereby increasing productivity and reducing the cost of quality.
The Cyber-Physical Quality System (CPPS) will be an important component of "Industry 4.0" (Herman, 2018) that would consist of many paradigms namely Digital Twin, autonomous production systems, dynamic inspection, real and virtual systems, including human-machine interaction which tightly integrates the Physical Things with the Digital world as shown in

Related Works
There have been numerous works executed using CPS to bring efficacy, robustness in production systems like the in-process machine vision monitoring of tool wear and the works done primarily in the area of embedded intelligence and systems but none of them have used a combination of statistical techniques together with machine learning to derive benefits towards reducing cycle time and cost of quality during manufacturing.
However, some of the projects/work/papers worth mentioning are: (a) In-process machine vision monitoring of tool wear for Cyber-Physical Production Systems In this paper (Rmulo,2020) the author has proposed an in-process machine vision monitoring of tool wear integrated into a production system based on the CPS wherein through a four-phased approach (b) Measurements of Tool Wear Parameters Using Machine Vision System Here they have used digital cameras to capture tool wear images and using image processing techniques identify the tool wear zone to take appropriate action. (Avinash,2019) (c) Characterization of machine quality attributes based on spindle probe, coordinate measuring machine, and surface roughness data.
The study investigates the effects of machining parameters as they relate to the quality characteristics of machined features namely dimensional accuracy and surface roughness (Tzu-Liang & Yogini, 2014).
(d) Effect of additional factors on dimensional accuracy and surface finish of turned parts In this study, additional factors like cooling method, blank size, and work material were analysed besides the three major cutting parameters-cutting speed, feed rate, and depth of cut. (Islam, 2013). CPS is also extensively used in process industries to monitor the product quality in real-time examples include monitoring lactic acid fermentation during the production of skim milk and yogurt, smart factory, monitoring and control of oil and gas pipelines, control greenhouse, etc. Similarly, computer vision systems have been used to monitor autonomous production line composing robots, CNC machines, conveyors, and other devices (Yetis & Kurakose, 2016) and automatically detect whether inserts were broken in milling and turning processes (Fernandez et al, 2017). The various modelling techniques that have been used include Petri Nets (PNs) which can simulate various types of asynchronous and concurrent processes in an industrial production system (Murata et al, 1989) and Smart PLS/SPSS techniques to understand the effect of each of the parameters and come up with the correlation function and use machine learning techniques to identify the anomalies. A simple CPS representation of the machining process (Ricardo, 2017) is as shown below in Figure 2.  For the cyber system part of the CPQS, the proposal is to collect the data from the various sensors and machine parameters and using Smart PLS create the statistical model to identify the correlation functions between the various variables affecting the quality of the product. The 26 influencing parameters for getting a quality output for a CNC machining process were a) Dimensional Accuracy:  Since there are about 26+ parameters that influence the quality and the huge amount of data that is generated we have used PCA techniques to reduce the no of variables and to improve the accuracy and performance of anomaly detection we used one-class Support Vector Machining (SVM) machine learning techniques The main objective was to provide an adaptive system for tool wear/breakage detection and surface roughness to reconfigure the Quality Management System for the product dynamically to reduce the inspection time thereby reducing the cost of quality and manufacturing time. This would also ensure that we can get the maximum output from each tool from the current practice of changing tools once a pre-determined batch is completed.
The detailed architecture for such an in-process machine monitoring of the quality of the product for Cyber-Physical Quality System (CPQS) (Bhuiyan et al,2019) is shown in Figure 5.  Table 1.0 below:

The Process
The process envisaged is given below as proposed by various other researchers also (Okopujie et al,2018).
Step 1 Step 2 Step 3 Step 4 It was observed that some of the correlation functions were too small and it made sense to reduce the number of input variables in the dataset. By using dimensionality reduction techniques since large numbers of input features can cause poor performance for machine learning algorithms. Accordingly, we used the Principal This step involves recording the various machining, cutting, tool, work piece machine parameters, environmental conditions and vibration data of all equipment's/tool while they are in good condition and their effect on the inspection parameters mentioned above This step involves create the training set (reference) based on both the good and bad conditions of the above parameters and their effects of these on the quality and then use the appropriate Machine Learning Techniques Identify anomaly condition based on reference and work out the amount of deviation (score) which has the least effect on the inspection parameters This step involves recording the various machining, cutting, tool, work piece, machine parameters, environmental conditions and vibration data of all equipment's/tools while they are in bad condition and their effect on inspection parameters like dimensions tolerances, surface finish etc .
Component Analysis technique to reduce the number of input variables. To improve the accuracy and performance of anomaly detection we used one-class Support Vector Machining (SVM) machine learning techniques.

Cutting Tool perspective
The relationship (Aleksandrovich,2014) between the turning conditions and the response parameter is expressed as Where RFvf is the response function, c is either a function operator of v, f, d, or a constant, is the wanted vibration frequency aspect or c is the response meaning, the estimation is proposed by using a non-linear scientific model. The predictive vibration model is obtained by assuming that the operating parameters (v, f, d) contain exponent indices, taking the natural log of equation (1), which can hence be expressed by equation (2).
Where, x1, x2, x3, are the logarithmic transformation of machining factors, namely, cutting speed, feed rate, and depth of cut (radial)contain respectively, e is the error term and β values are the estimates of corresponding parameters. These coefficients can be obtained through the least-square method for multiple regressions by minimizing the sum of the squares of the residual. Machine learning techniques or statistical techniques were employed for the computation of the regression coefficients and the establishment of the mathematical model. Software like SPSS and Smart PLS was used to ease computations and certify the accuracy of outputs. Vector terms relationship between the vibration frequencies Fvf and process parameters can be represented by the equation given below: Where, C is constant, and x, y, z are the exponents. Equation (3) can be represented in mathematical form as follows: lnRFvf = lnc + xlnv + ylnf + zlnd (4) Equating y = lnRFvf , β0 =lnc , β1 = lnv, β2 = lnf , β3 = lnd The constant and exponents C, x, y, z can also be determined by the least-squares method, where x = x1 y = x2 and z=x3 The predictive vibration linear model developed from the equation can be represented as follows: RFvf = β0 + β1x1 + β2x2 + β3x3 (5) Using the signal to noise ratio(S/N) function proposed by Taguchi we can work out the optimum results based on optimization, data analysis, and prediction of the cutting parameters for the average roughness (Ra), which is the desired characteristic for vibration frequency and the lower the vibration frequency, the better. The equation to find the S/N ratio for this characteristic (vibration frequency) is given by equation (6) Where n is the number of measurements in a test and F is the measured value in a test.

Machine Condition Perspective
Assume that we have N types of equipment in the cyber-physical system, which are monitored by a sensor. Assuming each sensor has taken M measurements, and each Measurement contains K samples of acceleration readings in three dimensions (x,y,z) independently. Given the measurement id m and the sample id k, the readings from vibration sensor n is thus a 3-dimensional vector (Jung et al, 2018). amnk = ( axmnk, aymnk, azmnk) Similarly, given l ∈ { x,y,z}, we use almn to denote the vector of length K, containing all measurement on direction l in the m-th measurement from vibration sensor n, i.e. almn = almn1, almn2,..., almnK Apply normalization readings are calculated as almn = almn −1 * ∑ Kk=1(axmnk /K), in which 1 is a unit vector of length K.
We will use power spectral density (PSD) to capture the subtle characteristics of the vibration behavior, by identifying detailed harmonic components behind RMS. These features are mathematically formulated as follows. r2mn = ∑ ( rlmn )2 , rxmn = 1/√K‖axmn‖ (3) smn = ∑ s lmn , sxmn = 1/2K(axmnWk )2 where WK is a K ×K discrete cosine transform (DCT) matrix that expresses the discrete-time signal axmn by a weighted sum of cosine functions of different frequencies.

Note 1)
rmsxmn is the standard deviation of vibration occurring in the x-axis. 2) (rmsxmn)2 = ∑ Kk=1 sxmnk holds by Parseval's theorem, hence smn alone is sufficient to construct feature space.
The notation is given in Table 2.0 below:

Results and Discussions
A production line would consist of numerous connected machines and sensors on a network and through a machine-cyber interface, data would be collected. This information would be passed on to the cyber twin of each of these components wherein using statistical techniques the correlation function between the various parameters is arrived at. These were then analysed using machine learning techniques to arrive at self-optimized solutions for machining to ensure quality requirements and efficiency requirements. This would involve the following phases:

Phases
a) Phase 1: This phase involves defining the lifecycle of the CPQS -requirement analysis, finalize the development process in terms of system specification b) Phase 2: During this phase, we look at dynamic ways to represent the model in Smart PLS. Other techniques that have been used include Petri Nets Analysis (Jensen,1987). or the 5C CPPS architecture (Ahmadi et al,2017). We also will dwell on the method of validating the CPQS c) Phase 3: The focus during this stage is the implementation which involves fixing the sensors for collecting numerous data in real-time, coding in Python for one-class Support Vector Machining (SVM) machine learning technique, and analyze to improve the accuracy and performance of anomaly detection thereby predict the quality of machining. d) Phase 4: This phase involves deploying the solution initially for a single set up in a machine tool shop for one of the simple components followed by large scale deployments A schematic diagram of the various phases is shown in Figure 6.

Experiments (Proof of Concept)
Objective: Use the sensor signals from the CNC machine to detect dimensional accuracy and surface finish due to wearing out of a cutting tool using machine learning techniques so that the CNC operator can detect in real-time that the cutting tool is worn out and take corrective action before the resultant parts end in a quality failure.
Approach: Break the problem into parts: • Ability to detect that the tool being used is worn out • Determine the correlation between a worn tool and a failed part • Ability to detect if tool wear is leading to a bad part or is within acceptable ranges.
Hypothesis: Digital Twin based Cyber-Physical Quality System for tool wear can predict the failure of the tool with 95% accuracy in real-time.
Analysis: The points of focus for exploratory data analysis were a) Uniqueness of machining process b) Mean value of velocity, voltage, feed rate (x,y,z) c) Distribution of feed rate, clamp pressure. d) correlation of each of these feature's e) time series plot f) difference of distribution for each output feature 2.
Tool Condition-Velocity

Machine Output: Feature Engineering (FFT)
Through some experiment cases, we examined which features are more important to make robust prediction models (feature engineering) for example tool position or current, which is most important to detect machine failure. Analysing the sensor data from the CNC machine and vision monitoring system it was concluded that there was enough signal to detect that a tool is wearing out and there existed a correlation between a worn tool and a failed part. For this, we used Mahalanobis Distance for Outlier Detection methods and machine learning techniques like XG Boost to arrive at the importance of various features that we were monitoring in this experiment. Its effect is observed in Figure 7.

Figure 7. Importance of Various Features
It was observed that velocity and voltage had a large influence on tool wear and there exists a correlation between tool wear and a failed part. It was also observed that tool wear increased the amplitude in the specific frequency range.

Future Challenges
Though the proposed methodology provides an adaptive system to measure quality based on dimensional accuracy and surface finish this would be changing for different types of materials, machines, and tools. Exhaustive studies need to be conducted for the same and also there is a need to identify the best machine learning algorithm that would be able to predict quality. Dynamically changing the quality checking procedures also need to be addressed carefully. Since a production line consists of various types of machines/tools a comprehensive experimental validation and standards for data acquisition, processing, and feature extraction need to be arrived at.

Conclusion
X-axis and Z-axis data have a great influence on tool wear, and the movement of the X-axis and Z-axis can be a bad effect on tool wear. Velocity and voltage have a large influence on the collected data. A certain number of features created by FFT are also included in the top of feature importance, and it is considered that tool wear increased the amplitude in the specific frequency range. Digital Twin based Cyber-Physical Quality System for tool wear can predict the failure of the tool with 95% accuracy in real-time.
The Cyber-Physical Quality System will increase the productivity, quality, and efficiency of the production line. By dynamically changing the quality checking process we can increase the throughput of the production line. The Cyber-Physical Quality System can reduce product defects through early detection of tool wear/breakage, bad surface roughness, and machine deterioration.