**2. Material and methods**

#### **2.1 Artificial neural networks as an approximation approach**

Artificial Intelligence models based on artificial neural networks have been widely used in the area of chemistry to model and predict processes related to physical properties. This type of model has shown great reliability to model and predict density, dynamic viscosity, and surface tension, among others.

A good example of the use of artificial neural networks to determine properties of interest in micellar systems is the research carried out by Katritzky et al. [34] who developed a model to predict the critical micellar concentration of non-ionic surfactants based on different parameters related to its molecular structure. According to the authors, the models developed could be used for prediction or analysis of new non-ionic surfactants similar to those used in this research. On the other hand, Fatemi et al. [35] developed a model based on artificial neural networks to predict the critical micellar concentration of different anionic and cationic compounds. The selected input variables included the Balaban index, the heat of formation, among others. The results obtained were compared with the predictions of a multiple linear regression model and it was shown that the neural network is superior to multiple linear regression model to predict the log CMC of anionic and cationic surfactants. Along the same line, Kardanpour et al. [36] reported a wavelet neural network (WNN) to predict the critical micellar concentration of Gemini surfactants. The developed model used twelve different descriptors from the molecular structure. According to the authors, the results reveal the ability of the model to determine CMC and demonstrate, in comparison with MLR models, that the models based on neural networks are superior to the MLR approach (due to the ability of the WNN model to work with nonlinearities between the input variables and the CMC).

The researchs listed above demonstrate the ability of artificial neural networks to predict the critical micellar concentration of different surfactants. But to predict the value of this CMC, it is necessary to carry out different experimental studies to determine any particular property that allows determining the CMC value as a function of some abrupt variation of that property. Two of these properties are surface tension and speed of sound whose experimental work requires a great deal of work time and expense in labour and reagents. The different experiments carried out for each variable would determine the CMC as a function of the intersection

of the two trend lines (as mentioned above [1, 12]). Due to these facts, an ANN approach could be very useful to lower costs and be able to make approximations easier, so designing models that are capable to predict this variable depending on the different mixtures could be a very recommendable tool. The claim that artificial neural networks are useful tools because they can minimize the time of experimental treatment and operating costs can be contrasted in different studies reported in the bibliography. An example of this, is the study carried out by Belhaj et al. [37] in which they use artificial neural networks to predict absorption values for alkyl ether carboxylate (AEC) and alkyl polyglucoside (APG). Thus, this book chapter summary the research carried out in our research group to predict density, speed of sound, kinematic viscosity and surface tension of amphiphilic aqueous solutions [13].

In addition to our work, surface tension modeling was also carried out by different authors. Khazaei et al. [38] developed an ANN to predict the surface tension of multicomponent mixtures at different temperatures was employed. The input variables were: reduced temperature, critical pressure and volume, and an acentric factor of the mixture. The obtained average absolute relative deviations were low and the ANN model, compared with well-known models (Brok-Bird equation, Flory theory and group contribution theory) has proved a high prediction capacity. The authors concluded that ANN can be helpful for engineering calculations and they emphasized that the ANN model can be a robust approach to predict complex input–output systems. Other interesting research was carried out by Gharagheizi et al. [39] developed neural models to determine the surface tension of pure compounds at different temperatures and atmospheric pressure. The authors investigated compounds belonging to 78 different chemical families and the results were satisfactory (according to different statistical parameters) with an absolute average deviation of 1.7% and a squared correlation coefficient of 0.997. On the other hand, Bakeri et al. [40] used 20 hydrocarbons mixtures to determine the surface tension. The model developed by the authors showed the best accuracy when they are compared with other four well-known classical models. On the other hand, density and kinematic viscosity, in this case, for different systems of biofuels and their blends with diesel fuel, can be predicted using ANNs [41]. In this case, two artificial neural networks were developed to predict kinematic density and viscosity. The models developed used 6 input variables, temperature, volume fractions, among others. The results reported by the authors indicate that the models obtained good correlations. Density and speed of sound of binary ionic liquid and ketone mixtures can also be predicted by ANNs [42]. In this case, the artificial neural network models used as input variables, the temperature and the mole fraction, among others, to determine these two variables. The models developed presented an overall average percentage error lower than 2.5%, so the authors concluded that this model was applicable for the prediction of these variables in binary ionic liquid and ketone mixtures.

