0% found this document useful (0 votes)
47 views82 pages

Digital Control Systems

1) Digital control systems use discrete time signals rather than continuous time signals. This allows for improved sensitivity but some information is lost during conversions. 2) A zero-order hold approximates the digital-to-analog conversion process by holding the last sampled value constant over each sampling period. 3) The z-transform is used to analyze discrete time signals, analogous to the Laplace transform for continuous time. It represents a discrete signal as a power series with the sample values as coefficients.

Uploaded by

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

Digital Control Systems

1) Digital control systems use discrete time signals rather than continuous time signals. This allows for improved sensitivity but some information is lost during conversions. 2) A zero-order hold approximates the digital-to-analog conversion process by holding the last sampled value constant over each sampling period. 3) The z-transform is used to analyze discrete time signals, analogous to the Laplace transform for continuous time. It represents a discrete signal as a power series with the sample values as coefficients.

Uploaded by

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

Digital Control

Systems

1
Continuous vs. Discrete Time
Disadvantages Advantages
Develop complexImproved
math algorithms
sensitivity •
Lose information
Use digital
duringcomponents
conversions •
Control algorithms easily modified •
Many systems inherently digital •
Digital Control Systems:
Zero-Order Hold

 sT
1e
H2 ( s)
s
Digital Control Systems:
Zero-Order Hold (cont)
Digital Control Systems:
The z-transform
:Def’n of z-Transform


Z{f(t)} = F(z) = 
 f ( kT) z
 k

k  0

:Relationship b/w s-plane and z-plane

sT
z e
Digital Control Systems:
The z-transform (cont)

Several common z-Transforms

x(t) X(s) X(z)


________________________________________________
1 z
u( t)
s z1

1 Tz
t
2 2
s ( z  1)

 at 1 z
e
sa ze
 aT

 z sin  T
sin  t 
z  2z cos  T  1
2 2 2
s 
Digital Control Systems:
Stability in s-plane

:Region of Stability
Left-Hand Plane
Sampled-data system

A sampled-data system operates on discrete-time rather than


continuous-time signals.

9
The sampling process 6.1
A sampler is basically a switch that closes every T seconds.

10
r(t): continuous signal

r*(t): sampled signal

11
• q: amount of time the
switch is closed
In practice,   •
qT,
and the pulses can be
approximated by flat-
topped rectangles.

12
If q is neglected, the
operation is called
“ideal sampling”

13
Ideal sampling
• Ideal sampling of a continuous signal can be considered as a
multiplication of the continuous signal, r(t), with a pulse train,
P(t).

 14
• The pulse train: P (t )    (t  nT );
n  
Ideal sampling
r * (t )  P(t )r (t ),

r (t )  r (t )   (t  nT ).
*

n  


r (t ) 
*
 r (nT ) (t  nT ).
n  
• Let, r(t) = 0, for t<0, then,

r * (t )   r (nT ) (t  nT ).
n 0
15
The z-transform
• Taking Laplace transform of the sampled signal r*(t)
gives:

R* ( s)   r (nT )e  nTs .
n 0

• Let us define z = esT. Then,



R( z )   r (nT ) z  n .
n 0

• This is the definition of the z-transform.


16
The z-transform

Notice that the z-transform consists of an infinite series in the


complex variable z,

R( z )  r (0)  r (T ) z 1  r (2T ) z 2  r (3T ) z 3  ...,

i.e. the r(nT ) are the coefficients of this power series at different
sampling instants.

17
The z-transform

• The z-transform is used in sampled data systems just as the


Laplace transform is used in continuous-time systems.

• We will look at how we can find the z-transforms of some


commonly used functions.

• We first give a closer look at the D/A converter.

18
D/A converter as a zero-order hold (ZOH)
• D/A converter converts the sampled signal r∗(t) into a
continuous signal y(t).

• D/A can be approximated by a ZOH circuit.

• The ZOH remembers the last information until a new


