49
Chapter 2 Chapter 2 Mathematical Mathematical Background Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Embed Size (px)

Citation preview

Page 1: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Chapter 2 Chapter 2 Mathematical Mathematical BackgroundBackground

Professor Shi-Shang JangChemical Engineering DepartmentNational Tsing-Hua University TaiwanMarch, 2013

1

Page 2: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

2-1 The Essence of 2-1 The Essence of Process DynamicsProcess Dynamics

2

As the plant is not operated at its steady state as designed, the process is

in a dynamic state.

In many cases, small deviations of process steady state (noise) is

allowed, but keep monitoring on the system is very important.

In case of strong deviations (trend), process control becomes a must.

Page 3: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Example: Thermal Example: Thermal ProcessProcess

Rate of Energy Input- Rate of Energy Output=Accumulation

i i i

vi p i i p

d V u tf h t f h t

dt

d V C T tf C T t f C T t

dt

Inputs: f(t), Ti(t),Ts(t)Output: T(t)

Ts

CV: T(t)MV: f(t)DV: Ti(t), Ts(t)

Page 4: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Noise v.s. TrendNoise v.s. Trend

4

0 50 100 150 20069.9

70

70.1

70.2

70.3

70.4

70.5

70.6

70.7

Noise

Trend

T

time

Page 5: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Conception of deviation Conception of deviation variablevariable

5

PlantManipulative

variablesControlled variables

Disturbances

H= hdeviation = h - hsteady-

state

tank

Valve

liquid level h

control stream

Fc

Wild stream

Fw

Page 6: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

The Essence of Process The Essence of Process Dynamics - Dynamics - ContinuedContinued

6

The feedback/feedforward process control needs to understand the

relationships between

◦CVs and MVs

◦DVs and CVs

the relationships are called process models.

For the ease of mathematical analyses, the process modeling implements

in Laplace transform instead of direct use of time domain process model.

Implementation of deviation variables is needed.

Page 7: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Conception of deviation Conception of deviation variable ( variable ( =T-70=T-70))

7

0 50 100 150 200-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

Noise

Trend

time

Page 8: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

2-2 Linear Systems2-2 Linear Systems

8

Page 9: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

2-2 Linear Systems2-2 Linear Systems

Consider a process system with a CV, say y(t), and a MV,

say m(t). In process industries, it is traditional to assume

the system is lumped and linear. A lumped process

system is such that:

A lumped system is linear if

9

11 1 0 0'n n k

n ky a y a y a y b m b m c

Page 10: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linear Systems-Linear Systems-ContinuedContinued

A lumped process system is autonomous if

An autonomous lumped system is said to be stable at the origin if

10

0 0lim 0; for some (0) ; t

y t y y y S x x

Page 11: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linear Systems-Linear Systems-ContinuedContinued An autonomous lumped system is called asymptotic

stable if

Theory 2-1: A linear system is stable if the roots of

the characteristic equation all have negative real

part.

Corollary 2-1: A linear system is asymptotic stable if it

is stable.

11

0 0lim 0; for (0) ; t

y t y y y R

Page 12: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linear Systems-Linear Systems-ExamplesExamples

12

3

2

31 2 1 2

31 2 1 2

Example 1: " 4 ' 3 0; (0) 0, '(0) 2

: charac. eqn.: 4 3 0 3; 1

( ) 0

'( ) 3 3 2

Finally, we have ( ) t

t t

t t

t

y y y y y

Sol r r r r

y t c e c e c c

y t c e c e c c

y t e e

Note that no matter what the initial conditions is, the solution indicates :

lim 0t

y t

The system is hence asymptotic stable.

Page 13: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linear Systems-Linear Systems-ExamplesExamples

13

2

31 2

3

Example 2: " 2 ' 3 0; (0) 1; '(0) 4

2 3 0

From the inital conditions, we have

17 3

4

t t

t t

y y y y y

r r

y c e c e

y t e e

Note that the above system is unstable since: limt

y t

2

3 3

2 21 2

Example 3 : " 3 ' 8 0

3 8 0

3 23 / 2

1 1cos 23 sin 23

2 2

t t

y y y

r r

r i

y t c e t c e t

