## 2 Proposed Method for Fault Diagnosis in Milling Machines
### Establishment of a Hybrid Model  
In this study, a hybrid deep learning model for fault diagnosis and classification in milling machines, combining the strengths of a CNN, BiLSTM networks, and a GA, is proposed. The architecture of the hybrid model is shown in Figure 8, which provides a visual overview of the proposed model's key components and data flow. Figure 7: Diagram of the FC (dense) layer for final classification. The process begins with an input image of size 224 \(\times\) 224 \(\times\) 3, representing scalograms of the AE signals. These images are fed into a pre-trained VGG16 CNN model, which has been modified by removing its top layer to serve as a feature extractor. The VGG16 model processes the input through multiple convolutional and pooling layers (Conv1 to Conv5), progressively obtaining complex spatial features of the input data. The final output of the CNN block is a 7 \(\times\) 7 \(\times\) 1024 feature map, which is then flattened into a one-dimensional vector. The flattened feature vector is further passed through the BiLSTM network. The BiLSTM network is designed to capture temporal dependencies in the extracted features by processing data in both the forward and backward direction. This bidirectional approach enables the model to better understand the temporal dynamics of the AE signals, which is important for accurate fault detection. Following the BiLSTM layer, the feature vectors are fed into a GA block. The GA is used to perform an optimal selection of the most relevant features, thereby enhancing the model's performance while reducing computational complexity. By iteratively selecting, crossing over, and mutating the features, the GA refines the feature set to improve the overall classification accuracy. The optimized features selected by the GA are then passed into a fully connected layer, where the final classification is performed. This layer consists of densely connected neurons that aggregate the features and map them to the output classes, corresponding to different fault conditions in the milling machine, such as Gear Fault, Tool Fault, Bearing Fault, and Normal, as shown in Table 2 of the complete proposed hybrid model summary. The output is generated through a softmax activation function, providing a probabilistic prediction for each class. The integration of a CNN, BiLSTM, and a GA into a single hybrid model helps the unique advantages of each component, which results in a powerful and efficient system for fault detection in milling machines. This architecture effectively handles the complexity of AE signals, providing high accuracy in diagnosing and classifying different fault types. The proposed model's scalability and adaptability make it suitable for real-time industrial applications, where reliable fault detection is important for maintaining operational efficiency. \begin{table}
\begin{tabular}{c c c c} \hline
**Type of Layer** & **No. of Filters** & **Kernel Size** & **Output Shape** & **Activation Function** \\ \hline CNN (Feature Extraction) & & & \\ \hline Input Layer & - & - & (224, 224, 3) & - \\ \hline Conv2D (block1\_conv1) & 64 & \(3\times 3\) & (224, 224, 64) & ReLU \\ \hline \end{tabular}
\end{table} 
Table 2: Proposed hybrid model summary. Figure 8: Overview of the proposed hybrid model architecture.