# Milling diagnosis using artificial intelligence approaches

Dominique Knittel, Hamid Makich, Mohammed Nouari

► To cite this version:

Dominique Knittel, Hamid Makich, Mohammed Nouari. Milling diagnosis using artificial intelligence approaches. Mechanics & Industry, 2019, 20 (8), pp.809. 10.1051/meca/2020053. hal-02904293

HAL Id: hal-02904293

https://hal.science/hal-02904293

Submitted on 21 Jul 2020

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Milling diagnosis using artificial intelligence approaches

Dominique Knittel<sup>1,2,*</sup>, Hamid Makich<sup>1</sup>, and Mohammed Nouari<sup>1</sup>

Received: 7 December 2019 / Accepted: 15 June 2020

**Abstract.** The Industry 4.0 framework needs new intelligent approaches. Thus, the manufacturing industries more and more pay close attention to artificial intelligence (AI). For example, smart monitoring and diagnosis, real time evaluation and optimization of the whole production and raw materials management can be improved by using machine learning and big data tools. An accurate milling process implies a high quality of the obtained material surface (roughness, flatness). With the involvement of AI-based algorithms, milling process is expected to be more accurate during complex operations. In this work, a milling diagnosis using AI approaches has been developed for composite sandwich structures based on honeycomb core. The use of such material has grown considerably in recent years, especially in the aeronautic, aerospace, sporting and automotive industries. But the precise milling of such material presents many difficulties. The objective of this work is to develop a data-driven industrial surface quality diagnosis for the milling of honeycomb material, by using supervised machine learning methods. In this approach cutting forces are online measured in order to predict the resulting surface flatness. The developed diagnosis tool can also be applied to the milling of other materials (metal, polymer, etc.).

**Keywords:** Milling diagnosis / machine learning / support vector machine (SVM) / artificial intelligence / honeycomb core

# 1 Introduction

The Industry 4.0 framework needs more and more smart monitoring and diagnosis, real time evaluation and optimization of the whole production and raw materials management. Therefore, the manufacturing industries recently pay close attention to artificial intelligence (AI) and big data tools [1]. An accurate milling process implies a high quality of the obtained material surface (roughness, flatness) [2]. With the involvement of AI-based algorithms and machine learning (ML) techniques, the milling process is expected to be accurate during the milling of delicate materials and complex operations.

A diagnostic system based on ML techniques automatically learns, which calculated features deduced from measured signals, to detect failure patterns in the training dataset. The obtained trained model is then used as a failure predictor for new measured data.

ML algorithms can be divided in broad categories based on supervised, unsupervised, semi-supervised, and reinforcement learning, depending if labels (or class) are used. A diagnostic system is a good application of supervised

classification task [14]: it is trained with many variables and features along with their class (e.g. faulty or healthy), and it has to learn how to classify new variables and features. The output of the trained model is the label of each new dataset.

Particular attention should be paid to the features calculation and selection which are depending on the application field. Therefore the field knowledge has to be taken into account. Moreover, ML algorithms selection and tuning is another difficult task.

In the field of the milling operations, only few authors worked on artificial intelligence developments and tools [15,29]. Most of the works involved Artificial Neuronal Networks (ANN) and related approaches (e.g. associated with Fuzzy-logic).

Mikołajczyk et al. developed an Artificial Neuronal Network (ANN) for tool-life prediction in machining with a high level of accuracy, especially in the range of high wear levels, which meets the industrial requirements [3]. They combined a multi-layers ANN model with image processing. It has to be noticed that ANN is the most used AI approach in the image processing.

Pimenov et al. evaluated and predicted the surface's roughness through artificial intelligence algorithms by using random forest and standard Multilayer perceptron

<footnote n="1">¹ LEM3 UMR CNRS 7329, Institute Mines-Telecom GIP-InSIC, University of Lorraine, 27 rue d'Hellieule, 88100 Saint Dié des Vosges, France</footnote>

<footnote n="2">² University of Strasbourg, Faculty of Physics and Engineering, 3 rue de l'Université, 67000 Strasbourg, France</footnote>

<footnote>* e-mail: knittel@unistra.fr</footnote>
(ANN) [4]: in their investigation the obtained performance depends on the parameters contained in the dataset.