sample is obtained, i.e. it takes the value r(nT) and holds
it constant for nT ≤ t < (n + 1)T , and the value r (nT) is
used during the sampling period.

19
The zero-order hold (ZOH)
• The impulse response of a ZOH:

• The transfer function of ZOH is

Ts Ts 20
1 e 1 e
G(s)    .
s s s
The zero-order hold (ZOH)

A sampler and zero-


order hold can
accurately follow the
input signal if the
sampling time T is small
compared to the
transient changes in the
signal.

21
Example 6.1
Figure 6.10 shows an ideal sampler followed by a ZOH. Assuming the
input signal r (t) is as shown in the figure, show the waveforms after the
sampler and also after the ZOH.

Answer

22
The z-transform of some common
functions

23
Unit Step Function

0, n  0,
r (nT )  
1, n  0.

 
R( z )   r (nT ) z  n   z  n  1  z 1  z  2  z 3  ...
n 0 n 0

1

1  z 1
z 24
 , | z | 1.
z 1
Useful closed-form series summations


1

n 0
x  1 x  x  x  
n 1 2 3

1 x

x

n 0
nx  x  2 x  3x   
n 2 3

(1  x ) 2

N 1
N
1  x

n 0
x n
 1  x1
 x 2
   x N

1 x
25
Unit Ramp Function

 0, n  0,
r (nT )  
nT , n  0.

 
R( z )   r (nT ) z n
  nTz  n  Tz 1  2Tz  2  3Tz 3  ...
n0 n 0

Tz
 , z  1.
( z  1) 2
26
Exponential Function
0, t  0,
r (t )    at
e , t  0.

 0, n  0,
r (nT )    anT
e , n  0.

 
R( z )   r (nT ) z n
  e  anT z  n  1  e  aT z 1  e  2 aT z  2  ...
n0 n 0

1 z
  . 27
1  e  aT z 1 z e  aT
General Exponential Function

0, n  0,
r ( n)   n
 p , n  0.

 
R( z )   r (nT ) z n
  p n z  n  1  pz 1  p 2 z  2  ...
n 0 n0

1

1  pz 1
z
 .
z p 28
Sine Function
 0, n  0,
r ( n)  
sin nT , n  0.

e jnT  e  jnT 1 jnT


sin nT   (e  e  jnT ).
2j 2j
1  z z  1  z (e jT  e  jT ) 
R( z )   jT
  jT 
  2 jT  jT

2j  z e z e  2 j  z  z (e  e ) 1
z sin T
 2 .
z  2 z cos T  1 29
Discrete Impulse Function

1, n  0,
r ( n)   ( n)  
0, n  0.


R( z )   r (nT ) z  n  1.
n 0

30
Delayed Discrete Impulse Function

1, n  k  0,
r ( n)   ( n  k )  
 0, n  k.


R( z )   r (nT ) z  n  z  k .
n0

31
32
The z-Transform of a Function Expressed
as a Laplace Transform

• Given a function G(s), find G(z) which denotes the z-transform


equivalent of G(s).

• It is important to realize that G(z) is not obtained by simply


substituting z for s in G(s)!

33
Example 6.2

Given

1
G( s)  2 .
s  5s  6
Determine G(z).

34
Answer:
Using Inverse Laplace transform
• Partial fraction

1 1 1 1
G (s)  2    .
s  5s  6 ( s  2)( s  3) s  2 s  3
• Inverse Laplace transform

g (t )  L1{G ( s)}  e 2t  e 3t .


• Substitute t = nT gives

• Finally, g (nT )  e 2 nT  e 3nT .

z z z (e 2T  e 3T ) 35
G( z)   2T
 3T
  2T 3T
.
z e z e ( z  e )( z  e )
Method 2:
Laplace to z-transform table

• From table in Appendix A

1 1 1 1
• So, G (s)  2    .
s  5s  6 ( s  2)( s  3) s  2 s  3

