Artificial Neural Networks as a Tool for Supporting a Moulding Sand Control System Based on the Dependency between Selected Moulding Sand Properties

The article presents the potential for using artificial neural networks to support decisions related to the rebonding of green mould - ing sand. The basic properties of the moulding sand tested in foundries are discussed, especially compactibility as it gives the most information about the quality of green moulding sand. First, the data that can predict the compactibility value without the need for testing are defined. Next, a method for constructing an artificial neural network is presented and the network model which pro - duced the best results is analysed. Additionally, two applications were designed to allow the investigation results to be searchable by determining the range of values of the moulding sand parameters.


INTRODUCTION
Moulding is a complex technological process characterized by numerous process parameters.Currently, the control of the moulding sand condition is performed by measuring properties such as compressive strength or permeability.These properties are important in terms of information about the suitability of the moulding sand for moulding and, because of the relatively short time which is needed to carry out these tests, they are the main source of information on the proper conduct of the rebonding of the moulding sand process.In order to obtain complete information about the moulds, additional tests of other properties, such as friability or fluidity, should also be performed.
From the perspective of the optimal properties of moulding sands, and in reference to their suitability for forming, there is parameter known as the moldability index which allows their usefulness to be determined [1,2].The compactibility of the sand is also measured.This parameter is very sensitive to changes in the composition of the moulding sand and its moisture content, and in terms of its physical properties it is similar to the moldability index.Compactibility also gives a good assessment in the case of the rebonding of moulding sands and can be a guideline for carrying out the rebonding process, also as a parameter used in controlling the systems of the rebonding of the moulding sand process.
It is possible to directly measure the values of the moldability index and compactibility, but not all foundries have facilities for the automatic and rapid measurement of these parameters.Most foundries evaluate them on selected properties of moulding sand, such as: • compressive strength, • permeability, • apparent density.
These properties depend on the moisture of the moulding sand, which is regulated in the various stages of the circulation of sand in the foundry.Additionally, in order to obtain complete information on the amount of fresh ingredients needed to supplement the moulding sand used, the amount of active bentonite should be determined [3,4].
As part of previous works in this field, attempts have already been made to implement systems based on artificial intelligence mechanisms supporting the determination of the parameters of this process [5,6].One solution was a system for determining sand core parameters based on the 3-point bending test, but it was not a solution that could be used in real-time production processes [7].This disadvantage is also characteristic of other artificial intelligence approaches, such as those based on artificial neural network mechanisms implemented in a Matlab environment [8] or using genetic algorithm and particle swarm optimization [9].Artificial intelligence methods such as the adaptive neuro-fuzzy interference system (ANFIS) have also been used to estimate the influence of chemical composition on the parameters of moulding sand [10,11].https://journals.agh.edu.pl/jcmeDue to the complexity of this process and its dependencies, a predictive model has been developed as a part of presented work which, on the basis of the artificial neural network and properties mentioned above, will determine sand quality control parameters, i.e. compactibility.A schematic diagram of the proposed model is shown in Figure 1.
Despite the dependence of the moulding sand properties on moisture, it is important to introduce moisture as an input parameter in the model because it is not a linear dependence.Additionally, the values of this property depend on the content of other moulding sand components, such as the amount of bentonite or other additives (carbon forming additives).Constructing the model in such a way as to include moulding sand moisture will increase the quality of the model.
The selected parameters of compaction assessment are those that are easy to determine from the point of view of the foundries.The measurement of these parameters is based on standard cylindrical fittings.The parameters can be measured with the use of basic laboratory equipment for determining the properties of moulding sand, which are already basic equipment in foundry laboratories and, in most cases, not time-consuming.The ability to measure these properties in combination with the predictive model developed provides the opportunity to develop a control system for moulding sand in real time, which is presented in this paper.

SOURCE DATA ANALYSIS
The results of research concerning the effect selected parameters of green moulding sands on compactability, collected during many experiments, may constitute the basis for the development of the prediction model.
The data were obtained for moulding sands with different compositions by testing how changes in selected moulding sand properties depend on the moisture content (1.5-4.5%) and the amount of bentonite (4-12 parts by weight).The research was carried out for Zębiec Specjal bentonite.The wide range of applied moisture levels makes it possible to include extreme cases of drying or over-moistening of the moulding sand.These moulding sand properties can be used without any restriction, because the neural network is resistant to noise, i.e. values outside the accepted range.A fragment of the developed database that was available during this research is presented in Table 1.The global table contained 198 records.
The nature of the presented data are knowledge vectors consisting of input-output pairs ( i ,   ).The compaction parameter (z 1 ) was adopted as the dependent variable.The following properties were input variables: • and apparent density (x 5 ).
The grain composition of the matrix, determined by the grain size and homogeneity, which has a strong influence on the individual properties of the moulds, especially permeability, was omitted for the analysis.
In the system of dependencies of specific moulding sand properties on selected factors analysed, using historical data to create a model that allows the rapid verification of the mould condition, together with the swift and more precise correction of changes in sand composition towards the desired properties (in green moulding sands, this mainly concerns controlling the moisture content).

