Anna Carla Araujo
email: araujo@insa-toulouse.fr

Marcos Vicente

Yann Landon
email: yann.landon@univ-tlse3.fr

Fault diagnosis of CNC machine-tools for drilling Titanium alloy

Keywords: Smart manufacturing, Discrete event systems, Industrial Internet of Things, Fault diagnosis, Aerospace materials

The development of intelligent techniques based on real-time monitoring for machining applications is one of the challenges of Industry 4.0, as in the Aerospace Industry. Drilling is the most used process before the assembly of airplane sheets, that nowadays are composed of different layers of materials with different optimized cutting conditions. The fault diagnosis during drilling stack materials is important to reduce cost and improve the process quality. Using a machine-tool, it is important that the fault diagnoser does not use a large amount of memory and be capable of detecting faults in a fast manner. In this paper, we propose a timed automaton model representing the drilling process of a Titanium plate on a CNC machine, which is suitable for fault diagnosis without any additional sensors. The diagnoser uses only the spindle power and Z axis displacement read directly from the system controller. The target faults in this case are: (i) excessive tool-wear or tool breakage; (ii) the tool finds an off-centered hole while producing a blind-hole; (iii) the tool finds an under layer of a different material, as it occurs in a bi-layer material; and (iv) the plate thickness is below the desired one and a though hole is produced. The results show that the model is capable of identifying all faults and it could be used to alert a problem on the sequence of machining holes in the industry.

Introduction

With the advances of the Industry 4.0, it is expected a more integrated operation between humans and machines. In order to do so, it is necessary to provide a safe environment where humans can better visualize the operations that the machines are performing, and the system must report alarms when there is some kind of fault in the system in order to the operator to actuate the system with a view to mitigating possible damages. Thus, an automatic fault diagnosis system is crucial to guarantee reliability, and reduce losses and production cost in smart machining. It is very important that any abnormal condition on a CNC machine-tool be rapidly identified by the operator in order not to waste the workpiece or cause an excessive wear of the cutting tool and help the operator in his decision to recover the system. This is the first level for developing smart manufacturing systems [START_REF] Chen | Toward intelligent machine tool[END_REF].

Indeed, smart machining refers to real time diagnosis, alert to the operator and adaptation of cutting parameters for process optimization based on a data base [START_REF] Araujo | Smart drilling for aerospace industry: state of art in research and education[END_REF]. For example, thousands of holes has to be drilled for assembling stack layers in an aircraft, so smart drilling is a key point for performance maximization because each layer should be machined with different parameters to have a proper tool life [START_REF] Geier | Advanced cutting tools and technologies for drilling carbon fibre reinforced polymer (cfrp) composites: A review[END_REF] or identify the material for adapting the proper cutting parameters, as feed rate and cutting speed, in real time for process optimization [START_REF] Gonçalves | Smart drilling: material identification using specific force map[END_REF], Deshpande et al., 2022a].

Several works in the literature address the problem of fault diagnosis of CNC machines using different strategies and objectives. [START_REF] Drake | Multiple fault diagnosis for a machine tool's flood coolant system using a neural network[END_REF] present a method of diagnosis of multiple faults in the flood coolant system of a CNC vertical milling machine tool. In order to do so, a neural network is used to perform pattern recognition with features extracted from the transient response of the coolant pressure on shut-down. [START_REF] Hu | An intelligent integrated system scheme for machine tools diagnostics[END_REF] propose an intelligent integrated diagnosis system based on neural networks and expert systems, and [START_REF] Lee | Fault diagnosis and recovery for a cnc machine tool thermal error compensation system[END_REF] present a method for fault diagnosis of temperature sensors along with the recovery for faulty data. [START_REF] Wang | Open cnc machine tool's state data acquisition and application based on opc specification[END_REF] propose a method for data acquisition of CNC machine tools based on OPC specification, the communication framework of state data, and application of data mining is presented. Using the method, the user is able to build a monitoring platform which can provide fault warnings. More recently, the use of expert knowledge-based systems is proposed for identifying machine tool failures caused by accidental events such as cable disconnection or impact events [START_REF] Colasante | A fuzzy knowledge-based system for diagnosing unpredictable failures in cnc machine tools[END_REF]. [START_REF] Zhang | Fault diagnosis strategy of cnc machine tools based on cascading failure[END_REF] propose a fault diagnosis strategy based on cascading failures. The fault propagation model, which models the process of fault propagation, is constructed, and can be used to locate the source of the fault.

