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

Modelling Note

The document discusses process modelling and provides examples. It describes modelling as representing a process using mathematical equations. The modelling steps involve drawing a process diagram, listing assumptions, determining variables, writing conservation equations, and determining parameters. Three examples are given of modelling a continuous stirred tank heater with different assumptions.

Uploaded by

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

Modelling Note

The document discusses process modelling and provides examples. It describes modelling as representing a process using mathematical equations. The modelling steps involve drawing a process diagram, listing assumptions, determining variables, writing conservation equations, and determining parameters. Three examples are given of modelling a continuous stirred tank heater with different assumptions.

Uploaded by

Muzammil Iqbal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

PROCESS

MODELLING
KKEK3154 Page | i

TABLE OF CONTENTS
PROCESS MODELLING 1
What is model of a process? 1
Use of model 1
Model category 1
General modelling principles 1
Basic Laws (Fundamental of Conservation of equations) commonly used 2
Conservation equations 2
Modelling Steps 4
Modelling Example No. 1: 5
Modelling Example No. 2: 6
Modelling Example No. 3: 7
Realistic model 8

DEGREES OF FREEDOM OF MODEL 8


Examples: Degrees of freedom 9

LINEARIZATION 10
Linearize a nonlinear term? 11

OPEN LOOP DYNAMICS 12


1. First Order System 12
Features of First Order System 12
Response of First Order Dynamic System Response 13
Physical examples of first order systems 17
First Order System in Series 21
2. Second order systems 26
Features of second order systems 27
Step Response (Second Order System) 27
Features of under damped Responses 30
Sinusoidal response (Second Order System) 32

TRANSFER FUNCTION - POLES AND ZEROS 34


Examples of poles and zeros in the transfer function 34
Qualitative analysis for the system response 35

APPENDIX: LAPLACE TRANSFORM 38


Transforms of Simple Functions 38
Transform of Derivatives 39
Theorem of Laplace Transformation 39
KKEK3154 Page | 1

PROCESS MODELLING

What is model of a process?

- Represents a process in mathematical form.

- Set of equations representing the process is the best estimate for the
actual process.

- Normally requires time / cost / effort to obtain and verify a model.

Use of model

1. Increase the understanding of a process.

2. Training of employees handling a process.

3. To design a control strategy for the new process.

4. Obtain controller setting

5. Designing a control law (advanced control)

6. To optimize the process operating conditions

Model category

1. Theoretical model (from the principles of chemistry and physics)

2. Empirical models (from statistical analysis of the process data)

3. Mixture of (i) and (ii) or one / two parameters is found from process data.

General modelling principles

Normal dynamic model contain ordinary or partial differential equations

(ODE / PDE) and mixed with algebraic equations.


KKEK3154 Page | 2

Basic Laws (Fundamental of Conservation of equations) commonly used

1. i. Total continuity equation, ii. Component balance

2. Energy equation

3. The equations of motion

4. Transport equation

5. Equation of state

6. Equilibrium equation

7. Chemical Kinetics

Conservation equations

1. i. Total continuity equation.

Mass flow in - mass flow out = rate of change with time for the mass in the
system.

ii. Continuity equation of component balance.

Flow (in moles) of component A in - flow (in moles) of component A out + rate
of growth (in moles) for components A from chemical reaction = rate of
change with time (in moles) for component A in the system.

2. Energy Equation.

The flow of energy (internal Kinetic & Potential) into the system - the flow of
energy out + additional heat from the flow through conduction, radiation and
reaction - the work carried out on the environment = the rate of change with
time for energy in the system.

3. The equations of motion

Newton's second law,


KKEK3154 Page | 3

4. Equation for the transport laws.

Quantity Heat Mass Momentum


Flux

Molecular transport

Driving force

Law property Fourier’s Thermal Fick’s diffusivity, Newton’s viscosity,


conductivity,

Overall transport

Driving force
Relationship -

* Driving force in terms of partial pressures and mole fractions are also commonly

used.

Note: The most common problem determining pressure drops through pipes, uses

friction factor correlations, ( )

5. Equation of state

 Liquid density, ( )

 Vapour density, ( )

 Liquid enthalpy, ( )

 Vapour enthalpy, ( )

6. Equilibrium

 Chemistry i.e.: ∑ where is the stoichiometry coefficient and is


the chemical capability.

 Phase i.e. Raoult's Law , ( )


KKEK3154 Page | 4

7. Chemical Kinetics, i.e.: Arrhenius equation

Where K is the chemical reaction rate at the temperature T (in kelvin), α is the