Correa et al. compared the performances of Bayesian networks (BN) and artificial neural networks for quality detection in a machining process [5].

The work of Zhang et al. [21] concerns the cutting tool life in dry milling environment, based on Neuro-Fuzzy Network (NFN) approaches.

Durmus [27] worked on the prediction and the control of surface roughness in CNC by using artificial neuronal networks (ANN). Based on the ANN training model, he could find good machining parameters.

Rui et al. [24] implemented a hybrid approach for tool wear prediction by using local feature-based gated recurrent unit (LFGRU) networks.

By also using artificial neuronal network Azlan [28] has developed a surface roughness prediction models for end milling machining.

The mostly used sensors are vibration sensors and cameras. Another approach consists to measure and analyze the drive power (for example by current measuring) [31]. In this paper few artificial intelligence methods are tested: random forest (RF), standard Multilayer perceptrons (MLP), Regression Trees, and radial-based functions. The approach is not applicable in our experimental setup; we do not have access to the drive power measures.

The diagnostic algorithms are implemented into (dedicated) computers. Another interesting approach consists to use cloud implementation. For example, Wu et al. [25] worked on cloud-based random forest algorithms for tool wear prediction in milling.

A close attention to features calculation is necessary. In fact, Javed et al. have shown in [26] that prognostic efficiency is closely related to the extracted features.

In our work, a milling diagnosis of composite sandwich structures with honeycomb cores is developed by using cutting/milling forces measurements, instead of vibration sensors, cameras, or drive power measurement (as indicated in the published works by other authors). Then the features are deduced from the measured forces generated during milling operations.

Such material structure has grown considerably in recent years, in different industrial domains and applications. Recent development projects for Airbus A380 and Boeing 787 confirm the increased use of the honeycomb material. But the precise milling of such material presents many difficulties: unevenness, uncut fibers and tearing of fibers can result.

The objective of our work is to develop an industrial data-driven surface quality diagnosis for the milling of honeycomb material, by using supervised machine learning methods which can be easily implemented in constrained embedded systems, such as kNN, Trees, SVM algorithms. On the contrary, ANN methods usually need more size and calculation power and therefore are not used in this study. The developed diagnosis tool can also be applied to the milling of other materials (metal, polymer, etc.) and material structures.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Nomex® honeycomb cores and the main geometrical characteristics.</figcaption></figure>

# 2 Description of the experiments

## 2.1 Workpiece material and tools

The workpiece material studied in this investigation is Nomex® honeycomb cores with thin cell walls. Such pieces, produced from aramid fiber dipped in phenolic resin (Fig. 1), consist of continuous corrugated ribbons of thin foil bonded together in the longitudinal direction. The aim is to create a structure allowing lightness and stiffness together thanks to the hexagonal geometry of formed cells. The geometric characteristics of the honeycomb cores are indicated on Figure 1. The use of honeycomb material in sandwich composite is limited by the fragility of each wall of the honeycomb, which influences the quality of obtained surfaces after machining [7,8,9].

Uncut fibers and tearing of fibers are obtained defects (see Fig. 4) related to its composite nature and the cutting conditions. Moreover, the alveolar geometry of the structure causes vibrations on the different components of the cutting effort [10] which increase the defects.

In fact, cutting tools and the mechanical and geometrical characteristics of honeycomb cores have a crucial effect on machinability and on the quality of the resulting surface [11]. Ordinary cutting tools are not adequate for machining honey-comb cores.

In our study, the used milling cutter (see Fig. 2) is provided from our industry partner, the EVATEC Tools Company. This combined specific tool with two parts is designed for surfacing/dressing machining operation. The first part is a cutter body made of high speed steel with 16 mm in diameter and having ten helixes with chip breaker. The second part is a circular cutting blade made of tungsten carbide with a diameter of 18.3 mm and having a rake angle of 22° and a flank angle of 2.5°. These two parts are mechanically linked to each other with a clamping screw.

## 2.2 Milling experiments

All experimental data are obtained from a three-axis vertical machining center Realmeca® RV-8. The main
<figure><img src="image_3.png" /><figcaption>Fig. 2. Milling cutter used for Nomex® honeycomb core “CZ10”.</figcaption></figure>

