Module II - Modeling and Analysis of Process Dynamics · 2016. 1. 20. · Dynamic Models of Control...

Post on 20-Apr-2021

1 views 0 download

transcript

Chapter 2

Model Development

Mathematical Modelingof Chemical Processes

• Process Model

A mathematical abstraction of a real process.

– The equation or set of equations that comprise the model

are at best an approximation to the true process.

• Rationale for Mathematical Modeling

– To improve understanding of the process

– To train plant operating personnel

– To design controller strategy for a new process

– To select controller setting

– To design the control law

– To optimize process operating conditions

Introduction to Process Dynamics

• Chemical Engineering courses are generally taught

from a steady-state point-of-view.

• Dynamics is the time varying behavior of

processes.

• Chemical processes are dynamically changing

continuously.

• Steady-state change indicates where the process is

going and how far it is going.

• Dynamic characteristics of a system indicates what

dynamic path it will take and how certain variables

evolve with time I.e. dynamic characteristics shows

the evolution of certain variables with time.

Uses of Dynamic Process Models

• Evaluation of process control configurations

– For analysis of difficult control systems for both

existing facilities and new projects.

• Process design of batch processes.

• Operator Training (Simulation).

• Start-up/shut-down strategy development

Classification of Models

• Lumped parameter models- assume that the

dependent variable does not change with spatial

location within the process, e.g., a perfectly well

mixed vessel.

• Distributed parameter models- consider that the

dependent variable changes with spatial location

within the process.

Example of a Lumped Parameter Process

F1

T1

T

TT

F2

T2

FT

FC(F

1)spec

Example of a Distributed Parameter Process

TTPT

PC

Condensate

Steam

Feed

Toutlet

Modeling Approaches

• Lumped parameter processes- Macroscopic balances are typically applied for conservation of mass, moles, or energy and result in ODE’s.

• Distributed parameter processes- Microscopic balances are typically applied yielding differential equations for conservation of mass, moles, or energy for a single point in the process which result in PDE’s.

Significances of Dynamic Modeling are:

A. To know how fast an input change influences output.

B. To know how far output will change for a given input change.

C. To know impact of parameters change on the output behaviours.

you may need to specify more i.e. what effects?

Conservation Equations:

Mass, Moles, or Energy Balances

SystemthewithinReaction

byGenerationofRate

Systemthe

LeavingRate

Systemthe

EnteringRate

onAccumulati

ofRate

Mass Balance Equation

system

theleaving

massofRate

_

system

theentering

massofRate

systemtheinmassof

onaccumulatiofRate

Mole Balance Equation

reactionbymolesof

nconsumptioofRate

reactionbymolesof

generationofRate

system

theleaving

molesofRate

_

system

theentering

molesofRate

systemtheinmolesof

onaccumulatiofRate

Thermal Energy Balance Equation

systemtheof

boundariesthethrough

transferheatofrateNet

reactionby

generationheat

ofrateNet

systemtheleaving

transferheat

convectiveofRate

systemtheentering

transferheat

convectiveofRate

energythermalof

onaccumulatiofRate

Constitutive Relationships

• Usually in the form of algebraic equations.

• Used with the balance equations to model chemical engineering processes.

• Examples include:

– Reaction kinetic expressions

– Equations of state

– Heat transfer correlation functions

– Vapor/liquid equilibrium relationships

Degree of Freedom Analysis

evf NNN

• The number of degrees of freedom (DOF) is equal to the number of unknowns minus the number of equations.

• When DOF is zero, the equations are exactly specified.

• When DOF is negative, the system is overspecified.

• When DOF is positive, it is underspecified.

Different Types of Modeling Terms

• Dependent variables are calculated from the

solution of the model equations.

• Independent variables require specification by the

user or by an optimization algorithm and represent

extra degrees of freedom.

• Parameters, such as densities or rate constants, are

constants used in the model equations.

Dynamic Models of Control Systems

• Control systems affect the process through the actuator system which has its own dynamics.

• The process responds dynamically to the change in the manipulated variable.

• The response of the process is measured by sensor system which has its own dynamics.

• There are many control systems for which the dynamics of the actuator and sensor systems are important.

A Systematic Approach for Developing

Dynamic Models

1. State the modeling objectives and the end use of the model.

They determine the required levels of model detail and model

accuracy.

2. Draw a schematic diagram of the process and label all process

variables.

3. List all of the assumptions that are involved in developing the

model. Try for parsimony; the model 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, component,

energy, and so forth).

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.

Rationale for Dynamic Process Models

• Improve understanding of the process

• Train plant operating personnel

• Develop a control strategy for a new process

• Optimize process operating conditions

20

Variable Selection

21

22

Example 3.1 - Mixing Tank

• goal - determine dynamic behaviour in response to step changes in feed concentration, find time to 90% change

• information - size of vessel, standard operating concentrations and flow rates

