HOME JOURNALS CONTACT

Journal of Applied Sciences

Year: 2010 | Volume: 10 | Issue: 12 | Page No.: 1019-1027
DOI: 10.3923/jas.2010.1019.1027
Multivariable Adaptive Predictive Model Based Control of a Biodiesel Transesterification Reactor
Y.K. Ho, F.S. Mjalli and H.K. Yeoh

Abstract: To control biodiesel reactors with complex and highly nonlinear dynamics, the controller must be able to handle multivariable problems as well as to adapt to time-varying dynamics. In this work, a multivariable adaptive predictive model based control (i.e., the centralized adaptive Generalized Predictive Control, GPC) strategy was simulated on a validated mechanistic transesterification model. The Recursive Least Squares (RLS) algorithm was used for process model adaptation in the GPC framework. Simulation results revealed the superiority of the proposed centralized adaptive predictive control scheme as compared to the decentralized conventional PID controllers in terms of set point tracking, process interactions handling and resultant controller moves. Good load disturbance rejection properties were also demonstrated by the proposed control scheme.

Fulltext PDF Fulltext HTML

How to cite this article
Y.K. Ho, F.S. Mjalli and H.K. Yeoh, 2010. Multivariable Adaptive Predictive Model Based Control of a Biodiesel Transesterification Reactor. Journal of Applied Sciences, 10: 1019-1027.

Keywords: Biodiesel, adaptive predictive control, centralized adaptive GPC, generalized predictive control, recursive least squares and transesterification reactor

INTRODUCTION

In any typical biodiesel production plant (as shown in Fig. 1, Tapasvi et al., 2004), the biodiesel reactor is the most crucial unit operation to be controlled as any drift in the standard operating conditions will upset the entire production. Recent studies on the control of biodiesel reactors have been focused on the design and implementation of decentralized process control strategies, where multiple Single Input Single Output (SISO) control loops are implemented simultaneously on the biodiesel reactor (Mjalli and Hussain, 2009; Mjalli et al., 2009). As with all decentralized process control strategies, the downside of these approaches lies in the inability of the decentralized controllers to handle loop interactions in a systematic and efficient manner. In cases where loop interactions are severe, decoupling techniques are implemented to eliminate interactions between control loops.

Fig. 1: Simplified schematic of the biodiesel production process (Tapasvi et al., 2004)

However, it is not guaranteed that these techniques contribute positively to the overall performance of the decentralized control scheme (Seborg et al., 2004). Moreover, the design of decentralized control systems requires cumbersome loop pairing efforts. In biodiesel reactors, where the underlying control problem is multivariable in nature (Mjalli and Hussain, 2009; Mjalli et al., 2009), a general multivariable control strategy, viz., a centralized controller, is a more suitable approach to handle process interactions systematically. In this study, the Model Predictive Control (MPC) technology, specifically the linear Generalized Predictive Control (GPC) algorithm will be considered, since it is capable of handling process interactions systematically (Camacho and Bordons, 1999; Maciejowski, 2002; Rossiter, 2004).

The nature of the fundamental control problem in the biodiesel reactor is further complicated by the complex heat and mass transfer characteristics involved in the reactor (Mjalli et al., 2009). Nonlinearities present in the biodiesel reactor imply the inadequacy of using a single Linear Time Invariant (LTI) model in the GPC frame work to represent the dynamics of the reactor. To overcome this problem, the Recursive Least Squares (RLS) algorithm is used in this study to model the process online, so that accurate representation of the most recent dynamics of the process can be embedded into the GPC framework in real time. With the RLS algorithm continuously modeling the process online and the GPC algorithm optimizing the controller moves at every time step, this adaptive predictive control strategy can deal with unanticipated situations (e.g., changes in the feed specifications, unexpected failure of utilities supplied to the cooling jacket, change in the feed temperature due to environmental conditions etc.) which can affect the operating conditions of the reactor, since the new situations are taken into account in the design of the controller moves. A conventional controller, however, will not be able to cope with situations not included in its design.

