06 Modelling Discrete Control Systems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Modelling Discrete Control Systems

Introduction
The digital controller requires an up-to-date input value of 𝑒(𝑘) at the start of the k-th run of the algorithm and outputs a
corresponding control value 𝑢(𝑘) to the process at the end of the k-th run. When the rest of the system is discrete this presents
no problems as 𝑒(𝑘) will be available as a value in digital sequence and 𝑢(𝑘) will be in the required form of discrete output.
Typical examples of such a situation are most financial systems such as banks where account balances are updated only at
discrete times intervals.

When the rest of the system is continuous, the controller must be interfaced to the other system components as shown in figure
6.1. Such a system is called a sampled data system.

𝑒 (𝑡 ) ANALOGUE {𝑒(𝑘)} {𝑢(𝑘)} DIGITAL 𝑢 (𝑡 )


TO DIGITAL TO
DIGITAL ALGORITHM ANALOGUE

Figure 6.1

The analogue to digital converter (ADC) produces a sequence of discrete data values {𝑒(𝑘)} from a continuous signal 𝑒(𝑡) by
sampling 𝑒(𝑡) for each run, i.e at discrete times, 𝑡 = 0, 𝑇, 2𝑇, 3𝑇, ⋯ The digital to analogue converter (DAC) turns the sequence
of discrete values {𝑢(𝑘)} produced by the digital algorithm into a continuous signal 𝑢(𝑡), via data extrapolation (or
reconstruction), to the control process. Details of these actions will form the basis of the remainder of this topic.

Modelling the ADC (sampling)


Given a continuous input signal 𝑓(𝑡), the function of an ADC is to pick off and store the sequence of values {𝑓(𝑘𝑇)} for 𝑘 =
0,1,2, ⋯ where T seconds is the time between each control algorithm run. The ADC consists essentially of two components:
1. An ideal sampler, i.e. a contact which closes and opens simultaneously every T seconds for a zero time duration. Each time
the contact closes and opens, the sampler picks off the current value of 𝑓(𝑡).
2. A latch register to store the sampled values picked off 𝑓(𝑡). If this latch is simply holding the sampled value until the
algorithm calls for it then it is mathematically transparent as far as the computer and control operations are concerned.

This sampling can be shown diagrammatically in figure 6.2.

𝑓(𝑡) 𝛿(𝑡 − 𝑇) 𝛿(𝑡 − 3𝑇) 𝑓 ∗ (𝑡)


𝛿(𝑡) 𝛿(𝑡 − 2𝑇) 𝛿(𝑡 − 3𝑇)

𝑓(𝑇)
𝑓(2𝑇)
𝑓(𝑡) 𝑓(𝑡)
𝑓(0) 𝑓(3𝑇)
𝑓(4𝑇)

0 t 0 T 2T 3T 4T 0 T 2T 3T 4T kT
t

𝑓(𝑡) 𝑓 ∗ (𝑡)

ADC

Figure 6.2

46
The ideal sampler is represented by the impulse train:
𝛿𝑇 = 𝛿 (𝑡) + 𝛿 (𝑡 − 𝑇) + 𝛿 (𝑡 − 2𝑇) + ⋯ = ∑∞ 𝑘=0 𝛿 (𝑡 − 𝑘𝑇 ) (1)

impulse impulse impulse


at t = 0 at t= T at t = 2T

The output of the sampler is then:


𝑓 ∗ (𝑡) = 𝛿 (𝑡)𝑓(𝑡) = 𝑓 (0)𝛿(0) + 𝑓 (𝑇)𝛿(1 − 𝑇) + 𝑓(2𝑇)𝛿(2 − 2𝑇) + ⋯

Or 𝑓 ∗ (𝑡) = ∑∞
𝑘=0 𝑓 (𝑘𝑇 )𝛿 (𝑘 − 𝑘𝑇 ) (2)

Taking the Laplace transform of each side of equation 2:


𝐹 ∗ (𝑠) = ℒ [𝑓 ∗ (𝑡)] = ∑∞
𝑘=0 𝑓 (𝑘𝑇 )𝑒
−𝑘𝑇𝑠
(3)

When we defined the z-transform in the previous topic we had simply said that z was a suitably well-behaved complex variable.
If we are now more specific and define z as follows:
𝑧 = 𝑒 𝑇𝑠 (4)

which is a suitably well-behaved complex variable, then equation 3 becomes:


𝐹 ∗ (𝑠)|𝑧=𝑒 𝑇𝑠 = ∑∞
𝑘=0 𝑓 (𝑘𝑇 )𝑧
−𝑘
≡ 𝐹(𝑧) by definition (5)

