1 Introduction

Artificial intelligence (AI) is an advanced method in data processing systems that is practically helpful in improving technology-enabled products, services, and industrial applications [1]. Machine learning (ML) and deep learning (DL) is a branch of AI that focusses on simulating the learning process of computers and improving system accuracy using algorithms and data [2]. Recently, the application of ML and DL methods has gained serious attention in manufacturing, especially in the machining sector [3, 4]. For instance, ML models can easily predict the life of cutting tools, CNC power and the cutting forces generated in CNC machining [5]. Additionally, using the optimized machining parameters obtained with the various ML algorithms enhances productivity during part production processes. Furthermore, the ML predicts and optimizes cutting parameters, improving surface quality and energy efficiency in machining operations. It also allows real-time monitoring and adaptive control to maintain quality [6]. Machine learning lowers resource waste, assuring energy efficiency and precise manufacturing. Overall, the application of ML ensures optimal energy consumption and high-precision outputs in machining by reducing resource waste. The accuracy and capability of generalized ML models are highly depend on the quality of features used to train, test and validate the model [7]. However, the feature selection depends on the situation and can be relatively random. Therefore, the deep learning has the potential to achieve adaptable feature learning, which is different from feature-based ML methods and helps increase the flexibility of predictions. Furthermore, acquiring crucial features from the monitoring data through layer-by-layer feature learning in a deep network increases the possibility of improving the accuracy of predictions [8]. Deep multi-layer perceptrons (DMLP), deep autoencoders (DAE), convolutional neural networks (CNNs), and long short-term memory (LSTM) networks [9] are examples of popular DL techniques [10]. For complex milling operations, a DL-based tool wear monitoring strategy is used to accurately determine the tool wear during milling [11]. CNNs are the most widely used network model in computer vision.

To further advance the deep learning (DL) trend, more strong CNN architectures such as AlexNet, ResNet, GoogleNet, DenseNet, VGG etc. has been developed. In order to improve predictive performance, ensemble learning integrates predictions from various models. This helps to overcome the limitations of individual models and improves overall accuracy and robustness. For instance, Li et al. [12] developed the Adaboost Decision Tree ensemble learning model and the stacked bi-directional long short-term memory DL network for automatic prediction of tool wear values in machining operations. The results of the experiment showed that the suggested approach is effective in identifying the wear states and predicting wear values using limited information [12]. Wang et al. [13] suggested a unique IMD-DATL framework for multi-feature component machining system for machining quality prediction. Compared to other multi-source domain adaptation techniques, this method achieves an average increase of 7.13% in MAE, 7.37% in RMSE, and 6.52% in the overall score [13]. In the field of deep learning, the attention mechanism is a bionic mechanism whose primary function is to provide greater significance to the aspects that require attention. Li et al. [14] proposed the ConvLSTM-Att model (CNN-LSTM-Attention), an attention-based composite NN. The tool wear data is used to develop the model, and the performance is compared with other state-of-the-art models. With comparable computing complexity, it performs better in terms of accuracy in prediction than the other models [14].

Recently, AI-integrated manufacturing processes offers several benefits over traditional manufacturing techniques, including almost zero material waste, reduced costly tooling, and unparalleled design freedom [15, 16]. In addition, the AI is also helpful in improving the sustainability of manufacturing processes. The comprehensive roadmap with different milestones of AI integration with sustainable manufacturing is shown in Fig. 1. The material flow in manufacturing especially focusses on the flow of materials throughout the production is shown at starting level. The predictive modeling for waste generation is the next step, and it involves using AI systems to examine data and predict how waste will be generated. In addition, the path in Fig. 1 shows that the application of AI in manufacturing system can help in waste sorting. As a result, AI plays a significant role in manufacturing, by optimizing the recycling processes.

Fig. 1
Fig. 1
Full size image

A roadmap of AI with sustainable manufacturing (Adapted from [16]) (Open access)

Additive manufacturing (AM) is also known as advance process that builds components layer by layer to create complex shapes and precise products [16]. The various materials, such as stainless steel, titanium, nickel, and aluminium (Al) alloys, are frequently produced with the help of metal AM [17, 18]. Aluminum has high reflectivity, thermal conductivity, and low infrared absorption, making it porous and requiring more laser power for AM processing [19]. However, due to its light weight and strong mechanical qualities, aluminium is very interesting for powder bed laser AM (L-PBF) as compared to other forming technologies. The automobile industry is steadily using more and more aluminium alloys for a variety of parts (including engine blocks, cylinder heads, wheels, etc.) in order to lower the weight of cars and thus lower their fuel consumption [20]. AlSi10Mg is an alloy in the Al-Si family that is widely used in AM processing because it has outstanding mechanical qualities, minimal expansion under heat, and strong resistance to corrosion. Despite having the same chemical composition, AM parts may have different machinability than cast or wrought metals.