z z z (e 2T  e 3T )
G( z)   2T
 3T
  2T 3T
. 36
z e z e ( z  e )( z  e )
37
Discrete-time controller design
:The design procedure is outlined as follows
.Derive the transfer function of the plant (process) .1
Transform the system transfer function into the z- .2
.plane
.Design a suitable digital controller in the z-plane .3
Implement the controller algorithm on a digital .4
.computer

38
Discrete-time controller design
Today, we will study two methods for discrete
:controller design
Deadbeat controller •
a technique to achieve an ideal response but
.require excessive control signals

Dahlin controller •
a technique to approximate the deadbeat controller
.but does not require excessive control signals
39
Digital controllers
• The closed-loop transfer function of the system shown is
Y ( z) D( z )GH ( z )
 .
R( z ) 1  D( z )GH ( z )
:Suppose that the closed-loop transfer function is chosen to be •
Y ( z)
T ( z)  .
R( z )
:Then, the controller required to achieve T(z) is given by •

1 T ( z)
D( z )  .
GH ( z ) 1  T ( z )

40
Digital controllers

• The equation,

1 T ( z)
D( z )  ,
GH ( z ) 1  T ( z )

states that the required controller D(z) can be designed if we


know the model of the process GH(z).

• The controller D(z) must be realizable. That is, D(z) must not
have a numerator whose order exceeds that of the numerator.

41
Deadbeat Controller
Deadbeat controller is one in which a step input is
followed by the system but delayed by one or more
sampling periods, i.e. the system response is required
to be equal to unity at every sampling instant after the
application of a unit step input.

42
Deadbeat Controller
Therefore, the desired closed-loop transfer function is

T ( z)  z k , k  1.

and the controller achieving this is

1 T ( z) 1  z k  1  1 
D( z )       k .
GH ( z ) 1  T ( z ) GH ( z )  1  z  k  GH ( z )  z  1 
43
Example 9.1
The open-loop transfer function of a plant is given by
e 2 s
G(s)  .
10s  1
Design a dead-beat digital controller for the system. Assume that
T = 1 s.
Answer:
The transfer function of the system with a ZOHis given by

1  e Ts  1  e 2Ts 
GH ( z )  Z  G ( s )  (1  z ) Z  
 s   s (10 s  1) 
1 2  1  44
 (1  z ) z Z  
 s (10 s  1) 
From the z-transform tables •

a Z z (1  e  aT )

s( s  a) ( z  1)( z  e aT )
,So •
 0.1 
GH ( z )  (1  z 1 ) z  2 Z  
 s ( s  0.1) 
1 2 z (1  e 0.1 )
 (1  z ) z
( z  1)( z  e 0.1 )
0.095
 3
z  0.904 z 2
Hence, the controller is given by •

1 T ( z) z 3  0.904 z 2  1  45
D( z )    k .
GH ( z ) 1  T ( z ) 0.095  z 1 
.For realizability, we must choose k ≥ 3 •
Choosing k = 3, we obtain the controller •
z 3  0.904 z 2 1 z 3  0.904 z 2
D( z )   .
0.095 z  1 0.095( z  1)
3 3

With this controller, the block diagram of the closed-loop is •

46
To analyze the designed system performance, let us simulate •
.the step response of the closed-loop and the control signal
As designed, the step response is unity after 3 secconds and
.stays at this value
Note: It is important to realize that the response is correct only 47
at the sampling instants and the response can have an
.oscillatory behavior between the sampling instants
For the control signal, we can realize that the maximum
magnitude of the control signal is very high at the beginning 48
(≈11). Usually, this is not acceptable in practice.
Drawbacks of deadbeat control

• It requires large control signals which may not be


acceptable.

• It is very sensitive to plant characteristics and a


small change in the plant may lead to ringing or
oscillatory response.

49
MATLAB code for Deadbeat control
Deadbeat control, Dogan Ibrahim, Chapter 9, Example 9.1 %

