0% found this document useful (0 votes)
12 views

Control Chapter 2 Modelling

Uploaded by

rhm 018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Control Chapter 2 Modelling

Uploaded by

rhm 018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

Process Control

Mathematical Modeling

The University of Jordan

Chemical Engineering Department

Fall 2022

Prof. Yousef Mubarak

1
Outlines

 Basic concepts and definitions

 Steady-state model vs. dynamic model

 Degree of freedom analysis

 Models of representative processes

2
Mathematical Modeling of Chemical Processes

Basic concepts and definitions:

 Mathematical Modeling:
Mathematical representation of the essential aspects of an existing
process (or a process to be constructed) in a usable form.

 Process modeling is both an art and a science. Creativity is required to


make safe assumptions that result in an appropriate model. Note that the
mathematical model should be made as simple as possible, but no simpler.
 The model equations are at best an approximation to the real process.

 Aphorism: “All models are wrong, but some are useful.”

3
 Modeling inherently involves a compromise between model accuracy
and complexity on one hand, and the cost and effort required to
develop the model, on the other hand.

 Where to use mathematical modeling:

 To improve understanding of the process

 To train plant operating personnel

 To design the control strategy for a new process

 To select the controller setting

 To design the control law

 To optimize process operating conditions

4
Classification of Models

 Theoretical models

 Empirical (experimental) models

 Semi-empirical models (combined approach)

5
Theoretical Model

 Based on physical/chemical/biological relationships and conservation


laws:

 Material/energy balances

 Heat, mass, and momentum transfer

 Thermodynamics, chemical kinetics

 Physical property relationships

 Difficult to develop and it can become quite complex.

 Variables and parameters have physical meaning.

 Can be computationally expensive (not real-time).

6
Theoretical Model:

 Extrapolation is usually valid thus it can be used for rigorous


prediction of the process behavior.
 Does not require experimental data to obtain (data required for
validation and fitting)

7
Conservation Laws

 Conservation of Mass

 Conservation of Component i

8
Conservation of Energy

 The general law of energy conservation is also called the First Law of
Thermodynamics. It can be expressed as:

 The total energy of a thermodynamic system is the sum of its internal


energy, kinetic energy, and potential energy.

9
Empirical Model

 Based on curve fitting and analysis of experimental data.

 Requires well-designed experiments.

 Easy to develop and usually quite simple.


 The behavior is usually correct only around the experimental
conditions considered (dangerous to extrapolate).

 Parameters of the model may not have physical meaning.

 Used for control design and simplified prediction model.

10
Dynamic Versus Steady-State Models

Dynamic (unsteady) model:


 Describes time behavior of a process.
 Dynamic models of chemical processes consist of ordinary differential
equations (ODE) and/or partial differential equations (PDE), plus
related algebraic equations.

Steady-state model:
 Steady state: No further changes in all variables with time.
 Can be obtained by setting the time derivative term zero.
 Steady-state model of chemical processes consist of:

 Algebraic equations (AE) if all variables do NOT change in space.

 DE and AE if some variables do change in space.


11
Linear versus Nonlinear Models

Based on the linearity of the dependent variable:

 Linear model:

No nonlinear terms of dependent variable such as:

• First-order linear ODE:

 and K are constants

• nth-order linear ODE:

12
 Nonlinear Linear model:

There are nonlinear terms of dependent variables such as :

13
Systematic Approach for Developing Dynamic Models

1. State the modeling objectives.


2. Draw a schematic diagram of the process and label all process
variables.
3. Make safe assumptions (models should be no more complicated than
necessary to meet the modeling objectives).
4. Determine whether spatial variations of process variables are
important. If so, a partial differential equation model will be required.
5. Write appropriate conservation equations (mass balance, component
balance, energy, ….etc).

14
6. Introduce equilibrium relations and other algebraic equations (from
thermodynamics, transport phenomena, chemical kinetics, equipment
geometry, ..etc).

7. Perform a degrees of freedom analysis to ensure that the model


equations can be solved.

8. Simplify the model. It is often possible to arrange the equations so


that the dependent variables (outputs) appear on the left side and the
independent variables (inputs) appear on the right side. This model
form is convenient for computer simulation and subsequent analysis.

9. Classify inputs as disturbance variables or as manipulated variables.

15
Degree of Freedom (NF) Analysis:

NF = NV – NE

