“MES” Through a Smart Vision System

. The level of industrial performance is a vital issue for any company wishing to develop and acquire more market share. This article presents a novel approach to integrate intelligent visual inspection into “MES” control systems in order to gain performance. The idea is to adapt an intelligent image processing system via in-situ cameras to monitor the production system. The images are thus analyzed in real time via machine learning interpreting the visualized scene and interacting with some features of the MES system, such as maintenance, quality control, security, operations, etc. This novel technological brick, combined with the ﬂexibility of production, contributes to optimizing the system in terms of autonomy and responsiveness to detect anomalies, already encountered, or even new ones. This smart visual inspection system is considered as a Cyber Physical SystemCPSbrickintegratedtothemanufacturingsystemwhichwillbeconsideredanedgecomputingnodeintheﬁnalarchitectureoftheplatform.ThissmartCPS representsthe1stlevelofcalculationandanalysisinrealtimeduetoembedded intelligence.Cloudcomputingwillbeaperspectiveforus,whichwillrepresentthe 2ndlevelofcomputation,indeferredtime,inordertoanalyzethenewanomalies encounteredandidentifypotentialsolutionstointegrateintoMES.Ultimately, thisapproachstrengthenstherobustnessofthecontrolsystemsandincreasesthe overallperformanceofindustrialproduction.


Introduction
In the context of Industry 4.0, manufacturing systems are updated to an intelligent level. Intelligent or smart manufacturing aims to convert data acquired across the product lifecycle into manufacturing intelligence in order to yield positive impacts on all aspects of manufacturing [1]. It enables all physical processes and information flows to be available when and where they are needed across holistic manufacturing supply chains, multiple industries, Small and Medium-sized Enterprises SMEs, and large companies. Intelligent manufacturing requires certain underpinning technologies in order to enable devices or machines to vary their behaviors in response to different situations and requirements based on past experiences and learning capacities. These technologies enable direct communication with manufacturing systems, thereby allowing problems to be solved and adaptive decisions to be made in a timely fashion. Some technologies also have artificial intelligence AI, which allows manufacturing systems to learn from experiences in order to ultimately realize a connected, intelligent, and ubiquitous industrial practice [2].
More specifically, Industry 4.0 is a complex combination of innovative functionalities such as Intelligence, Prediction, Interoperability, and Modularity, assured and well implemented to the manufacturing systems through the integration of a bunch of different new technologies and techniques offered by the 4.0 as CPS, Advanced Robotics, IoT, and AI, in order to enhance the production performance, assure the security means of workers and machines, improve product quality, and develop smart products. Therefore, industrials must deal first with a big amount of data generated through the product lifecycle including visual inspection images and quality control processing [3]. Secondly, Manufacturing systems must be able to integrate such flexible and AI-Enabled modules in as less as possible intrusive way.
In this article, we propose a novel approach which improves the MES system with a visual inspection system having an intelligence property since it uses Artificial Intelligence AI/Machine Learning ML in order to optimize the production process. The new model proposed in this paper can be used as a reference for different applications to enhance several functionalities of manufacturing processes, such as maintenance, operations, Quality Control, and security.

State of the Art
It is widely accepted that Information and Communication Technologies ICT are essential to improve production systems. The successful integration of Industry 4.0 into the existing production systems necessitates the deployment of the Industrial Automation pyramid (including PLC, MES, ERP, and other key technologies) in production, or the Product Lifecycle Management supported by advanced CAD/CAM tools [4]. Otherwise, Industry 4.0 requires a new breed of MES that embraces the flexibility, agility, intelligence, and connectivity of the Smart Factory. To meet these needs, the way an MES operates needs to change to accept a comprehensive, decentralized way of operating throughout the plant and beyond. This requires new levels of connectivity and new ways of approaching how users interface with equipment [5]. The dynamics of shop-floor operations with smart materials and smart products are probably one of the biggest challenges for MES systems. Flexibility is enabled in a manufacturing system mainly through the integration of flexible machines and the implementation of flexible and alternative production routes [6]. In addition, this flexibility could not be achieved without having a modular and advanced shop floor control system SFCS. Having such an advanced and flexible manufacturing system, the opportunity to implement the intelligence aspects into the system is hence possible.
Moreover, Industry 4.0 is a complex combination of innovative functionalities such as Intelligence, Prediction, Interoperability and Modularity, assured and well implemented to the manufacturing systems through the integration of a combination of different new technologies offered by the 4.0 as CPS, Advanced Robotics, IoT, and AI, in order to enhance the production performance, assure the security means of workers and machines, improve the product quality, and develop smart products [2]. According to [7], AI is a cognitive science with rich research activities in the areas of image processing, natural language processing, robotics, and machine learning. Robotic systems are playing an interesting role in enabling Industry 4.0 implementation. Modern robots are characterized as systems offering autonomy, flexibility, cooperation, and reconfigurability [8]. A layer of flexibility and intelligence is offered through the integration of machine learning techniques to the image processing stage, and the interconnection between robots and machines which extend the decentralization aspect, and assure several benefits such as lower defect rate, higher quality and reliability [9,10], and improved security.

