**3. System description**

### **3.1 The model for machine tool**

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 part of process, cellular and line layouts.

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

must be interpreted, choosing only the pertinent ones; finally, the data must be

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

In the next step of the pre-processing phase, the system associates an alert level, based on a chromatic scale, to each of the messages coming from the previous step.

**Yellow** Level (warning): There have been sporadic, but not serious, anomalies

**Orange** Level (serious): some serious anomalies, or some cluster of anomalies,

**Black** Level (immediate stop): the system runs the immediate risk of irreparable

In the third step of the pre-processing phase, to be carried out only if there are several data sources associated with the machine tool, composite messages are created, obtained by composing the messages with at least an yellow alert level, a composite message. The order in which messages are juxtaposed is predefined and must be the same as it will appear at runtime. At this point, a general alert level is

Finally, a digital data structure is built containing all composite messages: a text dictionary, in which each line contains a composite message and the relative general

Steps 1 and 2 must be performed for each of the data source entities associated

In the runtime phase, the real data coming from a machine tool are collected and normalized according to the specifications identified in the pre-processing phase. Then, all messages with a compatible timestamp are aggregated into a line of text to

with a specific machine tool. Identifying alert levels requires the help of the machine tool expert, thus steps 2 and 3 need the help of a machine tool expert.

The whole data design process is reported in **Figure 3**.

**Red** Level (very serious): Very serious anomalies were found in the system,

semantically normalized, to adapt it to a common data semantics.

have been found in the system, which could affect the future of work.

capable of affecting, in the very near future, the production activity.

and the system is able to continue without problems.

The levels are as follows:

**White** Level (no problem).

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

equipment or product failures.

alert level.

**Figure 3.** *Data design process.*

**5**

**3.4 Runtime phase**

associated with each composite message.

#### **Figure 2.**

*A simple model for machine tool data collection.*

network to the factory control system. Here, the feedback loop is closed, and feedback actions can eventually be taken.

The generic sensor is represented by its two constituent parts: the transducer (Ti) and the control electronics (CEi); this distinction is useful because even if the sensor is a unified whole, the transducer and the control electronics can be placed into different area of the machine tool. For example, the accelerometer transducer can be placed on the spindle while its control electronics is usually placed within the cabinet together with other control subsystems.

### **3.2 System functionality**

The event-based dynamic cyber-physical system proposed here integrates physical devices with advanced Text Mining analytical technologies and is very general, therefore adaptable to any production domain. It needs the ontology of the messages emitted by the data sources of a machine tool during its normal operation and is able to intercept its (even slightly) anomalous behaviors, which allow to evaluate whether it is moving towards a failure state such as to require the activation of safeguard procedures.

The system consists of a design pre-processing phase to create the main message ontology and which is performed only once for each data source (for example a sensor), and an algorithmic runtime phase. Each message correspond to an event of the data source, has the form of a text messages and has associated an adequate alert level.

#### **3.3 Pre-processing design phase**

The pre-processing phase is performed only once for each data source and allows you to create the initial ontology of the messages. It consists of four main steps.

In the first step of the pre-processing phase, for each data source the set of all messages that it can emits is identified and normalized. In particular, for each industrial machine and for each data source associated with that machine, the possible types of messages that can be issued must be identified; then, these data
