1 Introduction

Anaerobic digestion (AD) is one of the key technology adopted by the growing agro-industries to effectively manage the waste produced [1, 2]. These industries produce a huge quantity of effluents having high organic content. Proper treatment of these effluents by AD plants not only generates bioenergy from it, but also reduces their adverse impact on the environment. Along with organic manure and fertilizer, methane-rich biogas is produced as an end product by these AD plants. Biogas has methane as the major component (55–75%) [3]. However, the quantity and quality of biogas depend on temperature, effective volume, volatile solid concentration, and methanogens [3,4,5].

Continuous online monitoring of substrate composition and coordinated control of AD are essential for high methane yield [6, 7]. However, the designing of a coordinated control system for a complex process like AD is a challenging task. The reasons behind the complexity are the uncertainties, non-linear behavior, and large time delays [8]. In addition, methane production using the AD method is a very slow process [9, 10]. Thus, methane production is hard to control using conventional control methods employing traditional sensors because of large and dynamic time delays [8, 11]. Intelligent soft sensors can aid control schemes and monitoring schemes in handling these issues.

Intelligent sensors including Adaptive Neural Fuzzy Inference System (ANFIS), Artificial Neural Network (ANN), Unscented Kalman Filter (UKF), and Response Surface Methodology (RSM) have been developed for variety of purposes [12]. Some of the application areas and the purposes for intelligent sensors are summarized in Table 1.

Table 1 An overview of the applications of soft-sensors

In most of the reported literature, it is proposed to estimate, predict, or forecast the methane yield rather than to control it. However, the control of crucial parameters influencing the methane yield is essential to control methane yield. It is a well-known fact that the methane yield is highly dependent on the concentration of volatile solids, hydraulic retention period, and operating temperatures [23]. Furthermore, among various operating parameters, the influent total volatile solids (VS), digester operating temperature (Td), and hydraulic retention period (B) are independent parameters that may affect the methane yield [13].

Control over the concentration of volatile solids and hydraulic retention period is very complex as compared to the control of digester temperature [24]. Therefore, the desired methane yield may be achieved by operating the digester at a temperature value determined based on the concentration of volatile solids and hydraulic retention period. Therefore, an inferential control strategy is presented in this paper to obtain desired methane yield. The digester is operated at optimum temperature value according to the required methane yield, volatile solids, and hydraulic retention period determined by ANN.

The temperature of the digester is varied using a flow valve control method with a proportional integral derivative controller with a derivative filter (PIDF). The gains of the PIDF controller are optimized by the bacterial foraging-particle swarm optimization (BF-PSO) technique. The complete schematic of the conventional AD process and proposed inferential control strategy for methane yield production is presented in Fig. 1. Furthermore, in the proposed inferential control strategy, a temperature sensorless method is used to control the temperature of the digester.

Fig. 1
figure 1

Schematic of AD process control strategy: a conventional [13] and b inferential

In this paper, the research methodology is presented in Section 2, and the obtained results from the proposed control strategy are presented in Section 3. The conclusion and future scope are presented in Section 4.

2 Research methodology

2.1 Anaerobic digester

The anaerobic digester model is modeled in MATLAB/Simulink 2021a to conduct the analysis [25,26,27]. The reference values of all the parameters used are presented in Table 2. The methane production rate (σ) can be obtained by following the simplified AD model [26].

Table 2 Reference values for the parameters of the AD model
$$\upsigma =\frac{{\mathrm{U}}_{0}\times \mathrm{VS}}{\mathrm{B}}\left\{ 1-\frac{\mathrm{C}}{{(\upmu }_{\mathrm{m}}\times \mathrm{B})-1+\mathrm{C}}\right\}$$
(1)

Here, U0 is the ultimate methane yield (L(CH4)/g (VS)), VS is influent total volatile solids (g (VS)/L(slurry)), B is the hydraulic retention period (days), µm is the growth rate of methanogens, and C is the kinetic constant. The growth rate of methanogens depends on the operating temperature (Td) (°C) of the digester which can be calculated by Eq. (2) [28]:

$${\upmu }_{\mathrm{m}}=\left(0.013\times {\mathrm{T}}_{\mathrm{d}}\right)-0.129$$
(2)

For the production of the required quantity of methane (VCH4) (m3), the effective volume of the digester (Vr) (m3) can be calculated by Eq. (3) [26]:

$${\mathrm{V}}_{\mathrm{r}}=\frac{{\mathrm{V}}_{\mathrm{CH}4}}{\upsigma }$$
(3)

whereas, the required flow rate of influent slurry (Fr) (m3/h) can be determined by the Eq. (4) [26]:

$${\mathrm{F}}_{\mathrm{r}}=\frac{{\mathrm{V}}_{\mathrm{r}}}{24\times \mathrm{B}}$$
(4)

2.2 Data preparation

A data set of 525 values of methane yield was generated. The data set was generated by considering the variations in volatile solids (VS), digester operating temperature (Td), and hydraulic retention period (B). The dataset has been created by randomly generating the values of the considered parameters in ranges mentioned in Table 2. The AD model used to generate the dataset is presented by Eq. 1.

2.3 Design of ANFIS-based soft-sensor

ANFIS is an amalgamation of ANN and fuzzy logic with the Takagi–Sugeno inference system. The advantages and potential of both systems are presented in a single framework. Its inference system corresponds to a set of fuzzy if–then rules, with the learning and predictive ability of nonlinear functions [29,30,31]. In this work, ANFIS is used to determine the temperature at which the digester must be operated to obtain specific methane yield according to total volatile solids (VS) and hydraulic retention period (B). There are three inputs to ANFIS and one output, i.e., desired methane yield, hydraulic retention period, total volatile solids, and temperature, respectively (Fig. 2). The structure of the proposed ANFIS model is presented in Fig. 3. The root mean square error (RMSE) is minimized while training ANFIS and can be expressed as:

$$\mathrm{RMSE}=\sqrt{\frac{\sum_{\mathrm z=1}^{{\mathrm z}_{\mathrm n}}{({\mathrm x}_{\mathrm z}{-\widehat{\mathrm x}}_{\mathrm z})}^2}{{\mathrm z}_{\mathrm n}}}$$
(5)

here, zn is the number of data points, xz is the actual observation time series, and \({\widehat{x}}_{z}\) is the estimated time series data.

Fig. 2
figure 2

Architecture of ANFIS model

Fig. 3
figure 3

Structure of ANFIS model with 42 fuzzy rules and 342 nodes

2.3.1 ANFIS training

A data set of 525 values generated using Eq. 1 has been used to train ANFIS for determining the temperature at which the digester must be operated to obtain the required methane yield based on total volatile solids and hydraulic retention time. The optimization method used while training ANFIS is an amalgamation of the backpropagation and least square method [32]. The backpropagation method is used to train input membership functions, whereas the least square method is used to train the output membership functions of ANFIS. The trained membership functions of ANFIS are presented in Fig. 4. Five bell-shaped membership functions are considered for each input. All membership functions are satisfying the minimum 50% overlap condition to avoid indecisive behavior from fuzzy logic.

Fig. 4
figure 4

Trained ANFIS membership function for a required methane yield, b hydraulic retention period, and c total volatile solids

The trained ruleset is presented by the surface plot in Fig. 5. The surface plot represents the variation in temperature with variation in required methane yield, VS, and B.

Fig. 5
figure 5

Surface plot for variation in temperature with variation in a required methane yield and B, b required methane yield and VS, and c VS and B

Response of ANFIS training for minimum root mean square error (RMSE) equal to 0.01904 is shown in Fig. 6.

Fig. 6
figure 6

Training error for ANFIS

In Fig. 7, the trained output obtained against the training data is presented. From the response, it can be observed that the trained ANFIS output is almost mapping with the training data. No considerable deviation in ANFIS output from actual data is observed. To maintain accuracy, a large sample size is taken for the training purpose. In Fig. 8, the regression plot of ANFIS training is presented. The achieved R2 for training, validation, testing, and overall are 1, 0.99961, 0.99742, and 0.99950, respectively.

Fig. 7
figure 7

ANFIS trained output vs ANFIS training data

Fig. 8
figure 8

Regression plot for ANFIS a training, b validation, c testing, and d overall

2.4 Design of ANN-based soft-sensor

