Introduction

Automated fibre placement (AFP) is a technique for manufacturing complex laminated composite structures (Brasington et al., 2021). It is one of the leading processes in lightweight composite manufacturing combining high productivity and high quality (Brüning et al., 2017). A gantry/robotic system attached to a fibre placement head is utilized in an AFP process. The fibre placement head lays multiple strips of composite materials, or tows, onto a tool surface. Heating, compaction, and tension systems provide appropriate process conditions for adhesion between incoming tows and substrate (Brasington et al., 2021). Prepreg materials with several types of polymer matrices, width, thickness, and fibre volume fraction could be processed using AFP machines. The quality and properties of manufactured composites depend on a good understanding of process parameters and their effects on product quality. However, varying these process parameters to obtain optimal product characteristics is a complex nonlinear optimization problem (Wanigasekara et al., 2020). The main processing parameters of AFP-manufactured composites include consolidation force, deposition rate and hot gas torch (HGT) temperature besides approximately fifty other parameters that can influence the quality of composites manufactured through AFP (C. Wanigasekara et al., 2020). The choice of processing parameters affects the strength of the manufactured composites and the severity of processing defects in AFP composites which include but are not limited to gap size, overlap size, tow thickening, thinning, and wrinkling. In contrast to processing defects that might occur during the AFP manufacturing of composites, certain defects like delamination, fibre fracture or heat damage could also arise during machining and postprocessing of composites as described in (López de Lacalle et al., 2009) (Rodríguez et al., 2021). All these parameters may affect the overall quality of manufactured composites, thus increasing the complexity of the optimization problem of the AFP process (Chen et al., 2021).

The interlaminar shear strength (ILSS) of AFP-manufactured laminates depends strongly on the in-situ temperature history at the interface between plies which is induced by the choice of the AFP process parameters, such as the HGT temperature, consolidation force, and deposition rate. Deviations of the interfacial in-situ thermal profile during manufacturing would affect the strength of the resulting composite due to insufficient bonding.

Being able to better predict such quality indicators is an important focus of smart manufacturing or more broadly Industry 4.0 (Sahoo & Lo, 2022). Industry 4.0 refers to the ongoing fourth industrial revolution which aims to improve production by enhancing data utilization (Jayasekara et al., 2022). The emergence of Industry 4.0 and smart manufacturing is attributed to advancements in data processing and information technology, where the key enabling technologies for Industry 4.0 are listed as cyber-physical systems, Internet of Things (IoT), big data, and artificial intelligence (AI) (Ahmadi et al., 2020) (Kritzinger et al., 2018) (Qinglin et al., 2021). The Digital Twin (DT) is an emerging technology and can be defined as a virtual representation (replica) of an object, process or product that is integrated with the physical process or object throughout its lifecycle in multiple dimensions such as geometry, behaviour, materials, process parameters, and functionality (Tao et al., ). The DT concept relies on developing high-fidelity models that can map the characteristics and behaviour of their physical counterpart. Thus, the information that could be obtained from a physical process or product can ideally be extracted from its digital counterpart (Burov & Burova, 2020). The three-dimensional framework of the DT comprises the definitions of the physical side, the virtual side, and the connections of data and information that tie the two sides (Grieves, 2015). The applications of DT have been thoroughly researched in diverse contexts for various purposes. Notably, it has garnered significant attention, particularly in the realm of manufacturing processes and quality management. When the objective of the DT application is determined, an important consideration is to identify its needed input data from both the physical world and the virtual space, and the data analysis approach. A DT for an AFP process can comprise inputs from physical as well as digital space (Tao et al., 2019b). This may include AFP composites experimental database, and simulation data of the AFP process combined with ML and optimization algorithms as shown in Fig. 1. This can provide the capability to analyse and adjust (configure) the AFP process parameters in real-time to maximize the quality and strength of the manufactured composites.

Fig. 1
figure 1

A framework for the digital twin of the AFP Process

