Report

Wavelet Neural Control Of Cascaded Continuous Stirred Tank Reactors Tariq Ahamed AIM The main objective of the project is to control the concentration of reactant in the CSTR. The tank is controlled by manipulating the coolant flow rate. The system is subjected to step changes and load disturbances and the responses by different controllers are noted. CSTR- Model CA0 Feed qc Inputs States T1 CA1 T2 CA2 Reaction A B Product Input= Coolant Flow rate (L/min) : qc = u; States: Concentration of A in Reactor #1 (mol/L) : Ca1 = y(1); Temperature of Reactor #1 (K) : T1 = y(2); Concentration of A in Reactor #2 (mol/L) : Ca2 = y(3); Temperature of Reactor #2 (K) : T2 = y(4); The component balance Rate of change of ‘A’ inside the tank Rate of change of ‘A’ caused by chemical reaction Rate of flow of ‘A’ in dV1C A1 q C A0 qC A1 V1kC A1 dt Rate of flow of ‘A’ out E dCA1 q C Af C A1 C A1e RT1 dt V1 Where, q= inlet feed rate Caf= feed concentration of A V1= volume of reactor 1 = pre exponential factor for A->B E/R= Activation energy The energy balance Rate of flow of energy into CSTR Rate of change of liquid energy dT1C p V dt qCp T f T1 Q HV1kCA1 Rate at which energy is generated due to chemical reaction Heat removal through energy jacket dT1 qT f T1 C pc c qc U q C 1 e A1 c c pc Tcf T1 He V1 V1C p dt Where, Feed Temperature (K) : Tf Coolant Temperature (K) : Tcf Overall Heat Transfer Coefficient : UA1 Heat of Reaction: dH Density of Fluid (g/L): rho Density of Coolant Fluid (g/L): rhoc Heat Capacity of Fluid (J/g-K): Cp Heat Capacity of Coolant Fluid (J/g-K): Cpc E RT1 C A1 Cp Controller Design PID controller Direct Inverse Controller Internal Model Controller The neural controllers are also modeled in Wavelet Network. PID control The differential form of PID control is given as: e= Creq- Ca(t) And ek-1 and ek-2 are past values of error. Steady state initial conditions are given. Required concentration of A in reactor 2 is given Parameters Cohen Coon method was used to arrive at the following values of Kp, Ki and Kd. Ki= 304.9508 sec-1 Kp= 10.628 mol/L/sec Kd= 0.0005907 sec Graph for multiple set point tracking. -3 x 10 Concentration of A (mol/L) 6.5 6 5.5 5 4.5 4 3.5 0 100 200 300 400 500 600 Time(sec) Values Rise Time (sec) Peak Overshoot Settling Time (sec) Offset 23 0 74 0 Neural Network Training A chirp signal (coolant flow rate) is given as input to the Continuous Stirred Tank Reactor and output (concentration of A) is taken. This pattern is divided in the columns of past inputs, past outputs, present output and required output. The training of the network is done by feeding the feed forward net with the pattern and adjusting the weights until the error is reduced. The training uses Levenberg Marquardt algorithm. ANN based DIC u f 1 u(1),u(2), y(1), y, y(1) The neural network consisted of 3 layers with 9 sigmoidal neurons in the hidden layer. The learning rate was 0.3. Activation function- tansig -3 x 10 5 Coolant Flow Rate (L/min) Concentration of A (mol/L) 6.5 6 5.5 5 4.5 4 3.5 0 100 200 300 400 500 3 2 1 0 600 Time(sec) Rise Time (sec) 4 0 50 100 150 200 250 300 350 Time(sec) Peak Overshoot Settling Time (sec) Offset Load disturbance settling (Load given for 150 sec) Values 5 0.00004 25 0 171 400 ANN based IMC The inverse network was same as the Direct Inverse Controller network. The forward network had 1 input, 1 hidden layer with 4 neurons and 1 output. The learning rate was 0.01. Activation function- tansig -3 x 10 5 Coolant Flow Rate (L/min) Concentration of A (mol/L) 6.5 6 5.5 5 4.5 4 3.5 0 100 200 300 400 500 3 2 1 0 600 Time(sec) Rise Time (sec) 4 0 50 100 150 200 250 300 350 Time(sec) Peak Overshoot Settling Time (sec) Offset Load disturbance settling (Load given for 150 sec) Values 14 0 24 0 16 400 Training the neural controllers using Wavelet Neural Network Shannon Filter sin 2 sin h( ) where t b a WNN based DIC The inverse neural model here consisted of 5 inputs, 1 hidden layer with 7 shannon neurons and 1 output. The learning rate was 0.064. -3 x 10 5 Coolant Flow Rate (L/min) Concentration of A (mol/L) 6.5 6 5.5 5 4.5 4 3.5 0 100 200 -3 300 400 500 3 2 1 0 600 Time(sec) x 10 4 0 50 100 150 200 250 300 350 Time(sec) Concentration of A (mol/L) 6.5 6 5.5 5 4.5 4 3.5 0 100 200 300 400 500 Time(sec) Rise Time (sec) Peak Overshoot 600 Settling Time (sec) Offset Load disturbance settling (Load given for 150 sec) Values 3 0.000136 24 0 167 400 WNN based IMC The forward model had 3 inputs, 1 output and 1 hidden layer with 5 shannon neurons with the learning rate of 0.01. -3 x 10 5 Coolant Flow Rate (L/min) Concentration of A (mol/L) 6.5 6 5.5 5 4.5 4 3.5 0 100 200 300 400 500 3 2 1 0 600 Time(sec) Rise Time (sec) 4 0 50 100 150 200 250 300 350 Time(sec) Peak Overshoot Settling Time (sec) Offset Load disturbance settling (Load given for 150 sec) Values 14 0 22 0 14 400 Results Controller Rise Time (sec) Peak Overshoot Settling time (sec) Offset (mol/L) Load disturbance settling (Load given for 150 sec) PID 23 0 74 0 - DIC 5 0.00004 25 0 171 IMC 14 0 24 0 16 DIC-WNN 3 0.000136 24 0 167 IMC-WNN 14 0 22 0 14 ANN- DIC WNN- DIC ANN- IMC WNN- IMC