Nevertheless, the use of artificial neural networks is not only limited to the prediction of the previous properties, ANNs can also be used to tensammetric analysis of different nonionic surfactants (Brij 30, 35, 56 and 96) [43]. Authors concluded that ANNs can be a possible candidate to determine nonionic surfactants. Another interesting study is the one developed by Jha et al. [44] that developed a feedforward artificial neural network with three layers to predict the diffusion coefficient of a micellar system with sodium dodecyl sulfate (SDS). The model uses the temperature and NaCl and SDS concentrations as input variables. The ANN is capable to model the experimental behavior (correlation coefficient upper than 0.99) and it is concluded that the model is usable to calculate this property. ANN models can also be used to investigate the different factors that affect particle size

**89**

*Modeling the Behavior of Amphiphilic Aqueous Solutions*

in a Nanoemulsion System (Virgin Coconut Oil) that contain copper peptide [45]. The model used, to predict the particle size, four input variables composed of the amount of virgin coconut oil, Tween 80:Pluronic F68, xanthan gum and water. The ANN demonstrated its ability to model the particle size according to the four input variables and showed good determination coefficients upper than 0.97. Finally, another interesting research is that carried out by Rocabruno-Valdés et al. [46] in which the authors develop artificial neural models to predict different properties (dynamic viscosity, density and cetane number of biodiesel) using as input variables the temperature, the number of carbon and hydrogen atoms and methyl esters composition. The correlation coefficients obtained were upper than 0.91. According to the authors, the ANN models provide an adequate prediction and can be interest-

To carry out this work, the experimental data obtained by Gomez et al. [1, 12]

(HTABr), octyl trimethyl ammonium bromide (OTABr) and decyl trimethyl ammonium bromide (DTABr) from [1] and tetradecyl trimethyl ammonium bromide (TDTABr) and octadecyl trimethyl ammonium bromide (ODTABr) from [12]. All these reagents were supplied by Fluka with a purity ≥98%. [1, 12]. The authors prepared the aqueous solutions by mass using an analytical balance Kern 770

The output variables for each aqueous solution were determined (at 298 K) with different instruments: i-ii) the density and speed of sound using an Anton Paar DSA 5000 vibrating-tube densimeter and sound analyzer, iii) the kinematic viscosity by means the transit time for liquid meniscus through a capillary viscosimeter (supplied by Schott) and iv) the surface tension using a tensiometer Krüss

The surface model, which is used to evaluate the influence of each input variable on the physical properties (density, speed of sound, kinematic viscosity and surface tension) used the combination of input variables linearly, quadratically and cross-correlated [13]. That it is, experimental data can be approximate using a generalized second-order polynomial model (Eq. (1) [47]). In this sense, the model was used to correlated each dependent variable (*y*pred) using the input variables (*x*),

> *k kk k pred j j ji j i jj j j ji j y b bx b xx b x*

= = = = =+ + + + ∑ ∑∑ ∑ <sup>2</sup>

The response surface methodology was created to carry out the experiments with previous analysis of the relationship between the variables (generally standardized), with a homogeneous distribution of the experiments [13]. Nevertheless, in this case, the experimental data used are not homogeneously distributed and the

The other predictive model used is based on artificial neural networks. The ANN require to split the data into at least two different groups -training (T) and validation (V)-, which has been carried out by the authors [13] randomly. The set of training data was used to train the ANN model, while the validation data set is used to check the good training of the model [13]. An important aspect of this

1 11 1

ε (1)

were used. The used surfactants were: hexyl trimethyl ammonium bromide

*DOI: http://dx.doi.org/10.5772/intechopen.95613*

ing for their inclusion in simulators.

**2.2 Database**

(precision 10−4 g) [1, 12].

K-11 using the Wilhelmy plate method [1, 12].

**2.3 Modeling procedure for predictive models**

the regression coefficients (*b*) and the random error value (*ε*).

0

data have not been standardized [13].

*Modeling the Behavior of Amphiphilic Aqueous Solutions DOI: http://dx.doi.org/10.5772/intechopen.95613*

