You are on page 1of 30

CHE403

Chemical Process
Control
Assistant Professor
Betül Gürünlü, PhD
Fall, 2023
1
Course Description
Course: CHE403 Chemical Process Control
Instructor: Assistant Professor Betül Gürünlü
Text: Seborg, D.E., Process Dynamics and Control,
4th Ed., Wiley, USA, 2017.
Course Objective: To study the application of
advanced control methods to chemical and
electronic manufacturing processes
Course Policies:
• One midterm exam (30%),
• Quizzes (10%),
• Attendance (5%),
• Three homeworks (15%),
• A final exam (40%)
2
3
4
To generate a MATLAB code for Example 2.5, we first need to define
the model equations as ODEs. From the given information, the two-
state variables are the concentration of A (CA) and the reactor
temperature T, and the manipulated variable is the jacket water
temperature, Te. The model equations for the exothermic,
irreversible first-order reaction A→B are:

where tau = V/FA0 is the space time, FA0 is the inlet molar flow rate
of A, rho is the density of the reactor contents, and Cp is the heat
capacity of the reactor contents. The other parameters are given in
Table 2.3.

5
Next, we can use MATLAB's ode15s function to solve the ODEs
numerically over a 10 min horizon. We can define a function
that takes the current values of CA, T, and Te, and returns the
derivatives of CA and T. This function can be passed to ode15s
along with the initial values of CA and T, and the initial value of
Te for each of the two cases.

Finally, we can plot the results using MATLAB's plot function,


with time on the x-axis and CA and T on the y-axes. We can
generate separate plots for the two cases, one for the
increased cooling and one for the reduced cooling rate.

6
% Define model parameters
V = 100; % L
FA0 = 100; % L/min
CAI = 1; % mol/L
ko = 7.2e10; % min^-1
EIR = 8750; % K
UA = 5e4; % J/min K
rho = 1000; % g/L
Cp = 0.239; % J/g K
delta_H_rxn = -5e4; % J/mol
T0 = 300; % K
CA0 = 0.5; % mol/L

% Define model equations as ODEs


tau = V/FA0;
dCAdt = @(t, CA, T, Te) (CAI - CA)/tau - ko*exp(-EIR/T)*CA;
dTdt = @(t, CA, T, Te) (UA/V)*(Te - T) -
(delta_H_rxn/(rho*Cp))*ko*exp(-EIR/T)*CA;

7
% Define initial conditions and time horizon
tspan = [0, 10];
CA_0 = CA0;
T_0 = T0;
Te_inc = 290; % K
Te_dec = 305; % K

% Simulate increased cooling


Te = Te_inc;
[t_inc, y_inc] = ode15s(@(t, y) [dCAdt(t, y(1), y(2), Te); dTdt(t,
y(1), y(2), Te)], tspan, [CA_0, T_0]);
CA_inc = y_inc(:,1);
T_inc = y_inc(:,2);

% Simulate reduced cooling rate