The ADC can thus be modelled as an ideal sampler represented by using the z-transform of the continuous input function, i.e.
∑∞
𝑘=0 𝑓 (𝑘𝑇 )𝑧
−𝑘
= 𝐹 (𝑧) = 𝑍[𝑓 (𝑡)] = ℒ[𝑓 ∗ (𝑡)|𝑧=𝑒 𝑇𝑠 ] = 𝐹 ∗ (𝑠)|𝑧=𝑒 𝑇𝑠 (6)

The significance of the variable z is as follows:


 z = unit advance operator: advance by one sample period.
 z-1 = unit delay operator: delay be one sample period.

Effects of sampling
In equation (4) we related the s-plane (representing a continuous function) with the z-plane (representing the sampled version
of the function) by:
𝑧 = 𝑒 𝑇𝑠 where T is the sampling period.

This represents a mapping of the s-plane onto the z-plane. Suppose 𝑠 = 𝜎 + 𝑗𝜔 in the s-plane, then:
𝑧 = 𝑒 𝑇𝑠 = 𝑒 𝑇(𝜎+𝑗𝜔 ) = 𝑒 𝜎𝑇 𝑒 𝑗𝜔𝑇 (7)

Thus |𝑧| = 𝑒 𝜎𝑇 and arg 𝑧 = ∠𝜔𝑇 𝑟𝑎𝑑𝑖𝑎𝑛𝑠 (8)


1 1
Equivalently 𝑧 = 𝑒 𝑇𝑠 → 𝑠 = ln|𝑧| 𝑒 𝑗∠𝑧 = (ln|𝑧| + 𝑗∠𝑧)
𝑇 𝑇

ln|𝑧| (∠𝑧)
Thus 𝜎= and 𝜔 = (9)
𝑇 𝑇

Example 6.1
For 𝑇 = 1 second what is the mapping of the point 𝑠 = −1 + 𝑗 to the z-plane:

𝜎 = −1 and 𝜔 = 1
Therefore |𝑧| = 𝑒 −1 = 0.368 and ∠𝑧 = 1𝑟𝑎𝑑 or 57°

Therefore point is (0.368(cos 57° ), sin 57° ) = (0.199, 0.310)

As a check do the reverse operation:


1 1
𝑠 = 𝑇 (ln|𝑧| + 𝑗∠𝑧) = 𝑇 (ln 0.368 + 𝑗1) = −1 + 𝑗

47
Aliasing
From equation (7):
2𝑛𝜋
𝑧 = 𝑒 𝜎𝑇 𝑒 𝑗𝜔𝑇 = 𝑒 𝜎𝑇 𝑒 𝑗(𝜔𝑇±2𝑛𝜋) = 𝑒 𝜎𝑇 𝑒 𝑗(𝜔± )𝑇
𝑇 = 𝑒 𝜎𝑇 𝑒 𝑗(𝜔±𝑛𝜔𝑠 )𝑇 (10)
2𝜋
where 𝜔𝑠 = rad/s is the sampling frequency.
𝑇

Thus from equation (10), points 𝑠 = 𝜎 ± 𝑗(𝜔 + 𝑛𝜔𝑠 ) in the s-plane, 𝑛 = 0, 1, 2, ⋯ map into the same point z in the z-plane (a
many to one mapping). These sets of s-values represent strips in the s-plane which are:
1. parallel to the real s-axis.
𝜔 𝜔
2. Symmetrical about the primary strip defined by − 𝑠⁄2 ≤ 𝜔 ≤ 𝑠⁄2 as illustrated in figure 6.3.

Im

𝑗5𝜔𝑠⁄ Im
2
COMPLIMENTARY STRIP X
𝑗3𝜔𝑠⁄
2 X
COMPLIMENTARY STRIP X 𝑗𝜔𝑠⁄
2
PRIMARY STRIP X Re Re
0
0
−𝑗𝜔𝑠⁄
COMPLIMENTARY STRIP X
2

−𝑗3𝜔𝑠⁄
COMPLIMENTARY STRIP X 2
−𝑗5𝜔𝑠⁄
2
S-PLANE Z-PLANE

Figure 6.3
𝜔
Hence to avoid aliasing we require 𝑠⁄2 ≥ ℎ𝑖𝑔ℎ𝑠𝑒𝑡𝑠𝑡 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 in the sampled signal, i.e.
𝜔𝑠 ≥ 𝑡𝑤𝑖𝑐𝑒 𝑡ℎ𝑒 ℎ𝑖𝑔ℎ𝑒𝑠𝑡 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 in the sampled signal. (11)

