A CPS platform oriented for Quality Assessment in welding

. The major advantages of spot and seam welding are high speed and adaptability primarily for high-volume and/or high-rate manufacturing. However, this paradigm fails to meet the principles laid down by Industry 4.0 for real-time control towards Zero Defect Manufacturing for each individual product and intuitive technical assistance on the process parameters. In this paper, a Robust Software Platform oriented for a CPS-based Quality Assessment system for Welding is presented based on data derived from IR cameras. Imaging data are pre – processed in real-time and streamed into a module which utilizes Machine Learning algorithms to perform quality assessment. A database enables data archiving and post processing tasks along with an intuitive User Interface which provide visualization capabilities and Decision Support on the welding process parameters. The modules’ IoT -based communication is performed with 5C architecture and is in line with Web Services.


Introduction
Welding is a well-established process involved in numerus manufacturing scenarios [1]. More than one welding techniques are often utilized in various industries at different manufacturing stages [2] for joining metal parts in high rate/volume production lines. Combined with robotized systems [2] these processes are offering high degree of automation and demanding on the other hand delicate and high level of control in order to address challenges related with the product quality. Eventually, states where weld's quality variability is maximized are configured due to factors such as complex part geometry, poor process parameters optimization, material variations and welding machinery and fixturing issues combined with the aforementioned aspects. The current Quality Assessment (QA) schema related with such welding applications is based mainly in periodical offline and partially on inline low-cognition-capability methods. That is, in the first case destructive tests [3] are incorporated along with costly NDTs methods [4] in a sample manner, creating a significant amount of scrap, introducing delays in production and configuring the product's quality stamp in a probabilistic manner. On the other hand, in-line methods [4] are limited by the onboard machinery sensor configurations, able to act in coarse-grained manner as per their defect cognitive and prediction capabilities. In this regard lately, several attempts have been made on the development of software tools with dedicated interfaces for process modeling [5][6] and monitoring, knowledge extraction, cognitive quality control [7], machine state monitoring and user communication, in a non-unified way and with limited actual results in Laser Welding (LW) and Resistance Spot Welding (RSW). Therefore, the current study presents a web-based quality diagnosis platform for LW and RSW applications based on heuristic, Statistical and Machine Learning (ML) methods. Through the integration of two dedicated modules the platform is able to monitor the welding events, extract key features for classification and prediction and perform decision making for the overall part quality. Post processing functionalities are enabled with the utilization of historical data and they are available to the users along with the aforementioned ones though an intuitive Human -Machine Interface (HMI).

Architecture of Welding monitoring Cyber Physical System
In this study the concept of the Cyber-Physical System (CPS) [8] was adopted to describe the current approach within the context of LW and RSW applications based on the 5C architecture [9]. As shown in Figure 1 the physical counterpart is composed from the two robotized welding systems paired with the corresponding monitoring configurations. In cases of LW the LASER head is configured with a coaxial multispectral monitoring system including a MWIR high speed PbSe sensor-based camera (1 -5μm) and a NIR CMOS camera (0.4 -1μm) for monitor melt pool geometry, thermal distribution and surface dynamics of the workpiece. In addition, to suppress chromatic aberration a result of coaxial integration concept, narrow bandpass filters were aligned in front of the sensors. The RSW system was paired with a special mounting configuration to achieve magnetic protection and galvanic isolation of the SWIR camera which monitors the HAZ during and welding event. In order to bridge the gap from Physical into the Cyber domain an IoT module (Raspberry Pi) was utilized in order to acquire data from the sensors. This in turn, parses the generated metadata and data streams to the QA platform in real time. To this end the top-level architecture of the proposed QA platform ( Figure 1) is structured into a back-end and a front-end component. The sensor data are captured from the IoT Data Acquisition (DAQ) module and passed to a server system in which they are preprocessed, clustered and distributed accordingly to three interconnected applications namely (HMI), LW QA module and RSW QA module paired with a Database element. The HMI application is offering visualization and QA functionalities that are partially supported from the two QA modules. The User Interface (UI) is located on the platforms front-end enabling the aforementioned features for the users.

Quality Assessment modules
High process dynamics of LW [5] and RSW [10] and in general of the welding processes are making physical modeling not feasible for revealing the underlying high dimensional relationships of the input-output variables [7,11]. Two modules were developed in order to exploit such relationships by utilizing heuristic, statistic and ML methods. Their generic structure includes a data preprocessing, a feature extraction and a classification stage allowing the determination of the weld's quality (LW, RSW) and defects identification [12] (Figure 2). The development and initial implementation of modules was carried using MATLAB. Later on, were ported in Python scripts and packed into standalone modules.

LW QA Module
The multispectral monitoring setup is configuring a high dimensional output feature vector not viable for the processing pipeline. In order to reduce its size, bunch of frames after subjected to filtering and normalization in the Pre-processing Module (LW_PM) are individually passed into the Geometrical & Statistical Feature Extraction (GSFE) module in which the 1 st and 2 nd order moments of the spatial temperature surficial profile are extracted along with statistical feature such as the mean, minimum, max, variance and kurtosis of the temperature field are calculated. As depicted in the Figure 2 along with the aid of Principal Components Analysis (PCA) [13] a set of 12 components in total are derived from the image pair and classified utilizing a Support Vector Machine (SVM) Model into GOOD or BAD stich instances. Finally, a Hidden Markov Model (HMM) deducing the overall quality of the stich (multiple SVM outputs) while decision in the same way can be made on the entire component's quality. In case of BAD stich instances, the Defect Identification Module (DIM) determines the defect type based on the output vector of the GSFE module.