A collection of connected trained neurons that act as an artificial brain is called artificial neural network (ANN). ANN has the learning and predictive ability of nonlinear functions. ANN consists of three layers, i.e., input layer, hidden layer, and output layer [13, 33]. In the present work, there are three inputs in the input layer, i.e., required methane yield, hydraulic retention period (B), and total volatile solids (VS). The number of neurons in the hidden layer has been selected based on the dimension of input and the number of training pairs. The equation presented below has been used to calculate the adequate number of neurons in the hidden layer (Hn).

$${\mathrm H}_{\mathrm n}={\mathrm C}_{\mathrm n}\times\sqrt{\frac{{\mathrm N}_{\mathrm d}}{{\mathrm I}_{\mathrm m}\times{\mathrm{logN}}_{\mathrm d}}}$$
(6)

here, Cn is a constant, Nd is the number of data pairs, and Im is the dimension of input. When the ratio of Nd and Im is greater than 30, the value of C is either 1 or 2 [34, 35]. Here, in the hidden layer, there are twenty neurons.

The transfer function of the hidden layer is of the tan-sigmoidal (TANSIG) type for proper adaptability. The output layer has one neuron and has a pure linear (PURELIN) transfer function. The type of network is the feed-forward backdrop. The network uses the most popular Levenberg–Marquardt backpropagation algorithm for training purposes [13, 36]. Moreover, gradient descent with momentum weight and bias learning function has been used. An error is generated by comparing the model output with the desired output and sent back to the hidden and input layer for training. The training ends when the error is reduced to a user-defined value, i.e., zero. From the dataset of 525 values, 75% of these were kept for training and the remaining for validation and testing. The performance of the designed network is judged based on the mean square error (MSE) given in Eq. (7).

$$\mathrm{MSE}=\frac1{{\mathrm z}_{\mathrm n}}\sum\limits_{\mathrm z=1}^{{\mathrm z}_{\mathrm n}}{({\mathrm y}_{\mathrm z}-{\widehat{\mathrm y}}_{\mathrm z})}^2$$
(7)

2.4.1 Post training data of ANN

The designed ANN is presented in Fig. 9. The training of ANN has been conducted with 20, 15, and 10 neurons. Best validation performance for mean square error (MSE) of 3.5221 × 10−04 is obtained at epoch 906 with 20 neurons (Table 3) (Fig. 10). The regression plot obtained after training shows a perfect fit (R = 1) of data in the case of training, validation, testing, and overall with 20 neurons (Fig. 11).

Fig. 9
figure 9

The architecture of the proposed ANN

Table 3 Comparison table for variation in the number of neurons in the hidden layer
Fig. 10
figure 10

Performance of ANN in terms of mean squared error with a 20 neurons, b 15 neurons, and c 10 neurons

Fig. 11
figure 11

Regression plot for 20 neurons: a training, b validation, c testing, and d overall

2.5 Temperature control system

AD plant is operated on the temperatures decided by ANFIS and ANN separately. The temperature of the digester is regulated by the PIDF controller-based flow valve control method. A smith predictor has also been used to increase the stability and improve the performance of the temperature control system. The parameters of the PID controller (i.e., KP, KI, and KD) have been estimated by the bacterial foraging-particle swarm optimization (BF-PSO) technique, by minimizing integral time absolute error (ITAE). ITAE has been used due to its advantage of integral time factor over integral square error (ISE) and integral absolute error (IAE). The ITAE produces minimum overshoot with low rise time and settling time [37]. The heating coil, temperature sensor, and actuator have first order plus time-delay (FOPTD) transfer functions. The schematic of the conventional temperature control strategy and the proposed control strategy is presented in Fig. 12. Furthermore, in the proposed inferential control strategy, instead of using a temperature sensor for temperature control of the digester, the digester temperature is calculated by the following equation:

Fig. 12
figure 12

Diagram for a conventional temperature control strategy with smith predictor. b Proposed “temperature sensorless” temperature control strategy with smith predictor

$$\frac{\frac{\frac{{\mathrm U}_0\times\mathrm{VS}\times\mathrm C}{\left({\mathrm U}_0\times\mathrm{VS}\right)-\left(\mathrm B\times\upsigma\right)}+1-\mathrm C}{\mathrm B}+0.129}{0.013}={\mathrm T}_{\mathrm d}$$
(8)

2.5.1 PID controller with derivative filter (PIDF)

