0% found this document useful (0 votes)
103 views21 pages

An Introduction To Digital Control Systems - Tutorial: Research

This document provides a tutorial on digital control systems with several questions and examples. It begins by introducing a basic digital control system model and asks questions about the purpose and transfer function of a zero-order hold, characteristics of a deadbeat controller, and effects of PID components. Subsequent questions involve discretizing a plant transfer function, deriving closed-loop transfer functions, and designing controllers including a Dahlin controller and a deadbeat controller using state-space methods. The document provides detailed steps and explanations for digital control system analysis and design.

Uploaded by

Nahom
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)
103 views21 pages

An Introduction To Digital Control Systems - Tutorial: Research

This document provides a tutorial on digital control systems with several questions and examples. It begins by introducing a basic digital control system model and asks questions about the purpose and transfer function of a zero-order hold, characteristics of a deadbeat controller, and effects of PID components. Subsequent questions involve discretizing a plant transfer function, deriving closed-loop transfer functions, and designing controllers including a Dahlin controller and a deadbeat controller using state-space methods. The document provides detailed steps and explanations for digital control system analysis and design.

Uploaded by

Nahom
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/ 21

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/275973263

An introduction to digital control systems - Tutorial

Research · May 2015


DOI: 10.13140/RG.2.1.4622.4801

CITATIONS READS

0 3,099

1 author:

Hugh Lachlan Kennedy


Technical Knockout Systems Pty. Ltd.
82 PUBLICATIONS   253 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Digital Signal Processing (1-D DSP) View project

Acoustic Signal Processing View project

All content following this page was uploaded by Hugh Lachlan Kennedy on 09 May 2015.

The user has requested enhancement of the downloaded file.


Control Systems
EEET 3046, 2014
[email protected]

Discrete-time control – tutorial problems


Q1. Consider the digital control system shown below in Figure 1, where Gc(z) is the discrete-time transfer
function of the controller, Gzoh(s) is the transfer function of a zero-order hold applied by a digital-to-analogue
converter, Gp(s) is the transfer function of the plant. R(z) and Y(z) are the transforms of the digitized
reference input r(nT) and the system output respectively y(nT), which are sampled every T seconds using a
single (multichannel) analogue-to-digital converter.

R(s) R(z) E(z) Gc(z) U(z) Gzoh(s) U(s) Gp(s) Y(s)


+
-
Y(z)

Figure 1

a) State the purpose of the zero-order hold and derive its transfer function, i.e. G zoh(s).

b) If the controller is designed to give a “deadbeat” response for a step input, assuming the plant is known
precisely, describe the characteristics of the output y(t). What measures can be taken to reduce the
magnitude of the controller command signal u(t)?

c) Discuss the affect of the Proportional (P), Integral (I) and Differential (D) components on the closed-loop
system response, in a digital PID controller.

Page |1
Control Systems
EEET 3046, 2014
[email protected]

Q2. We will now proceed to design some possible controllers for the system depicted in the previous question
(see Figure 1). If the transfer function of the plant is Gp(s)=1/{s(s+1)}, using Figure 2 below as a guide,
discretize the plant using a zero-order hold, i.e. determine the discrete-time transfer function Gp(z) = Y(z)/U(z).

U(z) Gzoh(s) U(s) Gp(s) Y(s)

U(z) Gp(z) Y(z)

Figure 2

Page |2
Control Systems
EEET 3046, 2014
[email protected]

Q3. Using Figure 3 below as a guide, determine the discrete-time transfer function for the closed-loop system
G(z) = Y(z)/R(z) in terms of Gc(z) and Gp(z).

R(z) E(z) Gc(z) U(z) Gzoh(s) U(s) Gp(s) Y(s)


+
-
Y(z)

R(z) E(z) Gc(z) U(z) Gp(z) Y(z)


+
-

R(z) G(z) Y(z)

Figure 3

Page |3
Control Systems
EEET 3046, 2014
[email protected]