Implementation of the DT for the AFP process requires real-time execution of simulations of the AFP process for generation of extensive data libraries to train machine learning and optimization algorithms in the DT as shown in Fig. 1. Also, the real-time monitoring data collected by means of sensors on the physical space of AFP process can be analysed in conjunction with the FEA based simulation data from AFP process model by the DT to better understand the AFP process, predict possible defects, prevent accidents, and optimize process parameters to enhance the final product quality. Monitoring data from the AFP may include fibre orientation using a camera, 3D depth data using laser scanners to determine gaps, overlaps, and wrinkles, and in-situ thermal history of various laminates (Juarez & Gregory, 2021) (Schmidt et al., 2017) (Tang et al., 2021). The in-situ thermal history from the physical counterpart of the AFP process can be readily obtained through embedded thermal sensors, using an infrared camera or embedded Fibre Bragg grating (FBG) sensors. The analysis of real-time monitoring data of thermal profiles during AFP composites manufacturing in conjunction with the temperature profiles obtained through numerical simulations using finite element analysis (FEA) of the AFP process provides better understanding of the layup process, prediction of possible defects and optimization of the process parameters (Schledjewski & Latrille, 2003) (Jeyakodi, 2016). The in-situ analysis of thermal profile data from the physical and digital counterpart of the AFP process DT (Fig. 1) requires the real-time acquisition of thermal profile data. Thermal profile data from the physical counterpart of DT is readily available through real-time thermal data acquisition of the AFP process while the FEA simulations of the AFP process require a lot of time for each set of parameters.

Finite element modelling, a well-established technology widely used in manufacturing, has developed significantly in the context of AFP composites manufacturing. Complex aspects of the AFP process such as the dynamics of the layup process, thermal profiles during layup and the effects of gaps and overlaps, could be captured using advanced Finite Element Models (FEM) (Brasington et al., 2023) (Islam et al., 2022b). However, existing FEMs for simulating AFP composites manufacturing processes remain complex and time-intensive, making real-time execution and the creation of extensive data libraries impractical. This limitation hinders applications like digital twins which rely on extensive simulations for data analysis tool training. Furthermore, simulations within the digital environment must promptly yield results to predict the most effective operational setup of the system (Tao et al., 2019a). Similarly, fields like autonomous process control, which involves reinforcement learning agents, confront challenges due to the data volume and time constraints associated with simulations (Xia et al., 2021). These limitations of FEM simulations in manufacturing systems are addressed using a hybrid approach combining simulations and Machine Learning (ML) (Pham et al., 2023) (Aljarrah et al., 2023). This approach constructs efficient surrogate models also known as advanced response surfaces, that offer a simplified yet representative representation of a system or process. These surrogate models approximate the relationship between input and output variables, delivering faster responses compared to comprehensive simulation models. Despite their simplicity, these surrogate models provide valuable insights for process understanding and optimization.

The research work presented here focuses on developing a digital tool utilizing a ML-based surrogate model developed using FEA simulation results of the AFP process for predicting the thermal profiles during AFP process that directly affect the final product quality. The proposed ML-based surrogate model solves the problem of high computational time and costs associated with FEA simulations of the AFP process by providing predicted in-situ thermal profiles between different layers in minimal time thus enabling real-time process monitoring. The in-situ thermal profiles can be obtained for various combinations of AFP process parameters (deposition rate, consolidation force, HGT temperature) using the proposed digital tool. The predicted thermal profiles can be compared with the real-time in-situ temperature data of the AFP manufacturing process to predict the quality of the layup being done. In the context of smart manufacturing, the functionalities of the proposed digital tool can be extended to include the online monitoring and control of the process to ensure that the system is working at an optimum level offering diagnostic capabilities, as well as for the optimization of AFP process parameters. A graphical user interface (GUI) based application is also developed which provides a user (or the DT) with the thermal profiles of AFP-manufactured composites for various combinations of AFP process parameters for the purpose of evaluating the accuracy of the layup process to ensure product quality. The predicted in-situ thermal profile of AFP-manufactured composites can also be used with coupled bonding models for estimating the Inter Laminar Shear Strength (ILSS) of composites for different combinations of the AFP process parameters (Sonmez & Hahn, 1997) (Tierney & Gillespie, 2004). The generated virtual ILSS data obtained using the predicted in-situ thermal profiles of the AFP process can also be used for conducting an optimisation study to identify the best set of AFP process parameters (HGT temperature, consolidation force, and deposition rate) for any case.