It has been reported in the literature that the conventional PID controllers can introduce undesirable vibrations in the actuator and valve under dynamic conditions [38]. Therefore, to overcome the oscillatory response, a filter is added in series with the derivative term used. It acts as a low pass filter that restricts the high-frequency derivative gains and noises. The PID controller with a derivative filter can be designed using Eqs. (9) and (10). The structure of the PIDF controller is presented in Fig. 13.

Fig. 13
figure 13

Structure of PID controller with derivative filter (PIDF)

$$\mathrm{U}\left(\mathrm{s}\right)={\mathrm{K}}_{\mathrm{P}}\times \mathrm{E}\left(\mathrm{s}\right)+{\mathrm{K}}_{\mathrm{i}}\times \frac{\mathrm{E}\left(\mathrm{s}\right)}{\mathrm{s}}+{\mathrm{K}}_{\mathrm{d}}\times \widehat{\mathrm{E}}\left(\mathrm{s}\right)\times \frac{{\mathrm{K}}_{\mathrm{n}}\mathrm{s}}{\mathrm{s}+{\mathrm{K}}_{\mathrm{n}}}$$
(9)
$${\mathrm{K}}_{\mathrm{n}}=\frac{2\times {\mathrm{K}}_{\mathrm{P}}}{{\mathrm{K}}_{\mathrm{d}}}$$
(10)

2.5.2 Bacterial foraging-particle swarm optimization (BF-PSO)

The BF-PSO is an amalgamation of two optimization algorithms, i.e., particle swarm optimization (PSO) and bacterial foraging (BF). Hybridization overcomes the drawback of bacterial foraging and particle swarm optimization (PSO), i.e., delay in reaching optimal solutions due to extreme random search directions and entanglement in local solutions, respectively. The BF-PSO enhances the convergence speed and eliminates local solution entanglement [39, 40]. The flowchart for BF-PSO algorithm is given below in Fig. 14:

Fig. 14
figure 14

Flowchart for BF-PSO optimization algorithm

Responses for achieving desired fitness value for different optimization algorithms are shown in Fig. 11. From Fig. 15, it is evident that the integral time absolute error (ITAE) parameter is low for the bacterial foraging-particle swarm optimization algorithm (BF-PSO) compared to the genetic optimization algorithm (GA) and particle swarm optimization (PSO). The elapsed time during training for BF-PSO, PSO, and GA is 12.15 min, 13.4 min, and 15.5 min, respectively, for 100 iterations in MATLAB Simulink 2021a. Furthermore, from Fig. 15, it can be observed that the optimum result is obtained at the 59th iteration in the case of the BF-PSO algorithm.

Fig. 15
figure 15

Graph for fitness value

2.6 Inferential control of methane yield

An inferential control strategy to obtain constant methane yield under variable solid concentration and hydraulic retention period is proposed in this research. Here, the desired methane yield is achieved by operating the digester at a temperature value determined based on the concentration of volatile solids and hydraulic retention period. The digester temperature is controlled by using a flow valve control. A PIDF controller is used to regulate the flow of hot fluid to control the temperature of the digester. The gains of the PIDF controller are obtained by the bacterial foraging-particle swarm optimization (BF-PSO) technique. Furthermore, in the proposed inferential control strategy, instead of using a temperature sensor for temperature control of the digester, the digester temperature is calculated by the following equation. The proposed inferential control strategy for methane yield is presented in Fig. 16.

Fig. 16
figure 16

Schematic of the proposed inferential control strategy for AD plant

3 Results and discussions

The system under consideration is simulated for different operating conditions. The key results obtained are as follows:

3.1 ANFIS and ANN accuracy

From Fig. 17, it can be observed that the error in trained output values is very less in ANN with 20 neurons, whereas the error in trained output values is higher in ANFIS compared to ANN. Furthermore, a comparison between training performances of ANFIS and ANN is presented in Table 4. From Fig. 17 and Table 4, it can be said that the accuracy of ANN is higher compared to ANFIS.

Fig. 17
figure 17

Error in the trained output value of ANFIS and ANN

Table 4 Comparison between training performances of ANFIS and ANN

3.2 Sensitivity analysis of AD plant

The effect of volatile solids (VS), hydraulic retention period (B), and digester operating temperature (Td) on methane yield is analyzed by using a sensitivity analyzer application on the AD model simulated in MATLAB/Simulink 2021a. From Figs. 18, 19, and 20, it can be concluded that the maximum methane yield can be obtained at a thermophilic temperature of around 55 °C. Meanwhile, the hydraulic retention period (B) must be kept for around 4 days and the concentration of total volatile solids must be kept at around 60 g/L.

