0% found this document useful (0 votes)
14 views

000 DigitalControlsSystemsV2022-pp101-124

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

000 DigitalControlsSystemsV2022-pp101-124

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Digital Control Systems Page 101

7. More Solved Exercises

Exercise 1: Controller Design.


 t

e(τ )dτ 
1
Given an analog controller u = 5 ⋅  e + ∫
 15ms 0 

obtain the corresponding difference equation in the following form

uk = c1 ⋅ uk −1 + c2 ⋅ uk − 2 + ⋅ ⋅ ⋅ + d 0 ⋅ ek + d1 ⋅ ek −1 + ⋅ ⋅ ⋅

The sampling time is T = 3 ms. Use the left-point integration rule.

 
⋅ 3ms ⋅ (e0 + e1 + ⋅ ⋅ ⋅ + ek −1 )
1
u k = 5 ⋅ ek + (a)
 15ms 
uk = 5ek + e0 + e1 + ⋅ ⋅ ⋅ + ek −1 (b)
(b) – (c):
uk − uk −1 = ek −1 + 5 ek − 5 ek −1
uk = e0 + e1 + ⋅ ⋅ ⋅ + ek −1 + 5ek (b)
uk = uk −1 + 5 ek − 4 ek −1
uk −1 = e0 + e1 + ⋅ ⋅ ⋅ + ek −2 + 5ek −1 (c)
Digital Control Systems Page 102

7. More Solved Exercises

Exercise 1 (cont.): Controller Design.


Sketch the step-response of the analog controller and the digital controller in following diagram.

 t

u (t ) = 5  e(t ) + ( )
1
∫ e τ dτ 

 15ms 0 

u (t ) = 5 +
1
t For t = 0 => u(0) = 5
3ms
For t = 15 ms => u(15ms) = 10

uk = uk −1 + 5 ek − 4 ek −1 T = 3 ms
k 0 1 2 3 4 5 6 7 8 9 10
ek 1 1 1 1 1 1 1 1 1 1 1
For k=0, uk-1=0, ek-1=0, ek=1; uk = 0+5-0 = 5 ek-1 0 1 1 1 1 1 1 1 1 1 1
uk 5 6 7 8 9 10 11 12 13
For k=1, uk-1=5, ek-1=1, ek=1; uk = 5+5-4 = 6
uk-1 0 5 6
For k=2, uk-1=6, ek-1=1, ek=1; uk = 6+5-4 = 7
T (ms) = 0;3;6;9;12;15;18;21;24;...
Digital Control Systems Page 103

7. More Solved Exercises

Exercise 2: Controller Design.


 t

 15ms ∫ e(τ )dτ 
1
Given an analog controller u = 5 ⋅  e + 
 0 

obtain the corresponding difference equation in the following form


u k = c1 ⋅ u k −1 + c2 ⋅ u k −2 + ⋅ ⋅ ⋅ + d 0 ⋅ ek + d1 ⋅ ek −1 + ⋅ ⋅ ⋅
The sampling time is T = 3 ms. Use the mid-point integration rule.

 e + e 
⋅ 3ms ⋅  0 k + (e1 + e1 + ⋅ ⋅ ⋅ + ek −1 )  (a)
1
u k = 5 ⋅ ek +
 15ms  2 
e0 + ek (b) – (c):
uk = 5ek + + e1 + ⋅ ⋅ ⋅ + ek −1 (b)
2 ek − ek −1
uk − uk −1 = + ek −1 + 5ek − 5ek −1
e0 + ek 2
uk = + e1 + ⋅ ⋅ ⋅ + ek −1 + 5ek (b)
2
e0 + ek −1 uk = uk −1 + 5.5 ek − 4.5ek −1
uk −1 = + e1 + ⋅ ⋅ ⋅ + ek − 2 + 5ek −1 (c)
2
Digital Control Systems Page 104

7. More Solved Exercises

Exercise 2 (cont.): Controller Design.


Sketch the step-response of the analog controller and the digital controller in following diagram.

 t

u (t ) = 5  e(t ) + ( )
1
∫ e τ dτ 

 15ms 0 

u (t ) = 5 +
1
t
3ms

uk = uk −1 + 5.5 ek − 4.5ek −1
Digital Control Systems Page 105

7. More Solved Exercises

