Forward and Reverse Process Models for the Squeeze Casting Process Using Neural Network Based Approaches

The present research work is focussed to develop an intelligent system to establish the input-output relationship utilizing forward and reverse mappings of artificial neural networks. Forward mapping aims at predicting the density and secondary dendrite arm spacing (SDAS) from the known set of squeeze cast process parameters such as time delay, pressure duration, squeezes pressure, pouring temperature, and die temperature. An attempt is also made to meet the industrial requirements of developing the reverse model to predict the recommended squeeze cast parameters for the desired density and SDAS. Two different neural network based approaches have been proposed to carry out the said task, namely, back propagation neural network (BPNN) and genetic algorithm neural network (GA-NN). The batch mode of training is employed for both supervised learning networks and requires huge training data. The requirement of huge training data is generated artificially at random using regression equation derived through real experiments carried out earlier by the same authors. The performances of BPNN and GA-NN models are compared among themselves with those of regression for ten test cases. The results show that both models are capable of making better predictions and the models can be effectively used in shop floor in selection of most influential parameters for the desired outputs.


Introduction
The mechanical properties in castings majorly depend on the density and secondary dendrite arm spacing.The density and secondary dendrite structure are significantly influenced by the operating conditions of the squeeze cast process variables.In majority of the foundries, industrialists are trying to establish the input-output relationship through the use of process simulation software like procast and magmasoft.The significant effect of process parameters on the temperature difference in the squeeze casting process was studied using artificial neural networks and procast simulation software [1].Later on, authors extended their research efforts to study the solidification time (which has direct influence on the formation of secondary dendrites) with various squeeze casting conditions by using the combinations of artificial neural network and procast simulation software [2].However, simulation software considered being often inefficient, where large number of process variables need to be examined and large number of repetitive analysis are required in the selection of most influential process variables.This will considerably increase the execution time and computational complexity [3].In addition, simulation software also requires knowledge of human expertise to interpret the obtained results.These limitations made investigators/researchers draw much attention towards development of an alternate method for establishing the input-output relationships.
From the past two decades, much of the work has been reported on the improvement in mechanical and microstructure properties of the cast product.However, most of the work was carried out using conventional engineering experimental and theoretical approach in establishing input-output relationships and selection of optimum process parameters.The effects of squeeze cast process variables on the casting density were studied experimentally by various investigators using conventional engineering (varying one process parameter at a time and keeping the rest at the midvalues) approach [4,5].The analytical methods such as gracia's virtual and steady state heat flow model had been utilized by solving the governing equations to study the effects of solidification time on the density and other mechanical properties of aluminium (Al) and zinc (Zn) based alloys [6].The effects of gap distance on the cooling rate and secondary dendrite arm spacing were studied by using the numerical and experimental approaches [7].The effects of pouring temperatures and squeeze pressures on the cast structure and tensile strengths of wrought aluminium alloy were investigated [8].Squeeze pressure effect on secondary dendritic structure was studied for Al based alloys [9,10].The effects of squeeze pressure, die, and melt temperature were studied on secondary dendrite arm spacing of LM13 alloy [11].The following key observations are made from the above literature.(1) Authors studied the effects of squeeze cast process variables using classical engineering experimental approach, wherein a large number of experiments are required for effective analysis.(2) The practical guidelines suggested by the authors may not help the shop floor workers in the selection of the most influential process parameters, unless the input-output relationship is expressed in mathematical form.(3) The classical engineering experimental approach provides the best process parameter levels (local optimum solution) and are completely different from those of optimal process parameter setting (global optimum solution).
Limited research work is carried out to address the classical engineering experimental approach to study the effects of various process parameters by modelling, analyzing, and establishing the input-output relationship.Statistical Taguchi technique has been successfully implemented to study the effects of process variables on mechanical properties of squeeze cast AC2A alloy [12][13][14].It is to be noted that the authors developed mathematical expression representing the properties as a function of squeeze cast process variables.Moreover, the effect of most significant time delay parameter was left out in their analysis.Squeeze pressure, pressure duration, and die temperature were considered to study the effects on mechanical properties using statistical Taguchi technique [15].Moreover, the authors developed multivariable linear response equation by neglecting the effect of pouring temperature and time delay parameters.More recently, authors employed statistical Taguchi tool to study the influencing parameters such as squeeze pressure, filling velocity, die, and pouring temperature on strength and ductility of AlSi9Cu3 alloy [16].It is to be noted that the authors did not consider the pouring temperature and time delay before pressurization.Further, the mathematical expression representing the input-output relationship of the squeeze casting system was left out in their analysis.The following key observations have been made from the authors attempted statistical Taguchi tool to optimize the squeeze cast process parameters.(1) Authors measured two or more responses for the same casting conditions, analysed, and developed response equation separately.It is of paramount importance to note that since different responses were measured for the same casting conditions, the probability of the dependency among the outputs was more.Hence, there is a need to develop an integral multi-input-output system that could simultaneously estimate the outputs for the same inputs.(2) The developed response equations were not used to check the prediction accuracy of the test cases.It is of paramount importance to check the prediction accuracy.
The most practical requirement in foundries is to know the process parameter setting that could produce the desired output that is, backward prediction.The backward prediction might be difficult through conventional statistical tools because the transformation matrix becomes singular and might not be invertible always [17].The problem with reverse prediction and development of an integrated system that simultaneously estimates the two or more responses can be made possible through the use of soft computational tools like neural network (NN), genetic algorithms, fuzzy logic, and their different combinations [18].Artificial neural networks were successfully applied to carry out the forward mapping (to predict the output for the known set of inputs) of various manufacturing processes like pressure die casting [3,19], cement-bonded moulding sand system [20] and permanent mold casting [21], and end milling processes [22].It is interesting to note that artificial neural network was successfully applied as forward and reverse modelling tool in green sand mould system [17], cement-bonded mould system [23], sodium silicate and CO 2 gas hardened mould system [24], and pressure die casting system [25].To the authors' best knowledge, no much work has been reported to carry out the forward and reverse mappings in the squeeze casting process using neural network based approaches.The limitations of the classical engineering, casting simulation, and statistical Taguchi techniques are addressed through the use of artificial neural networks and the present work aim for the following two objectives: (1) forward mapping: forward mapping deals with predicting the responses/outputs for the known set of input conditions.In the present work, density and secondary dendrite arm spacing are considered as the outputs, whereas squeeze casting process variables such as time delay, squeeze pressure, pressure duration, pouring temperature, and die temperature were considered as inputs; (2) reverse mapping: reverse mapping deals with the prediction of the input parameters for the desired output.Here, density and secondary dendrite arm spacing were considered as the input and squeeze cast process variables are considered as the output of the system.
It is to be noted that, to carry out the forward and reverse mappings, an artificial neural networks trained with back propagation and genetic algorithm has been employed.