NF = Degree of freedom (# of input variable to be specified).


NV = Number of variables
NE = Number of independent equations (# of output variables to be
found/controlled)
 If NF = 0 : system is exactly specified. Unique solution exists.

 If NF > 0 : system is underspecified. Infinity number of


solutions exist.

 If NF < 0 : system is overspecified. No solutions exist.

16
A Systematic Approach for NF Analysis
1. List the model parameters: quantities in the model that are known
constants (or parameters that can be specified) on the basis of equipment
dimensions, known physical properties, etc.
2. Determine the number of equations NE and the number of process
variables, NV. Note that time t is not considered to be a process variable
because it is neither a process input nor a process output.
3. Calculate the number of degrees of freedom, NF = NV - NE.
4. Identify the NE output variables that will be obtained by solving the
process model.
5. Identify the NF input variables that must be specified as either
disturbance variables or manipulated variables, in order to utilize the
NF degrees of freedom.
17
Solution of Model

ODE model
 Linear case: find the analytical solution via Laplace transform, or
other methods of calculus.
 Nonlinear case: analytical solution is difficult or usually does not
exists.
 Use a numerical integration, such as Runge-Kutta (RK)
method, by defining initial condition, time behavior of
input/disturbance.
 Linearize around some condition (usually steady state) and
then find the analytical solution.

18
 Linearization of non-linear term is performed using Taylor Series
expansion around equilibrium (steady state)

where overbar denotes the steady-state.


 If PDE model: Convert to ODE by discretization of spatial variables
using finite difference approximation and etc. Example:

19
Example 1: Liquid storage tank
 (a) Find the steady-state outlet
volumetric flow rate (q) and liquid
height (h)?
Assumptions:

 Adiabatic and isothermal process.

 Incompressible fluid (Liquid).


 Friction in the outlet pipe segments is
negligible (short segment).
 Steady-state Mechanical Energy Balance (MEB) is applicable for this
unsteady flow.

 The valve loss coefficient, Cv, does not vary with flow rate.
20
Example 1: Liquid storage tank

Let us first model the dynamic behavior of this process

 Apply Mass Balance (MB) :

21
Example 1: Liquid storage tank

 Apply Mechanical Energy Balance (MEB) between a point at liquid


free surface ( point 1) and at the outlet section (point 2):

Energy losses (w losses ) are due to:

 Valve; its loss coefficient is Cv

 Sudden contraction; its loss coefficient is Cc

22
Example 1: Liquid storage tank

The process has the following 1st-order nonlinear dynamic model:

23
Example 1: Liquid storage tank

Now, Degree of Freedom Analysis:

 Parameters: D, d, and , Cv, Cc

NF = NV - NE

NV = 3 (qi, q, h)
NE = 2 (MB, MEB)

NF = 3 - 2 = 1 → one input variable should be specified.

The output variables: q and h

Input variables: qi

24
Example 1: Liquid storage tank

 Input variables and parameters must be specified:

 Let: qi = 6 L/s, Cv = 0.9 , and Cc = 0.5

 d = 0.05 and D = 1 m (given parameters)


 To find the steady-state values of h and q, set the time derivative equals
to zero:

25
Example 1: Liquid storage tank

(b) Suppose that inlet volumetric flow rate, qi, changes suddenly from 6 to
9 L/s and remains at this new value (step change in qi), how the liquid
height varies with time. How long does it take to reach the new steady
state value?

 Now the dynamic model should be solved

26
Example 1: Liquid storage tank

Remarks:
 Note that t = 0 does NOT mean startup from rest, it mean the old
steady-state situation.
 The above 1st–order nonlinear ODE can be solved analytically by
separation of variables.

27
Analytical solution:

Integrate by substitution method to have:

At qi = 9 L/s the new steady-state value of h is:


MB: 𝑞 = 𝑞 = 9𝐿/𝑠 L/s
 
MEB: 𝑞 = 0.0056 ℎ = 0.009 → ℎ = 2.583 𝑚
To know how long does it take to reach this news steady state height:

28
Example 1: Liquid storage tank

Plot h versus t to see the dynamic response:

Remark: Without introducing controller and when qi changes from 6 to 9


L/s the steady state height will change from 1.148 to 2.583 m during a
period of around one hour.
29
Example 1: Liquid storage tank

 Approximate solution (linearization of the model) :

 
Let us linearize the nonlinear term; ℎ
 
Let: 𝑓 ℎ = ℎ
Taylor series expansion around: ℎ = ℎ = 1.148𝑚

30
Example 1: Liquid storage tank

Then, the linearized 1st-order ODE is:

Solve ( by substitution) to obtain:

The new steady-state value of h can be found by setting (t = ∞): ℎ = 2.294 h

31
Example 1: Liquid storage tank

Remarks:

 The linearized model gives the same


results as the nonlinear one for time
t < 400 s (6.67 min).
 The percent relative error in the
new-steady state value resulted from
linearized model is:

100 2.294 − 2.583 “Comparison between exact


= 11%
2.583 solution and approximate
solution resulted from linearized
model”

32
Example 2: Blending Process
Assumptions:

 Perfect mixing: The composition in


the tank is uniform and it is the
same as the outlet composition.

 The liquid density, , is constant


everywhere.

 An unsteady-state MB for the


blending system:

33
Example 2: Blending Process

 Apply unsteady-state overall MB:

where w1, w2, and w are mass flow rates and V is liquid volume in the
tank.

 Apply unsteady-state component MB:


 The corresponding steady-state model was derived (chapter 1):

34
Example 2: Blending Process

 For constant density (), unsteady equations become:

 The above second equation can be simplified by expanding the


accumulation term using the “chain rule” for differentiation of a
product:

 Thus, component MB becomes:

35
Example 2: Blending Process

 Substitution of the overall mass balance for dV/dt in component mass


balance gives:

 After canceling common terms and rearranging the mass balance


equations, a more convenient dynamic model form is obtained as follows:

 Note that this model is classified as: first order linear dynamic model

36
Example 2: Blending Process

 Degree of Freedom Analysis: NF = NV - NE

 Parameters: 

NV = 7 (w1, w2, w, V, x1 , x2, , x )


NE = 2

NF = 7 - 2 = 5 → 5 input variables should be specified.


 Input variables : w1, w2, V, x1 , x2

 The output variables: w and x

 Based on this classification the


dynamic model is rewritten as:

37
Example 2

A stirred-tank blending process with constant liquid holdup of 2 m3 is


used to blend two streams whose densities are both approximately 900
kg/m3. The density does not change during the mixing.
(a) Assume that the process has been operating for a long period of time
with flow rates of w1 = 500 kg/min and w2 = 200 kg/min, and the feed
composition (mass fraction) of x1 = 0.4 and x2 = 0.75. What is the steady
state value of x and w?

Constant liquid holdup means:

38
Example 2

 To find the steady-state outlet composition, x, set the time derivative


equals to zero:

 Solve for x to have:

39
Example 2

(b) Suppose w1 changes suddenly from 500 to 400 kg/min and remains at
this new value, how is the response of the composition x(t), plot it ?
 Overall MB:

 Component MB:

 The component MB equation can be rearranged as:

( is space time or mean residence time)


40
Example 2

Analytical solution:

at t = 0 : x = = 0.5 “Old steady state”

Integrate to have:

 But  = 3 min and C = 0.517

 The new steady-state value of x can be found by:


 using steady-state model

 or setting (t=∞) in x(t) equation : = 0.517


41
Example 2

(c) Repeat part (b) for the case where w2 (instead of w1) changes
suddenly from 200 to 100 kg/min and remains at this new value, how
is the response of the composition x(t), plot it?

42
Example 2

(d) Repeat part (c) for the case where x1 changes suddenly from 0.4 to
0.6 and remains at this new value, how is the response of the
composition x(t), plot it ?

43
Example 2

Plot x versus t for different cases to see the dynamic response:

44
Example 2

e) For part (b) to (d), plot the normalized response xN(t) defined as:

45
Example 2

Plot xN(t) versus t for different cases to see the dynamic response:

46
47
Example 3 : CSTR
A continuous stirred-tank reactor ( CSTR) is used to produce a compound R
in the liquid-phase elementary reaction A → R. Feed enters the reactor at
rate of qi (L/s): the concentration of reactant in the feed is CA0 (mol A/L).
The volume of the tanks content is V (L). The vessel may be considered
perfectly mixed, so that the concentration of A in the product stream
equals that in the tank. For this process the rate of consumption of A is -rA
(mol A/s.L). All fluids (the feed, the tank content , and the product) may be
taken to have the same density)  (g/L). The reaction takes place under
isothermal conditions.

(a) Write the mathematical model to describe the variation of reactant


concentration with time

48
Example 3

 Total mass balance:

 Component A mole balance:

49
Example 3

Elementary reaction Reaction rate Eq.:

50
Example 3

(b) Do Degree of Freedom Analysis:

Parameters: , k

NV = 5 (CA0, CA,V, qi, q )


NE = 2

NF = 5-2 = 3 → 3 input variables should be specified.


Input variables: qi , CA0, V
Output variables: CA and q

 The dynamic model is:

51
Example 3

(c) Find the steady-state concentration and conversion if the reaction


rate constant is k=0.01 s-1, the liquid volume is 250 L, the reactant feed
concentration is 0.6 mol/L, and the feed flow rate is 0.4 L/s?.