The requirement that 𝜔𝑠 be at least twice as large as the highest frequency (Nyquist frequency) contained in the sampled signal
is known as the sampling theorem. Filtering of the signal before sampling is often required to ensure that the requirements of
the sampling theorem are met. An example of aliasing is shown in figure 6.4.

Actual signal

Aliased signal

0 T 2T

Figure 6.4

If a signal is sampled at intervals of T seconds, it is seen that another frequency with the same set of samples as the original
exists. Thus, the frequency component can be mistaken for another frequency component and this is what aliasing is about.

Primary strip mapping


Consider the primary strip described in the previous section. From equation (8) we have:
|𝑧| = 𝑒 𝜎𝑇 and ∠𝑧 = ∠𝜔𝑇 𝑟𝑎𝑑𝑖𝑎𝑛𝑠

1. For 𝜎 = 0, then 𝑠 = 𝑗𝜔 → |𝑧| = 1 thus the imaginary s-axis maps into the unit circle in the z-plane.
2. For 𝜎 < 0, then 𝑠 = −|𝜎| + 𝑗𝜔 → |𝑧| = 𝑒 −|𝜎|𝑇 < 1 thus the LH s-plane maps into the interior of the unit z-circle.
48
3. For 𝜎 > 0, then 𝑠 = |𝜎| + 𝑗𝜔 → |𝑧| = 𝑒 |𝜎|𝑇 > 1 thus the RH s-plane maps into the exterior of the unit z-circle.

This is illustrated in figure 6.5.

Im
Im

𝑧 = 𝑒 𝑇𝑠
Unit circle

PRIMARY Re Re
STRIP

S-PLANE Z-PLANE

Figure 6.5

Quantization errors
The analogue-to-digital conversion operation of an ADC has finite resolution due to the finite word-length of its internal register
this being typically 8,10,12 or 16 bits. This introduces quantization errors into the control system. We will assume that the
ADC has been chosen so that its resolution is sufficiently high so as not to impair system accuracy or be incompatible with the
accuracy of the measurement sensors. The ADC also performs the conversion operation in a finite, non-zero time. This may
depend on the number of bits and the technology used. Again, we will assume that the ADC has been suitably selected such
that this conversion time is negligible.

Modelling the DAC (extrapolation)


The purpose of a digital-to-analogue converter (DAC) in a sampled data system is to convert the sequence of numbers {𝑢(𝑘)}
from the control algorithm into a continuous control action to be applied to the process. This action is also called data
extrapolation. The simplest form of DAC consists essentially of a latch register which is updated every T seconds with the new
control value resulting from the latest result of the control algorithm. The value is held in the register and applied as a constant
to the process until it is updated. This type of DAC is called a zero-order hold (ZOH). For a ZOH, the input is the sequence
{𝑢(𝑘𝑇)} from the computer and the output is the continuous control action 𝑢(𝑡). This is illustrated in figure 6.6.

OUTPUT
U(t)

U(4T)
U(0)
U(T) U(3T)
U(2T) U(5T)

t
0 T 2T 3T 4T 5T 6T

Figure 6.6.

The DAC algorithm is basically this:


1. At 𝑡 = 0, the computer writes value 𝑢(0) to the DAC register. This value then remains in the register and is output to the
process until updated at 𝑡 = 𝑇, i.e. DAC output 𝑢(𝑡) = 𝑢(0)1(𝑡) for 0 ≤ 𝑡 ≤ 𝑇 where 1(𝑡) represents a unit step at time
𝑡 = 0.
2. At 𝑡 = 𝑇, the computer replaces this value 𝑢(0) in the DAC register with the newly calculated value of 𝑢(𝑇), i.e it removes
the previous 𝑢(0)1(𝑡) with a negative step equal to −𝑢(0)1(𝑡 − 𝑇) and replaces it with 𝑢(𝑇)1(𝑡 − 𝑇).
3. Repeat step 2 for 𝑡 = 2𝑇, 3𝑇, ⋯

49
This process of removing the previous value and then applying the new current value gives the following continuous output:
𝑢(𝑡) = 𝑢(0)[1(𝑡) − 1(𝑡 − 𝑇)] + 𝑢(𝑇)[1(𝑡 − 𝑇) − 1(𝑡 − 2𝑇)] + 𝑢(2𝑇)[1(𝑡 − 2𝑇) − 1(𝑡 − 3𝑇)] + ⋯ (12)