;Gp = tf(1,[10 1],'iodelay',2)


;Gpd = c2d(Gp,1)
;Gc = tf([1 -0.904 0 0],[0.095 0 0 -0.095],1)
;Gcl=Gc*Gpd/(1+Gc*Gpd)
;t=0:1:10
y=step(Gcl,t)
figure(1)
plot(t,y,'o','MarkerSize',6)
xlabel('time, sec')
ylabel('output, y')
xlabel('time, t')
axis([0 10 0 1.2])
title('Step response')

;Gru=Gc/(1+Gc*Gpd)
u=step(Gru,t)
figure(2)
plot(t,u,'o','MarkerSize',6)
xlabel('time, sec')
ylabel('control signal, u')
50
axis([0 10 0 15])
title('Control signal')
Dahlin Controller
• Dahlin controller is a modification of the deadbeat
controller which produces an exponential response that is
smoother than deadbeat control.
• The desired closed-loop response for step input looks like:

51
Dahlin Controller
• Hence, the desired closed-loop transfer function is:

e  Ls
Gcl ( s ) 
s  1
• As step input is assumed (which is constant between
samples), the desired closed-loop transfer function in the
z-domain will be

1  e Ts e  Ls 
T ( z )  Z {Gzoh ( s )Gcl ( s )}  Z  
 s s  1
52
Example
The open-loop transfer function of a plant is given by

e 2 s
G(s) 
10s  1

Design a Dahlin digital controller for the system to achieve a


closed-loop time constant of 5 sec. Assume that the sampling
period, T = 1 s.

53
Answer
First, we need to find the z-transform of the process (preceded •
:by a ZOH). From the previous example, this is found to be

0.095
GH ( z )  3
z  0.904 z 2
Second, we need to find the z-transform of the desired closed- •
.loop transfer function, T(z)
,As the desired closed-loop time constant, τ, is 5 sec •

e  Ls
T ( s)  54
5s  1
• Therefore,

1  e  s e  Ls 
T ( z)  Z  
 s 5s  1
1 L /T  1 
 (1  z ) z Z 
 s (5 s  1) 
1 k  0.2 
 (1  z ) z Z  
 s ( s  0.2) 
 0.2T
1 k z (1  e )
 (1  z ) z
( z  1)( z  e 0.2T )
k (0.181)
z 55
( z  0.819)
The Dahlin controller is thus given by

1 T ( z)
D( z ) 
G( z) 1  T ( z)
k (0.181)
z
z  0.904z
3 2
( z  0.819)

0.095  k (0.181) 
1  z 
 ( z  0.819) 
z 3  0.904z 2 0.181z  k

0.095 z  0.819  0.181z  k
0.181z 3 k  0.164z 2 k
 k
.
0.095z  0.078  0.017 z
56
For the controller to be realizable, the degree of the •
numerator must be less than or equal to the degree of the
.denominator, i.e

3 k 1  k  2

:Choosing k=2, the controller is, then, given by •

0.181z  0.164 0.181z 3  0.164z 2


D( z )  2

0.095z  0.078  0.017 z 0.095z 3  0.078z 2  0.017

Using the designed controller, the closed-loop step response •


.and control signal are shown next
57
It is clear that the response is exponential as designed •
.but slower than deadbeat control
58
?What is response time delay? time constant •
It is clear that the maximum magnitude of the control
signal (≈1.9) is much smaller than the control signal
59
obtained using a deadbeat controller (≈11), which is more
.acceptable in practice
Discrete-time controller design
:The design procedure is outlined as follows
.Derive the transfer function of the plant (process) .1
.Transform the system transfer function into the z-plane .2
.Design a suitable digital controller in the z-plane .3
.Implement the controller algorithm on a digital computer .4

60
Discrete-time controller design
Today, we will study two methods for discrete
:controller design
Deadbeat controller •
a technique to achieve an ideal response but
.require excessive control signals