Smart Visual Inspection System
The model given below in Fig. 1, presents the contribution of this work which figures in the successful implementation of a Machine Learning ML algorithm into an industrial production system, and the effectiveness of using ML to assure in real time visual inspection and rapid decision-making process. Thanks to the interoperability and modularity assured by the MES and the system architecture, the intelligence and the self-adoption of the manufacturing system is possible by adding smart CPSs and smart modules using machine learning and deep learning algorithms and techniques. The ML system runs in a specific machine and reports to the MES the processed data through the PLC using snap7 communication protocol. The MES takes into consideration the received signals and information and acts properly by modifying the initial program and upgrading it as it should. This smart system could play a role in being an edge computing module, which reports unexpected and untrained data to the cloud in order to train the model Fig. 1. Smart visual inspection model for continuous data acquisition and analysis. This model can be used and developed in our ongoing project for several data processing tasks, providing valuable information regarding the predictive maintenance task, the quality control process, and the power consumption optimization.

Use Case
Our research is tested on an industrial production platform 4.0 developed and installed in the research laboratory Fig. 2. The aim of the platform 4.0 project is to create an intelligent and flexible manufacturing process and digital twins by integrating several technologies. Basically, this platform is built from different machines and robots: one fixed Kuka robot, one mobile Kuka robot, a Cognex camera system for raw material identification and classification, a lathe, a milling machine, and a laser cutting machine. At the very beginning, the platform can manufacture, assemble and transfer components with a closed and not-flexible automatic control, resulting in the production of a single product. This mode of operation corresponds to the conventional mass production mode and is subject to uncontrolled disturbances.
The development has focused on adding a flexible layer into this production line by enabling it to produce several product and following different manufacturing cycle in a rapid configuration. The platform is now operated through Wonderware System Platform WSP -Schneider product [11]. The production cycle is not anymore limited due to the high level of PLC intervention. The platform is controlled by the WSP, where alarms, trends, and all data from machines and sensors are collected. The production line, thanks to developing this flexible layer, is able to produce different personalized products (in the limit of machines capacity) and to follow different manufacturing plan, without the need of changing or modifying the manufacturing programs. To test our model, we chose a security application, since we are using two robots in our line Fig. 2, we should not have any human presence inside the production line when it's functioning to avoid any accidents. So, to ensure security, the platform has a physical barrier and an access door that must be closed, preventing anyone from entering the interior when it is operating. However, if the door is closed and a person was present in the production facility or comes in through another unsecured access, no error is reported, and the person can be then in danger. To overcome this problem, we decided to conduct a smart visual inspection system which will detect the presence of the human within the production line using video streams. If a person is detected, the information will then be forwarded to the MES which will pause or reduce the speed of the robots and which will alert the operator who will be able to raise the alert after confirmation that no one is present in the line. The video streams are then fed back to this algorithm which will carry out the detection, and in case of detection of someone present will send the information back to the MES which will pass the line in safety mode Fig. 3 and will warn an operator who will have to raise this alert once the risk has passed.

Conclusion
In this paper, we proposed a novel model for a smart visual system well integrated into the manufacturing execution system well implemented to improve the production system. This model is a concrete contribution that can be used for several applications and cases and assure the optimization of the production process and control. A visual inspection system application was presented as a successful implementation module. This model gives us wide opportunities to develop different parallel modules for data and image processing and integrate them into the manufacturing system in order to enhance and well optimize the whole production process.
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.