You are on page 1of 49

CHE 509: Process Dynamics

MODULE 7:
Analysis of Discrete (Sampled-Data) Systems

Ayorinde Bamimore, Ph.D.


Department of Chemical Engineering
Obafemi Awolowo University
Module Objectives

▪ To be able to define discrete (sampled-


data systems,
▪ Illustrate, through block diagram, signal
propagation in direct digital control (DDC),
and
▪ Analyze discrete systems

Obafemi Awolowo University 2


Chemical Engineering
What are Discrete (Sampled-Data) Systems?

Definition: A discrete system is the one in which the state


variables change only at a discrete set of points in time.

In our earlier engagements, we have been dealing with


continuous systems, systems whose state variables change
continuously over time.

Discrete systems are usually modeled using difference


equations unlike their continuous counterpart that are
modeled using differential equations;

Obafemi Awolowo University 3


Chemical Engineering
Why Studying Discrete (Sampled-Data) Systems?

▪ Digital computer used for Direct Digital control (DDC)


can only accept and output discrete data. It cannot
process continuous data.
▪ Some measuring instruments delivered their readings
in sampled time, e.g composition analyzer.

Obafemi Awolowo University 4


Chemical Engineering
Analogies Between Different Methods Of Dynamical
System Analysis and Languages

Dynamical System Analysis Language


Differential equation(t) English
Laplace Transform(s) Russian
z-Transform(z) French
Frequency-domain(w) Chinese

Obafemi Awolowo University 5


Chemical Engineering
Sampling and Signal Reconstruction

Closed-loop block diagram for implementing direct digital control (DDC)

Fig. 7.1: Simplified block diagram for computer control

Obafemi Awolowo University 6


Chemical Engineering
Direct Digital Control (DDC)

The following steps are repeated at every sampling time in DDC:


1 The measuring instruments reads process output and delivers its
reading in analog.
2. The ADC module converts it from analog to digital
3. The signal from ADC is subtracted from the setpoint to produce error,
4. The digital controller processes the error and output the control signal
to drive the process in digital form,
5. The DAC module converts the signal from Digital to analog mode
6. The final control elements implement the decision of the digital
controller on the process.
7. Go to step 1.

Obafemi Awolowo University 7


Chemical Engineering
Direct Digital Control (DDC)

N.B.:
▪ A control system is as good as its measuring
instruments,
▪ The controller is the heart of any control system
▪ The final control elements are usually control valve,
pump, etc.

Obafemi Awolowo University 8


Chemical Engineering
ADC (analog-to-digital) Converter

This is the device that carries out the conversion of a continuous signal to
digital form.

Figure 7.2 explains what happens during sampling.


1. The sampler converts the continuous signal y(t) into
discrete/sampled signal y*(t),
2. The sampled signal y*(t) is a series of impulses
corresponding to the measurements y(0), y(1), y(2), ……..
at the sampling instants t=0, ∆𝑡, 2∆𝑡, … (as shown in Fig.7.2
b)
3. The sampled signal y*(t) is assigned its corresponding digital
value.
Obafemi Awolowo University 9
Chemical Engineering
ADC (analog-to-digital converter)

where:
∆𝑡 =Sampling period refers to the time interval
between successive samples.
1
𝑓𝑠 = = sampling or scan rate (cycles/time)
∆𝑡
2𝜋
𝜔𝑠 = = sampling frequency (radians/time)
∆𝑡

Fig.7.2: Idealized periodic sampling

Obafemi Awolowo University 10


Chemical Engineering
DAC (digital-to-analog) Converter

This is a device which changes series of pulses (from the


digital computer or controller) into a continuous signal.
The device in DAC for converting digital (pulsed) signal into
stair case function yH(t) is called zero-order hold(ZOH).
The output from the zero-order hold, yH(t) is held constant for
one sampling period until the next sample is received.
Mathematically, this can be expressed as:

yH(t)=y(k−1) for 𝒕𝒌−𝟏 ≤ 𝒕 < 𝒕𝒌 (7.1)

Obafemi Awolowo University 11


Chemical Engineering
DAC (digital-to-analog) Converter

Fig.7.3: Digital-to-analog conversion using a zero-order hold

Obafemi Awolowo University 12


Chemical Engineering
Choosing Sampling Period (𝚫𝒕)

How frequently should we sample?


The choice of sampling period for any system is not straightforward.
The selection of sampling period is more of an art than science.
For example:
1. Sampling too quickly: The sampled signal, y*(t) very closely
resembles the continuous signal, y(t); but this will obviously require
a large number of samples and a large amount of data storage.
2. Sampling too slowly: In this case, fewer samples will be
taken, and as a result, there will be no unusually heavy burden on
the computer. However, the main problem is that y*(t) may no
longer resemble the original, continuous signal, y(t). This problem
is known as “aliasing”

Obafemi Awolowo University 13


Chemical Engineering
Illustrating Aliasing

Aliasing refers to misidentification of signal frequency as a result of


sampling too slowly thereby introducing distortion or error.
Aliasing can be eliminated by using an anti-aliasing filter.

Fig.7.4: Aliasing error due to sampling too slowly


Obafemi Awolowo University 14
Chemical Engineering
Guidelines for Selecting Sampling Period

Some rules of thumb have been proposed by Astrom and


Wittenmark
For the computer control hardware
Sampling time=(typically 1 sec or less)
For the control algorithm
∆𝒕
𝟎. 𝟎𝟏 ≤ ≤ 𝟎. 𝟎𝟓 (7.2a)
𝝉𝒅𝒐𝒎
𝝉𝒔 𝝉𝒔
≤ ∆𝒕 ≤ (7.2b)
𝟏𝟓 𝟔
where
𝜏𝑑𝑜𝑚 = dominant time constant
𝜏𝑠 = settling time

Obafemi Awolowo University 15


Chemical Engineering
z-Transform Analysis of Discrete-Time Systems

The sampled signal y*(t) is a series of


impulses corresponding to the
measurements y(0), y(1), y(2), …….. at the
sampling instants t=0, ∆𝑡, 2∆𝑡, … (as shown in
Fig.7.2 b&c)

Fig.7.2: Idealized periodic sampling

Obafemi Awolowo University 16


Chemical Engineering
z-Transform Analysis of Discrete-Time Systems

The equation for the entire train of impulses is:


y*(t)=𝑦(0)𝛿 (𝑡) + 𝑦(Δ𝑡)𝛿 (𝑡 − Δ𝑡) + 𝑦(2Δ𝑡)𝛿 (𝑡 − 2Δ𝑡) + ⋯ (7.3)

(7.4)

y (t) = ∑ 𝑦(kΔ𝑡)𝛿 (𝑡 − 𝑘Δ𝑡)
𝒌=𝟎

Taking Laplace Transform (and recalling t-shifting theorem) gives:


y*(s)=𝑦(0)(1) + 𝑦(Δ𝑡)𝑒 −Δ𝑡𝑠 + 𝑦(2Δ𝑡)𝑒 −2Δ𝑡𝑠 + ⋯ (7.5)

(7.6)
y ∗ (s) = ∑ 𝑦(kΔ𝑡)𝑒 −𝑘Δ𝑡𝑠
𝒌=𝟎

Obafemi Awolowo University 17


Chemical Engineering
z-Transform analysis of discrete-time systems

Define the z-transform variable of z as:

𝑧 = 𝑒 Δ𝑡𝑠 (7.7)

Eq.(7.6) can then be written as:



(7.8)
∗ −𝑘
y(z) = ℤ{y (t)} = ∑ 𝑦(k)𝑧
𝒌=𝟎

N.B.: Eq.7.8 is the definition of z-Transform.

Obafemi Awolowo University 18


Chemical Engineering
Worked Example 1

Example 1: Determine the z-transform for a unit step function.


Given: u(t)=1 (In continuous time)
The discrete form of the function (put t as 𝐤𝚫𝒕): u(k) =u*(t)=1
Recall,

(7.8)
∗ −𝒌
𝐟(𝐳) = ℤ{𝐟 (𝐭)} = ∑ 𝐟(𝐤)𝒛
𝒌=𝟎

(7.9a)
∗( −𝒌 𝟎 −𝟏 −𝟐 −𝟑
𝐮(𝐳) = ℤ{𝐮 𝐭)} = ∑ 𝟏. 𝒛 =𝒛 +𝒛 +𝒛 +𝒛 +⋯
𝒌=𝟎

u(z)= 𝟏 + 𝒛−𝟏 + 𝒛−𝟐 + 𝒛−𝟑 + ⋯ = (7.9b)


𝒛 𝟏
u(z)= = (7.9c)
𝒛−𝟏 𝟏−𝒛−𝟏

Obafemi Awolowo University 19


Chemical Engineering
Worked Example 2

Example 2: Determine the z-transform of an exponential function.


Given: f(t)=𝒆−𝒂𝒕 (7.10a)
The discrete form of the function is obtained as (by substituting t as kΔ𝑡)
f(k)= f*(t)=𝒆−𝒂𝐤𝚫𝒕 (7.10b)
Recall,

(7.8)
∗ −𝒌
𝐟(𝐳) = ℤ{𝐟 (𝐭)} = ∑ 𝐟(𝐤)𝒛
𝒌=𝟎

(7.10c)
∗ −𝒂𝐤𝚫𝒕 −𝒌
𝐟(𝐳) = ℤ{𝐟 (𝐭) = ∑ 𝒆 .𝒛
𝒌=𝟎
𝐟(𝐳) = 𝟏 + 𝒆 −𝒂𝚫𝒕 −𝟏
.𝒛 + 𝒆−𝟐𝒂𝚫𝒕 . 𝒛−𝟐 + +𝒆−𝟑𝒂𝚫𝒕 . 𝒛−𝟑 + ⋯ (7.11a)
𝐳
𝐟(𝐳) = −𝒂𝚫𝒕 (7.11b)
𝐳−𝒆

Obafemi Awolowo University 20


Chemical Engineering
z-Transforms & Inverse z-Transforms

z-Transform is the analytical tool for discrete systems


Time Arguments
t=continuous time
tk=k=discrete time
Δ𝑡 =sampling time
The function
f(t)=continuous function
f*(t)=The sampled data version of the continuous function, f(t)
f(kΔ𝑡)=f(k)=the value of f(t) at the kth sample point
f(z)= the z-Transform of the sampled signal,

Obafemi Awolowo University 21


Chemical Engineering
z-Transforms & Inverse z-Transforms

z-transform argument
z=the complex z-domain argument which is equivalent to s
z-1=reciprocal of z
z-transform operator
ℤ{. } =z-transform
ℤ−1 {. } =Inverse z-transform
Definition of inverse z-transform

−1 {
1 𝑘
𝑑𝑧
ℤ 𝑓(𝑧)} = 𝑓(𝑘) = ∫ 𝑓(𝑧)𝑧
2𝜋𝑗 𝑧
𝑐

Obafemi Awolowo University 22


Chemical Engineering
Some Useful Theorems of z-Transforms

(1) Translational theorem


1
ℤ{𝑓 (𝑘 − 𝑛)} = 𝑓(𝑧)
𝑧𝑛
Example ℤ{𝑢(𝑘)} = 𝑢(𝑧)
1 −1
ℤ{𝑢(𝑘 − 1)} = 1 𝑢 ( 𝑧 ) = 𝑧 𝑢(𝑧)
𝑧
1
ℤ{𝑦(𝑘 − 3)} = 𝑦(𝑧) = 𝑧 −3 𝑦(𝑧)
𝑧3
(2) Initial value theorem
𝑓(0) = lim 𝑓(𝑧)
𝑧→∞
(3) Final value theorem
(𝑧 − 1)
( )
𝑓 ∞ = lim [ 𝑓(𝑧)]
𝑧→1 𝑧

Obafemi Awolowo University 23


Chemical Engineering
Table of z-Transforms

Table 7.1: Some Standard z-Transforms

Description Time function Laplace z-transform


transform
Unit impulse 𝛿(𝑡) 1 1
Unit step 1(t) 1 𝑧
𝑠 𝑧−1
Exponential 𝑒 −𝑎𝑡 1 𝑧
𝑠+𝑎 𝑧 − 𝑒 −𝑎∆𝑡

Obafemi Awolowo University 24


Chemical Engineering
Conversion from one form to another

Inverse Laplace
Transform Discretize z-Transform
f(s) f(t) f(k) f(z)
Laplace Inverse
Transform z-Transform

Obafemi Awolowo University 25


Chemical Engineering
Worked Example 3

Example 3: Determine the z-transform of a function whose Laplace


1
transform is 𝑓(𝑠) = .
𝑠(𝑠+1)
By resolving into partial fractions, we have:
1 1 1
𝑓 (𝑠 ) = = − (7.12)
𝑠(𝑠+1) 𝑠 𝑠+1
Using Table 7.1, we have:
𝑧 𝑧 𝑧(1−𝑒 −∆𝑡 )
𝑓 (𝑧 ) = − =( (7.13)
𝑧−1 𝑧−𝑒 −∆𝑡 𝑧−1)(𝑧−𝑒 −∆𝑡 )
N.B.:
The value of f(z) in (7.13) depends on the sampling time, ∆𝑡.
Assignment: Evaluate the function for (a) ∆𝑡 = 0.1, (a) ∆𝑡 = 1, (a) ∆𝑡 =
10

Obafemi Awolowo University 26


Chemical Engineering
Worked Example 4

(1−𝑒 −∆𝑡 )𝑧
Example 4: Given 𝑔(𝑧) = (
𝑧−1)(𝑧−𝑒 −∆𝑡 )
Obtain the discrete time transfer function, g(k) using:
(a) Method of partial fractions
(b) Method of long division
Solution
(a) Resolve the given function into partial fractions, we have
(1−𝑒 −∆𝑡 )𝑧 𝑃 𝑄 𝑧 𝑧
𝑔 (𝑧 ) = (𝑧−1)(𝑧−𝑒 −∆𝑡 )
= +( = − (7.15)
(𝑧−1) 𝑧−𝑒 −∆𝑡 ) 𝑧−1 𝑧−𝑒 −∆𝑡
𝑧 𝑧
𝑔 (𝑡 ) = ℤ −1{ − −∆𝑡 } = 1 − 𝑒 −𝑡
(7.16)
𝑧−1 𝑧−𝑒
Next, we need to express g(t) in sampled-data form. Recall,
y*(t)=𝑦(0)𝛿 (𝑡) + 𝑦(Δ𝑡)𝛿 (𝑡 − Δ𝑡) + 𝑦(2Δ𝑡)𝛿 (𝑡 − 2Δ𝑡) + ⋯ (7.3)

Obafemi Awolowo University 27


Chemical Engineering
Worked Example 4

g(k)=g*(t)=(1 − 𝑒 −0 )𝛿 (𝑡) + (1 − 𝑒 −Δ𝑡 )𝛿 (𝑡 − Δ𝑡) + (1 − 𝑒 −2Δ𝑡 )𝛿 (𝑡 −


2Δ𝑡) + ⋯ (7.17)

(7.18)
g(k) = ∑(1 − 𝑒 −Δ𝑡 ) 𝛿 (𝑡 − 𝑘Δ𝑡)
𝒌=𝟎

(b) By the method of long division, we have:

(𝟏−𝒆−∆𝒕 )𝒛 (𝟏−𝒆−∆𝒕 )𝒛
𝒈( 𝒛 ) = ( = (7.19a)
𝒛−𝟏)(𝒛−𝒆−∆𝒕 ) 𝒛𝟐 −(𝟏+𝒆−∆𝒕 )𝒛+𝒆−∆𝒕

Obafemi Awolowo University 28


Chemical Engineering
Worked Example 4

(1 − 𝑒 −∆𝑡 )𝑧 −1 + (1 − 𝑒 −2∆𝑡 )𝑧 −2 + (1 − 𝑒 −3∆𝑡 )𝑧 −3 +..

(1 − 𝑒 −∆𝑡 )𝑧

𝑧 2 − (1 + 𝑒 −∆𝑡 )𝑧 + 𝑒 −∆𝑡 (1 − 𝑒 −∆𝑡 )𝑧 − (1 − 𝑒 −2∆𝑡 ) + (𝑒 −∆𝑡 − 𝑒 −2∆𝑡 )𝑧 −1


0 + (1 − 𝑒 −2∆𝑡 ) − (𝑒 −∆𝑡 − 𝑒 −2∆𝑡 )𝑧 −1
(1 − 𝑒 −2∆𝑡 ) − (1 + 𝑒 −∆𝑡 − 𝑒 −2∆𝑡 − 𝑒 −3∆𝑡 )𝑧 −1 + (𝑒 −∆𝑡 − 𝑒 −3∆𝑡 )𝑧 −2
0 + (1 − 𝑒 −3∆𝑡 )𝑧 −1 − (𝑒 −∆𝑡 − 𝑒 −3∆𝑡 )𝑧 −2
(1 − 𝑒 −3∆𝑡 )𝑧 −1

Thus:
𝑔(𝑧) = (1 − 𝑒 −∆𝑡 )𝑧 −1 + (1 − 𝑒 −2∆𝑡 )𝑧 −2 + (1 − 𝑒 −3∆𝑡 )𝑧 −3 + ⋯ (7.19b)
𝑔(𝑘) = ℤ−1 {𝑔(𝑧)} = (1 − 𝑒 −∆𝑡 )𝛿𝑡 + (1 − 𝑒 −2∆𝑡 )𝛿(𝑡 − 2∆𝑡) + (1 −
𝑒 −3∆𝑡 )𝛿(𝑡 − 3∆𝑡) + ⋯ (7.19c)

(7.19d)
−Δ𝑡
g(k) = ∑(1 − 𝑒 ) 𝛿 (𝑡 − 𝑘Δ𝑡)
𝒌=𝟎

Obafemi Awolowo University 29


Chemical Engineering
Worked Example 5

Example 5: The general form of a first order difference equation is in


the form: 𝑦(𝑘) + 𝑎1 𝑦(𝑘 − 1) = 𝑏1 𝑢(𝑘 − 1). Obtain the discrete transfer
function.
Solution
Continuous time Discrete time

𝜏
𝑑𝑦
+ 𝑦(𝑡) = 𝑘𝑢(𝑡) (i) 𝑦(𝑘) + 𝑎1 𝑦(𝑘 − 1) = 𝑏1 𝑢(𝑘 − 1) (a)
𝑑𝑡
Take z-transform, we have
Take Laplace transform, we have

𝑦(𝑧) + 𝑎1 𝑧 −1 𝑦(𝑧) = 𝑧 −1 𝑏1 𝑢(𝑧) (b)


𝜏𝑠𝑦(𝑠) + 𝑦(𝑠) = 𝑘𝑢(𝑠) (ii)

𝑦(𝑧) 𝑏1 𝑧 −1
𝑔 (𝑠 ) =
𝑦(𝑠)
=
𝑘
(iii) 𝑔(𝑧) = 𝑢(𝑧) = 1+𝑎1 𝑧 −1 (c)
𝑢(𝑠) 𝜏𝑠+1

Obafemi Awolowo University 30


Chemical Engineering
Worked Example 6

Example 6: The general higher order difference equation is in the form:


𝑎𝑜 𝑦(𝑘) + 𝑎1 𝑦(𝑘 − 1) + ⋯ + 𝑎𝑚 𝑦(𝑘 − 𝑚) = 𝑏𝑜 𝑢(𝑘) + 𝑏1 𝑦(𝑘 − 1) + ⋯ +
𝑏𝑛 𝑦(𝑘 − 𝑛) (7.20)
Obtain the discrete transfer function.
solution
Taking z-transform and applying translational theorem, we have:
𝑎𝑜 𝑦(𝑧) + 𝑎1 𝑧 −1 𝑦(𝑧) + ⋯ + 𝑎𝑚 𝑧 −𝑚 𝑦(𝑧) = 𝑏𝑜 𝑢(𝑧) + 𝑏1 𝑧 −1 𝑦(𝑧) + ⋯ +
𝑏𝑛 𝑧 −𝑛 𝑦(𝑧) (7.21)
Rearranging Eq.(7.21), we have:
𝑦(𝑧) 𝑏𝑜 +𝑏1 𝑧 −1 +…+𝑏𝑛 𝑧 −𝑛
𝑔 (𝑧 ) = = (7.22)
𝑢(𝑧) 𝑎𝑜 +𝑎1 𝑧 −1 +…+𝑎𝑚 𝑧 −𝑚

Obafemi Awolowo University 31


Chemical Engineering
Worked Example 7

𝑘
Example 7: Given the transfer function 𝑔(𝑠) = , where 𝑘 = 2 and
𝜏𝑠+1
𝜏 = 1. The exact discretization of g(s) gives the pulse transfer function
∆𝑡 ∆𝑡
𝑏1 𝑧 −1 − −
𝑔 (𝑧 −1 )
= , where 𝑎1 = −𝑒 𝜏 and 𝑏1 = 𝑘 (1 − 𝑒 𝜏 ).
1+𝑎1 𝑧 −1
(a) Obtain the transient response g(s) to a unit step input. Sketch the
response.
(b) What is the steady-state gain of 𝑔(𝑧 −1 ) with ∆𝑡 = 1?
(c) Obtain the transient response of 𝑔(𝑧 −1 ) to a unit step input.
Solution
(a) We have already obtained this in previous lecture as:

𝒚(𝒕) = 𝒌(𝟏 − 𝒆−𝒕/𝝉 ) (y*)

Obafemi Awolowo University 32


Chemical Engineering
Worked Example 7

5 t

Fig.7.3: Sketch of the step response

∆𝑡

(b) With 𝑎1 = −𝑒 𝜏 = −𝑒 −1 = −0.368
∆𝑡

𝑏1 = 𝑘 (1 − 𝑒 𝜏 ) = 2(1 − 𝑒 −1 ) = 2(1 − 0.368) = 1.264

Obafemi Awolowo University 33


Chemical Engineering
Worked Example 7

𝑏1 𝑧 −1 1.264𝑧 −1
𝑔 (𝑧 −1 )
= = (7.23)
1+𝑎1 𝑧 −1 1−0.368𝑧 −1
The steady state gain of 𝑔 𝑧 ( −1 ) is the its value at z=1
−1
1.264
𝑔 (𝑧 ) = =2
𝑧=1 1 − 0.368
1.264𝑧 −1
(c) from 𝑦(𝑧 −1 )
= 𝑢(𝑧 −1 ) (7.23)
1−0.368𝑧 −1
1.264𝑧 −1 1
= −1 . (7.23b)
1−0.368𝑧 1−𝑧 −1
1.264𝑧 −1
= (7.23c)
1−1.368𝑧 −1 +0.368𝑧 −2
Using polynomial long division
𝑦(𝑧 −1 ) = 1.264𝑧 −1 + 1.729𝑧 −2 + 1.9𝑧 −3 + (7.23d)
Taking inverse z-transform, we have
𝑦(𝑘) = ℤ−1 {1.264𝑧 −1 + 1.729𝑧 −2 + 1.9𝑧 −3 +} (7.23e)

Obafemi Awolowo University 34


Chemical Engineering
Worked Example 7

𝑦(𝑘) = 0 + 1.264𝛿 (𝑘 − 1) + 1.729𝛿 (𝑘 − 2) + 1.9𝛿 (𝑘 − 3) + ⋯ (7.23f)


y(k)
2

Fig.7.4: Sketch of the step response

Obafemi Awolowo University 35


Chemical Engineering
Pulse transfer function from classical transfer function

Procedure for obtaining pulse transfer function gNH(z)


from the classical transfer function g(s) without a hold

1. Obtain the impulse-response function, g(t), by taking


inverse Laplace transform of g(s)
2. Given a sampling time, ∆𝑡, discretize g(t) to obtain the
discrete sequence g(k∆𝑡) or, more simply g(k)
3. The z-transform of this discrete sequence is the
required pulse transfer function.
Obafemi Awolowo University 36
Chemical Engineering
Worked Example 8

Example 8:
(a) Obtain the pulse transfer function of first order process without a
𝑘
zero-order hold. 𝑔(𝑠) =
𝜏𝑠+1
(b) Evaluate 𝑔(𝑧 −1 ) when 𝑘 = 5, 𝜏 = 2 and ∆𝑡 = 1
Solution
Step I
𝒕
𝒌 𝒌/𝝉 −
𝒈( 𝒕 ) = 𝓛−𝟏 { } = 𝓛−𝟏 { } = (𝒌/𝝉)𝒆 𝝉 (7.24)
𝝉𝒔+𝟏 𝒔+𝟏/𝝉
Step II
Recall,

(7.4)

𝐟 (𝐭) = ∑ 𝐟(𝒌𝚫𝒕) 𝜹(𝒕 − 𝒌𝚫𝒕)
𝒌=𝟎

Obafemi Awolowo University 37


Chemical Engineering
Worked Example 8

Discretizing (7.24), we have



𝒌𝚫𝒕 (7.25)
∗ −
𝐠 (𝐭) = ∑ (𝒌/𝝉)𝒆 𝝉 𝜹(𝒕 − 𝒌𝚫𝒕)
𝒌=𝟎
Taking z-transform of (7.25) gives

𝒌𝚫𝒕 (7.26)
− −𝒌
𝐠(𝐤) = ∑ (𝒌/𝝉)𝒆 𝝉 𝒛
𝒌=𝟎
N.B.:
Eq.(7.26) is in the form of a general series (7.26a*)

Obafemi Awolowo University 38


Chemical Engineering
Worked Example 8

The general series



(7.26a*)
−𝑘 −𝑘
f(z) = ∑ 𝑟 𝑧
𝒌=𝟎
always converges to
𝟏 𝟏
f(z) = = (7.26b*)
𝟏 − (𝒓𝒛)−𝟏 𝟏 − 𝒓−𝟏 𝒛−𝟏

Provided that ⌊(𝒓𝒛)−𝟏 ⌋ < 1

Obafemi Awolowo University 39


Chemical Engineering
Worked Example 8


𝒌𝚫𝒕 (7.26)

𝐠(𝐤) = ∑ (𝒌/𝝉)𝒆 𝝉 𝒛 −𝒌
𝒌=𝟎
𝚫𝒕
With 𝒓 = 𝒆 , Eq.(7.26) can be written as
𝝉


𝒌𝒕
( 𝝉 )(−𝒌)
(7.27)
−𝒌
𝐠 𝐍𝐇 (𝐤) = (𝒌/𝝉) ∑ 𝒆 𝒛
𝒌=𝟎
𝒌 𝟏 𝒌 𝟏
g NH (k) = [ ∆𝒕 ]= ( ) (7.28)
𝝉 −( )
𝝉 𝑧 −1
𝝉 𝟏−𝚽𝒛−𝟏
𝟏−𝒆
∆𝒕
−( )
Where 𝚽 = 𝒆 𝝉

(b) When 𝒌 = 𝟓, 𝝉 = 𝟐 and ∆𝒕 = 𝟏


𝟏 𝟐.𝟓 𝟐.𝟓𝒛
g NH (k) = 𝟐. 𝟓 [ −1 ] = = (7.29)
𝟏−𝒆−𝟎.𝟓 𝑧 𝟏−𝟎.𝟔𝟎𝟕𝑧 −1 𝒛−𝟎.𝟔𝟎𝟕

Obafemi Awolowo University 40


Chemical Engineering
Pulse transfer function from classical transfer function

Procedure for obtaining pulse transfer function g(z) from


the classical transfer function g(s) with a zero-order hold

1. Take the inverse Laplace transform to obtain the


continuous time function corresponding to g(s)/s, let this
function be 𝑔̌(𝑡)
2. Discretize the function 𝑔̌(𝑡) with sampling time, ∆𝑡, to yield
𝑔̌(k∆𝑡) and then obtain the z-transform 𝑔̌(𝑧)
3. Multiply 𝑔̌(𝑧) by (1 − 𝑧 −1 )to obtain g(z), ie,

𝑔(𝑧) = (1 − 𝑧 −1 )𝑔̌(𝑧) (7.30)

Obafemi Awolowo University 41


Chemical Engineering
Worked Example 9

Example 9: Repeat Example 8 when there is a zero-order hold.


Solution
𝒌
Step 1: 𝒈 (𝒔 ) =
𝝉𝒔+𝟏

𝒈 (𝒔 ) 𝒌
=
𝒔 𝒔(𝝉𝒔 + 𝟏)

𝒕
𝒈(𝒔) 𝒌 −
̌ (𝒕) =
𝒈 𝓛−𝟏 { } =𝓛 −𝟏 { } = 𝒌 (𝟏 − 𝒆 ) 𝝉 (7.31)
𝒔 𝒔(𝝉𝒔+𝟏)

Substituting for t as k∆𝑡 and taking the z-transform, we obtain


Step 2

Obafemi Awolowo University 42


Chemical Engineering
Worked Example 9

Recall,

(7.4)

𝐟 (𝐭) = ∑ 𝐟(𝒌𝚫𝒕) 𝜹(𝒕 − 𝒌𝚫𝒕)
𝒌=𝟎
Discretizing Eq.7.31 gives

𝒌𝚫𝒕 (7.4)

̌∗
𝒈 (𝐭) = ∑ 𝑲 (𝟏 − 𝒆 𝝉 ) 𝜹(𝒕 − 𝒌𝚫𝒕)
𝒌=𝟎
Recall

(7.4*)
̌∗ (𝐭)} = ∑ 𝒈(𝒌𝚫𝒕)𝒛−𝒌
̌ (𝐳) = ℤ{𝒈
𝒈
𝒌=𝟎

Obafemi Awolowo University 43


Chemical Engineering
Worked Example 9

∞ ∞
𝒌𝚫𝒕 𝚫𝒕
( 𝝉 )(−𝒌) −𝒌
(7.32)

̌ (𝐳) = 𝑲 ∑ (𝟏 − 𝒆
𝒈 𝝉 ) 𝒛−𝒌 = 𝑲 ∑ [𝒛−𝒌 − 𝒆 𝒛 ]
𝒌=𝟎 𝒌=𝟎
Eq.7.32 can further be written as
∞ ∞
𝚫𝒕
( 𝝉 )(−𝒌) −𝒌
(7.33)
̌ (𝐳) = 𝑲 ∑ 𝒛−𝒌 − 𝑲 ∑ 𝒆
𝒈 𝒛
𝒌=𝟎 𝒌=𝟎
N.B: The first and second series in (7.33) have been proved to converge
to (7.34) (Check Example 1 and Eq.7.26a-b)
𝟏 𝟏 (7.34)
𝐠̌(𝐳) = 𝑲 ( −𝟏
− 𝚫𝒕 )
𝟏−𝒛 −( )
𝟏−𝒆 𝝉 𝒛−𝟏

Obafemi Awolowo University 44


Chemical Engineering
Worked Example 9

Step 3: 𝒈(𝒛) = (𝟏 − 𝒛−𝟏 )𝒈


̌ (𝒛) (7.30)
𝟏 𝟏 (7.35)
−𝟏
𝐠(𝐳) = 𝑲(𝟏 − 𝒛 )( −𝟏
− 𝚫𝒕 )
𝟏−𝒛 −( )
𝟏−𝒆 𝝉 𝒛−𝟏

This simplifies to
𝚫𝒕
−𝟏 −( ) −𝟏
𝑲(𝟏−𝒛 )(𝟏−𝒆 𝝉 𝒛 −𝟏+𝟏)
𝒈( 𝒛 ) = 𝚫𝒕 (7.36a)
−𝟏 −( ) −𝟏
(𝟏−𝒛 )(𝟏−𝒆 𝝉 𝒛 )

𝚫𝒕
−( )
𝑲(𝟏−𝒆 𝝉 )𝒛−𝟏

𝒈( 𝒛 ) = 𝚫𝒕 (7.36b)
−( )
(𝟏−𝒆 𝝉 𝒛−𝟏 )

𝚫𝒕
−( )
Put 𝒆 𝝉 =𝚽
Obafemi Awolowo University 45
Chemical Engineering
Worked Example 9

𝑲(𝟏−𝚽)𝒛−𝟏
𝒈(𝒛) = (7.36c)
(𝟏−𝚽𝒛−𝟏 )
(b) With 𝒌 = 𝟓, 𝝉 = 𝟐 and ∆𝒕 = 𝟏
𝚽 = 𝒆−𝟎.𝟓 = 𝟎. 𝟔𝟎𝟕 (7.37)
𝟓(𝟏−𝟎.𝟔𝟎𝟕)𝒛−𝟏
𝒈(𝒛) = (7.38)
(𝟏−𝟎.𝟔𝟎𝟕𝒛−𝟏 )
𝟏.𝟗𝟔𝟕𝒛−𝟏
𝒈(𝒛) = (7.39)
𝟏−𝟎.𝟔𝟎𝟕𝒛−𝟏

Obafemi Awolowo University 46


Chemical Engineering
Worked Example 10

𝒌
Example 10: Convert the continuous transfer function, 𝒈(𝒔) = to
𝝉𝒔+𝟏
discrete form using MATLAB.
Solution
The MATLAB function that helps in achieving this is “c2d”.
Typing “help c2d” in the MATLAB command prompt gives the
following:

Obafemi Awolowo University 47


Chemical Engineering
Worked Example 10

Table 7.2

Obafemi Awolowo University 48


Chemical Engineering
Worked Example 10

Enter the following into MATLAB command prompt


g=tf(5,[2 1])
gz=c2d(g,1)
We have the solution as:

Obafemi Awolowo University 49


Chemical Engineering

You might also like