**1. Introduction**

Recently, due to the advances in horizontal drilling and multi-stage fracturing, the possibility of producing hydrocarbon from unconventional hydrocarbon resources, such as shale oil and shale gas is significantly increased. The total organic carbon (TOC) is an essential parameter for unconventional shale resource characterization and evaluation. It expresses the amount of organic carbon present in the formation, thus, indicates the hydrocarbon reserve in these unconventional resources [1,2].

TOC is dependent on many factors, such as gas adsorption, maturity, and carbon content because these factors affect the reservoir organic porosity [2–4]. TOC is also significantly affected by the pore structure and wettability of the shale [2,5,6]. Thus, reserve prediction of unconventional reservoirs needs an accurate method to predict the TOC [5,6].

Currently, several empirical correlations, which were developed based on different assumptions, are used to evaluate the TOC for specific formation types, based on the available well logs. Schmoker [7] developed the first correlation for TOC prediction based on the formation bulk density (RHOB).

His correlation in Equation (1) is developed initially for Devonian shale, this correlation estimates the TOC as volume percentage, which could then be converted to weight percentage as explained in Schmoker [7],

$$TOC(vol.\%) = \frac{(\rho\_B - \rho)}{1.378} \tag{1}$$

where ρ*<sup>B</sup>* and ρ denote the organic matter free rock density and the rock bulk density both in g/cm3.

Schmoker [8] revised his first model to be applicable for Bakken shale formation and he came up with the revised model in Equation (2),

$$TOC(wt.\%) = \frac{[(100\rho\_o) - (\rho - 0.9922\rho\_{mi} - 0.039)]}{[(R\rho)(\rho\_o - 1.135\rho\_{mi} - 0.675)]} \tag{2}$$

where ρ*<sup>o</sup>* denotes the density of the organic matter in g/cm3, R is the ratio of the organic matter to organic carbon as the weight percentage, ρ*mi* denotes the grain and pore fluid average density in g/cm3.

Passey et al. [9] developed a simple model for TOC prediction, based on the deep resistivity (DR) and sonic transit time (DT) logs, this model is named Δ*logR* model, which is summarized in Equations (3) and (4). Δ*logR* model is currently widely used for evaluating the unconventional resources reserve,

$$
\Delta \log \mathcal{R} = \log\_{10} \left( \frac{\mathcal{R}}{R\_{\text{baseline}}} \right) + 0.02 \times \left( \Delta t - \Delta t\_{\text{baseline}} \right) \tag{3}
$$

$$
\Delta \log \mathcal{R} = \log\_{10} \left( \frac{\mathcal{R}}{R\_{\text{baseline}}} \right) + 0.02 \times \left( \Delta t - \Delta t\_{\text{baseline}} \right) \tag{4}
$$

where Δ*logR* is the logs separation, *R* and *Rbaseline* denote the evaluated formation and the base formation resistivity in ohm.m, Δ*t* and Δ*tbaseline* represent the evaluated formation and base formation sonic transit times both in μs/ft, and LOM is the level of maturity.

The Schmoker and Δ*logR* models were evaluated by Charsky and Herron [10] into various formations in four different wells. The authors found that these models are not accurate, where TOC is predicted with an average absolute difference (ADD) of 1.6 wt%, forming the core derived TOC for Schmoker model and 1.7 wt% for Δ*logR* method.

The most recent and current studies focus on estimating the TOC by improving the accuracy of Δ*logR* model [11–13] or by applying machine learning techniques [14–16].

Wang et al. [12] revised the Δ*logR* models and developed new empirical correlations for TOC estimation in Devonian shale formation as a function of the DR, DT, RHOB, and gamma-ray (GR). In their models, Wang et al. [12] suggested to include GR log to enhance TOC estimation, and they used more common thermal indicators such as vitrinite reflectance (*Ro*) or *Tmax* instead of LOM, which simplify the use of Wang et al. [12] models, since the conversion between (*Tmax* or *Ro*) and LOM is not required. Therefore, it reduces the practical problems [17]. Equations (5) and (6) are the revised Δ*logR* models based on sonic and density logs, respectively. Equation (7) could be used to estimate the TOC using Δ*logR* and gamma-ray log:

$$
\Delta \log R = \log\_{10} \left( \frac{R}{R\_{\text{baseline}}} \right) + \frac{1}{\ln 10} \frac{m}{(\Delta t - \Delta t\_m)} \times \left( \Delta t - \Delta t\_{\text{baseline}} \right) \tag{5}
$$

$$
\Delta \log \mathcal{R} = \log\_{10} \left( \frac{\mathcal{R}}{R\_{\text{baseline}}} \right) + \frac{1}{\ln 10} \frac{m}{(\rho\_m - \rho)} \times (\rho - \rho\_{\text{baseline}}) \tag{6}
$$