<table><caption>**Table 1.** Machining center *Realmeca®* RV8 specifications.</caption><thead><tr><th colspan="2">Realmeca RV8 SP</th></tr></thead><tbody><tr><td>Spindle speed max</td><td>24 000 rpm</td></tr><tr><td>Feed rate max</td><td>20 m/min</td></tr><tr><td>Power spindle motor</td><td>30 kW</td></tr><tr><td>Resolution</td><td>0.5 µm</td></tr><tr><td>Course X</td><td>800 mm</td></tr><tr><td>Course Y</td><td>600 mm</td></tr><tr><td>Course Z</td><td>450 mm</td></tr></tbody></table>

<figure><img src="image_4.png" /></figure>

technical specifications of this machine are given in Table 1.

The cutting forces generated during cutting, are measured by using the Kistler dynamometer model 9129AA. The Kistler table is mounted below the Nomex honeycomb sample in order to measure the three orthogonal components ($F_x$, $F_y$ and $F_z$) of the machining force as shown in Figure 3. During the measurements, the x-axis of the dynamometer is aligned with the feed direction of the milling machine and the longitudinal direction of the workpiece (parallel to core ribbons and the direction of honeycomb double wall). The signals are stored in a laptop for on-line data processing and diagnosis (data filtering, features calculation, machine learning application).

The milling experiment conditions are summarized in Table 2. Four different speeds (high and low speeds) and four feed values were selected.

The surface quality is of high importance for the use of the Nomex® honeycomb in sandwich materials.

<figure><img src="image_5.png" /><figcaption>Fig. 3. Experimental test setup.</figcaption></figure>

<table><caption>**Table 2.** Milling experiment conditions.</caption><tr><td>Spindle speed (rpm)</td><td>2000</td><td>10 000</td><td>15 000</td><td>23 000</td></tr><tr><td>Feed rate (mm/min)</td><td>150</td><td>1000</td><td>1500</td><td>3000</td></tr></table>

<figure><img src="image_6.png" /><figcaption>Fig. 4. Obtained honeycomb machining surfaces. The case (b) represents the best milling result.</figcaption></figure>

The machining defects cause a reduction of bond strength between the skin and the honeycomb core, and thus a weaker joint for composite sandwich structures.

Two main types of surface damage are observed after the milling: uncut aramid fibers along the machined surface and tearing of the walls, Figures 4a, 4c and 4d. The appearance of the uncut fibers is a machining defect specific to the composite material which depends on the type of the fibers and their orientation. The tearing of Nomex® paper, linked to the cellular appearance of the honeycomb structure, occurs under the shear loading effect [5,12].

## 2.3 Measured signals

Many milling experiences have been made in our study. For example, Figure 5 shows the milling forces measured for honeycomb at 2000 rpm spindle speed and 3000 mm/min feed rate.

As seen in Figure 5, cutting forces do not exceed 60 Newtons. During the milling, the vertical cutting force component is greater than other forces components which
<figure><img src="image_7.png" /><figcaption>**Fig. 5.** Milling force measurements for 2000 rpm spindle speed and 3000 mm/min feed rate: (a) during all process; (b) during 0.2 s (zoom).</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Fig. 6.** Effect of cutting parameters on surface flatness.</figcaption></figure>

can be attributed to the mechanical properties of the honeycomb structure. In fact, the honeycomb structure is characterized by a better out-of-plane compression behavior.

The cutting forces show significant oscillations, due to the vacuum in the cells of the honeycomb and the angle between the cutting direction and the honeycomb cell wall direction.

The obtained surface quality (in our case the flatness) has been measured for various combinations of cutting conditions as the spindle speed and the feed rate. One can see the flatness quality in Figure 6. The flatness defects are increased for low rotational speed of the tool. An unevenness exceeding 500 µm characterizes a severe tearing of the honeycomb walls.

The quality of the obtained surface allows to establish a criteria for determining the machinability of the honeycomb structures.

Alternatively a surface response [30] could have been built in order to predict the milling surface quality. But close milling parameters (such as spindle speed, feed rate, depth of cut) can lead to different results, depending on the material, the quality of the machining tool, etc.