The design of the control loops based on this adaptive strategy on the biodiesel reactor is shown in Fig. 2. Here, the temperature is controlled to ensure an optimal yield of biodiesel and to minimize the generation of unwanted by-products. This is based on one of the available technologies as described in Tapasvi et al. (2004) which requires biodiesel reactors be operated below the boiling of methanol (b.p. = 64.7°C). The pressure is atmospheric and is not controlled. Close control of the temperature is necessary as a high reaction temperature increases the rate of reaction (Leung et al., 2010), but too high a temperature accelerates the saponification reaction of triglycerides (Eevera et al., 2009; Leung and Guo, 2006).

Fig. 2: Simplified schematic of the multivariable adaptive GPC controller design on the biodiesel reactor operating at constant atmospheric pressure

In the design of this control system, the concentration of the methyl ester is also controlled to ensure the stability, consistency and quality of the biodiesel. The concentration of the biodiesel produced in the reactor must lie within the required specifications before proceeding to downstream processing.

In this study, a multivariable adaptive predictive control strategy is designed, tested and simulated on a validated transesterification model developed by Mjalli et al., 2009. Interested readers on the modeling of the transesterification reactor are referred to this published work for more details. In this study, the RLS algorithm, which identifies a linear multivariable representation of the transesterification process at every time step, is coupled to the GPC controller in closed loop. Such a control scheme is not only capable of adapting to operational variations, but also, the interactions between different process control loops can be efficiently tackled.

MULTIVARIABLE ONLINE PROCESS MODELING

The local dynamics of a multivariable process (i.e., the transesterification process) can be represented by a Multi Inputs Multi Outputs discrete time auto-regressive exogenous (ARX) model. In order to capture the nonlinear dynamics of the transesterification process in real time, it is necessary to estimate online the parameters of an ARX model, i.e., the coefficient matrices in a(z-1) and b(z-1), with m inputs (uk), n outputs (yk), a bias parameter (dk) and a stochastic noise variable with normal distribution and zero mean (vk):

(1)

where, a[nxn] and b[nxm] are polynomial matrices in the z-domain given as:

(2)

(3)

In Eq. 1, k is a nonnegative integer which denotes the sampling instance, k = 0, 1, 2..., whereas in Eq. 2 and 3, α and β are known positive integers and I is the identity matrix.

Online estimation of the coefficient matrices in Eq. 2 and 3, viz., ai=1,...,α εUnxm and bi = 1,...,β εUnxm involves the use of recursive system identification techniques. The RLS algorithm, which is covered extensively in the literature (Ljung, 1987; Ljung and Gunnarsson, 1990; Ljung and Soderstom, 1983), is by far the most popular recursive system identification technique due to its simplicity and fast convergence when properly applied (Seborg et al., 1986; Shah and Cluett, 1991). With the data of the inputs (uk) and outputs (yk) of the process being constantly fed to the RLS algorithm, the RLS seeks to minimize a weighted cost function, V of the form:

(4)

where, λε(0, 1) is the forgetting factor and εUnxm is the vector of prediction error at the i-th instance.

Various modifications of the RLS algorithm are available in the literature (Kulhavy and Karny, 1985; Ljung and Gunnarsson, 1990; Park et al., 1991; Sripada and Fisher, 1987; Salgado et al., 1988; Seborg et al., 1986; Shah and Cluett, 1991), where different strategies were proposed to improve the tracking performance of the RLS when the process model parameters are time-varying. Among these, Fortescue et al. (1981) proposed a strategy whereby a time-varying forgetting factor is employed to maintain the adaptivity of the RLS algorithm. In addition to this, Cordero and Mayne (1981) suggested an additional mechanism to ensure that the trace of the covariance matrix remains bounded even when there is no new information coming into the RLS algorithm. This form of the RLS algorithm is referred to as the Variable Forgetting Factor Recursive Least Squares (VFF-RLS) algorithm throughout this text and is shown here:

(5)

(6)

(7)

(8)
(9)

(10)

In these equations, γ is the Kalman gain and P is the covariance matrix of the prediction error. Both σ and C are design constants. The regressor matrix, z and the matrix of the estimated process model parameters, are represented by:

(11)

(12)

In order to attain numerical robustness in implementing the VFF-RLS algorithm, Bierman’s factorization of Pk = UkDkUkT (Bierman, 1976) is employed (where, U is an upper triangular matrix and D is a diagonal matrix) and the recursive updates of the covariance matrix is accomplished through the factorized components of P.

The VFF-RLS algorithm with UDUT factorization will be used to design the centralized adaptive GPC controller in the following section.