ARTIFICAL NEURAL NETWORK PROJECT
When looking for appropriate forms for the design of the predictive model, due to the nature of the data and their quantity, the authors decided to use artificial neural networks (ANNs), which are perfect for situations where there is a need to model highly nonlinear phenomena and multidimensional functional dependencies, as is the case with the analysed process [12].The presented knowledge vectors are a source of learning examples for artificial neural networks.The task of the network is to learn, as precisely as possible, a function that approximates the association of input (x i ) with output (z 1 ).It is a classic example of supervised network learning, also known as learning with a teacher.The methods of teaching neural networks, widely described in the literature [13][14][15] rely on the cyclical update of network weights based on information about the target function gradient and the minimization direction determined at each step.Properly designed neural networks are able to independently formulate the dependencies between the parameters of the phenomenon during the learning process.The purpose of training a neural network is to select its topology and parameters in such a way as to minimize errors in determining the output value.
With the essence of the problem specified and the set of data to be analysed, the design of the neural network was initiated.Building a predictive model with the use of artificial neural networks based on the collected data was carried out in the stages presented in Figure 2.

Determination of independent and dependent variables
The neural network is meant to indicate the influence of individual factors on one of the parameters that controls the quality of the moulding sand, i.e. compactibility.Table 2 presents the independent variables (inputs of the neural network) and explained variables (output of the neural network) adopted in the model.Column (2) presents the adopted names of variables, column (3) presents units in which the variables are provided.Column (4) shows the ranges of the variability of the tested parameters.It should be noted that all of the operating variables in the model are numerical in nature.

Selection of the type and determination of the structure of the neural network
To determine the optimal network architecture, the STATISTICA program and its Automatic Neural Network module were used.The set of data describing the modelled phenomenon (approx.200 vectors of knowledge) was split into three sets: • training set (70%) -these data include examples of inputs (x i ) and the corresponding output values (z j ), which are the basis for determining the connection weights between individual neurons of the network; the modification of the weight values continues until the approximation criterion is achieved in the training set (minimization of the approximation error) or the error in the validation set begins to grow; • test (15%) -the validation set is used to control the course of the learning process by checking the degree of the training of neurons; in practice, learning involves two phases: selecting weights for the training set and testing weights on samples from the validation set; • validation (15%) -data that has not been used in the learning process, on the basis of which the accuracy of learning the network is checked.
The artificial neural network was determined by defining: • an artificial neuron model, • network topology, • and network learning rules.
In this work, several hundred network architectures with different numbers of hidden neurons and different activation functions in the hidden and output layers (linear, sigmoid, tangesoid and exponential) were tested with the use of the Automatic Neural Network module.
From among all networks generated by the program, the network with the lowest validation error was finally selected and given the name MLP 5-8-1.This error for the COMPACTIBILITY output variable was calculated at the level of 2.93%.The measure of the error was the mean squared error (MSE) of the predicted (by the model) and the real (observed) values, expressed by the Formula (1).

Fig. 2. Stages of neural network designing
The structure of the selected network is shown in Figure 3.The network is an MLP (Multi-Layer-Perceptron) network consisting of one input layer (5 neurons), one hidden layer (8 neurons) and an output layer (1 neuron).The logistic (sigmoid) function was assumed as the activation functions in the hidden layer of neurons, while the exponential function was adopted for the layer of output neurons..A summary of the learning process of the selected neural networks for each output variables and their specific characteristics is given in Table 3.
In this network, the BFGS (Broyden-Fletcher-Goldfarb-Shanno) method was used for training.In the case of the selected MLP 5-8-1 network, the assumed minimal approximation error was not achieved; the training process was terminated in 57 epochs, when the validation error started to grow.

Analysis and evaluation of the network model
An additional measure of the quality of the network model was the Pearson's linear correlation coefficient (R), calculated in individual types of sets (training, validation and test sets) for the network response and set values.This coefficient is one of the basic measures of the quality of the model fitting.
This coefficient is determined from Formula (2).