Taking the Laplace transform of each side with zero initial conditions:
1 𝑒 −𝑇𝑠 𝑒 −𝑇𝑠 𝑒 −2𝑇𝑠 𝑒 −2𝑇𝑠 𝑒 −3𝑇𝑠
𝑈 (𝑠 ) = 𝑢 (0 ) [ 𝑠 − ] + 𝑢 (𝑇 ) [ − ] + 𝑢(2𝑇) [ − ]+⋯
𝑠 𝑠 𝑠 𝑠 𝑠

1−𝑒 −𝑇𝑠 1−𝑒 −𝑇𝑠 1−𝑒 −𝑇𝑠


𝑈 (𝑠 ) = 𝑢 (0 ) [ ] + 𝑢 (𝑇 ) [ ] 𝑒 −𝑇𝑠 + 𝑢(2𝑇) [ ] 𝑒 −2𝑇𝑠 + ⋯
𝑠 𝑠 𝑠

1−𝑒 −𝑇𝑠
𝑈 (𝑠 ) = ( ) [𝑢(0) + 𝑢(𝑇)𝑒 −𝑇𝑠 + 𝑢(2𝑇)𝑒 −2𝑇𝑠 + ⋯ ] (13)
𝑠

1−𝑒 −𝑇𝑠
Thus 𝑈 (𝑠 ) = ( ) 𝑈 ∗ (𝑠 )
𝑠

ZOH
{𝑢(𝑘)} 𝑢 (𝑡 )
From algorithm 𝐺0 (𝑠) To process
𝑈 ∗ (𝑠) 𝑈(𝑠)

Figure 6.7

Thus, the transfer function of a ZOH DAC is


1−𝑒 −𝑇𝑠
𝐺0 (𝑠) = (14)
𝑠

Occasionally, other more complex forms of DAC are used; these include the first-order hold but we are going to restrict
ourselves to the ZOH during the remainder of this course.

Modelling a sampled process


This section brings the material from the previous two sections together in the form of a closed-loop sampled data system.
These are closed loop systems with a discrete time controller and a continuous time process which is being controlled. The
section shows how these mixed systems can combine into discrete-time transfer function.

Consider the process 𝐺(𝑠) shown in figure 6.8 which has a sampled input 𝑢∗ (𝑡) and output 𝑦(𝑡) which is also sampled. The
sampling period is T seconds and the input and output are considered to be sampled simultaneously.

Sampling period, T sec

𝑢 (𝑡 ) 𝑢 ∗ (𝑡 ) 𝑦 (𝑡 ) 𝑦 ∗ (𝑡 )
𝐺 (𝑠 )
𝑈(𝑠) 𝑈 ∗ (𝑠) 𝑌(𝑠) 𝑌 ∗ (𝑠)

Figure 6.8

Then,
𝑢∗ (𝑡) = ∑∞
𝑛=0 𝑢 (𝑛𝑇 )𝛿 (𝑡 − 𝑛𝑇 ) a sequence of impulses at 𝑡 = 0, 𝑇, 2𝑇, ⋯

𝑢∗ (𝑡) = 𝑢(0)𝛿(𝑡) + 𝑢(𝑇)𝛿 (𝑡 − 𝑇) + 𝑢(2𝑇)𝛿(𝑡 − 2𝑇) + ⋯

Suppose 𝑔(𝑡) = ℒ −1 [𝐺(𝑠)], i.e. 𝑔(𝑡) is the impulse response of the process.

Then by the definition of 𝑔(𝑡):


input 𝛿(𝑡) produces the output 𝑔(𝑡)
input 𝛿(𝑡 − 𝑇) produces the output 𝑔(𝑡 − 𝑇)
input 𝛿(𝑡 − 2𝑇) produces the output 𝑔(𝑡 − 2𝑇)

50
Thus, since the process is linear, we can add the outputs resulting from the separate input components in 𝑢(𝑡) to get 𝑦(𝑡), i.e.
input
𝑢∗ (𝑡) = 𝑢(0)𝛿(𝑡) + 𝑢(𝑇)𝛿 (𝑡 − 𝑇) + 𝑢(2𝑇)𝛿(𝑡 − 2𝑇) + ⋯

produces output:
𝑦(𝑡) = 𝑢(0)𝑔(𝑡) + 𝑢(𝑇)𝑔(𝑡 − 𝑇) + 𝑢(2𝑇)𝑔(𝑡 − 2𝑇) + ⋯

So, at the k-th sampling instant,


𝑦(𝑘𝑇) = 𝑢(0)𝑔(𝑘𝑇) + 𝑢(𝑇)𝑔(𝑘𝑇 − 𝑇) + 𝑢(2𝑇)𝑔(𝑘𝑇 − 2𝑇) + ⋯ (15)

