Вы находитесь на странице: 1из 28

Table of Content

Table of Content...................................................................................................................................1
Introduction..........................................................................................................................................1
The model.............................................................................................................................................2
The simulation....................................................................................................................................13
Gains and Time Constants..................................................................................................................18
PID Control simulations..................................................................................................................19
Conclusion..........................................................................................................................................25
!!endi"............................................................................................................................................25
Introduction
The ob#ecti$e of the e"ercise %as to do modelin& and simulation of a s'stem of t%o interactin&
tan(s. T%o tan(s) labeled tan( 1 and tan( 2 in the dia&ram belo% are su!!lied %ith li*uid) %hich is
!um!ed from a holdin& tan(.
Figure 1. +'stem that is modeled.
three %a' $al$e) labeled ,
1
) directs the flo% bet%een both tan(s) %here a $al$e settin& of -)
determines the fraction of li*uid &oin& to the lo%er tan(. .i*uid can flo% from tan( 2) into tan( 1)
and from tan( 1 bac( into the holdin& tan(. The t%o tan(s 1 and 2 are identical in diameter) /.22 m)
and the li*uid $elocit' flo% out of both tan(s is related to the le$el in the tan( b' 0ernoulli1s
e*uation.
i iu
h g 2
213
The s!eed of the !um! can be controlled for $ar'in& the flo% rate and the tan(s are e*ui!!ed %ith
li*uid le$el measurement de$ices.
Gi$en the diameter) 1.25 cm) of the outlet !i!es) the tan(s) and the !um! flo% rate) 94/ l5h) it %as
!ossible to de$elo! a mathematical model for the s'stem and to do simulations for $arious
o!eratin& conditions.
The mathematical model of the s'stem 'ielded t%o nonlinear first order differential e*uations. In
order to a!!l' the mathematical methods of .a!lace transforms) it %as necessar' to lineari6e the
s'stem of e*uations. .ineari6ation %as done around the stead' state o!eratin& conditions usin&
Ta'lor e"!ansion. The transfer functions %ere then deri$ed for the lineari6ed model and the &ains
and time constants determined.
7rom the model e*uations) linear and nonlinear) a 8atlab simulation !ro&ram %as %ritten for
s'stem simulation. +imulations %ere done for the follo%in& conditions9
13 ssumin& the three %a' $al$e directs the entire li*uid to the lo%er tan() i.e. there is no flo%
of li*uid to the u!!er tan() in this case) - e*uals /. Then simulate the follo%in&)
ste! chan&e of :1/;.
Introduce a !ulse b' increasin& the !um! settin& %ith :5/; for 3/ seconds.
sine %a$e is introduced throu&h the !um! settin&) %ith a fre*uenc' of /./1 radian5s and
am!litude of 34 liters5hour.
23 The three %a's $al$e directs all the li*uid to the u!!er tan() - e*uals 1) then simulate for a
!ulse of 5/; increase for 3/ seconds.
33 The three %a' $al$e directs a fraction) - of the li*uid to the lo%er tan( and the simulations
as for ste! and !ulse %as done.
7rom the model e*uations) &ains and time constants %ere determined for the s'stem for a &i$en
$al$e settin&. The &ains %ere calculated from the simulations and com!ared %ith the $alues
obtained from the model. +ince this %as not !ossible for the time constants a *ualitati$e discussion
%as made.
The model
<hen settin& u! the model for the s'stem it is most con$enient to loo( at each of the t%o tan(s
se!aratel'. +tartin& %ith tan( number 2 the follo%in& material balance can be set u!.
P u T
A
dt
dh
A
2 2
2
223
The material balance for tan( number 1 is seen belo%.
( )
P u u T
A
dt
dh
A +
1 2 1
1
233
0' substitution of =
ui
b' the 0ernoulli e*uation the 2 material balances becomes as follo%s.
P T
A h g
dt
dh
A
2 2
2
2 2>3
( )
P T
A h g h g
dt
dh
A +
1 2 1
1
2 2 253
0efore further modification of the e*uations abo$e it is necessar' to loo( at the streams =
1
and =
2
and the stream from the holdin& tan( =
?T
. This is done in the balance belo%.
2 1
+
HT
243
0' the definition of -) this can be re%ritten into the t%o e*uations belo%.
( )
HT
HT




1
2
1
2@3
0' substitution of the $olumetric flo%s into the t%o differential e*uations the nonlinear model for
the s'stem is set u!.
( )
P HT T
A h g
dt
dh
A
2
2
2 1 283
( )
P HT T
A h g h g
dt
dh
A +
1 2
1
2 2 293
This model is read' to be !ro&rammed into 8T.0. <hen a .a!lace transform is to be found it
is necessar' to lineari6e the model abo$e. This is done b' Ta'lor e"!ansion.
HT
HT
HT
d
deq
d
deq
h
h
dh
deq
dh
deq
dh
deq
dh
deq
dt
dh
dt
dh

1
1
1
1
]
1

+
1
1
1
1
]
1