A different approach for fault diagnosis has been presented in the seminal work by [START_REF] Sampath | Diagnosability of discrete-event systems[END_REF] in which the system is abstracted as a Discrete-Event System (DES), i.e., a system with a discrete set of states and whose state evolution depends entirely on the occurrence of discrete events over time [START_REF] Cassandras | Introduction to Discrete Event System[END_REF], and the fault is said to be diagnosable when it can be detected and isolated within a bounded number of event occurrences. Thus, the fault diagnoser must observe the sequence of events generated by the system and compare it with the sequences which have the same observation generated by the corresponding model. If the observed sequence corresponds only to sequences containing a specific fault type, then this fault is diagnosed. Since then, several strategies for fault diagnosis of DES have been presented in the literature for untimed and timed system models [START_REF] Santoro | Computation of minimal diagnosis bases of discrete-event systems using verifiers[END_REF][START_REF] Cabral | Synchronous diagnosis of discrete-event systems[END_REF][START_REF] Qiu | Decentralized failure diagnosis of discrete event systems[END_REF][START_REF] Contant | Diagnosability of discrete event systems with modular structure[END_REF][START_REF] Debouk | Coordinated decentralized protocols for failure diagnosis of discrete event systems[END_REF][START_REF] Tomola | Robust disjunctivecodiagnosability of discrete-event systems against permanent loss of observations[END_REF][START_REF] Tripakis | Fault diagnosis for timed automata[END_REF][START_REF] Zad | Fault diagnosis in discrete-event systems: Incorporating timing information[END_REF].

In some cases, however, obtaining the DES model using only the knowledge of its behavior may be a difficult or even impossible task, since the number of states of the system grows with its complexity. In order to overcome this problem, several works in the literature present methods of identification of DES with the aim of fault diagnosis [START_REF] Roth | The concept of residuals for fault localization in discrete event systems[END_REF][START_REF] Klein | Fault detection of Discrete Event Systems using an identification approach[END_REF], Moreira and Lesage, 2019a,b]. Since some faults cannot be detected by only observing the sequence of events executed by the system, in de [START_REF] De Souza | Fault detection of discrete-event systems based on an identified timed model[END_REF] the time information of the occurrence of events is added to the model, increasing therefore the number of faults that can be diagnosed. The main advantage of the DES approach for fault diagnosis is that the diagnoser can be easily implemented on a computer or a programmable logic controller (PLC), and the fault can be detected as soon as an unexpected event occurs in the system or if it occurs in a time instant different from the expected.

In this paper, a timed automaton model suitable for fault diagnosis, which represents the drilling operation on Titanium alloy, is proposed. The model is an improvement of the one proposed by de Souza et al. [2020] using continuous signals (spindle power and Z position) read directly from the system controller. The following sections briefly describe the automaton model and its application to four faults.

Cutting power in drilling

Mechanistic force models can provide quantitative cutting force predictions based on the uncut chip thickness principle. Once a basic data set of experimental tests are made, the cutting power and machining forces are estimated based on the specific cutting coefficients of the specific material in the range of cutting conditions, as described by several papers [START_REF] Armarego | Computerized Predictive Cutting Models for Forces in End-Milling Including Eccentricity Effects[END_REF]Deshpande, 1989, Altintas, 2001].

In drilling, as cutting speed varies from zero to the maximum cutting speed V c (m/min) on the external diameter D (mm), the local specific force coefficients are different along the cutting edge. Although, for a fixed tool geometry, it is quite used to choose the average specific cutting force K c (N/mm 2 ) to calculate the cutting power [Deshpande et al., 2022b].

The required power P c (W) of a drilling tool is calculated taking into account the contribution of both cutting edges:

P c = V c f z D K c 120 (1)
where f z is the feed per tooth, half of the feed per revolution using a conventional two flutes tool (f = 2 f z ).

Timed automaton model

A timed automaton model is a formalism that is capable of describing the dynamics of a Discrete Event System, including timing information about the occurrence of system events. The timed automaton model used in this paper, called Timed Automaton with Outputs (TAO), is inspired on the Timed Automaton with Outputs and Conditional Transitions (TAOCT) presented in de Souza et al. [2020]. As in de [START_REF] De Souza | Fault detection of discrete-event systems based on an identified timed model[END_REF], the timed model has conditions related with the time that the events must be observed to allow the transitions to occur. The set of possible times is obtained by identification after observing the system for a sufficient long time at different conditions. Differently from de Souza et al.

