experimental techniques - American Chemical Society

behavior of a continuous stirred tank reactor (CSTR) with the aid of a digital ... and software involved in the development and operation of such a sy...
0 downloads 0 Views 494KB Size
Ind. Eng. Chem. Fundam. 1983, 2 2 , 145-149

145

EXPERIMENTAL TECHNIQUES Partial Simulation and Control of a Continuous Stirred Tank Reactor with a Digital Computer Doble Mukesh' and A. R. Cooper' Department of Chemhi Engineerhg, Univers& of Aston in Birmingham, Birrnhgham 84 IET, U.K.

A partial simulation technique, in which certain difficult chemical operations are simulated while the other effects are actually performed on process equipment, has been exploited to its full advantage in the study of the dynamic behavior of a continuous stirred tank reactor (CSTR) with the aid of a digital computer. The computer calculates the exothermic heat generation rate depending on the reaction order and other operating and reaction rate parameters. Appropriate signals applied to the immersion heaters provided in the vessel liberated the corresponding heat. This paper deals with the hardware and software involved in the development and operation of such a system. The versatility and powerfulness of this technique are brought out when various reaction orders and complicated

control schemes are simulated with ease.

Introduction The dynamic behavior of a chemical process system is generally studied either theoretically (total simulation) or entirely by experiments on laboratory scale equipment. These two techniques have their own advantages and disadvantages inherent in them. Total simulation with a digital computer is flexible and easy but it may deviate too much from the real case if the system is not truly represented by the mathematical model. Although experimental work gives the true behavior of the system, it involves many technical and economic problems such as corrosion, safety, waste disposal, cost, and most important of all, finding a convenient reaction medium which can be studied within a reasonable range of instruments. A partial simulation technique, in which certain chemical operations are simulated while the other effects are actually performed on process equipment, has never been exploited to its full advantage. This technique does not deviate too much from practicality and at the same time incorporates a few of the advantages of total simulation. In this work the dynamic behavior of a continuous stirred tank reactor is studied by the partial simulation technique with a digital computer. A digital computer simulates the kinetics of an exothermic chemical reaction taking place inside a jacketed reactor. The computer calculates the heat generated during the process of reaction and sends signals to immersion heaters provided inside the vessel, thereby releasing the appropriate heat, while the heat effects are measured from the plant. Water is used as the reactant as well as the cooling medium. The cooling water flow rate is used as the manipulative variable, and its required value is also calculated by the computer which then transmits the appropriate signal to the control valve.

perimental work connected with the study of the dynamic behavior of a CSTR deals with the second-order exothermic chemical reaction between sodium thiosulfate and hydrogen peroxide (Vejtasa and Schmitz, 1970; Chang and Schmitz, 1975a,b; Schmitz et al., 1979). These authors have mainly studied the stabilization of unstable equilibrium points and the construction of phase-plane diagrams for the existence of limit cycles. Baccaro et al. (1970) studied the hydrolysis of acetyl chloride and Heemskerk et al. (1980) studied the hydrolysis of 2,3-epoxypropanol-l in a CSTR, mainly to establish the existence of limit cycles. Work on the partial simulation technique has been going on in this department for some time. Buxton (1971) and Chao (1972) used this technique to simulate a CSTR with the aid of an analog computer. A conventional type of controller was used by these authors. Farabi (1978) studied the advantages of a cascade control scheme on a CSTR using a digital computer. The present study shows the flexibility of this technique by simulating different reaction orders and various control schemes with ease. The study also involves the development of software for simulating, plotting, and control of the CSTR system using a Honeywell 316 computer (Mukesh, 1980).

Literature Review

FpC,(T, - )'2 - UA(T - T,.)+ koAHc"V exp(-E/RT) = VpC,(dT/dt) (2)

From the literature it can be seen that most of the ex-

Mathematical Model An exothermic nth order chemical reaction taking place in a jacketed continuous stirred tank reactor can be mathematicallyrepresented by three differential equations for the mass and energy balance in the reactor and energy balance in jacket as

F(C0 - C) - k0C"V exp(-E/RT) = V(dc/dt)

Department of Chemical Engineering, University of Cambridge, Pembroke Street, Cambridge, CB2 3RA, U.K. 0196-4313/83/1022-0145$01.50/0

0 1983 American Chemical Society

(1)

146

No. I , 1983

Ind. Eng. Chem. Fundam., Vol. 22,

Table I. Reaction Parameters n 0 1 2

E , kJ/kg-mol K 52104.7 3 42119.21 32112.76

ko 2 x l o 6 kg/m3 s 200 s-' 2 m3/kg s

heat removal = FpC,((T,, - To))+ UA(T,, - T,,,)