1
1
1
1
]
1

1
1
1
1
]
1

9
8
2
1
2
9
1
9
2
8
1
8
2
1
21/3
<hen the actual s'mbols are used in the matri" e*uation abo$e it becomes as sho%n belo%.
( )
HT
T
T
T
P
T
P
T
P
A
A
h
h
g h
A
A
g
g h
A
A
g
g h
A
A
g
dt
dh
dt
dh

1
1
1
1
]
1

+
1
1
1
1
]
1

1
1
1
1
1
1
1
1
1
]
1

,
_

,
_

,
_

1
1
1
1
]
1

1
2
2
/
2
2

2
2
2
1
2
2 1
2
1
2113
t this !oint it is im!ortant to notice t%o thin&s. 7irst and most im!ortant is that because of the
Ta'lor e"!ansion the e*uations are no% held in de$iation $ariables. +econd and also im!ortant is
that the hei&hts in the 2"2 coefficient matri" are stead' state hei&hts at the !oint of lineari6ation) in
this case at =
?T
A 94/ l5h and a &i$en $alue of -. The de!endenc' of - is sho%n belo% %here the
hei&hts are substituted b' the stead' state hei&hts of e*uations 8 and 9.
( )
( )
( )
HT
T
T
T HT
p
T HT
p
T HT
P
A
A
h
h
A
A g
A
A g
A
A g
dt
dh
dt
dh

1
1
1
1
]
1

+
1
1
1
1
]
1

1
1
1
1
1
]
1

1
1
1
1
]
1

1
1
/
1

2
1
2
2
2
2
1
2123
This matri" e*uation is the linear model used in the im!lementation in 8T.0. 0ecause this is a
linear s'stem it can be .a!lace transformed as sho%n belo%.
HT
V
D
C
H
H
B
B A
H
H
s
1
]
1

+
1
]
1

1
]
1

1
]
1

2
1
2
1
B /

2133
In the follo%in& the &ains and time constants are found. This is done b' normal al&ebra.
HT
HT
V D B H H s
V C B H A H H s
+
+ +
2 2
2 1 1

HT
HT HT
V
B s
D
H
V C V
B s
B D
A H H s

+
+

+
2
1 1

( )
HT
HT
V
B s
D
H
V C
B s
B D
A s H


,
_

+
+


2
1

( )
( )
( )
( )
HT
HT
V
B s
D
H
V
B s
B s C
B s
D B
A s H

,
_

+
+
+
+


2
1

( )
( ) ( )
HT
HT
V
B s
D
H
V
B s A s
B s C D B
H

,
_

+
+ +

2
1

( ) ( )
HT
HT
V
B s
D
H
V
B s A s
C B s C D B
H

,
_

+
+ +

2
1

( )
( ) ( )
HT
HT
V
B s
D
H
V
B s A s
C D B s C
H

,
_

+
+ +

2
1

( )
( )
( )

,
_

,
_

,
_

,
_

,
_

,
_

,
_

,
_

,
_

,
_

1
1
1
1
1
1
1
1
2
1
s
B
B
D
H
V
s
B
s
A
s
C D B
C
B A
C D B
H
HT

( )
( ) ( )
( )
HT
HT
a
V
s
K
H
V
s s
s K
H

+ +
+

1
1 1
1
21
2
2
12 11
1
1

21>3
These e*uations are the .a!lace transforms of the lineari6ed model. The &ains and time constants
are sho%n belo%.
2
1
3 2
3 2
p
HT
A g B A
C D B
K


2153
2
2
2
3 1 2
P
HT
A g B
D
K




2143
2
3 1 2
3 2
P
T
a
A g
A
C D B
C

21@3
2
11
1
P
T HT
A g
A
A

2183
2
12
3 1 2 1
P
T HT
A g
A
B


2193
2
21
3 1 2 1
P
T HT
A g
A
B