Q4. Using your expression G(z) derived in Q3, determine the discrete-time transfer function Gc(z) for a “Dahlin”
controller that yields the desired output y(nT) = 1-exp(-nT/τ), for a unit-step input, i.e. r(nT) = 1 for n≥0.
a) Derive an expression for the discrete-time transfer function Gc(z) = U(z)/E(z), in terms of G(z) and G p(z).
b) What is the Z transform of the unit-step input r(nT) = 1 for n≥0?
c) What is the Z transform of the desired output response y(nT) = 1-exp(-nT/τ), for the specified input?
d) What is the desired closed-loop discrete-time transfer function G(z) = Y(z)/R(z) for this input/output pair?
e) Substitute your expression for Gp(z) and G(z) into your expression for Gc(z) and simplify fully to find the
discrete-time transfer function of your controller.
f) Check your controller design using a simulation. Check the control command signal u(nT), i.e. the controller
output. Try different values of T and τ. What happens to the pole and zero of Gc(z) as T decreases? Why is
this controller not ideal?

Page |4
Control Systems
EEET 3046, 2014
[email protected]

Q5. To make a “deadbeat” controller, we could repeat Q4, with G(z)=1/z2 (i.e. two poles at the origin and no
zeros) so that the desired output y(nT) is equal to the unit-step input r(nT), delayed by two samples. However,
this will only exacerbate our problems. We will take a different approach here and (in a round-about way) use
a closed-loop zero to improve the response, which for this particular plant, should result in a non-oscillatory
controller output u(nT) and no intra-sample ripple or ringing in the plant output y(t), for a step input r(nT).
Let’s start with some continuous-time open-loop analysis ...
a) Give a state-space (continuous-time) representation of the classical (continuous-time) transfer function of
the plant Gp(s) in an open-loop configuration, i.e. what are the system matrices , , and for the open-
loop plant (without feedback and a controller)?
b) For a fixed sample time T, the evolution of the internal system state vector (2x1), in response to the plant
input (1x1), may be modelled using
.
Determine the transition matrices (2x2) and (2x1). Use T = 2.0 s and assume that the input , is held
constant over the sampling interval (using the zero-order hold).
c) Using the transition matrices determined in b), derive an expression (in matrix/vector form) for the future
state , after two complete sample periods have elapsed, given the current (i.e. initial) state , and
two consecutive inputs and .

Page |5
Control Systems
EEET 3046, 2014
[email protected]

d) Using your expression derived in c), compute the consecutive inputs , required to place the

future state at , starting from an initial state of .

e) Returning now to the discrete-time closed-loop system ...


i. Derive an expression for E(z)/R(z), in terms of Gc(z) and Gp(z).
ii. Using your expression in i. and the fact that Gc(z) = U(z)/E(z), derive an expression for U(z)/R(z), in terms
of Gc(z) and Gp(z).
iii. Rearrange your expression in ii. to get an expression for Gc(z) in terms of U(z), R(z) and Gp(z).
f) Using the result computed in d) we have the desired open-loop control command U(z) = z-1
which we would like to reproduce in a closed-loop context for a step input. Substitute U(z), R(z) = z/(z-1)
and Gp(z) determined in Q2, into the expression derived in e)iii. to yield the discrete-time transfer function
for our controller Gc(z).
g) Using the expression for Gc(z) in f), give the linear difference equation for the controller – derived from the
numerator and denominator 1/z polynomials that make up Gc(z) – and determine the controller zero and
pole locations. This is the digital filter we would use in our computer to control the system – to determine
the plant input u(nT) from an error sequence e(nT).

Page |6
Control Systems
EEET 3046, 2014
[email protected]

h) Using the expression for G(z) derived in Q3, give the linear difference equation for the closed-loop system –
derived from the numerator and denominator 1/z polynomials that make up G(z) – and determine the
closed-loop zero and pole locations. We use this expression for system analysis purposes only.
i) Check your deadbeat-like controller design using a discrete-time Simulink simulation.
i. Check the output y(nT) for a unit step input.
ii. Check the corresponding control command signal u(nT).