Machine learning based predictive models are gaining popularity in manufacturing science. However, the datasets used in manufacturing science are often smaller and more diverse than those used in other fields, which makes it difficult to establish accurate predictive models using these datasets. This limitation in dataset size and diversity hinders the ability to develop precise predictions in manufacturing science using machine learning techniques (Zhang & Ling, 2018). The literature suggests that small datasets can be utilized effectively using certain approaches. For instance, a method involving multiple model runs and surrogate data analysis for model validation has been proposed for predicting biomedical outcomes in a dataset of 35 bone specimens. This approach yielded a prediction accuracy of 98.3% (Shaikhina et al., 2015). The issue of limited data availability for developing predictive models in AFP composites has been addressed in the literature using a virtual sample generation technique. This method combines the Trend Similarity Assessment (TSA) approach with a Back Propagation Neural Network (BPNN) and has been applied to a test dataset of 16 AFP composite samples. The results indicate that the proposed method provides a maximum deviation of 16% when predicting on the validation dataset (Wanigasekara et al., 2020). In this research paper, a ML based surrogate model utilizing results of FEA simulations for 27 different combination of the AFP process is developed using simpler ML models such as Multivariate Linear Regression (MLR), Multivariate Polynomial Regression (MPR) and a quadratic kernel function in Support Vector Machine (SVM) regression. Random Forest (RF) and Artificial Neural Network (ANN) algorithms are optimized using multiple model runs to find the optimal trained model on small dataset.

This paper is organized as follows. Section “Methodology” describes the methodology for developing an ML-based predictive model for in-situ thermal profiles. Section “Results and discussions” presents the results and discussions about the prediction accuracy of various ML algorithms followed by GUI-based software development in Sect. “Conclusions”. Finally, Sect. 5 presents the conclusion of this work along with recommendations for future work.

Methodology

The available data for the problem at hand is in the form of in-situ thermal profiles of AFP-manufactured composites which have been obtained using an experimentally validated FEA model of the AFP process for different combinations of process parameters (Islam et al., 2022b). The different steps followed in the study are shown in Fig. 2.

Fig. 2
figure 2

Stepwise methodology for the ML-based in-situ thermal profile prediction

Step 1: Thermal profiles data generation using an FEA model

An experimentally validated full-scale 3-D finite element thermo-mechanics model of the hot gas torch-based AFP manufacturing process developed in Abaqus incorporating the effects of transient heat and pressure was used to generate in-situ thermal profiles of the AFP process. The thermal profiles predicted by the model have been previously validated against manufacturing trials conducted using FBG sensors embedded inside the laminate for temperature assessment (Islam et al., 2022b). Boundary conditions and loads for the FEA AFP process model are shown in Fig. 3.

Fig. 3
figure 3

Boundary conditions and loads (Heat Flux + Pressure) applied to FEA AFP process model showing 10 ply laminate placed on Tool (Base Plate)

The FEA model of the AFP process was validated using AFP placement trials to manufacture composite laminates consisting of single-tow plies and multi-tow plies laid in a uni-directional manner. The placement trials were done using material deposition speed = 76 mm/s, HGT temperature = 950 °C and consolidation force = 180 N. These parameters were established through an experimental investigation aimed at determining a processing range that would enhance physical and mechanical properties. Apodized polyimide-coated FBG sensors were employed to measure temperatures in real-time. To isolate the heat-induced wavelength change, two identical sensors were positioned within a single ply at varying orientations. One FBG sensor was aligned with the fiber direction in the unidirectional ply, while the second sensor was positioned at an angle (5° in first case and 15° in second case trials) relative to it. The root-mean-square deviation (RMSD) between the experimental and the simulated results of single-tow model for the first case is 7.3% while the RMSD for the second case is 11.4%. These results indicate the validity of the single-tow model as well as the experimental methodology. The peak temperatures observed in FBG experiments and the process model for the multi-tow model were compared to observe a 3.4% RMSD between the experimental and the simulated results while incorporating the effect of heating of the adjacent tows in AFP process model. Further details regarding FEA model of AFP process and its experimental validation can be found in (Islam et al., 2022b).

The generation of in-situ thermal profiles for various combinations of input AFP process parameters is carefully planned by varying the AFP process parameters at different levels as shown in Table 1. The feasible dataspace for the AFP processing parameters is defined based on a previous study by (Oromiehie et al., 2017) and the process parameters were chosen based on a previous optimization study (Oromiehie et al., 2021). A full factorial design of experiments approach is used to get a test matrix of 27 different combinations of AFP process parameters.

Table 1 Different AFP process parameters and their levels used for the in-situ thermal profile data generation

A graphical representation showing feasible data space and the possible drawbacks of selecting process parameters outside these bounds is given in Fig. 4.

Fig. 4
figure 4

Graphical representation of feasible dataspace for AFP process

