{'fraction_non_alphanumeric': 0.022165820642978003, 'fraction_numerical': 0.008037225042301184, 'mean_word_length': 4.919379068602904, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Diagnosis of Missed Ductile Iron Melts with Process Modelling

The paper presents an application of advanced data-driven (soft) models in finding the most probable particular causes of missed ductile iron melts. The proposed methodology was tested using real foundry data set containing 1020 records with contents of 9 chemical elements in the iron as the process input variables and the ductile iron grade as the output. This dependent variable was of discrete (nominal) type with four possible values: ‘400/18’, ‘500/07’, ‘500/07 special’ and ‘non-classified’, i.e. the missed melt. Several types of classification models were built and tested: MLP-type Artificial Neural Network, Support Vector Machine and two versions of Classification Trees. The best accuracy of predictions was achieved by one of the Classification Tree model, which was then used in the simulations leading to conversion of the missed melts to the expected grades. Two strategies of changing the input values (chemical composition) were tried: content of a single element at a time and simultaneous changes of a selected pair of elements. It was found that in the vast majority of the missed melts the changes of single elements concentrations have led to the change from the non-classified iron to its expected grade. In the case of the three remaining melts the simultaneous changes of pairs of the elements’ concentrations appeared to be successful and that those cases were in agreement with foundry staff expertise. It is concluded that utilizing an advanced data-driven process model can significantly facilitate diagnosis of defective products and out-of-control foundry processes.


Introduction
Finding root causes of defect in products, especially those appearing in the manufacturing process is of great interest to production companies and is regarded as one of key factors in competing on the market. Due to rapid development of IT large amounts of data are nowadays recorded in most of manufacturing companies, including foundry industry. The Data Mining techniques, especially advanced data-driven (soft) models, can be helpful in diagnosis of process failures and product defects. They have been mainly applied in finding the root causes of appearance of excessive fractions of defective products (see e.g. review and research papers [1][2][3][4][5][6]). For foundry production, a good example is a problem of identifying the cause of gas porosities which can be attributed to a large number of randomly changing production parameters (see e.g. [7,8]).
Data-driven modeling can be also helpful in identification of reasons of a particular problem related to manufacturing such as appearance of an out-of-control signal on Shewhart's charts SPC. Two different problems of that kind were addressed and solved in [9,10]. Similarly, finding the most probable cause of appearance of specific product defect or machine failure can be aided by models linking the process input parameters with the process outcomes.
In the present study, an application of advanced data-driven modeling in finding the most likely particular causes of a missed ductile iron melt is proposed and presented. The paper utilizes real data collected in an iron foundry producing castings dedicated for Diesel engines and other applications.

Characteristic of melting process data sets
In the cooperating foundry, the only controlled input variables for ductile cast iron melting process were concentrations of nine chemical elements in the base iron. Three typical types of iron were produced: low strength (Rm) and high elongation (A5) (grade 400/18), high strength and lower elongation (grade 500/07) and grade denoted as 500/07 special, which is similar to the previous one but with increased hardness.
In Tables 1 and 2 some basic statistical data of the melting shop production are presented. A natural way of finding the cause of a missed melt is a 'manual' checking its chemical composition. This was done in the preliminary analysis of the data and it was found that only in one case the content of an element (silicon) exceeded the range observed for all the correct melts (of grade 500/07 special). This case was rejected in the further analysis which was aimed at finding non-obvious causes of missed melts.

Selection of model type
Data-driven models applied in the present study should link the process input variables, i.e. the concentrations of the chemical elements in the melt with the process output defined as the iron grade, including the non-classified iron, i.e. the missed melts. The primary selection of the classification models types was made basing on results obtained by one of the authors in previous works. These models included Classification Trees with reduced minimum number of records in a node equal 5 (CTv2) All records in the original data set were utilized for building and testing the models. The commercial software package 'Statistica' version 12 was used.
In Fig. 1 the results of testing the models are shown in a form of misclassification errors expressed as fractions of the total number of records. It can be seen that the more complex Classification Tree model (with reduced minimum number of record in nodes) is undoubtedly the best one. Fractions of misclassified cases by this model are given in Table 3.  It is worth noticing, that the misclassified cases not necessarily can be a result of the model imperfections. The measured values of tensile strength and elongation which decide on the assignment of the ductile iron to its particular grade, may be influenced also by some other factors, including preparation of test pieces and measuring errors. The cases of missed melts used further in the analysis included only those properly classified by the model since only in such cases the simulations (described in Section 2.3) make sense; also a few quite similar cases were omitted. The final numbers of used cases are given in Table 2.

Plan of simulations
Having a reliable model of the process one can carry out arbitrary simulations aimed at finding such changes of selected input variables, i.e. the concentrations of the elements, which would lead to the change from the non-classified iron to its desired (expected) grade. An obvious strategy is to start with the changes of single concentrations, especially of those elements which have the largest impact on the iron properties or which are far from the averages for the given grade or simply look 'suspicious' according to the foundry staff experience. However, due to the fact that the simulations are effortless and the results are obtained immediately, systematic changing of all inputs can be recommended. That kind of approach was tried in the present work, assuming even spacing of all the concentrations between minimum and maximum for the given grade, with step equal 10% of the whole range.
The concentrations of particular elements in the iron melt may be not completely independent. There are two kinds of such relationships. First, some correlations between the concentrations may be observed, mainly resulting from the metallic charge which usually include returns, steel scrap, recarburizers, ferroalloys and other silicon additions. Second, the particular elements can act in the same or opposite directions from the viewpoint of the iron mechanical properties. Hence, in the present work also simultaneous changes of selected pairs of the input variables were tested. For all possible pairs (36) the statistical tests of correlations calculated as average of the linear Pearson's and non-parametric Spearman's coefficients, were made. The results characterizing the interdependences between concentrations of the chemical elements appearing in the foundry data are presented in Fig. 2.

Changes of single elements
From among all 51 missed melts the simulations with changes of single elements concentrations have led to the change from the non-classified iron to its desired (expected) grade in 48 cases. The number of elements the changes of which have led to the success in a single melt varied from 1 to 6 whereas the number of melts in which the change of a given element concentration was successful varied from 3 to 36. The latter results are presented in Fig. 3.
Based on the Classification Tree model the relative significances of the input variables were determined using the Breiman's approach [11]. It can be seen that the most significant elements, such as carbon and manganese are not always among the most successful in the simulations. The general observation is that systematic changes of single elements concentrations give positive results in most cases. However, as mentioned above, the number of candidate elements responsible for a missed melt may be large (up to 6 in the investigated data) which makes the diagnosis difficult.

Simultaneous changes of two elements
All the simulations with simultaneous changes of concentrations of two elements have led to successful change from the non-classified iron to its desired grade. It was found that in many cases it was true despite the fact that changes of the single elements appearing in the given pair not allowed to obtain the expected iron grade. In particular, in the three missed melts for which the single changes failed, the simultaneous changes of carbon and silicon appeared to be successful. In two of them, intended for 500/07 grade, the significant reduction of C and Si contents was the only possibility. For example, in one of these missed melts the actual contents were 3.76%C and 2.6%Si and they both had to be reduced at least to 3.6%C and 2.1%Si. These results are obviously not surprising from the standpoint of foundry practice: apparently the carbon equivalent was too large for this high strength ductile iron grade and the levels of remaining chemical elements have forced that correction.
It should be noticed that although simultaneous changes of more than one inputs appeared to be unnecessary in most cases, sometimes such changes can provide more correct diagnosis compared to a successful change of a single input.

Summary and conclusions
The present study revealed some new possibilities of identification the most probable particular causes of missed ductile iron melts. The proposed methodology is based on advanced data-driven (soft) modeling of the melting process and was presented using real industry data collected in a cooperating iron foundry. The primary analysis of several types of date-driven classification models have shown an outstanding prediction accuracy of Classification Trees whereas Artificial Neural Networks and Support Vector Machines appeared to be significantly worse.
With a use of the selected model simulations for all missed melts were made in which the contents of chemical element were changed in order to obtain the expected grade of ductile iron. The main observation is that in the vast majority of cases the changes of a single element leads to a successful result. Moreover, in some melts the number of such elements is large which can make the unequivocal diagnosis difficult. In three cases, it was necessary to change contents of two elements to obtain the expected iron grade. These elements were carbon and silicon which had to be reduced significantly for the high strength grade which is in agreement with foundry practice and confirms the usability of the model.
The proposed approach and methodology can be applied to various manufacturing processes in which the output is the product quality. It is worth noticing, that the inputs may be process parameters of arbitrary type, including human and organizational variables defined by non-numerical values. Also, the strategies of the input changes in the simulations may be different and adjusted to the specificity of the process.