The machining performance of aluminium alloy is highly dependent on cutting conditions. Dry cutting is considered as sustainable machining process because the machining is performed without any cutting fluid/coolant [21]. Bhushan (2013) optimized the machining parameters for minimizing the power consumption and tool life in dry machining of Al alloy SiC particle composites [22]. The application of cutting fluids also significant in improving the machining performance especially in the case of aluminium and its alloys. Minimum quantity lubrication (MQL) is a new technology that is utilized to reduce friction and heat during metal cutting operations [23]. The MQL technique uses compressed air and a suitable quantity of cutting fluid to spray a fine mist into the main cutting area. Typically, the mist is applied at a flow rate of 50–500 ml/hour and its highly recommendable in machining of different materials. During the machining of AM-AlSi10Mg alloy, Ross et al. [24] used different cooling strategies (Dry, Flood, and MQL) to study the surface quality of machined parts. The MQL enhanced the surface characteristic by 45–63% and 23–43% when compared with dry and flood conditions [24]. An environmentally friendly substitute for traditional emulsion cooling is cryogenic (cryo) machining in which the liquid nitrogen and carbon dioxide (CO2) is used at the main cutting area. In the orthogonal machining of the conventional Al 6061-T6 alloy, Dhananchezian and Kumar [25] examined the effects of cryogenic (cryo) cooling on cutting force, cutting temperature, chip breaking and chip thickness. Temperature reductions of 27–40% have been recorded by the use of cryo cooling. When milling additively manufactured AlSi10Mg alloy under various cooling conditions, Ross et al. [26] studied the aspects of tool wear and surface integrity. It was determined that the main failure mode in AM AlSi10Mg alloy milling is adhesion wear [26]. Korkmaz et al., focused on the energy consumption analysis in high-speed turning of aluminum alloy under different cooling conditions [27].

From the findings of previous published works, it has been interestingly noticed that the implementation of AI based deep learning models are crucial to improve the process performance in terms of quality of workpiece, tool life and energy efficiency of machining processes. With this aim, the present work deals with the power signals calculated during the machining of additively manufactured alloys using deep learning based Swin transformer model. This model is used for state-of-the-art computer vision applications, such as image recognition, object detection, and segmentation. The model’s capacity to understand information at different levels is enhanced by its hierarchical structure, which allows the Swin Transformer to calculate features at numerous scales, similar to the pyramid-like processing of CNNs. Further, the previous literature demonstrated that the machining of aluminium and its alloys were improved with the application of different cutting fluids and cooling conditions. Therefore, in this research work AM-AlSi10Mg is used as a work material and power signals with the cutting angle rotation are taken into consideration for modelling. Then, the performance is compared with the different networks by considering different learning rates. Finally, the relationship between power signals and surface quality is investigated in this work.

2 Power Signal Acquisition and Experimental Setup

2.1 Power Signals Calculated in Machining

In machining, power signals describe the amount of energy consumed by machine tools during material removal. These signals provide information on the performance and efficiency of the machining operation. Different type of power signals such as spindle power, feed motor power, auxiliary power and total machining powers are examined during machining operations. In general, the spindle power is main cutting power considered in the machining operation because it represents the primary energy consumption involved in rotating the cutting tool and driving the material removal process. It is also contributed to the heat generation at the interface between the tool and the workpiece and poor surface finish, tool wear, and overheating can also result from excessive spindle power. The process to calculate the cutting power in milling machine is shown in Fig. 2 and the mathematical expression is given in Eq. (1) [28]:

Fig. 2
Fig. 2
Full size image

Calculation of cutting power in milling machine

$$P=\frac{{F}_{c}*{v}_{c}}{60*1000}$$
(1)

\(P\) = Spindle power (kW); \({F}_{c}\)= Cutting force (N) and \({v}_{c}\) = Cutting speed (m/min)

2.2 Experimental Setup

2.2.1 Workpiece Material, CNC Milling and Cutting Tool Details

The present work deals with the investigation of spindle power calculated during the milling of additively manufactured Al-Si-10 Mg alloy having specification of 120 mm length, 50 mm width and 15 mm thickness, respectively. This alloy has wide range of application in aerospace and automotive sector, and it’s developed with the selective laser melting process having optimal parameter settings. Further, the milling machine VCE 600 Pro equipped with Heidenhan TNC 420 controller system was used to perform the end milling experiments. The machine has travel ranges from 600 mm in x, 500 mm in y and 540 mm in z direction. In addition, the maximum distance between spindle tip and worktable is 690 mm. Next, the cutting tool used to perform the milling experiments was solid carbide provided by UOP with model no. Mega Alu 797 ALUIC (797ALUR02100KM). The tool has a diameter of 10 mm and this tool is typically coated with Aluminum-Specific Coating highly recommendable for aluminium and its alloy. The tool has three polished cutting edges or flutes, which helps prevent chip welding on the tool surface.

2.2.2 Experimental Parameters and Cutting Conditions

