Establishment of the Predicting Models of the Dyeing E ﬀ ect in Supercritical Carbon Dioxide Based on the Generalized Regression Neural Network and Back Propagation Neural Network

: With the growing demand of supercritical carbon dioxide (SC-CO 2 ) dyeing, it is important to precisely predict the dyeing e ﬀ ect of supercritical carbon dioxide. In this work, Generalized Regression Neural Network (GRNN) and Back Propagation Neural Network (BPNN) models have been employed to predict the dyeing e ﬀ ect of SC-CO 2 . These two models have been constructed based on published experimental data and calculated values. A total of 386 experimental data sets were used in the present work. In GRNN and BPNN models, two input parameters, such as temperature, pressure, dye stu ﬀ types, carrier types and dyeing time, were selected for the input layer and one variable, K / S value or dye-uptake, was used in the output layer. It was found that the values of mean-relative-error (MRE) for BPNN model and for GRNN model are 3.27–6.54% and 1.68–3.32%, respectively. The results demonstrate that both BPNN and GPNN models can accurately predict the e ﬀ ect of supercritical dyeing but the former is better than the latter.


Introduction
With numerous advantages compared with conventional water dyeing, such as eliminating effluent discharge, saving water resources and preserving energy, the supercritical carbon dioxide (SC-CO 2 ) dyeing process is considered a green and energy-saving process in terms of sustainable development and being environmentally friendly [1][2][3][4][5]. However, in order to promote the application of supercritical fluid dyeing (SFD), it is necessary to establish the prediction model of the dyeing effect in SC-CO 2 in different working conditions such as dyeing time, temperature, pressure, dyestuff type and carrier type. Though the mathematical model derived from Fick's second law [6][7][8][9][10] and the pseudo-second-order kinetic model [11] have been established to predict the dyeing effect in SC-CO 2 , the lack of the parameters such as diffusion coefficient limits their applications. Artificial neural network (ANN) with superior ability to learn and classify data which come from studies on the function of the brain and nerve systems as well as the mechanism of learning and responding [12,13]. Generalized Regression Neural Network (GRNN) and Back Propagation Neural Network (BPNN) are two commonly paradigms [14,15]. BPNN is the most popular method for its complex self-learning and adaptive capabilities to process non-linear and complex system problems preferably [16,17]. GRNN is an emerging model with a simple network structure and network training which significantly reduced training time and computational complexity while ensuring high prediction accuracy [18][19][20]. It has been proved that ANN has been widely applied in many fields of the chemical industry, such as supercritical extraction [21][22][23][24], solubility research [25,26], phase equilibrium [27] and heat transfer [28]. To the best of knowledge, there is to date no openly available systematic literature predicted the K/S value and dye-uptake of SC-CO 2 dyeing using ANN. It is necessary to propose a prediction model of SC-CO 2 dyeing effect, providing the foundation for SC-CO 2 dyeing to realize industrialization.
In this work, the models based on ANN with GRNN and BPNN have been established to predict the published experimental data of dyeing in SC-CO 2 , separately. Then, these two models were compared to find out which gives better result.

Data Collection and Pre-Processing
A total of 386 data sets on experimental dyeing belonging to 14 groups collected from the published papers are used for training the GRNN and BPNN models, the selected 3 to 4 data sets in each group are used for testing and prediction and the rest are used for training. The training, testing and prediction data collected from references [29][30][31][32][33][34][35] are shown in Table 1 and the detailed data were added in the file of "Supplementary File 1". Two of the five variables of temperature, pressure, dye stuff types, carrier types and dyeing time were employed as the influencing factors and K/S value or dye-uptake were selected as performance indexes. The dyeing color depths were evaluated using the Kubelka-Munk equation, from which the K/S value is given by Equation (1).
where K is the absorption coefficient of light, S is the scattering coefficient of light and R was the surface reflectance [1], respectively.  12 3 Dyeing time, Temperature Dye-uptake [35] Due to different dimensions and greater magnitude of value in the input variables, to (scaling) the values of the input variables within a uniform range (e.g., 0-1) was necessary before training the neutral network. The aims were to avoid larger number from overriding the smaller number, improving the degree of convergence and calculation speed in some neural node numbers of the layers, to improve the simulation accuracy. In the present work, scaling of the data to the range of 0-1 was carried out as Equation (2): where X max , X min are the maximum and minimum of all values applied to the variables and X, X norm are the measured values of all the variables before and after treatment, respectively [12,21,36].

GRNN Description
GRNN is a less time-consuming network than other iterative training networks, for it chooses an approximate function which relates the input and the output parameters directly based on the training data. Furthermore, it has been shown that their algorithms have flexible network structure setting, high robustness and fault tolerance when changing values of the parameters [18][19][20]. It is based on Equation (3): where y is the output of the estimator, x is the input vector of the estimator, E y X is the expected value of output, given the input vector x, f(x, y) is the joint probability density function of x and y.
The neural network has four layers: an input layer, a pattern layer, a summation layer and an output layer. In the present study, the GRNN architecture of dyeing effect of SC-CO 2 prediction model was present in Figure 1 and the GRNN modelling process was given in Figure 2.

