NIRMA UNIVERSITTY JOURNAL OF ENGINEERING AND TECHNOLOGY, VOL.1, NO.1, JAN-JUN 2010 45 Application of MATLAB in Process Control: Case Study for First Order Reaction in a CSTR R Oza, N Shah, D G Tadse and M H Joshipura Abstract—Since the last three decades, structure of the chem- ical processes has become increasingly complex, due to better management of energy and raw materials. As a consequence, the design of control systems has become the focal point in industries today. Any chemical process needs to be controlled for various purposes, such as environmental regulations, safety, economic considerations; product quality etc. in the present work, isothermal continuous stirred tank reactor (CSTR) is modeled for first order reactions. The non linear equations so obtained were linearized and converted in to the transfer function. These model equations were solved at steady and dynamic mode, and the concentration is obtained as a function of time. The transfer function developed was used to tune the system. The tuning parameters were then determined by a trial and error method. Index Terms—Feedback control system, isothermal continuous stirred tank reactor, first order reactions, tuning parameters I. I NTRODUCTION Structure of chemical process has seen a major change in the last decade. The change has been due to environmental legislation, safety considerations, energy and raw material minimization, product quality to name a few. During its operation, a chemical plant must satisfy several requirements imposed by the designers and the general technical, social and economic conditions in the presence of ever-changing external disturbances. As a consequence, the design of control systems has become the focal point in industries today [1]. Tuning of a controller is done by a trial and error method. This can be very tedious if done manually as the optimum values of the parameters of the same controller might be different for different processes. Hence, we can use some computer aided techniques to speed-up the controller tuning. SIMULIK is one such widely used software provided by Mathworks Inc., which is an add on tool of MATLAB. II. I NTRODUCTION TO MODELING AND SIMULATION Process Simulation includes description of the part of the real world that needs to be simulated, representation of this part of the real world in terms of a model (modeling), and solution of the mathematical model to obtain numbers or symbols - Simulation[2], [3]. Rachit Oza is with Anil Products Limited e-mail:rachitoza@gmail.com, N.Shah is with Unimark Remedies Limited e-mail:nikhilbk87@yahoo.com, D. G. Tadse is with Hamon Shriram Cottrell Pvt. Ltd.e- mail:deepak.tadse@gmail.com and M.H. joshipura is with Department of Chemical Engineering, Institute of Technology, Nirma University e-mail:milind.joshipura@nirmauni.ac.in III. MATLAB AND SIMULINK MATLAB is an interactive system for doing numerical com- putations. It has evolved into a successful commercial software package. MATLAB relieves you of a lot of the mundane tasks associated with solving problems numerically.[4] SIMULINK, a companion program to MATLAB, is an interactive system for simulating nonlinear dynamic systems. It is a graphical mouse-driven program that allows you to model a system by drawing a block diagram on the screen and manipulating it dynamically. IV. CONTROL SYSTEM BASICS [1], [5] The different components constituting a control system are represented by means of a block diagram to develop the functional relationship between the input and output variables for each component of a control system. The block diagram of feedback control system is shown in Fig. 1. Fig. 1. Block diagram of a feedback control system V. I NTRODUCTION TO CHEMICAL REACTORS Chemical reactors are generally the most important unit operations in a chemical plant. Chemical reactors come in many forms, but two of the most common idealizations are the continuous stirred tank reactor (CSTR) and the plug flow reactor (PFR). These two types serve as ’limiting bounds’ for the behavior of many operating reactors. The CSTR is often used in dynamic modeling studies, because it can be modeled as a lumped parameter system. A dynamic model of a plug flow reactor consists of partial differential equations (also known as a distributed parameter system). Consider the continuous stirred tank reactor. We will assume that the reactor is operating at a constant temperature (it is isothermal), so we do not need an energy balance (and can also assume that the reaction rate parameters are constant). In addition, we will assume that the volume is constant. The first order reaction scheme with a number of interesting characteristics is presented below.