**1. Introduction**

The concept of Predictive Maintenance [1–4] foresees the carrying out of maintenance activities before the equipment failure. The primary goal of predictive maintenance is to reduce the frequency of equipment failures by preventing the failure before it actually occurs [5]. This strategy helps to minimize breakdown costs and downtime (loss of production) and increase product quality, well known thanks to [6] and recently reiterated by [4]. Obviously [7] predictive maintenance is different from corrective maintenance, as action will be taken here to "anticipate" the error before it actually occurs. Predictive maintenance is primarily about detecting hidden and potential failures. It does not replace, but joins the Preventive Maintenance in the strict sense, which is linked to the execution of a specific protocol (often agreed with the machine manufacturer) intended to periodically

check, or after a certain amount of work, the state of use of the machine, without any signs of behavioral anomalies having actually occurred. According to [8], if the maintenance strategy only involves interventions that react to failures, the maintenance costs are relatively low but the losses could be high. If preventive and predictive maintenance is introduced, maintenance costs increase: for example, some activities must be carried out using overtime, detectors for predictive maintenance are introduced, time is dedicated to training activities for operators and maintenance workers. Some clues for defining the algorithms on which the cyber-physical system presented here is based derive from research in the field of computational linguistics, which have appeared on papers presented at various important international conferences [9–14].

Here we present a discrete dynamic system, based on events represented as textual messages to which an alert level has been associated and whose data structure is a graph. The system is dynamic because the data structure adjusts itself without additional computational costs if a new message is issued by the machine, which has never appeared before and that is not yet included in the set of known messages. The new message must in any case be validated by a human expert, who must associate the message with an adequate alert level.

This paper is structured as follows: in section 2 we present the main characteristics of the data emitted by the data sources associated with an industrial machine tool, and how they are represented in the system. In section 3 we present the system. In particular, in section 3.1 we present the model for a machine tool, in section 3.2 we give an overview of the system, while in section 3.3 and in section 3.4 we present the two main phases of the system: pre-processing, to be performed only once, and runtime; in section 3.5 and in section 3.6 we present the main algorithms and their theoretical performances; in section 4 we report a brief summary of the results of a prototype of the system applied to a simple, but real, case study. The paper ends in section 5 with some conclusions.

Physically, we assume that each source message emitted by a machine tool is in a semi-structured text format (a sort of simplified JSON): that is, it is a succession of text fields, divided by a field terminator. This provides simplicity and flexibility with the greatest possible space savings. It is possible to store anything within the main dataset, as long as each data has the same information placed in the same order, with the same data type format; otherwise it will be necessary to carry out a pre-processing of the source messages before storing them, downloading the data

*Text Mining for Industrial Machine Predictive Maintenance with Multiple Data Sources*

Manufacturing systems organize machine tools, material handling equipment, inspection equipment, and other manufacturing assets in a variety of layouts. With the advent of Industry 4.0 technologies, these manufacturing resources can be networked, and cyber-physical manufacturing systems can be implemented that integrate hardware and software with mechanical and electrical systems designed for a specific purpose. The model of **Figure 2** shows a representation of the main components of a generic industrial machine from the point of view of data collection and is sufficiently general to be applied to many industrial machines that can be

The generic machine Mi receives from the network a command message known as part program. It is a set of detailed step-by-step instructions executed by the CONTROL system (CNC, PLC) that direct the actions implemented by the actuators. The actuators act as transducers changing a physical quantity, typically electric current, into another type of physical quantity such as rotational speed of an electric motor. During the execution of a part program, the machine tool operates and the CONTROL system produces a log containing data about the executed instructions as well as control messages that indicate some particular machine state. In the meantime, execution data captured by the sensors are sent via the communication

that do not conform to the expected format in a separate archive.

**3. System description**

**Figure 1.**

**3**

**3.1 The model for machine tool**

*A simple fact-based model for a standard log file.*

*DOI: http://dx.doi.org/10.5772/intechopen.96575*

part of process, cellular and line layouts.