Dahlin controller •
a technique to approximate the deadbeat controller
.but does not require excessive control signals
61
Digital controllers
• The closed-loop transfer function of the system shown is
Y ( z) D( z )GH ( z )
 .
R( z ) 1  D( z )GH ( z )
:Suppose that the closed-loop transfer function is chosen to be •
Y ( z)
T ( z)  .
R( z )
:Then, the controller required to achieve T(z) is given by •

1 T ( z)
D( z )  .
GH ( z ) 1  T ( z )

62
Digital controllers

• The equation,

1 T ( z)
D( z )  ,
GH ( z ) 1  T ( z )

states that the required controller D(z) can be designed if we


know the model of the process GH(z).

• The controller D(z) must be realizable. That is, D(z) must not
have a numerator whose order exceeds that of the numerator.

63
Deadbeat Controller
Deadbeat controller is one in which a step input is
followed by the system but delayed by one or more
sampling periods, i.e. the system response is required
to be equal to unity at every sampling instant after the
application of a unit step input.

64
Deadbeat Controller
Therefore, the desired closed-loop transfer function is

T ( z)  z k , k  1.

and the controller achieving this is

1 T ( z) 1  z k  1  1 
D( z )       k .
GH ( z ) 1  T ( z ) GH ( z )  1  z  k  GH ( z )  z  1 
65
Example 9.1
The open-loop transfer function of a plant is given by
e 2 s
G(s)  .
10s  1
Design a dead-beat digital controller for the system. Assume that
T = 1 s.
Answer:
The transfer function of the system with a ZOHis given by

1  e Ts  1  e 2Ts 
GH ( z )  Z  G ( s )  (1  z ) Z  
 s   s (10 s  1) 
1 2  1  66
 (1  z ) z Z  
 s (10 s  1) 
From the z-transform tables •

a Z z (1  e  aT )

s( s  a) ( z  1)( z  e aT )
,So •
 0.1 
GH ( z )  (1  z 1 ) z  2 Z  
 s ( s  0.1) 
1 2 z (1  e 0.1 )
 (1  z ) z
( z  1)( z  e 0.1 )
0.095
 3
z  0.904 z 2
Hence, the controller is given by •

1 T ( z) z 3  0.904 z 2  1  67
D( z )    k .
GH ( z ) 1  T ( z ) 0.095  z 1 
.For realizability, we must choose k ≥ 3 •
Choosing k = 3, we obtain the controller •
z 3  0.904 z 2 1 z 3  0.904 z 2
D( z )   .
0.095 z  1 0.095( z  1)
3 3

With this controller, the block diagram of the closed-loop is •

68
To analyze the designed system performance, let us simulate •
.the step response of the closed-loop and the control signal
As designed, the step response is unity after 3 secconds and
.stays at this value
Note: It is important to realize that the response is correct only 69
at the sampling instants and the response can have an
.oscillatory behavior between the sampling instants
For the control signal, we can realize that the maximum
magnitude of the control signal is very high at the beginning 70
(≈11). Usually, this is not acceptable in practice.
Drawbacks of deadbeat control

• It requires large control signals which may not be


acceptable.

• It is very sensitive to plant characteristics and a


small change in the plant may lead to ringing or
oscillatory response.

71
MATLAB code for Deadbeat control
Deadbeat control, Dogan Ibrahim, Chapter 9, Example 9.1 %

;Gp = tf(1,[10 1],'iodelay',2)


;Gpd = c2d(Gp,1)
;Gc = tf([1 -0.904 0 0],[0.095 0 0 -0.095],1)
;Gcl=Gc*Gpd/(1+Gc*Gpd)
;t=0:1:10
y=step(Gcl,t)
figure(1)
plot(t,y,'o','MarkerSize',6)
xlabel('time, sec')
ylabel('output, y')
xlabel('time, t')
axis([0 10 0 1.2])
title('Step response')