22/3
s it is seen all of the &ains and time constants e"ce!t C
1
and D
11
are de!endent on -. This means
that there are borderline cases for the s'stem. The first case is - e*ual to 1 and the other case is -
e*ual to /. 7or - e*ual to / the ori&inal s'stem a!!lies) but it should be noticed that %hen - ta(es
this $alue the time constants in the denominator for tan( 1 %ill be identical. This means that s %ill
be a double root. The same time constant %ill be found for tan( 2. nother difference from / E - F
1 %ill be cancellation of some of the terms in the linear matri" e*uation and therefore cancellation
of one of the constants) D
a
. <hen - is e*ual to 1 the linear matri" e*uation does no lon&er a!!l'
because di$ision b' / %ill interfere %ith the sol$in& of the e*uations. This means that a ne% Ta'lor
e"!ansion %ith - !ut e*ual to 1 is needed. This is done belo% startin& %ith the nonlinear s'stem of
e*uation 1 and 2.
( )
( )
P HT T
P HT T
A h g h g
dt
dh
A
A h g
dt
dh
A
+

1 2
1
2
2
2 2 1
2 1 1


( )
P HT T
P T
A h g h g
dt
dh
A
A h g
dt
dh
A
+

1 2
1
2
2
2 2
2

2213
+ince - is !ut e*ual to 1 all the %ater is directed to tan( number 1. This means that the stead' state
hei&ht in tan( number 2 %ill be / and therefore that the e*uation describin& tan( number 2 %ill
e*ual to /. This is sho%n belo%.
P HT T
A h g
dt
dh
A

1
1
2
/ /

2223
This s'stem can be Ta'lor e"!anded in the same %a' as the !re$ious s'stem %as. The result is
sho%n belo%.
HT
T
T
P
A
h
h
g h
A
A
g
dt
dh
dt
dh

1
1
1
]
1

+
1
1
1
1
]
1

1
1
1
1
1
]
1

,
_

1
1
1
1
]
1

/
1
/ /
/
2
2
2
1
1
2
1
2233
This s'stem is also &i$en in de$iation $ariables because of the Ta'lor e"!ansion. In com!arison to
the !re$ious matri" s'stem there is a ma#or difference. The e"!ression of the stead' state hei&ht is
no% lon&er de!endent on -. This is sho%n belo%.
HT
T
T HT
P
A
h
h
A
A g
dt
dh
dt
dh


1
1
1
]
1

+
1
1
1
]
1

1
1
1
]
1

1
1
1
1
]
1

/
1
/ /
/
2
1
2
2
1
22>3
Ge"t the linear s!ecial case s'stem is .a!lace transformed and a &ain and a time constant are found.
HT
V
E
H
H
A
H
H
s
1
]
1

+
1
]
1

1
]
1

1
]
1

/ / /
/
2
1
2
1
2253
7rom this matri" e*uation a normal al&ebraic e*uation can be set u!.
HT
V E H A H s +
1 1

( )
HT
V E A s H
1

( )
HT
V
A s
E
H

1
HT
V
s
A
A
E
H

,
_

+
,
_

,
_

1
1
1
( )
HT
V
s
K
H
+

1
31
3
1

2243
This is the .a!lace transform for the s!ecial case of - e*ual to 1. The &ain and the time constant are
sho%n belo%.
2
3
P
HT
A g A
E
K


22@3
2
31
1
P
T HT
A g
A
A


