Abstract
An ANN model is proposed to predict the impurity concentration in solid diffusion process when the diffusion coefficient is not known using back-propagation learning technique based on insufficient data for analytical solution. The proposed model was very competitive against the analytical method as the results showed high-performance results with minimal amount of error comparing to the analytical method. Moreover, the proposed ANN model can be used where the analytical methods cannot as in some situations wherethe diffusion coefficient is not available
1. Introduction
The random jump of atoms of solute species with respect to the atoms of the host crystal is the core concept of diffusion. This kind of mass transfer of atoms takes place in gaseous, liquid, and solid states [1, 2]. The movement of point defects within the solid is the mechanism by which atoms move within the solid structure of the material. In general, there are two acting techniques of diffusion in solids. The first type is the interstitial diffusion method which requires the jump of the impurity from one place to another. The second type of atoms diffusion tacks place in the substitution solid solution and requires vacancy on the lattice site adjacent to it. Such movement of atoms demands a driving force to occur [2, 3]. At the same time, the diffusion rate will be stimulated at higher temperature and depends on the packing factor of the host's structure as well. Therefore, it is being more rapid for less densely packed structure. Despite that diffusion process is considered as a natural phenomenon, it finds its way through many engineering applications [4]. Spot welding uses the diffusion phenomenon to joint or bond metals together. Steel carburization manufacturing adopts the diffusion process to produce a wear resistance surface. Microelectronics industries are using the diffusion process by doping impurities into Si wafers intentionally. Turbine blades coating and sintering of powder metal are other examples of the controlled diffusion environments and applications.
In general, there are four types of diffusion. The first type is self-diffusion which represents the movement of atoms within a pure material on the absence of a concentration gradient. The second type is the tracer diffusion which is similar to self-diffusion except that some of the atoms of the host element or ion are radioactive isotopes. It should be noted that there is no direct method for measuring the self-diffusion or tracer diffusion coefficient [3, 4]. The third type of diffusion is intrinsic diffusion which refers to the mobility of a species in a binary solid. It considers that each species possesses an intrinsic diffusion coefficient. The fourth type is the mutual or chemical diffusion which occurs in presence of concentration gradient driving force and results in net transport of mass. The diffusion coefficients of the third and the fourth types are related by Darken equation, and both obey Fick's law of diffusion [1, 3, 4].
2. Analytical Analysis of Solid Diffusion
The driving forces of the atomic migrations are concentration, temperature, or electrical field gradients. Fick's first law describes the net diffusion flux down the concentration gradient as a relationship between the concentration gradient driving force, the jump distance, and the jump frequency. The relationship between these variables is presented by the following equation [1, 2, 4]:
where J: the net diffusion flux of atoms in a specific x direction at constant temperature, dc / dx: the concentration gradient, and D: the diffusion coefficient.
When the concentration of the diffused specie varies with time at any location within the host crystal, the mathematical model of the diffusion process can be modeled by Fick's Second law
The stochastic nature of the diffusion process can be presented as a probability density function to find the particle with a certain velocity at any time and any position. Einstein model of diffusion connects the macroscopic property of the diffusion coefficient with the microscopic properties of the jump frequency and the jump distance [2, 4]. In one dimension, the frequency with which an impurity atom jumps from an equilibrium site to a particular adjacent equilibrium site is formulated as follows:
where w: the jump frequency, λ : the jump distance.
When applying the previous equation on three dimensions, it yields [2, 4]
where Γ: total jump frequency.
Boltzmann's factor is (e-ε/kT), which expresses the probability of a state of energy, ε, relative to the probability of a state of zero energy. This factor shows up in situations where the temperature, T, is given. It is proportional to the probability that the system is in a state with energy, ε. From statistical point of view, the Boltzmann factor represents the fraction of the vibrations of the impurity atom that succeed in overcome the energy barrier [2, 4]. The jump frequency can be formulated as
where ε: the energy barrier of the system, v: the vibration frequency of the impurity atom in its equilibrium site, and k: Boltzmann's constant.
The vibration frequency, v, can be calculated by expanding thepotential energy curve,U(x), at the equilibrium site which yield to a simple harmonic motion with an oscillationfrequency
where m: the mass of the impurity atom.
A reasonably accurate estimate of ν can be obtained by approximating the potential energy function as a sinusoid of amplitude ε and wave length λ,
If cubic lattices have been considered, the jump distance is a fraction of the lattice constant such that
where f: afraction of the lattice constant, ao: the lattice constant.
The total jump frequency is a multiple β of the one-way jump frequency, Γ = βw. Based on the above equations, the diffusion coefficient can be formulated as:
The diffusion coefficient D contains the temperature at which the atoms attempt to jump from plane to another as well as the interplanar distance is a function of the crystal structure [5, 6]. Considering the link between the Boltzmann constant and the universal gas constant,
where N: Avogadro constant, R: universal gas constant.
The diffusion coefficient can be formulated as Arrhenius form regardless of the atomic mechanism which is responsible of the atom's mobility [4, 7]. The Arrhenius form of diffusion coefficient is presented by
where Do: exponential constant, Q: the activationenergy, R: universal gas constant, and T: the absolute temperature.
Based on (2), the concentration at location, x, and at the given time, t, can be obtained by
where Cs:the concentration of the surface, Co:the initial bulk concentration, t: the time, x: the location at a particular instant, andD: diffusion coefficient.
And the error function is defined as shown in Figure 1.