Note that the above system is also unstable since: limt

y t

Page 14: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linear Systems-Linear Systems-ContinuedContinued

Theory 2-2: A forced linear system is stable if the inputs of the system is bounded.

A process control system is basically assuming that the controlled variable (CV) is to be controlled to a certain set point (zero), thus it is assumed that the input (MV) is the forcing function to a linear system with a dependent variable of CV.

14

Page 15: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linear Systems-Linear Systems-ContinuedContinued A forced system is of the following form, for example:

y”+a1y’+a0y=bm(t)

In case of m(t) is in special functions such sint the

above equation can be solved by implementing

particular solutions i,e., y(t)=yh+yp

However, in case of feedback process control, m(t) is

most likely as a function of y(t), i.e.

15

1 0" ' ( )y a y a y bf y

Page 16: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linear Systems-Linear Systems-ContinuedContinued In most analysis of a feedback control systems, it is

our tradition to assume that the system performance

is in its steady state, i.e.

y”+a1y’+a0y=bm(t), y(0)=0; y’(0)=0

For the convenience of the analysis, a Laplace

transform expression of the above linear system

becomes necessary.

16

Page 17: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

2-3 Laplace Transform: 2-3 Laplace Transform: Definitions and PropertiesDefinitions and Properties

17

0

( ) ( ) ( )stf t f t e dt F s

L

0

1( ( )) 1 stf x e dt

s

L

Definition 2-1: Consider a function of time f(t), the Laplace transform of f(t)is denoted by

Property 2-1: If f(t)=1, t 0, f(t)=0, t<0, this is called a step function as shown below (to describe an abrupt event to cause the change of operation), then:

time0

Page 18: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Scenario 1: Step function Scenario 1: Step function (shift)(shift)

18

-10 -8 -6 -4 -2 0 2 4 6 8 10-0.5

0

0.5

1

1.5

Time (seconds)

data

Time Series Plot:

The process endures an abruptlong term change, such a PM on a tool of manufacturingplant.

Page 19: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Definitions and Properties- Definitions and Properties- ContinuedContinued

19

Corollary 2-1: Given the following step function:

0 0