RSW QA module
The nature of RSW process demands the analysis of spatiotemporal data. The incoming video data, although including a low spatial number of features, due to the high rate of process dynamics are demanding high acquisition rates configuring eventually a multidimensional output. In order to tackle this problem, as in the LW case PCA was utilized to extract a lower number of features from the video data that were previously subjected into the corresponding pre-processing module (RSW_PM) where thermal drift, background correction, median filtering and centering of the frames where carried out. With the implementation of a Shallow Neural Network (SNN) the reduced fixed-sized video vectors were subjected to binary classification (GOOD or BAD). The last step of this QA module utilizes an HMM in order to determine the overall quality of a part as its deduced from its single spot welds.

Platform requirements
As described in the Section 2 the development of the web-based platform was structured on a server-client logic with its back-end core hosting three real-time data generation modules ( Figure 1). The generated data including data directly emerging from the sensor's outstreams and meta data as defined from the QA modules (quality labels, features). The Database element offering archiving/retrieving functionalities for the aforementioned meta/data enabling, along with the above, a series of potential functionalities for the HMI application and eventually for the UI, located at the platforms front-end. Therefore, in order to define the HMI's functionalities, the platform's requirements need to be specified. Platform's utilization from operators with different duties and responsibilities establishes a set of requirements regarding their access privileges into its different functions. Two type/categories of users namely "Workspace Operator" and "Shift Manager" can be identified with their access requirements to be defined base on their activities. Therefore, for the first category they are configured according to the specific nature of the machine and robot handling activities involved in specific tasks related with the production of specific products. On the other hand, the activities of the users which fall into the second category, are related with the optimization and of product and processes and their management (quality & product engineers). Based on the above and in combination with the information that must be available for the process, a set of requirements can be derived. One of its basic elements regards the real-time/historical data monitoring and visualization of a single process as well as of entire manufacturing sessions, which along with the analysis and processing of data/meta in real and post time can offer insights related with quality issues and correlating them with the status of the process. In the context of decision support towards process and product optimization another subset of requirements can be derived. More specifically, optimization and defect prevention of the process and part through parameter adjustment can be achieved based on communication, reporting and alerting actions among the production's line operators. In addition, collaboration between engineers and operators for overcoming quality issues can be implemented by offering direct recommendations on process parameters based on the analyzed data.

Platform functionalities
Based on the system and user requirements the platform's functionalities are implemented by utilizing the HMI application and the UI as presented below: • User access rights: Two user type were defined (Workspace Operator, Shift Manager) enable through the platform's login screen, providing different access levels to the platform's functionalities for both LW and RSW case. • Process stations: Two welding station were established to accommodate the different visualization widgets for two welding processes. • Platform modes: Two modes (Real-time Monitoring, Post Process Elaboration) were implemented by utilizing two different screens in order to encapsulate separately the functionalities related with real-time and historical data for both LW and RSW cases.
• Data visualization: Real-time monitoring and historical data visualization of the data generated from the sensor and the QA modules, located on the corresponding screens. In the LW case these data including melt's pool evolution data, processed stitch, features evolution, and quality labels for each frame. In the RSW case the visualization of quality labels along with single videos corresponding to single spots are offered for both platform modes. • QA model reconfiguration: Through the platform's API the reconfiguration of the QA modules is enabled for the classification and feature extraction modules with the utilization of historical data.

System's software specifications
Based on the system requirements that obtained from the architecture of the platform as it is analyzed previously the stand-alone QA modules were implemented into Python scripts (CGI) and paired with the appropriate API to enable their utilization from the rest of the back-end's components. The Database system using the HDF5 file format was developed along with a dedicated script for synchronizing, archiving and reading operations of large amounts of data, in order to reduce the volume and exchange time of critical tasks. The last element of the platform's back end is the HMI application which is hosted on an Apache Tomcat 7.0 web server, offering functionality to tasks related with data visualization, processing and data management. For the web framework the Bootstrap v3.3.7 library was utilized, enabling the creation of the UI (Figure 3) for different type of devices.

QA modules performance
In the LW case the collected data processed and classified by studying separately each video frame. This fact along with the absence of extreme welding phenomena (metal expulsion, sparks) had as a result the pixel value's range to be relatively limited allowing this way the PCA algorithm to extract a small number of components (10) with a significant explanation of the total variance (98%). Consequently, the SVM classifier, by utilizing a Linear Kernel, was able to reach a prediction accuracy of 92%. On the other hand, during the RSW Monitoring extreme welding phenomena were captured. Combined with the high dimensional nature of the video data, resulted the thermal footprint per spatial dimension to be described, across the different videos, from quite different ensembles. Due to these factors the PCA was not able to extract a low number of features (10) that can describe data's variability (87%) adequately, forcing the creation of a classification model with high number of tunable parameters. In addition, the small dataset used for training and testing along with information constrains resulted in a "small" classification model with mediocre prediction performance (85%).

Conclusions and future work
This study presented the development and implementation aspects of a quality diagnosis web-base diagnosis platform in the context of the LW and RSW applications. Based on the CPS architecture the elements and functionalities of the platform are enabled insights regarding the quality of the welds and products, allowing the users to perform immediate evaluation of them as well as of the involved process while enhancing actions related with the optimization of their KPIs. The platforms modular architecture can be easily adapted and scaled for different welding processes and complex monitoring setups by adding the appropriate QA modules and creating the corresponding stations in the HMI application. Challenges for the future including the improvement of the RSW QA module by studying a number of feature extraction methods, utilizing genetic algorithms for selecting the best suited NN architecture and experimenting with different classification models to improve and extend its classification performance and capabilities. Except of these the integration of additional sensors predicts that will lead, in general, to an improvement of the platform's defect cognitive capabilities, whilst the development and integration of Digital Twins can be integrated in a later phase for adding process control automation features. This work is under the framework of Project REALM. This project has received funding from Region of Western Greece under the framework of Partnership Agreement ESPA.