• Non ci sono risultati.

System Dynamics

N/A
N/A
Protected

Academic year: 2021

Condividi "System Dynamics"

Copied!
20
0
0

Testo completo

(1)

System Dynamics

Prof. Davide Manca – Politecnico di Milano

Dynamics and Control of Chemical Processes

Solution to Lab #2

SE2

(2)

E1 – Dynamics of a tank

Given the tank in the picture:

F

i

F

o

A

h

1. Evaluate the dynamics of the level of the tank considering a step increase on the inlet flowrate, so that it results half of its initial value.

2. Evaluate the level dynamics considering a linear decrease of the inlet flowrate in 30 seconds (ramp variation) up to the half of the initial value.

Remark : the tank is at steady state before the disturbances occur.

(3)

Model of the system

i

dh h

A F

dt   r

F

i

F

o

A

h

2

3

2

30 m

7.5 m s 0.4 s m

i

A F r

  0

 s

hh

Data: I.C.:

(4)

Solution procedure question (1)

1. Assessment of the steady state solution:

2. Assignment of the step disturbance on the inlet flowrate:

3. Evaluation of the system dynamics by integrating the differential equation of the model. The steady state represents the initial conditions.

0

i

 s i

3 m

dh h

A F h r F

dt    r    

    3

2 3.75 m s

new old

i i

FF

(5)

MATLAB implementation

h0 = r * Fi0;

Fi = Fi0/2;

[t,h] = ode45(@(t,y)Sisdif(t,y,A,Fi,r),tSpan,h0,options);

function dy = Sisdif(t,y,A,Fi,r)

dy(1) = (Fi – h/r)/A

Main

Sisdif

(6)

Dynamics in case of a step disturbance

0 20 40 60 80 100

1 1.5 2 2.5 3 3.5

Tempo [s]

A lte zza li q u id o [ m ]

Liquid level [m]

Time [s]

(7)

0 20 40 60 80 100 3

4 5 6 7 8

Tempo [s]

Portata [m3 /s]

Resolution procedure question (2)

• Evaluation of system dynamics by integration of the model differential equation.

The inlet flowrate varies with time:

   0

0

2

30

i

i i

FFF t

 0

i i

2

FF

If t  30 s

Else

Time [s]

Flowrate [m3 /s]

(8)

MATLAB implementation

h0 = r * Fi0;

[t,h] = ode45(@(t,y)Sisdif(t,y,A,Fi0,r),tSpan,h0,options);

function dy = Sisdif(t,y,A,Fi0,r) h = y(1);

if(t < 30)

Fi = Fi0 - (Fi0/2)/30 * t;

else

Fi = Fi0/2;

end

dy(1) = (Fi – h/r)/A

Main

Sisdif

(9)

Dynamics in case of a ramp disturbance

0 20 40 60 80 100

1 1.5 2 2.5 3 3.5

Tempo [s]

A lte zza li q u id o [ m ]

Time [s]

Liquid level [m]

(10)

E2a – Dynamics of two non interacting tanks

Given the two tanks in the picture:

F

i

r

1

A

2

h

2

A

1

h

1

r

2

Evaluate the dynamics of the level of the two tanks in case of a step disturbance on the inlet flowrate, such that halves the initial flowrate.

Remark: the tanks are in steady state before the disturbance occurs

(11)

System model

Fi

r1

A2

h2

A1

h1

r2

1 1

1

1

2 1 2

2

1 2

i

dh h

A F

dt r

dh h h A dt r r

  

 

  



Data: I.C.:

2 2

2 2

50 m 0.7 s m A

r

Tank 2:

2 1

2 1

30 m 1.2 s m A

r

Tank 1:

9.4 m s

3

F 

i

Steady state conditions

(12)

Resolution procedure

1. Assessment of the steady state conditions:

2. Assignment of the step disturbance on the inlet flowrate:

3. Evaluation of the system dynamics by integrating the differential equation of the model. The steady state represents the initial conditions.

 

 

1 1

1

1 1

1

2 1 2 2 2

2

1 2

0 11.28 m

6.58 m 0

i s

i s

i

dh h

A F

h r F

dt r

dh h h h r F

A dt r r

   

   

  

 

 

     



    3

2 4.7 m s

new old

i i

FF

(13)

MATLAB implementation

h0 = [r1*Fi0 r2*Fi0];

Fi = Fi0/2;

[t,h] = ...

ode45(@(t,y)Sisdif(t,y,A1,A2,r1,r2,Fi),tSpan,h0,options);

function dy = Sisdif(t,y,A1,A2,r1,r2,Fi) dy = zeros(2,1);

