Experimental and Artiﬁcial Intelligence Modelling Study of Oil Palm Trunk Sap Fermentation

: Five major operations for the conversion of lignocellulosic biomasses into bioethanol are pre-treatment, detoxiﬁcation, hydrolysis, fermentation, and distillation. The fermentation process is a signiﬁcant biological step to transform lignocellulose into biofuel. The interactions of biochemical networks and their uncertainty and nonlinearity that occur during fermentation processes are major problems for experts developing accurate bioprocess models. In this study, mechanical processing and pre-treatment on the palm trunk were done before fermentation. Analysis was performed on the fresh palm sap and the fermented sap to determine the composition. The analysis for total sugar content was done using high-performance liquid chromatography (HPLC) and the percentage of alcohols by volume was determined using gas chromatography (GC). A model was also developed for the fermentation process based on the Adaptive-Network-Fuzzy Inference System (ANFIS) combined with particle swarm optimization (PSO) to predict bioethanol production in biomass fermentation of oil palm trunk sap. The model was used to ﬁnd the best experimental conditions to achieve the maximum bioethanol concentration. Graphical sensitivity analysis techniques were also used to identify the most effective parameters in the bioethanol process.


Introduction
Today, biofuel production obtained by the biological fermentation process is an interesting subject in the field of renewable energy. In its economic aspects, the cost of bioethanol production needs to be reduced via fermentation processes. In this view, knowing the optimum experimental conditions and estimation of the bioethanol produced by glucose can be very useful in industrial applications because raw materials as carbon sources must first be converted to glucose before the bioethanol fermentation is performed. The economic analysis of bioethanol production from lignocellulosic biomasses showed the necessity of process optimization due to its high price in the case of large-scale production. The first and vital step to achieve the optimal production from lignocellulosic biomasses is the process modelling study.
Being nonlinear and dynamic are two inherent properties of the fermentation process, which make modelling the proposed process challenging [1]. Significant efforts have been made to examine the mathematical models and propose a methodology as a solution [2][3][4].  [22].
At the beginning of each experiment, the cores of the trunks were shredded into smaller sizes. The weight of the core was measured before and after shredding. A squeezer with double rolls was then used to obtain the oil palm trunk sap (OPTS). The different steps of mechanical pre-treatment on the trunks are shown in Figure 2. The value for each mass was obtained during the processing of palm sap before and after each processing step was performed, for which the weight of each sample was measured. Assuming that the 4 palm trunks were 900 kg on average when felled, we observed  [22].
At the beginning of each experiment, the cores of the trunks were shredded into smaller sizes. The weight of the core was measured before and after shredding. A squeezer with double rolls was then used to obtain the oil palm trunk sap (OPTS). The different steps of mechanical pre-treatment on the trunks are shown in Figure 2.
with the details of peeling. To investigate further, before the commencement of the experiment, all sections of the oil palm trunks were stored to be used after 1, 15, 30 and 45 days of storage, respectively.  [22].
At the beginning of each experiment, the cores of the trunks were shredded into smaller sizes. The weight of the core was measured before and after shredding. A squeezer with double rolls was then used to obtain the oil palm trunk sap (OPTS). The different steps of mechanical pre-treatment on the trunks are shown in Figure 2. The value for each mass was obtained during the processing of palm sap before and after each processing step was performed, for which the weight of each sample was measured. Assuming that the 4 palm trunks were 900 kg on average when felled, we observed The value for each mass was obtained during the processing of palm sap before and after each processing step was performed, for which the weight of each sample was measured. Assuming that the 4 palm trunks were 900 kg on average when felled, we observed that the cored trunk sections reduced in weight as the storage days increased. During pre-treatment, the stored trunk underwent a few steps to produce palm sap. Firstly, the stored trunk was peeled to remove the hard outer bark or wood waste to reveal the softer parenchyma tissue of the cored trunk section. The softer cored trunk sections were shredded into 1-3 mm pieces before being squeezed to produce palm sap. The squeezed fibrous residue may be used for other application but was considered as waste in this work. Table 1 summarises the mass balance calculation for the trunk sections during palm sap production. After the sap had been collected, its residues were weighted for further calculation. The OPTS samples were stored and preserved in containers under −20 • C in a freezer. They were later used in different steps of the experiment to complete the fermentation process. The mass balance calculation indicated that the sap volume reduced during the storage time. As a result, the measured OPTS values were 78.22 L, 163.96 L, 188.41 L, and 309.48 L for 45, 30, 15 and 1 storage days respectively. The noteworthy moisture loss was mainly responsible for the reduction of the OPTS volume with time [21].

