Digital Control (Unit-1)
Digital Control (Unit-1)
Digital Control (Unit-1)
A Control system is a system that may include electronic and mechanical components,
where some type of machine intelligence controls a physical process. The mechanical
parts of the system include the engine, transmission, wheels, and so on.
Examples include automatic pilot and automatic washer, copying machines, soft-drink
machines, robots, and industrial process controllers.
A general block diagram that describe control system shown in figure 1.
1
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
2
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
3
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
The self-correcting features of closed-loop CS makes it preferable over the open-loop
control in many applications, despite the additional hardware required, since it
provides reliable.
4
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Transfer Functions
The control system is a collection of components and circuits connected together to
perform a useful function. Each component in the system converts energy from one
form to another; for example, we might think of a temperature sensor as converting
degrees to volts or a motor as converting volts to revolutions per minute.
A transfer function (TF) is a mathematical relationship between the input and output
of a control system component. It is expressed as
Technically, the transfer function must describe both the time-dependent and the
steady-state characteristics of a component. For example, a motor may have an initial
surge of current that levels off at a lower steady-state value. Currently, we will
consider only steady-state values for the transfer function, which is sometimes called
simply the gain, expressed as
Example:
Find the TF of a potentiometer, where 0° of rotation yields 0 V and 300° yields 10 V?
SOLUTION
The transfer function is output divided by input.
𝑜𝑢𝑡𝑝𝑢𝑡 10
𝑇𝐹 = = = 0.33 𝑉/𝑑𝑒𝑔
𝑖𝑛𝑝𝑢𝑡 300
Example:
For a temperature-measuring sensor, the input is temperature, and the output is
voltage. The sensor transfer function is given as 0.01 V/deg. Find the sensor output
voltage if the temperature is 600°F?
𝑜𝑢𝑡𝑝𝑢𝑡
𝑇𝐹 = => 𝑜𝑢𝑡𝑝𝑢𝑡 = 𝑖𝑛𝑝𝑢𝑡 𝑥 𝑇𝐹 = 600 𝑋 0.01 = 0.6 𝑉
𝑖𝑛𝑝𝑢𝑡
5
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Example
Consider the system consists of an electric motor driving a gear train, which is driving
a winch. The motor turns at 100 rpmm for each volt (Vm) supplied; the output shaft of
the gear train rotates at one-half of the motor speed; the winch (with a 3-inch shaft
circumference) converts the rotary motion (rpmw) to linear speed.
Solution
The individual transfer functions are given as follows:
𝑜𝑢𝑡𝑝𝑢𝑡 100 𝑟𝑝𝑚
𝑀𝑜𝑡𝑜𝑟: 𝑇𝐹𝑚 = = = 100 𝑟𝑝𝑚/𝑉
𝑖𝑛𝑝𝑢𝑡 1𝑉
𝑜𝑢𝑡𝑝𝑢𝑡 1 𝑟𝑝𝑚
𝐺𝑒𝑎𝑟: 𝑇𝐹𝑔 = = = 0.5 rpm/rpm
𝑖𝑛𝑝𝑢𝑡 2 𝑟𝑝𝑚
𝑜𝑢𝑡𝑝𝑢𝑡 3 𝑖𝑛/𝑚𝑖𝑛
𝑊𝑖𝑛𝑐ℎ: 𝑇𝐹𝑤 = = = 3 𝑖𝑛/𝑚𝑖𝑛/𝑟𝑝𝑚
𝑖𝑛𝑝𝑢𝑡 1 𝑟𝑝𝑚
Control systems are classified as analog or digital. In an analog control system, the
controller uses traditional analog electronic circuits such as linear amplifiers. In a
digital control system, the controller uses a digital circuit, usually a computer.
6
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
7
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Sampling Theory
A signal is a set of data or information, e.g telephone or TV signal. The signals are
divided into analog and digital, each of them is represented as continues-time and
discrete-time signals. .
Continuous-time signal: A signal defined over a continuous range of time (a
continuous range of values, at every instant of time t.)
Discrete-time signal: A signal can be defined only at discrete instants of time (a
finite number of distinct values). , it can be obtained by sampling a continuous-time
signal.
The Sampling is the process by which continuous time signals are converted to discrete
time signals. Each measurement is referred to as a sample. The value of the signal is
measured at certain uniform intervals in time called sampling periodic time (TS) in
second, the following figure.
8
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
The sample rate is the number of times per second a controller reads in sensor data and
produces a new output value
The Nyquist Sampling Theorem explains the relationship between the sample rate and
the frequency of the measured signal. The sample rate fs must be at least twice the
bandwidth of the signal 𝑓𝑠 ≥ 2𝑓𝑚𝑎𝑥 , 𝑓𝑚𝑎𝑥 is the maximum frequency component if the
analog signal to be sampled. Half of the sampling frequency (𝑓𝑠 /2) is called Nyquist
frequency or folding frequency. fS = (1/TS), in
• Nyquist rate = 2 fmax
• Nyquist frequency = fs/2.
9
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
The value of the signal is measured at certain uniform intervals in time called periodic
time (TS).
10
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
2) Lose some information during sampling that cannot recover it.
3) May getting wrong information about the signal. The person receiving these
samples, without any previous knowledge of the original signal, may get a signal
has quite a different form
11
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Aliasing occurs when a signal is not sampled at a high enough frequency to create an
accurate representation. In addition, some of the frequencies in the original signal may
be lost in the reconstructed signal because signal frequencies can overlap if the
sampling frequency is too low. Frequencies "fold" around half the sampling
frequency - which is why this frequency is often referred to as the folding frequency
Sometimes the highest frequency components of a signal are simply noise, or do not
contain useful information. To prevent aliasing of these frequencies, we can filter out
these components before sampling the signal. Because we are filtering out high
frequency components and letting lower frequency components through, this is known
as low-pass filtering.
Improperly sampled signals will have other sine wave components. Correcting for
aliasing is called anti-aliasing
12
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Samples Reconstruction
The reconstruction process begins by taking a sampled signal, which will be in
discrete time, and performing a few operations in order to convert them into
continuous-time and into an exact copy of the original signal.
The sequence of digital values is converted into a series of impulses at discrete time
intervals before being reconstructed into a continuous-time signal.
The signal can be fully reconstructed if there are no overlaps in the frequency domain.
If the sampling frequency is at least twice the bandwidth B, then the signal can be
reconstructed without a problem
(no overlap). If the sampling frequency is too low then information will be lost
(overlap).
13
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Z - Transform
Introduction
The z-transform is a very important tool in describing and analyzing digital systems. Z-
transform is a transform technique used for discrete time signals and systems. It is a
powerful method for solving difference equations.
The Z-transform is simply a power series representation of a discrete-time sequence.
For example, if we have the sequence X[0]; X[1]; X[2]; X[3] the Z-transform simply
multiplies each coefficient in the sequence by a power of z corresponding to its index.
𝑋(𝑧) = 𝑋[0] + 𝑋[1]𝑍 −1 + 𝑋[2]𝑍 −2 + 𝑋[3]𝑍 −3
The development and extensive applications of the Z-transform are much enhanced as
a result of the use of digital computers.
The differences between Laplace transform and z-transform are following:
Difference Equations
Difference equations arise in problems where the independent variable, usually time, is
assumed to have a discrete set of possible values.
The nonlinear difference equation.
with
forcing function u(k) is said to be of order n because the difference between the highest
and lowest time arguments of y(.) and u(.) is n. we will deal with in this text are almost
exclusively linear equations and are of the form. If the forcing function u(k) is equal to
zero, the equation is said to be homogeneous.
14
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Example
Z - Transform Definitions
Given a finite length signal X[n], the z-transform of a sequence is defined as:
∞
Definition:
Causal Signals: A sequence x[n] is a causal sequence if x[n] = 0 for n < 0.
Note: The notation Z{X[n]} =X(z) to mean that the z-transform of the sequence {X[n]}
is X(z).
15
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Example 3: From X[n] = 2δ[n] + 3δ[n – 1] + 5δ[n – 2] + 2δ[n – 3] ,find the z-transform?
Solution 𝑋(𝑧) = 2 + 3𝑧 −1 + 5𝑧 −2 + 2𝑧 −3
Z-Plane:
The Z-plane is a complex plane with an imaginary and real axis referring to the complex
valued variable z. The position on the complex plane is given by rejw, and the angle
from the positive, real axis around the plane is denoted by 𝜔 .
16
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Figure: z-plane
As with the Laplace transform, the z-transform of a signal has associated with it both
an algebraic expression and a range of values of z, referred to as the region of
convergence (ROC), for which this expression is valid.
A discrete time signal consists of a sequence of numbers denoted by Xn, X(n), or X(nT).
The frequently use signal are:
1. The unit impulse, also called Dirac delta function, sequence is denoted by δ(n),
figure 1, and defined by:
1 𝑛=0
𝛿(𝑛) = {
0 𝑛≠0
Then only the n = 0 term in the sum is non
zero. Figure
1
The z-transform of the unit pulse, 𝛿(𝑛) = 1.
∞
𝑍 { 𝛿(𝑛𝑇)} = ∑ 𝛿(𝑛𝑇) 𝑍 −1 = 𝑍 0 = 1
𝑁=0
1 𝑛=3
Example 5: if we have 𝛿𝑛−3 that means 𝛿𝑛−3 = {
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
So, we obtain 𝛿𝑛−3 = 0 + 0𝑧 −1 + 0𝑧 −2 + 𝑧 −3 + 0𝑧 −4 + . .. = 𝑧 −3
17
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
2. The unit step sequence
The unit step is defined by
1 𝑛≥0
𝑢(𝑛) = {
0 𝑛<0
The z-transform
∞
3. Sampled exponential
𝑎𝑘 , 𝑘 ≥ 0
It is defined by 𝑋(𝑛) = {
0 , 𝑘<0
Sampled exponential
𝑛𝑇 𝑛≥0
𝑋(𝑛𝑇) = {
0 𝑛<0
Then 𝑋(𝑧) = ∑∞
𝑛= 0 𝑛𝑇 𝑧
−𝑛
= 𝑇 ∑ 𝑛 𝑧 −1
𝑛=0
𝑑 𝑑
Since 𝑛𝑧 −𝑛 = −𝑧 (𝑧 −𝑛 ) 𝑡ℎ𝑒𝑛 𝑋(𝑧) = −𝑇𝑧 (∑∞
𝑛=0 𝑧
−𝑛
𝑑𝑧 𝑑𝑧
18
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
𝑧
Since ∑∞
𝑛=0 𝑧
−𝑛
= (𝑧−1)
𝑡ℎ𝑒𝑛
Then
It is defined by
𝑎𝑛 𝑛≥0
𝑎𝑛 𝑢(𝑛) = {
0 𝑛≠0
𝑋(𝑧) = 1 + 𝑎 𝑧 −1 + 𝑎2 𝑧 −2 + 𝑎3 𝑧 −3 + 𝑎4 𝑧 −4 + . . . + 𝑎2 𝑧 −𝑛 + ⋯
This sum can be written as,
1
𝑋(𝑧) =
1 + 𝑎𝑧 −1
Example 6: Find the z-transform of the following causal sequences
19
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Solution:
Table 1:
20
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Properties of Z - transform
1. Linearity [17]
For two sequences and their associated z-transforms and ROC’s, the linearity property
states:
21
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
The term in brackets corresponds to an exponential sequence (1/4)nu[n]. The factor z−1
shifts this sequence one sample to the right. The inverse z-transform is therefore
Note that this result could also have been easily obtained using a partial fraction
expansion.
Example 11: Find the Z-transform y(n) = (0.5)(n-5).u(n-5) where u(n-5)=1 for n ≥ 5 and
u(n-5) =0 for n<5?
22
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Solution
𝑧
Using the property 𝑎𝑛 𝑢[𝑛] = 𝑧−𝑎
4.4 Convolution
This property states that
𝑋1 [𝑛] ∗ 𝑥2 [𝑛] = 𝑋1 (𝑧)𝑋2 (𝑧) 𝑅𝑂𝐶 = 𝑅𝑋1 ∩ 𝑅𝑋2
Example 12: Find the Z-transform of the convolution for the following sequences?
Solution
Applying z-transform on the two sequences,
23
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
24
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
25
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
The region of convergence (ROC) is the set of z values in the complex plane for which
the Z-transform of a signal X[n] converges, the region where z-transform exists. The
ROC for a given x [n] must satisfy
∞
∑ |x[n]z −n | < ∞
n=−∞
Which means that z-transform therefore exists (or converges). The ROC therefore
consists of a ring in the z-plane, figure 3.
26
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Clarification
The sum of 𝑋(𝑧) = ∑∞ 𝑛 −𝑛
𝑛=0 𝑎 𝑧 𝑐𝑜𝑛𝑣𝑒𝑟𝑔𝑒𝑠 𝑜𝑛𝑙𝑦 𝑓𝑜𝑟 |𝑧| > |𝑎|
The sum of 𝑋(𝑧) = ∑−1 𝑛 −𝑛
𝑛=−∞ 𝑎 𝑧 𝑐𝑜𝑛𝑣𝑒𝑟𝑔𝑒𝑠 𝑜𝑛𝑙𝑦 𝑓𝑜𝑟 |𝑎| > |𝑧|
They have the same X(z) but they differ in ROC.
Solution
∞
𝑋(𝑧) = ∑ (𝑋[𝑛] 𝑍 −𝑛 )
𝑛=−∞
∞
= ∑ (𝛼 𝑛 𝑢[𝑛] 𝑍 −𝑛 )
𝑛=−∞
∞
= ∑(𝛼 𝑛 𝑍 −𝑛 )
𝑛=0
∞
= ∑ ((𝛼𝑍 −1 )𝑛 )
𝑛=0
Figure:
This sequence is an example of a right-sided exponential sequence because it is nonzero
for n ≥ 0. It only converges when |αz−1| < 1. When it converges,
1 𝑧
𝑋(𝑧) = −1
=
1 − 𝛼𝑧 𝑧−𝛼
27
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
If |𝛼𝑧 −1 | ≥ 1 then the series ∑∞ −1 𝑛
𝑛=0((𝛼𝑧 ) ) does not converge. Thus the ROC is the
1) 𝑋1 (𝑧) = ∑∞ 𝑛
𝑛=−∞ 𝑎 𝑢[𝑛]𝑧
−𝑛
28
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
∞
𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛
1 𝑛 −1 𝑛
Example: Find the ROC for 𝑋1 [𝑛] = (2) 𝑢[𝑛] + ( 4 ) 𝑢[𝑛]
1 𝑛
The Z-transform of (2) 𝑢[𝑛]𝑖𝑠
𝑧 1
𝑤𝑖𝑡ℎ 𝑅𝑂𝐶 𝑎𝑡 |𝑧| >
1 2
𝑧−2
29
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
−1 𝑛
The Z-transform of ( 4 ) 𝑢[𝑛]𝑖𝑠
𝑧 −1
𝑤𝑖𝑡ℎ 𝑅𝑂𝐶 𝑎𝑡 |𝑧| >
1 4
𝑧+4
30
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
31
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
32
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Z-Transform solution of difference equations
Difference equation is an equation that defines s sequence recursively, each term in
the sequence is defined as function of the previous terms in the sequence. The linear
form of it is:
𝑦(𝑘 + 𝑛) + 𝑎𝑛−1 𝑦(𝑘 + 𝑛 − 1) + ⋯ , 𝑎1 𝑦(𝑘 + 1) + 𝑎0 𝑦(𝑘)
= 𝑏𝑛 𝑢(𝑘 + 𝑛) + 𝑏𝑛−1 𝑢(𝑘 + 𝑛 − 1) + ⋯ + 𝑏1 𝑢(𝑘 + 1), 𝑏0 𝑢(𝑘)]
We further assume that the coefficients ai, bi, i=0, 1, 2, … , are constant. The
difference equation is then referred to as linear time invariant, or LTI. If the forcing
function u(k) is equal to zero, the equation is said to be homogeneous.
Example : For each of the following difference equations, determine the order of the
equation.
Is the equation (a) linear, (b) time invariant, or (c) homogeneous?
1. 𝑦(𝑘 + 2) + 0.8𝑦(𝑘 + 1) + 0.07𝑦(𝑘)𝑢(𝑘)
2. 𝑦(𝑘 + 4) + sin(0.4𝑘) 𝑦(𝑘 + 1) + 0.3𝑦(𝑘) = 0
3. 𝑦(𝑘 + 1) = −0.1𝑦 2 𝑦(𝑘)
Ans:
1. The equation is second order. All terms enter the equation linearly and have
constant coefficients. The equation is therefore LTI. A forcing function
appears in the equation, so it is nonhomogeneous.
2. The equation is fourth order. The second coefficient is time dependent, but all
the terms are linear and there is no forcing function. The equation is therefore
linear time varying and homogeneous.
3. The equation is first order. The right-hand side (RHS) is a nonlinear function
of y(k), but does not include a forcing function or terms that depend on time
explicitly. The equation is therefore nonlinear, time invariant, and
homogeneous
To solve the linear difference equations, the equations are first transformed to the z-
domain (i.e., both the right- and left-hand sides of the equation are z-transformed).
Then the variable of interest is solved for and inverse z-transformed. To transform the
difference equation, we typically use the time delay or the time advance property.
Inverse z-transformation is performed using the methods of discrete time signal.
مع التطرقtime delay and time advance البد من ان نستذكر قوانين، قبل البدء بشرح الموضوع
لمثال على كل منهم
33
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Time delay
The equation of the time delay property is
𝑍{𝑋[𝑘 − 𝑛]} = 𝑍 −𝑛 𝑋(𝑧)
Example 5-1: Find the z-transform of the causal sequence
4 𝑓𝑜𝑟 𝑘 = 2,3,4 …
𝑋[𝑘] = {
0 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒
Solution
The given sequence is a sampled step starting at k52 rather than k50 (i.e., it is delayed
by two sampling periods). Using the delay property, we have
4𝑧 4
𝑋(𝑧) = 𝑍{4 ∗ 1(𝑘 − 2)} = 4𝑍 −2 𝑍{1(𝑘)} = 𝑍 −2 =
𝑧−1 𝑧(𝑧 − 1)
بدال2 تبدأ من القيمةsampled step sequence فان المتسلسلة تعود الى4 الن القيمة ثابتة وهي:مالحظة
.من الصفر
Time advance
𝑍{𝑋[𝑘 + 1]} = 𝑧𝑋(𝑧) − 𝑧𝑋[0]
𝑍{𝑋[𝑘 + 𝑛]} = 𝑧 𝑛 𝑋(𝑧) − 𝑧 𝑛 𝑋[0] − 𝑧 𝑛−1 𝑋[1] − ⋯ − 𝑧𝑋[𝑛]
Example 5-2
Using the time advance property, find the z-transform of the causal sequence {X[k]}
= { 4, 8, 16, …}?
Solution
The sequence can be written as
𝑋[𝑘] = 2𝑘+2 = 𝑦[𝑘 + 2] 𝑘 = 0,1,2, …
Where y[k] is the exponential time function
𝑦[𝑘] = 2𝑘 , 𝑘 = 0,1,2,…
Using the time advance property, the transform is
𝑋(𝑧) = 𝑧 2 𝑦(𝑧) − 𝑧 2 𝑦[0] − 𝑧𝑦[1]
𝑧 4
𝑋(𝑧) = 𝑧 2 𝑧−2 − 𝑧 2 − 2𝑧 = 𝑧−2
. Z ثم استخدام تحويل، {X[k] = 4{1,2,4,…} يمكن كتابة المتسلسلة بالشكل التالي: مالحظة
Example: (about Z-Transform solution of difference equations)
Solve the linear difference equation
34
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
3 1
𝑋[𝑘 + 2] − 𝑋[𝑘 + 1] + 𝑋[𝑘] = 1[𝑘]
2 2
1. z-transform
We begin by z-transforming the difference equation using time advance equation to
obtain.
3 1
[𝑧 2 𝑋(𝑧) − 𝑧 2 𝑋[0] − 𝑧𝑋[1]] − 𝑧𝑋[𝑧] − 𝑧𝑋[0] + 𝑋[𝑧] = 1[𝑘]
2 2
To
obtain the remaining coefficient, we multiply by the denominator and get the equation
35
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Thus, the partial fraction expansion in this special case includes two terms only. We
now have
4. Inverse z-transformation
From the z-transform tables, the inverse z-transform of X(z) is
36
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
17 15 7 1
𝑦(𝑧) − 9
= + 16 − 144 + 12
𝑧 𝑧 + 2 𝑧 + 3 𝑧 − 1 (𝑧 − 1)2
17 15 7 1
𝑦(𝑧) = (−2)𝑘 + (−3)𝑘 − 𝑢[𝑘] + 12 𝑘
9 16 144
𝑋(𝑧) 𝑍−3
=
𝑍 (𝑍 − 1)(𝑍 − 2)(𝑍 − 4)
𝑍−3 𝐴 𝐵 𝐶
= + +
(𝑍 − 1)(𝑍 − 2)(𝑍 − 4) 𝑍 − 1 𝑍 − 2 𝑍 − 4
Using partial fraction A= – 2/3, B = 1/2 , C=1/6
−2/3 1/2 1/6 −2 𝑍 1 𝑍 1 𝑍
𝑋(𝑧) = + + = . + +
𝑍−1 𝑍−2 𝑍−4 3 𝑍 − 1 2𝑍 − 2 6𝑍 − 4
Taking inverse Z-transform of both sides
−2 −1 𝑍 1 𝑍 1 𝑍
𝑍 −1 {𝑋(𝑧)} = .𝑍 { } + 𝑍 −1 { } + 𝑍 −1 { }
3 𝑍−1 2 𝑍−2 6 𝑍−4
−2 1 1
𝑢(𝑛) = . (1)𝑛 + (2)𝑛 + (4)𝑛
3 2 6
37
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
−2 1 1
𝑢(𝑛) = + (2)𝑛 + (4)𝑛
3 2 6
More examples
Example: Using Z-transform, solve the difference equation?
𝑦(𝑘 + 1) − 3𝑦(𝑘) = −6 , 𝑤ℎ𝑒𝑟𝑒 𝑦(0) = 1
Ans.
1. z-transform
𝑍{𝑦(𝑘 + 1) − 3𝑍{𝑦(𝑘) = 𝑍{−6}
−6𝑧
𝑍{𝑦(𝑘 + 1) = 𝑧 𝑍{𝑦(𝑘)} − 𝑧 𝑦(0) = 𝑧−1
−6 𝑧 −6𝑧 + 𝑧(𝑧 − 1) 𝑧 2 − 7𝑧
(𝑧 − 3) 𝑍{𝑦(𝑘) = +𝑧= =
𝑧−1 𝑧−1 𝑧−1
𝑍 2 − 7𝑍
𝑍{𝑦(𝑘)} =
(𝑍 − 1)(𝑍 − 3)
𝑍{𝑦(𝑘)} 𝑧−7
=
𝑧 (𝑧 − 1)(𝑧 − 3)
Applied partial fraction
𝑍{𝑦(𝑘)} 𝐴 𝐵
= +
𝑧 𝑧−1 𝑧−3
𝑧−7 1 − 7 −6
𝐴= |𝑧=1 = = =3
(𝑧 − 1)(𝑧 − 3 1 − 3 −2
𝑧−7 3 − 7 −4
𝐵= |𝑧=3 = = = −2
(𝑧 − 1)(𝑧 − 3 3−1 2
3𝑧 2𝑧
𝑍{𝑦(𝑘)} = −
(𝑍 − 1) 𝑧 − 3
𝑧 𝑧
𝑦(𝑘) = 3𝑍 −1 { } − 2𝑍 −1 { }
𝑧−1 𝑧−3
𝑦(𝑘) = 3𝑢(𝑘) − 2(3𝑘 )
1
Example: For the difference equation [𝑛] − 2 𝑦[𝑛 − 1] = 𝑢[𝑛] 𝑓𝑜𝑟 𝑛 ≥ 0 , where y[-
1]=0?
Answer
38
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Example: Solve
Ans.
First, shift the equation so that we can take advantage of the form of the initial
conditions. We replace 𝑘 → 𝑘 − 2 to obtain
39
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
40
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Now solve the quadratic equation z2 − z − 1 = 0 and hence factorize the denominator.
This form for Y (z) often arises in solving second order difference equations. Write it
in partial fractions and find y(n), leaving a and b as general at this stage:
41
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
With an appropriate computational aid you could (i) check that this formula does
indeed give the familiar sequence
{1, 1, 2, 3, 5, 8, 13, . . .}
Example 2:
Use the right shift property of z-transforms to solve the second order difference
Equation 𝑦(𝑛) − 7𝑦(𝑛 − 1) + 10𝑦(𝑛 − 2) = 0 , 𝑤𝑖𝑡ℎ 𝑦(𝑛 − 1) =
16 𝑎𝑛𝑑 𝑦(−2) = 5?
Sol:
42
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Inverse of Z-Transform
Let X[n] is the continuous time function whose Z-transform is X(z) then the inverse
transform is not necessarily equal to X[n], rather it is equal to X(nT) which is equal to
X[n] only at the sampling instants. Once X[n] is sampled by an the ideal sampler, the
information between the sampling instants is totally lost and we cannot recover actual
X[n] from X(z),
𝑋[𝑛𝑇] = 𝑍 −1 [𝑋(𝑧)]
The transform can be obtained by using
1. Inspection method
2. Long division method.
3. Partial fraction method
4. Power series method.
b) Use the coefficients of the expansion to write the time sequence (X1, X2, … ,
Xi). where i is number of points in the time sequence.
0.5 𝑍 2 +0.5 𝑍)
Example: Finding the inverse Z transform of 𝐻(𝑧) = ?
𝑍 2 −𝑍+0.5
Answer
The long division is
43
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Ans:
1. Long division
2) Inverse transform
X[n] = {0,1,0.8, -0.26}
44
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Common Z Transform Pairs
45
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
3. Partial-Fraction Expansion (PFE) Method
This method expand X(z)/z rather than X(z). The PFE is used to express the X(z) as a
sum of simple terms for which the inverse transform may be recognized by inspection
method ( available in Z-transform table).
The residues method is the most convenience method to get PFE of a function with
simple real roots.
When dealing with linear time-invariant systems the z-transform often in the form
𝐴(𝑧) ∑𝑀
𝑘=0 𝑏𝑘 𝑍
−𝑘
𝑋(𝑍) = 𝐵(𝑧) = 𝑁
∑𝑘=0 𝑎𝑘 𝑍 −𝑘
𝑖𝑓 𝑀 < 𝑁
46
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
2𝑍 2 +2
Example: Find the inverse Z-transform for 𝐺(𝑧) 𝑍 2 +2𝑍−3 ?
Ans:
𝐺(𝑧) 2𝑍 + 2 𝐴 𝐵
= = +
𝑍 (𝑍 + 3)(𝑍 − 1) 𝑍+3 𝑍−1
. Z= -3 ونعوضZ بالمعادلة االصلية الناتجة من القسمة علىA نضرب مقامA اليجاد
2𝑍 + 2 −4
𝐴= |𝑍→−3 = =1
𝑍−1 −4
2𝑍 + 2 4
𝐵= |𝑍=1 = = 1
𝑍+3 4
𝐺(𝑧) 1 1
= +
𝑍 𝑍+3 𝑍−1
𝑍 𝑍
𝐺(𝑧) = +
𝑍+3 𝑍−1
Example 1
Find the Z-transform using partial fraction expansion for
1− 𝑍 −1
𝑋(𝑧) = 1 1 ?
(1− 𝑍 −1 )(1− 𝑍 −1)
2 3
Answer
1 1
To solve for A1 and A2, multiply both sides by (1 − 2 𝑍 −1 )(1 − 3 𝑍 −1) ) to obtain
So,
To check:
47
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Now, we have
Possible of ROCs
And
48
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
And
𝟏− 𝒁−𝟏 −𝟑 𝟒
𝐴𝑔𝑎𝑖𝑛, 𝑓𝑜𝑟 𝒀(𝒛) = 𝟏 𝟏 = 𝟏 + 𝟏 ?
(𝟏− 𝒁−𝟏 )(𝟏− 𝒁−𝟏) 𝟏− 𝒁−𝟏 𝟏− 𝒁−𝟏
𝟐 𝟑 𝟐 𝟑
There are three possible of ROCs for a signal with this z-transform.
ROC Signal
𝟏
< |𝒛|
𝟐
𝟏 𝟏
< |𝒛| <
𝟑 𝟐
𝟏
|𝒛| <
𝟑
49
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
𝑿[𝒛] = ∑∞
𝒏=−∞ 𝑿[𝒏]𝒁
−𝟏
a) Since the ROC is |z| > |a|, that is, the exterior of a circle, X[n] is a right-sided
sequence. Thus, we must divide to obtain a series in the power of z–1 . Carrying out the
long division, we obtain
50
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Thus
So, we have
And we obtain
(b) Since the ROC is lzl < lal, that is, the interior of a circle, x[n] is a left-sided sequence.
Thus, we must divide so as to obtain a series in the power of z as follows, Multiplying
both the numerator and denominator of X(z) by z, we have
Thus
So, we have
51
DIGITAL CONTROL SYSTEM
University of Tikrit – College of Petroleum and Minerals Engineering
Department of Petroleum Systems Control Engineering
3th class Sem.1 2018/2019
Examples
Example 4 Find the inverse Z-transform of
Answer
52