## 2 Literature Review
### Industry 4.0, Cyber-Physical System Architecture, and the First Integration with Prognostics  
The term \"Industrie 4.0\" first appeared in 2011 at the Hannover Fair when the German government used it to designate a strategic approach to manufacturing based on a significant degree of manufacturing automation. Later, the English term \"Industry 4.0\" was used to identify the ongoing revolution involving manufacturing contexts and which is based upon a stricter interaction between manufacturing robots, humans, and machines themselves [11; 12; 13; 14; 15]. While in the scientific literature the essence and the very definition of this new production paradigm is still debated, we focus here on the established key components of Industry 4.0. Particularly, four main cornerstones epitomise I4.0; namely, (i) cyber-physical systems (CPS) (Figure 1), (ii) the Internet of Things (IoT), (iii) the Internet of Services (IoS) and (iv) smart factories [16]. If the CPS represents the \"mechanic hardware\" that allows, with its varying capabilities, the fusion of the physical and virtual world [17; 18], the IoT and IoS turn out to be the strictly connected pivotal elements whose integration into the manufacturing system permits the fourth industrial revolution to take place. In fact, the \"Internet of Things\" makes it possible to connect \"things\", according to a new architecture in which each CPS may cooperate through addressing schemas [19]. The \"Internet of Services\", on the other hand, represents the layer through which the various entities in the I4.0 ecosystem interact and share their services over the internet. These services could be provided and combined into value-added services by different suppliers, allowing a new way of value chain activities [20]. A functional integration of the above-mentioned components effectively synthesises the smart factory concept, defined \"as a factory that context-aware assists people and machines in executions of their tasks\" [21]. Therefore, smart factories have a modular infrastructure, where CPSs monitor physical processes, make decentralised decisions, and cooperate with other CPSs, humans, or other value chain contributors over the IoT and IoS. In a smart factory, not only is there a significant change in interactions among resources, but also in how production systems are operated and decisions are made. In this context, the large amount of data collected by the IoT-IoS architecture pave the way for a higher level of production system control [22]. From a smart factory perspective, [PERSON] et al. in [23] introduce the unified 5C-level architecture as a guideline for the implementation of CPSs in I4.0 manufacturing systems. This work is to be considered as the first attempt to integrate the CPS concept into the current industrial environment, representing, as a matter of fact, the starting point of our research. In [23], the various architectures of the new manufacturing paradigm are analysed (i.e., smart connection, data-to-information conversion, cyber, cognition, and configuration levels), focusing on the cyber level. At this level, as recognised by the Authors, an algorithm is necessary to track changes in the state of a particular machine or equipment, hence deriving additional knowledge from its historical data. To this aim, the same Authors in [24; 25] introduce the \"Time Machine\" approach consisting of three parallel sections: snapshot collection, similarity identification, and synthesis optimised future steps. Figure 1: Cyber-physical system architectures. Furthermore, [PERSON] et al. in [24; 26; 27] proposed an effective self-aware and self-maintaining machine system, showing the first example of a prognostics tool applied to a diesel engine, with the utilisation of several algorithms from the Watchdog Agent(r) toolbox. However, in the proposed tool, the Authors did not consider the information about the past, present, and future workload. In essence, their tool is focused on data-driven monitoring to identify any unusual patterns.