[2020], the sequences of events are already known, since it is assumed that the programming code that must be inserted in the machine is known, as long as the faulty scenarios that are executed in the system in order to obtain the model that represents the fault-free and the post-fault system behavior. Thus, the number of different sequences that are considered for obtaining the models depends on the number of faults that are considered and generated in the plant. In this case, the outputs associated with the states of the automaton model are used to indicate to the operator if a fault has been detected or if the system is operating as expected. Consider that the number of faults to be diagnosed is η ∈ N, and let F i , i = 1, . . . , η, denote the output label associated with each kind of fault. Then, each state of the automaton model can be associated with a symbol N indicating that the fault has not been detected, or F i . It is important to remark that the diagnoser is capable of diagnosing faults online using the identified model, since it is played in real-time in parallel with the execution of the machine. The timed automaton with outputs (TAO) is defined as follows.

Definition 1 The Timed Automaton with Outputs is an eight-tuple:

TAO = (X, Σ, f, c g , λ, R, g, x 0 ),
where X is the finite set of states, Σ is the finite set of events, f : X × Σ → 2 X is the nondeterministic transition function, c g is the global clock, with value c g (t) ∈ R + , t ∈ R + , λ : X → {N, F 1 , . . . , F η } is the state output function, R = {1, 2, . . . , r} is the set of indexes associated with the different conditions of the experiments for identification, where r = η + 1, g : X × Σ × R → C is the guard function, and x 0 ∈ X is the initial state. □

The set of admissible constraints C is formed of all sets I ⊂ R + , that represent time intervals. As in the TAOCT, presented in de Souza et al. [2020], in the TAO a unique global clock c g is used. Function g(x, σ, k) specifies a subset of R + to which the clock value c g (t) must belong so that transition from state x labeled with σ can occur. The output function λ associates each state of the model with a faulty or fault-free behavior of the system. It is important to remark that differently from the TAOCT model, the TAO is nondeterministic since the transition function f is nondeterministic, i.e., after the occurrence of an event σ ∈ Σ in state x ∈ X, more than one state of X can be defined in f (x, σ). However, the time constraints given by the guard g determinizes the behavior of the system in the sense that if two transitions departing from the same state and arriving at different states have the same event label, then the guards associated with these transitions are disjoint time intervals.

Experimental inputs for fault diagnosis

In this section, drilling experiments are presented. All experiments were carried out on a CNC milling center DMU85-DMG mono block machine and flood water-based through coolant was used. Titanium alloy (Ti6Al4V) workpieces are machined using carbide drills from Seco. The tools have 11 mm diameter, 2 flutes and 2mm point (code: SD203A-11.0-33012R10-M). The cutting power and vertical tool position was measured by the machine-tool. The continuous signal is converted by the PLC internal IO loop (with acquisition rate of 250 Hz) and collected by a computer using a software (SinuCom NC from Siemens). The standard machining condition, so called scenario (1), uses V c = 100m/min, f z = 0.1mm/th) and drill length 32mm. Four different fault scenarios (2), (3), (4) and ( 5) have been imposed to the system. The faults are not superposed, i.e., only one fault proposition at a time is tested. The experimental situations are:

(1) The system is operating without faults: a sharp tool drills a 32 mm blindhole. This corresponds to the normal operation of the system;

(2) A sharp tool finds an off-centered pre-drilled hole while producing a blindhole of 32 mm length. This is considered the fault of type F 1 ;

(3) During its cutting trajectory, the tool finds an under-layer on 18 mm depth of a different material. In this case, a carbon-fiber plate as it is common the use of Ti-CFRP stack materials in actual design of airplanes. This corresponds to the fault of type F 2 ;

(4) Similar situation comparing to scenario (3) with a hollow workpiece, the drilled thickness is 18 mm and a though hole is produced. This is considered the fault of type F 3 ;

(5) The tool is worn (or broken) but it is still able to drill completely the hole having 32 mm length. This is considered the fault of type F 4 .

Experimental power curves on situations 1-4

Several experimental power curves were taken for each scenario and one typical curve for each case is presented in Fig. 1. The blue curves represent the cutting power acquired from the PLC along the operation time and the orange inclined line presents the relative position of the tool tip to the workpiece surface. This value is positive, so the reader can identify the moment that the tool achieves the lower point, 32 mm, and then, when it comes back to the surface. The dashed line represents the 18 mm, significant on faults F 2 and F 3 .

As expected for Titanium, Fig. 1a presents a increase related to the tool point, followed by a first plateau until 32mm and a smaller one when the tool is going up that corresponds to the cutting of the elastic recover.

Fig. 1b shows the power during the drilling of a misplaced hole with an overlap of 1.5 mm on the radius (schema presented inside the graph). The unbalanced material generates a vibration that disturbs the signal.