CENTRALIZED ADAPTIVE GENERALIZED PREDICTIVE CONTROL STRATEGY

Intensive research on modern control concepts in the past decades has led to the emergence of the MPC technology, where an explicit process model is employed to predict the future output of the process at every time step. The predicted future output trajectories are then used to compute a sequence of optimal future input trajectories, where only the first move is implemented on the process. This entire sequence of calculation is repeated at every time step.

Among the many model predictive controllers available in the control literature as well as in the industry (Garcia et al., 1989; Qin and Badgwellb, 2003), the GPC devised by Clarke et al. (1987b) has become one of the most popular MPC algorithms (Clarke, 1988). The GPC is known to show good performance properties over a wide variety of processes and a certain degree of robustness when implemented for the purpose of adaptive control (Clarke et al., 1987b). In GPC, the Controlled Auto-Regressive Integrated Moving Average (CARIMA) model is employed for prediction:

(13)

where, T(z-1) is a design polynomial matrix (Clarke et al., 1987a, b; Yoon and Clarke, 1995) and Δ = 1- z-1. When T(z-1) = I, the CARIMA model takes the form of an ARX model with an integrated white noise term. Hence, in the adaptive framework, the coefficient matrices of a(z-1) and b(z-1) in (13) can be updated recursively by the VFF-RLS algorithm.

The vector of future and past variables at sampling instance k are defined as:

(14)

where, the notation of arrows pointing right is used for strictly future (not including current value) vectors and arrows pointing left for past (including current value) vectors, is the vector of change in the input variables , in which the elements are defined as Δui = ui-ui-1 and r is the vector of set points. The prediction horizon (N) and control horizon (M) are positive integers which serve as tuning parameters for the GPC.

Given the prediction horizon and the control horizon, the prediction of the future response of the process is given by Eq. 13 (with T(z-1) = I), which could be rearranged into an explicit expression of the predicted future output vector :

(15)

where, the construction of the H, K and Q matrices are well known (Camacho and Bordons, 1999; Clarke et al., 1987a, b; Rossiter, 2004; Yoon and Clarke, 1995).

To compute the sequence of the optimal future input trajectories, the GPC control law is obtained by minimizing the following cost function (J):

(16)

where, εU(nxN)x(nxN) and εU(mxM)x(mxM) are positive definite diagonal weighting matrices defined as:

(17)

In Eq. 17, the diagonal elements of the matrix W consists of the weights (W1,..., Wn) for output residuals, whereas the diagonal elements of the matrix R consists of the move suppression weights (R1,..., Rm) for changes in inputs. These weights are tunable parameters for obtaining good performance in the GPC controller.

In the constrained GPC, the GPC cost function J is minimized with respect to while satisfying the following constraints:

(18)

To solve for the optimal future input trajectories, the optimization is formulated as a Quadratic Programming (QP) problem by rearranging Eq. 16 in the form:

(19)

where, S and f are defined as (Rossiter, 2004):

(20)

The matrices A and b in Eq. 19 can be obtained by formulating Eq. 18 in the form of linear inequalities, of which the details can be found (Camacho and Bordons, 1999; Maciejowski, 2002; Rossiter, 2004). Solving the QP problem in Eq. 19 yields the future input trajectories whereby only the first input move in the optimal sequence is implemented on the process.

Based on the study of Mjalli et al., 2009, the validated mechanistic transesterification model consists of two manipulated variables (coolant flow rate, Fc and reactant flow rate, Fo) and two controlled variables (reactor temperature, T and methyl ester concentration, CME), respectively. Hence, in designing the centralized adaptive GPC controller, the parameters of a Two Inputs Two Outputs (TITO) ARX model were estimated online via the VFF-RLS algorithm. The polynomial matrices a(z-1) and b(z-1) were selected as first order polynomial matrices, with α = β = 1. Based on process experience, the sampling time of the VFF-RLS algorithm was chosen to be 35 sec, whereas the constants σ and C were chosen to be 10 and 6000, respectively.

As with all recursive parameter estimation algorithms, it is important to only begin the implementation of the VFF-RLS algorithm when the inputs and the outputs of the process are at steady state. In this simulation, a period of 2300 seconds was allowed after start-up before the VFF-RLS algorithm was activated. The performance of the VFF-RLS algorithm was allowed to stabilize after activation for a period of 200 seconds before model adaptation in the GPC controller was initiated.