The corresponding steady-state conversion is:

52
Example 3

d) Suppose the feed flow rate changes suddenly from 0.4 to 0.8 L/s and
remains at this new value, plot the response of concentration CA(t).

53
Example 3

 The new steady-state concentration (t  ):

 It can be found from the st. st. Eq.:

 And the new steady state conversion is:

54
Example 3

55
Example 3

(e) Suppose that you would like to introduce a level controller to control
the liquid volume, V, by manipulating the outlet flow rate, q, and
concentration controller to control CA by manipulating qi. How the
dynamic model will be for such control tasks?.

Input variables: qi , CA0, q


Output variables: CA and V
 The dynamic model of the controlled process is:

where 𝜏 = 𝑉⁄𝑞 is the mean residence time.


56
Example 4

Stirred-tank heating process with constant holdup, V:

Heating rate added to the liquid


by electric heater

: Rate of work done by mixer on


the liquid

57
Example 4

(a) Write the dynamic model to describe the temperature response, T(t):

Assumptions:
1. Perfect mixing; thus, the exit temperature T is also the temperature of
the tank contents.
2. The liquid holdup, V, is constant because the inlet and outlet flow rates
are equal.
3. The density, , and heat capacities of the liquid are assumed to be
constant. Thus, their temperature dependence is neglected.
4.Heat losses are negligible.
5. The net rate of shaft (mixer) work can be neglected because it is small
compared to the rates of heat transfer and convection→ 𝑊̇ ≈0

58
Example 4

 Total mass balance:

 Constant liquid holdup (V is constant) 

 Here, MEB is NOT applicable since this process is neither adiabatic nor
isothermal. Energy balance must be applied instead:

59
Example 4

𝑈 : Specific internal energy of liquid in the system (tank)

u: Velocity of the system (liquid in tank)

Z: Vertical position of the system

 For flowing streams, another form of energy must be added which is


the pressure energy:

𝑉 : specific volume of the liquid

p: Pressure
60
Example 4

Constant liquid holdup ( V is constant) and constant density:

where  is the space time: 𝜏 = 𝑉 ⁄𝑞

61
Example 4

 Since the tank is not moving:

 But the cross-section area of the inlet pipe is the same as that of the
outlet one: → 𝑢 =𝑢

62
Example 4

 Assume that the vertical distance between inlet ad outlet streams is


negligible: → 𝑧 ≈𝑧
 Finally, the unsteady energy balance becomes:

 We know from thermodynamics:

Constant volume heat capacity

𝐶 : Constant pressure heat capacity

63
Example 4

 One of the assumption is that heat capacities of the liquid are assumed
to be constant. Thus, their temperature dependence is neglected:

 Then, the unsteady energy balance in terms of inlet and outlet


temperature becomes:

Note that for liquids:

Thus, the final energy balance is:

64
Example 4

(b) Perform Degree Of Freedom analysis:

 Parameters: , V, C

NV = 5 ( 𝑄̇, Ti , qi ,T , q )
NE = 2

NF = 5-2 = 3 → 3 input variables should be specified.

 Input variables: 𝑄̇, Ti , qi

 Output variables: T , q

 The dynamic model is:

65
Example 4

(c) Assume that the process has been operating for a long period of time
with flow rate of qi=10 m3/hr, heating rate of 𝑄̇ = 4.98 × 10 cal/hr and
inlet temperature of 40 oC. In addition, the liquid density is 1000
kg/m3 and liquid heat capacity is 1 cal/g.oC, and the liquid volume in
the tank is 20 m3. What is the steady-state temperature inside the tank?

66
Example 4

(d) Suppose that the heating rate increases to double its old value and
remains at this new value, plot the time response of temperature
deviation about its old steady-state value?

(Step change in heating rate)

Remark. In process dynamic and control, it is common to use the


deviation of variables about their corresponding steady state(set point).
This can be obtained by subtracting the steady state equations from the
corresponding dynamic equation
67
Example 4

68
Example 4

In this part of example, the inlet temperature remains constant:

69
Example 4

Useful information: the space time can be estimated by drawing the


tangent line at t=0 (the blue line in the plot above) .
70
Example 4

(e) Suppose that now you turned off the electric heater, how long does it
take for temperature to return from its new value (139.6) oC to the
original steady-state value( 89.8 oC) ?

 Analytical Solution:

 Thus, the time required for liquid temperature to return back to its
original st. st. value is:

71

You might also like