coefficient of reaction, E is the activation energy and R is the Universal gas

constant.

Modelling Steps

1. Draw a schematic diagram of the process (process schematic diagram) by

'labeling' all variables process.

2. List all the assumptions made.

3. Determine the independent free variables.

4. Write the balance of the dynamic processes (mass, energy components).

5. Use other necessary relationships (stoichiometric reactions etc.).

6. Determine the parameters (constant) of the system.

7. Determine model variables.

8. Calculate the total degrees of freedom.

9. Determine the input (NF) to achieve satisfactory degree of freedom and

determine the output variables.


KKEK3154 Page | 5

Modelling Example No. 1:

Continuous Stirred tank heater

V – Volume

Q - Heater

Assumption:

 Input flowrate,
 C is constant
 Tref is reference temperature

Energy balance for the tank (A balance of dynamic systems)

[ ( )] ( ) ( )

But when is constant (then ) and we get the

( )

Note: In this case, the dynamic model is a system of linear differential equation

where, ( ) can be solved analytically.

The Steady-state model when, is ( )


KKEK3154 Page | 6

Modelling Example No. 2:

The same system, but the volume V is not constant

In this case, temperature, T and volume, V is not constant.

(a) Mass balance

( ) (1)

(b) Energy balance

[ ] (2)
( ) ( )

If and are constant

Eq. (1) becomes: (3)

And Eq. (2) becomes

( )( ) ( ) ( )

( )
(4)

Finally, Equation (3) and (4) are the dynamic models for this system.
KKEK3154 Page | 7

Modelling Example No. 3:

System as before (w = wi), but with other assumptions

For this case (constant volume), assuming that the energy, is not transferred

instantly from the heating element to volume / fuel tank.

The heating element has a thermal capacity with mass and the specific heat,

and then the energy balance inside the tank is,

Energy Balance the tank:

( ) (5)

Energy balance for heating element:

(6)

Given;

( )

Where, is the average temperature of heater; is heat transfer coefficient from

the heater to the tank; and is the surface area of heat transfer for the element. Q

is input variable supplied to the heating element.

Note: The first-order differential equation system above can be converted to a

second order differential equations by solving Eq. (5) for and the differentiate to

find . Finally, substitute the expression and into Eq. (6) and yields:

( )
KKEK3154 Page | 8

Realistic model

- It should contain all the important dynamic effects

- The number of equations and parameters should be minimal and no more

than necessary

- Select reasonable and realistic assumptions.

DEGREES OF FREEDOM OF MODEL

It is for the model equations to have a unique relationship between the variables.

Note: Number of unknown variables should be equal to number of independent

equations.

i.e. Degrees of freedom,

Where, NV is number of variables and NE is Independent equations.

 If NF = 0 then the process of accurately determined (the equations have

unique solutions)

 If NF > 0 then the system equations is underspecified


KKEK3154 Page | 9

Examples: Degrees of freedom

(a) Example 1

Parameters: 3  V, ρ, C

Variables: 4  T, W, Ti, Q

i.e Nv = 4

Equation: 1

i.e. NE = 1

Degree of freedom, Nv – NE = 4 -1 = 3
(NF)

For unique solutions

Inputs needed to be set as W, Ti, Q

i.e. input: W, Ti, Q

and output: T

(b) Example 2

Parameters: 2  ρ, C

Variables: 6  V, T, W i, W, Ti, Q

i.e Nv = 6

Equations: 2

i.e. NE = 2

NF = 6 -2 = 4

Inputs to be set are W i, W, Ti, Q

and output: V, T
KKEK3154 Page | 10

LINEARIZATION

Mass balance (ρ is constant)

(1)

If

(1) Becomes, (2) (A is constant cross sectional area)

Equation (2) is linear with h

But if √

Eqn. (1) become √ (3)

Equation (3) is nonlinear with h.

Must use linearization technique for √

( )
√ √ [ ( √ )] ( ) [ ( √ )]

√ ( ) ( )
√ √

Ignore second order term and above

So we get,

√ √ ( )

Thus, equation (3) become

√ ( )

√ (4)

KKEK3154 Page | 11

Linearize a nonlinear term?

Example 1: Linearization of one variable about

 ( ) ; ( ) ( )

 ( ) ; ( ) ( )
( )

Taylor series expansion can be used to linearize the functions, ( ) of one variable
above.

( ) ( )
( ) ( ) | ( ) | ( )

Example 2: Function of two variables about ,

( ) ( ) | ( ) | ( )

| ( ) | ( )

| ( )( )
KKEK3154 Page | 12