Tc,, = ( F c ~ c C c p+T UA ~ T,)/(F,p,C, Figure 1. Schematic diagram of the plant and the computer system.

VALVE

4

+ UA)

(5)

(7)

The three system variables C, T, and T, can be written in dimensionless deviation variable form and substituted into eq 1-3 to arrive at the following state equations

SC4N

THERMOCOUPLES

where X, Y , and Z correspond to tank concentration, temperature, and jacket temperature respectively. Po and yoare perturbations in feed and coolant temperatures. Fc is the perturbation of coolant flow rate from its steadystate value and depends on the control strategy chosen. For proportional control of tank temperature it takes the form

+

Fc = KcY

%EO.=E X P I:

In the partial simulation technique the instantaneous concentration of the reactant in the reactor is calculated by numerically integrating eq 8 for a value of Y, measured with thermocouples. The reaction rate parameters and other steady-state conditions are input to the computer. Once the concentration is known, the heat generated during the process of chemical reaction (analogous to eq 4) is calculated and the signals sent to the immersion heaters provided in the tank to liberate the appropriate heat.

T!ME &CONTROLLER

INITIALISE '!ME

4

OTHER PLOT1 N G PARAMETERS

-I S C A N 4 CALCLLATE

2 TEMPERATURES

CCNCEN'RA-I~N

i

CALCULAlE V4LVE SETTINZS 8, OUTPLT5G\AL

i TIME

TME +

DEL1

1 Figure 2. Flow sheet of computer program.

The following set of steady-state equations can be obtained by equating the right-hand sides of eq 1-3 to zero. heat generation = AHVk0C,," exp(-E/RT,,)

(11)

(4)

Experimental Setup Figure 1gives the complete experimental arrangement. The reactor consists of a jacketed vessel fitted with stirrers for complete mixing. Immersion heaters are provided inside the tank for liberating the appropriate heat. The reactant and coolant volume in the tank and jacket are maintained constant by overflow arrangements. The temperatures of feed, coolant, and of the tank and jacket contents are measured by thermocouples. A turbine flowmeter is provided to monitor the feed rate. The signals from the thermocouples and the turbine flowmeter are converted to digital form and transmitted to the computer. The diaphragm-operated control valve manipulates the coolant flow rate in response to the signals from the computer. Water is used as the reactant as well as the coolant medium. A thyristor unit regulates the voltage to the immersion heaters depending upon the signals from the computer. A step change in feed temperature or flow rate can be applied using the solenoid valve assembly provided. Similarly, provisions are made for step changes in coolant flow rate. An analog digital input-output system interfaces the plant to the computer by converting analog voltages from

Ind. Eng. Chem. Fundam., Vol. 22, No. 1, 1983

147

Table 11. Steady-State Operating Conditions reaction figure order 4 2 5 1

F, m3/ sx 3.75 5

F,, m 3 / sx 3.333 3.333

To,K

Tco, K

283.41 287.47

282.58 287.8

T,, K

theoret temp, K 301.61 304.37 309.87 296.67 306.67 304.71 313.51 302.68 311.47 296.41 306.61 301.99 312.39

Tcs, K

C,

301.4 30 5

kg/m3 19.117 19.225

292 296.5

6

0

4.792

3.167

286.47

286.65

296.22

19.56

291.71

7

1

5.417

5

288.91

289.21

304.92

19.286

295.19

8

1

4.583

3.667

287.47

285.31

302.8

19.25

294.12

9

0

4.583

4.0

287.61

283.07

296.66

19.525

289.19

10

1

4.792

3.6

286.99

286.37

312.39

18.888

300.1

S S

U

s

U S U S U S

U

s

U

Table 111. Transient Response initial perturbations

-

Figure 4 5 6 7

8 9

10

load C, change, kg/m3 T , , K To

control strategy

r,K

openloop openloop openloop eq11, K , = 0.003 eq 1 2 , K , = 0.01 eq 1 3 , K , = 0.06 eq11, K , = 0.02

12.5 8

0.8

3.5 2.0

10.5

-

2.5

12.5

-

5.5

0

-5.5

0

2.6

-

THEORETICAL OP. TEMPR.

-6

KEY:

31.37 5 . 1

i

142 THEORETICAL HEAT GNqREM 3 EXPTL. TANK TEMPR.

plant to digital signals to the computer and vice versa.