Exercise 3: z-Transform
Calculate the z-Transform for the time series: 1,0,2,0,4,0,8,0,16,0,32,…
∞ ∞
X (z ) = ∑ xk z −k
= ∑ xk z −k = 1 ⋅ z 0 + 0 ⋅ z −1 + 2 ⋅ z −2 + 0 ⋅ z −3 + 4 ⋅ z −4 + 0 ⋅ z −5 + ⋅ ⋅ ⋅
k = −∞ k =0

X ( z ) = 1 + 2 ⋅ z −2 + 4 ⋅ z −4 + 8 ⋅ z −6 + 16 ⋅ z −8 + ⋅ ⋅ ⋅ = a ⋅
1
(a)
1− q

X (z ) = 1 ⋅
−2 1
a = 1; q = 2 z (b)
1 − 2 z −2

z2
X (z ) = 2 (b)
z −2
Digital Control Systems Page 106

7. More Solved Exercises

Exercise 4: z-Transform

Calculate the z-Transform for the time series: 1,-2,1,-2,1,-2,1,-2,1,-2,…

X ( z ) = 1 ⋅ z 0 − 2 ⋅ z −1 + 1 ⋅ z −2 − 2 ⋅ z −3 + 1 ⋅ z −4 − 2 ⋅ z −5 + ⋅ ⋅ ⋅⋅ =

1 z2 1 − 2z
1⋅ −2
= 2 − 2 z −1 ⋅ =
1− z z −1 1 − z −2 z 2 − 1 a
1
1− q

z2 − 2z z 2 − 2 z z (z − 2)
+ 2 = 2
z −1 z −1
2
z −1
2
z −1
Digital Control Systems Page 107

7. More Solved Exercises

Exercise 5: Inverse z-Transform

z
What is the inverse z-Transform of ? (first 10 values required)
z −1
3

( )
z ÷ z 3 − 1 = f 0 ⋅ z 0 + f1 ⋅ z −1 + f 2 ⋅ z −2 + ⋅ ⋅ ⋅ z-Transform definition.

(⋅ z )
−2

(
− z − z −2 ) f0 = f1 = 0; f2 = 1
z −2

(
− z −2 − z −5 )
(⋅ z )
−5
fk = {0,0,1,0,0,1,0,0,1,...}

z −5 f3 = f4 = 0; f5= 1

(
− z −5 − z −8 ) (⋅ z )
−8
Next slide shows the use of another
f6 = f7 = 0; f8 = 1
z −8 method to solve this problem.
Digital Control Systems Page 108

7. More Solved Exercises

Exercise 5: Inverse z-Transform

z
What is the inverse z-Transform of ? (first 10 values required)
z −1
3

z z −2 −2 1 1 −1 −2
= −3
= z ⋅ −3
= a = f ⋅ z 0
+ f ⋅ z + f ⋅ z + ⋅⋅⋅
z −1 1− z 1− z 1− q
3 0 1 2

= z −2 + z −5 + z −8 + z −11 + z −14 + z −17 + ⋅ ⋅ ⋅


1
a a = z-2 ; q = z-3
1− q f0 = f1 = 0; f2 = 1

f3 = f4 = 0; f5= 1
f6 = f7 = 0; f8 = 1

fk = {0,0,1,0,0,1,0,0,1,...}
Digital Control Systems Page 109

7. More Solved Exercises

Exercise 6: Inverse z-Transform

z +1
What is the inverse z-Transform of ? (first 10 values required)
z −1
2

We will solve this problem using three different methods.

Method I

z +1 z +1 1 z −1 −1 1 1
= = = = z ⋅ = a ⋅
z 2 − 1 ( z + 1) ⋅ ( z − 1) z − 1 1 − z −1
a = z-1 ; q = z-1
1 − z −1 1− q

= z −1 + z −2 + z −3 + z −4 + z −5 + z −6 + ⋅ ⋅ ⋅

f0 = 0
f1 = f2 = f3 = f4 = f5 = ... = 1
fk = {0,1,1,1,1,1,1,1,1,...}
Prof. Dr.-Ing. F. Keller Digital Control Systems Page 110

7. More Solved Exercises

Exercise 6: Inverse z-Transform

Method II z +1
z2 −1
z +1 z +1 1 1 −1 z
= = = = z ⋅
z 2 − 1 ( z + 1) ⋅ ( z − 1) z − 1 z − 1 z −1

Recall the delay property.


z-Transform for the unit step sequence.