A total of 12 experiments were performed, each with a single pass of a machining length of 120 mm. The cutting speed was varied at 3 levels and other parameters such as feed rate, radial depth of cut (ae) also known as width of cut and axial depth of cut (ap) were kept constant throughout the milling tests. These parameters were purely selected based on the tool manufactured recommendation (from UOP, e-catalogue). The details of these parameters are shown in Table 1. Further, the milling tests were performed under four different conditions i.e., dry, air cooling, minimum quantity lubrication (MQL) and cryogenic, respectively. Dry machining was performed without any application of cutting fluid. In the case of air cooling, the ErgWind made nozzle was used to control the tool chip interface temperature. The temperature at the end of the nozzle is − 8 °C with air pressure of 6 atm (approx. 6.078 bar). The MQL system from Smart Lube with specific cutting oil for MQL i.e., FUCHS Ecocut Mikro plus 20 has been used to perform the tests. The air pressure supplied to the MQL system is of 6 bar having lubricating fluid flow rate of 80 ml/h and load on MQL system of 3 Watt, respectively. In the case of cryogenic cooling, BECOLD cryogenic lubrication system supplied by HRE automation was used for the milling tests. In the machining tests, the liquid carbon dioxide (CO2) were supplied with nozzle having diameter of 1 mm and the temperature at the end of the nozzle is − 70°. The complete experimental setup is shown in Fig. 3.

Table 1 Machining parameters and technical specifications
Fig. 3
Fig. 3
Full size image

Experimental setup and cooling conditions used in the current work

2.2.3 Details of Equipment and Instrumentation Used in Machining

In this work, the power is not directly measured but it is only calculated with the data from cutting forces because the direct measurement of power requires monitoring the electrical power entering into the machine, which includes spindle power for cutting and other power sources such as coolant systems and feed motors. Therefore, the information of exact cutting power is not feasible in this case and that’s why the main cutting power was calculated from the cutting forces as per the Eq. 1.

The Kistler made, model 9129AA dynamometer was used to measure the cutting forces in three directions i.e., Fx, Fy and Fz. In general, the Kistler 5070 signal amplifier sends the force meter signal to the National Instruments NI9215 measurement card in the NI cDAQ-9188 interface in real time. Then, with the help of LabView program the primary signals were analyzed from the terminal via a LAN link. The complete measurement system is already shown in Fig. 2. In the end, the Sensofar microscope was used to analyze the machined surface and finally the relationship between power and machined surface was established and presented in the results and discussion section.

2.3 Signal Preprocessing

The approach chosen for this work employs an implicit filtering technique based on angular rotations. This technique serves as a selection criterion for expanding the dataset. The power data is isolated using this method based on angular relationships, ensuring that only the most relevant data related to rotational angles is selected for further analysis. This filtering process enhances the accuracy of the findings by reducing noise and irrelevant variations in the signal. The treatment of angular rotations involves understanding and controlling rotational variations to uniformly organise data across various orientations. This is performed to ensure that variations caused by rotation are considered prior to further analysis. The model is able to extract more useful patterns and correlations from the dataset by systematically aligning power data according to angular positions.

Prior to image encoding, min–max normalization is used as a part of the preprocessing procedure. To ensure consistency throughout the dataset, the normalization method scales the values between 0 and 1. When the data is normalized, the model performs better in the encoding and DL phases that follow. Further, the power data for every rotation from 0 to 360° was gathered for the proposed study under four different operating conditions (Dry, Air, MQL and Cryo). The power values that corresponded to various rotational angles were noted for each condition.

3 Deep Learning Models for Power Signal Analysis

The present work deals with an application of different deep learning models to analyze the power signals calculated during the machining of additively manufactured alloys. Figure 4 illustrates the flow and steps involved in the current work.

Fig. 4
Fig. 4
Full size image

Flow of the current work

3.1 Gramian Angular Field

The Gramian Angular Field (GAF) serves as a mathematical representation for time series data, capturing the angular relationships between pairs of data points within the sequence. This method transforms time series data into images, allowing for the application of computer vision techniques in time series classification [29]. GAF comprises two variants: Gramian Angular Summation Field (GASF) and Gramian Angular Difference Field (GADF). Each sequence of features undergoes transformation into two images, specifically based on GASF and GADF. The resulting visual representation of the multivariate matrix behavior involves the concatenation of two images for each feature. The process is given below:

For a time series, \(T\) consisting of n real-valued observations\(({t}_{1}, {t}_{2}, ...,{t}_{n})\), we normalize \(T\) to ensure that all values are within the interval [− 1, 1] or [0, 1]. This normalization process involves rescaling the entire time series and shown in Eqs. (2) and (3).