OPEN LOOP DYNAMICS

1. First Order System

 First order system is a system where the output ( ) can be modelled with

first order linear differential equation. i.e.

( ) (1)

where ( ) is input function

if ( ) (2)

Here and

(2) because ( ) (3)

Where Time constant; steady state gain

If ( ) and ( ) and ( ) and ( )

(s - denote to the steady state)

Thus, from (3), using Laplace transformation, the transfer function , ( )

( )
( ) (4)
( )

Process with above transfer function is known as first order system OR first order

lag.

Features of First Order System

1. Has the capacity to store mass, energy and momentum


2. Has the resistance involving mass flow, energy or momentum.
KKEK3154 Page | 13

Response of First Order Dynamic System Response

( )

1. Step Response

If a step change is inserted with magnitude A into the system

i.e. ( )

and by partial fractions, ( ) { } { }


( ) ( )

Using Laplace inversion, we get

( ) ( )

𝑌(𝑡)
𝐴𝑘𝑝

𝑡
𝜏𝑝
KKEK3154 Page | 14

Features of first order Step Response

(1) Process is self-regulating

(2) Response slope at t = 0 is 1.0

(3) Response value reach 63.2% of the final value when time elapsed equals

constant time, τ p

Time Elapsed

( ) final value 86.5 95 98

After three → four time constant, response reaches final value

(4) Able to use the principle of superposition to input step with magnitudes,

i.e. A, Akp , etc.

(5) Final value equals kp (Akp)

i. ( ) when
KKEK3154 Page | 15

2. Impulse Response

X(s) = 1 ( if kp = l )

( )

By Laplace inversion,

 ( )

Plot ( ) vs , we get
KKEK3154 Page | 16

3. Sinusoidal Response

( ) ( )

Where ( ) (xs steady state variable)

A = Amplitude of input variable

ω = frequency in rad/time

( )

( ) where ( )

From Inverse Laplace Transformation

( ) ( ) ( )

( ) ( )

Where ( )

When ( )| ( )

Compare with input, ( ) ( ); we find

(i) Output is sinusoidal wave with frequency ω, equals with the input signal

(ii) Ratio of output amplitude with input amplitude is


i.e. signal attenuation

(iii) Output lags input with angle i.e. → phase lag

If is constant, they depend only on .


KKEK3154 Page | 17

Physical examples of first order systems

Example No. 1: Water level (capable of holding mass)

Constant density;

Cross sectional area = A

Flow resistance (i.e. valve, dams etc.) = R

= (driving force for flow) / (resistance to flow)

(Linear if relationship between flow and height is linear)

Mass balance for this system is given as

( )
( ) ( ) (1)

(2)

At steady state,

(3)

From (1) - (3), we get

Where

Taking Laplace transformation, we obtain

( )
( )
Where (time constant process)

(steady state gain process)


KKEK3154 Page | 18

Example No. 2: Heating system (capability to store energy)

Given:

V - volume of water in tank


ρ, cp – density and heat capacity
U – the overall heat transfer coefficient between steam and liquid
A – total area for heat transfer
Tsteam – saturated steam temperature

Energy balance for the system

( ) (1)

Steady state given as

( – ) (2)

Subtract (2) from (1) and using deviataion variables, we find,

( ) (3)

Where and –

Laplace transformation shows,

( )
(4)
( )

Where is time constant of process,

is steady state gain,


KKEK3154 Page | 19

Example No. 3: Mixing Process

q – Constant flow rate

V – hold up,

y(t) – salt concentration in outflow.

Taking mass balance for salt

( )
(1)

At steady state

– (2)

Using deviation variable, we find;

( ) ( )

(3)

From Laplace Transformation for this equation, we get.

( )
( )

Where, ( )
KKEK3154 Page | 20

Response for water level system

For this system,

( )
( )

If unit step change is applied to flow, Q(t)

We find ( )

From above equation

( )

Taking Inverse Laplace Transformation,

( ) ( )

Using Final Value Theorem

[ ( )] [ ( )] ( )

Shows that the final change in H(t) for unit change in Q(t) is R(kp).

N.B

For this system, we also can get the transfer function by relating the output flow rate

( ) to the input flow rate, ( ) i.e.

( )
( )
KKEK3154 Page | 21

First Order System in Series

A. Non interacting system

Mass balance for tank 1;

(1)

Mass balance for tank 2;

(2)

We assume linear relationship for flow with

(3)

(4)

Combine (1) and (3)


( )
Where ( )
( )
KKEK3154 Page | 22