As alluded to previously, in GPC, there are four components which can be tuned to give good performance, viz. the prediction horizon (N), the control horizon (M), the output weights (W) and the move suppression coefficients (R). As a general guide, N is usually chosen such that N-M is larger than the process settling time, whereas M is chosen to be as large as the expected transient time (Rossiter, 2004). Both W and R are positive constants which are tuned based on the actual control performance.

Based on the general tuning guidelines (Rossiter, 2004) and subsequent fine tuning effort, the following values of the TITO GPC tuning parameters were selected in this simulation:

(21)

To prevent actuator saturation and aggressive actuator moves on the coolant and reactant stream, the following constraints were imposed on the cost function of GPC:

(22)

(23)

PERFORMANCE OF THE CENTRALIZED ADAPTIVE GENERALIZED PREDICTIVE CONTROL STRATEGY

In this study, the performance of the centralized adaptive GPC strategy in controlling a nonlinear multivariable process such as the biodiesel reactor was tested under random, successive set point changes in opposite directions. Included in this simulation are two well tuned decentralized Ziegler-Nichols (Z-N) conventional PID controllers for comparison of performance to centralized adaptive GPC controller. The decentralized conventional PID control scheme was designed based on the loop pairing analysis carried out in the work of Mjalli et al., 2009, hence the details are omitted here. Figure 3 and 4 show the reactor temperature and methyl ester concentration profiles together with their respective controller moves under successive, random set point changes.

Figure 3 and 4, generally the centralized adaptive GPC controller outperformed the decentralized conventional PID controllers in terms of the ability to attain lower overshoot. However, it was observed in the beginning of the simulation, that the closed loop response of the centralized adaptive GPC scheme was a little sluggish in bringing the methyl ester concentration back to the set point. This is due to the start-up of the adaptive scheme, where the performance of the VFF-RLS algorithm had yet to stabilize. Given time, this shortcoming of the adaptive scheme disappeared as the VFF-RLS algorithm gathered sufficient process information. In terms of the ability to handle process interactions, the performance of the centralized adaptive GPC scheme was comparable to that of a decentralized conventional PID controller for the methyl ester concentration loop, while the performance of the centralized adaptive GPC scheme in the reactor temperature loop was far more superior to that of the decentralized conventional PID controller. Generally, the centralized adaptive GPC controller outperformed the decentralized conventional PID controller in handling process interactions.

One of the important qualities of a good controller is the ability to produce actuating signals that are realistic for practical implementations. As can be seen from both Figure 3 and 4, the decentralized conventional PID controllers produced aggressive controller moves, which are not physically realizable in practical implementations.

Fig. 3: Comparison of the performance and the controller moves between the centralized adaptive GPC controller and the decentralized conventional PID controller in controlling the reactor temperature

Fig. 4: Comparison of the performance and the controller moves between the centralized adaptive GPC controller and the decentralized conventional PID controller in controlling the methyl ester concentration

The centralized adaptive GPC controller, on the other hand, produced much more realizable controller moves.

The performance of the centralized adaptive GPC controller was further tested for the ability to reject load disturbances. Four variables were identified as possible disturbance variables in the mechanistic transesterification model (Mjalli et al., 2009), viz., the triglyceride concentration (CTGO), feed temperature (TO), coolant inlet temperature (TCO) and stirrer rotational speed (N). To simulate the efficacy of the centralized adaptive GPC strategy in rejecting load disturbances, the nominal values of CTGO, TO, TCO and N were increased as much as 0.1 kmol m-3, 2 K, 2 K and 2 rps, respectively 5000 sec after completion of the set point change tests. Figure 5 and 6 show the reactor temperature and methyl ester concentration profiles when these disturbance variables were introduced. From the figures, the reactor temperature was brought back to the set point by the centralized adaptive GPC controller in a period of 1000 sec, whereas the same controller took a longer period (3000 sec) to bring the methyl ester concentration back to the set point. For the particular magnitude of disturbances introduced, the feed temperature had the largest effect on the reactor temperature, with an overshoot of less than 0.5 K, whereas for the methyl ester concentration loop, the triglyceride concentration had the largest effect, with an overshoot of less than 0.07 kmol m-3. From the figures, it was also observed that the stirrer rotational speed had negligible effect on both the reactor temperature and methyl ester concentration. Although the response for the methyl ester concentration loop was more sluggish, this was tolerable as the effect of the disturbance variables on the methyl ester concentration was marginal. Furthermore, the reactor temperature is the more critical variable to be controlled and needs faster controller response, since the absence of proper regulatory control for the reactor temperature loop can upset the entire biodiesel production severely. In addition, the controller moves for both loops were observed to be within a reasonable range, non aggressive and actuator saturation was not found.