Chemical Experiments and Analysis
The analysis for total sugar content was done in the Center of Lipids Engineering and Applied Research (CLEAR) laboratory using high-performance liquid chromatography (HPLC) (1100 series, Agilent Technologies) as well as a refractive index detector with a Shodex SUGAR SP0810 column (NREL, Japan). The alcohol percentage by volume was determined using gas chromatography on a 6890N (Agilent Technologies, USA), which was equipped with a flame ionisation detector and a 7697A headspace sampler as well as a DB-Select-624UI capillary column (30 m × 0.53 mm, 3.00 µm).
A mature (i.e., 25-to 30-year-old) oil palm trunk acts as a source of sap. The sap contains a large volume of sugar and other valuable substances, including amino acids, vitamins, and minerals, as well as organic acids. The moisture content of oil palm trunk sap is reported to be at about 84.2%. Table 2 presents the sugar composition in the palm sap squeezed from the middle area of the palm trunk. The table suggests that glucose is the most prominent sugar of the palm sap and represents 84.2% of the total amount of sugar. The sugar extracted from the palm sap acts as a beneficial source for polyhydroxyalkanoate (PHA) and bioethanol production [23,24]. Oil palm trunk sap contains several kinds of amino acids (0.0198% of the total) and vitamins (0.0665% of the total). Oil palm sap's acidity makes up 0.09706% and is attributed to the multiple organic acids shown in Table 3 [25]. The overall sugar content at various mature oil palm tree heights was studied. It was revealed that the upper part and the inner part of the trunk had the richest moisture content, which reduced moving outwards [26].  As has been shown in Table 4, the increment in sugar content in the first 30 days was large because of the dryness of the trunk sections. The total sugar content in the sap was also almost constant, which was approximately 14 kg/trunk ± 3 kg.   In the yeast fermentation process, the trunk stored for only 1 day was chosen to investigate the effects of both pH and temperature on bioethanol production. The concentration of the substrate, oxygen, and speed rate, as well as time, were considered to be constant in the process. Medium preparation (OPTS) and yeast growth were carried out before commencing the fermentation process. OPTS as a medium was centrifuged at 7000 rpm for 10 min; subsequently, 1.8 L of centrifuged OPTS was used in the fermentation process. A vessel fermenter with a capacity of 2 L was attached, with a pH sensor, antifoam meter condenser, and rubber tubing, and used for the fermentation process. In addition, other equipment included Schott bottles, which were filled with 1 M of sulfuric acid, 1 M sodium hydroxide, and antifoam, along with rubber tubing and membrane filters. The OPTS sample, the fermenter, and the Schott bottles with their contents and attachments were sterilised together using an autoclave (at 121 °C for 15 min). The process of sterilisation ensured that bioethanol production was a result of the yeast that was used (S. cerevisiae), as this process would eliminate organism contamination during fermentation.
To prepare the stock culture and subculture, the equipment and materials used included a refrigerator, an autoclave, an incubator, Petri dishes, agar plates, wire loops, bacteriological agar (HmBg, Germany), Saccharomyces cerevisiae (local), and distilled water were used. Four grams of bacteriological agar mixed in 200 mL distilled water was prepared on the agar plate for yeast growth. The solution was then sterilised at 121 °C for 15 min using an autoclave and was later cooled to reach the temperature of 50-60 °C. Subsequently, Petri dishes were used to gel with the prepared solution at room temperature in In the yeast fermentation process, the trunk stored for only 1 day was chosen to investigate the effects of both pH and temperature on bioethanol production. The concentration of the substrate, oxygen, and speed rate, as well as time, were considered to be constant in the process. Medium preparation (OPTS) and yeast growth were carried out before commencing the fermentation process. OPTS as a medium was centrifuged at 7000 rpm for 10 min; subsequently, 1.8 L of centrifuged OPTS was used in the fermentation process. A vessel fermenter with a capacity of 2 L was attached, with a pH sensor, antifoam meter condenser, and rubber tubing, and used for the fermentation process. In addition, other equipment included Schott bottles, which were filled with 1 M of sulfuric acid, 1 M sodium hydroxide, and antifoam, along with rubber tubing and membrane filters. The OPTS sample, the fermenter, and the Schott bottles with their contents and attachments were sterilised together using an autoclave (at 121 • C for 15 min). The process of sterilisation ensured that bioethanol production was a result of the yeast that was used (S. cerevisiae), as this process would eliminate organism contamination during fermentation.
To prepare the stock culture and subculture, the equipment and materials used included a refrigerator, an autoclave, an incubator, Petri dishes, agar plates, wire loops, bacteriological agar (HmBg, Germany), Saccharomyces cerevisiae (local), and distilled water were used. Four grams of bacteriological agar mixed in 200 mL distilled water was prepared on the agar plate for yeast growth. The solution was then sterilised at 121 • C for 15 min using an autoclave and was later cooled to reach the temperature of 50-60 • C. Subsequently, Petri dishes were used to gel with the prepared solution at room temperature in sterilised conditions. The stock culture was prepared by spreading yeast into the agar plate and subsequently incubated at 30 • C for 24 h in aerobic conditions. To prolong the yeast cells' life, the stock culture was cooled and kept at the temperature of 4 • C in the refrigerator. A sterilised (Bunsen burner) and cooled wire loop was used to transfer (zigzag pattern) a small number of yeast colonies from the stock culture to another agar plate to prepare the subculture, which was incubated at 30 • C for 24 h.
Yeast peptone dextrose (YPD), as a common medium, was used for growing yeast by mixing 20 g/L polypeptone, 10 g/L yeast extract, and 20 g/L glucose, which was then dissolved in 200 mL of distilled water. The obtained YPD mixture was autoclaved at 121 • C for 15 min and then cooled at room temperature for 6 h. Sampling was done every 6 h to determine yeast growth by optical density measurement. A UV-Vis spectrophotometer was used to measure the yeast cell growth in 2 mL of the sample transferred into a 2.5 mL glass cuvette. YPD medium was used to prepare inoculum by transferring a loop of yeast, which was grown in subculture, into YPD. An incubator shaker was used for 18 h to fix the temperature at 30 • C for the inoculum. By the 18th hour, 200 mL (10% v/v) of inoculum which contained yeast seed was added to the prepared OPTS (1.8 L).
All indicators (antifoam, dissolved oxygen, pH, and temperature), as well as the controller of the impeller, were linked to the monitor. A peristaltic pump was used to transfer 200 mL of the inoculum into the fermenter, which was previously filled with 1.8 L of OPTS. The fermentation process commenced after the inoculum was pumped into the fermenter. During the 24-h fermentation time, a sample of approximately 10 mL of fermented sap was taken every 6 h for further analysis. The bioethanol and sugar analyses were repeated twice for each sample [22]. The set-up for the yeast fermentation in the CLEAR laboratory is shown in Figure 4. In the experimental data, the initial sugar concentration and ethanol concentration can be linearly correlated. The actual value of ethanol produced, compared with the theoretical value, ranged from 13 to 43% using the linear correlation derived during yeast fermentation for an initial sugar concentration of 20 g/L to 146 g/L. However, optimisation of the yeast fermentation operating conditions indicated that the highest ethanol yield of 95% was achieved with an initial sugar concentration of 90 g/L.
zag pattern) a small number of yeast colonies from the stock culture to another agar plate to prepare the subculture, which was incubated at 30 °C for 24 h.
Yeast peptone dextrose (YPD), as a common medium, was used for growing yeast by mixing 20 g/L polypeptone, 10 g/L yeast extract, and 20 g/L glucose, which was then dissolved in 200 mL of distilled water. The obtained YPD mixture was autoclaved at 121 °C for 15 min and then cooled at room temperature for 6 h. Sampling was done every 6 h to determine yeast growth by optical density measurement. A UV-Vis spectrophotometer was used to measure the yeast cell growth in 2 mL of the sample transferred into a 2.5 mL glass cuvette. YPD medium was used to prepare inoculum by transferring a loop of yeast, which was grown in subculture, into YPD. An incubator shaker was used for 18 h to fix the temperature at 30 °C for the inoculum. By the 18th hour, 200 mL (10% v/v) of inoculum which contained yeast seed was added to the prepared OPTS (1.8 L).
All indicators (antifoam, dissolved oxygen, pH, and temperature), as well as the controller of the impeller, were linked to the monitor. A peristaltic pump was used to transfer 200 mL of the inoculum into the fermenter, which was previously filled with 1.8 L of OPTS. The fermentation process commenced after the inoculum was pumped into the fermenter. During the 24-h fermentation time, a sample of approximately 10 mL of fermented sap was taken every 6 h for further analysis. The bioethanol and sugar analyses were repeated twice for each sample [22]. The set-up for the yeast fermentation in the CLEAR laboratory is shown in Figure 4. In the experimental data, the initial sugar concentration and ethanol concentration can be linearly correlated. The actual value of ethanol produced, compared with the theoretical value, ranged from 13 to 43% using the linear correlation derived during yeast fermentation for an initial sugar concentration of 20 g/L to 146 g/L. However, optimisation of the yeast fermentation operating conditions indicated that the highest ethanol yield of 95% was achieved with an initial sugar concentration of 90 g/L.