in a Nanoemulsion System (Virgin Coconut Oil) that contain copper peptide [45]. The model used, to predict the particle size, four input variables composed of the amount of virgin coconut oil, Tween 80:Pluronic F68, xanthan gum and water. The ANN demonstrated its ability to model the particle size according to the four input variables and showed good determination coefficients upper than 0.97. Finally, another interesting research is that carried out by Rocabruno-Valdés et al. [46] in which the authors develop artificial neural models to predict different properties (dynamic viscosity, density and cetane number of biodiesel) using as input variables the temperature, the number of carbon and hydrogen atoms and methyl esters composition. The correlation coefficients obtained were upper than 0.91. According to the authors, the ANN models provide an adequate prediction and can be interesting for their inclusion in simulators.

## **2.2 Database**

*Deep Learning Applications*

solutions [13].

of the two trend lines (as mentioned above [1, 12]). Due to these facts, an ANN approach could be very useful to lower costs and be able to make approximations easier, so designing models that are capable to predict this variable depending on the different mixtures could be a very recommendable tool. The claim that artificial neural networks are useful tools because they can minimize the time of experimental treatment and operating costs can be contrasted in different studies reported in the bibliography. An example of this, is the study carried out by Belhaj et al. [37] in which they use artificial neural networks to predict absorption values for alkyl ether carboxylate (AEC) and alkyl polyglucoside (APG). Thus, this book chapter summary the research carried out in our research group to predict density, speed of sound, kinematic viscosity and surface tension of amphiphilic aqueous

In addition to our work, surface tension modeling was also carried out by different authors. Khazaei et al. [38] developed an ANN to predict the surface tension of multicomponent mixtures at different temperatures was employed. The input variables were: reduced temperature, critical pressure and volume, and an acentric factor of the mixture. The obtained average absolute relative deviations were low and the ANN model, compared with well-known models (Brok-Bird equation, Flory theory and group contribution theory) has proved a high prediction capacity. The authors concluded that ANN can be helpful for engineering calculations and they emphasized that the ANN model can be a robust approach to predict complex input–output systems. Other interesting research was carried out by Gharagheizi et al. [39] developed neural models to determine the surface tension of pure compounds at different temperatures and atmospheric pressure. The authors investigated compounds belonging to 78 different chemical families and the results were satisfactory (according to different statistical parameters) with an absolute average deviation of 1.7% and a squared correlation coefficient of 0.997. On the other hand, Bakeri et al. [40] used 20 hydrocarbons mixtures to determine the surface tension. The model developed by the authors showed the best accuracy when they are compared with other four well-known classical models. On the other hand, density and kinematic viscosity, in this case, for different systems of biofuels and their blends with diesel fuel, can be predicted using ANNs [41]. In this case, two artificial neural networks were developed to predict kinematic density and viscosity. The models developed used 6 input variables, temperature, volume fractions, among others. The results reported by the authors indicate that the models obtained good correlations. Density and speed of sound of binary ionic liquid and ketone mixtures can also be predicted by ANNs [42]. In this case, the artificial neural network models used as input variables, the temperature and the mole fraction, among others, to determine these two variables. The models developed presented an overall average percentage error lower than 2.5%, so the authors concluded that this model was applicable for the prediction of these variables in binary ionic liquid and ketone

Nevertheless, the use of artificial neural networks is not only limited to the prediction of the previous properties, ANNs can also be used to tensammetric analysis of different nonionic surfactants (Brij 30, 35, 56 and 96) [43]. Authors concluded that ANNs can be a possible candidate to determine nonionic surfactants. Another interesting study is the one developed by Jha et al. [44] that developed a feedforward artificial neural network with three layers to predict the diffusion coefficient of a micellar system with sodium dodecyl sulfate (SDS). The model uses the temperature and NaCl and SDS concentrations as input variables. The ANN is capable to model the experimental behavior (correlation coefficient upper than 0.99) and it is concluded that the model is usable to calculate this property. ANN models can also be used to investigate the different factors that affect particle size

**88**

mixtures.

