You are on page 1of 30

UDESC

Engenharia de Petroleo
Sistemas de Controle e Automao

Lista de Exerccios

Aluno(a): Rogrio Tadeu Santana Junior


Professor: Alexandre Campos

Balnerio Cambori
2016

Exercise 1 - Part 1
It is known that a first order system have an exponential response to a step input. The main feature
of this kind of system is the time constant and this constant hace unit of time. The higher is the time
constant, the slower the system responds. Graphically, is the time that the output of system has 63.2%
of the steady state value, in 3 the output is in 95.0% of steady state value and 5 99.3% of steady state
value and at this point we consider the system already in steady state.
The two plants given are:
G1 (s) =

2
4s + 2

(1)

and

6
4s + 2
The steady state can be found using the final value theorem
G2 (s) =

limt g 0 (t) = lims0 sG0 (s)

(2)

(3)

Where G represents the plant and the step input. For G1 the steady state value is 1 and for G2 is 3.
Fig. 1 shows a drawing of this response in time. Analytically, the time constants are the found writing

Figure 1: Drawing of outputs of G1 and G2 to an unit step input


the plant transfer function in this way:
K
(4)
s + 1
Thus, 1 = 2 = 2. K is the gain of the system, that is, the intensity with how the system responds
with and given input. K1 = 1 and K2 = 3. The settling time can be found using the time response of the
first order system response to a step:
Gi (s) =

y(t) = KM (1 exp(t/ ))

(5)



0.9
y
ln 1
= t/
KM

(6)

ln(0.1) = t/

(7)

t 2.3025

(8)

Thus, y(t) = 0.9 y:

Since KM = y:
Finally,

For G1 and G2 , t9 0 = 4.605s.


Using datatip:

Figure 2: Outputs of G1 and G2 to an unit step input and points identified by datatip
The steady state error is 0.7%.
For a ramp input, the system does not actually reaches a steady state, it continues to grow until the
input ceases. But it growth rate has a little transitory period and after this period, it becomes steady.
After it, the input and output, when output is normalized, have the same behavior with a little delay
between then. This delay have approximately the absolute value of the time constant of the system. Fig.
3 shows this features.
As can be seen, the delay between G1 and the step input is d = 8.98560 7.00469 = 1.98091 2 = ,
this is already normalized because gain is 1. For G2 ,yn orm = 21.0657/3 = 7.0219 7.00469 and the
delay is d = 8.99959 7.00469 = 1.9949 2 = .

Exercise 1 - Part 2
p
The higher point in this curve is when = 1 2 2 , in words it means that the oscillatory input
frequency is equal to the natural frequency of the plant. The main features of this system are the delay
Ao utput
and the ARn = KA
i nput
2
= tan 1
(9)
1 ( )2
1
ARn = p
[1 ( )2 ]2 + (2 )2
These features depend on the frequency of input. When 1,
value which is 1 2
2

(10)

and ARn has the maximum

12

For this case, a simulation was ran with = 0.5, = 0.1, = 2 and it is shown in Fig. 4
with datatip it is possible to identify some interesting points. Graphically:
=

17.3 16.5

2 = 1.621471
23.5 20.4
2

(11)

Figure 3: Outputs of G1 and G2 to an unit ramp input and points identified by datatip

Figure 4: Input and Output of a second order system with an oscillatory input

and
ARn =

5
2 0.1 1 2 0.12

(12)

and this value is close to that found in the plot that is 4.9. When the system gets steady, this difference
will be insignificant.

Exercise 1 - Part 3
A second order transfer function in the standard form is:
G(s) =

K
2 s2 + 2 s + 1

where = 1/n
If the system is underbalanced, the time to first peak is:
p
tp = / 1 2

(13)

(14)

The overshoot is
p
OS = exp(/ 1 2 )

(15)

DR = OS 2

(16)

The decay ratio:


The period
P =p

2
1 2

(17)

The three plants given must be written in this form either. The first plant:
60
1
= 1 2 1
(18)
s2 + 10s + 60
+
s
60
6s + 1
p