BPNN Description
BPNN is a kind of multilayer feed-forward with forward information propagation and error back-propagation, which was first proposed by Rumel hart and Mc Celland in 1986 [37]. Figure 3 illustrates the architecture of the BPNN model including an input layer, a hidden layer and an output layer. The scaled data is propagated from the input layer to the hidden layer [38]. The nodes in the hidden layer multiply each input by its weight and then sum the result at each node before they finally reach the output layer of the network, using the Equation (4): where y i is the net input to node j in hidden or output layer, x i is the inputs to node j (or the outputs of the previous layer), w ij is the weights representing the strength of the connection between the ith node and jth node, i is the number of nodes and b j is the bias associated with node j [21,23]. In the error reverse propagation algorithm, the BPNN adjusted the weights and thresholds continuously to approximate an arbitrary nonlinear function until obtain the satisfactory output [17,38]. It should be emphasized that a few numbers of neurons in hidden nodes can produced the network with low precision, while a larger number of neurons can lead to over fitting and bad quality of interpolation. During the learning process BPNN can be selected and tested for its performance by manipulating the number of layers and nodes, the shape of transfer function and the learning algorithm. Figure 4 illustrated the development process of the BPNN model schematically.

Performance Criteria
The comparison among different networks can be accomplished by defining an objective function which minimizes the overall error between the target and calculated values, such as, mean-square-error (MSE), mean-relative-error (MRE) and regression-coefficient (R). These parameters are frequently used measure of the differences between the values predicted by a model or an estimator. If a good model is expected, the MSE and MRE must be minimal while R 2 must be close to 1.

The SC-CO 2 Dyeing Effect Prediction Using GRNN
The GRNN model was established based on dye-uptake of disperse blue 79 dye on terylene by Reference [34]. Table 2 was the dye-uptake data after noise elimination and selected verification data. The temperature and dyeing time were used as the input parameters, whereas the K/S value was considered the output parameter. The data with * was the testing and prediction data.
Due to the small capacity of collected samples, K-fold cross validation was used to avoid the overfitting problem. The training data were randomly divided into K parts and K-1 parts of the data were chosen for training each time while the remaining part was utilized for verification. The optimal solution was found through training and verification.7-fold cross-validation was selected as the training method to find the optimal spread based on the capacity of collected samples. In this research, since the default spread value is 1, we determine the initial spread value was set as 0.1, the step length as 0.02 and the endpoint as 2. Meanwhile, we selected MSE as the network performance function and set any initial value of MSE according to the experience and the value of the collected samples. It can be seen from Figure 5 that when the best spread value is 0.18, the corresponding minimum MSE value is 0.1446. From Figure 6 we can see that GRNN model has good approximation ability and fit well with the dye-uptake value of polyester fiber at different temperatures. The verification results of prediction performance of GRNN model were exhibited in Figure 7. Moreover, due to its high fault tolerance and robustness, the network has good processing ability for unstable sample data.
Based on this optimal reconstructed GRNN model, the prediction results based on K/S value and dye-uptake data were shown in Table 3. It is evident that, the MRE of GRNN model for 14 groups data are 3.27-6.54% and the predicted results of proposed GRNN is in good agreement with the training data with a stable structure and small number of parameters.

