21
President University Erwin Sitompul SMI 2/1 Dr.-Ing. Erwin Sitompul President University Lecture 2 System Modeling and Identification http://zitompul.wordpress.com

Solution of Homework 1: Interacting Tank-in-Series System

  • Upload
    feleti

  • View
    56

  • Download
    1

Embed Size (px)

DESCRIPTION

Chapter 2. Examples of Dynamic Mathematical Models. Solution of Homework 1: Interacting Tank-in-Series System. q i. A 1 :Cross-sectional area of the first tank [m 2 ] A 2 :Cross-sectional area of the second tank [m 2 ] h 1 : Height of liquid in the first tank [m] - PowerPoint PPT Presentation

Citation preview

Page 1: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/1

Dr.-Ing. Erwin SitompulPresident University

Lecture 2System Modeling and Identification

http://zitompul.wordpress.com

Page 2: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/2

Solution of Homework 1: Interacting Tank-in-Series System

v1

qi

h1

Chapter 2 Examples of Dynamic Mathematical Models

h2

v2

q1 a1 a2

A1 : Cross-sectional area of the first tank [m2]

A2 : Cross-sectional area of the second tank [m2]

h1 : Height of liquid in the first tank [m]

h2 : Height of liquid in the second tank [m]

qo

The process variable are now the heights of liquid in both tanks, h1 and h2.

The mass balance equation for this process yields:1 1

i 1( )d Ah q qdt

2 21 o

( )d A h q qdt

Page 3: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/3

Solution of Homework 1: Interacting Tank-in-Series SystemChapter 2 Examples of Dynamic Mathematical Models

Assuming ρ, A1, and A2 to be constant, we obtain:

After substitution and rearrangement,

1 1 1q v a 1 2 12 ( )g h h a

o 2 2q v a 2 22gh a

1 i 11 2

1 1

2 ( )dh q a g h hdt A A

2 1 21 2 2

2 2

2 ( ) 2dh a ag h h ghdt A A

Page 4: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/4

Homework 2: Interacting Tank-in-Series SystemChapter 2 Examples of Dynamic Mathematical Models

Build a Matlab-Simulink model for the interacting tank-in-series system and perform a simulation for 200 seconds. Submit the mdl-file and the screenshots of the Matlab-Simulink file and the scope of h1 and h2 as the homework result.Use the following values for the simulation.

a1 = 210–3 m2

a2 = 210–3 m2

A1 = 0.25 m2

A2 = 0.10 m2

g = 9.8 m/s2

qi = 510–3 m3/stsim = 200 s

Page 5: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/5

Homework 2: Triangular-Prism-Shaped TankChapter 2 Examples of Dynamic Mathematical Models

Build a Matlab-Simulink model for the triangular-prism-shaped tank and perform a simulation for 200 seconds. Submit the mdl-file and the screenshots of the Matlab-Simulink file and the scope of h as the homework result.Use the following values for the simulation.

NEW

a = 210–3 m2

Amax= 0.5 m2

hmax = 0.7 mh0 = 0.05 m (!)g = 9.8 m/s2

qi1 = 510–3 m3/sqi2 = 110–3 m3/stsim = 200 s

Page 6: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/6

Chapter 2 Examples of Dynamic Mathematical Models

Heat ExchangerConsider a heat exchanger for the heating of liquids as

shown below.Assumptions: • Heat capacity of the tank is small

compare to the heat capacity of the liquid.

• Spatially constant temperature inside the tank as it is ideally mixed.

• Constant incoming liquid flow, constant specific density, and constant specific heat capacity.

Page 7: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/7

Chapter 2 Examples of Dynamic Mathematical Models

Heat ExchangerConsider a heat exchanger for the heating of liquids as

shown below.

Tj

qTl

qT

Vρ Tcp

Tl : Temperature of liquid at inlet [K]

Tj : Temperature of jacket [K]T : Temperature of liquid inside

and at outlet [K]

q : Liquid volume flow rate [m3/s]V : Volume of liquid inside the

tank [m3]ρ : Liquid specific density [kg/m3]cp : Liquid specific heat capacity

[J/(kgK)]

Page 8: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/8

Chapter 2 Examples of Dynamic Mathematical Models

Heat ExchangerThe heat balance equation becomes:

l j

( )( )p

p p

d V c Tq c T q c T A T T

dt

A : Heat transfer area of the wall [m2] : Heat transfer coefficient [W/(m2K)]

Rearranging:

l j( )p p pdTV c q c T q c A T ATdt

l jp p

p p p

V c q cdT AT T Tq c A dt q c A q c A

The heat exchanger will be in steady-state if dT/dt = 0, so the steady-state temperature at outlet is:

steady-state l jp

p p

q c AT T Tq c A q c A

Page 9: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/9

τ : Space variable [m]Ti : Liquid temperature in the

inner tube [K] Ti(τ,t)To : Liquid temperature in the

outer tube [K] To(t)q : Liquid volume flow rate

in the inner tube[m3/s]ρ : Liquid specific density in the

inner tube [kg/m3]cp : Liquid specific heat capacity

[J/(kgK)]A : Heat transfer area per

unit length [m]Ai : Cross-sectional area of

the inner tube [m2]

Chapter 2 Examples of Dynamic Mathematical Models

Double-Pipe Heat Exchanger

L

To,ss

τ dτ

A single-pass, double-pipe steam heat exchanger is shown below. The liquid in the inner tube is heated by condensing steam.

Ti,ss

τ q

Page 10: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/10

Double-Pipe Heat Exchanger

To(t)

Ti(τ,t)

ii

TT d

The profile of temperature Ti of an element of heat exchanger with length dτ for time dt is given by:

i ii

T TT d dtt

(taken as approximation)

i ii i i o i( ) ( )p p p