Fig. 5:
Effects of various individual disturbance variables, viz., the triglyceride concentration (CTGO), feed temperature (TO), coolant inlet temperature (TCO) and stirrer rotational speed (N), on the performance of the centralized adaptive GPC controller in controlling the reactor temperature and the corresponding controller moves for the coolant. The nominal values of CTGO, TO, TCO and N were increased as much as 0.1 kmol m-3, 2 K, 2 K and 2 rps, respectively at time = 40000 sec. These disturbances were introduced one at a time, hence shown here are superpositions of four separate runs

Fig. 6:
Effects of various individual disturbance variables, viz., the triglyceride concentration (CTGO), feed temperature (TO), coolant inlet temperature (TCO) and stirrer rotational speed (N), on the performance of the centralized adaptive GPC controller in controlling the methyl ester concentration and the corresponding controller moves for the reactant feed. The nominal values of CTGO, TO, TCO and N were increased as much as 0.1 kmol m-3, 2 K, 2 K and 2 rps respectively at time = 40000 sec. These disturbances were introduced one at a time, hence shown here are superpositions of four separate runs

CONCLUSIONS

A multivariable adaptive predictive model based control strategy, viz., the TITO centralized adaptive GPC strategy was simulated on a validated mechanistic transesterification model. By having a centralized controller, the effects of all the input variables on all the output variables are accounted for by the controller and taken into consideration when calculating the appropriate input moves to be implemented on the process. Furthermore, an optimization based control strategy ensures that the computed moves are optimal, while respecting various constraints. In addition, no cumbersome loop pairing analysis or decoupling were needed in designing a centralized control system as opposed to designing a decentralized control system. The properties of the GPC controller were modified by having the VFF-RLS algorithm to provide accurate real time dynamics of the biodiesel reactor to the controller. Simulation shows that the centralized adaptive GPC strategy generally outperformed the decentralized conventional PID controllers in terms of set point tracking and process interactions handling. Good regulatory control was also obtained. Moreover, the centralized adaptive GPC strategy produced excellent controller moves as compared to the decentralized conventional PID controllers.

This simulation had demonstrated the efficacy of the centralized adaptive GPC scheme in controlling a multivariable and nonlinear transesterification process. However, the downside of this approach is the added computational complexity, of which the proposed control scheme is only advocated for critical unit operations such as the biodiesel reactor. The next phase of action in this work is to implement this control scheme in a lab-scale transesterification process.

ACKNOWLEDGMENTS

H.K. Yeoh and F.S. Mjalli acknowledge the financial support from the UMRG grant RG065/09SUS by the University of Malaya. Y.K. Ho acknowledges the financial support from the PPP grant PS058/2009A by the University of Malaya.

