Sie sind auf Seite 1von 70

AN OVERVIEW OF

PROCESS MODELING
& SIMULATION
Dr. M. Chidambaram
Professor
Indian Institute of Technology Madras
chidam@iitm.ac.in

Mathematical description of process


Modeling Engg discipline knowledge
+ Mathematics
(mass /energy/momentum balances:
for each component, each phase)
Discipline insight must both precede &
follow math. Modeling
Models can lead to: new expts/
new concepts/new mathematical techs
Models may lead to:
expected prediction
unexpected prediction/even to non sense

Requires that certain characteristics of the


system be represented by model
Correct response direction of outputs as inputs
change
Model has a specific region of applicability.
Modeling is a process of continuous
development
Start of with simplest conceptual representations
Build in more and more complexities as the
model develops

Models can help direct further experiments


& in depth investigation

Modeling is an art important learning


process

Modeling is far more than simply the


generation of the set of equations
Real world
Problem

Mathematical
Problem

Mathematical
Solution

Interpretation

Models can cause us to think about our system


& force us to consider key issues
Think of possible ways of solving the model
eqn. - analytical , numerical or simulation
Try to get analytical form
Reasonable change in assumptions
Make analytical solution possible
Investigate the possibility
If new methods required , try to develop the
method

SENSITIVITY ANALYSIS
Determined by making changes in
parameters of interest and noting their
influences on each variable
Provides guides as to how accurately a
parameter needs to be determined
If the process is not sensitive to a parametermodel to be simplified
Best experimental conditions for estimating
model parameter

MODEL VALIDATION
Requires:
Confirming logic, assumptions & model
behavior
Comparison with historical i/o data
Or data literature
Comparison with pilot plant performance
Data used in formulating the model
(parameter estimation) should not be used to
validate it

Models invariably require parameter estimation within


the models such as reaction rate constants, heat
transfer and mass transfer coefficients
Over simplified model may not represent reality
Over ambitious model- difficult to solve ,
requires many parameters
Model may be good, adequate similar to reality for
one purpose not for another
Sticking to one model may prevent insight

Empirical model (for complex system)


Not relying on knowledge of basic principles
Essentially (curve) fitting equation with
experimental data
Black box model
Easy to develop
Extrapolation - ???
Application to other operating point - ???
Time series models : AR, MA, ARMA, ARMAX
NARX, NARMAX-models

Solution methodology
Evaluation of system behavior for different operation
conditions
Analytical solution for linear model equations
Perturbation techniques
Numerical solution
Continuous modeling programs:CSMP,MATLAB,SCILAB
Discrete-event simulation techniques:

Developing competency in modeling:

GPSS,GASP,SIMSCRIPT
Sound understanding of fundamentals

Computational skills: Usage of standard subroutines or


software packages

Magnetic levitation system

The force, experienced by the ball under the influence of


electromagnet, is given by the nonlinear electro-mechanical
equation:
F = mg +f(x,i)

(3.27)

Where f(x,i) is the magnetic control force given by


F(x,i) = -ki2/x2
(3.28)
Here m is the mass of the steel ball, g is the acceleration due to
gravity, x is the distance of the ball from the electromagnet and i
is the current through the coil and k is a constant depending on
the coil (electromagnet) parameters.

m d2x/dt2 = mg ki2/x2

The parameters and the nominal operating conditions


are given by:
m= 0.02 kg, , k = ; i=0.8 A ; x= .-1.5V; g=9.81 m/s2
The above equation is linearized around the operating
point to get
x(s)/I(s) = -Ki /(s2-Kx)
Where Ki = (2mg)/i0 ; Kx = 2mg/x0
where Kx = -0.2613 and Ki =0.49 and hence the poles
are 0.511 and -0.511. Under the feedback control
system, the magnetic levitaion can be stabilized.

Balancing a Stick on a Finger

consider the horizontal motion by the finger along a line. The


