VIEWS: 98 PAGES: 6 CATEGORY: Communications & Networking POSTED ON: 8/20/2012 Public Domain
(IJCSIS) International Journal of Computer Science and Information Security, Vol. 10, No. 7, July 2012 Modeling and Control of CSTR using Model based Neural Network Predictive Control Piyush Shrivastava Assistant Professor, Electrical& Electronics EngineeringDepartment, Takshshila Institute of Engineering & Technology, Jabalpur, Madhya Pradesh, India . Abstract—this paper presents a predictive control strategy based consider plant behavior over a future horizon in time. Thus, the on neural network model of the plant is applied to Continuous effects of both feedforward and feedback disturbances can be Stirred Tank Reactor (CSTR). This system is a highly nonlinear anticipated and eliminated, fact which permits the controller to process; therefore, a nonlinear predictive method, e.g., neural drive the process output more closely to the reference network predictive control, can be a better match to govern the trajectory. The classical MBPC algorithms use linear models of system dynamics. In the paper, the NN model and the way in the process to predict the output of the process over a certain which it can be used to predict the behavior of the CSTR process horizon, and to evaluate a future sequence of control signals in over a certain prediction horizon are described, and some order to minimize a certain cost function that takes account of comments about the optimization procedure are made. Predictive the future output prediction errors over a reference trajectory, control algorithm is applied to control the concentration in a continuous stirred tank reactor (CSTR), whose parameters are as well as control efforts. Although industrial processes optimally determined by solving quadratic performance index especially continuous and batch processes in chemical and using the optimization algorithm. An efficient control of the petrochemical plants usually contain complex nonlinearities, product concentration in cstr can be achieved only through most of the MPC algorithms are based on a linear model of the accurate model. Here an attempt is made to alleviate the process and such predictive control algorithms may not give modeling difficulties using Artificial Intelligent technique such as rise to satisfactory control performance [3, 4]. Linear models Neural Network. Simulation results demonstrate the feasibility such as step response and impulse response models are and effectiveness of the NNMPC technique. preferred, because they can be identified in a straightforward manner from process test data. In addition, the goal for most of Keywords-Continuous Stirred Tank Reactor; Neural Network the applications is to maintain the system at a desired steady based Predictive Control; Nonlinear Auto Regressive with state, rather than moving rapidly between different operating eXogenous signal. points, so a precisely identified linear model is sufficiently accurate in the neighborhood of a single operating point. As I. INTRODUCTION linear models are reliable from this point of view, they will One of the main aims in industry is to reduce operating provide most of the benefits with MPC technology. Even so, if costs. This implies improvements in the final product quality, the process is highly nonlinear and subject to large frequent as well as making better use of the energy resources. Advanced disturbances; a nonlinear model will be necessary to describe control systems are in fact designed to cope with these the behavior of the process. Also in servo control problems requirements. Model based predictive control (MBPC) [1,2] is where the operating point is frequently changing, a nonlinear now widely used in industry and a large number of model of the plant is indispensable. In situations like the ones implementation algorithms due to its ability to handle difficult mentioned above, the task of obtaining a high-fidelity model is control problems which involve multivariable process more difficult to build for nonlinear processes. interactions, constraints in the system variables, time delays, etc. The most important advantage of the MPC technology In recent years, the use of neural networks for nonlinear comes from the process model itself, which allows the system identification has proved to be extremely successful [5- controller to deal with an exact replica of the real process 9]. The aim of this paper is to develop a nonlinear control dynamics, implying a much better control quality. The technique to provide high-quality control in the presence of inclusion of the constraints is the feature that most clearly nonlinearities, as well as a better understanding of the design distinguishes MPC from other process control techniques, process when using these emerging technologies, i.e., neural leading to a tighter control and a more reliable controller. network control algorithm. The combination of neural networks and model-based predictive control seems to be a Another important characteristic, which contributes to the good choice to achieve good performance in the control. In this success of the MPC technique, is that the MPC algorithms paper, we will use an optimization algorithm to minimize the 38 http://sites.google.com/site/ijcsis/ ISSN 1947-5500 (IJCSIS) International Journal of Computer Science and Information Security, Vol. 10, No. 7, July 2012 cost function and obtain the control input. The paper analyses a More complex optimization functions can consider the control neural network based nonlinear predictive controller for a effort. It is the specific case of GPC (Generalized Predictive Continuous Stirred Tank Reactor (CSTR), which is a highly Control), where the optimization index J can be expressed as: nonlinear process. The procedure is based on construction of a neural model for the process and the proper use of that in the optimization process. This paper begins with an introduction about the predictive (4) control and then the description of the nonlinear predictive where: control and the way in which it is implemented. The neural y(k ) - is the output plant estimation at instant = k model and the way in which it can be used to predict the behavior of the CSTR process over a certain prediction horizon Δu - is the control action increment. are described, and some comments about the optimization N1 - is the minimum horizon of prediction. procedure are made. Afterwards, the control aims, the steps in NU - is the control horizon. the design of the control system, and some simulation results NY - is the maximum horizon of prediction. are discussed. The objective of the control problem is to minimize the index II. PREDICTIVE CONTROL J, with respect to the control actions, looking for the points The predictive controller, in summary, is characterized by where the first order differential is null. computing future control actions based on output values predicted by a model, with vast literature and academic and industrial interest (Clarke, 1987; Garcia et all, 1989; Arnaldo, III. NEURAL NETWORK PREDICTIVE CONTROL 1998) [4]. This section presents the concepts of predictive By the knowledge of the identified neural model of the control based on NPC, using the usual optimization functions nonlinear plant which is capable of doing multi step ahead and control laws, applied to the conventional predictive predictions, Predictive control algorithm is applied to control controllers. nonlinear process. The idea of predictive control is to minimize cost function, J at each sampling point: N2 2 Nu 2 J(t,U(k)) = ∑[ r(k +i) − y (k+i)] + ∑ρ[ Δu(k +i −1)] A. Optimization functions ˆ The optimization function, usually represented by the index J, t=N1 i=1 represents the function that the control action tries to minimize. In an intuitive way, the error between the plant (5) output and the desired value is the simplest example of an optimization function, and it is expressed by: With respect to the Nu future controls, U ( k ) = [u ( k ).....u ( k + N u − 1)]T (6) (1) Where: and subject to constraints: y(k) represent the plant output y k ref ( )represent the desired response e(k) represent the estimation error Nu ≤ i ≤ ( N2 − nk ) (7) k is the sample time Using the predictive control strategy with identified One of the most usual optimization functions is based on the NARX model (NNMPC) it is possible to calculate the optimal square error and it is represented as: control sequence for nonlinear plant. Here, term r(k+i) is the ˆ required reference plant output, y (k+i) is predicted NN (2) model output, Δ u ( k + i − 1) is the control increment, N1 and But the optimization index can take forms of more complex functions. For predictive controllers, whose models are N2 are the minimum and maximum prediction (or cost) capable to predict N steps ahead, the simple application of the horizons, Nu is the control horizon, and ρ is the control square error approach can present satisfactory results. This penalty factor[4]. case admits that the optimization function is not limited to an The predictive control approach is also termed as a only point, but an entire vector of N predicted errors. It seeks receding horizon strategy, as it solves the above-defined to optimize the whole trajectory of the future control actions in optimization problem [5] for a finite future, at a current time a horizon of N steps ahead. and implements the first optimal control input as the current control input. The vector u = [Δu(k),Δu(k+1),…Δu(k + Nu-1)] is calculated by minimizing cost function, J at each sample k (3) for selected values of the control parameters {N1, N2, Nu, ρ}. 39 http://sites.google.com/site/ijcsis/ ISSN 1947-5500 (IJCSIS) International Journal of Computer Science and Information Security, Vol. 10, No. 7, July 2012 The ese control p parameters de redictive control efines the pr e al The purpose of our neura network mo odel is to do per is t the rformance. N1 i usually set to a value 1 that is equal to t eries prediction of the plant output. Given a series of time se n t n me ne on tim delay, and N2is set to defin the predictio horizon i.e. tthe control signals l % d to u and past data yt it is desired t predict the nummber of time-st ure he teps in the futu for which th plant respon nse is r dicted. recursively pred output series yN.The network is trained to do one step plant o k ahead p put prediction[9], i.e. to predict the plant outp yt+1 given rrent control si the cur plant output yt . The neural ignal ut and p k ent n network will impleme the function yt +1 = f (ut , yt ) ˆ (12) As it is discussed above, yt h in has to contai sufficient Figure 1: NNMP principle app F PC plied to CSTR ch hemical process informa ation for this p prediction to be possible.It is assumed that e yt is mu od ultivariable. One problem is that this metho will cause e n s The minimization of criterion, J in NNMPCis an optimizatiion a rapidly increasing d divergence due to accumulati of errors. e ion prooblem minimi ized iterativel ly. Similar t NN traini to ing efore puts high demands on a It there h accuracy of the model. The e ategies, iterativ search meth stra ve hods are appli to determi ied ine the better t model mat tches the actua plant the les significant al ss the minimum. the acc r. as cumulated error A sampling time as large a possible is an effe e ective method to reduce the error accum mulation as it θ (ii+1) =θ (i ) +μ (i) .d(i) (8) where θ ( i ) specif e, fies effectiv vely reduces t number of steps needed for a given the f d the current iterate (number ‘i’), d (i) is the sea e arch direction a and time ho ural orizon. The neu network tr ne rained to do on step ahead ion l he of predicti will model the plant. Th acquisition o this model μ (ii) us is the step size. Variou types of a algorithms exiist, referred to as S is also r System Identifification. cha w aracterized by the way in which search di tep irection and st e size are selecte p ed. In the present work Newton bas sed Levvenberg–Marqu uardt (LM) allgorithm is immplemented. TThe IV V. MODELIN OF NEURAL NETWORK PRE NG EDICTIVE sea applied in LM algorithm is: arch direction a a NPC) CONTROL (NN ree ved N opment are The thr steps involv in the ANN model develo ˆ (H[U i (t)] +λ i I)d i = -G[U i (t)] d (9) A. Gen put-Output data neration of Inp a nt Hessian matrix as: with Gradien vector and H ata o The da generated to train the netw work should coontain all the nt relevan information about the dyn e namics of the CSTR. The ∂ J(t,U(t)) was he al he input w given to th conventiona model of th CSTR and G[U i (t)] = | from t nal he the convention model, th input and output were ∂ U(t) U ( t ) =U ( t ) i sampled for 0.02 sam s uired sampled mpling instants and the requ % ∂ U(t) % e rain data are obtained to tr the networ rk. % = − 2ϕ T [U i (t)]E(t)+2 ρ U (t ) |U ( t ) =U i ( t ) ∂ U(t) 10) (1 % ∂ 2 J(t,U U(t)) H[U i (t)] = U | ∂U(t 2 U ( t ) =U ( t ) i t) ∂ ⎛ ∂Y(t) ˆ ⎞ % % ∂U (t) ∂U (t ) T = ⎜ E(t) ⎟ +2ρ | ∂U(t) ⎝ ∂U(t) ∂U(t) ∂U (t ) U ( t ) =U ( t ) i ⎠ (1 11) ies where B(i) specifi the approxi e ian imation of the inverse Hessi d h and G[U(i)(t)] is the gradient of the J with respect to tthe ntrol inputs. Th most popula formula kno con he ar own as Broydeen- e put Figure 2: Input-Outp Sequence etcher-Goldfarb Fle GS) m b-Shanno (BFG algorithm to approxima ate the inverse Hessi is used her ian posed scheme of re[8]. The prop B. Neu Network A ural Architecture imp e plementing the NNMPC is sh hown in Figure 2. e ed The fee forward net twork with sig gmoidal activa ation function was ch on hosen based o the trials w with different structures of me Tim Series Predi ural iction with Neu Networks ayer perceptron multila n. 40 http://sites.google.com/site/ijcsis/ ISSN 1947-5500 (IJCSIS) International Journal of Computer Science and Information Security, Vol. 10, No. 7, July 2012 ure odel Figu 3: ANN mo of the CSTR The lowest error corresponds to 7 neurons in the hidden lay e o yer. nce ed a Hen it is selecte as optimal architecture of ANN. The AN NN seleected here co n e onsists of 4 neurons in the input layer, 7 neuurons in the hid n yer. dden layer and one neuron in the output lay e The ANN archite ecture used in the present wwork is shown in Figgure 3. The trai m ining algorithm used in the C CSTR modeling is g Fi rediction of mo igure 4: (a) One step ahead pr odel, (b) ck n bac propagation algorithm. Before traini ing the proce ess ween model ou Prediction error betw icted output utput and predi wei alized to small random numb ights are initia bers. The weighhts are adjusted till error gets mi all inimized for a training se ets. idation tests o test set: Vali on hen or t Wh the error fo the entire set is acceptably low, the traini ing stopped. is s Tab 2 shows th parameters used in developing the AN ble he NN model for the CST TR Parame eters alues Va Input neu urons 4 Output Ne eurons 1 Hidden l layer 7 Neuro ons den No. of hidd layer 7 Activation ffunction moidal Sigm Training alggorithm g-Marquardt Levenberg ion Iterati 0000 10 Figur 5 :(a) one ste ahead predic re ep ction of model (validation Architec cture Feedf forward set), (b Prediction e b) error between m nd model output an predicted Initial weeights 1 output (validati set) o ion N or Table 2: ANN Parameters fo CSTR model ling V. TINUOUS STIRRE TANK REAC CONT ED CTOR The Continuous Stirred Tank Reactor [6] is shown in e model in used a the nonlinea system. Figure 6.This CSTR m as ar C. Model Validat tion The final step in developing the model is v e n t validation of tthe mage part with relationship ID rId50 was not found in the file. The im model [11]. Valid ormed by evalu dation is perfo uating the mod del per ng a a. rformance usin trained data and test data The input a and get targ were prese n the ented to the network and t network w was ined using Lev trai venberg-Marqu uardt algorithm. alidation tests on training se Va et: Continuous Stir Figure 6: C ctor rred Tank Reac The equations w e he model of the which shows th dynamic m system is 41 http://sites.google.com/site/ijcsis/ ISSN 1947-5500 (IJCSIS) International Journal of Computer Science and Information Security, Vol. 10, No. 7, July 2012 (14) (15) control signal b the controller Figure 8: c by d where h (t) is the liquid level, Cb(t) is the produ uct con he ncentration at th output of th process, w1(t is the flow ra he t) ate In this pa aper modelin of CSTR has been ng R the of t concentrate feed Cb1 an w2(t) is the flow rate of t ed nd the implem ral mented using artificial neur networks. The neural uted feed Cb2 .The input con dilu ncentration are set to Cb1=24 e 4.9 ned model has been train using data set obtained fr rom dynamic d he and Cb2= 0.1.Th constants associated w with the rate of equatio ward neural n ons. Feed forw network has b been used to connsumption are k1=k2=1. he del model the CSTR. Th neural mod has been d designed as a box he black b model. Th simulation results from conventional e The objective of the contro ntain the produ oller is to main uct con ncentration by a adjusting the fl w1 (t), w2 ( =0.1.The lev low (t) vel and model a the neural model were co ompared for th given input he of t tank h is n controlled. The designed controller uses a the not s ons variatio and the re esults have been found satis sfactory. The ural network m neu model to pred future CST responses to dict TR simulat at tion shows tha implementat tion of the Neu Network ural pot signals. The tra tential control s aining data we obtained fro ere om based a rollers for the s advanced contr set-point tracki case were ing the nonlinear mod of CSTR. del o able to force process output varia ables to their ttarget values hly smooth and within r e reasonable rise and settling tiimes. VI. MULATION RES SIM SULTS AND CON NCLUSION VII. REFERE ENCES e f s The objective of the control strategy is to g govern theCST TR [1] E. Garcia C. E and Morari, M. 1982. In , nternal model dyn c namics to force the system concentration t track a certa to ain l-I. g control “A unifying review and s some new resu ults,Industrial -points. In this system, the in set- nput is the cool flow rate a lant and Engine al eering Chemica Process ”. De 21, 308--32 ev. 23. he on the output is th concentratio of the pro ocess [12]. T The [2] L.G. Lightbody and G. W Irwin, “Neu networks W. ural iden ned ntifier is train and initialized before th control acti he ion for noonlinear adapt tive control, “in Proc. IF FAC Symp. rts. star The input v vector of the identifier inclu i udes coolant flo ow Algoritthms Architect tures Real-Tim Control, B me Bangor, U.K. rate at different t es time steps (the sampling time is 20sec). e 13, pp. 1–1 1992. e ed s The performance of the propose controller is shown in Figu ure [3] D. W. Cla arke, C. Mo ohtadi and P S. Tuffs, P. Evidently, the concentration values of the p 7. E ack plant could tra “Gener ralized Predic ctive Control Basic Algorithm”, ues t d the set-point valu excellent. It is to be noted that to impro ove Automa atica, Vol.23, n no.2, pp: 137- 148, 1987. - the transient resp ponse, one ma consider a larger predicti ay ion [4] H. del Morari, M. and Lee, J. H 1999. Mod predictive tim It is rem me. markable to note that bec n cause of high hly l: nt control past, presen and future, Computers an Chemical nd nonnlinearity natur of CSTR process, using the convention re p nal Engineeering, 23, 667- -682. con e ach ntrol technique could not rea the contro task. It can be ol [5] E. X. Zhu, D.E Seborg, “N Nonlinear mod predictive del see in figure 7 th controller output is track en hat o king the referennce l control based on Ham mmerstein mod dels”, in. Proc. International nal. sign ess Symposium on Proce System Eng ul, gineering, Seou Korea, pp. 000, 995–10 1994. [6] ova Vasičkanino and M. Bakošova, “Neu ural network ive f predicti control of a chemical reactor” Proce eedings 23rd ean e ng Europe Conference on Modellin and Simulat tion ©ECMS Otamendi, And Javier O drzej Bargiela, 2006. [7] J. D. Mornin ngred, B. E. Paaden, D. E. Seeborg, and D. A. Mel llichamp, “An adaptive nonli e inear predictive controller,” oc. in Pro Amer. Co ontrol Confer rence., vol. 2 2,,pp. 1614– 1619,19 990. [8] N. Kishor, “Nonlinear p predictive cont trol to track ed deviate power of an identified N NNARX model of a hydro Fig se a ontroller gure 7: Respons graph with and without co plant”. Expert Syste ems with App plications 35, 1741–1751, 2008. [9] he, Tan, Y. and Cauwenbergh A. “Non-lin near one step ahead control using neural netwo orks: control strategy and 42 http://sites.google.com/site/ijcsis/ ISSN 1947-5500 (IJCSIS) International Journal of Computer Science and Information Security, Vol. 10, No. 7, July 2012 stability design”, Automatica, vol 32, no. 12, 1701-1706, 1996. [10] Dan, W.P., 1996. Artificial Neural Networks- Theory and Applications. Prentice Hall, Upper Saddle River, New Jersey, USA. [11] S.A.Billings, and W.S.F. Voon, “Correlation based model validity tests for nonlinear models. International Journal of Control, 44, 235–244.1986. AUTHORS PROFILE Author is presently working as Assistant Professor in Electrical and Electronics Department of Takshshila Institute of Engineering and Technology. He received the Masters degree in Electrical Engineering with specialization in Control Systems Engineering from Jabalpur Engineering College. His area of specialization is in Neural Networks, Control Systems, Fuzzy Logic. 43 http://sites.google.com/site/ijcsis/ ISSN 1947-5500