Now, 𝑈 (𝑧) = ∑∞
𝑛=0 𝑢 (𝑛𝑇 )𝑧
−𝑛
is the z-transform of input u(t).

Define 𝐺 (𝑧) = ∑∞
𝑛=0 𝑔(𝑛𝑇 )𝑧
−𝑛
as the z-transform of 𝑔(𝑡). (16)

Then
𝐺 (𝑧)𝑈(𝑧) = [𝑔(0) + 𝑔(𝑇)𝑧 −1 + 𝑔(2𝑇)𝑧 −2 + ⋯ ][𝑢(0) + 𝑢(𝑇)𝑧 −1 + 𝑢(2𝑇)𝑧 −2 + ⋯ ]
= 𝑔(0)𝑢(0) + [𝑢(0)𝑔(𝑇) + 𝑢(𝑇)𝑔(0)]𝑧 −1 + ⋯
= 𝑦(0) + 𝑦(𝑇)𝑧 −1 + 𝑦(2𝑇)𝑧 −2 + ⋯
= 𝑌 (𝑧 )

Thus 𝐺(𝑧) can be regarded as the z-transform block of the process where
𝐺 (𝑧) = 𝑍[𝑔(𝑡)] = 𝑍{ℒ −1 [𝐺 (𝑠)]} for 𝑡 = 𝑘𝑇. (17)

The corresponding z-transform block diagram is shown in figure 6.9.

𝑈(𝑧) 𝑌(𝑧)
G(z)

Figure 6.9

Note that 𝐺(𝑧) is not 𝐺(𝑠) evaluated for 𝑠 = 𝑧. It is the z-transfer function of the process 𝐺(𝑠) with sampled input and output
and is found as follows:
1. Find 𝑔(𝑡) = ℒ −1 [𝐺 (𝑠)].
2. Put 𝑡 = 𝑘𝑇 to give a sequence {𝑔(𝑘𝑇)}.
3. Find 𝑍{𝑔(𝑘𝑇)} = 𝐺 (𝑧).

In practice, step 2 can be omitted and step 3 done directly from a table of z-transfer functions.

Example 6.2
1
Consider 𝐺 (𝑠) = 𝑠(𝑠+1)

The above steps are:


1 1 1
1. 𝑔(𝑡) = ℒ −1 [ ] = ℒ −1 [ − ] = 1 − 𝑒 −𝑡
𝑠(𝑠+1) 𝑠 𝑠+1

2. {𝑔(𝑘𝑡)} = {1 − 𝑒 −𝑘𝑡 } = 0, 1 − 𝑒 −𝑇 , 1 − 𝑒 −2𝑇 , ⋯

𝑧 𝑧 𝑧(1−𝑒 −𝑇 )
3. 𝐺 (𝑧) = 𝑍{1 − 𝑒 −𝑘𝑡 } = 𝑍{1} − 𝑍{𝑒 −𝑘𝑡 } = 𝑧−1 − 𝑧−𝑒 −𝑇 = (𝑧−1)(𝑧−𝑒 −𝑇 )

Alternatively step 2 can be omitted by going directly from step 1 to 3 thus:


1 1 𝑧 𝑧 𝑧(1−𝑒 −𝑇 )
𝐺 (𝑧) = 𝑍 [𝑠 ] − 𝑍 [𝑠+1] = 𝑧−1 − 𝑧−𝑒 −𝑇 = (𝑧−1)(𝑧−𝑒 −𝑇 )
to give the same answer.

51
Alternative approach
An alternative approach to that described above is:

Starting with equation (15):


𝑦(𝑘𝑇) = 𝑢(0)𝑔(𝑘𝑇) + 𝑢(𝑇)𝑔(𝑘𝑇 − 𝑇) + 𝑢(2𝑇)𝑔(𝑘𝑇 − 2𝑇) + ⋯ + 𝑢(𝑘𝑇)𝑔(0)

Take the Laplace transform of the sampled output:


𝑌 ∗ (𝑠) = [𝑢(0)𝐺 ∗ (𝑠) + 𝑢(𝑇)𝑒 −𝑇𝑠 𝐺 ∗ (𝑠) + 𝑢(2𝑇)𝑒 −2𝑇𝑠 𝐺 ∗ (𝑠) + ⋯ ]
= [𝑢(0) + 𝑢(𝑇)𝑒 −𝑇𝑠 + 𝑢(2𝑇)𝑒 −2𝑇𝑠 + ⋯ ]𝐺 ∗ (𝑠)
= 𝑈 ∗ (𝑠)𝐺 ∗ (𝑠)