2283
If the s'stem for the s!ecial case) - e*ual to 1) and the normal s'stem are com!ared it becomes
a!!arent that there are some similarities bet%een the t%o. .et1s loo( at the .a!lace transform for
tan( number 1 in the normal case. If - is set to / in the e"!ressions for &ain and time constant the
s!ecial case e*uation a!!ears. This is sho%n belo%.
1
2
3
K
A g A
E
K
P
HT


2293
11
2
31
1

P
T HT
A g
A
A
23/3
In the e"!ressions for D
a
and D
12
it is a!!arent that these cancels out %hen - e*uals 1. This feature is
*uite ob$ious since D
12
comes from the substitution of h
2
and therefore %ill be cancelled %hen no
li*uid enters tan( number 2. D
a
is a time constant o%in& to the buffer effect caused b' the ca!acit' of
tan( 2 %hen the !um! flo% is di$ided %hich a&ain means that %hen no li*uid enters tan( number 2
the $alue %ill be /.
The simulation

The linear and nonlinear models of the s'stem ha$e been im!lemented in 8atlab. In the scri!t file
s'stem.m 2!!endi"3) the lineari6ed model differential e*uations and also the $ariables in the
e*uations ha$e been defined. The scri!t file CallHs'stem.m 2!!endi"3 simulates the s'stem for the
&i$en $alue of - and !lots the fi&ures of the res!onses %ith res!ect to time. The nonBlinear scri!t
files) s'stemnonlinear.m 2!!endi"3 and CallHs'stemnonlinear.m 2!!endi"3) ha$e been used to
&enerate the res!onses for the nonlineari6ed model in the same %a'.
i) System A (=)! In the first case the flo% from the !um! enters onl' into the to! tan(I the s'stem
is a t%o tan( s'stem %ith an internal flo% from tan( 2 to tan( 1. The model has been setu! for this
s'stem 28odel3. The models ha$e been im!lemented in 8atlab for three different t'!es of in!uts9
ste!) sine %a$e and a !ulse in!ut.
a3 Ste" in"ut! ste! in!ut is &i$en to the s'stem %ith a 1/; increase in the !um! flo% rate.
+cri!t files s'stem.m 2!!endi"3) CallHs'stem.m 2!!endi"3) s'stemnonlinear.m
2!!endi"3) CallHs'stemnonlinear.m 2!!endi"3 has been used to do the 8atlab
simulations for both the linear and nonlinear models. The res!onses %ith res!ect to time
ha$e been !lotted in the fi&ures belo%.
0 200 400 600 800 1000 1200 1400 1600 1800
0
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
0.045
0.05
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)

0 200 400 600 800 1000 1200 1400 1600 1800
0
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
0.045
0.05
Time (s)
T
a
n
k

l
e
v
e
l

2

(
m
)
Response of the level in tank 1 fo the lineai!ed "odel Response of the level in tank 2 fo the lineai!ed "odel
0 200 400 600 800 1000 1200 1400 1600 1800
0.24
0.25
0.26
0.27
0.28
0.29
0.3
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)

0 200 400 600 800 1000 1200 1400 1600 1800
0.06
0.062
0.064
0.066
0.068
0.07
0.072
0.074
Time (s)
T
a
n
k

l
e
v
e
l

2

(
m
)
Response of the level in tank 1 fo the non#lineai!ed "odel Response of the level in tank 2 fo the non#lineai!ed "odel
Figure #. The &ra!hs sho% the res!onse cur$es for a ste! chan&e in case .
It could be inferred from the res!onse cur$es that tan( 1 %hich is lo%er tan( ta(es lon&er time to
attain a ne% stead' state. The actual hei&hts in the tan(s at both stead' states can be obtained from
the res!onse cur$es for the nonBlineari6ed model. 7rom the nonBlineari6ed model res!onse cur$es it
can be seen that the chan&e in the hei&ht of tan( 1) the lo%er tan() is *uite radical or in other %ords
has &reater am!litude than that of tan( 2) the u!!er tan(. It can also be $isuali6ed from !ractical
sense as there is an inflo% from tan( 2 to tan( 1.
It can also be seen from the cur$es for the nonlinear model that the ne% stead' state is not a !erfect
strai&ht line) there are $er' little $ariations from a strai&ht line. These $ariations can be attributed to
com!utational inaccuracies.
The model describes the s'stem *uiet efficientl'.
b3 Sine$%a&e in"ut! sine %a$e in!ut is &i$en to the s'stem %ith a fre*uenc' of /./1 rad5s and the
am!litude of 34 lit5hr. +cri!t files s'stem.m 2!!endi"3) CallHs'stem.m 2!!endi"3)
s'stemnonlinear.m 2!!endi"3) CallHs'stemnonlinear.m 2!!endi"3 ha$e been used to do the
8atlab simulations for both the linear and nonlinear models. The res!onses %ith res!ect to time
ha$e been !lotted in the fi&ures belo%.
0 200 400 600 800 1000 1200 1400 1600 1800
-0.015
-0.01
-0.005
0
0.005
0.01
0.015
0.02
Time (s)
T
a
n
k

l
e
v
e
l

2

(
m
)
0 200 400 600 800 1000 1200 1400 1600 1800
-0.015
-0.01
-0.005
0
0.005
0.01
0.015
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)
Response of the level in tank 1 fo the lineai!ed "odel Response of the level in tank 2 fo the lineai!ed "odel
0 200 400 600 800 1000 1200 1400 1600 1800
0.225
0.23
0.235
0.24
0.245
0.25
0.255
0.26
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)

0 200 400 600 800 1000 1200 1400 1600 1800
0.054
0.056
0.058
0.06
0.062
0.064
0.066
Time (s)
T
a
n
k

l
e
v
e
l

2

(
m
)
Response of the level in tank 1 fo the non#lineai!ed "odel Response of the level in tank 2 fo the non#lineai!ed "odel
Figure '. The res!onse cur$es for sine %a$e in!ut.
The res!onse cur$es indicate a clear sineB%a$e stead' state out!ut for the sine %a$e in!ut to the
s'stem. It can also be seen from the res!onse cur$es for the nonBlineari6ed model that the chan&e in
the hei&ht of the tan( 1) measured b' the am!litude of out!ut sine %a$e) is *uite radical i.e.) of
&reater am!litude) com!ared to that of the tan( 2) the u!!er tan(. This %as the same trend obser$ed
%ith the ste! in!ut and can also be $isuali6ed !racticall'.

b3 (ulse in"ut! !ulse in!ut is &i$en to the s'stem %ith a 5/; increase in the !um! flo% rate
for 3/ seconds. +cri!t files s'stem.m 2!!endi"3) CallHs'stem.m 2!!endi"3)
s'stemnonlinear.m 2!!endi"3) CallHs'stemnonlinear.m 2!!endi"3 ha$e been used to do
the 8atlab simulations for both the linear and nonlinear models. The res!onses %ith res!ect
to time ha$e been !lotted in the fi&ures belo%.
0 100 200 300 400 500 600
0
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)
0 100 200 300 400 500 600
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
Time (s)
T
a
n
k

l
e
v
e
l

2

(
m
)
Response of the level in tank 1 fo the lineai!ed "odel Response of the level in tank 2 fo the lineai!ed "odel
0 200 400 600 800 1000 1200 1400 1600 1800
0.24
0.245
0.25
0.255
0.26
0.265
0.27
0.275
0.28
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)

0 200 400 600 800 1000 1200 1400 1600 1800
0.24
0.25
0.26
0.27
0.28
0.29
0.3
0.31
0.32
0.33
Time (s)
T
a
n
k

l
e
v
e
l

2

(
m
)
Response of the level in tank 1 fo the non#lineai!ed "odel Response of the level in tank 2 fo the non#lineai!ed "odel
Figure ). The res!onse cur$es for !ulse in!ut.
7or a !ulse in!ut %e can see a clear out!ut !ulse res!onse for both the tan(s. The !ulse in!ut has a
direct and shar! !ulse out!ut res!onse on the le$el in tan( 2. This can be attributed to the fact that
the !um! flo% enters directl' into the tan( and causes a *uic( !ulse res!onse. In contrast to this %e
can see a bit la& !ulse res!onse in tan( 1. This can be attributed to the fact that tan( 2 has a buffer
ca!acit' %ith res!ect to tan( 2.

The res!onse cur$es for the lineari6ed and the nonBlineari6ed models !redict the same time $alues
for the tan(s to attain stead' state. <e can also see that tan( 1 has a lar&e la& !hase before it attains
a stead' state com!ared to tan( 2. This can be attributed to the inflo% from tan( 2 to tan( 1. The
stead' state hei&ht can be obtained from the nonBlineari6ed model res!onse cur$es.
ii) System * (=1)! In this case the flo% from the !um! enters onl' into the bottom tan() the
s'stem is #ust a one tan( s'stem. The model has been setu! for this s'stem 2!!endi"3. In this case
%e ha$e a sin&le differential e*uation %hich defines the s'stem. +cri!t files s'stems!ecaillin.m
2!!endi"3) CallHs'stems!eciallin.m 2!!endi"3) s'stems!ecialnon.m 2!!endi"3)
CallHs'stems!ecailnon.m 2!!endi"3 has been used to do the 8atlab simulations for both the linear
and nonlinear models. The models ha$e been im!lemented for a !ulse in!ut of 5/; increase in the
!um! flo% rate for 3/ seconds. The res!onses %ith res!ect to time ha$e been !lotted in the fi&ures
belo%.
0 200 400 600 800 1000 1200 1400 1600 1800
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)
Response of the level in tank 1 fo the lineai!ed "odel fo a pulse input
0 200 400 600 800 1000 1200 1400 1600 1800
0.24
0.25
0.26
0.27
0.28
0.29
0.3
0.31
0.32
0.33
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)
Response of the level in tank 1 fo the non#lineai!ed "odel fo a pulse input
Figure +. The res!onse cur$es for !ulse in!ut.
s it can be seen from the res!onse cur$es) a !ulse in!ut resulted in !ulse out!ut of the res!onse
before the s'stem &oes bac( to its initial stead' state. The linear model describes the s'stem
efficientl' seen as the res!onse cur$es are identical. The stead' state hei&ht can be obtained from
the nonBlineari6ed model res!onse cur$e %hich is seen to be /.2>m.
iii) System C(=.+)! In this case half of the flo% from the !um! enters into the bottom tan( and
the other half enters the to!) the s'stem is a &enerali6ed t%o tan( s'stem %ith a internal flo% from
tan( 2 to tan( 1. The model has been setu! for this s'stem 2!!endi"3. +cri!t files s'stem.m
2!!endi"3) CallHs'stem.m 2!!endi"3) s'stemnonlinear.m 2!!endi"3) CallHs'stemnonlinear.m
2!!endi"3 ha$e been used to do the 8atlab simulations for both the linear and nonlinear models.
The models ha$e been im!lemented for a !ulse in!ut of 5/; increase in the !um! flo% rate for 3/
seconds and also a ste! chan&e of 1/; 2the latter can be seen in the a!!endi"3. The res!onses %ith
res!ect to time ha$e been !lotted in the fi&ures belo%.
0 100 200 300 400 500 600
0
0.01
0.02
0.03
0.04
0.05
0.06
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)

0 100 200 300 400 500 600
0
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
Time (s)
T
a
n
k

l
e
v
e
l

2

(
m
)
Response of the level in tank 1 fo the lineai!ed "odel Response of the level in tank 2 fo the lineai!ed "odel
0 200 400 600 800 1000 1200 1400 1600 1800
0.24
0.25
0.26
0.27
0.28
0.29
0.3
Time (s)
T
a
n
k

l
e
v
e
l

1

(
m
)

0 200 400 600 800 1000 1200 1400 1600 1800
0.06
0.065
0.07
0.075
0.08
0.085
0.09
0.095
0.1
0.105
Time (s)
T
a
n
k

l
e
v
e
l

2

(
m
)
Response of the level in tank 1 fo the non#lineai!ed "odel Response of the level in tank 2 fo the non#lineai!ed "odel
Figure ,. The res!onse cur$es for !ulse in!ut.
7or this s'stem for a !ulse in!ut %e can see a *uic( !ulse res!onse for tan( 2. <e can see a bit la&
!ulse res!onse in tan( 1. This can also be attributed to the fact that tan( 1 has t%o inflo%s) from the
!um! and also from tan( 2.
s before tan( 2 is reachin& stead' state faster than tan( 1.
-ains and Time Constants
The &ains in each case for $arious - $alues is obtained from the res!onse cur$es and is com!ared to
the ones obtained from the linear model. In order to calculate the &ains) %e ha$e !lotted the
res!onse cur$es for a ste! in!ut. The &ains %ere calculated usin& the formula9
J
2
J
1
J
1
$
$
h h +

The difference in the stead' state hei&hts)
J
1
J
h h %as obtained from the res!onse cur$es for the
ste! in!ut and di$ided b' the increase in flo% rate.
Table 1. In this the different &ains are com!ared.
- A/ Gains 2from simulations3 Gains 2calculated3
Tan( 1 18// 18/@
Tan( 2 18// 18/@
- A/.5
Tan(1 18/ 181
Tan(2 >5/ >51
0ased on the lineari6ed model the time constants can be calculated.
Table #. The different time constants found from the model.
D11 D21 D12 D31
- A / 48 48 48 Got defined
- A 1 48 / / 48
7rom the al&ebraic e"!ressions for the timeBconstants &i$en for the &eneralised linear model
e*uations it can be ar&ued that for - A /) %e can see from the e*uations for transfer functions that
the characteristic e*uation in the denominator for tan(1 becomes second order e*uation %ith e*ual
roots and therefore e*ual D1s. 7or $alues of - bet%een / and 1) it is not !ossible to determine the
s!ecific timeBconstants from the simulations. The res!onse cur$es onl' ma(e it !ossible to calculate
the o$erall s'stem timeBconstants. Therefore the timeBconstants can onl' be calculated from the
model e*uations. It is ho%e$er !ossible to find the D11 and D31 b' the res!onse cur$es %hen - A1.
(I. / Control simulations
further model of the s'stem %ith a PID controller %as !ro$ided %here the le$el in tan( 1 %as
ad#usted b' mani!ulatin& the !um! flo% rate usin& the PID controller. <ith this model) simulations
%ere done for a ste! chan&e in disturbance) as %ell as for random disturbance) %ith different
controller settin&s to determine %hich is best.
Plots of le$els in meters $ersus time in seconds %ere done) and from these !lots) it %as !ossible to
select the best simulation out!ut. These !lots are sho%n in the 2!!endi"3.
0"en 1oo" 2andom and Ste" .isturbances
It %as seen that for a ste! disturbance) a ne% stead' state hei&ht %as reached after some time. 7or
the random disturbance) althou&h the s'stem a!!roached a ne% stead' state $alue) there %ere lar&e
oscillations around this ne% stead' state. The fi&ures are sho%n belo%. Go control action %as
ta(en therefore the offset from the ori&inal stead' state to the ne% stead' state %as rather lar&e.
0 5 10 15 20 25 30
0.24
0.242
0.244
0.246
0.248
0.25
l
e
v
e
l

[
m
]
0 5 10 15 20 25 30
-1
-0.5
0
0.5
1
1.5
minutes
F
l
o
w

r
a
t
e

[
m
3
/
s
]
tank 2
tank 1
Figure 3. K!en .oo! %ith Landom Disturbance.
0 5 10 15 20 25 30
0.24
0.245
0.25
0.255
l
e
v
e
l

[
m
]
0 5 10 15 20 25 30
-1
-0.5
0
0.5
1
1.5
minutes
F
l
o
w

r
a
t
e

[
m
3
/
s
]
tank 2
tank 1
Figure 4. K!en .oo! %ith +te! Disturbances.
(ro"ortional Controller 2andom and Ste" .isturbances
<ith a random disturbance it is seen in fi&ure 9) that the o!timum C
c
settin& for !ro!ortional
control onl' has a $alue of 1MB>. <ith a ste! disturbance) seen in fi&ure 1/) the o!timum C
c
settin&
is 1MB5. The fi&ures &enerated usin& different C
c
$alues are sho%n in the a!!endi" for com!arison.
In feed bac( control) the ob#ecti$e is to reduce the error si&nal to 6ero. <ith !ro!ortional control)
the controller out!ut is !ro!ortional to the error si&nal. d#ustin& the controller &ain can ma(e the
controller out!ut chan&es as sensiti$e to de$iations bet%een set !oint and the control $ariable.
!oint to note) ho%e$er) is that the s'stem ne$er returns to the ori&inal stead' state $alue for either
t'!es of disturbances) but a ne% stead' state $alue is reached. This is (no%n as the stead' state
error or offset and this occurs re&ardless of the $alue of C
c
that is chosen. The s'stem %ith
!ro!ortional control reaches stead' state much faster than for the o!en loo! s'stem.
0 5 10 15 20 25 30
0.235
0.24
0.245
0.25
l
e
v
e
l

[
m
]
0 5 10 15 20 25 30
2.66
2.665
2.67
x 10
-4
minutes
F
l
o
w

r
a
t
e

[
m
3
/
s
]
tank 2
tank 1
Figure 5. Pro!ortional Controller %ith o!timum !ro!ortional $alue for random disturbance.
0 5 10 15 20 25 30
0.24
0.245
0.25
0.255
l
e
v
e
l

[
m
]
0 5 10 15 20 25 30
2.6655
2.666
2.6665
2.667
x 10
-4
minutes
F
l
o
w

r
a
t
e

[
m
3
/
s
]
tank 2
tank 1
Figure 1. Pro!ortional Controller %ith o!timum !ro!ortional $alue for ste! disturbance.
(ro"ortional Integral Controller %ith 2andom and Ste" .isturbances
<ith a ste! disturbance and an initial inte&ral term in the controller of 2/) instead of reachin& bac(
to stead' state) there %as an oscillator' res!onse %here the am!litude increased %ith time. It %as
found that the o!timum controller settin& for the inte&ral term in the ran&e !ro$ided %as 1//. ?ere)
althou&h there %as an initial o$ershoot) the s'stem returned to the ori&inal stead' state $alue much
faster than for an' other inte&ral term $alue) %here the s'stem did a!!roach the ori&inal stead' state
$alue.
The same ar&ument %as true for the random disturbance) but here the o!timum inte&ral control term
%as found to be 43.
+ince the transfer function for the !ro!ortional inte&ral controller is &i$en b' the follo%in&
relationshi!)
P12s35M2s3 A C
c
21 : 15D
1
s3
<hen the time e*uals D
1
) the inte&ral term %ould ha$e contributed the same amount to the controller
out!ut as the !ro!ortional out!utI then the $alue of the time constant for the s'stem %ill determine
the o!timum inte&ral controller settin&.
The fi&ures are sho%n belo% for the o!timum inte&ral term settin&s for random and ste!
disturbance.
0 5 10 15 20 25 30
0.23
0.235
0.24
0.245
l
e
v
e
l