0 )(

t

tCtu

Then: 0

st Cu t Ce dt

s

L

Property 2-2: Given a ramp function:

0 0

0 )(

t

tCttf

Then: 20

st Cf t Cte dt

s

L

time

time

0

0

Page 20: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Scenario 2: Ramp function Scenario 2: Ramp function (drift)(drift)

20

-10 -8 -6 -4 -2 0 2 4 6 8 10

0

20

40

60

80

100

120

Time (seconds)

data

Time Series Plot:

The process endures slow change on the process such as tool aging of a manufacturing plant.

Page 21: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Definitions and Properties Definitions and Properties - Continued- Continued

21

tc 0

0 1/c

0t 0

)( cxf

Property 2-3: delta function (t)

0 0

0 t)(

t

tCtf

Then: 0

stf t C t e dt C

L

Note that, a pulse function can also represent an abrupt event in plantoperation, but the event can be vanished very soon unlike step function.

Definition 2-2: A pulse function is denoted by:

Definition 2-3: A delta function (t)=limc0f(x)

time0 c

1/c

Page 22: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Scenario 3: Pulse function Scenario 3: Pulse function (Excursion)(Excursion)

22

-10 -8 -6 -4 -2 0 2 4 6 8 10-0.5

0

0.5

1

1.5

Time (seconds)

data

Time Series Plot:

The process endures a sudden short change but returns to its originalstate.

Page 23: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Definitions and Properties- Definitions and Properties- ContinuedContinued

23

0 0

0 )(

-at

t

tetf

0

1at stf t e e dts a

L

0 0

0 )(

-at

t

tCetf

Property 2-4: Exponential function

Corollary 2-2

0

at st Cf t C e e dt

s a

L

Then:

Then:

Page 24: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Scenario 4: Exponential Scenario 4: Exponential function (Excursion)function (Excursion)

24

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time (seconds)

data

Time Series Plot:

The process endures a sudden abrupt change, but returnto its original state gradually..

Page 25: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Definitions and Properties- Definitions and Properties- ContinuedContinued

25

Sinusoildal Functions Property 2-5:

0 0

0 t Asin)(

t

ttf

2 20

sin st Af t A te dt

s

LThen:

Property 2-6:

0 0

0t Acos)(

t

ttf

Then: 2 2

0

cos st Asf t A te dt

s

L

Sinusoildal Functions

Page 26: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Scenario 5: Sinusoidal Scenario 5: Sinusoidal functionfunction

26

-10 -8 -6 -4 -2 0 2 4 6 8 10-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Time (seconds)

data

Time Series Plot:

The process endures a sinusoidal wave input to force it response another periodical wave.

Page 27: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

TheoryTheory

27

Theory 2-1: LinearityConsider two functions f(t) and g(t) with their Laplace transform F(s) and G(s) exists, and let a and b be two constants, then

af t bg t aF s bG s L

Theory 2-2: DerivativeLet f(t) be differentiable, and its Laplace transform F(s) exist, then

( )(0 )

df tsF s f

dt

L

Page 28: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Theory - Theory - ContinuedContinued

28

( ) ( )0 ( )d s

d

dy t dy t dysY s y sY s

dt dt

L L

Remark 2-1: Deviation variable (perturbation variable)Let y(t) has a steady state ys, then yd is called a deviation variable ifyd(t)=y(t)-ys

Remark 2-2: In the study of control theory, we all assume that the processis originally at its steady state, and then a change of the system starts. Therefore, y(0)= ys, or yd(0)=0.

Corollary 2-3: Derivative of a deviation variable

Page 29: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Theory - Theory - ContinuedContinued

29

Theory 2-3: Final Value TheoremConsider a function f(t) with its Laplace Transform F(s), then:

ssFtfst 0limlim

Theory 2-4: Dead time (Time Delay, Translation in Time)Consider a function f(t) with its Laplace Transform F(s), then:

sf t e F s L

Page 30: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

General ProcedureGeneral Procedure

30

Time domain

Laplace domain

Step 1Take Laplace

Transform

ODE

Initial conditions

Step 2Solve for

sD

sNsY

Step 3Factor D(s)

perform partialfraction expansion

Step 4Take inverse

Laplace transform

Solution y(t)

Page 31: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Solution of a Linear Solution of a Linear SystemSystem

Example: Solve the differentiation equation

1 0.8

5 4 2; (0) 1

5 4 2

25 4

25 ( ) 1 4 ( )

2 5 2( ) 5 4 5

5 2( )

5 4

5 2( ) 0.5 0.5

5 4t

dyy y

dt

dyL y L

dt

dyL L y

dt s

sY s Y sss

Y s ss s

sY s

s s

sy t L e

s s

Sol: Take the Laplace transform on both sides of the equation

or,

By Laplace Transform

Page 32: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Solution of a Linear Solution of a Linear SystemSystem

t

s

s

etyssss

sY

s

ss

s

where

ssss

ssY

8.0

8.02

01

21

5.05.0)(8.0

5.05.0

45

5.25.0)(

5.28.0

2

8.0

28.0525

5.045

25

45)45(

25)(

By Laplace Transform – Partial Fraction Expansion

Page 33: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

2-4 Transfer Functions –2-4 Transfer Functions – Example: Thermal Example: Thermal ProcessProcess

Rate of Energy Input- Rate of Energy Output=Accumulation

i i i

vi p i i p

d V u tf h t f h t

dt

d V C T tf C T t f C T t

dt

Inputs: f(t), Ti(t),Ts(t)Output: T(t)

Ts

Page 34: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

2-4 Transfer Functions 2-4 Transfer Functions – – Cont.Cont.Let f be a constant V= constant, Cv=Cp

Page 35: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Transfer Functions – Transfer Functions – Cont.Cont.

where, Gp(s) is call the transfer function of the process, in block diagram:

Gp(s)M(s) Y(s)

Page 36: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Scenario Simulation (Step Scenario Simulation (Step Change)Change)

36

1

10s+1

Transfer Fcn

simout

To Workspace

Step Scope

0 5 10 15 20 25 30 35 40 45 500

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Page 37: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Homework and Homework and Reading AssignmentsReading Assignments

37

Homework – Due 3/19Text p572-1,2-2, 2-6 (a), (c)Reading Assignments:Laplace Transform(p11-26)

Page 38: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

2-52-5 Linearization of a Linearization of a FunctionFunction

X0X0 -△ X0+△

- 0 △ △

F(X)

X

aX+b

Page 39: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linearization of a Function Linearization of a Function (single variable)(single variable)

Example: Linearize the Arrhenius equation, at T=300C, k(300)=100 , E=22,000kcal/kmol.

T

1s

280 285 290 295 300 305 310 315 32040

60

80

100

120

140

160

180

200

1

1

2

2/

0

/0

7.13330031037.31003.139310

3.6630029037.310095.70290

..

30037.3100

37.3273300987.1

22000100

)()(

sk

sk

ge

TTk

TR

Eek

T

k

where

TTT

kTkekTk

TRETT

TTRTE

Page 40: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linearization of a Function Linearization of a Function (two variables)(two variables)

2, 1

, 2 2 2 1

if 2.2, 1.1 respectively

2.2 1.1 2.42 2 2.2 2 2 1.1 1 2.4

w l

a aa w t l t a w w l l w l

w lw l

a

Page 41: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linearization of Differential Linearization of Differential EquationsEquations

Definition 2-4: A linear function L(x) is such that for xRn, for all scalars a and b, L(ax1+bx2)= aL(x1)+bL(x2).

Definition 2-5: A Linear system is denoted as the following:

nnn

n

n

xxxLdt

dx

xxxLdt

dx

xxxLdt

dx

,,,

,,,

,,,

21

2122

2111

Provided that L1,…,Ln are linear functions

Page 42: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linearization - Linearization - ContinuedContinuedConsider a function f(x1,…,xn),

the linearization of such a function to a point

is defined by the first order Tylor expansion at that point, i.e.

nn

xx

xxxx

n

xx

xxxxn

nn

xxx

fxx

x

fxxxf

xxxLxxxf

nnnn

1

22

1

1

22

1 111

21

2121

,,,

,,,,,,

Page 43: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Linearization of a single input Linearization of a single input single output systemsingle output system

0 0

0 0

0 0

0 0

,

( , )

0

Laplace Transform

( )

1

x x x xu u u u

f fx f x u x x u u

x u

f x u

X aX bU

sX s aX s bU s

or

X s b K

U s s a s

Page 44: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Example – Level ProcessExample – Level Process

hV

f0

fCross-sectional=A

1/ 2f kh

0 0 0 ,dV dh

A f f f k h f f hdt dt

A=5m2

mh 9

f0=1m3/min

30

1/ 2

1 1 / min

39

f mk

mh

Abrupt change of f0

from 1 to 1.2m3/min

Page 45: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Example – Level Example – Level Process - ContinuedProcess - Continued

0 0

1/ 3 15

182 9

dHF H F H

dt

sFsHs 0)()1815(

/90

/90

0.2 344 3.6( )

5 1/18 90 1

( ) 3.6 3.6

( ) 12.6 3.6

t

t

H ss s s s

H t e

h t e

0 0

0 2

d h hdh dH f f kA A A F H F H

dt dt dt F h h

Taking Laplace Transform on both sides:

Now, F0(s)=0.2/sTransfer Fcn

90 s+1

18

To Workspace

simout

Step Scope

Constant

9

Add

Page 46: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

[A B C D]=linmod('example_model');[b,a]=ss2tf(A,B,C,D);

example_model

Linearization

Page 47: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

47

Time(min.)

Page 48: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Conclusive Remarks for Conclusive Remarks for Laplace TransformLaplace Transform

Laplace transform is convenient tool to represent the dynamics of a linear system.

Laplace transform is very easy to use to special inputs, especially in case of abrupt change of system inputs and time delays.

Linearization is a frequent approach for a nonlinear system, and it is a good approximation in small change of the inputs.

Page 49: Chapter 2 Mathematical Background Professor Shi-Shang Jang Chemical Engineering Department National Tsing-Hua University Taiwan March, 2013 1

Homework – Due 3/19Text p572-17,2-23Linearization of Function(p50-56)