fk = {0,1,1,1,1,1,1,1,1,...}
Digital Control Systems Page 111

7. More Solved Exercises

Exercise 6: Inverse z-Transform

Method III

z +1
z2 −1

(
− z − z −1 ) (⋅ z )
−1

1 + z −1

(
− 1 − z −2 ) (⋅ z )
−2 fk = {0,1,1,1,1,1,1,1,1,...}
z −1 + z −2

(
− z −1 − z −3 ) (⋅ z )
−3
z − 2 + z −3
Digital Control Systems Page 112

7. More Solved Exercises

Exercise 7: Design of Dead Beat Controller


Find the dead beat control algorithm for a plant with transfer function G p (s ) =
1
,
Ti ⋅ s
where Ti=100 ms. Sampling period, T, must be 50 ms.

Reaches final value in 1 T Inverse Laplace


transform
G p (s ) =
1 1 1 1
Plant’s step function response: ⋅ h(t ) = ⋅t
Ti ⋅ s s Ti ⋅ s Ti
DCgain = ∞
1 1
lim h(t ) = lim s ⋅ H ( s ) = lim s ⋅ ⋅ =∞
t →∞ s →0 s →0 s Ti ⋅ s
OR
G p (s ) =
1
s = jω (with ω = 0)
Ti ⋅ s
Digital Control Systems Page 113

7. More Solved Exercises

1
h(t ) = ⋅t c(T ) = u00 ⋅ h(T ) + u11 ⋅ h(T − T ) u00 = 2
Ti
1 0.5 0
h ( 0) = 0
u00 + u11 = 0 u11 = −2
1
h(T ) = ⋅ T = 0.5
Ti ek = {1,0,0,0,0,0,...} uk = {2,0,0,0,0,0,...}
?
u (t ) = u00 ⋅ σ (t ) + u11 ⋅ σ (t − T )
Z {u k }
c(t ) = u00 ⋅ h(t ) + u11 ⋅ h(t − T ) Z {ek }
=2 uk = 2 ⋅ ek
Digital Control Systems Page 114

7. More Solved Exercises

Exercise 8: Given is a linear and time-discrete system. The response to the input
sequence 1,0,1,0,1,0,1,0,1,0,…. is the output sequence 2,0,1,0,2,0,1,0,2,0,1,…
What is the output sequence when the input sequence is 1,0,0,0,0,…(first 10
values required)?

2 + z −2
Y (z ) (1 − z −2 )(1 + z −2 ) 2 + z −2
G(z ) = G (z ) = =
X (z ) 1 1 + z −2
1 − z −2
1 1 1 1 1
X ( z) = 1 + + + + ⋅ ⋅ ⋅ = 1 =
z2 z4 z6 1− z2 1− z2
yk = 2δ k + δ k −2 + 2δ k −4 + δ k −6 + 2δ k −8 + δ k −10 + ⋅ ⋅ ⋅
Z {δ k } = 1;
2 + z −2 2 z 2 + 1
Z {g k −n } = z − n Z {g k }; Y ( z ) = 1.G ( z ) = = 2
1 + z −2 z +1
Y ( z ) = 2 + z −2 + 2 z −4 + z −6 + 2 z −8 + z −10 + ⋅ ⋅ ⋅
2 + z −2 2 + z −2 Now calculate the inverse z transform,
Y (z ) = 2
1 −2 1
+z = =
1 − z −4 1 − z −4 1 − z −4 ( )(
1 − z −2 ⋅ 1 + z −2 ) using polynomial division, to find yk:
Digital Control Systems Page 115

7. More Solved Exercises

(2 z 2 + 1) ÷ ( z 2 + 1) = 2 − z −2 + z −4 − z −6 + z −8 − z −10 +

− (2 z 2 + 2)
−1
yk={2,0,-1,0,1,0,-1,0,1,0,-1,...}
− (−1 − z −2 )
z −2
− ( z −2 + z −4 )
− z −4
− (− z −4 − z −6 )
z −6
− ( z −6 + z −8 )

− z −8
− (− z −8 − z −10 )
z −10
Digital Control Systems Page 116

7. More Solved Exercises


1
Exercise 9: Consider a control loop, where the transfer function of the process is G process = .
1 + T1 ⋅ s
A digital P-controller is used (amplification factor K).

a) Make a rough drawing of the closed loop control system. Is the control loop steady state accurate?
(with explanation)

1
1 + T1 ⋅ s