The FEA model of the AFP process is simulated for the 27 different combinations of the AFP process parameters to generate the data required for training, testing and validation of the ML-based predictive models. The dataset is very limited because of the computational cost, energy, effort, and time (more than 8 h for one simulation) required for the FEA simulation of the AFP process.

Step 2: Parametrization of thermal profiles

A typical thermal profile at the interface of two prepreg tows obtained from the FEA model with various heating and cooling cycles is shown in Fig. 5. The attributes of thermal profiles are marked in the sequence of their relative importance for the development of ILSS in Fig. 5. For determination of ILSS of the composites using bonding models, the most important attribute is the peak temperature-1 (marked as 1) followed by the cooling profile (marked as 2), heating rate (marked as 3), peak temperature-2 (marked as 4) and base temperature-1 (marked as 5) (Tierney & Gillespie, 2004) (Khodaei & Shadmehri, 2022) (Islam et al., 2022b) (Oromiehie et al., 2017) (Tafreshi et al., 2019).

Fig. 5
figure 5

Thermal profile at the interface of two prepreg tows with marked physical attributes in sequence of relative importance

The parameterization process starts by identifying a suitable function for the best statistical representation of the cooling profile (marked as 2 in Fig. 5) as it is one of the most complex features of the thermal profile to identify. A curve fitting tool in MATLAB was utilized to fit various functions on the data for the cooling profile. Three different types of functions were used: exponential, power and rational. The objective of this curve-fitting process was to minimize the number of parameters (to simplify the training of ML models) and maximize the correlation coefficient (to ensure the best possible curve fit). The rational function with 3 parameters was found to provide the best results for maximum correlation coefficient value and an optimal number of defining parameters. The results for the correlation coefficients and the number of parameters for various functions as fitted on the cooling profile data are summarized in Table 2. The entire thermal profile is parameterized in terms of the seven parameters namely peak temperature-1, three cooling profile parameters (\({P}_{1}, {P}_{2}, {P}_{3}\)) to define the cooling profile, peak temperature-2, base temperature-1 and base temperature-2 (arranged in order of their respective significance for ILSS determination using bonding models). These parameters are extracted by using the parametrization algorithm developed in MATLAB.

Table 2 Correlation coefficients and number of parameters for different functions to represent the cooling profile

It is necessary to ensure that the region of interest of the thermal profile can be regenerated using the parameterisation parameters. For this, a typical thermal profile at the interface of two prepreg tows obtained from the FEA model is compared with the parametrised thermal profile in Fig. 6, and a good correlation can be observed.

Fig. 6
figure 6

Comparison of the original thermal profile with the regenrated profile after parameterization

Following this, the thermal profile for each of the 27 FEA simulations is parametrized using a parametrization algorithm developed in MATLAB as presented in Sect. “Parameterized thermal profile”. This algorithm extracts the parameters of a thermal profile from FEA results and defines the thermal profile using parameters of a piece-wise functions. The parametrized thermal profile data for various combinations of AFP process parameters are then utilized to train and validate the different ML algorithms.

Step 3: Development of the machine learning-based predictive models

The prediction accuracy of an ML-based predictive model depends on the size of the training data, the underlying features of the data and the selection of the ML algorithm (Vallim Filho et al., 2022). Simpler ML algorithms such as multivariate linear regression (MLR) and multivariate polynomial regression (MPR) provide a cost-effective way to develop predictive models for data following a linear or full polynomial behaviour thus providing a good starting point to estimate the behaviour of the data (Sagar et al., 2021) (Imran et al., 2022). However, non-linear data features require the implementation of more sophisticated and computationally expensive algorithms such as random forest (RF), support vector machines (SVM) or artificial neural networks (ANN) allowing the mapping of highly non-linear data features and thus enhancing the accuracy of such predictive models (Bokonda et al., 2020) (Tercan & Meisen, 2022). Multivariate Linear Regression (MLR), Multivariate Polynomial Regression (MPR), Support Vector Machines (SVM), Artificial Neural Network (ANN) and Random Forest (RF) ML algorithms are trained, tested, and validated using parametrized thermal profiles data of FEA model of the AFP process.