h1 = y(1);

h2 = y(2);

dy(1) = (Fi – h1/r1)/A1;

dy(2) = (h1/r1-h2/r2)/A2;

Main

Sisdif

(14)

Dynamics of two non interacting tanks

0 100 200 300 400 500

2 4 6 8 10 12

Tempo [s]

A lte zza li q u id o [ m ]

Serbatoi non interagenti

Serbatoio 1 Serbatoio 2

Time [s]

Non interacting tanks

Tank 1 Tank 2

Liquid level [m]

(15)

E2b - Dynamics of two interacting tanks

Given the two tanks in the picture:

F

i

r

1

A

2

h

2

A

1

h

1

r

2

Evaluate the dynamics of the level of the two tanks in case of a step disturbance on the inlet flowrate, such that it halves the initial flowrate.

Remark: the tanks are in steady state before the disturbance occurs

(16)

System model

1 1 2

1

1

2 1 2 2

2

1 2

i

dh h h

A F

dt r

dh h h h

A dt r r

   

  

  



Data:

2 2

2 2

50 m 0.7 s m A

r

Tank 2:

2 1

2 1

30 m 1.2 s m A

r

Tank 1:

9.4 m s

3

F 

i

Fi

r1

A2

h2

A1

h1 r2

I.C.: Steady state conditions

(17)

Resolution procedure

1. Determination of steady state conditions:

2. Assignment of the step disturbance on the inlet flowrate:

3. Evaluation of the system dynamics by integration of the differential equation of the model. The steady state represents the initial conditions.

 

 

 

1 1 2

1

1 1 2

1

2 1 2 2 2 2

2

1 2

0 17.86 m

6.58 m 0

i s

i s

i

dh h h

A F

h r r F

dt r

dh h h h h r F

A dt r r

    

    

  

    

    



    3

2 4.7 m s

new old

i i

FF

(18)

MATLAB implementation

h0 = [(r1+r2)*Fi0 r2*Fi0];

Fi = Fi0/2;

[t,h] =

ode45(@(t,y)Sisdif(t,y,A1,A2,r1,r2,Fi),tSpan,h0,options);

function dy = Sisdif(t,y,A1,A2,r1,r2,Fi) dy = zeros(2,1);

h1 = y(1);

h2 = y(2);

dy(1) = (Fi – (h1-h2)/r1)/A1;

dy(2) = ((h1-h2)/r1-h2/r2)/A2;

Main

Sisdif

(19)

Dynamics of interacting tanks

0 100 200 300 400 500

0 5 10 15 20

Tempo [s]

A lte zza li q u id o [ m ]

Serbatoi interagenti

Serbatoio 1 Serbatoio 2

Time [s]

Liquid level [m]

Interacting tanks

Tank 1 Tank 2

(20)

Comparison

0 100 200 300 400 500

0 5 10 15 20

Tempo [s]

Altezza liquido [m]

Tank 1, case: non interacting tanks Tank 1, case: interacting tanks Tank 2, case: non interacting tanks Tank 2, case: interacting tanks

Time [s]

Liquid level [m]

Riferimenti

Documenti correlati

The reaction mechanism to be studied, commonly called the Brusselator, is an example of an autocatalytic, oscillating chemical reaction.. An autocatlytic reaction is one in which

An unbalanced stocking rate referred to the lowland is common showing an average value of 5.7 livestock units (LU) ha –1 , but reaching a maximum of 26.8 LU ha –1. Lowland

Feniello (CNR), Fabio Minazzi (Università dell’Insubria, Varese), Silvia Giorcelli (Università di Torino), Cecilia Novelli (Università di Cagliari), Guido Panico (Università

A Makalondi et Madarounfa, zones avec des prédisposition pour l’élevage des abeilles, les tentatives de la coopération internationale d’améliorer les conditions

Administraciones públicas ,000 2 ,000 58 ,179 ,837 Note: The F tests should be used only for descriptive purposes because the clusters have been chosen to maximize

La percezione della croce, all’interno, è enfatizzata diversifi cando la copertura delle varie parti: i bracci sono coperti da volte a bot- te mentre la campata centrale culmina

Journal of Semiotics, 21–22 Censorship a cura di edited by Massimo Leone Contributi di Ugo Volli Sémir Badir Francesca Polacci Jean-Paul Aubert Julián Tonelli Eva Kimminich Tristan

There is also a transition for the best fitting dust extinction/attenuation: younger clusters (&lt;6 Myr) prefer the differential LMC extinction, while older clusters prefer