Now, 𝑌 (𝑠) = 𝐺 (𝑠)𝑈 ∗ (𝑠) from the first diagram, so


𝑌 ∗ (𝑠) = [𝐺 (𝑠)𝑈 ∗ (𝑠)]∗ = 𝐺 ∗ (𝑠)𝑈 ∗ (𝑠) (18)

Since from equation (6) we have 𝑌 (𝑧) = 𝑌 ∗ (𝑠)|𝑧=𝑒 𝑇𝑠 we can write


If 𝑌(𝑠) = 𝐺 (𝑠)𝑈 ∗ (𝑠) then 𝑌 (𝑧) = 𝐺 (𝑧)𝑈(𝑧) (19)

This form is useful for block diagram analysis and simplification.

ZOH + continuous process


The particular case of a zero-order hold (ZOH) interfacing a digital algorithm output to a continuous process is shown in figure
6.10.

T sec
𝑈(𝑧) 𝑌(𝑧)
ZOH Process 𝐺(𝑧)
𝑢 (𝑘 ) 𝑦 (𝑘 )
𝐺0 (𝑠) 𝐺𝑝 (𝑠)

Figure 6.10

Then if 𝐺(𝑧) is the transfer function of the ZOH + process, from equation (17):
𝐺 (𝑧) = 𝑍{ℒ −1 [𝐺0 (𝑠)𝐺𝑝 (𝑠)]}

or using the TF of a ZOH obtained in the previous section, then


1−𝑒 −𝑇𝑠 𝐺𝑝(𝑠) 𝐺𝑝 (𝑠)𝑒 −𝑇𝑠
𝐺 (𝑧) = 𝑍 {ℒ −1 [ 𝐺𝑝 (𝑠)]} = 𝑍 {[ − ]}
𝑠 𝑠 𝑠

𝐺𝑝 (𝑠) 𝐺𝑝 (𝑠)𝑒 −𝑇𝑠


Note that if ℒ −1 [ ] = 𝑔 (𝑡 ) then ℒ −1 [ ] = 𝑔(𝑡 − 𝑇), i.e. 𝑔(𝑡) delayed by T.
𝑠 𝑠

Thus 𝐺 (𝑧) = 𝑍{𝑔(𝑘𝑇) − 𝑔(𝑘𝑇 − 𝑇)} = 𝑍{𝑔(𝑡)} − 𝑧 −1 𝑍{𝑔(𝑡)} = (1 − 𝑧 −1 )𝑍{𝑔(𝑡)}

(𝑧−1) 𝐺𝑝 (𝑠)
So 𝐺 (𝑧) = 𝑍{ } (20)
𝑧 𝑠

which can be evaluated using the z-transform tables.

Example 6.3
1
Find 𝐺(𝑧) when 𝐺𝑝 (𝑠) = 𝑠+1

For this process preceded by a ZOH, from equation (20) we have


(𝑧−1) 𝐺𝑝 (𝑠) (𝑧−1) 1 (𝑧−1) 1 1
𝐺 (𝑧 ) = 𝑍{ }= 𝑍{ }= 𝑍{ − }
𝑧 𝑠 𝑧 𝑠(𝑠+1) 𝑧 𝑠 𝑠+1

(𝑧−1) 𝑧 𝑧 (𝑧−1) 𝑧(1−𝑒 −𝑇 ) 1−𝑒 −𝑇


𝐺 (𝑧 ) = (𝑧−1 − 𝑧−𝑒 −𝑇 ) = ((𝑧−1)(𝑧−𝑒 −𝑇 )) = 𝑧−𝑒 −𝑇
𝑧 𝑧

52
Process with a time lag
In the above analysis, if the process includes a lag (or dead-time or transport delay) of 𝑛𝑇 seconds (i.e. n sample periods),
where n is an integer, then the transfer function of the process is of the form 𝑒 −𝑛𝑇𝑠 𝐺𝑝 (𝑠). If a zero-order hold is placed in front
of this process, the combined 𝐺(𝑧) is:
(𝑧−1) 𝑒 −𝑛𝑇𝑠 𝐺𝑝 (𝑠) (𝑧−1) 𝐺𝑝 (𝑠)
𝐺 (𝑧 ) = 𝑍{ }= 𝑧 −𝑛 𝑍 { }
𝑧 𝑠 𝑧 𝑠
(𝑧−1) 𝐺𝑝 (𝑠)
= 𝑍{ } (21)
𝑧 𝑛+1 𝑠