Computer Hardware The Honeywell 316 is a computer for real time system applications involving on-line control, data logging, data formatting, and process monitoring. Various peripherals and the real time clock are connected to a single interrupt line provided. The computer supports a visual display unit, a magnetic cassette tape unit for input and output, a high-speed paper tape reader and punch, and a floppy disk unit for mass storage. The Honeywell analog digital input-output system (HADIOS), which interfaces the computer to a range of input-output devices in on-line applications can support up to 48 analog input channels, three counters input, and up to three digital outputs. Computer Software The digital computer can run programs written in Fortran, BASIC, or DAP 16 with provisions for mixed language segments. The development of software is the most important step in the application of the partial simulation technique for chemical process systems. In mathematical computing one is concerned solely with the solution of the problem, be it by analysis or simulation. This is also an element of on-line computing, but an equally important aspect is programming for a pattern of behavior. One is programming for a system of which the computer is only a part. The most important aspect of on-line computing that is not present in off-line is control, signal processing, and the identifications, and the modeling of the system. The most important consideration a programmer should give for on-line computing is timing. He may be faced with the situation where there is an upper bound to the available time. An example of this is the case in which it is essential to perform certain calculations between suc-

Figure 3. Typical computer output at the end of steady-state section (for order = 1).

.omt

I

I

11

,

,

,

,

1

-82

'

,

,

IC

,

O

6I -

'50° O

TIME(SECS:

WE(SECS)

15O3

Figure 4. Open-loop studies, initial perturbations in state variables for reaction order = 2.

T

r

C

)

H

1

/

-

-

-

-

-

;

;

;

)

30

O

:IME[SECS)

TIME(SEC3)

I5O0

Figure 5. Open-loop studies, initial perturbation in state variables for reaction order = 1.

cessive samples of a signal, yet maintain the highest possible sampling speed. Another important consideration

148

Ind. Eng. Chem. Fundam., Vol. 22, No, 1, 1883

221

9

8

4

TIME(SEC5)

n

J

17

i2G0G

1200

TIME(SEC3)

Figure 6. Open-loop studies, step in feed temperature, reaction order = 0.

19k-----d+----10

T ME(SEC9)

T!ME (SECS)

3003

Figure 9. Generation of limit-cycle around open-loop stable point, reaction order = 0.

IF'

31 0

TlME(SECS1

150C 0

1500

TlME(SECS)

Figure 7. Proportional feedback control of tank temperature, reaction order = 1.

'

15

'

TIME ' (SEC ' S) '

'

15CO

Figure 8. Proportional feedback control of jacket temperature, reaction order = 1.

the programmer must give is the ease with which he can change certain segments of his program and run it as quickly as he can. The main executive is written in the BASIC language, so that communication between the operator and the computer is very easy. This executive calls many subroutines written in Fortran or DAP 16 to perform the various tasks. Subroutines 1 and 2 together form the main scanning routine. The contents of various analog and counter channels are assessed by these routines. Subroutines 3, 4, and 5 are used to output digital signals to various devices specified, namely the thyristor unit and the control valve. Subroutine 6 is the simulator which calculates the instantaneous reactants concentration for a given tank temperature and other reaction rate parameters. The routine numerically integrates eq 8 by the Runge-Kutta fixed-step method. Subroutine 7 consists of the complete Tetronix graphics library routines and is used to perform various plotting facilities. Subroutine 8 is the housekeeping routine which is used to direct results either to the visual display unit or the paper tape punch, to deduce the real

3

'

0

w

t 8 2633 C T~ME(sEcS)

I

I

,

I

,

TIME:SE:S!

I

I

,

I

,115 16c0

Figure 10. Stabilizing open-loop unstable operating point by proportional feedback controller, reaction order = 1.

time taken by the computer to execute a set of BASIC program commands, or to halt the computer execution for the programmer's intervention. The Honeywell 316 computer used for the present work has a core size of 16K, which is not sufficient for large simulation and control routines, so a subroutine to transfer segments of program from a floppy disk into core, when required, is added so as to overcome this limitation. This overlaying routine is core resident and can be called from the BASIC program whenever it is required to transfer other routines into core. Although this swapping of various segments into core increases sampling time, it overcomes the limitation of core space. The main executive program is BASIC is of two parts, the steady-state and the transient studies section. In the first section given, the feed and coolant flow rates, the computer plots the heat generation and removal lines (eq 4 and 5) and also marks the present position of tank temperature. This gives an exact picture of the experimental tank temperature in relation to its theoretical steady-state value. The system is then moved to the theoretical steady-state operating point by manipulating the operating parameters, which is analogous to startup of a reactor from cold conditions. Once the experimental points coincide with the required accuracy the dynamic behavior of the system can be studied. In the second section, the dynamic behavior of the system is plotted for any given simulation time. The load changes or perturbations are made manually on the plant. The coolant flow rate is calculated depending on the control strategy chosen and plots are made of the system variables such as tank temperature and concentration, jacket temperature, and coolant flow rate. The flow chart of the executive is given in Figure 2.

Results and Discussions The reactor system is operated for the set of conditions

Ind. Eng. Chem. Fundam., Vol. 22, No. 1,