Q6. Suggest a possible discrete-time transfer function Gc(z) for a Proportional & Differential (PD) controller,
using the P & D constants Kp and Kd. Why is Integral control not necessary in this system?

Page |7
Control Systems
EEET 3046, 2014
[email protected]

Appendix
Table 1. A Brief table of (unilateral) Laplace transform pairs

Page |8
Control Systems
EEET 3046, 2014
[email protected]
Table II. A brief table of Z-transform pairs

Page |9
Control Systems
EEET 3046, 2014
[email protected]

Solutions
Q1.
a) The ZOH converts a unit impulse input into a unit step output. Links the discrete ‘world’
of the computer to the continuous ‘real world’. The control action u(nT) determined for
the nth sample is held over a time interval of T seconds. Derive it by subtracting a unit
step, delayed by T sec., from a unit step. Use exp(-sT) to apply the delay in the frq dom
(see the 2nd row of Table 1):
U(s) = 1/s
Gzoh (s) = 1/s-exp(-Ts)/s = (1-exp(-Ts))/s

b) All closed-loop poles are placed at the origin of the z plane, i.e. the output is equal to
the input (at the sample times) after m samples, where m is equal to the order of the
plant. May have “ripple” or “ringing” in the plant output between the samples. Caused
by oscillatory controller output u(nT) due to one or more stable controller poles near -1.
Can improve this through the judicious placement of zeros. Controller output may also
be very large. Can reduce this by increasing the sampling period.

c) Same principles as the continuous-time case. Main things to consider:


 P: Decrease rise time, decrease steady-state error (but only so much can be used
before overshoot/settling time is too large/long and measurement noise is
amplified to unacceptable levels).
 I: For a type-I plant, drives steady-state error to zero for a unit step, decreases it
for a ramp (need to take anti-wind-up precautions).
 D: Decrease overshoot and increase settling time (need to be careful, may
introduce noise and lead to instability, use sparingly if at all).

Q2.
Apply ZOH, Gzoh(s) = (1-exp(-Ts))/s. Simplify the computation by breaking this up into s and
z parts ...

Compute inverse Laplace transform, apply the s part of the ZOH ...
Gp(s) = 1/{s(s+1)}
gp(t) = L-1[Gp(s)/s] = L-1[1/{s2(s+1)}] = t+exp(-t)-1

Sub t = nT into gp(t) ...


gp(nT) = nT +exp(-nT)-1

Compute Z transform of gp(nT) and multiply by the z part of the ZOH ...
Gp(z) = (z-1)/z × Z[gp(nT)] = (z-1)/z × [(Tz)/(z-1)2 + z/{z-exp(-T)} - z/(z-1)]

P a g e | 10
Control Systems
EEET 3046, 2014
[email protected]

Gp(z) = T/(z-1) - {1-exp(-T))/(z-exp(-T)}


Q3. Just use the regular formula for a -ve fbk loop with unity fbk gain ...
G(z) = Gc(z)Gp(z)/{1+ Gc(z)Gp(z)}

Q4. A Dahlin controller usually includes a dead-time of mT seconds as well as the first-order lag.
Here we use m = 0.

a) Just rearrange G(z) ...


G(z) = Gc(z)Gp(z)/{1+Gc(z)Gp(z)}
G(z) {1+Gc(z)Gp(z)} = Gc(z)Gp(z)
G(z)+G(z)Gc(z)Gp(z) = Gc(z)Gp(z)
G(z)+G(z)Gc(z)Gp(z)-Gc(z)Gp(z) = 0
G(z)+Gc(z){G(z)Gp(z)-Gp(z)} = 0
Gc(z){G(z)Gp(z)-Gp(z)} = -G(z)
Gc(z) = -G(z)/{G(z)Gp(z)-Gp(z)}
Gc(z) = G(z)/{Gp(z)-G(z)Gp(z)}
Gc(z) = G(z)/{Gp(z)[1-G(z)]}