The error function used in the concentration model.
3. Research Significance
As mentioned earlier, the analytical approach to determine the concentration at any given location and time requires prior knowledge about the diffusion coefficient which varies with temperature and the microstructure of the host material. On the other hand, the diffusion processes which are not amenable to any closed-form analytical solution are difficult to analyze.
Not many literatures have been devoted to estimate the impurity concentration in solid diffusion using ANN. Moreover, none of them included most of the factors involved in the diffusion in their estimation process. Therefore, the aim of this research is to develop a useful and practical ANN model that utilizes most of the factors involved in the diffusion process to predict the concentration of impurities in solid diffusion [8–10].
The intended network should possess the capability to predict the concentration of the impurity species at any poison and time through training in premeasured quantities. This training will rely on the past experience solo. The network will model the diffusion process based on simulated or laboratory measured values. Accordingly, the relationship between the diffusion's input parameters and the output will be established. The prior knowledge of the diffusion coefficient will be redundant or unnecessary factor to predict the concentration of impurity according to the input parameters. The input vector of the intelligent network should represent the effective variables of the diffusion process.
4. Simulating Diffusion Process Based onIntelligent Networks
Artificial neural network (ANN) is a powerful data modeling tool especially when the model has three or more variables [11, 12]. It has the ability to learn both linear and nonlinear relationships between many variables directly from a set of tests, examples, and field information. It allows a reasonable application of the model to unlearned data. Artificial neural network has been used to estimate many material properties, and it has a wide range of applications in the mechanical engineering field [13–16]. The heart of the ANN is the learning algorithm that tunes its weights. One of the most widely used learningalgorithms is the back-propagation learning technique that was proposed by Paul Werbos in 1974. The back-propagation algorithm trains the ANN model how to conduct certain tasks. It uses the error between what is desired and what is actual (generated by the ANN) to adjust the weights for the model.
Assume that there are P input vectors,
The architecture shown in Figure 2 represents the proposed ANN model for predicting impurity concentration based on error back-propagation network. For a certain plat, the input vector,
where T:the absolute temperature, Cs:the concentration of the surface, Co:the initial bulk concentration, t: the time, and x:the location at a particular instant.

ANN model for predicting carbon concentration using error back-propagation training algorithm.
5. Network Implementation
The proposed algorithm was applied to measure the carbon concentration beneath the surface of iron bars to produce a wear resistance surface. The data, which consists of three different groups, was generated analytically utilizing a MATLAB code using the temperature, the initial concentration of the carbon in the iron bars, the surface concentration in CO/CO2 gas environments, the depth beneath the surface, and the timeas the input parameters for calculating the carbon concentrations [17, 18]. The first group was used for training purposes as shown in Table 1. The second group, which is presented in Table 2, was used for testing the training processes. The third group, which is presented in Table 3, was used for validating the network solution by comparing the predicted carbon concentrations at the output node with those that were generated analytically by the MATLAB code.
Training points.
Where T is the absolute temperature, C s is the concentration of the surface, C o is the initial bulk concentration, x is the location at a particular instant in (m), and t is time in (s).
Test points.
Where T is the absolute temperature, C s is the concentration of the surface, C o is the initial bulk concentration, x is the location at a particular instant in (m), and t is time in (s).
Validation points.
Where T is the absolute temperature, C s is the concentration of the surface, C o is the initial bulk concentration, x is the location at a particular instant in (m), and t is time in (s).
6. Results
By feeding the input parameters to the input nodes of the ANN model, the learning process starts based on the available data. As Figure 3 shows, the error dropped to 2.4×10− 5 after 24 epochs. The figure shows a perfect agreement between the training, the test, and the validation sets.

Training epoch verses error.
Figure 4 compares between the values of the concentrations generated analytically and between concentrations found by the proposed model. The correlation coefficient between the analytically generated and the ANN model predicted concentration values is 0.992. This suggests a very strong positive relationship between them which indicates that the ANN model is applied to predict the concentrations precisely. The best line that fits the predicted and the analytically generated concentrations was found to be

The target versus trained.
7. Advantages and Limitations
It is well known that the analytical model for diffusion requires knowledge of the structure of the host material. The activation energy for diffusion is a function of many components; therefore, it is very difficult to estimate. To calculate the exponential constant, the information of the lattice parameters, the atomic vibration frequency, and the physical property of the host as well as the impurity material need to be available, while the ANN model relays on the experimentally measured data and does not need such information. The relationship between the input and the output variables in the ANN model is established through training iterations based on the available information. The drawback of ANN model is that it needs significant amount of premeasured data to minimize the error of the predicted concentration level of the impurity.
8. Conclusion
The proposed ANN model for calculating the concentrations of impurities approaches the problem from a practical point of view as it depends on premeasured data of certain measured parameters to predict the concentration of the impurity species at different location and time with respect to diffusion process initial parameters without the need for the prior knowledge of the diffusion coefficient, which is hard to know in some cases. This renders this way of estimating the impurity concentrations more flexibile over the analytical approach. The proposed model for predicting impurity concentrations was very competitive against the analytical method as the results showed high-performance results with minimal amount of error comparing to the analytical method. Moreover, the proposed ANN model can be used where the analytical methods cannot, as in some situations where the diffusion coefficient is not available.