Modelling Using Artificial Neural Networks
The method of identifying, analysing, and establishing the input-output relationship of the physical system is termedas  modelling.The present work is focused on both forward modelling and reverse modelling of the squeeze casting process as shown in Figure 1.Squeeze casting process variables such as time delay, pressure duration, squeeze pressure, pouring temperature, and die temperature are treated as the inputs, whereas, density and SDAS are treated as the outputs in case of forward mapping.In reverse modelling, process variables are expressed as function of casting density and SDAS.The process parameters and their respective levels used for the present study are presented in Table 1.

Data Collection.
The supervised learning capability of artificial neural networks requires huge training data.In actual practice, huge data collection through real experiments finds impractical for researchers/investigators.However, the requirements of huge training data have been fulfilled by generating artificially (selecting the process parameters covering entire range) at random using the response equations derived though real experiments carried out earlier by the same authors [26,27].

Training Data.
Huge data requirements for training the artificial neural networks have been generated artificially, using the response equations by selecting the process variables lying within the respective range.It should be noted that the generated training data covers the entire range with different squeeze casting conditions.Casting density and SDAS are expressed as a function of squeeze cast process variables, namely, time delay, pressure duration, squeeze pressure, and pouring and die temperature in separate response equations.The response equations casting density and SDAS are shown in ( 1) and ( 2), respectively.It should be noted that 1000 sets of training (input-output) data have been artificially generated using response equations: Figure 2: Artificial neural network architecture used for forward mapping.