• assumptions – well-mixed

– similar densities of components, no volume change on mixing

– constant flow in

• note - concentrations in moles/volume

23

Example 3.1 - Mixing Tank

F0, cA0

F1, cA

24

Example 3.1 - Total Material Balance

• Total mass balance: Mass accumulating = Mass in – Mass out

» Assuming inflow and outflow have constant and identical densities.

• constant level in overflow tank --> dV/dt=0 (flow in = flow out)

0 1

( )d VF F

dt

0 1

dVF F

dt

0 10 F F

25

Example 3.1 - Component Balance

• Material balance on component A

Mass A accumulating = Mass A in – Mass A out

• solvent balance - not independent from total and component A

balances - unnecessary

d MW Vc

dtMW F c MW F c

d c

dt

F

Vc

F

Vc

A A

A A A A

A

A A

( )

( )

0 0 1

0

0

1

26

Example 3.1 - Final Model and Degrees of

Freedom

• model equations

• Variables to solve for: F1, cA

• external variables: F0, cA0

• degrees of freedom = (2 variables - 2 equations) = 0

0 10

0 10

AA A

Fd c Fc c

dt V V

F F

27

Example 3.1 - Solution

• model consists of an algebraic equation and a 1st order, linear ordinary differential equation

• solve algebraic equation for exit flow and substitute,

leaving o.d.e.

• solve o.d.e using integrating factor

0 10

0 10

AA A

Fd c Fc c

dt V V

F F

28

Integrating Factor

• for first-order linear differential eqns.

• “complete the derivative” to form separable differential eqn. Separate and solve to get