The control loop is not steady state accurate, i.e. the steady state error, ess, is not zero, for a step input
[r(t)=step function => R(s)=1/s]. This can be demonstrated by using the final value theorem:

lim c(t ) = lim s ⋅ R ( s ) ⋅ Gclosed −loop (s ) For example, using K=4:


t →∞ s →0

Gc (s ) ⋅ G p (s )
Gclosed −loop (s ) =
K 4
= lim c(t ) = = 0.2
1 + Gc (s ) ⋅ G p (s ) 1 + T1 ⋅ s + K t →∞ 1+ 4
1 K K 1 − 0.2
lim c(t ) = lim s ⋅ ⋅ = ≠1 ess = ⋅100% = 80%
t →∞ s →0 s 1 + T1 ⋅ s + K 1 + K 1
r (t ) − c(t )
ess = ⋅100%
r (t )
Digital Control Systems Page 117

7. More Solved Exercises

Yet one could conclude that the control-loop is not steady state accurate [e(t)=0), by noticing that the
plant’s dc gain is 1. Therefore, in order for the output, c(t)=K.e(t), to be 1, in the steady state, the plant’s
input, K.e(t), ought to be 1, and this clearly could not be achieved when the error is zero. A P-controller
will always need a non-zero error to control such type of process.

b) Obtain the maximum value Tmax for the sampling period, so that the control loop is still stable. The
solution should be given as a formula which relates Tmax to T1 and K.

Tmax = f(K,T1) = ?

1
Gc ( z ) ⋅ G p ( z ) 1 + T1 ⋅ s
Gclosed −loop ( z ) =
1 + Gc ( z ) ⋅ G p ( z )
− kT
−t
Gc ( z ) = K 1− e T1 1− e T1

G p ( z) = ? (Page 46)
−T
0 −T − 2T −3T
 z  1− e
T1
G p ( z ) = Z {1 − e ,1 − e ,1 − e
T1 T1 T1
,1 − e T1
,⋅ ⋅ ⋅} /  = −T
 z −1 
z − e T1
Prof. Dr.-Ing. F. Keller Digital Control Systems Page 118

7. More Solved Exercises

−T
  Im
 1 − e T1 −T
K ⋅    z-plane
−T
K ⋅ 1 − e T1 
   
 z −e
T1

Gclosed −loop ( z ) =  =  
 −T
 −T
 −T
 x Re
 1 − e T1  z − e T1 + K 1 − e T1 
1+ K ⋅ −T 
 
  
T1 
 z −e  −T

(1 + K ) e T1
− K <1
−T −T −T
  K +1
z pole = e − K 1 − e T1  <
T1 T1
e
  K +1
  −T
−T
−T (1 + K ) e T1
> K −1 < ln 1
z pole = (1 + K ) ⋅ e
T1
T1
−K −T
K −1
e T1
> T1 = 100ms −T
K +1 < 0!!!!
K =2 T1
z pole < 1 −T  K −1 
> ln  1
−T T1  K + 1  T < −100ms ⋅ ln
− 1 < (1 + K ) e
3
T1
− K <1  K −1 
−T T < −T1 ⋅ ln  T < −100ms ⋅ (− 1.0986)
 K +1
− 1 < (1 + K ) e T1
−K T < 109.86ms
Digital Control Systems Page 119

7. More Solved Exercises

Exercise 10: Consider a control loop, where the transfer function of the process is
1 1
G process = with T1 = 400 ms and T2 = 100 ms.
T1 ⋅ s T2 ⋅ s

a) An analog P-controller is used. What can be said about the stability of the control loop?

1 1
T1 ⋅ s T2 ⋅ s

The closed-loop transfer function is:


1
K⋅
Gc (s ) ⋅ G p (s ) T1T2 ⋅ s 2 K
Gclosed −loop = = =
1 + Gc (s ) ⋅ G p (s ) 1 + K ⋅ 1 T1T2 ⋅ s 2 + K
T1T2 ⋅ s 2
As shown below, using the final value theorem, the steady state error ess is zero, for a step function as
input. The closed-loop is always stable.

lim c(t ) = lim s ⋅ ⋅ = 1 ⇒ ess = (1 − 1) ⋅100% = 0


1 K
t →∞ s →0 s T1T2 ⋅ s 2 + K
Digital Control Systems Page 120

7. More Solved Exercises

