The new industry 4.0 requires the implementation of several cyber-physical systems to increase the level of productivity in a manufacturing system. This chapter proposes an architecture of a generic manufacturing system that requires the use of techniques of agile production, lean manufacturing, and statistical approaches. The combination of the previous techniques will be implemented in the architecture proposed for minimizing the possibility of producing bad products. Thus, the cyber-physical system architecture proposed will optimize the overall system thanks to the implementation of intelligent modules and control strategies. Moreover, 10 proposed actions will be described in detail. These actions can be implemented in cyber-physical systems that take into account five levels.
- cyber-physical systems
- industry 4.0
- lean manufacturing
- agile production
- increase of quality
The new industry 4.0 requires high levels of digitalization in order to process all the information that is generated in virtual representations or cyber versions of the physical processes. This cybernetic level will produce massive information stored in servers that can be used for future digital analyses that intelligent algorithms will use as an input to optimize the process and monitor the system (e.g., detecting anomalies). Thus, decision-making can be produced automatically by the intelligent algorithms implemented or by means of the collaboration of human experts depending on the type of engineering process.
Moreover, the new smart industry must have the capability of reacting to new changes in the market or to different requirements from the customers. This is where the concept of agile manufacturing  is used in order to generate new adaptations to the manufacturing process, keeping high quality in the products in shorter times or producing just in time.
Otherwise, lean manufacturing is the set of resources that help to eliminate waste. Waste is understood as all operations that do not add value to the finished product, to the service offered or different processes. The elimination of waste seeks to REDUCE production costs, material, human resources, stock, inventory, overproduction, lead time/waiting time, transport, and movements in order to INCREASE efficiency production tasks, quality, and overall customer satisfaction. Lean manufacturing can be summarized in four blocks:
Offer a system of continuous improvement.
Nowadays, there is the possibility of integrating these lean manufacturing operations with cyber-physical systems (CPS) to optimize the process. This integration is used in the new industry 4.0 for providing high levels of optimization.
The advantage of industry 4.0 is to revolutionize the management of systems to improve their application in a smart manner. The CPS is used to intercommunicate machine-machine or human-machine taking advantage of the possibility of managing a broad set of useful data in decision-making. This enables the system to be intelligent and flexible in different contexts.
This chapter proposes a cyber-physical system architecture that can be used in the applications of industry 4.0 that automates and improves the effectiveness of concepts such as Just-in-Time methodology. Additionally, seven types of waste (mudas in Japanese) are analyzed and offer ten possible actions to help its implementation.
The structure of the chapter is as follows. Section 2 presents basic concepts about the type of waste and according to the most relevant definitions. Section 3 presents a literature review about the architectures of cyber-physical systems and the general contribution of the CPS proposed. Section 4 presents the proposed actions of the CPS architecture proposed. Finally, conclusions and future work are presented in Section 5.
2. Types of waste
In manufacturing, “waste” or mudas is defined as any activity that consumes resources without adding any value to the manufactured product . There are seven types of mudas: (1) overproduction, (2) inventory, (3) overprocess, (4) reprocess, (5) wait, (6) transportation, and (7) movement.
These mudas belong to the Just-in-Time (JIT) methodology. Just-in-Time is a method that tries what its name indicates. It can be summarized as an effective system in terms of times that take into account the capacity of workers/machines, workload, and resources. Moreover, it is used to organize workers and tools, and it is responsible for reducing waste .
2.1 Overproduction and inventory
The first muda is overproduction. There are times when companies need to meet an established program, even when there are setbacks. “Overproduce” implies producing above the needs of the market. Many companies overproduce to ensure they do not run out of stock in the face of any setback. In this way, they always comply with the specifications of the program.
Producing requires spending on raw materials and energy and spending on time and expenditure on storage. Therefore, overproduction spends all this, but in a less justified way. According to the seven mudas of lean manufacturing, efficient means to produce at a rate coinciding with the demand . When it occurs at a time higher than the demand, unjustified extra hours may be necessary. It is not a solution to produce at a lower rate than the demand because when this happens, it could produce possible waiting times.
The second muda is the inventory. An “inventory” is defined as the number of materials or information that is above the minimum necessary for production. The purpose of lean manufacturing is to save inventory of finished parts because these parts cause storage, cleaning, and maintenance expenses unnecessarily. Quality errors are quite common when inventory levels are high .
2.2 Overprocess and rework
Overprocessing and reprocessing are additional production activities or services. It is understood as additional what the client does not perceive and, therefore, does not confer value to the manufactured product .
Repeated activities and processes cause temporary expenditure. This expense can be avoided by reorganizing, grouping, or simplifying repeated activities and operations. For this, it is necessary to make a global analysis of the manufacturing plant. Lean manufacturing usually uses the value stream mapping system (VSM) to visualize the entire process. The objective is to detect those unnecessary activities or processes .
It is recommended to generate a database that includes all available machines and resources, as well as to collect information about the number of operators, productivity, cycle time, batch change, efficiency of machinery, loss of efficiency in operations, production plans, time that a piece is in the factory since it is raw material until it is terminated, previous and next process being analyzed, flow of information among machines, and data on maintenance.
With this information, a map is produced that offers a global analysis of the activities or processes. This map is called the initial VSM. Through this map, it can locate and solve problems effectively and propose a new map as a final VSM.
Waiting is the time lost while waiting for the pieces from one department to another, especially during automatic production. This lost time affects mainly in the worker’s activity. This effect can be detected during the VSM and can be removed by SMED or the method of total productive maintenance (TPM) .
TPM seeks to guarantee confidence in the processes by offering an activity with zero defects, zero accidents, or zero waste. In order to do this, prevention actions are analyzed and determined. This analysis should be done with the help of the operators through the free maintenance of the machine. This maintenance includes data about cleaning, dirt prevention, identification of anomalies, possible problems, etc. to solve any defect and lengthen the life of the machine.
The SMED method recommends changing the matrix in a single minute. Its objective is to reduce the preparation times of processes to reduce manufacturing and delivery times, which can lead to delays. This method observes and separates internal operations from external operations. Internal operations are those that can only be carried out with the machine stopped. These operations are unlocking, changing, and locking a mold or a tool. External operations are those that can be performed with the device turned on. These operations are, for example, to approach materials, consumables, or parts to a machine and other pre-adjustment actions, such as checking the states of the machines . As it happens with the VSM, for the SMED a study is needed for analyzing the time invested in each activity or process and the type of operation.
2.4 Transport and movement
Although the tasks of transport and movement are considered almost fundamental in a manufacturing company, there are times when they are not essential. It is necessary to minimize the expense of transportation and mobility of parts when they do not add value to the process because it implies a temporary loss and unnecessary fatigue to the operators.
3. Literature review of cyber-physical systems
Actually, there are cyber-physical system (CPS) architectures [7, 8] that include five stages or levels such as (1) connection, (2) conversion, (3) cyberspace, (4) cognition, and (5) configuration. Another CPS architecture for manufacturing processes can be seen in  that contains also five levels such as (1) measurement, (2) acquisition, (3) signal processing, (4) decision support, and (5) loop control. In this architecture, the levels from two to five use data cloud services to process each level. The problem with this architecture is that real-time applications are not recommended to control devices directly from the cloud because the network can generate delays and consequently perturbations in real-time control.
Another example of CPS architecture is proposed by  for a CNC system. This CPS uses as well five layers such as (1) equipment, (2) sensing, (3) network, (4) cognitive, and (5) control. The three first layers represent the physical space, and the last two layers represent the cyberspace (cognitive and control).
According to these architectures, we propose also a cyber-physical system architecture based on five levels as it is shown in Figure 1.
The first level starts with the level of connection that is important among different machines. The communication can use machine-machine (MM) protocols (e.g., MQTT protocol) and requires connections plug and play  and plug and produce that can be connected automatically. This level can use also other ways to identify people like what is proposed in  for human collaboration.
This communication can be used in the second level of conversion of data. In this level, several mechanisms can be used to convert the data into information in order to perform intelligent analysis of the data. Some mechanisms are developed for the forecast and management of the health of the machine, while others are used to analyze the degradation and prediction of performance and also to perform some correlation of multidimensional data.
The third level is created to generate virtual copies or cyber copies of the real physical systems. This level acts as central information where information is sent from each connected machine in a “virtual network of machines.” This module will produce massive information or big data. This information should be stored for being analyzed to extract additional information that provides a better understanding of the status of the individual fleet machine.
These analyses provide the machines with a self-comparison capability, where the performance of a single machine can be compared and qualified among the fleet. On the other hand, the similarities between the performance of the machine and the previous assets (historical information) can be measured to predict the future behavior of the machinery. The historical information generated represents the memory that is accumulated over time of the data generated to identify any variation of the machine.
The fourth level is the level of intelligence and decision-making that provides an adequate presentation of the analytical information so that expert humans and algorithms can decide in the production process. This analytical information can be viewed remotely so that the operator can access the analyses and make the pertinent decisions using human-machine interfaces (HMI) for industry 4.0.
It also has the function of a collaborative diagnosis for maintenance processes, which can be easily determined due to the availability of comparative information and the status information of an individual machine.
The fifth level is the high level of the CPS where a configuration is made with the feedback from the cybernetic part to the physical part. This level performs supervisory control to make the machines self-configured and self-adaptive. It acts as the resilience control system (SCR) to apply the corresponding controls to the decisions made at the level of cognition. Its typical functions are self-configuration for resilience (ability to recover from a disturbance), automatic adjustment for variation, and self-optimization against disturbances.
This architecture proposes three levels of control for avoiding perturbations in real-time control applications: high-level, middle-level, and low-level.
The high-level control can be implemented in levels 4 and 5. These control modules can use cloud services, while the middle level of control can be the level 3 that can use a virtual model of the process and control the real-time system as a master-slave control, where the master device is the cyber version and the slave device is the real-time controller for low-level control. Thus, this system cannot generate delays and interruptions in communication among cloud services and low-level control.
4. Proposed actions for the CPS
Ten actions are proposed for minimizing the possibility of producing bad products in a manufacturing system that can be implemented in the cyber-physical system proposed; these actions are described below:
The first proposed action consists of producing intelligent connections by means of a plug and play and plug and produce concept, in a similar way as the rest of CPS architectures . With this smart connection, it is expected to foresee the demand, the delivery time, and the number of warehouses or intermediaries in the sale through machine learning from the cognitive module. It is proposed to implement a customer relation management (CRM) system, which collects demand data, automates and personalizes sales processes, creates databases with information, and carries out a commercial follow-up. It is also proposed to implement an enterprise resource planning (ERP) system in the cognitive module that integrates the inventory among many types of modules. In this case, it is convenient to manage the manufacturing, human resources, sales, and supply chain modules.
The second proposed action involves converting the extracted data and solving the formula. The conversion aims to use the data obtained during the connection, first action, to measure the characteristics of critical problems and predict possible problems. Next, a state of each operation is created. The purpose is to raise awareness of the machines and analyze the data extracted in the connection. In this case, it is intended to solve the demand formula. For this, it is expected to calculate the required inventory by multiplying the demand (e.g., the weekly order) by the delivery time, by the number of locations required during the process, and by the level of demand variation (standard deviation of the demand).
Third proposed action. The systems can be autoconfigured based on the results of the cognition and of the criteria of priority that the company grants them. For example, if it is considering that the inventory level is high depending on the existing demand, an expert should skip an alert to warn during production and minimize tasks. In any production process, it is recommended to apply a manufacturing execution system (MES) that documents raw materials and finished products. MES allows controlling of resources, analyzing the production, and establishing data on the life cycle of the product. If this information fuses negative or contradicts the objectives of the company, this data could be decisive in decision-making. It is also proposed to establish a system of ERP. It involves making an inventory that collects information about the available machines and tools and connects both the company and the suppliers.
The fourth proposed action requires automating the control of the data of the virtual machines generated at the cyber level. Therefore, it is recommended to perform Key Performance Indicators (KPI), which monitors the data collected in each of the activities or processes that require a machine. The objective is to perform a self-comparison that predicts possible problems to try to improve the times recorded during the data collection. Thus, the data interaction among all the machines can be analyzed at different times for predicting performances, efficiencies, and behaviors of each machine.
Fifth proposed action. The data analyzed by the cognitive level will do self-evaluations to the collected content and forecasting problems. Therefore it is required to establish algorithms that improve the efficiency in the value flow of the analyzed machines, that is, to develop the final VSM. This algorithm will depend on many factors, so it cannot be established generically. Each manufacturing company must attend to its own needs. For example, since cycle times are being monitored, alerts can be automated if these cycles are too long. These alerts can implement mechanisms for solving known problems. It is also recommended to apply a CMM that controls the flow of data, optimize the actual production times, automatically update the configuration of the machines, centralize the data, and store the data so that the cognitive modules can follow up.
The sixth proposed action is useful for the connection, conversion, cognition, and configuration levels to take care of the monitoring of the machines by means of self-detection about their behavior and their state. The conversion measures the collected data and the characteristics of the possible problems to offer the database a self-evaluation. Through the configuration, the machine can be reconfigured according to the requirements that have been established.
Thus, an alert system could be designed to notify the workers of possible faults of the machines. This warning can be directed to the expert worker by means of advanced HMI 4.0 that can help to visualize the situation and make decisions. Moreover, these warnings can detect in addition when some machines will provide a damaged part or can cause health hazards.
Therefore, the records of the cyber copies of the physical system will be useful to register existing anomalies describing the cause of the defect and a description of the hazard. Thus, a maintenance improvement process can be implemented , where the TPM is served with these actions.
The seventh proposed action. For the SMED, a link is needed to automate the data collection of the times, numbering each operation and detecting whether it has been considered an internal or external operation. With this data, it intends to offer cognition through a CPS. As the purpose of this methodology is to convert internal processes to external processes as much as possible, algorithms must be proposed to decide when this is possible. For the design of these algorithms, it is necessary to take note of all the real dangers in each machine, if an operator works on it while it is working. These dangers are numerous and depend on the device, so the design of the algorithm must be customized. There are activities that cannot be performed such as unlocking or changing a mold with a machine on because it is dangerous. Therefore, it is necessary to analyze the possibility of carrying out activities with the engine in motion that is currently carried out with a stopped machine without danger to the worker . Augmented reality can be used in these types of activities, showing in real time the analysis of the machine.
The eighth proposed action (automation, CMM, and SCM) is to invest in automation systems and robotization processes. Digitization can help to increase load volumes without the need to increase time or strength. In addition, it minimizes movements. It is proposed to apply blockchain technology to transform the value chain of the production process. Another useful tool in automated systems is CMM measurements. These measurements allow efficiency during production, and this increases the quality of the products. It is about connecting the already configured machines to a blockchain network to record data and share them. The objective is to verify that everything works correctly. It is also recommended to manage the supply chain (SCM) by tracking the products, linking the company with the suppliers and consumers. This methodology is not incompatible with the ERP, but if ERP is established at a time of production, it will not be necessary to repeat it. For that reason, it is not applied as a recommendation in this action.
The ninth proposed action consists of implementing a statistical module based on the Six Sigma (σ) method in the cognitive level. Six Sigma is a statistical method implemented by engineer Bill Smith when he worked at the Motorola Company .
It is an efficient method to solve a problem with the aim of reducing the number of products with defects. In terms of measurements of positions from sensors, machines or robots could be used to optimize the process. This methodology will result in increased production quality, increased revenue, and increased customer satisfaction.
The objective is to reduce the defects produced reaching a maximum threshold of 3.4 Defects per Million of Opportunities (DPMO). Therefore, the use of Six Sigma can be considered as a process objective, where processes not only find fewer defects, but they do so with low variability and more consistently. Therefore, Six Sigma reduces the variation, so that the analyzed data can be delivered as expected reliable.
Moreover, some alarms can be implemented in the software to alert the maximum limits that the system can accept. Thus, the cyber level can generate data that can be processed, and prevention algorithms can be implemented to minimize defects in the measurements. Therefore, during the historical information, the analysis can prevent bad conditions of sensors, machines, or robots.
The tenth proposed action. This action is for helping to increase the level of adaptability in the cases of agile production. In order to react in a better way with the existing hardware of the plant that uses flexible manufacturing (i.e., robots, CNC, automated systems, among others), it is advisable that the cognitive level of the cyber-physical system may have modules of supervised learning, deep learning, and reinforcement learning. The combination of these three levels of learning could be useful to readapt the position of robotic arms to a new path that is required for producing a new task or product.
Supervised learning  is essential for the normal operation of the system. For example, a system that uses visual recognition can detect the patterns with the information that has been trained, but it is not robust to recognize objects with different conditions. However, deep learning tries to model high-level abstractions in data using architectures composed of multiple nonlinear transformations . Therefore, deep learning could be used for detecting a variety of patterns and generating new adaptations.
Optimization algorithms are important for defining new optimal paths where optimal results can be validated by algorithms that contain intelligent observers or intelligent agents for a particular task. For example, this methodology can be used in the generation of new trajectories of a robotic arm that manipulates and grasps different objects adaptively.
On the other hand, reinforcement algorithms  can be used to generate rewards when an action is performed well. Here, expert operators can take also part in the decision-making process to validate or discredit an action. In this way, the overall process can be adapted to new situations, allowing the system to readapt the decision inside of the constraints of time that the task requires.
The new smart industry of industry 4.0 requires the integration of different technologies, methodologies, and cyber-physical systems in order to improve the level of efficiency and capability of adaptation in the manufacturing process.
High levels of digitalization are required to analyze the big data produced in the cyber level. Therefore, intelligent algorithms can use this information to minimize risks and efforts of the operator in human-machine collaboration and optimize the overall system, maximizing the value of the manufactured product.
The operations that initially give priority to an automated process are the start and stop services of the equipment, operations that detect defects, operations that add effort to the operator (such as loading or transport activities), and feeding operations. However, these concepts are not new because, in the eighteenth century, the Jidoka methodology emerged, which was initially called Autonomation. This method is very close to automation, and its objective was to provide intelligence to machines without the need for human supervision . However, as the fourth revolution advances, companies have understood that the human being is always necessary and the one that brings logic to the cognition of systems. Even if the automation is full, the system needs a previous configuration .
An example of collaboration among humans and robots can be seen with the implementation of collaborative robots (cobots). These cobots can be used with humans to collaborate in tasks where the validation of the operator is necessary. Moreover, another type of collaboration is when humans can take decisions from the results of the cognitive modules where the operator has to validate the results or to provide a hybrid decision using the human intelligence and the results of the intelligent algorithms.
In this chapter, ten actions have been proposed that can be used in a typical cyber-physical architecture of five levels but oriented toward manufacturing with the objective to eliminate the seven mudas of the JIT. Many companies use ERP systems that can be benefited to integrate the actions described before and use the combination of other cognitive modules to analyze the information in multidimensional channels.
Moreover, the last action is suitable for agile manufacturing where some processes can be adapted to new strategy tasks by means of learning methods. Therefore, the time that requires the new adaptation will be an important constraint to consider for producing new optimal strategies. Thus, the system will require initial training with the objective to become an intelligent expert system with the validation of reinforcement algorithms.
Moreover, high levels of security are required to be implemented in the cyber-physical system in all levels of communication. This situation is very important because cloud services, servers, embedded systems, sensors, and programmable logic controllers (PLCs), among others, are used to communicate information, store the data, and analyze the data in the high levels of the CPS. Therefore, it is really important that all the information produced could be generated without noise and errors and the integrity of the data cannot be accessed for non-authorized people.
The collaboration among operators and machines must have high protocols of security in the decision-making process and reinforcement learning and avoid external attacks in the network of the CPS.
Finally, future developments will consist of analyzing new architectures for deep learning processes based on vision systems where the vision system in combination with intelligent agents can predict anomalies in the production and make corrections in real time.