Combine (2) and (4)


( )
Where –
( )

With this,
( ) ( ) ( )
( ) ( ) ( )

If a change is made to step units of the inlet flow into the tank 1, ( )

( )
( )( )

By using inverse Laplace, we will get

( ) [ ( )]

If τ1 = 1 , τ2 = 0.5, R = 1, system response is as:

For water level


transient response

Note

Response is S shape and gradient is zero at initial state (origin)


KKEK3154 Page | 23

B. Non interacting system in series – general equation

First-order system which does not interact

( )

( )

C. Interacting system in series

Mass balance for tanks:

1.

2.
3. ( ) (for interacting tank)

4.

At steady state,

5.
6.
KKEK3154 Page | 24

From above equations, we get

where

Using Laplace transformation, these equations can be combined to get:

( )
( ) ( )

Assuming and A1 = A2

( )
( ) ( )( )

For unit step change,

( )

Notes:

For non-interactive system,

( )
( ) ( )

For unit step change,

( )
KKEK3154 Page | 25

 We find that interaction effects change the effective time constant.

 Interaction slows the response for the systems.


KKEK3154 Page | 26

2. Second order systems

Dynamic order of second order system (quadratic lag)

Second order system is where output, y(t) can be modelled with second order

differential e.g.

( ) (1)

If , equation (1) becomes

( ) (2)

Where τ is a natural period of oscillation of system, is a damping factor and kp is

steady state gain of system.

Taking Laplace transformation, using deviation variables (where initial state is 0), we

find,

( )
( )
( )

These systems can arise from several physical conditions, classified into three

categories:

1. Multi capacity system (example of first order system in series)


2. Inherently exist in certain system (example manometer, pneumatic valve)
3. Process system that is controlled with controller.
KKEK3154 Page | 27

Features of second order systems

( )
( )

Second order systems can be represented by transfer function that has denominator

as above.

It requires 2 parameters (τ and ) for characterizing the second order dynamic

compared to one parameter for first order system.

Step Response (Second Order System)

Let : Input step as ( )

( ) (3)
( )

Two poles for this transfer function is given by the roots of the polynomial

√ √
i.e. and

With this (1) becomes

( ) (4)
( )( )

( ) can be obtained by inversing above equation (4).


KKEK3154 Page | 28

However, response of ( ) depends on the location of poles and in complex

plane. There are 3 cases:

Case A: When >1

We get two poles that are real and different.  over damped/non-oscillatory

Case B: When =1

We get two poles that are the same  critically damped

Case C: When <1

We get two poles that is complex conjugate.  response that is under

damped or oscillatory.

We will examine every case separately:

Case A: Over damped response ( > 1)

For this case, inversing equation (4) with partial fraction expansion, we get,

( ) { ( (√ ) (√ ) )}

Where trigonometric hyperbolic function is defined as:

( ) ( )

 resembles a first order system but has a slow response in the beginning

 Slows further with the increase value of .

 reaches towards final value asymptotically

 Is found in first order systems in series.


KKEK3154 Page | 29

ξ<1

ξ=1
ξ>1

Case B: Critically damped response ( =1)

From inversing equation (4):

( ) [ ( ) ]

reaches towards final value faster than the over damped system.

Case C: Under damped response

Inversing equation (4) produces:

( ) { ( )}

KKEK3154 Page | 30

√ √
Where is frequency in rad unit per time, and { } .

 Under damped response at the beginning is faster than critically damped

response and over damped response.

 However, even though in the beginning it is faster and reaches final value

faster, it does not stay but oscillates with amplitude that decreases gradually.

 This oscillation action is more apparent with small value for damping factor, .

 All under damped responses in the chemical plant comes from interaction with

controllers with the process units that they control.

 Common type of response normally encountered.

Features of under damped Responses

1. Overshoot

It is defined as A/B where B is the final value and A is the maximum value over
the final value and is a function of .

Overshoot ( )

2. Decay Ratio

Decay ratio, C/A is defined as ratio for 2 consecutive peaks and is a function of
the damping factor.

Decay ratio ( )

= (Overshoot)2
KKEK3154 Page | 31

3. Period of oscillation

Radian frequency (rad / time),

Period of oscillation, where


4. Natural Period of natural oscillation


Occurs when
Natural frequency, (radiant / time)

5. Response time
Time required for the response to come within ±5% of its ultimate final value and

remain there. The time to achieve this response is called response time.

6. Rise time
The time required for the response to first reach its ultimate or final value.

Summary

(1) ξ is a damping factor to measure its degree of damping or oscillatory character.