ANN sensitivity analysis
The sensitivity analysis allowed us to distinguish important variables from those that are not important to the network result, and provided insight into the usefulness of the individual input variables.This analysis indicates variables that can be rejected without losing network quality and key variables that must never be rejected.The sensitivity analysis shows the loss incurred by rejecting a particular variable.
If a certain amount of data is rejected, an increase in the network error should be expected, therefore the basic measure of network sensitivity is the quotient of the error W (Eq. ( 3)) obtained at network start up for a data set without one variable and the error obtained with a set of variables.
The greater error after rejecting the variable is, in relation to the original error, the more sensitive the network is to the lack of this variable.If the error quotient is 1 or even lower, removing the variable has no effect on the network quality and even improves it.After performing a sensitivity analysis for all variables, the variables can be ranked in order of importance (Tab.4).
The obtained results of the global sensitivity analysis for the MLP 5-8-1 network, in the context of connections between moulding sand various properties and the sensitivity to changes in the moulding sand composition, from the point of view of an expert in the field of the subject, indicate the general correctness and validity of the adopted model (solution).Since the friability is close to linear in the range of applied moisture, its value can be clearly determined for the selected composition of the moulding sand.Moisture is important because its value determines the values of the moulding sand properties [16][17][18].
Figure 5 shows a graphic representation of selected analyses, developed on the basis of the results generated by the MLP-5-8-1 neural network.The charts show the influence of selected parameters of the moulding sand on compactibility.They confirm the general correctness of the adopted solution.
The first chart shows that moisture has a significant impact on compactibility, with a significant increase in compactibility occurring with greater moisture levels.Meanwhile, the compactibility value decreases with increasing density but at a much lower speed.The confirmation of the results of the sensitivity analysis can be seen here (Tab.4), with the density parameter in fourth place in terms of significance.In this analysis, friability has the greatest impact on compactibility, while permeability has the lowest.These tendencies are confirmed by the second graph in Figure 5, which shows a very clear decrease in compactibility with increasing friability.There is also a noticeable increase in compactibility with increasing permeability, albeit with much less intensity.

Network implementation
An application was created which allows the use of the developed network model to calculate the parameters of the casting process.The application is presented in Figure 6.The main functionalities of the application are as follows: • Adjustment of the dependent parameter ranges to the value of the moisture parameter.Due to the fact that the density, friability, permeability, compression strength parameters are directly dependent on the moisture parameter, the application at first stage of determining the parameters of the foundry process affords the opportunity to specify their ranges.The user selects the value of the moisture parameter, and the application narrows the selection of the values of the remaining input parameters of the process to those values that appear in relations with the given moisture value.• The calculation of the initial value of the compactibility parameter.Based on process input parameters selected by the user (moisture, density, friability, permeability, compression strength) and the developed neural network model, the application calculates the value of the output parameter, namely compactibility.• Determining the ranges of the input parameters for the selected value of the compactibility output parameter.• An additional functionality of the application, developed using the experimental data on the basis of which the model of neural networks was created, is the possibility of returning the ranges of input parameters (moisture, density, friability, permeability, compression strength) for which the specific values of compactibility were obtained.
Based on the data used in the preparation of the system, an additional application was developed that can be useful during the process of the rebonding of moulding sand.This application allows the user to view and filter data in relation to individual process parameters (Fig. 7).
The application user is able to view data concerning the moulding sand preparation process.Additionally, it can sort the results according to specific process parameters.A separate functionality is the possibility of filtering data in terms of the value of the moisture and compactibility parameters, so that the application only returns data related to processes within the ranges selected by the user.Such an application could be used by technicians in mould production processes, as the data collected in the system would be helpful in the process of determining the moisture of the moulding sand in order to obtain the requisite sand compactibility.

SUMMARY
The presented application based on the developed artificial neural network allow us to view and filter data in relation to individual process parameters, and can be also very useful when choosing the correct technology and process parameters for moulding sand preparation.The presented tool facilitates checking how our moulding sands will react after changing their moisture in real-time, based on parameters that can be tested quickly during the production process.The system can also be used to predict how many fresh components should be added to moulding sand.This seems to be a crucial feature since the determination of the amount of active bentonite in moulding sand is very time consuming and rarely performed in foundries.

Fig. 1 .
Fig. 1.Data schema actual value of the variable y coming from the observation; ŷ i -theoretical value of the dependent variable determined on the basis of the model; y --arithmetic mean of empirical values of the dependent variable.The correlation coefficient for the training sample was 0.98, for the validation sample 0.99, and for the test sample 0.99.Correlation graphs for individual sets are shown in Figure 4.

Fig. 4 .
Fig. 4. Comparison of the distribution of data generated by the MLP 5-8-1 network with the experimental data for the sets: a) training; b) validation; c) testing

Table 4
Sensitivity analysis