Fig. 18
figure 18

Effect of variation in hydraulic retention period on methane yield while operating digester at 45 °C, 60 °C, and VS = 60

Fig. 19
figure 19

Effect of variation in temperature on methane yield while operating digester at B = 4, 5 days, and VS = 60

Fig. 20
figure 20

Effect of variation in total volatile solids on methane yield while operating digester at temperature = 45 °C, 60 °C; B = 1.7, 4, 5 days

3.3 Methane yield during controlled temperature

Response of the AD plant obtained during variations in the concentration of volatile solids and hydraulic retention period is observed. The temperature of the digester is varied according to the reference temperature obtained from the proposed ANN. To examine the performance of the proposed control, the developed simulation model has been tested for the following realistic cases of variation in total volatile solids (VS) and hydraulic retention period (B) for a stabilized production of methane, i.e., 2.9 (m3/m3 of digester). The considered test conditions are presented in Fig. 21. The study is divided into four cases on a time scale as follows:

  • Case-1: When VS = 58, B = 4, and required methane yield=2.9 (0-200h)

  • Case-2: When VS = 58, B = 3, and required methane yield=2.9 (200-400 h)

  • Case-3: When VS = 60, B = 4, and required methane yield=2.9 (600-800 h)

  • Case-4: When VS = 59, B = 3, and required methane yield=2.9 (1200-1400 h)

Fig. 21
figure 21

Variation in a total volatile solids and b hydraulic retention period with the constant requirement of methane yield

For the abovementioned cases, the variation in digester operating temperature, hot fluid flow rate, heat energy requirement, the growth rate of methanogens, digester effective volume, required feed flow rate, and volumetric methane yield has been studied.

  • Case-1:  When VS = 58, B = 4, and required methane yield = 2.9 (0-200 h)

This case occurs during 0–200 h, 400–500 h, 800–1200 h, and 1400–1500 h. From Figs. 22 for this case, it can be observed that the reference temperature obtained by ANFIS and ANN is 57.925 °C and 58.021 °C, respectively. If the AD is operated at the reference temperature obtained from ANFIS and ANN, then the desired methane yield of 2.9 (m3/m3 of digester) can be achieved when VS is 58 and B is 4. In constant temperature operation, the thermophilic set-point temperature 55 °C is considered. The obtained methane yield from the digester, in this case, is 2.897 m3, 2.901 m3, and 2.779 m3 in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 29). Deviation of methane yield from set-point can be observed in Fig. 30. It can be observed that the desired methane yield is achieved when the digester is operated at the reference temperature obtained from ANN. However, the methane yield obtained during the operation of the digester at the reference temperature obtained by ANFIS is less than a marginal difference. This marginal difference is due to lower reference temperature from ANFIS compared to ANN.

To maintain a higher temperature, higher hot fluid flow rate is required to meet higher heat energy demands [41]. In this case, the total heat energy required to maintain the reference temperature obtained by ANFIS, ANN, and constant temperature operation is 19.53 kJ/h, 19.62 kJ/h, and 16.89 kJ/h (Fig. 25), respectively. The hot fluid flow rate required to maintain the reference temperature obtained by ANFIS, ANN, and constant temperature operation is 0.12745 m3/h, 0.12765 m3/h, and 0.12101 m3/h, respectively (Fig. 24). The higher the flow rate of hot fluid, the lower the rise time and settling time. From Fig. 23, it can be observed that the rise time to achieve the reference temperature obtained by ANN, ANFIS, and constant temperature operation is 2.915 h, 2.935 h, and 2.992 h, respectively. Whereas, the settling time is 4.953 h, 5.061 h, and 5.093 h, respectively. Peak overshoot is zero in all temperature control schemes. The digester operating temperature decides the growth rate of enzymes, feed rate, and digester effective volume.