The FEA simulations dataset is small (27 samples) and the test matrix for the AFP FEA model is sparse as shown in Table 3. In order to have a well-distributed representation of each class in the cross-validation and testing data set, the data is split manually rather than randomly. This careful manual split of data is performed ensuring each class of FEA data has at least one sample in the cross-validation and testing dataset. Due to small size of the dataset, 70% of the data is used for training ML algorithms and 20% of the data is utilized for cross-validation (providing biased model validation) and the remaining 10% data is used for testing (providing un-biased model validation) of ML algorithms. The data points used for testing and validation of the ML algorithms are marked in Table 3 and the unmarked data represents the training dataset. The generalization behaviour of the ML models is further studied using additional test data comprising of 4 samples. The AFP process parameters (deposition rate, consolidation force, HGT temperature) are used as inputs for ML algorithms while the seven parameters of parametrized thermal profiles are outputs for the ML algorithms.

Table 3 Process parameter test matrix and the estimated thermal profile parameters for the 27 different cases

The MPR algorithm is optimized for the degree of polynomial and regularization parameters to avoid overfitting the data. The sensitivity of the training, testing and cross-validation mean squared error (MSE) is studied against the regularization parameter and degree of the polynomial. The regularization parameter and degree of polynomial minimizing cross-validation MSE are selected as the optimized parameters for MPR training. The SVM model is optimized for all the hyperparameters (epsilon, kernel function, kernel scale and box constraints) using a built-in MATLAB function utilizing Bayesian Optimization. Artificial Neural Network (ANN) optimization requires the definition of optimal neural network architecture and smart choice of performance parameters (as the inputs are of different ranges). The number of hidden layers is selected to be equal to 1 to avoid overfitting as the data set is very small. The number of hidden units defines the number of unknown weights in the backpropagation algorithm. As a general rule, the number of weights (unknowns) is kept small as compared to the number of training equations. Therefore, the hidden layer units are varied from 01 to 10 to select the best-performing neural network architecture. MATLAB functions are used to train ANN using the Levenberg–Marquardt optimization method for weight and bias value updates in backpropagation. The hyperbolic tangent sigmoid transfer function (tansig) is used as an activation function for the hidden layer while no activation (linear activation) is applied to outputs for regression analysis. MSE normalized to ‘percentage’ (which normalizes outputs and targets to [− 0.5, 0.5] and errors to [− 1, 1]) is used as a performance parameter for network diagnosis. Each configuration of ANN is trained 20 times to minimize the errors due to random initializations of weights and to select the best-performing neural network. The neural network configuration providing the best performance on the training and testing data set is chosen as the optimized ANN for the problem at hand. The Random Forest algorithm is optimized for a number of learning cycles, learning rate and minimum leaf size of each decision tree to find the optimal performing RF.

The maximum percentage deviations in predicted values using various ML algorithms are used as a metric for comparing the predictive capabilities of the different ML algorithms. The maximum deviations in predicted values of thermal profile parameters highlight that the cooling profile parameter \({P}_{2}\) shows the most complex behaviour as compared to other thermal profile parameters. The prediction behaviour of implemented ML models is studied further by plotting the predicted values of the first peak temperature (since this is the most vital variable for the development of ILSS in composites) for a constant deposition rate of 76 mm/sec and consolidation force of 300 N and varying values of the hot gas torch (HGT) temperature. The prediction accuracy of ML models is assessed based on additional test data to select the best performing ML model. The results are further described in Sect. “Comparison of the different ML-based predictive models”.

Step 4: Thermal profile prediction

The ML-based predictive models provide predictions for thermal profile parameters. Replotting thermal profiles from these parameters require information regarding time scale. The time scale is only a function of deposition rate and is simply extracted by fitting a curve on the time versus deposition rate data. The quadratic curve fits the deposition rate-time data accurately by mapping the FEA points exactly as a unique quadratic curve can be defined using 3 points. Such curves are fitted on data for base temperature-1, peak temperature-1, base temperature-2 and peak temperature-2 for extraction of their respective timescale information. The predicted thermal profile parameters along with the timescale information are used to replot the thermal profiles.

Step 5: GUI-based tool for thermal profile prediction

The trained artificial neural network (ANN) for the prediction of thermal profile parameters is utilized to develop a graphical user interface (GUI) based thermal profile prediction application. The application is packaged using MATLAB Compiler Runtime (MCR) as a standalone as well as MATLAB application. The application uses trained ANN to predict thermal profile parameters, extracts the timescale information of parameters from fitted curve parameters, plots the thermal profile, and labels the base and peak temperatures of the profiles.

Results and discussions

Parameterized thermal profile

The thermal profile is parametrized using different parameters as highlighted in Fig. 5. Interlaminar bond strength development of an interface is known to occur only during the placement of the first two tows on top of it. Therefore, only the first two peaks of the thermal profile are of interest for the study and are presented and discussed henceforth.