Adaptive Neuro-Fuzzy Inference System
One of the special approaches in the neuro-fuzzy field is the development of adaptive neuro-fuzzy inference systems (ANFIS) that contribute to nonlinear function simulations [28][29][30]. ANFIS is considered to be a hybrid neuro-fuzzy inference expert system that is adaptable with the Takagi-Sugeno-type fuzzy inference system [31] elaborated by Jang [32]. The most common inference system utilised in ANFIS is a first-order Sugeno-type Fuzzy Inference System (FIS) relation command. Throughout the training process, the rule limits, comprising the limits of antecedents and limits of consequents, were adjusted to reduce the output errors to a minimum during the training stage. The procedures can go on without initial knowledge of the consequent parameters. ANFIS can learn the imperative parameters while tuning the membership functions. The structures of an ANFIS and a multilayer feed-forward neural network are alike. However, ANFIS links are capable of showing the signals' flow direction between nodes, while the links are not associated with any weights. Figure 5 shows the ANFIS architecture. Squares indicate adaptive nodes, whereas circles indicate fixed nodes in this figure. There are 5 layers in the architecture of ANFIS. [32]. The most common inference system utilised in ANFIS is a first-order Sugeno-type Fuzzy Inference System (FIS) relation command. Throughout the training process, the rule limits, comprising the limits of antecedents and limits of consequents, were adjusted to reduce the output errors to a minimum during the training stage. The procedures can go on without initial knowledge of the consequent parameters. ANFIS can learn the imperative parameters while tuning the membership functions. The structures of an ANFIS and a multilayer feed-forward neural network are alike. However, ANFIS links are capable of showing the signals' flow direction between nodes, while the links are not associated with any weights. Figure 5 shows the ANFIS architecture. Squares indicate adaptive nodes, whereas circles indicate fixed nodes in this figure. There are 5 layers in the architecture of ANFIS. In ANFIS, by using a learning algorithm and updating the set of parameters, the training dataset is fitted. In this research, the parameters of the ANFIS model were tuned and optimised using particle swarm optimisation.