The SC-CO 2 Dyeing Effect Prediction Using BPNN
In order to validate the prediction performance of the BPNN we proposed, we take the dye-uptake of disperse blue 79 dye on terylene provided by Reference [34] for example. The BP neural network is trained by optimizing the input weights and thresholds of the neurons at each layer so that the output is close to the desired output. Based on a literature review, we found that one hidden layer is normally adequate to provide an accurate prediction and can be the first choice for any practical feed-forward network design. Therefore, a single hidden layer network was used in this study. As mentioned above, neurons are main building block of neural networks which relied on the complexity of the system being modelled. The number of hidden layer nodes is usually determined by empirical formula, using the Equation (5): where l is the number of neurons in hidden layer and n is the number of neurons in the input layer. The optimum neurons in hidden layer of the network was determined by method of trial and error this study [21]. Figure 8 shows the training and verification results of a different number of neurons in hidden layers, we can see that when the hidden layer has 7 neurons, the value of MRE was the smallest. Therefore, the network structure of BPNN model was assigned as 2-7-1, where 2 correspond to the nodes number of input layer, 7 specifies the number of neurons in hidden layer and the 1 neurons of the output layer represent the target responses. Sigmoid function is the most commonly used for non-linear relationships and represents an activation function for the respective neural layer. It has the advantages of being smooth, continuous and differentiable. In addition, it can be utilized with the gradient descent method and is more accurate than the linear function. In the current study, two different activation functions were employed during the training process, consisting of a nonlinear tangent-sigmoid transfer (tansig) function at the hidden layer and linear transfer (purelin) functions for neuron activation at the input and output layers [39]. The learning in the neural network takes place by modifying the weights of the neurons according to the error between the values of the actual output and target output. As illustrated by Table 4, the MSE and MRE of Levenberg-Marquardt (LM) is less than that of Traingdx function and its R is better than that of Traingdx function. Therefore, LM was selected as the training function, which is the combination of the Gaussian-Newton method and gradient descent method was used for its fault tolerance and fast convergence ability. In order to avoid over fitting and falling into local minimum, we finally determined the best BPNN structure was: training times as 2000, training precision as 10 −6 , learning ratio as 0.1 and the minimum descent gradient of the performance function MSE was 10 −10 . From Figure 9a we can see that the R trained by BPNN was 0.99977, which indicates that the BPNN fit the training data very well but not over-fitted. The MSE of BPNN were exhibited in Figure 9b and it was clearly visible that as the increase of training times the MSE decreased continuously. When the training times reached 2000 times, the training was over and loads verification data for prediction. The verification results of the prediction performance can be seen in Figure 10. To summarize, the BPNN configuration and parameters set above were reasonable, showing a high predictive accuracy and can be used as a powerful model for predicting the rule of the dye-uptake of disperse blue 79 dye on terylene.
into local minimum, we finally determined the best BPNN structure was: training times as 2000, training precision as 10 −6 , learning ratio as 0.1 and the minimum descent gradient of the performance function MSE was 10 −10 . From Figure 9a we can see that the R trained by BPNN was 0.99977, which indicates that the BPNN fit the training data very well but not over-fitted. The MSE of BPNN were exhibited in Figure. 9 (b) and it was clearly visible that as the increase of training times the MSE decreased continuously. When the training times reached 2000 times, the training was over and loads verification data for prediction. The verification results of the prediction performance can be seen in Figure 10. To summarize, the BPNN configuration and parameters set above were reasonable, showing a high predictive accuracy and can be used as a powerful model for predicting the rule of the dye-uptake of disperse blue 79 dye on terylene.   The prediction results of the BPNN model based on K/S value and dye-uptake data were shown in Table 4. According to Table 5, it can be seen that, from all the results of K/S value or dye-uptake as the output variable, the MRE of BPNN model for 14 groups data are 1.68-3.32%, respectively, which shows that the BPNN model can accurately predict the effect of supercritical dyeing.

Comparing GRNN And BPNN Modelling
From Figure 11 we can see that the MRE for the whole data sets of the proposed BPNN model was less than that of the GRNN model, respectively, suggesting the accurate predictive performance of BPNN model over the GRNN model. Whereas, as sample capacity increased from 36 to 48, the superiority of the BPNN model was weakened (see run 1, 2 and run 12). The estimated K/S value and dye-uptake by the GRNN model were in good agreement with experimental data points with the low MRE, indicating that this model divided samples rationally and had a high reliability of verification. Meanwhile, the training times of the GRNN model set in this paper were 672 times, less than the average training times of 752 times of the BPNN model. Thus, the GRNN network is less time-consuming and requires fewer training data compared with the BPNN model.

Conclusions
This study aimed to predict the dyeing effect of SC-CO 2 by comparing two modeling techniques, GRNN and BPNN. Temperature, pressure, dye stuff types, carrier types and dyeing time were selected as the input parameters to predict K/S value or dye-uptake. After training and validation, it was proved that both BPNN and GPNN models can accurately predict the effect of supercritical dyeing but the former is better than the latter. We expect that our results may have useful implications for obtaining faster and higher efficient dyeing process.
Supplementary Materials: The following are available online at http://www.mdpi.com/2227-9717/8/12/1631/s1, Table S1 Effect of dyeing time and temperature on K/S of dyed PET fabrics, Table S2 Effect of pressure and temperature on K/S value of dyed fiber, Table S3 Effect of dyeing time and temperature on K/S value, Table S4 Effect of dye stuff types and temperature on K/S value, Table S5 Effect of dye stuff types and pressure on K/S value, Table S6 The effect of dye stuff types and dyeing time on K/S value, Table S7 The effect of pressure and temperature on K/S value of polypropylene fibers, Table S8 The influence of dyeing time and pressure on K/S value of polypropylene fibers, Table S9 The influence of carriers and temperature on K/S value of meta-aramid fabric, Table S10 The influence of carriers and pressure on K/S value of meta-aramid fabric, Table S11 The influence of dyeing time and carriers on K/S value of meta-aramid fabric, Table S12 The influence of dyeing time and temperature on dye uptake of polyester fabric, Table S13 The influence of dyeing time and pressure on dye uptake of polyester film, Table S14 The influence of dyeing time and temperature on dye uptake.