The thermal profile for all 27 combinations of AFP parameters was parametrized using the parametrization algorithm developed in MATLAB and the corresponding profile parameters are summarized in Table 3. This parametrized thermal profile data for various combinations of AFP process parameters are then utilized to train and validate the different ML algorithms. The data used for cross-validation and testing are marked and the rest was used for training of ML algorithms.

Comparison of the different ML-based predictive models

Once the different algorithms were trained using the training data set selected from the thermal profile data table as discussed above, the percentage deviation in predicted values is used as a metric for comparing the predictive capabilities of the different ML algorithms used. The maximum percentage deviations in predicted values using various ML algorithms are given in Fig. 7. The maximum deviations in predicted values using various ML algorithms for thermal profile parameters highlight that the cooling profile parameter \({P}_{2}\) shows the most complex behaviour as compared to other thermal profile parameters.

Fig. 7
figure 7

Comparison of the maximum percentage deviations in predicted values for the different ML algorithms on the validation dataset

It can be seen that although the MPR algorithm significantly reduces percentage deviations in predicted values for peak temperature-2 and the cooling parameter \({P}_{2}\) as compared to the MLR algorithm, the overall percentage deviations for peak temperature-1 and cooling parameter \({P}_{2}\) are still high, at 4 and 12.25%, respectively. The low percentage deviations (< 1.5%) of MLR and MPR algorithm for Base Temperature-1, Base Temperature-2 and Cooling Parameter \({P}_{3}\) highlight almost a linear behaviour of these parameters with input AFP process parameters. Similarly, the maximum percentage deviations in predicted values of all the parameters of the thermal profile using the SVM, ANN and RF algorithms are also given in Fig. 7. SVM further reduces the maximum percentage deviations in predicted values as compared to the MPR algorithm. The SVM algorithm shows a maximum deviation of 6.8% for the cooling parameter \({P}_{2}\). The percentage deviations shown by ANN and RF are even lower (< < 1%), for all the thermal profile parameters. The outperformance of ANN and RF algorithms with very low percentage deviations in predicted values using the small training, testing and cross-validation data requires further investigation to study the generalizing behaviour of these models on additional test data.

The prediction behaviour of implemented ML models is studied by plotting the predicted values of the first peak temperature (since this is the most vital variable for the development of ILSS in composites) for a constant deposition rate of 76 mm/sec and consolidation force of 300 N and varying values of the hot gas torch (HGT) temperature. Figure 8 shows the prediction behaviour of various ML algorithms as compared to the FEA validation data points. MLR and MPR algorithms show large errors (with a maximum percentage deviation of ~ 5%) in predicted values of the validation data set. RF model provides discrete value predictions with a staircase output between HGT temperature and first peak temperature predictions as can be seen in Fig. 8. The first peak temperature should physically increase continuously with increase in HGT temperatures. The outputs of RF model for regression tasks are the average predictions of individual decision trees. As the dataset is very small, the average values from individual decision trees match for a range of HGT temperature values thus making a staircase output. Such behaviour for RF model indicates insufficient data. The ANN and SVM models provide a reasonable fit predicting validation data points with maximum percentage deviations less than 0.6% as shown in Fig. 8. The SVM and ANN predicted values of the first peak temperature increase continuously as expected with HGT temperature as shown in Fig. 8.

Fig. 8
figure 8

Prediction behaviour of the different ML models as compared with the FEA validation data points

The MLR and MPR prediction models could be safely eliminated as they show large errors on both training and validation data points. The random forest (RF) model can also be discarded as it would require a very large number of training data points to cure the discrete value predictions of RF. The ANN predictions show a slight dip in first peak temperature between 900 and 950 °C while the predictions made by SVM show a continuous rise in first peak temperature predictions. The decision of selecting ANN or SVM as the better prediction model requires additional test data points.

The gap between predictions made by ANN and SVM model is the largest at HGT temperatures of 860 °C, 870 °C and 930 °C, 940 °C as seen in Fig. 8. Thus, these points are selected as additional FEA test data points. Additional FEA simulations on parameters tabulated in Table 4 are performed to select the best prediction model.

Table 4 Input parameters for the additional test data