Fig. 1c shows the cutting power of the machining of a 32 mm hole composed of Titanium in the top and CFRP in the lower part. It can be seen a drop after 18 mm, the Ti thickness and transition to CFRP. As expected, this region has higher forces compared to Fig. 1d, without any material below. As this event is not known a priori, it would be difficult to identify due to the low S/N. The dissociation of a hollow piece to a stack using curve signatures and data filters is not an easy task.

Scenario 5: Worn tool scenario

In order to compare the curves of a worn tool drilling process and the standard one, a wear protocol of experiments was done. Tool wear was analysed using a Infinite focus measurement (Alicona).3D images were taken and flank wear is measured using the local reference frame on the software.

Several holes were drilled in order to have a controlled wear zone with fixed feed per tooth. The tool machined 3192 mm using f z = 0.1 mm/th and V c = 50 mm/min, precisely 114 blind holes with 28 mm length before the presented results. After this low initial wear (Fig. 2a), 30 cutting tests were performed with V c = 100 mm/min to compare the power curves and to identify when the tool became damaged using the power signals. The tool wear was measured every 4 holes. Fig. 2b presents the flank wear after 21 holes and and Fig. 2c in the end of the tests when the tool was damaged. The power curve during the 3 last holes (28, 29 ans 30) presented similar curve to the one presented on Fig. 2d (hole 29), which is different from all the previous ones and similar to the ones on scenario (1).

All the holes were measured in the surface and presented the diameter inside the expected precision, even the last holes. From the power curves of Fig. 1 and2e, it can be seen the difficulty of identifying faults using only the raw data, or the filtered data, since it is needed to obtain a good filter, the correct experimental noise amplitude, and identify fault signatures. In addition, it cannot be done in a fast manner by the machine. Thus, in this paper, we propose the identification of a timed automaton that models the fault-free system behavior and also the behavior after the four types of faults F i , i = 1, 2, 3, 4, described in Section 4. The main advantages of the proposed fault diagnosis strategy are that the diagnoser can be easily implemented on a computer, and the fault can be detected as soon as the observed system dynamics has a behavior that corresponds to a faulty behavior.

Differently from de Souza et al.

[2020], the signals that are observed for identification of the time intervals for the occurrence of the events are not binary signals. In the case of the CNC machine, the spindle power, p(k), and the Z displacement, z(k), of the machine tool are recorded. Thus, only continuous variables are read from the PLC, and these variables must be used to observe the occurrence of the system events.

The events are associated with the consumed energy in the drilling process. Thus, the spindle power starts to be integrated when the tool arrives at the surface of the material to be drilled, and the integration is stopped when the drilling process is finished. In order to obtain the two events associated with the position of the tool to start and stop the integration of the spindle power, the Z displacement curve is used. At the top of Figure 4, we present the Z displacement curve z(k) obtained using the Siemens software SinuCom NC for drilling titanium with V c = 100 m/min. Note that each change in the slope of the curve represents a command to the CNC machine. Thus, if we compute the approximate second order derivative of z(k), we obtain, the time instant where the command has been sent to the machine. The curve of the approximate second order derivative of z(k), z ′′ (k), is depicted at the bottom of Figure 4. The finite-difference approximation used to compute z ′′ (k) is given by

z ′′ (k) = z(k + 1) -2z(k) + z(k -1) h 2 , (2)
where h = 4 ms is the sample time of the data recorded by the software Sinu-Com NC. Thus, the second positive peak of z ′′ corresponds to the event Z start associated with the arrival of the tool at the position to start the drilling operation, and the time instant that this event occurs is the time that the spindle power must start to be integrated. Then, the fourth negative peak corresponds to the end of the drilling operation, modeled by event Z stop , which is associated with the time to stop the integration of the spindle power. Thus, the events Z start and Z stop , to start and stop the integration of the spindle power, respectively, are obtained from the approximate second derivative of the measured Z displacement.

In order to obtain the TAO model to diagnose faults in the system, several curves have been obtained for each one of the experimental scenarios imposed to the system. In Figure 5, the minimum and maximum energies for the five scenarios presented in Section 4 are shown with an added uncertainty δ in the time to represent possible measurements errors. In this work, δ has been chosen equal to 40 ms, which is equivalent to 10 sample times of the PLC. As it can be seen from Figure 5, each scenario can be distinguished from all the other scenarios in a different time instant. It is important to remark that it has been considered that the distance between two disjoint time intervals must be approximately 40 ms to distinguish the behaviors of the system considering different experimental scenarios. Thus, it is possible to diagnose all four faults Figure 5: Energies for the different conditions of the experiments carried out in the plant (5 scenarios described in section 4). using the time observed for reaching a specific level of energy. Thus, the reach of the levels that can be used to diagnose faults are also defined as events in the TAO model. From the curves in Figure 5, it can be verified that scenario (2) can be distinguished from all other scenarios when the energy level reaches 2550 J, generating event e 2550 . The experimental scenario (5) can be distinguished from all other conditions when the energy level reaches 4100 J, generating event e 4100 . Scenario (4) can be distinguished from the other experimental conditions when the energy reaches 7200 J, generating event e 7200 , and scenario (3) can be distinguished when the energy level reaches 10100 J, generating event e 10100 .