If the time lag is not an integer number of sampling periods then a slightly more complicated analysis is needed which will not
be covered here. However, in many practical control problems the sample time can be chosen to ensure that the time lag is an
integer number of sample times.

Example 6.4
3𝑒 −2𝑠
Find 𝐺(𝑧) when 𝐺𝑝 (𝑠) = , i.e. the process includes a time lag of 2 sampling periods and 𝑇 = 1 second.
𝑠+1

(𝑧−1) 3 (𝑧−1) 3𝑧(1−𝑒 −1 ) 3(0.632) 1.896


𝐺 (𝑧 ) = 𝑍 {𝑠+1} = ((𝑧−1)(𝑧−𝑒 −1) ) = 𝑧 2(𝑧−0.368) = 𝑧 2(𝑧−0.368)
𝑧3 𝑧3

Block diagram rules


The rules to be followed for block diagrams in sampled data systems are illustrated in figure 6.11.

𝑈(𝑠) 𝑈 ∗ (𝑠) 𝑌(𝑠) 𝑌 ∗ (𝑠) 𝑈(𝑧) 𝑌(𝑧)


𝐺(𝑠) 𝐺(𝑧)

a) SAMPLED PROCESS

𝑈(𝑠) 𝑈 ∗ (𝑠) 𝑌(𝑠) 𝑌 ∗ (𝑠) 𝑈(𝑧) 𝑌(𝑧)


𝐺1 (𝑠) 𝐺2 (𝑠) 𝐺1 𝐺2 (𝑧)

b) CASCADED PROCESSES

𝑋 ∗ (𝑠)
𝑈(𝑠) 𝑈 ∗ (𝑠) 𝑌(𝑠) 𝑌 ∗ (𝑠) 𝑈(𝑧) 𝑌(𝑧)
𝐺1 (𝑠) 𝐺2 (𝑠) 𝐺1 (𝑧)𝐺2(𝑧)
𝑋(𝑠)

c) CASCADED SAMPLERS

Figure 6.11.

In (a), 𝑌(𝑠) = 𝐺 (𝑠)𝑈 ∗ (𝑠) so equation (18) gives 𝑌 ∗ (𝑠) = 𝐺 ∗ (𝑠)𝑈 ∗ (𝑠), i.e., 𝑌 (𝑧) = 𝐺 (𝑧)𝑈(𝑧)

In (b), 𝑌 (𝑠) = 𝐺1 (𝑠)𝐺2 (𝑠)𝑈 ∗ (𝑠) which gives 𝑌 ∗ (𝑠) = [𝐺1 𝐺2 (𝑠)]∗ 𝑈 ∗ (𝑠), i.e., 𝑌(𝑧) = 𝐺1 𝐺2 (𝑧)𝑈(𝑧)

In (c), 𝑌(𝑠) = 𝐺2 (𝑠)𝑋 ∗ (𝑠), i.e., 𝑌 ∗ (𝑠) = 𝐺2 ∗ (𝑠)𝑋 ∗ (𝑠)

and 𝑋(𝑠) = 𝐺1 (𝑠)𝑈 ∗ (𝑠), i.e., 𝑋 ∗ (𝑠) = 𝐺1 ∗ (𝑠)𝑈 ∗ (𝑠)

hence 𝑌 ∗ (𝑠) = 𝐺1 ∗ (𝑠)𝐺2 ∗ (𝑠)𝑈 ∗ (𝑠), i.e., 𝑌(𝑧) = 𝐺1 (𝑧)𝐺2 (𝑧)𝑈(𝑧)

Using these rules, a sampled-data system can be reduced correctly to z-transfer block diagrams and simplified as required.

53
Closed loop block diagrams
A complete closed loop, sampled data system is shown in figure 6.12. Although this is a commonly used configuration, and
the one used on this course, it is not the only one. The object of this section is to use the sampling rules discussed so far to
reduce the overall system to a single block with a z-transfer function 𝐹(𝑧). The digital algorithm is represented as 𝐷 ∗ (𝑠).

ALGORITHM ZOH PROCESS


𝑅 (𝑠 ) 𝐸 (𝑠 ) 𝐸 ∗ (𝑠 ) 𝐷 ∗ (𝑠 )
∗(
𝑈 𝑠) 𝑌 (𝑠 ) 𝑌 ∗ (𝑠 )
𝐺0 (𝑠) 𝐺𝑝 (𝑠)

𝐺 (𝑧 )
𝐵 (𝑠 )
𝐻 (𝑠 )

𝑅 (𝑧 ) 𝑌 (𝑧 )
𝐹 (𝑧 )