To carry out this work, the experimental data obtained by Gomez et al. [1, 12] were used. The used surfactants were: hexyl trimethyl ammonium bromide (HTABr), octyl trimethyl ammonium bromide (OTABr) and decyl trimethyl ammonium bromide (DTABr) from [1] and tetradecyl trimethyl ammonium bromide (TDTABr) and octadecyl trimethyl ammonium bromide (ODTABr) from [12]. All these reagents were supplied by Fluka with a purity ≥98%. [1, 12]. The authors prepared the aqueous solutions by mass using an analytical balance Kern 770 (precision 10−4 g) [1, 12].

The output variables for each aqueous solution were determined (at 298 K) with different instruments: i-ii) the density and speed of sound using an Anton Paar DSA 5000 vibrating-tube densimeter and sound analyzer, iii) the kinematic viscosity by means the transit time for liquid meniscus through a capillary viscosimeter (supplied by Schott) and iv) the surface tension using a tensiometer Krüss K-11 using the Wilhelmy plate method [1, 12].

#### **2.3 Modeling procedure for predictive models**

The surface model, which is used to evaluate the influence of each input variable on the physical properties (density, speed of sound, kinematic viscosity and surface tension) used the combination of input variables linearly, quadratically and cross-correlated [13]. That it is, experimental data can be approximate using a generalized second-order polynomial model (Eq. (1) [47]). In this sense, the model was used to correlated each dependent variable (*y*pred) using the input variables (*x*), the regression coefficients (*b*) and the random error value (*ε*).

$$\mathbf{y}\_{pred} = \mathbf{b}\_0 + \sum\_{j=1}^{k} \mathbf{b}\_j \mathbf{x}\_j + \sum\_{j=1}^{k} \sum\_{i=1}^{k} \mathbf{b}\_{ji} \mathbf{x}\_j \mathbf{x}\_i + \sum\_{j=1}^{k} \mathbf{b}\_{jj} \mathbf{x}\_j^2 + \varepsilon \tag{1}$$

The response surface methodology was created to carry out the experiments with previous analysis of the relationship between the variables (generally standardized), with a homogeneous distribution of the experiments [13]. Nevertheless, in this case, the experimental data used are not homogeneously distributed and the data have not been standardized [13].

The other predictive model used is based on artificial neural networks. The ANN require to split the data into at least two different groups -training (T) and validation (V)-, which has been carried out by the authors [13] randomly. The set of training data was used to train the ANN model, while the validation data set is used to check the good training of the model [13]. An important aspect of this

#### *Deep Learning Applications*

methodology is that it based on the trial-error procedure [13] to find the optimal combination of parameters for prediction. Once the database is presented to the input layer, the training can start, the data are propagated to the first intermediate layer and the information is treated by the propagation function (Eq. (2)) to obtain a single value (*S*i), being: *x*f the input data (in the input neuron *f*), *w*fi the weight (importance among the neurons *f* and *i*) and *b*i the bias value associated with the intermediate neuron *i*. [13]. The single response is processed by the activation function (Eq. (3)) being: *S*res the output value of the neuron [13]. This process is repeated throughout all the neurons in the intermediate and output layer where the predicted value is generated.

$$\mathcal{S}\_i = \sum\_{f=1}^{N} \boldsymbol{w}\_{ft} \boldsymbol{x}\_f + \boldsymbol{b}\_i \tag{2}$$

$$\mathbf{S}\_{res} = \frac{\mathbf{1}}{\mathbf{1} + \mathbf{c}^{-\mathbf{S}\_l}} \tag{3}$$

#### **2.4 ANN's parameters**

The authors [13] used a total of 80 cases to develop different prediction models (RS and ANN). In this case, the database was divided into two groups. A first group, with 75% of the cases (60), to train the model and a second group, with the remaining 25%, to validate the model (20) [13].

The learning rate and momentum values were set at 0.7 and 0.8, respectively. The models were developed at different training cycles in order to locate the point from which could be overtrained.

#### **2.5 Adjustments parameters**

The results were analyzed by the authors [13] using different statistics to determine the adjustment power, such as the coefficient of determination (R2 ), the root mean square error (RMSE) (Eq. (4)) or the average absolute percentage deviation (AAPD) (Eq. (5)) for the training and the validation phases. Individual percentage deviations (IPD) is also used.