given in Table I, and the theoretical heat generation, removal, and experimental values are shown in Figure 3 as output by the computer. The transient behavior of the CSTR is shown in Figures 4-10 for the set of operating conditions given in Tables I1 and 111. The open loop response of the reactor for different reaction orders is shown in Figures 4-6. Figure 6 gives the system behavior for a step in feed inlet temperature while Figure 4 and 5 the system response for different starting conditions. Figure 5 shows that the system is unstable for this set of initial conditions. This type of behavior cannot be studied through pure experimental work without thinking about the risk involved. The region of asymptotic stability of the reactor for a given order of reaction can be mapped by plotting the system behavior for various initial conditions. Experiments on closed-loop response for different control strategies are shown in Figures 7-10. Though complicated control schemes such as decoupling type control or invariance control have been tried on the system, separate papers deal with those types of control strategies. Figure 7 shows the system behavior for proportional control of the type given in eq 11 while Figures 8 and 9 give the system behavior for control schemes of the type given in the following two equations, respectively.

Fc = K J

(12)

Fc = -KcX (13) Equation 12 is the control of jacket temperature; the other is the control of tank concentration, acting in a reverse direction. This control strategy is used to generate a stable limit cycle at the steady-state point, as can be seen from Figure 9. Figure 10 shows that the open-loop unstable operating point of the reactor is stabilized by a simple proportional controller of the type given in eq 11. Here the system is being moved from the open-loop stable to the unstable point by the controller. Conclusions A partial simulation technique, which couples theoretical simulation and plant items to allow experimentation, is used to study the dynamic behavior of a continuous stirred tank reactor. A digital computer simulates the chemical reaction taking place in the reactor while the heat effects between the reactor and the cooling jacket are actually measured from the setup. The computer calculates the instantaneous concentration, the heat generated during the exothermic chemical reaction, and the value of the manipulated variable. The superiority of this technique over other methods is easily brought out by simulating various reaction orders and control schemes with ease. Acknowledgment Financial assistance from the Commonwealth Scholarship Commission in the U.K. for Doble Mukesh is gratefully acknowledged.

1983

149

E = activation energy, kJ/kg-mol K F = feed flow rate, m3/s F, =coolant flow rate, m3/s F,,% = maximum permissible coolant flow rate = 1.5 x /s

ko = frequency factor K, = proportional gain, m3/s Q = E b/R R = universal gas constant = 8.2899 kJ/kg-mol K R(z,Y) = Arrhenius ty e reaction rate equation = ( ( x

8

as8)ne-Q/Cv+Bd - as,ne- I&) 71 = 1 / 7 1/70

+

+

= 1/7, + 1/71 T = tank temperature, K T , = jacket temperature, K

72

U A = heat transfer coefficient X area = 0.1507 kJ/K s V = volume of reactor = 17.3 X m3 Vc = volume of jacket = 8.532 X m3 b = pCp/AHCo,K-l t = time, s

x = c/co y = Tb z = Tcb “88

=

c*s/co

= Ts,b Po = Tob Y s s = TC& Yo = Tcob YO08 = Tcoseb p , p C = density of feed and coolant = 1000 kg/m3 T = residence time of reactor = V / F , s T~ = residence time of jacket = Vc/Fc,s 1 / 7 0 = UA/VpCp 1/71 = ~A/VCP,C,C AH = heat of reaction = -125604 kJ/kg-mol Pss

Subscripts

ss = denotes steady state condition c = coolant stream 0 = inlet conditions s = open loop stable point u = open loop unstable point Superscript -=

perturbation value

Literature Cited Baccaro, G. P.; Gaitonde, N. Y. Douglas, J. M. AIChEJ. 1970, 76. 249. Buxton, B. Ph.D. Thesis, University of Aston in Birmingham, 1971. Chang, M.; Schmitz, R. A. Chem. Eng. Sci. 1975a, 30, 21. Chang, M.; Schmitz, R. A. Chem. Eng. Sci. 1975b, 30, 249. Chao, Y. C. Ph.D. Thesis, University of Aston in Birmingham, 1972. Farabi, H. Ph.D. Thesis, University of Aston in Birmingham, 1978. Heemskerk, A. H.; Dommers, W. R.; Fortuin, J. M. Chem. Eng. Sci. 1980, 35(1/2), 439. Mukesh, D. Ph.D. Thesis, University of Aston in Birmingham, 1980. Schmitz, R. A.; Bautz, W. H.; Uppal, A.; Ray, W. H. AIChEJ. 1979, 25(2). 289. Vejtasa, S.A.; Schmitz, R. A. AIChE J . 1970, 76(3), 410

Nomenclature C = concentration, kg/m3 C,, C, = specific heat of feed and coolant = 4.1868 kJ/kg K

Received for review August 25, 1981 Revised manuscript received October 4, 1982 Accepted October 20, 1982