dT TAd c q c T q c T d Ad T Tdt

The heat balance equation of the element can be derived as:

Chapter 2 Examples of Dynamic Mathematical Models

Page 11: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/11

Chapter 2 Examples of Dynamic Mathematical Models

Double-Pipe Heat Exchanger

i i io i

p pAd c q cdT T T TAd dt A

The equation can be rearrange to give:

The boundary condition is Ti(0,t) and Ti(L,t).

The initial condition is Ti(τ,0).

Page 12: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/12

Heat Conduction in a Solid Body

L

q(0) q(L)q(x) q(x+dx)

xdx

Consider a metal rod of length L with ideal insulation.Heat is brought in on the left side and withdrawn on the

right side.Changes of heat flows q(0) and q(L) influence the rod

temperature T(x,t).The heat conduction coefficient, density, and specific

heat capacity of the rod are assumed to be constant.

Chapter 2 Examples of Dynamic Mathematical Models

Page 13: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/13

Heat Conduction in a Solid Body

t : Time variable [s]x : Space variable [m]T : Rod temperature [K] T(x,t)ρ : Rod specific density [kg/m3]A : Cross-sectional area of the rod [m2]cp : Rod specific heat capacity [J/(kgK)]q(x) : Heat flow density at length x [W/m2]q(x+dx) : Heat flow density at length x+dx [W/m2]

L

q(0) q(L)q(x) q(x+dx)

x dx

Chapter 2 Examples of Dynamic Mathematical Models

Page 14: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/14

Heat Conduction in a Solid Body

The heat balance equation of at a distance x for a length dx and a time dt can be derived as:

L

q(0) q(L)q(x) q(x+dx)

x dx

in out

( )pd mc TQ Q

dt

( ) ( )pdTAdx c A q x q x dxdt

( )pdT dq xAdx c A dxdt dx

( )( ) ( ) dq xq x dx q x dxdx

x dxx

( )q x

( )q x dx ( )( ) dq xq x dxdx

0dxfor

Chapter 2 Examples of Dynamic Mathematical Models

Page 15: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/15

Heat Conduction in a Solid BodyAccording to Fourier equation:

( ) dTq xdx

λ : Coefficient of thermal conductivity [W/(mK)]

Substituting the Fourier equation into the heat balance equation:

2

2pdT d TAdx c A dxdt dx

2

2pdT d Tcdt dx

2

2p

dT d Tdt c dx

: Heat conductifity factor [m2/s]pc

Chapter 2 Examples of Dynamic Mathematical Models

Page 16: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/16

The boundary conditions should be given for points at the ends of the rod:

Heat Conduction in a Solid Body

0(0, ) ( )T t T t( , ) ( )LT L t T t

The temperature profile of the rod in steady-state Ts(x) can be dervied when ∂T(x,t)/∂t = 0.

Chapter 2 Examples of Dynamic Mathematical Models

The initial conditions for any position of the rod is:0( ,0) ( )T x T x

2

2

( )0sd T x

dx ( )sT x ax b

(0)sT b 0,sT( )sT L aL b

0,saL T ,L sT , 0,L s sT T

aL

Page 17: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/17

Thus, the steady-state temperature at a given position x along the rod is given by:

Chapter 2

Heat Conduction in a Solid Body

, 0,0,( ) L s s

s s

T TT x x T

L

Examples of Dynamic Mathematical Models

Page 18: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/18

A suitable model for a large class of continuous theoretical processes is a set of ordinary differential equations of the form:

11 1 1 1

( ) , ( ), , ( ), ( ), , ( ), ( ), , ( )n m sdx t f t x t x t u t u t r t r tdt

State EquationsChapter 2 General Process Models

22 1 1 1

( ) , ( ), , ( ), ( ), , ( ), ( ), , ( )n m sdx t f t x t x t u t u t r t r tdt

1 1 1( ) , ( ), , ( ), ( ), , ( ), ( ), , ( )n

n n m sdx t f t x t x t u t u t r t r tdt

t : Time variable x1,...,xn : State variablesu1,...,um : Manipulated variablesr1,...,rs : Disturbance, nonmanipulable variablesf1,...,fn : Functions

Page 19: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/19

A model of process measurement can be written as a set of algebraic equations:

1 1 1 1 1( ) , ( ), , ( ), ( ), , ( ), ( ), , ( )n m m mty t g t x t x t u t u t r t r t

Output EquationsChapter 2 General Process Models

2 2 1 1 1( ) , ( ), , ( ), ( ), , ( ), ( ), , ( )n m m mty t g t x t x t u t u t r t r t

1 1 1( ) , ( ), , ( ), ( ), , ( ), ( ), , ( )r r n m m mty t g t x t x t u t u t r t r t

t : Time variable x1,...,xn : State variablesu1,...,um : Manipulated variablesrm1,...,rmt : Disturbance, nonmanipulable variables at outputy1,...,yr : Measurable output variablesg1,...,gr : Functions

Page 20: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/20

State Equations in Vector FormChapter 2 General Process Models

If the vectors of state variables x, manipulated variables u, disturbance variables r, and the functionsf are defined as:

1 1 1 1

, , ,

n m s n

x u r f

x u r f

x u r f

Then the set of state equatios can be written compactly as:

( ) , ( ), ( ), ( )d t t t t tdt

x f x u r

Page 21: Solution of Homework 1: Interacting Tank-in-Series System

President University Erwin Sitompul SMI 2/21

Output Equations in Vector FormChapter 2 General Process Models

If the vectors of output variables y, disturbance variables rm, and vectors of functions g are defined as:

1 1 1

, , m

m

r mt r

y r g

y r g

y r g

Then the set of algebraic output equatios can be written compactly as:

( ) , ( ), ( ), ( )mt t t t ty g x u r