b) R(z) = Z[r(nT)] = z/(z-1)

c) Y(z) = Z[y(nT)] = z/(z - 1) - z/{z - exp(-T/τ)}

d) G(z) = Y(z)/R(z) = [z/(z-1)-z/{z-exp(-T/τ)}+ / *z/(z-1)] = 1 - (z - 1)/{z - exp(-T/τ)}

e) Gc(z) = [{exp(-T/τ)-1}{z.exp(T) – 1}] / [(T-z+1)-exp(T)+z.exp(T)-T.z.exp(T)]

P a g e | 11
Control Systems
EEET 3046, 2014
[email protected]

f) As T decreases, the pole of Gc(z) approaches -1 and the zero approaches +1. We get exactly what we ‘ask for’ in all cases, at
the sampling times. However, the pole near -1, causes a high-frequency ripple in the controller output u(nT) and ringing in
the system output y(t) in between the sampling times. The wavelength of the ripple is 2 samples. The rate of amplitude
decay decreases as the pole approaches the edge of the unit circle. For larger sampling periods the deleterious effect of the
pole is partially offset by the zero because they are closer together. Furthermore, the decay is faster because the pole is
closer to zero. The τ parameters does not affect the controller poles and zeros (just the gain). However, as τ is decreased, the
controller gets ‘squeezed’ – the amplitude of the ringing controller output increases. This controller is OK if we use a
reasonable sampling period and if we are not in a hurry to reach the set point, r(nT) = 1.

Design Response Discrete-time Discrete-time


params (Hold in u(t) is not shown in these plots) Controller transfer function Closed-loop system transfer function
pol = closed-loop
pole position
Gc(z) G(z)

T = 10.0 sec
τ = 1.0 sec
lag = τ/T = 0.1 smp
p = exp(-1/lag) =
4.5400e-05

P a g e | 12
Control Systems
EEET 3046, 2014
[email protected]
T = 1.0 sec
τ = 1.0 sec
lag = τ/T = 1.0 smp
p = exp(-1/lag) =
0.3679

T = 0.1 sec
τ = 1.0 sec
lag = τ/T = 10.0 smp
pol = exp(-1/lag) =
0.9048

P a g e | 13
Control Systems
EEET 3046, 2014
[email protected]
T = 0.1 sec
τ = 0.1 sec
lag= τ/T = 1.0 smp
pol = exp(-1/lag) =
0.3679

T = 0.1 sec
τ = 0.01 sec
lag = τ/T = 0.1 smp
pol = exp(-1/lag) =
4.5400e-05

P a g e | 14
Control Systems
EEET 3046, 2014
[email protected]

Q5.
a) Many possible representations. But Controller Canonical Form (CCF) is the easiest to
construct from the classical representation ...

b)

Take Laplace transform of both sides …

Factor out ...

Multiply both sides by ...

Sub in (the identity matrix), , , the initial state and use a step input ,
because the input is held constant over the time step ...

Compute inverse ...

P a g e | 15
Control Systems
EEET 3046, 2014
[email protected]

Expand, simplify and rearrange ...

Take the inverse Laplace transform of both sides …

, (for )

So for a fixed time interval , starting from the kth time-step, sub for in the above ...

Using

(describes how the state changes over one time step, due to the state
from the end of the previous time step)

(describes how the state changes over one time step, due to the constant
control action)

Sub in s ...

c) We require the (L/R flipped) controllability matrix ...

... 1

... 2

Sub 1 into 2 ...

Expand ...

P a g e | 16
Control Systems
EEET 3046, 2014
[email protected]

Rearrange to collect the input terms ...

d) Rearrange the above equation ...

Multiply both sides by the inverse of the controllability matrix ...

Sub in future (target) and initial states ...