Forward Mapping.
In the present work, three-layer feed forward neural network architecture consisting of input, output, and hidden layer neurons (Figure 2) is used.Five and two neurons are used for the input and output layer, respectively.However, the selection of neurons lying in the hidden layer is determined through the parametric study.Linear transfer function has been employed for input layer, whereas nonlinear log-sigmoid transfer function has been utilized for output layer neurons, respectively (see ( 4)-( 6)).It is to be noted that the effect of the response SDAS and density was studied under statistical analysis and it was seen that the behaviour of the density and SDAS with same inputs is the opposite for the same casting conditions.So, for the response SDAS, the modified log-sigmoid activation function was used (5).However, the same sigmoid transfer function has been adopted for all the neurons lying in the hidden layer (7).The term "" indicates the constant and the value is determined after performing large number of trials, "" is the input neuron, and "" and "" transfer function constants of output layers, respectively, log-sigmoid transfer function log-sigmoid transfer function log-sigmoid transfer function

Back Propagation Neural Network (BPNN).
The supervised learning capability of back propagation algorithm is that it learns with training.One thousand sets of input-output data have been generated artificially by using regression models and passed through the NN.That is, batch mode of training is adopted to optimize the structure of NN.The output of the NN is compared with the target values to determine the error.The BPNN is adaptively trained to reduce the mean square error and is calculated using (8).It should be noted that, to avoid numerical fluctuations and to speed up the training process, the training input-output data has been normalized between zero and one as follows: The term "" indicates the number of responses, "" represents the number of training data, "  " depicts the target values, and "  " indicates the network output.It should be noted that the error back propagation algorithm work is based on the principle of gradient descent method to reduce the mean square error.Hence, the network weights need to be updated with learning rate () and momentum parameters () as shown in (9).The learning rate parameter is used to avoid overfitting and the error vibration, whereas to speed up the training process when the network stucks with local optima region, the term momentum constant will be used The term  indicates the iteration number and /  can be determined using the chain rule of differential equation as shown in the following equation: The terms   and   represent input and output of the th neuron lying on the output layer, respectively.It is to be noted that the back propagation algorithm has the probability to get trapped in the local optimal region as compared to the GA (since it searches the solution in huge space).The genetic tuned NN (GA-NN) system works exactly on the same principle of auxiliary hybrid systems.The synaptic weights, activation function constants, and the bias values are supplied by GA-string and the network computes the expected output.In GA-NN, the hidden number of neurons is kept same as that of the BPNN obtained under parametric study.The mean square error is calculated and used as the fitness value of the GA-string.The GA fitness value is computed by using (11).Tournament selection, uniform cross-over, and bit-wise mutations are chosen as the GA operators to find the best possible solutions as follows: 2.7.Reverse Mapping.Reverse mapping has been carried out to predict the recommended input parameters for the desired output.Both BPNN and GA-NN have been used to perform the said task.It is to be noted that two responses and five process variables are considered as the inputs and the outputs of the system, respectively.

Results and Discussions
Forward mapping has been carried out using both BPNN and GA-NN to predict the density and secondary dendrite arm spacing for the known set of process variables of the squeeze casting process.The performances of the developed models have been evaluated with the help of ten randomly generated test cases (Table 5).