Therefore, in our approach supervised machine learning techniques (with labeled measurements for the model training) are used. These tools need the construction of features associated with the measurements. These features can be calculated online during the measures acquisition, by using a time sliding window: the features are calculated along the window for each sampling time (few ms for the chosen sampling time).

## 3 Milling diagnosis using machine learning techniques

Machine learning techniques can be separated mainly in two categories [17,22,23]:

- Unsupervised approaches: based on unlabeled input data. The goal is to find groups and structures in the data set, in order to classify new observations (measurements) into the different groups, without labels.

- Supervised approaches: based on labeled input data. With such approaches the data used to train the model must be labelled. The goal is to predict the labels of new measures (or data).

A machine learning based diagnosis system needs different steps:

- measurements of the adequate signals.

- signal processing (typically low pass filtering)

- features calculation and normalization

- model training with machine learning approaches, using labeled data : training phase

- test phase: label predictions using the trained model. The predicted labels are compared with the known labels in order to optimize the model (with the help of the confusion matrix, ROC diagram, ...) and the different setting parameters.

The raw data (measurements) are firstly filtered, with low pass filters (typically with Butterworth filters order 2 or 4) in order to eliminate high frequency noises, and labeled. Two labels are used: "obtained signals for good surface quality", "obtained signals for bad surface quality".
<figure><img src="image_9.png" /><figcaption>Fig. 7. Measured milling force in time domain: (a) total data plot, (b) signal during steady-state phase.</figcaption></figure>

Then the features are calculated offline or online (online in a real time implemented diagnosis system).

All the experiments are then split into two groups: 75% for the machine learning model training, 25% for the obtained model evaluation also called test phase in the literature (another percentage can be chosen, for example 60–40%, depending on the number of experiments). This can be made randomly, but the ratio “good surface quality” and “bad surface quality” must be kept in each group.

## 3.1 Features calculation

The features are calculated in time and frequency domains [6,13] from the raw signal represented in Figure 7. We calculated the features in steady state behavior (between the two red lines). Therefore, transient time zones of the milling (when the cutting tool entries or exits the honeycomb core) are not considered in this study.

All the measured milling force signals are filtered with a low pass Butterworth filter. The filtered signal is called hereafter $x(t)$. Therefore, we don't calculated the features from the raw signal but from the filtered signal. Then 19 features are calculated in time domain, as detailed below.

The calculated time domain features are:

- Maximum of $x(t)$ (1)

- Minimum of $x(t)$ (2)

- Difference between the maximum of $x(t)$ and the minimum of $x(t)$: amplitude range (3)

- Median value of $x(t)$ (4)

- Maximum of the absolute value of the signal:

$$m_{AS} = \max(|x_k|) \quad (5)$$

- Interquartile range:

$$IQR = Q_3 - Q_1 \quad (6)$$

where $Q_3$ and $Q_1$ represents respectively the upper and lower quartile.

- Inter decile range:

$$IDR = D_{90} - D_{10} \quad (7)$$

where $D_{90}$ and $D_{10}$ means respectively the 90th and 10th decile. Both Inter quartile and Inter decile range are a measure of statistical dispersion of the values in a set of data.

- Average value of the signal:

$$\text{mean}(x) = \frac{1}{N} \sum_{k=1}^{N} x_k \quad (8)$$

- Average value of the absolute value of the signal:

$$MAS = \frac{1}{N} \sum_{k=1}^{N} |x_k| \quad (9)$$

- Average value of the absolute value of the derivative signal:

$$MAD = \frac{1}{N-1} \sum_{k=1}^{N-1} \left| \frac{dx_k}{dt} \right| \quad (10)$$

- Variance:

$$Var = \frac{1}{N} \sum_{k=1}^{N} (x_k - \text{mean}(x)) \quad (11)$$

- Energy of the signal:

$$E(x) = \sum_{k=1}^{N} x_k^2 \quad (12)$$

- Energy of the centered signal:

$$E_c = \sum_{k=1}^{N} (x_k - \text{mean}(x))^2 \quad (13)$$

- Energy of the derivative signal:

$$E_d = \sum_{k=1}^{N-1} \left(\frac{dx_k}{dt}\right)^2 \quad (14)$$