[
m
]
0 5 10 15 20 25 30
2.6
2.62
2.64
2.66
2.68
x 10
-4
minutes
F
l
o
w

r
a
t
e

[
m
3
/
s
]
tank 2
tank 1
Figure 11. Pro!ortional Inte&ral Control %ith o!timal Inte&ral term for random disturbances.
0 5 10 15 20 25 30
0.23
0.235
0.24
0.245
0.25
l
e
v
e
l

[
m
]
0 5 10 15 20 25 30
2.55
2.6
2.65
2.7
x 10
-4
minutes
F
l
o
w

r
a
t
e

[
m
3
/
s
]
tank 2
tank 1
Figure 1#. Pro!ortional Inte&ral Control %ith o!timal Inte&ral term for random disturbances.
(ro"ortional Integral .eri&ati&e Control %ith 2andom and Ste" .isturbances
?ere C
c
and the inte&ral controller terms are fi"ed) %hile the deri$ati$e term is $aried bet%een /
and 1//. 7or the random disturbance) a deri$ati$e $alue of 5/) &a$e the o!timum res!onse to the
disturbance. The o!timum deri$ati$e $alue %as found to be 1// for the ste! disturbance. The
fi&ures are sho%n belo% for the o!timum settin&s for the deri$ati$e term.
0 5 10 15 20 25 30
0.23
0.235
0.24
0.245
l
e
v
e
l

[
m
]
0 5 10 15 20 25 30
2.6
2.65
2.7
x 10
-4
minutes
F
l
o
w

r
a
t
e

[
m
3
/
s
]
tank 2
tank 1
Figure 1'. PID Control %ith o!timal deri$ati$e settin& for random disturbance.
0 5 10 15 20 25 30
0.23
0.235
0.24
0.245
l
e
v
e
l

[
m
]
0 5 10 15 20 25 30
2.55
2.6
2.65
2.7
x 10
-4
minutes
F
l
o
w

r
a
t
e

[
m
3
/
s
]
tank 2
tank 1
Figure 1). PID Control %ith o!timal deri$ati$e settin& for ste! disturbance.
Selecting the best Controller Setting
The ob#ecti$e of feed bac( control is to reduce the error si&nal to 6ero) so if there are disturbances
the s'stem can *uic(l' return to stead' state. 7or !roducts) etc. %here a uniform out!ut is re*uired)
then it is necessar') to return to the ori&inal stead' state $alue or set !oint) after the control action.
If feed bac( control is not used the !rocess ma' ne$er reach a ne% stead' state. Nsin& !ro!ortional
feed bac( control alone) it can be hard to tune the s'stem to res!ond in a satisfactor' %a'. If a lar&e
$alue of C
c
is used the s'stem %ill be conser$ati$e or &i$e a offset) but if a small $alue of C
c
is used
the res!ond %ill be slo%. The addition of inte&ral control reduces the offset but &enerate
oscillations) the s'stem returns to the same stead' state $alue as before the disturbance) and if it
does not) then the difference is *uite small. ddin& the deri$ati$e term ma(es the res!onse e$en
*uic(er and reduces the oscillations of the PIBcontroller. ?o%e$er) the nature of the res!onse
de!ends on the controller settin&s and the !rocess d'namics and to &et o!timum control) $alues of
C
c
) D
I
and D
D
has to be selected so that the') combined) !ro$ides the best res!onse. In &eneral if the
!rocess is nois' a deri$ati$e filter can be a!!lied to the model.
7rom the o!timum $alues of controller settin&s) based on the simulation results) it seems that the
PID controller is better in handlin& the random disturbance) %hich is t'!ical in most o!eratin&
chemical !lants. The o$ershoot seems much smaller and further oscillations around stead' state
a!!eared much smaller than for the PI control. <ith a ste! disturbance) there %as a smaller
o$ershoot for PID control) but the inte&ral controller returned to stead' state much faster.
?o%e$er) based on the fact that a real o!eratin& s'stem %ill be sub#ected to both ste! and random
disturbances) the PID controller seemed more robust. Generall') the deri$ati$e control action
!ro$ided b' the deri$ati$e term tends to im!ro$e the d'namic res!onse of the controlled $ariable b'
decreasin& the time it ta(es for the !rocess to reach stead' state. s a result) a t'!ical controller
%ill combine all three controller actions) PID controller) %here all three controller elements o!erate
in !arallel.
Conclusion
The Ta'lor a!!ro"imation of the nonlinear differential e*uations turned out to be a &ood
a!!ro"imation. This is seen b' com!arison of the &ra!hs obtained for the different simulations of
the lineari6ed and nonlineari6ed models.
0' the model setu! it is a!!arent that mathematical modelin& of s'stems !ro$ides a &ood startin&
!oint for tunin& controllers.
8T.0 has !ro$en to be a efficient !ro&rammin& !latform for s'stem simulation. This is also
$alid for controller tunin& as %as !ro$en in the last *uestion.
In an industrial situation the $al$e %ould ha$e been the actuator instead of the !um!. It %ould ha$e
been easier to control the $al$e b' ad#ustin& the $alue of - rather than the !um!.
A""endi6
There are > different $ersions of the tan( s'stem that are used in the 8T.0 simulations on the
CDBLK8. These e*uations and there names in 8T.0 are sho%n belo%.
+'stem9
( )
( )
( )
HT
T
T
T HT
p
T HT
p
T HT
P
A
A
h
h
A
A g
A
A g
A
A g
dt
dh
dt
dh

1
1
1
1
]
1