Thus, 1 = 1/60s, 1 = 60/12 and n = 60rad/s.


Analytically tp = 0.5310s, OS = 0.0703, DR0.004942 and P = 1.0620rad/s. Graphically, by Fig. 5.
And t9 5 = 0.6522s
G1 (s) =

Figure 5: G1 output
it yields tp = 0.5320s, OS = (1.0698 1)/(1) = 0.0698, DR = 0.00033/0.06976 = 0.0047278 and
P = 2 (1.0645 0.5320)s = 1.065 or P = 1.6033 0.5320 = 1.0713s .
The second plant:

G2 (s) =

25
=
s2 + 10s + 25

1 2
25 s

1
+ 10
25 s + 1

(19)

Thus, 2 = 1/5, 2 = 1 n = 5rad/s. System is critically dumped, the former definitions(tp ,OS,DR
and P ) are only valid for underdumped systems.
Graphically, by Fig. 6,

Figure 6: G2 output
it yields t95 = 0.9506s

The third plant:


15
1
(20)
= 1 2 10
s2 + 10s + 15
s
+
15
15 s + 1

Thus, 2 = 0.2582, 2 = 1.2910 n = 15rad/s. System is overdumped, the former definitions(tp ,OS,DR
and P ) are only valid for underdumped systems.
Graphically, by Fig. 7,
G3 (s) =

Figure 7: G3 output
it yields t95 = 1.7764s

Exercise 1 - Part 4
These figures are the second order system response to a step. Modeling the transfer function:
G(s) =

K
2 s2 + 2 s + 1

(21)

with = 1, K = 1 and the size of the step is M = 1.


G(s) =

1
s2 + 2s + 1

(22)

With this transfer function some simulations were ran into XCOS varying according to the given figures.
The results are shown in Figs. 8 and 9

Figure 8: Underdumped responses

Figure 9: Critically dumped and overdumped responses

Exercise 1 - Part 5
If the system is underbalanced, the response behaves like this: Figure 11 shows the main features of

Figure 10: Underdumped second order system response

10

this system. Analytically, if the system is underbalanced, the time to first peak is:

Figure 11: Features of underdumped second order system

tp = /

p
1 2

(23)

The overshoot is
p
OS = exp(/ 1 2 )

(24)

DR = OS 2

(25)

The decay ratio:


The period
P =p

2
1 2

(26)

Now it is possible to find and . From figure 12,OS = 0.37, tp = 1.5s and P = 5 1.5 = 3.5s.

Figure 12: Given curves


With OS equation:
p
ln(OS) = / 1 2

= sqrt

(27)

ln(OS)2
= 0.4095
ln(OS)2 2

(28)

p
1 2 / =

(29)

and using the tp equation:


tp

p
1.5 1 0.30252 / = = 0.4356
Using these values Fig. 13 can be obtained

(30)

11

Figure 13: Second order system response

Exercises 2 and 3
The plant has the following transfer function:
G(s) =

K(a s + 1)
(1 s + 1)(2 s + 1)

(31)

is a overdamped second order system with a single zero.


A unit step input was applied to this plant with 1 = 4 and 2 = 1, a assumed 5 different values.
The system was modeled into XCOS as shown in Fig. 14
The system output is shown in Fig. 15. It is remarkable that the zeros, initially, lead the system in
"another direction", but when time is big enough the respose goes to de steady state value. The initial
behavior of the time response depends on the sign and intensity of a . Positive values that are higher than
the larger time constant(1 = 4)lead the system to an overshoot and the higher the intensity(absolute
value) of a , the higher is the overshoot. Values between 0 and 4 lead the system to a first order behavior,
specially when a = 4 because the zero and the pole cancel each other. Negative values lead the system to
an initial inverse response. This situations(overshoot and inverse response) arises from competing dynamic
effects that operates in different time scales. Inverse responses and overshoots are expected when physical
processes occur in a plant in two different ways and different time scales.
It is possible to identify this initial behavior using the initial value theorem.
lim sF (s) = lim f (t)

s+

t0

(32)