The prediction behaviour of various ML algorithms with validation data points and additional test data points are plotted in Fig. 9. Visually, the 1st, 3rd, and 4th test data points lie very close to predictions made by ANN while all the data points are equally distributed about the prediction curve of SVM. A numeric metric is required to compare SVM, and ANN models based on the test data. The Mean Absolute Percentage Error (MAPE) for SVM and ANN predictions on the additional FEA test data is given in Table 5. Based on MAPE, the predictions of the first peak temperature of ANN are closer to the FEA test data values.

Fig. 9
figure 9

Prediction behaviour of the different ML models as compared with additional FEA test data

Table 5 MAPE for ANN and SVM predictions for additional FEA test data

Additional FEA test data shows that the prediction behaviour of the ANN model provides only slightly better results than SVM from the mean absolute percentage error (MAPE) metric. Physically, the first peak temperature should increase with increasing HGT temperature but factors like deposition rate, consolidation force, melting point of the polymer matrix and their respective heat capacities also pay a role in determining the rate of increase in first peak temperature with increase in HGT temperature. As noted in Fig. 9, first peak temperature increases rapidly by increasing the HGT temperature from 850 to 900 °C while the rise in first peak temperature values is relatively minor while increasing the HGT temperature from 850 to 900 °C.

This minor increase in first peak temperature is better captured by ANN algorithm based on MAPE. Thus, the ANN model is selected as the best predictive model for thermal profiles of the AFP process.

A comparison of predicted profile parameters using the SVM and ANN, with the FEA profile parameters is shown in Fig. 10. The process parameters chosen for this comparison were: deposition rate of 124 mm/sec, consolidation force of 180N and HGT temperature of 9000C. The predicted values of all profile parameters using SVM, and ANN are in close agreement with the FEA profile parameters as shown in Fig. 10, and either of the models can be used with confidence.

Fig. 10
figure 10

Comparison of predicted profile parameters using SVM and ANN predictive models with the FEA profile parameters

The ANN based surrogate model based on results of FEA simulations provides predictions of the thermal profiles during the layup process of AFP composites manufacturing. The model is trained, tested, and validated using a very small dataset of 27 samples as FEA model of the AFP process is computationally expensive and time consuming to evaluate for each set of input parameters. The prediction accuracy as well as the utilization of the model could be improved by following a hybrid approach as proposed by (Islam et al., 2022a), combining the advantages of ML algorithms, virtual sample generation (VSG) techniques, finite element simulations of the AFP process and experimental data. Further work on this is in progress.

Thermal profile prediction

The time scale information for plotting the thermal profiles from predicted profile parameters can be extracted by fitting a curve on the time versus deposition rate data. Ideally, a linear curve should perfectly fit the time versus deposition rate data, but the linear regression shows a correlation coefficient of 0.9822. The deviation from perfect fit is attributed to errors in FEA simulations (as they are approximate solution methods) of the AFP process. The minor deviations in time versus deposition rate data from linear fit could be addressed by using a quadratic curve as it perfectly fits the FEA data. Thus, both linear and quadratic curves could be utilized for time-scale information extraction of all the parameters of the thermal profile.

The predicted profile parameters along with the time scale information were utilized to regenerate thermal profiles as shown in Fig. 11. A comparison of predicted profiles using SVM and ANN algorithms for a deposition rate of 124 mm/sec, consolidation force of 180N and HGT temperature of 900 °C is presented in Fig. 11. The predicted thermal profile using the ANN-based predictive model agrees well with the parametrized FEA thermal profile as shown in Fig. 11.

Fig. 11
figure 11

Comparison of Predicted profiles using SVM and ANN predictive models

Graphical user interface (GUI) based tool for thermal profile prediction and AFP process monitoring

A graphical user interface (GUI) based application containing trained ANN based surrogate model to predict thermal profiles was developed as shown in Fig. 12. This application has been installed in AFP manufacturing facility at UNSW Sydney for estimating thermal profiles for various combinations of input process parameters. Using this application, a user can set up the AFP input process parameters using the slider bars and obtain the predicted thermal profile by clicking the predict button. As a future scope of work, such an application and the thermal profile dataset can be stored in the central cloud service allowing comparing real-time manufacturing data to better understand the AFP process, optimize the parameters, enhance product quality, and validate the choice of the input AFP process parameters for a given application.

Fig. 12
figure 12

GUI of the thermal profile prediction application

Insights gained from the analysis can help improve process performance, reduce the risk of not meeting expected quality, and better manage operational costs by early diagnosis of operational issues. In the context of Industry 4.0, the developed approach embodied in the DT can be used in future to enable automatic alerts, say when parameter thresholds are exceeded diagnosing issues that may exist so that appropriate measures for performance improvement can be taken.