$${\widetilde{t}}_{-1}^{i}= \frac{({t}_{i}-\text{max}\left(T\right)+({t}_{i}-\text{min}\left(T\right))}{\text{max}\left(T\right)-\text{min}(T)}$$
(2)
$${\widetilde{t}}_{0}^{i}= \frac{{t}_{i}-\text{min}\left(T\right)}{\text{max}\left(T\right)-\text{min}(T)}$$
(3)

The rescaled time series \(\widetilde{T}\) in polar coordinates are represented by the value as the angular cosine and assigning the time stamp as the radius, as described by the following Eq. (4):

$$\left\{\begin{array}{c}\varphi =\text{arccos}\left({\widetilde{t}}_{i}\right), -1\le {\widetilde{t}}_{i}\le 1, {\widetilde{t}}_{i}\in \widetilde{T} \\ r= \frac{{x}_{i}}{M}, {x}_{i}\in {\rm N}\end{array}\right.$$
(4)

where \({x}_{i}\) be the time stamp and \(M\) be the constant factor for regularizing the polar coordinate system. This representation in polar coordinates offers a unique perspective on understanding time series. As time progresses, the associated values undergo transformations across various angular positions along the encompassing circles, resembling the ripples in water. The encoding map described in Eq. 4 possesses two crucial properties. Firstly, it is bijective since \(cos(\varphi )\) is monotonic when \(\varphi \in [0, \pi ]\). For a given time series, this mapping generates a singular result in the polar coordinate system, ensuring a unique inverse map. Secondly, unlike Cartesian coordinates, polar coordinates maintain absolute temporal relationships. When the rescaled data represented using cosine function, it have different angular bounds. In the \([0, 1]\) interval, the angular bounds correspond to \([0, \pi /2]\), while in the [− 1, 1] interval, they align with \([0, \pi ]\). Gramian Angular Difference Field (GADF) derived from [0, 1] rescaled data has an accurate inverse map. This property is essential for certain applications, such as imputing missing values in time series by recovering the corresponding images. The accurate inverse map of GADF from [0, 1] rescaled data is highlighted as a foundation for imputing missing values in time series. This implies that the transformation and analysis of time series data in this specific range offer a reliable method for reconstructing information. After converting rescaled time series into polar coordinates, the angular perspective becomes valuable. Trigonometric operations, such as summing or differencing between angular positions, can be used to identify temporal correlations within different time intervals. The definition of GASF and GADF are expressed in Eqs. (5–8):

$$GASF= \left[\text{cos}({\varphi }_{i}+ {\varphi }_{j})\right]$$
(5)
$$= \tilde{T}^{\prime} \cdot \tilde{T} - \sqrt {I - \tilde{T}^{2} }^{\prime } \cdot \sqrt {I - \tilde{T}^{2} }$$
(6)
$$GADF=\left[\text{sin}({\varphi }_{i}- {\varphi }_{j})\right]$$
(7)
$$= \sqrt {I - \tilde{T}^{2} }^{\prime } \cdot \tilde{T} - \widetilde{{T^{\prime}}} \cdot \sqrt {I - \tilde{T}^{2} }$$
(8)

where \(I\) be the unit row vector [1, 1,….., 1]. Upon transitioning to the polar coordinate system, each time step of the time series is regarded as a one-dimensional metric space. GAF retain temporal dependencies as the time progress when the position moves from top-left to the bottom right. The GAFs capture time-based correlations by representing relative correlations through superposition/difference of directions within the time interval \(k\), denoted as \({G}_{(i,j||i-j|=k)}\). The main diagonal, \({G}_{i,i}\), assumes significance when \(k = 0\), encapsulating the original value/angular information. Using details from this main diagonal enables the reconstruction of the time series, relying on the high-level features acquired through deep neural network learning. However, it’s crucial to acknowledge that GAFs can pose computational challenges due to the substantial size of the Gramian matrix, which scales to \(n \times n\) with the length of the raw time series being \(n\).

Methodology: The power values with respect to cutter angle rotation is converted to the images using GAF image encoding technique which is shown in Fig. 5. The application of GAF augmentation addresses potential overfitting issues by increasing the variability of the training data, which is particularly beneficial given the limited original sample size. Based on the data collected, graphs were created for each condition i.e., 755 images for dry, 680 images for air, 710 images for MQL and 690 images for cryo. In order to illustrate the power-angle relationship, 2835 graphs were created across all four conditions. Following their conversion into images, these graphs made it possible to use DL models for image-based analysis. To ensure that a wide range of data was used to identify the trends, 2295 of the 2835 images were employed for model training. In that 256 images were set aside for validation purposes and 284 images were reserved for testing.

Fig. 5
Fig. 5
Full size image

Augmentation images under different conditions

3.2 Swin Transformer

Transformers are the dominant architecture used in natural language processing (NLP) which uses attention module to adapt long range dependencies in the data [30]. Recently, the transformer models has gained application in the field of image processing for different purposes. In the vision transformer, the patches are in fixed size which results in losing information in the borders. This disadvantage can be overcome by adopting hierarchical partitioning approach in Swin Transformer [31]. Swin Transformer uses sliding window mechanism which reduces the computational complexity by combining local window and shifted window multi-head attention (W-MHA & SW-MSA) modules [32]. In Swin transformer, the images will be divided into small patches without any overlapping. It consist of four major blocks: layer normalization (LN), Drop-Path(DP), W-MHA (Windowed Multi-Head Attention) & SW-MHA (Shifted Window Multi-Head Attention) and MLP. LN normalizes the activations of neurons within a layer and helps to stabilize the training process of deep neural networks. By ensuring the activations have zero mean and unit variance, the network can learn faster and avoid issues like challenging or loss gradients. During training, the distribution of activations in a layer can change between training steps. LN helps address this "internal covariate shift" by normalizing the activations to a common scale, making the network less sensitive to these changes. DP is a regularization technique used during training in Swin Transformer which reduces overfitting. By randomly dropping paths, the network is forced to learn from different sub-networks during each training pass. This encourages the model to develop a more robust representation of the data and improve its ability to generalize to unseen examples. The architecture of Swin transformer is shown in Fig. 6.

Fig. 6
Fig. 6
Full size image

Architecture of Swin transformer

The self-attention (SA) can prioritize the most important parts of the input and reduce the impact of irrelevant information which is represented as Eq. (9)

$$Self-Attention {\left(SA\right)}_{i}=softmax\left(\frac{{K}_{i:n}^{M}{Q}_{i}}{\sqrt{{d}_{K}}}+B\right){V}_{i}$$
(9)

where \(B\) be the relative position code, \({Q}_{i}\) be the Query (\({Q}_{i}= {W}_{q}{P}_{i})\), \({K}_{i}\) be the Key (\({K}_{i}= {W}_{K}{P}_{i})\) and \({V}_{i}\) be the Value (\({V}_{i}= {W}_{V}{P}_{i})\). Let \({W}_{q}\), \({W}_{K}\) and \({W}_{V}\) be the trainable parameters which is same for all input sequence \({X}_{i:n}\). The term \(\frac{{K}_{i:n}^{M}{Q}_{i}}{\sqrt{{d}_{K}}}\) is the scaling product of Q, K and V where \(i=1, 2, \dots .,n\) and d is the query dimension. Multi-head attention (MHA) is the combination of N number of SA blocks which is represented as Eq. 10:

$$MHA=concat ({SA}_{1},{SA}_{2},{SA}_{3},\dots .{SA}_{n})$$
(10)

The multi-head attention with local window is given as Eq. 11:

$$\widehat{{R}^{l}}=\left(\text{W}-\text{MHA}\left(LN\left({R}^{l-1}\right)\right)\right)+{R}^{l-1}$$
(11)

The feature map from MLP is obtained with Eq. 12:

$${R}^{l}=\left(MLP\left(LN\left(\widehat{{R}^{l}}\right)\right)\right)+\widehat{{R}^{l}}$$
(12)

where \(l=1, \text{2,3},\dots , L\). In W-MHA, global interactions are not there as it deals only with local window. In SW-MHA, the layer L will be divided by shifting half of the window to L + 1 layer which results in global interaction. This can be represented in Eqs. (13) and (14)

$$\widehat{{R}^{l+1}}=\left(S\text{W}-\text{MHA}\left(LN\left({R}^{l}\right)\right)\right)+{R}^{l}$$
(13)
$${R}^{l+1}=\left(MLP\left(LN\left(\widehat{{R}^{l+1}}\right)\right)\right)+\widehat{{R}^{l+1}}$$
(14)

where \(\widehat{{R}^{l}}\) and \({R}^{l}\) be the output features of W-MHA module and MLP layer of block \(l\). Let \(\widehat{{R}^{l+1}}\) and \({R}^{l+1}\) be the output features of SW-MHA module and MLP layer of block \(l+1\). Swin Transformer’s approach of dividing the image into shifted windows creates connections between neighboring areas in the image, even though the windows themselves don’t overlap. This technique has been shown to be beneficial for image classification tasks.

4 Results and Discussion

4.1 Analysis of Power Signals with Respect to Cutter Angle Rotation

In order to find a relationship between power signals and cutter angle rotation, the polar plots as shown in Fig. 7 are used. The cutter angle from 0 to 360 degree i.e., one complete revolution of the cutter is represented at the circular axis and significant angles are labeled at 45° intervals, starting with 0° at the top and moving down to 180°, 90°, and so on. Further, the distance from the center of the plot represents the power signal, which indicates the power consumption or force exerted at that angular position and the values are changed when the results move outward from the center of the plot. Figure 7a–c shows the polar plots of power consumption at cutting speed of 230 m/min, 270 m/min and 310 m/min under dry conditions. In these plots, the data points (green dots) are concentrated from approximately 0° to 180°, where the tool is likely in contact with the workpiece. The empty region between 180° and 360° shows that area when the cutter is not in direct contact with the material, indicating the tool’s relief from cutting forces. As the cutting speed increases (from (a) to (c)), the distribution of the green dots becomes more concentrated and denser, particularly near the peak power levels. In Fig. 7a, at 230 m/min, the power consumption appears relatively lower, with fewer data points reaching the higher power range (closer to 200 W) that means at 230 m/min, the power consumption is more spread out, and the majority of the green dots lie below 200 W. In Fig. 7b, at 270 m/min, the number of data points increases, and more points approach the higher power consumption values that means the power consumption becomes more concentrated, and more points appear in the higher range, especially between 100 and 200 W. This suggests a noticeable increase in the power required to maintain cutting as the speed increases, which may be due to the higher material removal rate or increased friction and forces at this speed [33]. In Fig. 7c, at 310 m/min, the compact distribution of power consumption data points is visible, with many points reaching the highest power levels that means the green dots are densely packed, especially near the maximum power consumption levels. This indicates that the tool is consuming high power continuously throughout much of its engagement with the material. In addition, the power consumption is much more consistent and reaches its peak more often, reflecting the increased cutting forces at this higher speed. This suggests that increasing the cutting speed leads to a higher and more consistent power demand, likely due to increased resistance as the cutting tool interacts with the material. Further, the polar plots in Fig. 7d–l showing the cutting process under three different lubrication/cooling conditions: air, MQL, and cryogenic at three cutting speeds: 230 m/min, 270 m/min, and 310 m/min. Figure 7d, e and f represent the cutting operation performed with air cooling at three different cutting speeds. At this lower cutting speed i.e., 230 m/min, the power consumption is relatively evenly spread out, with fewer points reaching close to maximum power values and the plot shows a moderate level of power usage, indicating that air cooling is somewhat effective in keeping the power consumption within a manageable range. As the speed increases from 230 m/min to 270 m/min, the power distribution becomes denser, and more points approach the higher power range. This indicates higher energy demand as the cutting speed increases and air cooling is becoming less effective at dissipating heat, leading to increased power consumption. At the highest speed i.e., 310 m/min, the power consumption is more concentrated towards the higher range, indicating that a significant portion of the cutter’s rotation is operating at near-maximum power and air cooling seems to struggle to manage the heat generated at this speed, resulting in higher power demands. Figures 7g, h, and i represent the cutting process using MQL. At cutting speed of 230 m/min, the power consumption is slightly lower compared to air cooling at the same speed (Fig. 7d) and the power readings are spread out, and the majority of points indicating that MQL is more effective than air cooling at reducing power consumption at this speed. This suggests that MQL provides better lubrication, reducing friction and the corresponding power demand [28]. When the cutting speed is changed from 230 m/min to 270 m/min, the power consumption increases, but the points are still distributed more evenly, with fewer spikes to the maximum power values and MQL remains effective at reducing power consumption, though the demand is beginning to rise as the cutting speed increases. At higher cutting speed i.e., 310 m/min, the power consumption rises significantly, but the plot still shows less concentration near the peak power compared to air cooling at the same speed (Fig. 7f). That means, MQL provides some benefit at reducing power consumption, though at high speeds and it still leads to relatively high energy demand. Figures 7j, k, and l show the cutting process under cryogenic cooling. At cutting speed of 230 m/min, the power consumption is relatively lower and more distributed, with fewer points approaching maximum power ranges because cryogenic cooling is the most effective at this speed, maintain power consumption well within a moderate range compared to dry, air and MQL cooling. When the speed is increased from 230 m/min to 270 m/min, the power consumption rises, but the distribution of points still shows fewer peaks near maximum power values compared to the other cooling methods because cryogenic cooling appears to manage the power consumption better, with a more consistent and moderate energy demand. At the highest speed of 310 m/min, cryogenic cooling shows a denser distribution of points, with a high concentration on maximum power values. However, this plot still indicates better overall performance in terms of power compared to dry, air and MQL. Even at this high speed, cryogenic cooling helps reduce some of the power peaks seen in the other cooling methods. Therefore, it is finally concluded that dry machining and air cooling is the least effective, especially at higher cutting speeds. It leads to fluctuating power consumption at lower speeds and consistently high-power demand at higher speeds. MQL performs better than air, especially at lower cutting speeds, but its ability to manage heat and reduce power demand decreases at higher speeds. Finally, the cryogenic cooling is the most effective method across all cutting speeds. It manages to keep the power consumption lower and more stable, indicating that it controls heat and friction most efficiently, especially at higher speeds.

Fig. 7
Fig. 7
Full size image

Polar diagrams of power signals with respect to cutter angle rotation under different cutting speeds and cooling conditions: Dry- a 230 m/min b 270 m/min c 310 m/min, Air- d 230 m/min e 270 m/min f 310 m/min, MQL- g 230 m/min h 270 m/min i 310 m/min, and Cryogenic- j 230 m/min k 270 m/min l 310 m/min

4.2 Relationship Between the Power Signals and Surface Quality

In machining, the heat is generated at the main cutting zone that significantly affects the power consumption and surface finish of the machined component [34]. In order to control these factors, the cooling/lubrication plays a significant role in machining operation. Figure 8 shows the relationship between power signals and surface roughness maps for milling additively manufactured aluminum alloys under different cooling and lubrication conditions. In dry machining, the power signal graph shows a highly irregular and fluctuating pattern. The peaks are large and frequent, indicating unstable cutting conditions. This could be due to high friction between the cutting tool and the workpiece, as no lubrication or cooling is applied [35]. In addition, these large fluctuations in power are caused by the rapid changes in cutting forces, which result from tool wear, material buildup on the tool (BUE-Built-Up Edge), and thermal effects due to high temperatures. In this case, the surface roughness is higher, as indicated by the color scale (yellow to red areas on the right). This surface appears to have more irregularities and less uniform patterns, with deeper grooves or high peaks. These are consequences of inconsistent cutting forces and higher tool wear. In addition, the high and frequent fluctuations in the power signal are closely related with poor surface finish. The unstable forces and high temperatures during dry cutting lead to tool wear, material sticking to the tool, and inconsistent cutting, which all contribute to a rougher surface. The another concept is the lack of cooling that also causes thermal deformation in the workpiece and tool, which drastically affects the surface quality. When the air cooling is applied the results shows slightly more stable power signals than dry cutting. The peaks are still prominent but are more uniform and less frequent compared to dry cutting. While the cutting forces are still relatively high, air cooling helps to remove some heat from the process, reducing thermal effects but not eliminating friction. When the surface maps are considered, the result improves slightly compared to dry cutting. However, there are still visible irregularities in the surface, and the finish remains suboptimal. The surface maps are also analyzed and the map shows lighter red and yellow areas, indicating that some sections still experience significant material removal variations. Therefore, it is worthy to mention that the application of air cooling helps to stabilize the cutting process by reducing temperature, which slightly improves the consistency of cutting forces (shown by the less erratic power signal). However, since air cooling does not reduce friction as effectively as lubrication, the surface finish only shows moderate improvement compared to dry cutting. Next, the power signals and surface maps are analyzed for MQL conditions. The power signal under MQL is much more stable and consistent compared to both dry and air-cooled conditions. The peaks are shorter and occur in a more regular pattern because MQL provides a small but continuous amount of lubrication directly to the cutting zone, which significantly reduces friction and cutting forces [36]. The cutting is more efficient, and tool wear is minimized. As a result, the surface quality improves substantially in terms of smoother surface, with fewer irregularities, as seen by the consistent green and yellow regions on the surface map. Hence, the tool is cutting more consistently and smoothly, leading to a more uniform finish. The lubrication from MQL lowers the mechanical stresses on the tool and workpiece, resulting in less tool wear, less built-up edge formation, and improved surface integrity. Lastly, the results are analyzed under cryogenic conditions. The results show that the power signal under cryogenic cooling is the most stable of all conditions. The peaks are lower and less frequent, indicating very consistent cutting forces and minimal fluctuations during the milling process. Further, the cryogenic cooling uses extremely low temperatures (CO2) to cool the cutting zone, drastically reducing tool wear, preventing thermal expansion, and minimizing friction. As a result, smooth surface is obtained as compared to other conditions. The surface map is predominantly green with minimal red areas, indicating a highly uniform and fine finish. This is a result of minimal thermal deformation, excellent lubrication, and consistent material removal. When the results are analyzed in more details, the highly stable power signal shows that the cutting forces are very well controlled, and this correlates directly with the smooth surface finish. In addition, the application of cryogenic cooling prevents both thermal damage and tool wear, allowing the tool to cut cleanly without material buildup or significant fluctuations in force. This leads to superior surface quality with minimal irregularities or roughness.

Fig. 8
Fig. 8
Full size image

Relationship between the power signals and surface maps under different conditions

4.3 Deep Learning Results

4.3.1 Selection of Learning Rate

A total of six different DL algorithms were utilised for classification in this investigation, as shown in Fig. 9. Swin Transformer was the only model for which the learning rate was repeatedly examined, despite the fact that it plays a significant part in optimising model performance by influencing the rate at which the model modifies its weights. During the analysis of fifty epochs, the model was tested with learning rates of 0.1, 0.01, 0.001, and 0.0001, with 0.0001 proving to be the most effective. This lower learning rate enabled consistent convergence, avoiding the problems of overfitting as shown by the training loss and validation loss values. Furthermore, the accuracy of both training and validation values increased gradually, supporting 0.0001 learning rate as the best option. The learning rate of 0.0001 has been shown to be successful for other similar architectures and it saved computational resources while guaranteeing reliable results by enabling uniform training across the models without the requirement for individual hyperparameter adjustment. Finally, the smaller learning rates often encourage more slow and accurate weight adjustments, which lowers the possibility of significant oscillations or poor convergence during training.

Fig. 9
Fig. 9
Full size image

Different learning rates of Swin Transformer: 0.0001 a Loss b Accuracy, 0.001 c Loss d Accuracy, 0.01 e Loss f Accuracy and 0.1 g Loss h Accuracy

4.3.2 Quantitative Analysis

In order to validate the Swin transformer model, the classification performance of multiple DL models such as ResNet, VGG-16, AlexNet, Light Weight CNN, and Vision transformer was compared. To evaluate each model’s accuracy, the confusion matrix was examined, as shown in Fig. 10. For testing 85 dry, 64 Air, 68 MQL, and 67 cryo images were taken. The strong classification capacity was demonstrated by the Swin Transformer, which identified 67 Dry, 58 Air, 68 MQL, and 66 Cryo cases correctly. Six samples of air were mistakenly classified as dry, while sixteen samples of dry were mistakenly classified as air. These misclassifications were mostly found between dry and air because the results were consistent with each other. The Vision Transformer showed somewhat less accuracy, especially when it came to the Dry and Air category, where 9 Dry samples were categorised as Air and 7 as MQL, showing more confusion in these areas. Higher accuracy was achieved in the classification of MQL and Cryo; however, slight errors remained, with some MQL and Cryo samples being incorrectly classified as Dry or Air. With 70 accurate classifications, the Light Weight CNN performed the best overall, particularly in the Dry category. It also performed well with 60 Air, 61 MQL, and 62 Cryo. The model showed significant generalisation ability with less misclassifications and a better-balanced performance. AlexNet displayed a higher number of noticeable misclassifications, particularly in the Air category, where 54 samples were accurately identified but some were mistakenly classified as Dry or MQL. The Dry category had 67 correct classifications, but more instances were misclassified into Cryo. MQL and Cryo also experienced a few misclassifications into different categories. While ResNet and VGG16 demonstrated strong classification performance, they encountered issues similar to those observed by AlexNet. Both models performed well with 67 Dry (classifications for each), but struggled slightly more with other cooling conditions. The results of all models are overall accurate but the Swin Transformer having the highest classification showed best accuracy. Further, the performance is compared and the reliability and accuracy of each model’s predictions was evaluated by using key performance indicators such as precision, recall, and F1 score. precision measures the proportion of correct predictions relative to the total number of correct predictions [37]. Recall is the percentage of positive predictions that match actual positives [38]. F1 Score balances precision and recall with the harmonic mean [39]. As a result of its outstanding performance in the MQL and Cryo categories, the Swin Transformer identified as the model that offered the best overall performance, as shown in Fig. 11. It achieved perfect precision, recall, and F1 scores of 100 for MQL, which indicates that it performed flawless classification. It also achieved equally high scores for Cryo, with an F1 score of 97.778, recall of 97.059, and precision of 98.507, which demonstrates its reliability in distinguishing different cooling conditions. It demonstrated strong performance in both dry and air conditions, with an F1 score, recall, and precision greater than 78. The Vision Transformer also shown good performance, particularly for Air and cryo conditions. For Air, precision of 92.188, recall of 81.944, and F1-score of 86.765 and for Cryo, precision of 91.045, recall of 87.143, and F1-score of 89.05. Light Weight CNN performed well across all classes, excelling in Dry and MQL cutting conditions. With dry precision of 85.882, recall of 94.805, and F1-score of 90.123 and with MQL precision of 91.176, recall of 88.571, and F1-score of 89.855. Although AlexNet, VGG-16, and ResNet were able to produce satisfactory outcomes, their consistency was lower when compared to that of the transformer-based models. With higher precision, recall, and F1 scores across the majority of cooling techniques, Swin Transformer’s overall performance was superior in relation to other models.

Fig. 10
Fig. 10
Full size image

Confusion matrix of different models

Fig. 11
Fig. 11
Full size image

Performance comparison of different models

Finally, the performance in terms of overall accuracy and Kappa is compared with different models. Figure 12 provides the overall accuracy and kappa values for various algorithms, including Swin Transformer, Vision Transformer, Light Weight CNN, Alexnet, VGG16, and Resnet. Overall Accuracy represents the percentage of correctly classified instances across all classes. Higher values indicate better overall performance in terms of classification accuracy. Kappa, also known as Cohen’s kappa coefficient, measures the agreement between predicted and actual classifications while considering probability. It provides a more robust assessment of classification performance, especially in cases of imbalanced classes. Swin Transformer demonstrates the highest overall accuracy and kappa value, indicating strong agreement between predicted and actual classifications. Table 2 also provides the application of other models in machining of different materials. The results also confirm that the performance of swin transformer-based models are good in terms of accuracy.

Fig. 12
Fig. 12
Full size image

Comparison of overall accuracy and Kappa for different models

Table 2 Results of different models in end milling operations

5 Conclusions

The present work deals with the investigation of power signals and its impact on surface quality during the milling of additively manufactured aluminium alloys. The following conclusions are drawn from current study:

  • In this work, the Swin Transformer model performed best while learning at a rate of 0.0001, which achieved steady convergence. With the Swin Transformer outperforming other models under all cutting strategies, this learning rate improved model training accuracy and stability.

  • Swin transformer has the highest classification accuracy and kappa values of the six DL models examined. In addition, with excellent precision, recall, and F1 scores, the Swin Transformer model showed the best performance. Particularly under certain cutting conditions, the Vision Transformer and Light Weight CNN demonstrated strong performance. The consistency of transformer-based models were higher than AlexNet, VGG-16, and ResNet.

  • Although the Swin Transformer model performed well, the Light-Weight CNN model had balanced accuracy across conditions and showed fewer misclassifications. This shows that lightweight models also can yield accurate findings with excellent computational efficiency.

  • When the cutter angle rotation and power signals were analysed, it has been concluded that the dry machining and air cooling is the least effective, especially at higher cutting speeds. It leads to fluctuating power consumption at lower speeds and consistently high-power demand at higher speeds. MQL performs better than air, especially at lower cutting speeds, but its ability to manage heat and reduce power demand decreases at higher speeds. Finally, the cryogenic cooling is the most effective method across all cutting speeds. Degree represents the position of cutter, which is almost touching the workpiece at full contact, resulting in the greatest possible material removal, the cutter begin.

  • The surface analysis showed that the dry machining is responsible for higher ranges of power values, and these higher values significantly affect the surface quality and produce rough surfaces during the milling operation. On the other hand, the cryogenic cooling produces the smooth surface because of the enhanced cooling effect at main cutting zone.