But what describes the "direction" of any curve at a given point is its derivate, so, it is natural to
think that applying the initial value theorem in the time derivative will be necessary. Starting with:
f (t) =

dy
dt



 dy
L f (t) = F (s) = L
= sY (s) y(0) = sY (s)
dt

(33)
(34)

12

Figure 14: Example 6.2 scheme in XCOS for different values of a

Figure 15: Example 6.2 outputs in time domain for different values of a
where Y (s) represents the output of G(s) with and unit step input. The initial value theorem gives:
lim sF (s) = lim s2 G(s)) = lim s2

s+

s+

s+

K(a s + 1)
1
K(a + 1/s)
= lim
(1 s + 1)(2 s + 1) s s+ (1 + 1/s)(2 + 1/s)

13

and Finally:
Ka
1 2

lim sF (s) =

s+

The result shows that the initial "direction" of the output depends on the sign of a , since K, 1 and 2
are positives.

Exercise 4 - 8.1 Seborg


The PI output is function is:
P 0 (s) =

1
M Kc
M Kc
M Kc
1+
)=
+
s
i s
s
i s2

(35)

Using inverse laplace transform:


M Kc
t
i

(36)

M Kc
t + ys p
i

(37)

p0 (t) = M Kc +
p(t) = M Kc +
When t = 0s, p(0) = 10mA, M = 3mA, so
10mA = 3mAKc 1 +


1
0s + 12mA
i

2mA
= Kc
3mA

(38)
(39)

When t = 20s, p(20) = 9mA, so


9mA = 3mA


2mA
1
1 + 20s + 12mA
3mA
i

20s
 = i = 20s/(0.5) = 40s
1

3mA
2mA

(40)
(41)

The system is reverse acting because Kc is negative.

Exercise 4 - 8.2 Seborg


a)The PD transfer function is:
P 0 (s)
1 + d s 
K1
= Kc
=
+ K2
E(s)
d s + 1
1 s + 1
Kc

1 + d s  K1 + K2 + K2 1 s
=
d s + 1
1 s + 1

(42)
(43)

Kc

2
1 + K1 +K
1 s
1 + d s 
2
= (K1 + K2 )
d s + 1
1 s + 1

For analogy d = 1 , K1 + K2 = Kc ,
With a litte manipulation:

K2
K1 +K2 1

K1 =

(44)

= d
1
Kc

(45)

and

1
Kc Kc

For Kc = 3, d = 2 and = 0.1, K1 = 27, K2 = 30 and 1 = 0.2


K2 =

30
1 + 3027
0.2s
1 + 2s 
= (30 27)
0.2s + 1
0.2s + 1

1=1

(46)

(47)
(48)

14

Exercise 4 - 8.3 Seborg


PID transfer function:

P 0 (s)
1
I s + 1  d s + 1 
= Kc1 1 +
+ d1 s = Kc
E(s)
I1 s
I s
d s + 1
But = 0
Kc1

I s + 1  d s + 1 
I1 s + 1 + I1 d1 s2 
= Kc
I1 s
I s
1

(49)

(50)

For analogy,Kc1 = Kc (1 + D /I ), I1 = (1 + D /I ) I1 = (1+DD/I ) b)Kc Kc1 , I I1 and


D1 D c) If Kc = 4, I = 10min and D = 2min, Kc1 = 4.8, I1 = 12min and D1 = 1.7min, d) The
higher is, the slower the system is.

Exercise 4 - 8.4 Seborg


a)(I)In a system air-to-open a positive signal will open the valve, KV ispositive, increasing the signal
will increase the flowrate
(II)In a system air-to-close a positive signal will open the valve, KV isnegative, increasing the signal
will decrecrease the flow
b)(I) If the flow rate is greater than the SP it is needed to close the valve, decreasing the controller
output. Reverse acting c) Kv is positive.
b)(II) If the flow rate is greater than the SP it is needed to close the valve, increasing the controller
output. Direct acting c) Kv is negative.

Exercise 4 - 8.6 Seborg


PI control has the form:

M Kc
t
i

(51)

2Kc
zero
i

(52)