REFERENCES

  • Bierman, G.J., 1976. Measurement updating using the U-D factorization. Automatica, 12: 375-382.
    CrossRef    


  • Camacho, E. and C. Bordons, 1999. Model Predictive Control. Springer-Verlag, Berlin, Germany


  • Clarke, D.W., 1988. Application of generalized predictive control to industrial processes. IEEE Control Syst. Magaz., 8: 49-55.
    CrossRef    Direct Link    


  • Clarke, D.W., C. Mohtadi and P.S. Tuffs, 1987. Generalized predictive control-Part II. Extensions and interpretations. Automatica, 23: 149-160.
    CrossRef    Direct Link    


  • Clarke, D.W., C. Mohtadi and P.S. Tuffs, 1987. Generalized predictive control-Part I. The basic algorithm. Automatica, 23: 137-148.
    CrossRef    Direct Link    


  • Cordero, A.O. and D.Q. Mayne, 1981. Deterministic convergence of a self-tuning regulator with variable forgetting factor. IEEE Proc. D: Control Theory Appl., 128: 19-23.
    Direct Link    


  • Eevera, T., K. Rajendran and S. Saradha, 2009. Biodiesel production process optimization and characterization to assess the suitability of the product for varied environmental conditions. Renew. Energy, 34: 762-765.
    CrossRef    Direct Link    


  • Fortescue, T.R., L.S. Kershenbaum and B.E. Ydstie, 1981. Implementation of self-tuning regulators with variable forgetting factors. Automatica, 17: 831-835.
    CrossRef    


  • Garcia, C.E., D.M. Prett and M. Morari, 1989. Model predictive control: Theory and practice-A survey. Automatica, 25: 335-348.
    CrossRef    


  • Kulhavy, R. and M. Karny, 1985. Tracking of slowly varying parameters by directional forgetting. Proceedings of the International Federation of Automatic Control World Congress, (IFACWC'85), Budapest, pp: 687-692.


  • Leung, D.Y.C. and Y. Guo, 2006. Transesterification of neat and used frying oil: Optimization for biodiesel production. Fuel Process. Technol., 87: 883-890.
    CrossRef    Direct Link    


  • Leung, D.Y.C., X. Wu and M.K.H. Leung, 2010. A review on biodiesel production using catalyzed transesterification. Applied Energy, 87: 1083-1095.
    CrossRef    Direct Link    


  • Ljung, L., 1987. System Identification, Theory for the User. Prentice Hall, Englewood Cliffs, NJ., USA


  • Ljung, L. and S. Gunnarsson, 1990. Adaptation and tracking in system identification-A survey. Automatica, 26: 7-21.
    CrossRef    


  • Ljung, L. and T. Soderstrom, 1983. Theory and Practice of Recursive Identification. MIT Press, Massachusetts


  • Maciejowski, J.M., 2002. Predictive Control with Constraints. Prentice-Hall, New Jersey.


  • Mjalli, F.S. and M.A. Hussain, 2009. Approximate predictive versus self-tuning adaptive control strategies of biodiesel reactors. Ind. Eng. Chem. Res., 48: 11034-11047.
    Direct Link    


  • Mjalli, F.S., K.S. Lee, C.Y. Kiew and M.A. Hussain, 2009. Dynamics and control of a biodiesel transesterification reactor. Chem. Eng. Technol., 32: 13-26.
    Direct Link    


  • Park, D.J., B.E. Jun and J.H. Kim, 1991. Fast tracking RLS algorithm using novel variable forgetting factor with unity zone. Elect. Lett., 27: 2150-2151.
    Direct Link    


  • Sripada, R.N. and D.G. Fisher, 1987. Improved least squares identification. Int. J. Control, 46: 1889-1913.
    CrossRef    


  • Rossiter, J.A., 2004. Model-Based Predictive Control. CRC Press, Boca Raton, Florida


  • Salgado, M.E., G.C. Goodwin and R.H. Middleton, 1988. Modified least squares algorithm incorporating exponential resetting and forgetting. Int. J. Control, 47: 477-491.
    CrossRef    


  • Seborg, D.E., T.F. Edgar and D.A. Mellichamp, 2004. Process Dynamics and Control. 2nd Edn., John Wiley and Sons Inc., New Jersey, New York


  • Seborg, D.E., T.F. Edgar and S.L. Shah, 1986. Adaptive control strategies for process control: A survey. AIChE J., 32: 881-913.
    CrossRef    


  • Shah, S.L. and W.R. Cluett, 1991. Recursive least squares based estimation schemes for self-tuning control. Can. J. Chem. Eng., 69: 89-96.
    CrossRef    


  • Tapasvi, D., D. Wiesenborn and C. Gustafson, 2004. Process modeling approach for evaluating the economic feasibility of biodiesel production. Proceedings of the North Central ASAE/CSAE Conference, Sept. 24-25, Winnipeg, Manitoba, Canada, pp: 289-304.


  • Yoon, T.W. and D.W. Clarke, 1995. Observer design in receding-horizon predictive control. Int. J. Control, 61: 171-191.
    CrossRef    


  • Qin, S.J. and T.A. Badgwell, 2003. A survey of industrial model predictive control technology. Control Eng. Pract., 11: 733-764.
    CrossRef    

  • © Science Alert. All Rights Reserved