Particle Swarm Optimisation Method
The particle swarm optimisation (PSO) algorithm is mainly based on the movement of the population of particles as a swarm. This movement was inspired by a school of fish or a flock of birds [33][34][35]. In this method, the candidate solutions are called particles, and the optimal solution is reached by updating generations based on the initial population of candidate solutions [36,37]. This method searches for the best solution by sharing social and historical information among the individual candidate solutions [38,39]. The large number of agents in the PSO method is its foremost advantage over other developed optimisation techniques like simulated annealing. The large number of agents makes the PSO method resilient to the local optimum points of the search space. It helps prevent the algorithm from being trapped in the local optimum points. Leading a swarm to the space x y x y ∑ f 1f1 2f2 Figure 5. Adaptive-Network-Fuzzy Inference System (ANFIS) structure [33].
In ANFIS, by using a learning algorithm and updating the set of parameters, the training dataset is fitted. In this research, the parameters of the ANFIS model were tuned and optimised using particle swarm optimisation.

Particle Swarm Optimisation Method
The particle swarm optimisation (PSO) algorithm is mainly based on the movement of the population of particles as a swarm. This movement was inspired by a school of fish or a flock of birds [33][34][35]. In this method, the candidate solutions are called particles, and the optimal solution is reached by updating generations based on the initial population of candidate solutions [36,37]. This method searches for the best solution by sharing social and historical information among the individual candidate solutions [38,39]. The large number of agents in the PSO method is its foremost advantage over other developed optimisation techniques like simulated annealing. The large number of agents makes the PSO method resilient to the local optimum points of the search space. It helps prevent the algorithm from being trapped in the local optimum points. Leading a swarm to the space that comprises the global optimum depends on some social parameters. Two parameters that have been used in PSO approaches are personal best (Pbest) and global best (Gbest). Figure 6 illustrates a simplified diagram of the PSO method. that comprises the global optimum depends on some social parameters. Two parameters that have been used in PSO approaches are personal best ( ) and global best ( ). Figure 6 illustrates a simplified diagram of the PSO method.