p0 (t) = M Kc +
When t = 0
0 6 = 2Kc +

Kc = 3

(53)

2 3
= 1.2min 1
i

(54)

2 3
= 1.2min 1
i

(55)

i = 5min

(56)

Exercise 4 - 8.13 Seborg


If h2 is increased, the valve must close, the controller is air-to-close, the signal is increases to, the
controller is direct acting.

Exercise 5
a)The example 6.1 consists in a lead-lag element with and step input:
Y (s) =

KM (a + 1)
s(1 s + 1)

(57)

It was simulated in XCOS, the Fig. 16 shows the scheme and the Fig. 17 shows the output in time domain.
The example 6.2 was already metioned in exercise 2, the scheme and outputs are shown in Figs. 14
and 15, respectively.

15

Figure 16: Example 6.1 scheme in XCOS for different values of a

Figure 17: Example 6.1 output in time domain for different values of a
b) The pade approximation is a way to represent the system delay es . The 1/1 approximation is
given by:
1 2 s
es
(58)
1 + 2 s

16

and pade 2/2 approximation:


es
es

1 2 s
1 + 2 s

1 2 s +
1 + 2 s +

2
12 s
2
12 s

(59)

(60)

Using a delay of 3 seconds simulations were ran in XCOS, simulation scheme is shown in Fig. 18, and
the output in Fig. 19.

Figure 18: XCOS simulations scheme

Figure 19: Different outputs depending on the plant delay treatment


As can be seen, the higher is the number of terms in approximation the higher is the accuracy. This
terms are represented by another transfer function connected in series to the former. The inverse behavior
saw in exercises 2 and 3 is also present in here. It is because with this aproximation comes up an zero in
transfer function with taua < 0.

17

Exercise 6
Using the Routh-Hurwitz criteria the expanded form of characteristic equation is:
s3 + 6s2 + 11s + 6 + 4Kc = 0
Routh-Hurwitz: Thus,

66(64Kc )
6

> 0, 60 > 4Kc , 15 > Kc .


0
1
6
66(64Kc )
6

6
11
6+4Kc

6+4Kc
0
0
0

Using Scilab root location, Fig 20

Figure 20: Scilab Routh-Hurwitz answer


c
Thus, 604K
> 0, 60 > 4Kc , 15 > Kc .
6
Using the roots locations in scilab are shown in Fig. 21 yields the same result.

(61)

18

Figure 21: Roots Locations

Exercise 7
In example 2.7, three different kinds of controllers were used in order to elucidate the main features
of these controllers. The system is the same used before.
Starting with the proportional controller does not have a good action, depending on the need of
accuracy on set point, a offset remains "forever" in the steady state.

19

Figure 22: Response of system with P controller


PI controller has the advantage of no offset. While a difference between the set point and the measured
variable exists, it will act. It guaranties no offset, but makes the system a little slower. The PID controller

Figure 23: Response of system with PI controller

20

anticipates the action, it controller try to "foretell" the "direction" of the error, making the system a little
faster than the PI. Is the most used controller.

Figure 24: Response of system with PID controller

21

Exercise 8
a)The schematic diagram of the tuning is showed in Fig. 21 25

Figure 25: Ziegler Nichols, first Method


When Kc = 8 the system response is shown in Fig.

Figure 26: Ziegler Nichols, first Method


Using the table showed in Fig. 27 to obtain the constants

Figure 27: Ziegler-Nichols table

22

The constants are Kp = 4.8 i = 1.825 d = 0.45625. With these constants a simulation was ran with
an step input. It is shown in Fig. 28

Figure 28: Ziegler Nichols, first Method

23

For the second method, the Fig. 29 shows the schematic diagram of the tuning. Derivatives were used
in order to identify the inflection point easily. The Figs. 30 and 31 show the points used in analysis. The
Fig. 32 shows the system with PID controller and the calculated constants based on the table shown in
Fig. 33

Figure 29: Ziegler Nichols, Second Method

Figure 30: Ziegler Nichols, Second Method

Figure 31: Ziegler Nichols, Second Method

24

Figure 32: Ziegler Nichols, Second Method