position is given by the coordinate x. The input is then
u=d2x/dt2. Center of mass has the horizontal coordinate
x+(0.5l sin());
for Vertical coordinate: 0.5l cos()
For the y-component, the force equation gives:
F cos mg = m d2[o.5 l cos()] /dt2 =
(0.5 l m) [- sin y2 cos]
For the x-component, we have
F sin = mx + m d2 [(0.5 l sin)]/dt2 =
mu + [m0.5l ] [ cos 2 sin]
Eliminating F and simplifying we get:

0.5 l g sin = -u cos


For small angles, we get the transfer function as:
G(s) = -(2/l) /[s2 - (2g/l )]

Feedback action (movement of the finger is continuously


required to make the system stable, i.e., to keep the
stick vertically).
(3.34)

Analysis of Deactivation Disguised


Kinetics in Transport Reactors

system A given by
df
B1 f 2 a
dy
da
B3a
dy

and system B given by


df
B1 fa
dy

da
( B1 B3 ) fa
dy

will both give identical conversions, namely

X B1[1 exp( B3 y]/[ B3 B1 (1 exp(B3 y))]

df
B1 f N a
dy
da
B3 f N1 a m
dy

and the system II given by


df
b1 f n a
dy
da
b3 f n1a m
dy

give identical conversions when

n q /( 2 m) N
n1 q(m 1) /( m 2) N 1
b1 B1

b3 B3 B1q /( m 2)
where q N1 N 1 and q not equal to zero
b3 0

and m 2
( N 1, N1 1 and m 1.5)

Periodic inlet concentration function,


-------steady state, __________periodic

Opposing trends shown by


deactivation disguised kinetic models
under periodic operation.

Increasing trend for system I and


resonance behavior for system II

Increasing trend for both systems I & II


but at different conversion levels under
periodic operation

References
1.
2.

3.

4.

5.

J.N.Kapur, Mathematical Modeling, Wiley,New York,1988.


K.Hanos and I.Cameron, Process Modeling and Model
Analysis, Academis Press, New York, 2001.
M.Chidambaram, Computer Control of Processes, Narosa
Pub., New Delhi, 2002. (Chapters 12 &13)
B.W.Bequette, Processs Dynamics , Modeling analysis and
simulation, Prentice Hall, New Jersey,1998.
W.F.Ramirez, Chemical Process Simulation, Academic
Press, 2002.

Additional references

M .Chidambaram
Catalyst mixing in BCSRs,
Can J. Chem. Eng., 87, 503-506, 1989.
S.Sivakumar, M.Chidambaram & H.S.Shankar
Analysis of Deactivation disguised kinetics in transport
reactors by periodic operation
Can. J. Chem. Eng, 66, 505-508, 1988.
D.Swati, V.S.R.Rao, R.Pickhardt & M.Chidambaram
Nonlinear PI Controller for time delayed pH
system
Indian Chemical Engineer, 50, 93-105,2008

INPUT

SYSTEM

INPUT

SYSTEM

OUTPUT

OUTPUT
?

ANALYSIS PROBLEM
INPUT

SYSTEM

OUTPUT

?
SYNTHESIS PROBLEM(DESIGN)

CONVERT INTO ANALYSIS PROBLEM

INPUT
?

SYSTEM

OUTPUT

COMPENSATION PROBLEM

CONVERT INTO ANALYSIS PROBLEM


TO BE A GOOD ANALYST

Model Classification
Type of Model

Criterion of classification

Mechanistic

Based on mechanism/underlying phenomena

Empirical

Based on input-output data, trials or experiments

Stochastic

Contains model elements that are probabilistic nature

Deterministic

Based on cause-effect analysis

Lumped parameter

Dependent variables not function of spacial position

Distributed parameter

Dependent variables are a function of spacial position

Linear

Super position principle applies

Nonlinear

Super position principle does not apply

Continuous

Dependent variables defined over continuous space


time

Discrete

Only defined for discrete values of time / or space

Hybrid

Containing continuous and discrete behavior

Model equation forms


Type of model

Equation types
Steady- state
Problem

Dynamic
problem

Deterministic

Non linear algebraic

ODEs/PDEs

Stochastic

Algebraic/ difference
equations

Lumped parameter

Algebraic equations

ODEs

Distributed parameter

EPDEs

PPDEs

Linear

Linear algebraic
equations

Linear ODEs

Nonlinear

Nonlinear algebraic
equations

Nonlinear ODEs

Continuous

Algebraic equations

ODEs

Discrete

Difference equations

Difference equations

MODEL EQUATIONS
CONVERSION OF MASS /ENERYAND(OR) MOMENTUM
(BALANCE EQUTIONS)
LEADS TO
SYSTEM OF
ALGEBRAIC EQUTIONS

LINEAR

NONLINEAR
CONSTANT
COEFFICIENTS

IVP
LINEAR ODES
BVP

VARIABLE
COEFFICIENTS
CONSTANT
COEFFICIENTS
VARIABLE
COEFFICIENTS

IVP
NONLINEAR ODEs

BVP
HYPERBOLIC EQUATIONS

PDE

PARABOLIC EQUATIONS
ELLIPTIC EQUATIONS

COMBINATIONS OF ABOVE

L/NL

LINEAR ALGEBRAIC EQUTIONS


DIRECT METHOD (GAUSSIAN ELIMINATION METHOD)

JACOBI METHOD
ITERATIVE METHODS

GAUSS SEIDEL
METHOD

CHEMICAL ENGINEERING SYSTEMS


STAGED OPERATIONS
TRIDIAGONAL SYSTEM OF EQUATIONS
THOMAS ALGORITHM(LU)

NONLINEAR ALGEBRAIC EQUATIONS

Scalar equation:

f(x)=0

(i) Newton- Raphson method


(ii) Use of x = g(x) form
Stopping conditions

Method of parameter differentiation


Converting into a IVP ODE + Numerical solution

Simultaneous equations: F(x)=0

(i) Newton-Raphson method


(ii) M.P.D
(iii) Brown method

IVP ODE (L-VC,NL)

(i) Euler method


(ii) Runga-Kutta method (IInd,IVth)
(iii) R-K-Gill method

BVP ODE (L-VC)


Each ODE

Two IVP ODES

BVP ODE(NL)
Shooting method
Finite difference Scheme method
Collocation method (polynomial
approximation)

EXAMPLE 1a

Write a MATLAB program to find the roots of


f(x)=x2-2x-3, Initial guess x = 0 & 2

M file
function y = nitt1(x)
y = x^2 - 2* x-3;
Command Window
x0 =[0];
y = fzero ('nitt1',x0)
y = -1

x0= [2];
y = fzero ('nitt1',x0)
y=3

EXAMPLE 2a

Write a MATLAB program to find the roots of:


x2- 2x- 3 =0
Command Window
c=[1 -2 -3]
c=
1
-2
-3
roots (c)
ans =

3.0000
-1.0000

EXAMPLE 2a

Write a MATLAB program to find the roots of:


x2- 2x- 3 =0
Command Window
c=[1 -2 -3]
c=
1
-2
-3
roots (c)
ans =

3.0000
-1.0000

EXAMPLE 3a

Write a MATLAB program to solve the following nl alg eqs:


x1 - 4x12 - x1x2 = 0 , 2x2 x22 + 3x1x2 = 0
Initial guess (1,1)
M file
function f = nitt3(x)
f(1) = x(1) - 4*x(1)*x(1) - x(1)*x(2);
f(2) = 2*x(2) - x(2)*x(2) + 3*x(1)*x(2);
Command Window
x0= [1 1]';
x = fsolve ('nitt3',x0)
x=
0.2500
0.0000

EXAMPLE 4a: numerical solution of nonlinea IV ODS


Write a MATLAB program to solve numerically :
dx1/dt = X2
dx2/dt = x2(1 x12 ) -x1 ,
Initial Conditions x0 = [0.25 1] , tspan = [0 20]
M file

function xdot = nitt4(t,x)


xd(1) = x(2);
xd(2) = x(2)*(1- x(1)^2) - x(1);
xdot = [xd(1) xd(2)]';

Command Window

tspan = [0 20];
x0 = [0.25 1]';
[t, x] = ode23('nitt4',tspan, x0);
plot(t, x(:,1),':',t, x(:,2));
xlabel ('time, sec')
ylabel ('response in x1, x2')
3

response in x1,x2

-1

-2

-3

10
12
time,sec

14

16

18

20

EXAMPLE 5a

Write a MATLAB program to


Minimize f(x) =ex1(4x12+2x22+4x1x2+2x2+1), Initial guess (-1,1)
M file
function f =nitt5(x)
f=exp(x(1))*(4*x(1)^2+2*x(2)^2+4*x(1)*x(2)+2*x(2)+1);
Command Window
x0=[-1 1];
x= fminunc ('nitt5',x0)
x=
0.5000 -1.0000
nitt5(x)
ans = 3.6609e-015

function value = pest (paravl)


k=paravl(1);
n=paravl(2);
m=paravl(3);
pa=[0.1044 0.1049 0.1030 ];
pb=[0.1036 0.2871 0.5051 ];
rate1=[0.5051 0.6302 0.6342 ];
valx=0.0;
for i=1,12
rate2(i)=k*(pa(i)^n*pb(i)^m);
valx=valx+(rate1(i)-rate2(i))^2;
end
Value=valx/12;

fminsearch(@pest,[1 1 1])
ans=6.0776 0.9561 0.1951
(log method: 7.105 0.9804 0.1896)

SENSITIVITY ANALYSIS

Sensitivity analysis effect of the infinitesimal changes


in model parameters on the changes in the model
outputs.
to estimate which parameters are most influential on the
behavior of the simulation.
Such information is crucial for experimental design, data
assimilation, reduction of complex nonlinear models, and
evaluating optimization gradients and Jacobians in the setting
of dynamic optimization and parameter estimation.
For example, when investigating periodic orbits, Lyapunov
exponents, or other chaos indicators,

Direct Differential Method


Let us consider a system described by:
dy/dt = f(y,t,p)

(8.12)

initial condition: at t=0; y= a.

(8.13)

By applying the definition of the local sensitivity we can get:


d(y/p1)/dt = ds(y;pj)/dt
= (f/y) (y/pj) + (f/pj)
= (f/y) s(y;pj) + (f/pj)

(8.14)
(8.15)
(8.16)

Similarly, the initial condition is also to be differentiated with


respect to the parameters pj (in case the parameters appear in
the initial conditions).

Similar analysis for multivariable systems.


dy/dt = f(y,t,p); at t= 0; y = y0

(8.17)

ds(y;p j)/dt = J(t). s(y;pj) + f/pj

(8.18)

where J (t) is the Jacobian given by


f/y =[fi/yj]

(8.19)

The non-homogeneous term in Eq(8.18) is given by


f/pj = [f1/pj f2/pj fn/pj]T
(8.20)
By solving simultaneously the model equation along with
the above formulated equations, we can get the local
sensitivity. This method is called the direct differentiation
method (DDM).

Finite difference method


The local sensitivity is calculated using the finite difference
scheme for the derivative as:
s(y1;pj) = yi/pj

(8.21a)

[yi(t, pj+pj) yi(t,pj)]/pj

(8.21b)

The model equations are to be solved once for the


nominal value of pj and second for the perturbed value
of the parameter pj.
This above method is called the finite difference method
(FDM).
(8.21b)

Consider a thermal run away reaction of a batch reactor, with exothermic


reaction AB:
(dA/dt) = -k An
cv (dT/dt) = (-H)k An Sv u (T Ta)
k = k0 exp[-E/(RT)]

Here, is the density of the fluid mixture[kg/m3],


Cv is the mean specific heat capacity of the reaction mixture, [J (kmol)-1];
H is the molar reaction enthalpy [J/mol],
Sv is the surface area per unit volume [m2/m3],
u is the overall heat transfer coefficient [J/(m2 s K)],
and Ta is the ambient temperature.
The initial conditions are: at t=0; A = A0 and T = T0.
.

The reactor at the explosive conditions is sensitive to


small variations in e.g., the initial temperature, while,
under non-explosive conditions, the system is insensitivity
to such variations
Thus the boundaries between the runaway (explosive)
and non-runway [non-explosive] conditions can be
identified on the basis of its sensitivity to small changes in
the operating parameters.
The system can also be characterized by the derivative of
the maximum temperature versus the initial temperature

Thank you !

Response at operating point I. 1: Plant data 2: Model


(eq1), 3: Model (eq 1 with the parameters meant for
operating point II)

y(k ) 1 y(k 1) 2 y (k 2) 1u (k 1)
2u (k 2)

(1)

Response at operating point II. 1: Plant data


2: Model (eq1), 3: Model (eq 1 with the
parameters meant for operating point I)

Deviation in control rod


position (mm)

Model parameter for eq.1

Bilinear model response at operating


point I

y(k ) 1 y (k 1) 2 y(k 2) [ 10 11 y(k 1)]u (k 1)


[ 20 22 y(k 1)]u (k 2) (2)

Parameters for the bilinear


model (eq.2)

Advice for new faculty:


Teach well
Publish
Strategize
Become visible in your research field
Apply for early grant
Build a research group; Run your group well
Train yourself
Get mentors
Be a mentor
Take care of yourself; Manage your time well
Work hard but not absurdly hard
spend 5% of your time on Dept/Inst dev services

Skills for effective research

Skills required to perform good research


include

Mastery of fundamental knowledge


Reading skills

Problem solving skills


Writing skills

Problem solving skills


The problem solving process involves the followings:
a.
b.

c.
d.

e.
f.

Problem definition
Search for data and facts-state of the art,
state objective and identify constraints
Mathematical Modeling- note assumptions.
Analysis/simulation- test data,
Design and prototyping
Analyze alternatives

Reading skills

Reading enable state of the art to be identified.

Researcher must read critically and test all


claims in any reports. Journals report is work
that was done in last two to three years

Books are materials available in journal five


years ago but usually written and presented with
better explanations and examples.

Conferences materials are usually the latest on


the subject but most of the work are of
preliminary (i.e., not fully tested or fully
investigated).

How to find a good problem?


Difference between an experienced researcher and
a novice lies in knowing what problems to work
on. An experienced researcher knows where the
boundaries lie and has a sense of which problems
are solvable and important.
Reading research papers and attending seminars
can also be extremely helpful for finding good
research problems.

Read a lot and listen to others (talks/seminar)


Have an attack

An attack is an approach or idea that you can


bring to bear on problems. Having a good attack
is as important as finding a good problem.
Your ability to form an attack on a problem
depends on all of your skills, tools, and
knowledge.

Be curious
Good researcher tends to be curious.
Ask good questions
What happens if..? Why ? is it true that.?these
questions can help you find good research
problems.
Be aware of research density

Give much more attention to the doing than to the


results that you want to achieve through it.
Do not be concerned with the fruits of your action
just give attention to the action itself. The fruits will
come of its own accord.
When you stop learning you stop growing.
Your game is only as good as your practice

All empowerment exists in the present


moment.
A river without bank is a large puddle
All good performance starts with clean goals
PhD: Passion, Hunger and Discipline
Do you enjoy what you are doing.
Hunger: Hungry for success.
Discipline:

If there was one single habit that could make a


huge impact on your life, it could have
to be like this:
Wake up early

In the present context , it means

Go to bed early

Thank you !

Das könnte Ihnen auch gefallen