Back Propagation Neural Network (BPNN).
It is to be noted that, 1000 sets of input-output training data is used to train the network using batch mode.The parametric study was carried out to optimize the neural network parameters during training (see Figure 3).The parametric study is carried out by varying the neural network parameters (such as hidden neurons number, learning rate, momentum constant, activation function constants, and the bias value) one at a time and keeping the rest at their respective midvalues.It is to be noted that the results of the parametric study are shown in Table 2.The minimum mean square error at the end of the training was found to be equal to 0.001458 (Table 2).
Once the training has been completed, the neural network is used for predicting ten test cases, which are not used for the NN training.The neural network predictions are compared with the actual experimental values and the average absolute percent deviation in prediction is found to be equal to 2.55%.

Genetic Algorithm Neural Network (GA-NN).
As explained in the previous sections, the back propagation algorithm has been replaced by population based search algorithm to search the optimal solutions in huge space.
In the present work, GA is used to optimize the neural network parameters.In GA-NN system, the performance in the prediction largely depends on genetic parameters such as mutation probability, population size, and generation number.The GA-parametric study has been carried out to determine the global solutions (Figure 4).The selection criteria for the optimum GA parameters are decided based on the minimum mean squared error obtained when varied between their respective parameter ranges.It is to be noted that uniform cross-over is used for the cross-over operation.The optimal mean square error obtained for different parameters is shown in Table 3.The optimum parameters obtained at the end of the training, with minimum value of mean squared error equal to 0.001337.Once, the Neural Network parameters are optimised using  GA, the performance of GA-NN in forwarding mapping is tested by utilizing the same test cases (i.e., the test cases used for BPNN).The average absolute percentage deviation in prediction of the responses is found to be equal to 2.234%.

Comparison of BPNN, GA-NN, and Statistical Models
Performances.It is to be noted that the performances of the developed NN based approaches are compared among themselves and with statistical regression model for ten randomly generated test cases.Figure 5(a) shows the percent deviation in prediction of the ten test cases using three different models for the response density.The values of percent deviation in prediction are found to lie in the range of −0.17% to +0.85%, −0.3% to +0.86%, and −0.12% to +0.89% for the regression, BPNN, and GA-NN models, respectively.Similarly, the percent deviation in prediction of the response secondary dendrite arm spacing was found to lie in the range of −10.21% to +6.26%, −10.19% to +7.02%, and −7.27% to +6.04% for regression, BPNN, and GA-NN models, respectively (Figure 5(b)).It is to be noted that, for both responses, GA-NN model outperforms the other two models.Table 4 provides the comparison of the performances in predictions of soft computing based approaches (BPNN, GA-NN, MCFLC, and ANFIS) with that of the statistical regression model in terms of average absolute percent deviation in prediction of ten test cases for the response density and SDAS.
It is to be noted that GA-NN, BPNN, and ANFIS performances are found to be almost similar and comparable, but the GA-NN outperforms all the models in prediction of the responses (Table 4).The better performance of GA-NN might be due to the nature of error surface, where it is possible for GA to hit the global optima.