$$T\text{COC} = \left[a\Lambda \log \mathcal{R} + \beta (\text{GR} - \text{GR}\_{\text{baseline}})\right] \times 10^{(\delta - \eta T\_{\text{max}})}.\tag{7}$$

where Δ*tm* denotes the matrix sonic transit time (μs/ft), *m* represents the cementation exponent, ρ*<sup>m</sup>* and ρ*baseline* are the matrix and baseline densities (g/cm3), where the baseline density corresponds to *Rbaseline* value, α*,* β*,* δ and η are the matrix constants, which are different for different formations and must be determined, *Tmax* is the maturity indicator (◦C), *GRbaseline* is the baseline value of shale (API).

Applying the revised Δ*logR* models into the Devonian shale formation showed an improvement in TOC evaluation with a coefficient of determination (R2) of more than 0.92 compared with R2 of 0.82 when the original Δ*logR* model is used.

Applying any of the previously discussed correlations to evaluate TOC in formations different than the one developed leads to inaccurate predictions. Recently, Mahmoud et al. [18,19] suggested an artificial neural network (ANN)-based correlation for TOC estimation in Barnett formation using conventional well logs. Later on, Elkatatny [20] applied the self-adaptive differential evolution algorithm to optimize Mahmoud et al.'s [18,19] ANN model and he was able to improve the model predictability.

In this study, four artificial intelligence (AI) models were developed to estimate TOC based on the application of the Takagi-Sugeno-Kang fuzzy interference system (TSK-FIS), Mamdani fuzzy interference system (M-FIS), functional neural network (FNN), and support vector machine (SVM). These models use conventional well logs of DR, GR, DT, and RHOB, collected from the Barnett shale formation.

#### *Di*ff*erent Applications of Artificial Intelligence Techniques*

Since the early 1990s, AI techniques had been extensively applied in many scientific and engineering fields, including in the petroleum industry. Nowadays, AI has been used by petroleum engineers and geologists to solve problems related to unconventional hydrocarbon resources evaluation [18–20], reservoir characterization [21,22], bubble point pressure evaluation [23], prediction of real-time change in the rheological parameters of the drilling fluids [24,25], optimization of rate of penetration [26], estimation of rock mechanical parameters [27,28], prediction of pore pressure and fracture pressure [29,30], evaluation of the wellbore casing integrity [31,32], hydrocarbon recovery factor estimation [33,34] optimization of the drilling hydraulics [35], and others. AI techniques have also been applied successfully in other fields like social media [36,37].

#### **2. Methodology**

#### *2.1. Experimental Testing Using Rock-Eval 6*

The core samples collected from Barnett shale (Fort Worth Basin (FWB), North Texas, USA) and Devonian Duvernay shale (Western Canada Sedimentary Basin (WCSB)) were analyzed for TOC estimation. The collected samples were crushed to less than 63 μm, the weight percentage of the pyrolyzable carbon and pyrolyzable mineral-carbon in every sample were first determined by thermally decomposing the sample using the pyrolysis oven. During pyrolysis, the temperature was kept constant at 300◦C for three minutes then increased by 25 ◦C/min to reach 650 ◦C, the flame ionization detector and infrared cells are used to simultaneously detect the hydrocarbons, CO2, and CO. After that, the weight percentages of the residual carbon and oxidized mineral-carbon in every sample were determined by burning them in the oxidation oven at 300 ◦C for 30 seconds, then increasing the temperature up to 850 ◦C at a rate of 25 ◦C/min, and finally keeping the temperature at 850 ◦C for five minutes. More details about sample preparation procedures and considerations for TOC measurement by Rock-Eval 6 were reported by different authors [38–40].

#### *2.2. Proposed Methodology*

In this study, conventional well logs of DR, GR, DT, and RHOB, collected from Barnett shale, are used to train TSK-FIS, M-FIS, FNN, and SVM models to predict the corresponding laboratory-measured TOC. These AI models were used in this study to estimate the TOC because of their already proven high accuracy in evaluating petroleum- and geology-related parameters. A total of 838 data points of core and log data were collected from Barnett shale. Figure 1 shows the log data collected from Barnett shale which is used to develop the models. Different combinations of the design parameters of the AI models were optimized using inserted for loops built-in Matlab. The optimization process of the AI models was continued until the minimum average absolute percentage error (AAPE), and the highest coefficient of determination (R2) and correlation coefficient (R) between the predicted and the core measured TOC are obtained. The trained and optimized AI models were then tested using another set of data from the same well, and validated using data points collected from the Devonian shale formation. TOC predictability of the developed AI models for the validation data collected from Devonian formation was then compared with that of Wang et al. [12] sonic- and density-based models summarized in Equations (5)–(7).

**Figure 1.** Well log data collected from Barnett shale formation to develop the AI models.