Sub in and , perform matrix multiplication ...

Compute matrix inverse ...

Perform matrix-vector multiplication ...

e)
i. Should know this by now ...

E(z)/ R(z) = 1/(1+G(z))

Sub in G(z) = Gc(z)Gp(z) into the above ...

E(z)/ R(z) = 1/{1+Gc(z)Gp(z))}

P a g e | 17
Control Systems
EEET 3046, 2014
[email protected]

ii. Rearrange the above ...

E(z) = R(z)/{1+Gc(z)Gp(z)}

Sub the above into Gc(z) = U(z)/E(z) and simplify ...

U(z)/R(z) = Gc(z)/{1+Gc(z)Gp(z)}

iii. Rearrange the above ...

Gc(z) = U(z)/{R(z)-U(z)Gp(z))}

f) Use
 and , so U(z) = z-1
 Gp(z) = T/(z-1) - {1-exp(-T))/(z-exp(-T)}, so with T = 2.0 s ...
 Gp(z) = (1.135z + 0.594) / (z2 - 1.135z + 0.1353)
 R(z) = z/(z-1)

Substitute the above into Gc(z) = U(z)/{R(z)-U(z)Gp(z))} and simplify ...

Gc(z) = (0.5783z - 0.07826)/(z + 0.3435).

g) Starting with the expression above ...

Gc(z) = (0.5783z - 0.07826)/(z + 0.3435) ... non-causal (+ve z powers)

We need a causal expression, using only delays (i.e 0 or -ve z powers) to implement in our
digital filter. Simply divide throughout by the highest power of z ...

Gc(z) = (0.5783 - 0.07826z-1)/(1 + 0.3435z-1) ... causal (-ve z powers)

Linear difference equation (LDE) ...

a0.y(n)+ a1.y(n-1) = b0.x(n)+ b1.x(n-1)

a0.y(n) = b0.x(n)+ b1.x(n-1) - a1.y(n-1)

from the causal Gc(z) function in 1/z above ...

b0 = 0.5783, b1 = -0.07826

a0 = 1, a1 = 0.3435

P a g e | 18
Control Systems
EEET 3046, 2014
[email protected]

... has an infinite impulse response (IIR) because the current output y(n) depends on the
previous output y(n-1), as well as the current and previous inputs x(n) and x(n-1).

Zeros are roots of numerator of Gc(z) (the non-causal function in z) ....

= 0.1353

Poles are roots of denominator of Gc(z) (the non-causal function in z) ....

= -0.3435

... stable (pole inside unit circle).

h) Perform substitutions and simplify ...

G(z) = (0.6565z + 0.3435)/z2 ... (non causal)

Divide top and bottom by z2 ...

G(z) = 0.6565z-1 + 0.3435z-2 ... (causal)

LDE ...

a0.y(n)+ a1.y(n-1) + a2.y(n-2) = b0.x(n) + b1.x(n-1) + b2.x(n-2)

a0.y(n) = b0.x(n) + b1.x(n-1) + b2.x(n-2) - a1.y(n-1) - a2.y(n-2)

from the G(z) polynomial in 1/z above ...

b0 = 0, b1 = 0.6565, b2 = 0.3435

a0 = 1, a1 = 0, a2 = 0

P a g e | 19
Control Systems
EEET 3046, 2014
[email protected]

... has an finite impulse response (FIR) because there are no output terms in the RHS of the
LDE.

Zeros are roots of numerator of G(z) (the non-causal function in z) ....

= -0.5232

Poles are roots of denominator of G(z) (the non-causal function in z) ....

=0&0

i) Simulations (done here using Matlab not Simulink) ...

... note the “accelerator-brake” action of the controller.

Q6. Use bwd diff for digital differentiator. Gc(z) = Kp+Kd(1-z-1)/T. Integrator is not required
because the plant is type I. Thus closed-loop steady-state error is already zero for a step
input.

P a g e | 20

View publication stats

You might also like