- Skewness:

$$S = \frac{E(x - \text{mean}(x))^3}{Var^{3/2}} \quad (15)$$

- Kurtosis:

$$K = \frac{E(x - \text{mean}(x))^4}{Var^2} \quad (16)$$
– Moment order *i* (*i* = 5 : 10):

$$m_i = \frac{E(x - \text{mean}(x))^i}{\text{Var}^{i/2}} \quad (17)$$

– Shannon entropy:

$$E_S(x) = -\sum_{k=1}^{N} x_k^2 * \log_2(x_k^2) \quad (18)$$

– Signal rate:

$$\tau = \frac{\max(x_{k=1:N}) - \min(x_{k=1:N})}{\text{mean}(x)} \quad (19)$$

Then, another 19 features are calculated in the frequency domain, in a similar way for the measured milling force signal. To do this, the Fast Fourier transformation (FFT) of the signal *x*(*t*) is firstly calculated:

$$Y(k) = \sum_{i=1}^{N} x_i e^{-j2\pi k \frac{i}{N}}, (k = 1, \dots, N) \quad (20)$$

where *N* is the number of samples of the signal *x*(*t*).

The frequency domain features are calculated for the *Y*(*f*) signal, in a similar way as for the time signal.

The normalization of the features (in time domain and frequency domain) has been made as follows [16]:

$$\text{feature}_{\text{norm}} = \frac{\text{feature} - \text{mean(feature)}}{\text{std(feature)}} \quad (21)$$

Thus we obtain:

$$\begin{cases} \text{mean(feature}_{\text{norm}}) = 0 \\ \text{std(feature}_{\text{norm}}) = 1 \end{cases}$$

Our elaborated surface quality diagnosis was also tested with non-normalized features. Nevertheless, the feature normalization improved the accuracy of our approach.

All the calculated features, in time and frequency domains, are normalized and stored in a table. In this table the rows and columns respectively represent the experimental numbers (also called instances) and the associated feature values.

The obtained normalized feature table contains 38 calculated features and 3 input values for each experiment (each experiment corresponds to a row in the matrix). The input values are the tool rotation speed, the cutting speed and the depth of cut.

## 3.2 Reduction of the features

It is necessary to avoid overfitting of the classifier. In fact, in the case of overfitting, the model is usually well trained but is unable to predict with a good accuracy the labels of new data (measurements). Therefore it is necessary to make a dimensional reduction of the feature table.

<table><caption>**Table 3.** Label table for the experimental observations.</caption><thead><tr><td>Label</td><td>Flatness (μm)</td><td>Qualitative value</td></tr></thead><tbody><tr><td>'A'</td><td>0–600</td><td>Best surface quality</td></tr><tr><td>'B'</td><td>600 – ...</td><td>Worst surface quality</td></tr></tbody></table>

Dimensional reduction can be made by using two major techniques such as feature reduction and feature selection. In feature reduction the original high-dimensional feature-table is mapped into a lower-dimensional table. In the classical approach the transformed features are linear combinations of the original features. In the second approach (the features selection), an optimal subset of features is selected according to an objective function.

For a linear supervised problem, different feature reduction algorithms can be used, such as [18]:

- PCA: Principal Component Analysis. The features are transformed into a new ordered set, the principal components being the eigenvectors of a covariance matrix.

- CCA: Canonical Correlation Analysis (used to analyze the relation between a pair of datasets).

- LDA: Linear Discriminant Analysis.

- PLS: Partial Least Squares (It can be used to overcome the limits of PCA in regression).

The PCA algorithm [18,19] is one of the most used algorithms for dimensional reduction in industrial context. This reduction approach is used in our study: by keeping the five first principal components we reached a variance percentage of 99%.

## 3.3 Labeled data

Different settings of the milling parameters lead to surface flatness variations. The experimental results are illustrated in Figure 6. Then we defined two classes (labels) which indicate the surface quality: best surface quality, and worst surface quality (see Tab. 3). The labels, attached on each data set (measure and the calculated features from the measure) enable the using of supervised machine learning techniques.

The best surface quality corresponds to the label A, and the worst surface quality to the label B. Then we adopted the following rule for the prediction of the surface quality:

- If prediction probability result ≥ 0.5 : class A

- If prediction probability result < 0.5 : class B

## 3.4 Applied supervised learning algorithms

In this work, several three classification algorithms have been implemented in the Matlab software environment [20,21]: k-nearest neighbor (KNN), Decision trees (DT) and Support Vector Machine (SVM). Each algorithm having different internal parameters (various distances, different kernels, etc.), their influence on the classification efficiency has been analyzed.
<table><caption>**Table 4.** Prediction error for the normalized data set.</caption><thead><tr><td>Algorithms</td><td>Accuracy</td></tr></thead><tbody><tr><td>KNN k = 2</td><td>81.3%</td></tr><tr><td>Weighted KNN k = 2</td><td>83.4%</td></tr><tr><td>Chebychev KNN k = 2</td><td>87.5%</td></tr><tr><td>Tree</td><td>99%</td></tr><tr><td>Pruned tree</td><td>66.67%</td></tr><tr><td>Linear SVM</td><td>83.4%</td></tr><tr><td>Gaussian SVM</td><td>66.67%</td></tr></tbody></table>

<table><caption>**Table 5.** Prediction error for the normalized weighted data set obtained by PCA.</caption><thead><tr><td>Algorithms</td><td>Accuracy</td></tr></thead><tbody><tr><td>kNN k = 2</td><td>85%</td></tr><tr><td>Weighted kNN k = 2</td><td>98.2%</td></tr><tr><td>Chebychev kNN k = 2</td><td>87.5%</td></tr><tr><td>Tree</td><td>99.2%</td></tr><tr><td>Pruned tree</td><td>66.67%</td></tr><tr><td>Linear SVM</td><td>99.8%</td></tr><tr><td>Gaussian SVM</td><td>93.8%</td></tr></tbody></table>

<table><caption>**Table 6.** Prediction using SVM classifier.</caption><thead><tr><th rowspan="2"></th><th colspan="2">Predicted class</th><th rowspan="2"></th></tr><tr><th>A</th><th>B</th></tr></thead><tbody><tr><th>Actual class</th><td></td><td></td><td></td></tr><tr><th>A</th><td>TP =<br>83%</td><td>FN = 17%</td><td>100%</td></tr><tr><th>B</th><td>FP = 0%</td><td>TN = 100%</td><td>100%</td></tr></tbody></table>

TP: true positive rate; FN: false negative rate; FP: false positive rate; TN: true negative rate.

The KNN classifier was implemented with two different distances: the Euclidean distance and the Chebyshev distance. For these two configurations, we selected a small number of neighbors. This approach can be improved by choosing a weighted KNN (the labels are weighted).

The decision tree algorithm is a fitted binary classification decision tree. This tree is pruned in order to reduce the computing time (decision time) keeping nearly the same performance. The best pruning level is obtained by optimization.

The last one we implemented is the SVM classifier and we used two algorithms: the linear SVM for a two-class (two labels) data set and the Gaussian SVM algorithm (which a normalized polynomial kernel).

# 4 Obtained results

## 4.1 Results of the trained models

The different machine learning algorithms (with their adapted tuning parameters) are applied to the normalized labeled training data set (75% of the total experiments). The obtained trained models are then tested on the labeled test data set (25% of the total experiments). The objective is to find again the labels of the test data set: Table 4 shows the obtained accuracy result of each tested algorithm. The relation (22) gives the definition of the accuracy.

Classical decision tree classifier leads to the best trained model for predicting the label (best or worst

surface quality) of new data set. Nevertheless, by pruning the decision tree classifier, the accuracy is significantly decreased. The pruning can be necessary in the case of a real time implementation, in order to be as fast as possible.

The next step consists to reduce the dimension of the normalized feature table by using the PCA algorithm and then to train the supervised machine learning models. The obtained accuracy results are illustrated in Table 5.

In this study *k* is an even number for the KNN algorithms. Different odd and even numbers will be tested in the next future (It should be preferable to choose an odd number).

For the dimension reduced feature table, obtained by PCA, the algorithms gave better results, as expected: the algorithms produce high accuracy rate. In fact, linear SVM is very efficient with fast running time.

## 4.2 Prediction results for new experimental data