These thermal profiles combined with analytical bonding models can also be used to predict the ILSS of the AFP-manufactured composites. These results can thus be utilized with any optimization algorithm to determine the optimum process parameters that can optimize the ILSS of AFP-manufactured composites. The capability to optimize and control the AFP process parameters to maximize the strength of the composites is an integral part of the DT of the AFP process as shown in Fig. 1. The predictive model for in-situ thermal profiles could thus pave the way for developing the DT of the AFP process by providing the process parameters optimization and control for the AFP process. The evaluation of the FEA model for a combination of AFP input parameters requires a lot of time (more than 8 h for one simulation), energy and effort while an ANN-based digital tool requires minimal time (~ 0.865 s) to predict in-situ thermal profile using a standard lab computer. Hence, the developed digital tool enables real-time monitoring of the AFP process by timely providing predicted thermal profiles at the interface between the plies of AFP-manufactured composites. Utilizing the FEA model to optimize the parameters of thermal profiles such as peak temperatures, would require running the FEA simulation for many combinations of input parameters thus requiring a lot of time and effort, while the ML-based predictive models of thermal profiles could be easily optimized using existing optimization algorithms.

Conclusions

The ANN and SVM-ML algorithms were found to learn the relationship between input and output variables of parametrized thermal profile very efficiently and thus show quite small maximum percentage deviations. Although random forest (RF) using gradient-boosted decision trees shows very small maximum percentage deviations in predicted values, further investigation showed that the RF algorithm provides discrete value predictions as opposed to expected continuous predictions.

The ANN based surrogate model based on FEA simulations results will provide predicted thermal profile data for analysis in conjunction with the in-situ thermal history data from real-time monitoring of the AFP process. The trained ANN based model predicts the important parameters of thermal profiles with a mean absolute percentage error (MAPE) of 1.56% on additional test data while reducing the time by four orders of magnitude as compared to FEA simulations.

The comparison of the predicted thermal profile data with the real-time monitoring data will help to better understand the AFP process, optimize the parameters, enhance product quality, and prevent accidents. The GUI-based tool for thermal profile prediction application is already installed on the AFP machine computer. The GUI-based tool containing ML based surrogate model thus proves its significance in interconnecting the digital space (ML-based predicted thermal profiles) with the physical space (thermal history data from the real-time monitoring of the AFP process).

The thermal profile predictive capability can also be employed in new opportunities beyond monitoring performance. This data can in turn also be fed to analytical systems to run future scenarios. The thermal profiles can be used to predict the ILSS of AFP-manufactured composites using analytical bonding models. Such a predictive model will also minimize the need for FEA simulations thus providing thermal profiles of AFP-manufactured composites using minimal time and effort. Manufacturers and researchers can learn the results of what-if simulations. These can be used to make informed decisions without any of the risks or costs of running the physical process. A direct predictive model that could predict composite strengths from input AFP parameters can be developed that will utilize the results of the bonding model based on in-situ tow-wise thermal profiles.

The future scope of work also includes developing a reverse ML-based predictive model correlating ILSS with AFP process parameters that could predict the optimized AFP process parameters for the required strength of AFP-manufactured composites. The predictive models could be used in optimization algorithms to optimize the AFP process parameters for maximum ILSS of composites. The functionalities of thermal profile prediction applications could also be enhanced to incorporate the comparison of predicted thermal profiles using various ML algorithms. The bonding model can be incorporated into thermal profile prediction applications to directly predict the ILSS of composites. Ultimately a graphical user interface (GUI) based tool on the hybrid approach as proposed by (Islam et al., 2022a), combining the advantages of ML algorithms, virtual sample generation (VSG) techniques, finite element simulations of the AFP process and experimental data to improve the AFP process can also be developed. Such optimization tools could be embedded in the DT of the AFP process to enhance the AFP process optimization and control for manufacturing better quality composites. An experimentable DT that can stand as a test bed to assess the AFP performance as a function of the chosen process parameters can be developed. Hence, the DT can be used for virtual validation of the process set up prior to its execution. The future scope of work is to develop a closed-loop DT which also embodies an AI model that can directly predict the quality parameters of the AFP process outcome based on hybrid approach as proposed by (Islam et al., 2022a). Such an integrated closed-loop approach will allow automatic and dynamic adjustment of process parameters based on in-situ analysis of monitoring data and predicted quality parameters to assure achieving the desired quality.