• How does this work?

)(tqpydt

dy

Cedtetqey tptptp .)(

1 10

AA A

d c F Fc c

dt V V

Summary of Integrating Factor

)()( xfyxdx

dy

dxxexpxI

xI

CdxxfxI

xIy

1

Write the general equation of 1st order linear ODE

Determine integrating factors I (x)

Determine dependent variable or unknown function y

Arbitrary constant C is determined by the boundary condition.

(See the in-class example)

30

Example 3.1 - Analytical Solution

• o.d.e. is of form

• solution

• C - integration constant - determined from initial

conditions of o.d.e.

• (which has units of time) is called the “time constant”. determines how quickly the system gets to the new steady state after a change in cA0.

dc

dtc c V FA

A Ao 1 1

, /

ceecec tt

A

t

A

//

0

/ ][ 0

t

//

00

tt

AAA ceeccc

31

Example 3.1 - Solution ...

• at t=0, cA=cAinit , so CAinit =CAo-CAo + C, and thus;

C = cAinit giving:

• if we are initially at steady-state,

and solution can be written in deviation form as

• change in cA due to change in cA0

/

00 )( t

AAinitAA ecccc

c cAinit A init 0

c c eA A

t

0 1( )/

32

Example 3.1 - Solution ...

• If at S.S., CA=0.9 mol/l and CAo has been change from 0.9 to 1.8 mol/l. volume (V) =20 l and volumetric flow (F) is 20 l/min gives time constant=1 min, the solution will be

• if we are initially at steady-state, and solution can be written in deviation form as

• change in cA due to change in cA0

t

A ec )8.19.0(8.1

9.00 initAAinit cc

)1(9.0 t

A ec

at t=0 CA=0.9

t ∞ CA=1.8

33

Example 3.1 - Response

0 20 40 60 80 100 0.5

1

1.5

2

time

ou

tle

t co

nce

ntr

atio

n

outlet concentration

0 20 40 60 80 100 0.5

1

1.5

2

time

inle

t co

nce

ntr

ation

inlet concentration

ΔCAo

ΔCA

Solve Example 2.1

if you have any question

ask me !

35

36

37

38

39

40

41

42

43

Steady-State Gain

• Steady-state gain is the final ratio as process

settles (t)

• for our example, the steady-state gain is 1:

c

c

A

A0

1)1(

limlim0

/0

0

A

tA

tA

A

t c

ec

c

c

44

Time Constant

• focus on (1-e-t/)

• dictates fraction of change through process

• for t= , (1-e-t/) is 0.632 -- 63.2% change

• for t= 2 , (1-e-t/) is 0.865 -- 86.5 % change

c c eA A

t

0 1( )/

45

Gain-Time Constant Form of a Model

• 1st order linear o.d.e. model:

where u(t) is the input variable of interest.

• Kp - process steady-state gain

• - process time constant

• if model is in this form, these quantities can be

identified directly.

)(tuKydt

dyp

46

Step Response Solution for

Gain-Time Constant Model Form

The solution to:

where the input, u(t), is a step change at time zero in

the input of size u, starting from steady-state

operation is:

y K e up

t ( )/1

)(tuKydt

dyp

47

Example 3.2 - Stirred Tank Reactor Model

• same overflow tank - constant level

• reaction - first order: A B

• reaction rate for consumption of A is kCA (mol/L/min)

• we now have a generation term (consumption)

48

Example 3.2 - Model

• component mass balance on A

0 0 1

0 10

( )A AA A A A

A A

AA A A

d MW VcMW F c MW F c

dt

MW Vkc

Fd c Fc c kc

dt V V

49

Example 3.2 - Gain-Time Constant Form

• group terms:

• time constant is V/(F+kV)

» time constant is now smaller than when there was no reaction.

• gain is F/(F+kV)

» gain is now smaller than when there was no reaction.

AOAA

FCCkVFdt

dCV )(

AOpAA

CKCdt

dC

50

Example 3.2 - Initial Conditions

• Assume that we start at steady state with feed concentration

cA0init

– reactor initial concentration is

cA = [F/(F+kV)] cA0init

How do we know?

• We can place model solution in deviation form (perturbation) if

we are interested in changes from the old steady-state condition

where =V/(F+kV) and Kp= F/(F+kV)

0/ )1( A

tA ce

kVF

Fc

3.3 Stirred-Tank Heating Process

Figure 2.3 Stirred-tank heating process with constant holdup, V.

3.3 Stirred-Tank Heating Process

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 capacity C of the liquid are assumed to

be constant. Thus, their temperature dependence is neglected.

4. Heat losses are negligible.

5. Changes in potential energy and kinetic energy can be neglected because they are small in comparison with changes in internal energy.

6. The net rate of work can be neglected because it is small compared to the rates of heat transfer and convection.

For the processes and examples considered in this book, it

is appropriate to make two assumptions:

1. Changes in potential energy and kinetic energy can be

neglected because they are small in comparison with changes

in internal energy.

2. The net rate of work can be neglected because it is small

compared to the rates of heat transfer and convection.

For these reasonable assumptions, the energy balance in

can be written as

int (2-10)dU

wH Qdt

int the internal energy of

the system

enthalpy per unit mass

mass flow rate

rate of heat transfer to the system

U

H

w

Q

denotes the difference

between outlet and inlet

conditions of the flowing

streams; therefore

-Δ wH = rate of enthalpy of the inlet

stream(s) - the enthalpy

of the outlet stream(s)

For a pure liquid at low or moderate pressures, the internal energy

is approximately equal to the enthalpy, Uint , and H depends

only on temperature. Consequently, in the subsequent

development, we assume that Uint = H and where the

caret (^) means per unit mass.

H

ˆ ˆintU H

intˆ ˆ (2-29)dU dH CdT

where C is the constant pressure heat capacity (assumed to be

constant). The total internal energy of the liquid in the tank is:

int intˆ (2-30)U VU

Model Development - I

An expression for the rate of internal energy accumulation can be

derived from previous equations:

int (2-31)dU dT

VCdt dt

Note that this term appears in the general energy balance

Suppose that the liquid in the tank is at a temperature T and has an

enthalpy, . Integrating from a reference temperature Tref to T

gives,

H

ˆ ˆ (2-32)ref refH H C T T

where is the value of at Tref. Without loss of generality, we

assume that , equation above can be written as:

ˆrefH H

ˆ 0refH

ˆ (2-33)refH C T T

Model Development - II

ˆ (2-34)i i refH C T T

Substituting into the convection term gives:

ˆ (2-35)i ref refwH w C T T w C T T

Finally, substitution into the original differential equation gives

(2-36)i

dTV C wC T T Q

dt

Model Development - III

For the inlet stream

Solve Example 2.4

if you have any question

ask me !

3.4 Liquid Level Systems

Assumption ; constant density, uniform cross-sectional area

– Mass Balance; [Accumulation]=[In]-[Out]

oi qqdt

Ahd

)()( oi qq

dt

dhA

hCqqqdt

dhA Vioi

Figure: A liquid-level storage system.

qo=Cv√h

Flow resistance

qo

qi

The Continuous Stirred-Tank Reactor(CSTR) – Reaction; A B,

– Assumption; the mass densities of feed and products stream are equal and constant.

Figure: A nonisothermal continuous stirred-tank reactor.

andkCr A )/exp(0 RTEkk

• Mass balance for component A.

• Energy balance.

AiAAiA kCVqCqC

dt

CVd

)(

OutInAccumulation nceDisappeara

)()()}((

RPRiPRP TTqCTTqC

dt

TTCVd

)()( TTUAVkCH CCA

Accumulation OutIn

additionheatofrateNet

61

Why do we write solutions in deviation (perturbation) form?

• We focus on changes from old steady-state

• We will use this approach when we determine linear

approximations to nonlinear ODE models

– linearise about initial steady-state point

• Laplace transform analysis - done in deviation form to

avoid initial condition problems

– if we use deviation variables, and start at steady-state, initial

condition for the model output variable is 0.