The trained models are used to predict the labels of new experimental data sets. In this phase, corresponding to the test phase: the predict labels are compared with the known labels associated of the new data. Then the confusion matrix is deduced and the performance is calculated. The final goal is to predict online (that means during milling) the surface quality: best or worst surface.

For the trained linear SVM classifier model, the predicted results are given in Table 6: the percentage of true positive rate and false negative rate are obtained from
the evaluation of the prediction (of the new experimental data sets). We can observe that the best predicted class is the negative class B.

In this study the linear SVM algorithm leads to the best prediction rate (for the test data). It should be noted that in our application this model needs the lowest training time.

For automatic classifier performances evaluation (useful for the optimization of the algorithm parameters for example), different evaluation metrics (22) to (25) or ROC diagram surface can be used.

Accuracy (the percentage of predictions that are correct):

$$ Accuracy = \frac{(TP + TN)}{(TP + TN + FP + FN)} \quad (22) $$

Precision (the percentage of positive predictions that are correct):

$$ Precision = \frac{TP}{(TP + FP)} \quad (23) $$

Sensitivity (the percentage of positive cases that were predicted as positive):

$$ Sensitivity = \frac{TP}{(TP + FN)} \quad (24) $$

Specificity (the percentage of negative cases that were predicted as negative):

$$ Specificity = \frac{TN}{(TN + FP)} \quad (25) $$

In this application, we directly used the confusion matrix (Tab. 6) to evaluate the performances of the SVM classifier (for the test data).

## 5 Conclusion and further works

Not only the rapidity and the precision play an important role but also the roughness and the flatness of resulted surface characterize the milling's performance. This work in focused on the flatness diagnosis of milled surfaces. To do this, features were firstly calculated from measured milling forces. The features can be normalized or not. Then several Artificial Intelligence (AI) based model have been trained by the labeled set of features. In fact, supervised machine learning algorithms have been implemented in this application of honeycomb material milling. The best results are obtained with the SVM algorithm. The developed diagnosis approach can also be applied to the milling of other materials.

The next step consists to test and compare different feature reduction algorithms with measures having uncertainties, in order to have a fast and robust real time milling diagnosis system.

The authors would like to thank the students Lorraine Codjo and Mohamed Jaafar for their contribution to this study. The authors also gratefully acknowledge Evatec Tool company (France), the Institute Mines-Telecom GIP-InSIC and the University of Strasbourg for their technical and financial support.

## References

[1] A. Beskri, H. Mejri, K. Mehdi, J.F. Rigal, Systèmes de surveillance automatique en usinage: Moyens et méthodes [Automatic monitoring systems in machining: tools and methods], in *French Mechanics Congress*, 2013

[2] IFPM-Formation, Usinage: Tournage Fraisage (IFPM courses: Machining: Milling Turning), September 2015

[3] T. Mikołajczyk, K. Nowicki, A. Bustillo, D. Pimenov, Predicting tool life in turning operations using neural networks and image processing, Mech. Syst. Signal Process. 104, 503–513 (2018)

[4] D. Pimenov, A. Bustillo, T. Mikołajczyk, Artificial intelligence for automatic prediction of required surface roughness by monitoring wear on face mill teeth, J. Intell. Manufactur. 29, 1045–1061 (2018)

[5] M. Correa, C. Bielza, J. Pamies-Teixeira, Comparison of Bayesian networks and artificial neural networks for quality detection in a machining process, Int. J. Expert Syst. Appl. 36, 7270–7279 (2009)

[6] A.I.H. Committee, ASM Handbook Volume 16: Machining, ASM International, 1989.

[7] J. Kindinger, Lightweight structural cores, ASM Handbook Met. Composites 21 (2001)

[8] D. Gay, Matériaux composites [Composite materials], Hermes, 2015

[9] R. Carl, Three-dimensional honeycomb core machining apparatus and method, US Pat. App. 13/707, 670.1, 2012

[10] M. Jaafar, S. Atlati, H. Makich, M. Nouari, A. Moufki, B. Julliere, A 3D FE modeling of machining process of Nomex® honeycomb core: influence of the cell structure behaviour and specific tool geometry, Proc. CIRP 58, 505–510 (2017)