Reverse Mapping.
The reverse mapping has been carried out with the aim of predicting the process parameters such as squeeze pressure, time delay, pressure duration, and pouring and die temperature for the desired density and SDAS.The NN based approaches (i.e., BPNN and GA-NN) are utilized to tackle the above-said task and the obtained results are compared among themselves.The same set of test cases is used for checking the model performances (Table 5).
The results of the parametric study of both BPNN and GA-NN models are presented in Tables 2 and 3.The ten different test cases were passed through the optimized network and the average absolute percent deviation in prediction of all the responses under BPNN and GA-NN models is found to be equal to 11.66% and 7.49%, respectively.
Figure 6(a) shows the deviation plots indicating the percent deviation in prediction for the response time delay.It is to be noted that the percent deviation obtained by the BPNN model is found to lie in the range of 0% to 27.27%  with all points on the positive side.On the other hand, GA-NN prediction deviations are spread on either side and the corresponding maximum values are found to vary in the range of −25% to +18.18%.The average absolute percent deviation in prediction of the time delay parameter is found to be equal to 17.45% for BPNN and 11.46% for GA-NN.
The performance in prediction of BPNN and GA-NN models in terms of percent deviation for the response pressure duration is shown in Figure 6(b).It is to be noted that the performances in prediction of both models result in similar pattern for the response pressure duration.GA-NN model performs slightly better, compared to BPNN, and the percent deviation values are found to lie within the range of −40% to +18.75% for BPNN and −30% to +12.5% for GA-NN, respectively.The average absolute percent deviation as obtained for the BPNN and GA-NN models for the ten test cases is found to be equal to 19.25% and 10.01%, respectively.
Figure 7(a) compares the performance of the BPNN and GA-NN models in predicting the squeeze pressure.The percent deviation for the response squeeze pressure is found to vary in the similar pattern for both BPNN and GA-NN models and the corresponding percent deviation range was found to lie in the range of −25.39% to +10.41% and −20.64% to +8.33%, respectively.It is also important to mention that except for one test case (2) GA-NN model always tries to predict the response close to the experimental values (Figure 7(a)).In addition, the computation of average absolute percent deviation in prediction of the squeeze pressure is found to be equal to 11.78% and 9.32% for BPNN and GA-NN, respectively.
Figure 7(b) represents the plot of percent deviation values in prediction of pouring temperature using BPNN and GA-NN models.It is interesting to note that both BPNN and GA-NN follow the same path and prediction made with respect to the developed BPNN and GA-NN models is found to vary between −3.46% and +2.9% for BPNN and −3.3% and +2.1% for GA-NN, respectively.The average absolute percent deviation values for BPNN and GA-NN models are found to be equal to 2.33% for BPNN and 2.01% for GA-NN, respectively.
Figure 8 shows the deviation plots of BPNN and GA-NN in predicting the response die temperature.The percent deviation in prediction is found to vary in the range between −10.34% and +11.86% for BPNN and −8.05% and +6.87% for Applied Computational Intelligence and Soft Computing GA-NN.The GA-NN model performs better as compared to BPNN and it is better explained with respect to the average absolute percent deviation in prediction.The average absolute percent deviation in prediction of the response die temperature is found to be equal to 7.51% for BPNN and 4.63% under GA-NN model, respectively.
The reverse mapping aim is to predict the process parameters for the desired density and SDAS.The reverse mappings meet the stringent requirements of the industry to know the recommended process parameters to achieve the desired output by eliminating the trial and error method, simulation software, and expert advice to interpret the obtained simulation results.The results show the average absolute percent deviation in prediction of the process parameters for the desired responses comparable to both BPNN and GA-NN models (Figure 9).It is also important to mention that the grand average absolute percent deviation in prediction of all the responses using BPNN and GA-NN is found to be equal to 11.66% and 7.49%, respectively.However, through the exhaustive population based search, GA-NN results in much improved performance compared to BPNN.Better performance of GA-NN over BPNN might be due to the nature of error surface.BPNN is gradient search based approach, where the solution might be trapped in local minima.

Comparisons with the Earlier Work
The performance of developed NN based approaches has been compared for the same test cases carried out earlier by the same authors using fuzzy logic based approaches [28,29].The authors worked earlier on the fuzzy logic based approaches, namely, manually constructed FLC (MCFLC) and automatically evolved adaptive network based fuzzy interface system (ANFIS), using different membership functions.In the present work, an attempt is made by the authors to compare the performance of both BPNN and GA-NN models with that of the above-mentioned work carried out earlier by the same authors [28,29].Table 4 shows the average absolute percent deviation in prediction of all the models for predicting the responses density and SDAS via forward mapping.
It is observed from Table 4 that the average absolute percent deviation in prediction of the response density is comparable for both neural network and fuzzy logic based approaches.However, the GA-NN model outperforms, for the response, SDAS in terms of prediction accuracy when it is compared with that of the fuzzy logic based approaches.