Te = Te_dec;
[t_dec, y_dec] = ode15s(@(t, y) [dCAdt(t, y(1), y(2), Te); dTdt(t,
y(1), y(2), Te)], tspan, [CA_0, T_0]);
CA_dec = y_dec(:,1);
T_dec=y_dec(:,2);
8
% Plot results
figure;
subplot(2,1,1);
plot(t_inc, T_inc, t_dec, T_dec);
xlabel('Time (min)');
ylabel('Reactor Temperature (K)');
title('Effect of Step Change in Cooling Temperature on CSTR
Temperature');
legend('Increased Cooling', 'Reduced Cooling');

subplot(2,1,2);
plot(t_inc, CA_inc, t_dec, CA_dec);
xlabel('Time (min)');
ylabel('Reactant Concentration (mol/L)');
title('Effect of Step Change in Cooling Temperature on CSTR
Reactant Concentration');
legend('Increased Cooling', 'Reduced Cooling');

9
10
11
2.4.7 Staged Systems (a Three-Stage Absorber)
The most important examples of staged processes
include distillation, absorption, and extraction. The
stages are usually arranged as a cascade with
immiscible or partially miscible materials (the separate
phases) flowing either cocurrently or countercurrently.
Countercurrent contacting, shown in Fig. 2.9, usually
permits the highest degree of separation to be attained
in a fixed number of stages and is considered here.

For the three-stage absorption unit shown in Fig. 2.10,


a gas phase is introduced at the bottom (molar flow
rate G) and a single component is to be absorbed into a
liquid phase introduced at the top (molar flow rate L,
flowing countercurrently). A practical example of such
a process is the removal of sulfur dioxide (SO2) from
combustion gas by use of a liquid absorbent.

12
The gas passes up through the perforated (sieve) trays and contacts the
liquid cascading down through them. A series of weirs and downcomers
typically are used to retain a significant holdup of liquid on each stage
while forcing the gas to flow upward through the perforations. Because of
intimate mixing, we can assume that the component to be absorbed is in
equilibrium between the gas and liquid streams leaving each stage i. For
example, a simple linear relation is often assumed. For stage i

where yi and xi denote gas and liquid concentrations of the absorbed


component. Assuming constant liquid holdup H and perfect mixing on each
stage, and neglect- ing the holdup of gas, the component material balance
for any stage i is

13
In Eq. 2-71, we also assume that molar liquid and gas flow rates L and G are
unaffected by the absorption, because changes in concentration of the absorbed
com- ponent are small, and L and G are approximately con- stant. Substituting
Eq. 2-70 into Eq. 2-71 yields

Dividing by L and substituting τ = H/L (the stage liquid residence time), S =


aG/L (the stripping factor), and K = G/L (the gas-to-liquid ratio), the following
model is obtained for the three-stage absorber:

14
In the model of Eqs. 2-73 to 2-75, note that the individual equations are linear but
also coupled, meaning that each output variable—x1 , x2 , x3 —appears in more than
one equation. This feature can make it difficult to convert these three equations
into a single higher-order equation in one of the outputs, as was done in Eq. 2-49.

2.4.8 Fed-Batch Bioreactor

In general, bioreactions are characterized by the con- version of feed material


(or substrate) into products and cell mass (or biomass). The reactions are
typically catalyzed by enzymes. When the objective is to produce cells, a small
amount of cells (inoculum) is added to initiate subsequent cell growth. A broad
class of bioreactions can be represented in simplified form as
cells + substrate → more cells + products (2-76)
The stoichiometry of bioreactions can be very complex and depends on many
factors that include the environmental conditions in the vicinity of the cells. For
simplicity we consider the class of bioreactions where the substrate contains a
single limiting nutrient and only one product results. The following yield
coefficients are based on the reaction stoichiometry:

15
Many important bioreactors are operated in a semi-continuous manner that is
referred to as fed-batch operation, which is illustrated in Fig. 2.11. A feed stream
containing substrate is introduced to the fed-batch reactor continually. The mass
flow rate is denoted by F and the substrate mass concentration by Sf. Because there
is no exit stream, the volume V of the bioreactor contents increases during the
batch. The advantage of fed-batch operation is that it allows the substrate
concentration to be maintained at a desired level, in contrast to batch reactors
where the substrate concentration varies continually throughout the batch

16
• Fed-batch operation is used to manufacture many important industrial
products, including antibiotics and protein pharmaceuticals. In batch and
fed-batch reactors, cell growth occurs in different stages after the inoculum
is introduced.

• We will consider only the exponential growth stage where the cell growth
rate is autocatalytic and is assumed to be proportional to the cell
concentration. A standard reaction rate expres- sion to describe the rate of
cell growth with a single limiting substrate is given by

• where rg is the rate of cell growth per unit volume, X is the cell mass, and μ
is the specific growth rate, which is well described by the Monod equation:

17
Note that μ has units of reciprocal time—for example, h-1. Model parameter μmax
is referred to as the maximum growth rate, because μ has a maximum value of μmax
when S ≫ KS. The second model parameter, KS, is called the Monod constant. The
Monod equation has the same form as the Michaelis–Menten equation, a stan-
dard rate expression for enzyme reactions. More complex versions of the specific
growth rate are possible including, for example, product inhibition.

A dynamic model for the fed-batch bioreactor


1.The cells are growing exponentially.
2.The fed-batch reactor is perfectly mixed.
3.Heat effects are small so that isothermal reactor operation can be assumed.
4. The liquid density is constant.
5.The broth in the bioreactor consists of liquid plus solid material (i.e., cell mass).
This heterogeneous mixture can be approximated as a homogeneous liquid.
6.The rate of cell growth rg is given by Eqs. 2-80 and 2-81.
7.The rate of product formation per unit volume rp can be expressed as

8.The feed stream is sterile and thus contains no cells.

18
The dynamic model of the fed-batch reactor consists of individual balances for
substrate, cell mass, and product, plus an overall mass balance. The general form of
each balance is

The individual component balances are

where P is the mass concentration of the product and V is reactor volume.


Reaction rates rg and rp and yield coefficients were defined in Eqs. 2-77
through 2-82. The overall mass balance (assuming constant density) is

19
The dynamic model is simulated for two different feed rates (0.02 and 0.05 L/h).
Figure 2.12 shows the profile of cell, product, and substrate concentration, together
with liquid volume in the reactor. The model parameters and simulation conditions
are given in Table 2.4. For different feed rates, the bioreactor gives different
responses; thus, the product can be maximized by varying F.

20
PROCESS DYNAMICS AND MATHEMATICAL MODELS
Once a dynamic model has been developed, it can be solved for a variety of conditions
that include changes in the input variables or variations in the model parameters.

The transient responses of the output variables as functions of time are calculated by
numerical integration after specifying the initial conditions, the inputs and the time
interval at which the system is to be integrated.

A large number of numerical integration techniques are available, ranging from simple
techniques (e.g., the Euler and Runge–Kutta methods) to more complicated ones (e.g.,
the implicit Euler and Gear methods).

Although a dynamic model can always be solved in principle, for some situations it
may be difficult to generate useful numerical solutions.

Dynamic models that exhibit a wide range of time scales (stiff equations) are quite
difficult to solve accurately in a reasonable amount of computation time.

Websites for the following popular software packages are given at the end of the
chapter: MATLAB, Mathematica, POLYMATH, LabVIEW, ACSL, IMSL, Mathcad, and
GNU Octave.
21
A graphical-user interface (GUI) allows the user to enter the algebraic and ordinary
differential equations and related information, such as the total integration period, error
tolerances, and the variables to be plotted. The simulation program then assumes
responsibility for

1.Checking to ensure that the set of equations is exactly specified.


2.Sorting the equations into an appropriate sequence for iterative solution.
3.Integrating the equations.
4.Providing numerical and graphical output.

Examples of equation-oriented simulators include ACSL, gPROMS, and Aspen Custom


Modeler (Luyben, 2002).

One disadvantage of equation-oriented packages is the amount of time and effort


required to develop all of the equations for a complex process.

An alternative approach is to use modular simulation, in which prewritten subroutines


provide models of individual process units, such as distillation columns or chemical
reactors.
22
In many modeling applications, it may be desirable to develop a simulation using
vendor-provided software packages involving different modules or functionalities (for
example, software packages for thermodynamic properties, simulation, optimization,
and control system design).

Modular dynamic simulators have been available since the early 1970s. Several
commercial products are available from Aspen Technology (ASPEN PLUS and
HYSYS), Honeywell (UniSim), Chemstations (ChemCAD), and Invensys (PRO/II).
Modelica is an example of a collaborative effort that provides mod- eling capability for
a number of application areas. These packages also offer equation-oriented capabili-
ties. Modular dynamic simulators have achieved a high degree of acceptance in process
engineering and control studies because they allow plant dynamics, real-time
optimization, and alternative control configurations to be evaluated for an existing or
new plant, sometimes in the context of operator training.

23
A completely enclosed stirred-tank heating process is used to heat an incoming
stream whose flow rate varies.

The heating rate from this coil and the volume are both constant.
(a) Develop a mathematical model(differential and algebraic equations) that describes
the exit temperature if heat losses to the ambient occur and if the ambient temperature
(Ta) and the incoming stream’s temperature (Ti) both can vary.
(b) Discuss qualitatively what you expect to happen as Ti and w increase (or decrease).
Justify by reference to your model.
Notes:
ρ and Cρ are constants.
U, the overall heat transfer coefficient, is constant.
As is the surface area for heat losses to ambient.
Ti > Ta (inlet temperature is higher than ambient temperature).
24
25
26
27
28
29
30

You might also like