;Gru=Gc/(1+Gc*Gpd)
u=step(Gru,t)
figure(2)
plot(t,u,'o','MarkerSize',6)
xlabel('time, sec')
ylabel('control signal, u')
72
axis([0 10 0 15])
title('Control signal')
Dahlin Controller
• Dahlin controller is a modification of the deadbeat
controller which produces an exponential response that is
smoother than deadbeat control.
• The desired closed-loop response for step input looks like:

73
Dahlin Controller
• Hence, the desired closed-loop transfer function is:

e  Ls
Gcl ( s ) 
s  1
• As step input is assumed (which is constant between
samples), the desired closed-loop transfer function in the
z-domain will be

1  e Ts e  Ls 
T ( z )  Z {Gzoh ( s )Gcl ( s )}  Z  
 s s  1
74
Example
The open-loop transfer function of a plant is given by

e 2 s
G(s) 
10s  1

Design a Dahlin digital controller for the system to achieve a


closed-loop time constant of 5 sec. Assume that the sampling
period, T = 1 s.

75
Answer
First, we need to find the z-transform of the process (preceded •
:by a ZOH). From the previous example, this is found to be

0.095
GH ( z )  3
z  0.904 z 2
Second, we need to find the z-transform of the desired closed- •
.loop transfer function, T(z)
,As the desired closed-loop time constant, τ, is 5 sec •

e  Ls
T ( s)  76
5s  1
• Therefore,

1  e  s e  Ls 
T ( z)  Z  
 s 5s  1
1 L /T  1 
 (1  z ) z Z 
 s (5 s  1) 
1 k  0.2 
 (1  z ) z Z  
 s ( s  0.2) 
 0.2T
1 k z (1  e )
 (1  z ) z
( z  1)( z  e 0.2T )
k (0.181)
z 77
( z  0.819)
The Dahlin controller is thus given by

1 T ( z)
D( z ) 
G( z) 1  T ( z)
k (0.181)
z
z  0.904z
3 2
( z  0.819)

0.095  k (0.181) 
1  z 
 ( z  0.819) 
z 3  0.904z 2 0.181z  k

0.095 z  0.819  0.181z  k
0.181z 3 k  0.164z 2 k
 k
.
0.095z  0.078  0.017 z
78
For the controller to be realizable, the degree of the •
numerator must be less than or equal to the degree of the
.denominator, i.e

3 k 1  k  2

:Choosing k=2, the controller is, then, given by •

0.181z  0.164 0.181z 3  0.164z 2


D( z )  2

0.095z  0.078  0.017 z 0.095z 3  0.078z 2  0.017

Using the designed controller, the closed-loop step response •


.and control signal are shown next
79
It is clear that the response is exponential as designed •
.but slower than deadbeat control
80
?What is response time delay? time constant •
It is clear that the maximum magnitude of the control
signal (≈1.9) is much smaller than the control signal
81
obtained using a deadbeat controller (≈11), which is more
.acceptable in practice
MATLAB code for Dahlin controller
Dahlin control, Dogan Ibrahim, Chapter 9, Example 9.1 %

;Gp = tf(1,[10 1],'iodelay',2)


;Gpd = c2d(Gp,1)
;Gc = tf([0.181 -0.164 0 0],[0.095 -0.078 0 -0.017],1)
;Gcl=Gc*Gpd/(1+Gc*Gpd)
;t=0:1:30
y=step(Gcl,t)
figure(1)
plot(t,y,'o','MarkerSize',6)
xlabel('time, sec')
ylabel('output, y')
xlabel('time, t')
axis([0 30 0 1.2])
title('Step response')

;Gru=Gc/(1+Gc*Gpd)
u=step(Gru,t)
figure(2)
plot(t,u,'o','MarkerSize',6)
xlabel('time, sec')
ylabel('control signal, u')
82
axis([0 30 0 5])
title('Control signal')

You might also like