Figure 33: Ziegler Nichols, Second Method, Table


Finally the Fig.34 shows a comparsion betweem the two methods.

Figure 34: Ziegler Nichols, comparison between First and Second Methods

25

b) CHR method uses the same analysis, but the table is a little different. The results and scheme are
shown in the figure

Figure 35: Ziegler Nichols, first Method

Figure 36: CHR Method

Exercise 9
a) Using mass conservation in a tank:
dm
= win wout
dt
dAh
= (qi n qo ut)
dt
(1)incompressible fluid, (2) proportional valve qR = h;(3) Constant area

(62)
(63)

h
dh
= qin
dt
R

(64)

dh
h
= qin
dt
R

(65)

dh h
hh
= qin qin
dt
R

(66)

dh0
h0
0
= qin

dt
R

(67)

In steady state

Using these two equations together yields


A
Deviation variables:
A

26

Laplace Transform:

dh0
h0
0
} = L{qin
} L{ }
dt
R
H0
A[H 0 s h(0)] = Qin
R

L{A

(68)
(69)

1
] = Qin
R
H0
R
=
Qin
RAs+]

H 0 [As +

and Q0out = H 0 /R, thus,

(70)
(71)

1
Q0out
=
= Gtank
Qin
RAs + 1

(72)

If two tanks are connected in series:


G = Gtank1 Gtank2 =


1
1
1
=
R 1 A1 s + 1 R 2 A2 s + 1
(R1 A1 s + 1)(R2 A2 s + 1)

(73)

b) If the tank 1 takes 7 hours to gets filled, the flow rate is q = R12 h/t = (10m)2 8m/(3600 7s) =
0.0997m3 /s and in steady state, the output flow rate of tank 2 is equal to q The delay will be modeled
with Pade 2/2. The Fig. 37 shows the schematic diagram of the system. The using Ziegler-Nichols method,

Figure 37: Schematic diagram of the system


the gain that makes the system oscilate with constant amplitude is Ku = 1.051, the output is showed in
38
With the tagged points it is possible to calculate the period of oscillation Pu = 4.350s. These two
parameters (Ku and Pu ) are used to tune the P, PI and PID controllers using the table showed in Fig.
39 The contants are: P: Kp = 0.5255, PI: Kp = 0.4730 , i = 3.625 PID: Kp = 0.6306 , T i = 2.175,
T d = 0.5438 And the response of each of these controllers to an distubance input is showed in Fig. 40. The
simulation was started and a disturbance affected the system at 80 seconds. The P controller cannot put
the system back to the former output, a constant offset of 20% was noticed. The PI and PID systems
guarantied the system in set point steady state after the perturbation, but the settling time of PID was
smaller than PI as showed in Fig. 40, t10,P I = 87.9s 80s = 7.9s and t10,P ID = 85.4s 80s = 5.4s

Exercise 10
The loop transfer function is
Gt =
Thus, 2 =

1
5+Kc

Kc
s2 +6s+5
Kc
+ s2 +6s+5

and =

3
5+Kc

Kc
Kc
=
1
s2 + 6s + 5 + Kc
(5 + Kc )( 5+K
s2 +
c

6
5+Kc s

Using the OS equation, making explicit

+ 1)

(74)

27

Figure 38: Ziegler-Nichols method output

Figure 39: Tuning table

s
=

ln(OS)2
3
=
ln(OS)2 2
5 + Kc

(75)

Thus, for OS = 0.0432, Kc = 12.9982. Now it is needed to check out if this Kc does not make system
unstable. Fig 41 shows that a K 13 is makes the system stable.
The other features:
= 3/(12.9982 + 5)0 .5 = 0.7071
(76)
= 1/(12.9982 + 5) = 0.05556
p
tp = / 1 2 = 0.1750s

(77)
(78)

28

Figure 40: Tuning table


The overshoot is
The decay ratio:
DR = OS 2 = 0.0432 = 0.001866

(79)

The period
P =p

2
1 2

= 0.3500s

(80)

29

Figure 41: Roots Locations

You might also like