Proposed Modelling of Hybrid ANFIS and PSO
This research used the PSO method as an optimisation technique to determine all the best parameters embodied in the ANFIS model to attain a lower prediction error. The objective function for the proposed method was as follows: is the number of membership functions. Therefore (as mentioned in Equation (1), the objective function of the proposed problem (Equation (2)) can be rewritten as follows:

Proposed Modelling of Hybrid ANFIS and PSO
This research used the PSO method as an optimisation technique to determine all the best parameters embodied in the ANFIS model to attain a lower prediction error. The objective function for the proposed method was as follows: whereF x j1 , x j2 , . . . , x jn is the proposed ANFIS model, x ji (i = 1, . . . , n j = 1, 2, . . . , m) are inputs of the observations for the ANFIS model, Y j (j = 1, 2, . . . , m) are the outputs of observations, m is the number of observations, n is the number of inputs (input features), and N is the number of membership functions. Therefore (as mentioned in Equation (1)), the objective function of the proposed problem (Equation (2)) can be rewritten as follows: where α l i , γ l i , β l i (i = 1, 2, . . . , n and l = 1, 2, . . . , N) are the ANFIS parameters which should be set by the PSO method. All steps to reach the maximum bioethanol are summarised in Figure 7. After the PSO method was run, the best parameters of the ANFIS model were obtained with a minimum error of root mean square error (RMSE), then the proposed model were evaluated by checking the data to prevent overfitting.

Results and Discussion
This research aimed to consider the accurate prediction of the ANFIS model for bioethanol produced in biomass fermentation of oil palm trunk sap. After the ANFIS model (1) Save best experimental conditions to reach maximum ethanol production As mentioned before, there are adjustable parameters in the PSO algorithm such as c 1 , c 2 , and w, which should be adjusted by the user to achieve a better convergence. The constants c 1 and c 2 denote the weights of the acceleration terms that tend to push a particle toward Pbest and Gbest, respectively. Small values allow a particle to roam far from the target regions. Conversely, large values result in the abrupt movement of particles toward the target regions [40]. In this work, the constants c 1 and c 2 were both set to 2, following the typical practice in [41].

Results and Discussion
This research aimed to consider the accurate prediction of the ANFIS model for bioethanol produced in biomass fermentation of oil palm trunk sap. After the ANFIS model was applied for modelling the experimental results, the input parameters were the fermentation time, the pH, temperature, and total sugar, and the output variable was bioethanol produced in the fermentation of oil palm trunk sap. Table 5 summarises the experimental conditions and results. To achieve the aims of this research, all computational programs were written in MATLAB. The first pre-processing process was executed on all data. As presented in [42], without pre-processing, the results of ANFIS models are not considerable, so using a pre-processing function is unavoidable. This study used the Min and Max normalisation method [43] and the principal component analysis (PCA) method [44,45] as pre-processing processes for the experimental dataset. The dataset was then divided randomly into a test dataset (30%) and a training dataset (70%). Figure 8 presents the structure of the best built ANFIS model for the fermentation process. The black nodes on the furthermost left side have been used to represent the inputs in the first layer. There are 40 nodes with the 10 linked membership functions in the second layer so that the fuzzification procedure with the Gaussian membership function is implemented through this layer.

Details of OPT
The OPT was selected from the local plantation, Selangor, Malaysia The OPT was stored 1, 15, 30, 45 days before mechanically squeezing The OPT was 20 feet tall and was divided into four sections: (1) Upper, (2) Middle1, (3) Middle2, and (4) Bottom The OPT sap sample was stored at −20 °C for further analysis By using the membership functions in the first layer, a degree is assigned to each input variable which belongs to a proper fuzzy set. In the second layer or fuzzification layer, the fuzzy sets used in the fuzzy rules' antecedents are represented by neurons. A fuzzification neuron determines a degree for the received crisp inputs to assign each input to the fuzzy set of the neuron. The calculation rules of the fuzzy sets consist of a total of 10 rules, highlighted by the third layer. The fourth layer deals with output membership functions for several rules. The fifth layer is the fourth layer of the output's aggregation. The defuzzification of the output is displayed in the final layer. Figure 9 shows the 10 rules, where the different inputs assigned to the model and the respective output are presented. The production of bioethanol can be predicted by diversifying the parameters used as input variables, which are: fermentation time, pH, temperature, and total sugar in the recommended predictive model. For instance, a set of diversified input values of 0.6 (24 h) for the fermentation time and 1 (6), −1 (25 • C), and −0.9914 (0.6357 g/L) for the pH, temperature, and total sugar, respectively, produced a value of 0.2626 (27.8714 g/L) for bioethanol. The amount of bioethanol from the experiment for this set of input values was 0.0667 (24.3005 g/L). The calculation performed for the error percent highlights an error of 1.646% in predicting the amount of bioethanol production. The red line denotes the normalised input values. Its effect on each rule is highlighted in yellow. The output column denotes the output of each rule. The method of combining the output of each rule and defuzzification to establish an output value is shown in the bottom right output plot.
Membership functions were used for input variables initialised by ANFIS before the training process. To achieve the optimal representation of parameters in the initial membership functions for input and output mapping, the parameters were changed by the training process. New parameters altered the shape of the membership function.
With that in mind, the final membership functions would show dissimilar shapes from the initial membership functions. Figure 10 indicates the shapes of the input membership functions before the training process (initial membership functions) and after the training process (finial membership functions) related to the final ANFIS model. set of input values was 0.0667 (24.3005 g/L). The calculation performed for the error percent highlights an error of 1.646% in predicting the amount of bioethanol production. The red line denotes the normalised input values. Its effect on each rule is highlighted in yellow. The output column denotes the output of each rule. The method of combining the output of each rule and defuzzification to establish an output value is shown in the bottom right output plot. Membership functions were used for input variables initialised by ANFIS before the training process. To achieve the optimal representation of parameters in the initial membership functions for input and output mapping, the parameters were changed by the training process. New parameters altered the shape of the membership function. With that in mind, the final membership functions would show dissimilar shapes from the initial membership functions. Figure 10 indicates the shapes of the input membership functions before the training process (initial membership functions) and after the training process (finial membership functions) related to the final ANFIS model.  The performance of the models was evaluated by three statistical indices, namely mean square error (MSE), root mean square error (RMSE), and the correlation coefficient (R): where y exp is the real output value, y sim is the predicted output value, and N is the number of the experiments; y exp and y sim represent the average of real output and the predicted values, respectively. Figure 11 illustrates the statistical performance of the ANFIS model. The regressions of the training and test datasets for the best model were 1 and 0.9991. Moreover, Table 6 shows the error rates of the proposed model obtained when the normalisation methods were used. The lowest RMSE for the training and test datasets were 1.14 × 10 −6 and 0.0363, respectively. They proved that the validity of the proposed model is acceptable and that the proposed model can be used as a viable predictive model.  Table 6 shows the error rates of the proposed model obtained when the normalisation methods were used. The lowest RMSE for the training and test datasets were 1.14 × 10 −6 and 0.0363, respectively. They proved that the validity of the proposed model is acceptable and that the proposed model can be used as a viable predictive model.

Effect of the Input Variables on the Response
The developed ANFIS model was used to identify the relationship among variables. Figure 12a-f shows the bioethanol production forecasted by the proposed ANFIS model when two effective parameters have been changed in their range, and the other parameters considered as inputs have been kept constant. In the experimental results, 44.1485 g/L was the maximum amount of produced bioethanol and 8.2639 g/L was the amount of sugar content that remained after 18 h of fermentation time at 30 • C, while the pH value was 5.

Optimisation of Experimental Conditions
The proposed ANFIS model was optimised to find the best experimental conditions to get the maximum bioethanol concentration. As mentioned in Equation (1), the objective function of the proposed model can be written as follows:  Figure 12a shows the surface plot for the sugar concentration and time in terms of the bioethanol concentration predicted by the ANFIS model, while the temperature and pH were fixed at 30 • C and 5 respectively. The bioethanol concentration kept increasing to reach the peak point while the sugar content was mitigated by the time. The optimum fermentation time to convert more sugar content into bioethanol could be 14-21 h.
The evolution of bioethanol in terms of the temperature and time is shown in Figure 12b, where all other variables are fixed. Bioethanol production was dependent on the time until it reached the maximum peak point. A visible decrease in bioethanol production happened with time. Time is a more important variable, so changing the temperature from 25 • C to 35 • C had a lesser effect on bioethanol production. The effect of temperature on the fermentation process depends on the background strain's thermal tolerance in the fermentation process. Therefore, the optimal temperature will be changed by using different strains. From this point of view, using a higher temperature than the thermal strain's tolerance prevents strain growth and results in low sugar consumption and, consequently, a low final bioethanol concentration. Figure 12c shows a surface plot for pH and time in terms of the predicted bioethanol concentration. This figure presents the pH as having a significant effect on the bioethanol production at lower limits of time. Figure 12c illustrates the range of precise pH values that lead to the maximum bioethanol production in different fermentation times. The values of pH from 4.4 to 5.6 are the looked-for values to produce maximum bioethanol in almost 12 to 24 h of fermentation.
The surface plot for sugar concentration and pH in terms of the predicted bioethanol concentration in 30 h of fermentation time is shown in Figure 12d and proves that pH changing in the range of 4 to 6 has a significant effect on the fermentation process, while almost more than two-thirds of the sugar was consumed and converted to bioethanol. Moreover, Figure 12d shows that the maximum bioethanol production can be found when the pH is around 5.
Surface plots of temperature and pH are shown in Figure 12e, which shows that changing the temperature in the range of 25 • C to 35 • C has less effect on bioethanol production, while bioethanol production is more dependent on the pH value.
The surface plot concerning the temperature and sugar is shown in Figure 12f. The figure indicates that increasing ethanol production is not dependent on changing the temperature in the range of 25 • C to 35 • C. It proves that this range is the optimum interval for the temperature and leads to producing the maximum volume of bioethanol. Bioethanol production increases until the sugar content is high compared with the presence of low sugar, whereby the bioethanol production keeps decreasing. This could be because of the loss of yeast viability and, consequently, the declining rate of fermentation. In yeast fermentation, the increasing concentration of bioethanol is the most prevalent stress on the cells and can have adverse consequences for fermentation and bioethanol yields [46].

Optimisation of Experimental Conditions
The proposed ANFIS model was optimised to find the best experimental conditions to get the maximum bioethanol concentration. As mentioned in Equation (1), the objective function of the proposed model can be written as follows: where Y is the approximate value of bioethanol and F(X) is the best predicted ANFIS model of the fermentation process so that all parameters were optimised and justified. X is the independent variables' vector in the proposed fermentation process; x i , i = 1, 2, . . . , n are input features of the proposed fermentation process (such as fermentation time, pH, temperature, and the amount of sugar), which should be set; N is the number of membership functions; n is the number of input features; and α l i , γ l i , β l i are ANFIS parameters justified and fixed using the PSO method.
The values of the input variables x i , where i = 1, 2, . . . , n, should be found. The PSO method was utilised to find the maximum bioethanol production because of a circumstance that was never examined in the laboratory as one of the chosen input variables. Table 7 shows the PSO optimisation results for the fermentation processes. The results of the PSO method showed that the maximum concentration of bioethanol was achieved in almost 16-18 h when the values of pH and temperature were fixed at 4.54 and 27.34 • C, respectively.

Sensitivity Analysis
The model outputs are sensitive to changes in the input variables. Information about these sensitivities is very useful for monitoring and improving the studied processes. This information can be achieved by using different sensitivity analysis methods. The graphical method is one of methods and was applied to examine the sensitivity of the outputs to the changes in each input variable. In this method, the effect of each input parameter on bioethanol concentration was studied separately by the prepared scatter graphs. For more description, an input parameter was selected and changed by ±5%, while the other variables were kept constant. The sensitivity of the selected input parameter using the obtained neuro-fuzzy models was then investigated. The sensitivity analysis diagram for the model is shown in Figure 13. In Figure 14a,b, the grey plots have the most variation rather than the other plots showing that pH has a more significant effect on bioethanol concentration in comparison with temperature and sugar content. At the second level, the temperature can be considered an important parameter controlling the fermentation process.

Conclusions
In this research, first, palm oil trunk sap (as a new and noticeable source for producing bioethanol in Malaysia) was prepared and fermented in the CLEAR laboratory by using the fermentation set-up. Attempts were made to design an optimised ANFIS model to predict and simulate the bioethanol concentration in the fermentation of oil palm trunk sap, which was tuned and optimised using the PSO method. The four input variables were the fermentation time, the amount of total sugar, temperature, and pH. The results showed the coefficient of determination, mean square error, and root mean square error between the experimental and predicted values as follows: 0.9991, 0.0013, and 0.0363, respectively. The optimum experimental conditions to reach maximum bioethanol production were 27.34 • C, 4.54 pH, and 16.18 h, while 1.3588 g/L sugar remained.
The findings demonstrated that the proposed ANFIS model is a valuable model that can be used to predict the bioethanol concentration in the fermentation process. It could be applied by scientists and engineers to predict the amount of bioethanol concentration under various conditions without performing real experimental measurements. Prediction of bioethanol produced in other nonfood fermentation processes (such as corn stover and palm oil plantations) by the proposed model will be done as later research.

Conflicts of Interest:
The authors declare no conflict of interest. Tabulated and cited literature data suffice for the reproduction of all original simulation and optimisation results, and no other supporting data are required to ensure reproducibility.