Concluding Remarks
An attempt has been made to develop the forward and reverse process models for the squeeze casting process using neural network based approaches.Batch mode of training has employed the training data generated artificially at random using regression equations derived through real experiments carried out earlier by the same authors.The detailed parametric study has been carried out to optimize the network parameters in both BPNN and GA-NN approaches.The mean square error obtained during the training process is considered as the criterion for optimization.
In forward mapping, the performance of BPNN and GA-NN models is compared among themselves and with that of the regression analysis for ten test cases.It is interesting to note that NN based models are capable of making effective predictions.However, GA-NN outperformed the BPNN model for both responses, namely, density and SDAS.
The problem with the statistical regression analysis in developing the reverse process model has been effectively tackled by the NN based approaches (i.e., to predict the process variables for the desired output).The performance of the developed models, namely, BPNN and GA-NN, is compared among themselves.It is to be noted that GA-NN outperforms BPNN model for all the responses.This might be due to the nature of error surface and the problem of BPNN solutions getting trapped in local optimum.BPNN approach uses gradient based search for optimum solutions.When the error surface is multimodal, the BPNN solutions may be trapped in local minima.On the other hand, GA is a population based search, where search starts at many locations simultaneously.Hence, it is possible for GA to hit the global minima.It is important to note that the average absolute percent deviations in prediction of both neural network based approaches for reverse modelling are not found to be good enough.This might be due to the fact that complex relationship exists with the input process variables for the said responses.In addition, the number of network input parameters is less than that of the network output in case of reverse mapping.
The overall performance of the developed NN based approaches has been compared for forward mapping with the results of the fuzzy logic based approaches carried out earlier by the same authors.The results are comparable for the response density; however, GA-NN shows a slightly better performance in prediction of secondary dendrite arm spacing.It is to be noted that the results of the reverse modelling are considered to be more useful for the foundry men to achieve the desired output.In addition, the developed methodology can be implemented to adjust the process parameters in on-line control of the casting quality.

Figure 1 :
Figure 1: Forward and reverse squeeze casting process model.

Figure 3 :
Figure 3: Results of parametric study to determine the optimal neural network parameters: (a) error versus number of neurons in the hidden layer, (b) error versus learning rate-hidden layer, (c) error versus learning rate-output layer, (d) error versus momentum constant, (e) error versus activation function constant-hidden layer, (f) error versus activation function constant 1-output layer, (g) error versus activation function constant 2-output layer, and (h) error versus bias value.

Figure 5 :
Figure 5: Comparison of three models in terms of percent deviation in predictions.(a) Density and (b) secondary dendrite arm spacing.

Figure 6 :Figure 7 :
Figure 6: Comparison of NN based approaches in predicting the responses.(a) Time delay and (b) pressure duration.

Figure 8 :Figure 9 :
Figure 8: Comparison of two models in predicting the response die temperature.

Table 1 :
Squeeze casting process parameters and their respective levels.

Table 5
) 2.3.Testing Data.The success of neural network depends on the prediction accuracy of the test cases.Hence, the network prediction accuracy has been tested for randomly generated test cases (which is used during the training process).The experiments have been performed for ten randomly generated test cases and the measured values for casting density secondary dendrite arm spacing (SDAS) are recorded.Two replicates have been used for density measurements.Whereas, average value of the SDAS in each casting sample is determined at three different locations by taking a minimum of 15 different primary dendrites.It is to be noted that, the measurements have been carried out for the primary dendrites containing more than five secondary dendrite arms.), where "" denote index term of measured dendrite,  is the number of measurement,   is the dendritic length of th term, and   is the number of dendrite arms average SDAS = 1   ∑

Table 2 :
BPNN parametric study results of both forward and reverse mappings.

Table 3 :
GA-NN parametric study results of both forward and reverse mappings.
2.6.Genetic Algorithm Based Neural Network.Genetic algorithm (GA) is used from the past few decades in many of the manufacturing applications to obtain the global optimum solution.

Table 4 :
Average absolute percent deviation in prediction of the responses (forward mapping).

Table 5 :
Summary results of input-output results of the test cases.