Академический Документы
Профессиональный Документы
Культура Документы
17.1
Using Eq. 17-9, the filtered values of xD are shown in Table S17.1
xD(t) = 5 (1 − e-t/10)
17-1
4.5
3.5
2.5
XD
1.5
1
noisy data
alpha = 0.5
0.5 alpha = 0.8
analytical solution
0
0 2 4 6 8 10 12 14 16 18 20
time (min)
Fig S17.1. Graphical comparison for noisy data, filtered data and analytical
solution.
17.2
yF (k ) = αym (k ) + (1 − α) yF (k − 1) (1)
yF (k − 1) = αym (k − 1) + (1 − α) yF (k − 2) (2)
yF (k ) = αym (k ) + (1 − α)αym (k − 1) + (1 − α ) 2 yF (k − 2)
17-2
17.3
Table S17.3 lists the unfiltered output and, from Eq. 17-9, the filtered data
for sampling periods of 1.0 and 0.1. Notice that for sampling period of 0.1,
the unfiltered and filtered outputs were obtained at 0.1 time increments,
but they are reported only at intervals of 1.0 to preserve conciseness and
facilitate comparison.
The results show that for each value of ∆t, the data become smoother as α
decreases, but at the expense of lagging behind the mean output y(t)=t.
Moreover, lower sampling period improves filtering by giving smoother
data and less lagg for the same value of α.
∆t=1 ∆t=0.1
t α=1 α=0.8 α=0.5 α=0.2 α=0.8 α=0.5 α=0.2
0 0 0 0 0 0 0 0
1 1.421 1.137 0.710 0.284 1.381 1.261 0.877
2 1.622 1.525 1.166 0.552 1.636 1.678 1.647
3 3.206 2.870 2.186 1.083 3.227 3.200 2.779
4 3.856 3.659 3.021 1.637 3.916 3.973 3.684
5 4.934 4.679 3.977 2.297 4.836 4.716 4.503
6 5.504 5.339 4.741 2.938 5.574 5.688 5.544
7 6.523 6.286 5.632 3.655 6.571 6.664 6.523
8 8.460 8.025 7.046 4.616 8.297 8.044 7.637
9 8.685 8.553 7.866 5.430 8.688 8.717 8.533
10 9.747 9.508 8.806 6.293 9.741 9.749 9.544
11 11.499 11.101 10.153 7.334 11.328 11.078 10.658
12 11.754 11.624 10.954 8.218 11.770 11.778 11.556
13 12.699 12.484 11.826 9.115 12.747 12.773 12.555
14 14.470 14.073 13.148 10.186 14.284 14.051 13.649
15 14.535 14.442 13.841 11.055 14.662 14.742 14.547
16 15.500 15.289 14.671 11.944 15.642 15.773 15.544
17 16.987 16.647 15.829 12.953 16.980 16.910 16.605
18 17.798 17.568 16.813 13.922 17.816 17.808 17.567
19 19.140 18.825 17.977 14.965 19.036 18.912 18.600
20 19.575 19.425 18.776 15.887 19.655 19.726 19.540
Table S17.3. Unfiltered and filtered output for sampling periods of 1.0 and 0.1
17-3
Graphical comparison:
20
18
16
14
12
y(t)
10
4 α =1
α = 0.8
2 α = 0.5
α = 0.2
0
0 2 4 6 8 10 12 14 16 18 20
time, t
20
18
16
14
12
y(t)
10
4 α=1
α=0.8
2 α=0.5
α=0.2
0
0 2 4 6 8 10 12 14 16 18 20
time, t
17-4
17.4
Using Eq. 17-9 for α = 0.2 and α = 0.5, Eq. 17-18 for N* = 4, and Eq. 17-
19 for ∆y=0.5, the results are tabulated and plotted below.
2.5
1.5
y(t)
0.5 α=1
α=0.2
α=0.5
N*=4
∆ y=0.5
0
0 1 2 3 4 5 6 7 8
time, t
Figure S17.4. Graphical comparison for filtered data and the raw data.
17-5
17.5
C ( s) Gd 1
= , d ( s) =
d ( s ) 1 + K c GvG p GmGF s +1
2
For τF = 0, GF = 1 and
1 /(5s + 1) 1 1
C ( s) = =
1 + 1 /(5s + 1) s + 1 (5s + 2)( s 2 + 1)
2
1/(5s + 1) 1 3s + 1
C ( s) = =
1 + [1/(5s + 1)][1/(3s + 1) ] s + 1 (15s + 8s + 2)( s 2 + 1)
2 2
By using Simulink-MATLAB,
0.3
No filtering
Exponetial filtering
0.2
0.1
0
y(t)
-0.1
-0.2
-0.3
-0.4
0 2 4 6 8 10 12 14 16 18 20
time. t
17-6
17.6
1 1 1
Y (s) = X (s) = , then y(t) = 1 − e-t
s +1 s +1 s
For noise level of ± 0.05 units, several different values of α are tried in
Eq. 17-9 as shown in Fig. S17.6a. While the filtered output for α = 0.7 is
still quite noisy, that for α = 0.3 is too sluggish. Thus α = 0.4 seems to
offer a good compromise between noise reduction and lag addition.
Therefore, the designed first-order filter for noise level ± 0.05 units is α =
0.4, which corresponds to τF = 1.5 according to Eq. 17-8a.
0.8
y(t)
0.6
0.4
0.2
0
0 2 4 6 8 10 12 14 16 18 20
t
1.2
0.8
y(t)
0.6
α=1
0.4 α=0.3
α=0.2
α=0.15
0.2
0
0 5 10 15 20
t
17-7
Noise level = ± 0.01
1.4
1.2
y(t) 0.8
0.6 α=1
0.4
0.2
0
0 5 10 15 20
t
17.7
17-8
Plotting this results
1.2
0.8
y
0.6
0.4
0.2
0
0 2 4 6 8 10 12 14 16 18 20
k
17.8
10
8
Tm'(t)
0
0 5 10 15 20 25 30 35 40 45 50
time
17-9
17.9
a)
Y ( z) 2.7 z −1 ( z + 3) 2.7 + 8.1z −1
= =
U ( z ) z 2 − 0.5 z + 0.06 z 2 − 0.5 z + 0.06
Y ( z) 2.7 z −2 + 8.1z −3
=
U ( z ) 1 − 0.5 z −1 + 0.06 z −2
17-10
b)
20
18
16
14
12
y
10
2 Difference equation
Simulink
0
0 2 4 6 8 10 12 14 16 18 20
k ∆t
c) The steady state value of y can be found be setting z =1. In doing so,
y =19.29
17.10
1
Gc ( s ) = 2 1 +
8s
1 2.25 − 2 z −1
Gc ( z ) = 2 1 + −1
=
8(1 − z ) (1 − z −1 )
17-11
70
60
50
40
b(k)
30
20
10
0
0 5 10 15 20 25 30
k
17.11
Y ( z) 5( z + 0.6)
a) = 2
U ( z ) z − z + 0.41
Y ( z) 5 z −1 + 3z −2
=
U ( z ) 1 − z −1 + 0.41z −2
17-12
k u(k) u(k-1) u(k-2) y(k)
1 1 1 0 5
2 1 1 1 13.00
3 1 1 1 18.95
4 1 1 1 21.62
5 1 1 1 21.85
6 1 1 1 20.99
7 1 1 1 20.03
8 1 1 1 19.42
9 1 1 1 19.21
10 1 1 1 19.25
11 1 1 1 19.37
12 1 1 1 19.48
13 1 1 1 19.54
14 1 1 1 19.55
15 1 1 1 19.54
16 1 1 1 19.52
17 1 1 1 19.51
18 1 1 1 19.51
19 1 1 1 19.51
25
Difference equation
Simulink
20
15
10
0
0 2 4 6 8 10 12 14 16 18 20
k∆t
d) The steady state value of y can be found be setting z =1. In doing so,
y =19.51
17-13
17.12
1
a)
1 − z −1
7
4
Output
0
0 1 2 3 4 5
Time
1
b)
1 + 0.7 z −1
0.8
0.6
Output
0.4
0.2
0
0 1 2 3 4 5
Time
1
c)
1 − 0.7 z −1
3
2.5
2
Output
1.5
0.5
0
0 1 2 3 4 5
Time
17-14
1
d)
(1 + 0.7 z )(1 − 0.3 z −1 )
−1
0.8
0.6
Output
0.4
0.2
0
0 1 2 3 4 5
Time
1 − 0.5 z −1
e)
(1 + 0.7 z −1 )(1 − 0.3z −1 )
0.8
0.6
Output
0.4
0.2
0
0 1 2 3 4 5
Time
1 − 0.2 z −1
f)
(1 + 0.6 z −1 )(1 − 0.3 z −1 )
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5
17-15
Conclusions:
17.13
1.6
1.4
1.2
1
Output
0.8
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40
Time
The ultimate controller gain for this process is found by trial and error
17-16
8
Output
4
0
0 5 10 15 20 25 30 35 40
Time
17.14
∆t = 0.01
1.8
1.6
1.4
1.2
Output
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6
Time
17-17
∆t = 0.1
1.8
1.6
1.4
Output 1.2
0.8
0.6
0.4
0.2
0 5 10 15
Time
∆t = 0.5
2
1.8
1.6
1.4
1.2
Output
0.8
0.6
0.4
0.2
0
0 5 10 15
Time
Hence
∆t = 0.01 Kcu = 1202
∆t = 0.1 Kcu = 122.5
∆t = 0.5 Kcu = 26.7
17-18
17.15
By using Simulink-MATLAB
Kc = 1
1.4
1.2
0.8
Output
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
time
Kc = 10
1.8
1.6
1.4
1.2
1
Output
0.8
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
time
17-19
Kc = 17
2.5
Output 1.5
0.5
-0.5
0 5 10 15 20 25 30 35 40 45 50
time
Kcm = 17
17.16
4
Gm(s) =
0 .5 s + 1
In order to obtain Gp(s), write the mass balance for the tank as
dh
A = q1 + q 2 − q3
dt
Therefore,
17-20
H ′( s ) −1 −1
G p ( s) = = =
Q3′ ( s ) As 12.6 s
By using Simulink-MATLAB,
Kc = -10
1.4
1.2
0.8
y(t)
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
time
Kc = -50
1.8
1.6
1.4
1.2
1
y(t)
0.8
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
time
17-21
Kc = -92
3.5
2.5
1.5
y(t)
0.5
-0.5
-1
-1.5
0 5 10 15 20 25 30 35 40 45 50
time
17.17
Y (s) Gc G ( s ) 1 (Y / Ysp )
= then Gc ( z ) =
Ysp ( s ) 1 + Gc G ( s ) G 1 − (Y / Ysp )
We want the closed-loop system exhibits a first order plus dead time
response,
e − hs (1 − A) z − N −1
(Y / Ysp ) = or (Y / Ysp ) = where A = e-∆t/λ
λs + 1 1 − Az −1
Moreover,
17-22
e −2 s 0.284 z −3
G (s) = or G( z) =
3s + 1 1 − 0.716 z −1
Thus, the resulting digital controller is the Dahlin's controller Eq. 17-66.
(1 − A) 1 − 0.716 z −1
Gc ( z ) = (1)
1 − Az −1 − (1 − A) z − N −1 0.284
0.632 1 − 0.716 z −1
Gc ( z ) = (2)
1 − 0.368 z −1 − 0.632 z −3 0.284
c) From Eq. 2, the denominator of Gc(z) contains a non-zero z-0 term. Hence
the controller is physically realizable.
d) First adjust the process time delay for the zero-order hold by adding ∆t/2
to obtain a time delay of 2 + 0.5 = 2.5 min. Then obtain the continuos PID
controller tuning based on the ITAE (setpoint) tuning relation in Table
12.3 with K = 1, τ=3, θ = 2.5. Thus
Using the position form of the PID control law (Eq. 8-26 or 17-55)
1
Gc ( z ) = 1.13 1 + 0.225 −1
+ 0.78(1 − z −1 )
1− z
17-23
1.4
1.2
0.8
y(t)
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
Time
Fig S17.17. Closed-loop response for a unit step change in set point.
17.18
a)
Gm(s) = 2.5e-s
17-24
1 − e−s
H(s)=
s
To obtain Gp(s) and Gd(s), write the solute balance for the tank as
dc3
V = q1c1 + q2 (t )c2 (t ) − q3c3 (t )
dt
dc3′
V = q 2 c 2′ + c 2 q 2′ − q3 c3′
dt
30 sC 3′ ( s ) = 1.5Q2′ ( s ) + 0.1C 2′ ( s ) − 3C 3′ ( s )
Therefore,
C 3′ ( s ) 1.5 0.5
G p ( s) = = =
Q2′ ( s ) 30 s + 3 10s + 1
C3 ( z) 0.05
b) G p ( z) = =
Q2 ( z ) 1 − 0.9 z −1
1
(Y / Ysp ) =
λs + 1
17-25
17.19
Y HG p ( z ) K m Gc ( z )
=
Ysp 1 + HG p Gm ( z )Gc ( z )
Y
Ysp
Gc ( z ) = (1)
Y
HG p ( z ) K m − HG p Gm ( z )
Ysp
Y (1 − A) z −1
=
Ysp d 1 − Az −1
Moreover
z −1
HG p ( z ) =
1 − z −1
z −2
HG p Gm ( z ) =
1 − z −1
Km = 1
(1 − A) z −1
Gc ( z ) = −1 1 − Az −1
z z −2 (1 − A) z −1
−
1 − z −1 1 − z −1 1 − Az −1
Rearranging,
(1 − A) − (1 − A) z −1
Gc ( z ) =
1 − Az −1 − (1 − A) z − 2
17-26
λ=3 A = 0.716
λ=1 A = 0.368
λ = 0.5 A = 0.135
4.5
3.5
3
y(t)
2.5
1.5
1
λ=3
0.5 λ=1
λ=0.5
0
0 5 10 15 20 25 30 35 40 45 50
Time
17.20
Y HG ( z ) K v Gc ( z )
=
Ysp 1 + HG ( z ) K v K m ( z )Gc ( z )
Hence
Y
1 Ysp
Gc ( z ) =
HG ( z ) K − K K Y
v v m
Ysp
17-27
2 .5 0.453 z −1
G( s) = or HG ( z ) = (θ = 0 so N = 0)
10 s + 1 1 − 0.819 z −1
Y
Minimal prototype controller implies λ = 0 (i.e., A → 0) . Then, = z −1
Ysp
1 − 0.819 z −1 z −1
Gc ( z ) =
0.453z −1 0.2 − (0.2)(0.25) z −1
Simplifying,
z −1 − 0.819 z −2 1 − 0.819 z −1
Gc ( z ) = =
0.091z −1 − 0.023z −2 0.091 − 0.023 z −1
17.21
(1 + a1 z −1 + a 2 z −2 )(1 − A)
GVE =
(b1 + b2 )(1 − Az −1 ) − (1 − A)(b1 + b2 z −1 ) z − N −1
a1 = -1.625
a2 = 0.659
b1 = 0.0182
b2 = 0.0158
Therefore
17-28
By using Simulink-MATLAB, the controlled variable y(k) and the
controller output p(k) are shown for a unit step change in ysp.
0.9
0.8
0.7
0.6
y(k)
0.5
0.4
0.3
0.2
0.1
0
0 5 10 15 20 25
k
Figure S17.21a. Controlled variable y(k) for a unit step change in ysp.
4.5
3.5
p(k)
2.5
1.5
0.5
0 5 10 15 20 25
k
Figure S17.21b. Controlled output p(k) for a unit step change in ysp.
17-29
17.22
Dahlin's controller
From Eq. 17-66 with a1 = e-1/10=0.9, N=1, and A=e-1/1 = 0.37, the Dahlin
controller is
(1 − 0.37) 1 − 0.9 z −1
G DC ( z ) =
1 − 0.37 z −1 − (1 − 0.37) z −2 2(1 − 0.9)
3.15 − 2.84 z −1 3.15 − 2.84 z −1
= =
1 − 0.37 z −1 − 0.63z −2 (1 − z −1 )(1 + 0.63z −1 )
2.5
2
p(t)
1.5
0.5
0
0 5 10 15 20 25 30 35 40 45 50
time
1.4
1.2
0.8
Output
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
time
17-30
Thus, there is no ringing (this is expected for a first-order system) and no
adjustment for ringing is required.
For this controller, adjust the process time delay for the zero-order hold by
adding ∆t/2, and K=2, τ=10, θ=1.5 obtain the continuous PID controller
tunings from Table 12.3 as
Using the position form of the PID control law (Eq. 8-26 or 17-55)
1 1
Gc ( z ) = 2.42 1 + −1
+ 0.529(1 − z −1 )
12.92 1 − z
By using Simulink,
3.5
2.5
2
p(t)
1.5
0.5
-0.5
-1
0 5 10 15 20 25 30 35 40 45 50
time
17-31
1.4
1.2
0.8
Output
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
Time
17.23
From Eq. 17-66 with a1 = e-1/5=0.819, N=5, and A=e-1/1 = 0.37, the Dahlin
controller is
(1 − 0.37) 1 − 0.819 z −1
G DC ( z ) =
1 − 0.37 z −1 − (1 − 0.37) z −6 1.25(1 − 0.819)
2.78 − 2.28 z −1
=
(1 − 0.37 z −1 − 0.63 z −6 )
17-32
3
2.5
p(k)
1.5
0.5
0 5 10 15 20 25
k
17.24
Dahlin controller
0.1548 z −1 + 0.0939 z −2
G( z) =
1 − 0.9744 z −1 + 0.2231z −2
17-33
Y ( z) 0.632 z −1
=
Ysp ( z ) 1 − 0.368 z −1
3
p(k)
-1
0 5 10 15 20 25
k
Vogel-Edgar controller
Y ( z ) (0.393 z −1 + 0.239 z −2 )
=
Ysp ( z ) 1 − 0.368 z −1
17-34
2.6
2.4
2.2
1.8
p(k)
1.6
1.4
1.2
0.8
0 5 10 15 20 25
k
17.25
dh1 1
A1 = q1 − q2 − (h1 − h2 )
dt R
dh 1
A2 2 = (h1 − h2 )
dt R
1 1
A1sH1′( s ) = Q1′( s ) − Q2′ ( s ) − H1′( s ) + H 2′ ( s ) (1)
R R
1 1
A2 sH 2′ ( s ) = H1′( s ) − H 2′ ( s ) (2)
R R
17-35
From (2)
1
H 2′ ( s ) = H1′( s )
A2 Rs + 1
Using Eq. 17-64, with N =0, A=e-∆t/λ and HG(z) = KtKvHGp(z), Dahlin's
controller is
1 (1 − A) z −1
GDC ( z ) =
HG (1 − z −1 )
Using z-transforms,
−0.202 z −1 + 0.192 z −2
HG(z)=KtKvHGp(z)=
(1 − z −1 )(1 − 0.9 z −1 )
Then,
(1 − z −1 )(1 − 0.9 z −1 ) (1 − A) z −1
GDC ( z ) = ⋅
(−0.202 z −1 + 0.192 z −2 ) (1 − z −1 )
(1 − A)(1 − 0.9 z −1 )
=
−0.202 + 0.192 z −1
(1 − A)(1 − 0.9 z −1 )
b) GDC =
−0.202 + 0.192 z −1
By using Simulink-MATLAB,
17-36
0
-0.2
-0.4
-0.6
-0.8
p(k) -1
-1.2
-1.4
-1.6
-1.8
-2
0 5 10 15 20 25 30 35 40 45 50
time
17.26
K (τ1s + 1) P ( s )
G f ( s) = =
τ2 s + 1 E ( s)
τ1 (1 − z −1 ) / ∆t + 1 τ1 (1 − z −1 ) + ∆t (τ1 + ∆t ) − τ1 z −1
G f ( z) = K = K = K
τ2 (1 − z −1 ) / ∆t + 1 τ2 (1 − z −1 ) + ∆t (τ2 + ∆t ) − τ2 z −1
17-37
Then,
b1 + b2 z −1 P ( z )
G f ( z) = =
1 + a1 z −1 E ( z )
K (τ1 + ∆t ) − K τ1 −τ2
where b1 = , b2 = and a1 =
τ2 + ∆t τ2 + ∆t τ2 + ∆t
Therefore,
(1 + a1 z −1 ) P ( z ) = (b1 + b2 z −1 ) E ( z )
0.9
0.8
Output
0.7
0.6
0.5
Continuos response
Discrete response
0.4
0 5 10 15 20 25 30 35 40 45 50
Time
17-38
17.27
(−0.131 − 0.124 z −1 ) z −5
G( z) = ≡ G( z)
(1 − 0.716 z −1 )(1 − 0.819 z −1 )
~
Since the zero is at z =-0.95, it should be included in G+ ( z ) . Therefore
~ (−0.131 − 0.124 z −1 ) z −5
G+ ( z ) = = 0.514 z −5 + 0.486 z −6
(−0.131 − 0.124)
~ (−0.131 − 0.124)
G− ( z ) =
(1 − 0.716 z −1 )(1 − 0.819 z −1 )
0.7
0.6
0.5
0.4
Output
0.3
0.2
0.1
0
0 5 10 15 20 25 30 35 40 45
Time
Fig. S17.27. IMC close-loop response for a unit step change in load at t=10.
17-39