From the observation of the energy curves, time-interval sequences of events

s k = (σ k 1 , I k 1 )(σ k 2 , I k 2 ) . . . (σ k l k , I k l k )
, for k = 1, 2, . . . , 5, with different lengths can be obtained for each one of the five experimental conditions for fault diagnosis. The time intervals I k j are defined as I k j = [min k j -δ, max k j + δ], where min k j and max k j are the minimum and maximum times, respectively, observed at the occurrence of event σ k j among all experiments carried out under the experimental scenario (k).

According to Figure 5, the following five time-interval sequences can be obtained:

s 1 = (Z start , I 1 1 )(e 2550 , I 1
2 )(e 4100 , I 1 3 )(e 7200 , I 1 4 )(e 10100 , I

5 )(Z stop , I 1 6 ) s 2 = (Z start , I 2 1 )(e 2550 , I 2 2 )(Z stop , I 2 3 ) s 3 = (Z start , I 3 1 )(e 2550 , I 1
2 )(e 4100 , I 3 3 )(e 7200 , I 3 4 )(e 10100 , I

5 )(Z stop , I 3 6 ) s 4 = (Z start , I 4 1 )(e 2550 , I 3
2 )(e 4100 , I 4 3 )(e 7200 , I 4 4 )(Z stop , I 4 5 ) s 5 = (Z start , I 5 1 )(e 2550 , I 5 2 )(e 4100 , I 5 3 )(Z stop , I 5 4 ), and from the five time-interval sequences, the TAO model depicted in Figure 6 can be obtained. In Figure 6, the guard g(x, σ k j , k) is represented as the time interval I k j and the output function λ associates N to the states when the observation is not sufficient to guarantee that a fault has occurred or the system is in its normal operation, or associates F i to the states indicating that the experimental condition associated with a fault has been detected. The first time interval I k 1 is defined as [0, 0] for k = 1, 2, . . . , 5, since Z start is the first observed event that initiates the integration of the spindle power, and the last time interval of all time-interval sequences is equal to [0, ∞] since the time in which Z stop is observed is not important for fault diagnosis. The clock c g (t) is reset all the time that the system is in its initial state and event Z start is observed.

In order to illustrate how the TAO model can be used for fault diagnosis, consider that the observed timed sequence is equal to s = (Z start , 0)(e 2550 , 2.63)(e 4100 , 3.32). In this case, since event e 2550 is observed at time 2.63 seconds, which belongs to the intervals I 1 2 and I 4 2 , then the transition from state 1 to state 2 is executed in the model. Then, after observing event e 4100 at time 3.32, the model is played and the transition from state 2 to state 7 occurs, since 3.32 ∈ I 5 3 . Thus, since λ(7) = F 4 , the fault of type F 4 is diagnosed, indicating that the tool is damaged.

Conclusions

In this paper, a timed automaton model for the drilling process of Titanium alloys, which is suitable for fault diagnosis, is proposed. Four fault scenarios have been considered, and all faults can be diagnosed using the proposed diagnosis scheme. The main advantages of using the proposed scheme are the simple implementation of the diagnoser on a computer and the fast fault detection. We are currently investigating the use of a similar diagnosis architecture to automatically identify different materials in a stack for adapting the proper cutting parameters, as feed rate and cutting speed, in real time, for process optimization. In the future, this process will be implemented also in orbital drilling.

Figure 1 :

 1 Figure 1: Cutting power and drilling depth along processing time in different scenarios

Figure 2 :

 2 Figure 2: Tool wear measurements and cutting power with worn tool

Figure 3 :

 3 Figure 3: Tool wear evolution

Figure 4 :

 4 Figure 4: Z displacement of the tool at the top, and second derivative of Z at the bottom.

Figure 6 :

 6 Figure 6: TAO of the plant modeling the four types of faults and the fault-free plant behavior.

Acknowledgments

This work was in part carried out when the first author was a visiting professor at the Institut Clément Ader (ICA) with financial support from the University Paul Sabbatier. This work was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior -Brasil (CAPES) -Finance Code 001, FAPERJ and CNPq.