[11] M. Mendoza et al., Development of a new milling cutter for aluminum honeycomb, Int. J. Mach. Tool Des. Res. 23, 81–91 (1983)

[12] H. Tchoutouo, Adhesiveless honeycomb sandwich structure with carbon graphite prepreg for primary structural application: a comparative study to the use of adhesive film, Master thesis, Wichita State University, May 2012

[13] J. Rion, Y. Leterrier, E. Manson, Prediction of the adhesive fillet size for skin to honeycomb core bonding in ultra-light sandwich structures, Compos. Part A 39, 1547–1555 (2008)

[14] P. Agusmian, T. Ooijevaar, B. Kilundu, Automated bearing fault diagnostics with cost effective vibration sensor, WCEAM/VETOMAC, Conference, 2017

[15] C.K. Madhusudana, S. Budati, N. Gangadhar, H. Kumar, S. Narendranath, Fault diagnosis studies of face milling cutter using machine learning approach, J. Low Freq. Noise Vib. Active Control 35, 128–138 (2016)

[16] S. Gopal, K. Kishore, Normalization: A Preprocessing stage, CSE & IT department, VSSUT, Burla, India, 2015
[17] The MathWorks Inc., "Mastering Machine Learning A Step-by-Step Guide with MATLAB", Matlab Ebook section 1 to 4, ©2018

[18] R. Vidal, Y. Ma, S.S. Sastry, Generalized Principal Component Analysis, Springer, 2016

[19] F. Yang, Z. Yun, Q. Haiyu, L. Dequn, Z. Huamin, L. Jürgen, Analysis of feature extracting ability for cutting state monitoring using deep belief networks, Conf. Model. Mach. Oper. **31**, 29–34 (2015)

[20] G. Chen, X. Wei, R. Yan, Z. Yuqing, Numerical control machine tool fault diagnosis using hybrid stationary subspace analysis and least squares support vector machine with a single sensor, in MDPI Conf. **7**, 346–358 (2017)

[21] C. Zhang, X. Yao, J. Zhang, H. Jin, Tool condition monitoring and remaining useful life prognostic based on a wireless sensor in dry milling operations, MDPI Conf. **16**, 795–815 (2016)

[22] M. Kubat, An introduction to machine learning, 2nd edn., Springer, 2017

[23] S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press, 2014

[24] Z. Rui, W. Dongzhe, Y. Ruqiang, M. Kezhi, S. Fei, J. Wang, Machine health monitoring using local feature-based gated

recurrent unit networks, IEEE Trans. Ind. Electr. **65**, 1539–1548 (2018)

[25] D. Wu, C. Jennings, J. Terpenny, S. Kumara, Cloud-based machine learning for predictive analytics: tool wear prediction in milling, IEEE Int. Conf. Big Data 2062–2069 (2016)

[26] K. Javed, R. Gouriveau, N. Zerhounic, P. Nectoux, Enabling health monitoring approach based on vibration data for accurate prognostics, IEEE Trans. Ind. Electr. **62**, 647–656 (2015)

[27] D. Karayel, Prediction and control of surface roughness in CNC lathe using artificial neural network, J. Mater. Process. Technol. **209**, 3125–3137 (2009)

[28] A. Mohd Zain, H. Haron, S. Sharif, Prediction of surface roughness in the end milling machining using Artificial Neural Network, Exp. Syst. Appl. **37**, 1755–1768 (2010)

[29] L. Codjo, M. Jaafar, H. Makich, D. Knittel, M. Nouari, Milling diagnosis using machine learning techniques toward Industry 4.0, in 29th International Workshop on Principles of Diagnosis DX’18, Warsaw, August 2018

[30] R. Myers, D. Montgomery, C. Anderson-Cook, Response surface methodology, Wiley, 2016

[31] D. Yu Pimenov, A. Bustillo, T. Mikolajczyk, Artificial intelligence for automatic prediction of required surface roughness by monitoring wear on face mill teeth, J. Intell. Manufactur. **29**, 1045–1061 (2018)

**Cite this article as:** D. Knittel, H. Makich, M. Nouari, Milling diagnosis using artificial intelligence approaches, Mechanics & Industry **20**, 809 (2019)