(2) τ is measure of period or speed of second-order system response.
(3) Because √ for natural frequency approximately to the actual
frequency.
(4) In closed-loop control system controller design the objective is to choose the
values of ξ and τ that produce small overshoot, short rise time, small decay ratio,
and test response time and achieve reasonable compromise between these
criteria.
KKEK3154 Page | 32

Sinusoidal response (Second Order System)

If the function of input is sinusoidal:

( ) ( )
From the general equation of second order system

( )
( )( )

For the case of oscillating system ( ), the roots for the denominator is a pair of

pure imaginary root and a pair of complex root

√ √
( )

Response can be given as;

( ) ( ) ( ) ( (√ ) (√ ) )

Constants can be obtained from partial fractions.

But ( )| ( ) ( )

From this solution, we find that,

Second-order system response to a sinusoidal input function is sinusoidal in the

ultimate response final and has the same frequency.

If the constants and are evaluated,

We get,

( ) ( ) ; Where { ( )
}
√[ ( ) ] ( )
KKEK3154 Page | 33

By comparing the response to the input,

(1) The ratio of output amplitude to input amplitude is,

√[ ( ) ] ( )

Ratio depend on and .

(2) Output follows the input with phase angle, |φ| and

→ 1800, asymptotically when is large.


KKEK3154 Page | 34

TRANSFER FUNCTION - POLES AND ZEROS

In general a transfer function can be represented as:

( )
( )
( )

(Usually Q(s) is lower-order polynomials from P(s) to exist physically)

The roots of the polynomial Q (s) are called zeros of the transfer function or zeros of

system. The roots of the polynomial P (s) are called poles of the transfer function or

pole of system. Poles and zeros, in the system play an important role in the analysis

of system dynamic and also in designing effective controllers.

Examples of poles and zeros in the transfer function

(1) ( )

No zeros but one poles at s = -a

(2) ( )

No zeros but poles at s = -a (poles is similar with case (1)).

( )( )
(3) ( ) (Where k is steady state gain)
( )( )

Thus,

Zeros

Poles,
KKEK3154 Page | 35

Qualitative analysis for the system response

Suppose the overall system transfer function is given by,

( ) ( )
( ) ( ) ( )( )( ) ( )( )( )

Where,

are roots of ( ) or the poles of the system.

Partial fraction expansion of ( ) gives:

( ) { }
( )

If pole locations in the complex surfaces are assumed as follows:

Several conclusions can be made based on the location of these poles in the plane

complex above.

(1) Real and different poles, such as and to produce exponent term (if inverted)

as and

If ; when,

If ; when
KKEK3154 Page | 36

(2) The actual multi-polar (real multiple poles) as  produces terms like

[ ]

If , when

If , when

If , at every time

(3) Complex conjugate as p4 and p4*  produce a term like

( )

If when

If when

If at every time
KKEK3154 Page | 37

Summary

The response nature to the location of the system poles can be summarized as

follow;
KKEK3154 Page | 38

APPENDIX: LAPLACE TRANSFORM

Definition according to equation:

( ) ( ) ∫ ( )

is Laplace Operator

Example:

( )

( ) ∫ |

Note:

i. Laplace transform is defined from t = 0 to t =


ii. Laplace transform operation transforms/changes a functions of the variable t to a
function of variable s (from t domain to s domain)
iii. Laplace transform operation is linear, i.e
( ) ( ) ( ) ( )

Transforms of Simple Functions

1. The Step Function

( ) when t < 0
( ) when t ≥ 0
2. The Exponential Function

( ) when t < 0
( ) when t ≥ 0
3. The Ramp Function

( ) when t < 0
( ) when t ≥ 0
KKEK3154 Page | 39

4. The Sine Function

( ) ( ) when t < 0
( ) ( ) when t ≥ 0
* Others Laplace transforms of various Time-Domain functions can be found in the textbook.

Transform of Derivatives

( )
i. { } ( ) ( )
( ) ( ) and ( ) ( )|

( ) ( )(
ii. { } ( ) ( ) )
( )( ) ( )( )

Where ( ) ( ) indicates the ith derivative at t = 0

Theorem of Laplace Transformation

a) Final Value Theorem


[ ( )] [ ( )]

b) Initial Value Theorem


[ ( )] [ ( )]

c) Translation of Transform
( ) ( )

d) Translation of Function
( ) ( )
KKEK3154 Page | 40

Additional theorems:

(a) Transform of Integral

( )
[∫ ( ) ]

(b) Impulse transfer function is given as

( ) ( )

You might also like