# Automatic Crack Classification by Exploiting Statistical Event Descriptors for Deep Learning
## 3 Framework for the Real-Time Classification of Acoustic Emission Data
### DL-Based Event-Type Discrimination  
Diverse concrete types (e.g., fiber reinforced concrete, pre-stressed concrete) are used in the literature for investigating failure mechanisms using AE signals. An acoustic wave comprises of characteristic sub-events, which can be categorized into a few main classes,where the shape of waveform is directly connected to the type of deformation, as also explained in Section 3.1. To determine the crack type, various statistical properties of the signal have been considered (see Section 3.2). Thus, we use a combination of these properties to feed a DL network able to distinguish among such different classes of events. The internal structure of block (III.2) is shown in Figure 7. Here, the DL model is organized by means of the superposition of functional layers aimed at providing convergence of training and regularization methodology. In this way, a trained mode is able to find solutions with predictable performance. Generalization to data outside the training set is the key objective of predictive machine learning methods. In this block, the input features array, \(\boldsymbol{\Gamma}\), is used to train the DL network and identify different crack events. We use Bi-LSTM units as a key ingredient for this classification problem. In our scenario, the classes of events are categorized into [13]:  
* Tensile event [10, 88, 89];
* Shear event [13, 90, 91, 92];
* Mixed mode [64, 67, 68, 93, 94, 95, 96]. Once the input training data \(\boldsymbol{\Gamma}\) are collected at the bottom of the network (first block on the left), they are used to feed a stack composed of several layers. Firstly, we have a cascade of different Bi-LSTM layers constituted by \(N_{1}\) and \(N_{2}\) hidden units, respectively. The output of the first Bi-LSTM layer is then used as input for the subsequent activation function layer, which is represented by a rectified linear unit (ReLU) [97]. ReLU has been demonstrated to be particularly valuable for the study of the classification or prediction once applied on time sequences and has been shown to outperform more conventional approaches based on previous sigmoid and tanh functions [98]. In our DL model, each element of the output of ReLU layer flows through a second Bi-LSTM block having \(N_{2}\) cells, then a fully-connected layer is interposed. It multiplies the input by a weight matrix and then adds a bias vector. The default for the initial weights is a Gaussian distribution with mean zero and unit variance, whereas the initial value for the bias is 0. Given the nature of the classification task, a subsequent Softmax layer [99] constitutes an essential part at the top of the DL network. Here, the Softmax function \(y_{i}\) is applied to the input \(x\) using the following expression:  
\[y_{j}(x)=\frac{\exp\big{(}a_{j}(x)\big{)}}{\sum\limits_{k=1}^{K}\exp(a_{k}(x))} \text{, where }0\leq y_{j}\leq 1\text{ and }\sum\limits_{k=1}^{K}y_{k}=1 \tag{10}\]  
Figure 7: Proposed network for DL-based event type discrimination. where \(P(c_{j}|x,\theta)\) represents the conditional probability of the sample given the class \(j\) (\(j=1,2,\ldots\)\(K,j\
eq k\)) among \(K\) classes, with \(P(c_{j})\) being the class prior probability. If we set \(y_{j}(x)=P(c_{j}|x,\theta)\) and define \(a_{j}=\ln\big{(}P\big{(}x,\theta\big{|}c_{j}\big{)}P(c_{j})\big{)}\), we obtain from Equation (10) [100]:  
\[y_{j}(x)=P\big{(}c_{j}|x,\theta\big{)}=\frac{P\big{(}x,\theta\big{|}c_{j}\big{)} P(c_{j})}{\sum\limits_{k=1}^{K}P(x,\theta\big{|}c_{k})P(c_{k})} \tag{11}\]  
Specifically, the predicted probability for the class \(j\) given a sample vector \(x\) and a weighting vector \(\theta\), such that \(0\leq P(c_{j}|x,\theta)\leq 1\) and \(\sum\limits_{k=1}^{K}P(c_{k}|x,\theta)=1\). Finally, a classification layer [99] is the last (top of the DL network) and it computes the cross entropy (CE) loss [98]. This loss function \(J\) depends in general on the parameters matrix \(\Theta\) which accounts for the weights of the defined model.