$$RMSE = \sqrt{\frac{\sum\_{j=1}^{n} \left(\mathcal{Y}\_{pred} - \mathcal{Y}\_{experimental}\right)^2}{n}} \tag{4}$$

$$\begin{aligned} \sum\_{j=1}^{n} \left( \left| \frac{\mathcal{Y}\_{pred} - \mathcal{Y}\_{exprimental}}{\mathcal{Y}\_{exprimental}} \right| \right) \mathbf{100} \\ \hline n \end{aligned} \tag{5}$$

**91**

**Table 1.**

*Determination coefficient (R2*

*Modeling the Behavior of Amphiphilic Aqueous Solutions*

PowerPoint Professional Plus 2016 (Microsoft).

seen heterogeneous results for the surface and neural models.

between the value obtained for the density model (0.985) and the R2

0.503, similar to that obtained in the training phase (0.505).

The figures of this book chapter were made with Inkscape 0.92 and Microsoft

The adjustments for the models developed [13] are shown in **Table 1**. It can be

Response surface models present good determination coefficients in the training phase, varying between the value obtained for the density model (0.994) and the value obtained for the kinematic viscosity model (0.906). These good values contrast with the value obtained for the surface tension model which reports a low determina-

For the first three models (density, speed of sound and kinematic viscosity) the values of determination coefficient obtained in the validation phase are similar

for the kinematic viscosity model (0.885). The response surface model, with the worst-performing behavior for the training phase, the model developed to predict surface tension, showed, for the validation phase, a determination coefficient of

Regarding the root mean square error values obtained by the response surface models developed by Astray & Mejuto [13], it can be seen that the density model present an RMSE value around 0.001 g·cm−3, in both phases, the speed of sound models around 7.1837 m·s−1 and 6.3226 m·s−1 in training and validation phase, respectively. The model developed to predict kinematic viscosity presents an RMSE

tion phase, and the worst model developed, the surface tension model, 8.3304 mN·m−1 and 8.1307 mN·m−1, for training and validation phase, respectively. The size of these errors can best be understood if they are given in terms of average absolute percentage deviation. The AAPD values reported for each phase are very similar. In this case, the errors obtained for each model (for all data) were: 0.08%, 0.31%,

**Model R2 RMSE R2 RMSE** RS<sup>ρ</sup> 0.994 0.0012 0.985 0.0011 RSu 0.976 7.1837 0.972 6.3226 RS<sup>ν</sup> 0.906 0.1003 0.885 0.0569 RS<sup>σ</sup> 0.505 8.3304 0.503 8.1307 ANN<sup>ρ</sup> 0.999 0.0004 0.999 0.0003 ANNu 0.998 1.9393 0.998 1.7093 ANN<sup>ν</sup> 0.999 0.0108 0.994 0.0104 ANN<sup>σ</sup> 0.449 9.6859 0.457 9.6827 ANN'<sup>σ</sup> 0.985 1.4956 0.940 2.8593

*Adjustments for training and validation phase for the RS and ANN models selected by the authors [13].* 

*and neural models (ANN). The subscript ρ corresponds to the variable density, u to the speed of sound, ν to the kinematic viscosity and σ is the surface tension. Table adapted from data reported by Astray & Mejuto [13].*

·s−1 for the training phase and 0.0569 mm2

**Training phase Validation phase**

*) and root mean square error (RMSE) for the models developed by surface (RS)* 

values in the training phase) varying

value obtained

·s−1 for valida-

*DOI: http://dx.doi.org/10.5772/intechopen.95613*

**3. Results and discussion**

tion coefficient value (0.505).

value around 0.1003 mm<sup>2</sup>

(with a minimal descent to the obtained R2

#### **2.6 Computer equipment and software**

The input variables, necessary to determine the desired variables, were obtained from the Sigma Aldrich and Chemdraw Professional 15 trial (PerkinElmer) [13]. Microsoft Excel Professional Plus 2013 (Microsoft) was used for RS modeling, and the software EasyNN plus v14.0d (Neural Planner Software Ltd.) was used to ANN modeling [13]. A computer server with an Intel® processor Core™ i7 processor with 16 GB of RAM was used to develop the models [13].

The figures of this book chapter were made with Inkscape 0.92 and Microsoft PowerPoint Professional Plus 2016 (Microsoft).