Figure 6.12

Then,

𝑌(𝑠) = 𝐺0 𝐺𝑝 (𝑠)𝑈 ∗ (𝑠), i.e., 𝑌 ∗ (𝑠) = [𝐺0 𝐺𝑝 (𝑠)] 𝑈 ∗ (𝑠)
𝑈 ∗ (𝑠 ) = 𝐷 ∗ (𝑠 ) ∗ 𝐸 ∗ (𝑠 )

𝐸 (𝑠 ) = 𝑅 (𝑠 ) − 𝐵 (𝑠 )
𝐸 (𝑠) = 𝑅 (𝑠) − 𝐺0 𝐺𝑝 (𝑠)𝐻(𝑠)𝑈 ∗ (𝑠)

That is,

𝐸 ∗ (𝑠) = 𝑅 ∗ (𝑠) − [𝐺0 𝐺𝑝 𝐻(𝑠)] 𝑈 ∗ (𝑠)

𝐸 ∗ (𝑠) = 𝑅 ∗ (𝑠) − [𝐺0 𝐺𝑝 𝐻(𝑠)] 𝐷∗ (𝑠)𝐸 ∗ (𝑠)

Thus
1
𝐸 ∗ (𝑠 ) = ∗ 𝑅 ∗ (𝑠 )
1+[𝐺0 𝐺𝑝 𝐻(𝑠)] 𝐷∗ (𝑠)

1
𝐸 (𝑧) = 1+𝐷(𝑧)𝐺 𝑅 (𝑧 ) (22)
0 𝐺𝑝 𝐻(𝑧)

and finding 𝑌 ∗ (𝑠) similarly, we have


𝐷(𝑧)𝐺0𝐺𝑝 𝐻(𝑧) 𝐷(𝑧)𝐺(𝑧)
𝑌 (𝑧 ) = 𝑅 (𝑧 ) = 𝑅 (𝑧 ) (23)
1+𝐷(𝑧)𝐺0 𝐺𝑝 𝐻(𝑧) 1+𝐷(𝑧)𝐺0 𝐺𝑝 𝐻(𝑧)

Hence, if 𝑌(𝑧) = 𝐹(𝑧)𝑅(𝑧) we have


𝐷(𝑧)𝐺(𝑧)
𝐹 (𝑧 ) = (24)
1+𝐷(𝑧)𝐺0𝐺𝑝 𝐻(𝑧)

For a unity feedback system,


𝐷(𝑧)𝐺(𝑧)
𝐹(𝑧) = 1+𝐷(𝑧)𝐺(𝑧) (25)

Chapter 6 Tutorial Questions


1. Determine the points in the z-plane which correspond to the following s-plane points under the mapping z = e 0.5s.

(i) s = -1 (ii) s = j2 (iii) s = -j2 (iv) s = -1 + j2

Illustrate your answers.

54
2. Find the following z-transforms:

(i) Z t cosωt   
(ii) Z e at
 2 
(iii) Z  
 5 
(iv) Z  
s5  s(s  2) 

3. Determine the TF of a zero-order hold when the sampling frequency is 4 Hz.

4. For the ZOH and process shown find G(z) when G p(s) is:

(i)
4 
G(z) 

2 1  e 2T 

 (ii)
4
s2  z  e 2T  s(s  2)


G(z) 
 
z 2T  e 2T  1  1  e 2T  2Te 2T 


 (z - 1)(z  e 2T ) 

T sec
ZOH Gp(s)

11. Find G(z) for the ZOH and process with a time lag

0.5 sec
ZOH 4e s
s2
 1.264 
G(z)  2 
 z z  0.368 
12. Find the overall transfer function for the sampled-data system shown below:

T sec T sec T sec


+
G1(s) G2(s)
-

G1(s)

 Y(z) G 1 (z)G 2 (z) 


  
 U(z) 1  G 1 (z)G 2 (z)H(z) 

13. Find the transfer function for the system shown below for:

1  0.632  e -3s
(i) G p (s)  F(z)  z  0.264  (ii) G p (s) 
s 1   s 1
 0.632 
F(z)  4 
 z  0.368 z  0.632 
3

T = 1 sec
+
ZOH Gp(s)
-

55
14. In the sampled-data system shown below, find the output y(k) corresponding to a unit step input when:
(i) H(s)  1  
y(k)  0.5 1   0.264k  (ii)

H(s) 
1
 y(k)  1.020.795k sin 51k o 
s

T = 1 sec
+
ZOH Gp(s)
-

H(s)

56

You might also like