b) Obtain a deadbeat control algorithm where the sampling period is T = 200 ms. The result must
have the following form: uk = c1 ⋅ uk −1 + c2 ⋅ uk − 2 + ⋅ ⋅ ⋅ + d 0 ⋅ ek + d1 ⋅ ek −1 + ⋅ ⋅ ⋅

1 1
T1 ⋅ s T2 ⋅ s

t
1
T1 ∫0
1 ⋅ dt 1 t2
t
h(t ) =
1 t
T2 ∫0 T1
⋅ dt
2 T1 ⋅ T2
1 1
T1 ⋅ s T2 ⋅ s

u (t ) = u00 ⋅ σ (t ) + u11 ⋅ σ (t − T ) + u22 ⋅ σ (t − 2T )

c(t ) = u00 ⋅ h(t ) + u11 ⋅ h(t − T ) + u22 ⋅ h(t − 2T )


Digital Control Systems Page 121

7. More Solved Exercises


t
1
T1 ∫0
1 ⋅ dt 1 t2
t
h(t ) =
1 t
T2 ∫0 T1
⋅ dt
2 T1 ⋅ T2
1 1
T1 ⋅ s T2 ⋅ s

c(t ) = u00 ⋅ h(t ) + u11 ⋅ h(t − T ) + u22 ⋅ h(t − 2T )

h(0 ) = 0
c(3T ) = u00 ⋅ h(3T ) + u11 ⋅ h(2T ) + u22 ⋅ h(T ) = 1
h(T ) = ⋅ (200ms ) = 0.5
1 1 1
4.5u00 + 2u11 + 0.5u22 = 1
2

2 400ms 100ms
u00 + u11 + u22 = 0 (Process dc-gain -> infinity)
h(2T ) = ⋅ (400ms ) = 2
1 1 1 2

2 400ms 100ms
u00 = 1
h(3T ) = ⋅ (600ms ) = 4.5
1 1 1 2

2 400ms 100ms u11 = −2


c(2T ) = u00 ⋅ h(2T ) + u11 ⋅ h(T ) + u22 ⋅ h(0 ) = 1 u22 = 1
2u00 + 0.5u11 = 1
Digital Control Systems Page 122

7. More Solved Exercises

1,0.5,0,0,0,0,0,0,.... u00 = 1
1,−1,0,0,0,0,0,0,....
u11 = −2
1 1 u22 = 1
T1 ⋅ s T2 ⋅ s

u (t ) = u00 ⋅ σ (t ) + u11 ⋅ σ (t − T ) + u22 ⋅ σ (t − 2T )

Z {uk } = Z {1,−1,0,0,0,0,0,0,....} = 1 − z −1
Z {ek } = Z {1,0.5,0,0,0,0,0,0,....} = 1 + 0.5 z −1
Z {uk } 1 − z −1
= ⇒ Z {uk } + 0.5 Z {uk −1} = Z {ek } − Z {ek −1}
Z {ek } 1 + 0.5 z −1

uk = −0.5uk −1 + ek − ek −1 1
t

T1 ∫0
1 ⋅ dt 1 t2
t
h(t ) =
1 t
T2 ∫0 T1
⋅ dt
2 T1 ⋅ T2
1 1
T1 ⋅ s T2 ⋅ s
Digital Control Systems Page 123

7. More Solved Exercises

u (t ) = u00 ⋅ σ (t ) + u11 ⋅ σ (t − T ) + u22 ⋅ σ (t − 2T )

t
1
T1 ∫0
1 ⋅ dt 1 t2
t
h(t ) =
1 t
T2 ∫0 T1
⋅ dt
2 T1 ⋅ T2
uk = −0.5uk −1 + ek − ek −1 1 1
T1 ⋅ s T2 ⋅ s

c) Make a drawing of the control loop’s output c(t) for 0 ≤ t ≤ 9T for the request signal r(t)
shown in the following figure if the deadbeat control algorithm is used.
Digital Control Systems Page 124

7. More Solved Exercises

u (t ) = u00 ⋅ σ (t ) + u11 ⋅ σ (t − T ) + u22 ⋅ σ (t − 2T )


t
1
T1 ∫0
1 ⋅ dt 1 t2
t
h(t ) =
1 t
T2 ∫0 T1
⋅ dt
2 T1 ⋅ T2
1 1
T1 ⋅ s T2 ⋅ s

Reference as seen by the


controller. c(t)

r(t)

You might also like