The growth rate of methanogens is 0.624, 0.626, and 0.586 when the reference temperature is obtained by ANN, ANFIS, and constant temperature operation, respectively (Fig. 26). The higher growth rate of methanogens represents a rapid conversion of substrate into methane. To produce the desired methane yield, the effective volume of the substrate inside the digester must be 28.995 m3, 28.955 m3, and 30.226 m3 for the reference temperature which are obtained by ANN, ANFIS, and constant temperature operation, respectively (Fig. 27). To achieve the required effective volume of the substrate in the digester, a specific feed rate is required. The required feed rate in the digester is 0.0755 m3/h, 0.0754 m3/h, and 0.0785 m3/h in the case for the reference temperature which are obtained by ANN, ANFIS, and constant temperature operation, respectively (Fig. 28).

  • Case-2: When VS = 58, B = 3, and required methane yield = 2.9 (200-400 h)

For this case, the temperature set-point determined by ANFIS is 55.92 °C whereas the temperature set-point determined by ANN is 55.91 °C (Fig. 22). From Fig. 23, it can be observed that the temperature control has a similar performance to case-1 in this case. ANN has a better rise and settling time compared to ANFIS. In constant temperature operation, the set-point is 55 °C. The flow rate of hot fluid is used to control the temperature of the digester. The flow rate of hot fluid is 0.12305 m3/h, 0.12303 m3/h, and 0.12101 m3/h in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 24). The total required heat energy to maintain the temperature inside the digester is 17.712 kJ/h, 17.704 kJ/h, and 16.89 kJ/h in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 25). The growth rate of methanogens depends on the digester operating temperature. The growth rate of methanogens is 0.598, 0.597, and 0.586 in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 26). There is a variation in required digester effective volume due to variation in methane yield because the total volatile solids and hydraulic retention period are variable. In this case, the required volume of the digester is 21.725 m3, 21.730 m3, and 30.22 6m3 in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 27). There is a variation in the required feed flow rate due to variation in methane yield because the total volatile solids and hydraulic retention period are variable. In this case, the required volume of the digester is 0.10058 m3/h, 0.10060 m3/h, and 0.0787 m3/h in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 28). The obtained methane yield from the digester, in this case, is 2.8999 m3, 2.8994m3, and 2.8284 m3 in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 29). Deviation of methane yield from set-point can be observed in Fig. 30.

  • Case-3:   When VS = 60, B = 4, and required methane yield = 2.9 (600-800 h)

Fig. 22
figure 22

Graph for temperature set-point produced from ANFIS and ANN compared with constant temperature operation

Fig. 23
figure 23

Graph for controlled output temperature according to set-point temperature produced from ANFIS and ANN compared with constant temperature operation

Fig. 24
figure 24

Graph for variation in hot fluid flow rate due variation in temperature set-point produced from ANFIS and ANN compared with constant temperature operation

Fig. 25
figure 25

Graph for variation in required heat energy due to variation in temperature set-point produced from ANFIS and ANN compared with constant temperature operation

Fig. 26
figure 26

Graph for variation in the growth rate of methanogens due to variation in temperature set-point produced from ANFIS and ANN compared with constant temperature operation

Fig. 27
figure 27

Graph for variation in digester effective volume due to variation in temperature set-point produced from ANFIS and ANN compared with constant temperature operation

Fig. 28
figure 28

Graph for variation in required feed flow rate due variation in temperature set-point produced from ANFIS and ANN compared with constant temperature operation

Fig. 29
figure 29

Graph for variation in volumetric methane yield due to variation in temperature set-point produced from ANFIS and ANN compared with constant temperature operation

Fig. 30
figure 30

Graph for variation in error in volumetric methane yield due to variation in temperature set-point produced from ANFIS and ANN compared with constant temperature operation

For this case, the temperature set-point determined by ANFIS is 55.402 °C whereas the temperature set-point determined by ANN is 55.579 °C (Fig. 22). From Fig. 23, it can be observed that the system with ANN exhibits the similar performance to case-1. In constant temperature operation, the set-point is 55 °C. The flow rate of hot fluid is used to control the temperature of the digester. The flow rate of hot fluid is 0.1219 m3/h, 0.1223 m3/h, and 0.1210 m3/h in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 24). The total required heat energy to maintain the temperature inside the digester is 17.25 kJ/h, 17.45 kJ/h, and 16.89 kJ/h in the case of ANN, ANFIS, and constant temperature operation, respectively (Fig. 25). The growth rate of methanogens depends on the digester operating temperature. The growth rate of methanogens is 0.591, 0.594, and 0.586 in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 26). There is a variation in required digester effective volume due to variation in methane yield because the total volatile solids and hydraulic retention period are variable. In this case, the required volume of the digester is 29.041 m3, 29.961 m3, and 29.218m3 in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 27). There is a variation in the required feed flow rate due to variation in methane yield because the total volatile solids and hydraulic retention period are variable. In this case, the required volume of the digester is 0.0756 m3/h, 0.0754 m3/h, and 0.0761 m3/h in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 28). The obtained methane yield from the digester, in this case, is 2.8926 m3, 2.9004 m3, and 2.8749 m3 in the case of ANFIS, ANN, and constant temperature operation, respectively Fig. 29. Deviation of methane yield from set-point can be observed in Fig. 30.

  • Case-4:   When VS = 59, B = 3, and required methane yield = 2.9 (1200-1400 h)