+
1
1
1
1
]
1

1
1
1
1
1
]
1

1
1
1
1
]
1

1
1
/
1
2
1
2
2
2
2
1
+'stems!eciallin9
HT
T
T HT
P
A
h
h
A
A g
dt
dh
dt
dh


1
1
1
]
1

+
1
1
1
]
1

1
1
1
]
1

1
1
1
1
]
1

/
1
/ /
/
2
1
2
2
1
+'stemnonlinear9
( )
P HT T
A h g
dt
dh
A
2
2
2 1
( )
P HT T
A h g h g
dt
dh
A +
1 2
1
2 2
+'stems!ecialnon9
P HT T
A h g
dt
dh
A
1
1
2
In the 8T.0 files on the CDBLK8 different terms are added to the different s'stem names
indicatin& s!ecial simulation situations i.e. +'stem+te! means that a ste! chan&e to the s'stem
model has been simulated.
In findin& around in the CDBLK8 the schema on the ne"t !a&e can be used. The to! folder contains
> sub folders %hich a&ain contain some sub folders. The name on the first sub folders corres!ond to
the different scenarios that %ere to be simulated in *uestion 2.> and 2.5.
7or further e"amination of the different scri!t used in this !a!er the CDBLK8 and the &uidelines
&i$en abo$e must be used.

Вам также может понравиться