For this case, the temperature set-point determined by ANFIS is 55.26 °C whereas the temperature set-point determined by ANN is 55.28 °C (Fig. 22). From Fig. 23, it can be observed that the system with ANN exhibits the similar performance to case-1. In constant temperature operation, the set-point is 55 °C. The flow rate of hot fluid is used to control the temperature of the digester. The flow rate of hot fluid is 0.1215 m3/h, 0.1216 m3/h, and 0.1210 m3/h in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 24). The total required heat energy to maintain the temperature inside the digester is 17.128 kJ/h, 17.142 kJ/h, and 16.89 kJ/h in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 25). The growth rate of methanogens depends on the digester operating temperature. The growth rate of methanogens is 0.5894, 0.5896, and 0.586 in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 26). There is a variation in required digester effective volume due to variation in methane yield because the total volatile solids and hydraulic retention period are variable. In this case, the required volume of the digester is 21.737 m3, 21.728 m3, and 21.899 m3 in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 27). There is a variation in the required feed flow rate due to variation in methane yield because the total volatile solids and hydraulic retention period are variable. In this case, the required volume of the digester is 0.1007 m3/h, 0.10060 m3/h, and 0.1014 m3/h in the case of ANFIS, ANN, and constant temperature operation, respectively (Fig. 28). The obtained methane yield from the digester, in this case, is 2.8982 m3, 2.8994 m3, and 2.8772 m3 in the case of ANFIS, ANN, and constant temperature operation, respectively Fig. 29. Deviation of methane yield from set-point can be observed in Fig. 30.

From the results, it can be observed that the methane yield is closer to the set-point in the inferential control with ANN compared to ANFIS (Figs. 29 and 30). Uncontrolled methane yield is lower compared to inferential control of methane yield with ANFIS and ANN, with the same total volatile solid concentration and hydraulic retention period. The temperature set-point obtained by ANFIS and ANN is higher than 55 °C (constant temperature operation) (Figs. 22 and 23). Due to this, the hot fluid flow rate (Fig. 24) and required heat energy (Fig. 25) are a little bit higher. But the growth rate of methanogens (Fig. 26) is better in the inferential control with ANFIS and ANN. The digester effective volume (Fig. 27) and feed flow rate (Fig. 28) are lower in the inferential control with ANFIS and ANN than in the conventional uncontrolled operation because the digester operating temperature is higher in the inferential control with ANFIS and ANN.

The temperature sensor has been replaced by an equation in the temperature control loop in the proposed control strategy. From the results, it can be observed that the equation is determining the digester temperature accurately (Fig. 23).

4 Conclusion and future scope

In this paper, an inferential control strategy has been proposed to control the methane yield. The desired methane yield is achieved by operating the digester at a temperature value determined based on the concentration of volatile solids and hydraulic retention period by ANFIS and ANN, for a stable heat and power generation. From the results, it is evident that the proposed inferential control strategy is effectively controlling the methane yield. The performance of ANN is better compared to ANFIS. The temperature control with the PIDF controller tuned with the BF-PSO optimization algorithm is working efficiently. Temperature control without a temperature sensor is performing very similar to temperature control with a temperature sensor. The heat energy requirement varies according to the digester operating temperature. The proposed strategy increases and stabilizes the methane yield. Furthermore, it allows the operator to achieve the desired level of methane yield. The proposed strategy makes the AD plant more energy efficient. The proposed control strategy was simulated in MATLAB/Simulink 2021a environment. However, exploring the exergy with the proposed strategy will be interesting.