0% found this document useful (0 votes)
18 views

Chapter 1 Z Transform

This document is an introduction to Digital Control Systems, focusing on modeling digital systems, Z transforms, and solving difference equations. It explains the processes of Analog to Digital (A/D) and Digital to Analog (D/A) conversion, emphasizing the importance of sampling rates and quantization levels. Additionally, it covers the differences between differential and difference equations, providing examples related to control systems.

Uploaded by

j865wmctst
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)
18 views

Chapter 1 Z Transform

This document is an introduction to Digital Control Systems, focusing on modeling digital systems, Z transforms, and solving difference equations. It explains the processes of Analog to Digital (A/D) and Digital to Analog (D/A) conversion, emphasizing the importance of sampling rates and quantization levels. Additionally, it covers the differences between differential and difference equations, providing examples related to control systems.

Uploaded by

j865wmctst
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/ 35

Benha University Electrical Engineering Department

Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Chapter # 1 Introduction to Digital Control Systems


After completing this chapter, the students will be able to:

• Model the digital system,


• Find the Z transform, basic theories related to Z-transform and methods of
finding inverse Z transform,
• Solve difference equation by Z transform.
1. Introduction
Computers can be used to control the position of the antenna (Plant) given in Fig. 1
below. Such system is called computer-controlled system or sampled-data system or
discrete system or digital system.

Fig. 1 Computer-controlled system


1 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

The signals r, e and c are analog but the signal f is digital. For signal matching, analog
to digital (A/D) converter and digital to analog (D/A) converter must be used as shown
in Fig. 2.

Fig. 2 Placement of A/D and D/A converters


2. Analog to Digital (A/D) Converter
A/D converter is a two-step process and is not instantaneous. There is a delay between
the input analog voltage and the output digital word.
First Step: the analog signal is converted to a sampled signal at periodic intervals to
2n levels (n≠0, n=1 or 2 …etc);
Second Step: Based on the sampling rate, the sampled signal is converted to a sequence
of binary numbers, that represent the digital signal.
The sampling rate must be at least twice the bandwidth of the signal, or there will be
distortion. The minimum sampling frequency is called the Nyquist sampling rate.
To explain these two steps, consider the analog signal shown in Fig. 3 (a). This analog
signal is sampled to 8 quantization levels (3-bit). Each level is assigned with 3-digit
number started with 000 and end with 111 as shown in Fig. 3 (b). (Note that the analog
signal sampled at periodic intervals and held over the sampling interval by a device
called a zero-order sample-and-hold (Z.O.H.) that yields a staircase approximation to
the analog signal. (Higher order hold like first order hold generates a ramp between the
samples). From Fig. 3 (b), we can see that there will be an associated error for each
digitized analog value. This is called the quantization error which occurs due to the
quantization
process rounds off the analog voltage to the next higher or lower level.
After sampling and holding, the A/D converter converts the sample to a digital number
(as shown in Fig 3 (c)).
2 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Fig. 3 A/D converter process (sampling time is 0.5 second)


Note that, the leftmost bit of any binary code has the most weight (one half of the Full
Scale [FS]) and is called the Most Significant Bit (MSB). On the other hand, the
rightmost bit has the least weight and is called the Least Significant Bit (LSB). The
quantization level (Q) is always equal the LSB. Moreover, the quantization error varies
between 0 and Q. To reduce that error, we need to increase the number of quantization
levels (this is achieved by increasing the number of bits).
The sampling process is represented by switch as shown below.

y Continuous signal Discontinuous signal


y
*

*
y y

9 12
1 3 5 7 9 11 t (sec) 1 3 6 t (sec)
T = 1 sec
*
y

9 12
3 6 t (sec)
T = 3 sec

3 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

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



∗ (𝑡)
𝑦 = ∑ 𝑦(𝑘𝑇)𝛿(𝑡 − 𝑘𝑇)
𝑘=0
1. At sampling times, strength of impulse is equal to value of input signal.
2. Between sampling times, it is zero.

If we take Laplace transform of both sides of the previous equation, then:


𝑌 ∗ (𝑠) = 𝑦(0) ℒ{𝛿(𝑡)} + 𝑦(𝑇)ℒ{𝛿(𝑡 − 𝑇)} + 𝑦(2𝑇) ℒ{𝛿(𝑡 − 2𝑇)} + ⋯
𝑌 ∗ (𝑠) = 𝑦(0) + 𝑦(𝑇)𝑒 −𝑇𝑠 + 𝑦(2𝑇) 𝑒 −2𝑇𝑠 + ⋯

𝑌 ∗ (𝑠) = ∑ 𝑦(𝑘𝑇)𝑒 −𝑘𝑇𝑠


𝑘=0

If we define z = eTs

𝑌 ∗ (𝑠) = ∑ 𝑦(𝑘𝑇)𝑧 −𝑘
𝑘=0
This will be explained later as z transforms.
3. Digital to Analog (D/A) Converter:

D/A converter process is simple and instantaneous. The weighted voltages are summed
together to yield the analog output. For example, in Fig. 4, three weighted voltages are
summed. The three-bit binary code is represented by electronic switches. Thus, if the
binary number is 110, the center and bottom switches are on, and the analog output is
6 volts.

Fig. 4 D/A process


4 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

In order to eliminate the zero value between sampling interval, a Holder device is used.
* m (t)
m (kT)

0 t 0 t
1T 3T 5T 7T 1T 3T 5T 7T

(a) First-order Hold (b) Zero-order Hold


Fig. 5 Types of holder elements
According to the slope of the line connecting between two successive points, the holder
took its name. For example, the slope of line in Fig. 5(b) is zero; therefore, the hold
element is called zero-order holder. Moreover, the slope of line in Fig. 5(a) is linear;
therefore, the hold element is called first-order holder.

4. Modelling of Sampler

The objective at this point is to derive a mathematical model for the digital computer
as represented by a sampler and zero-order hold. Consider the sampling model shown
in Fig. 6, where the sampler S(t) is represented by two step functions (one +ve and
another −ve) as shown in figure 6:

Fig. 6 Pulse train representation of sampler


𝑆(𝑡) = ∑ 𝑢(𝑡 − 𝑘𝑇) − 𝑢(𝑡 − (𝑘 + 1)𝑇)


𝑘=0
Where k is an integer 0, 1, 2, … etc
T is the period of the pulse train that represent the sampling period.

5 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

𝑓 ∗ (𝑡) = 𝑓(𝑡) × ∑ 𝑢(𝑡 − 𝑘𝑇) − 𝑢(𝑡 − (𝑘 + 1)𝑇)


𝑘=0
*
Since the sampled signal f (t) is only defined at t = kT, then we can rewrite the above
equation as:

∗ (𝑡)
𝑓 = ∑ 𝑓(𝑘𝑇){𝑢(𝑡 − 𝑘𝑇) − 𝑢(𝑡 − (𝑘 + 1)𝑇)}
𝑘=0
Taking Laplace

∗ (𝑠)
𝑒 −𝑘𝑇𝑠 − 𝑒 −(𝑘+1)𝑇𝑠
𝐹 = ∑ 𝑓(𝑘𝑇) { }
𝑠
𝑘=0

1 − 𝑒 −𝑇𝑠
𝐹 ∗ (𝑠) = ∑ 𝑓(𝑘𝑇)𝑒 −𝑘𝑇𝑠 { } (1)
𝑠
𝑘=0
The above equation has two terms:
The first term ∑∞
𝑘=0 𝑓(𝑘𝑇)𝑒
−𝑘𝑇𝑠
represents the samples function. But the second term
1−𝑒 −𝑇𝑠
represents the zero-order hold as shown in Fig. 7.
𝑠

Fig. 7 Sampler with zero-order hold


Based on the Laplace transform of the sampled signal given by eqn. (1), then the zero-
order hold is represented by:
1 − 𝑒 −𝑇𝑠
𝑍. 𝑂. 𝐻 =
𝑠
In this chapter, we will assume we are sampling the continuous time signal x(t) at a
uniform sampling rate. The time interval between samples will be denoted by T. Thus,
we will denote the discrete-time (sampled) values as x(0), x(T), x(2T);. . . ; x(kT). This
is shown graphically in Fig. 8. Sometimes we remove the explicit dependence on the

6 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

sampling interval T and just write x(0), x(1), x(2), … , x(k), since the sample interval is
the same for all of the discrete samples.

Fig. 8 Analog signal x(t) and Discrete signal x(kT)


On the other hand, if first-order holder is used, its transfer function will be:
2
1 − 𝑒 −𝑇𝑠 𝑇𝑠 + 1
( )
𝑠 𝑇

5. Difference Equation and Differential Equation


A differential equation
• Expresses the change in some variable as a result of an infinitesimal change in
another variable.
• Dealing with variables which are functions of time.
A difference equation
• Expresses the change in some variable as a result of a finite change in another
variable.
• Time discretization, (sequences of discrete numbers).
• These discrete numbers may come from sampling a continuous variable, or
they may be generated within a computer.

7 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Consider the mass-spring-damper shown in Fig. 8, the differential equation that


represents the displacement y(t) is:
𝐹(𝑡) = 𝑚𝑦̈ (𝑡) + 𝐵𝑦̇ (𝑡) + 𝐾𝑦(𝑡)
Where F is applied force, m is the mass, B is damping constant, and K is spring
constant.
Rearranging above equation in following form
1 𝐵 𝐾
𝑦̈ (𝑡) = 𝐹(𝑡) − 𝑦̇ (𝑡) − 𝑦(𝑡)
𝑚 𝑚 𝑚
The block diagram representing the above differential equation is shown in Fig. 9.

Fig. 8 Mass-spring-damper system

𝑦̈ (t) 𝑦̇ (t) 𝑦(t)


𝐹(𝑡) 1
න 𝑑𝑡 න 𝑑𝑡
𝑚

𝐵

𝑚

𝐾

𝑚

Fig. 9 Block diagram representing the differential equation


The differential equation mentioned above is converted to difference equation as:
1 𝐵 𝐾
𝑦(𝑘 + 2) = 𝐹(𝑘) − 𝑦(𝑘 + 1) − 𝑦(𝑘)
𝑚 𝑚 𝑚
The block diagram representing the above difference equation is shown in Fig. 10.

8 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

𝐹(𝑘) 𝑦(𝑘 + 2) 𝑦(𝑘 + 1) 𝑦(𝑘)


1 1 1

𝑚 𝑧 𝑧

𝐵

𝑚

𝐾

𝑚

Fig. 10 Block diagram representing the difference euation


Where the term Z−1 represents the delay acting on sequence.

𝑦(𝑘) 𝑦(𝑘 + 1)
Z

𝑦(𝑘) 𝑦(𝑘 − 1)
Z−1

Example:
Consider the difference equation given below
𝑦(𝑘 + 3) + 2𝑦(𝑘 + 2) + 4𝑦(𝑘 + 1) − 𝑦(𝑘) = 𝑢(𝑘 + 1) + 3𝑢(𝑘)
What is the order of this difference equation? Is this equation linear or nonlinear, time
variant or time invariant, homogenous or non-homogenous?
The above equation is 3rd order due to the (k+3) term,
The above equation is Linear and Time invariant, because all coefficients are constants
(1, 2, 4 and −1),
The above equation is non-homogenous, as the coefficients regarding the input (u) are
nonzero

9 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

In the next section, we start to create a transform approach to digital systems by


introducing the z-transform.

6. Z-Transform
For discrete signals Laplace transform can’t be used. Laplace transform is used with
analog signals. For discrete signals, Laplace transform is replaced by another related
transform called the z-transform. The z-transform will be used for discrete signals.
As Laplace transform converts the differential equations into algebraic terms with
respect to s, z-transform converts the difference equations into algebraic terms with
respect to z. Both transformations are matching a complex quantity to the points of a
region of the complex plane.
It should be noted that the z-plane (i.e., the domain of z-transform) is organized in a
polar form, while the s-plane (i.e., the domain of Laplace transform) is in a Cartesian
form as shown in Fig. 11.

10 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Fig. 11, Cartesian plane of S and polar plane of Z



𝑋(𝑠) = න 𝑥(𝑡). 𝑒 𝑠𝑡 . 𝑑𝑡
𝑡=0
By replacing the time (t) in continuous domain by (kT) in discrete domain and
considering unity sampling (T=1), we get:
𝑘=∞

𝑋(𝑧) = ∑ 𝑥[𝑘𝑇]. 𝑍 −𝑘𝑇 = 𝑥0 + 𝑥1 𝑍 −1 + 𝑥2 𝑍 −2 + ⋯


𝑘=0
The above equation is a valuable tool for analyzing discrete linear time-invariant (LTI)
systems and it is called z-transform.
The relation between S-plane and Z-plane is governed by:
𝑍 = 𝑒 𝑆𝑇
Replacing S by 𝜎 + 𝑗𝜔 and assuming the sampling period (T) is 1
𝑍 = 𝑟𝑒 𝑗𝜔 = 𝑒 𝜎+𝑗𝜔 = 𝑒 𝜎 . 𝑒 𝑗𝜔
𝑟 = 𝑒 𝜎 𝑜𝑟 𝜎 = ln (𝑟)
As a consequence of the above differences, vertical lines in s-plane become circles in
z-plane. Therefore, the imaginary axis of s-plane, that is, the line formed by setting σ =
0, will reflect to a circle of radius r = 1 in the z-plane. So, when σ = 0 in s-plane,
corresponds to r = 1 in z-plane. For any point located in the left half of s-plane (σ < 0)
corresponds to a point located within the unit circle in the z-plane. A similar behavior
is realized for any point located in the right half of s-plane will give a point located
outside the unit circle in the z-plane as explained in Fig. 12.
For example, a continuous-time system is stable if its poles are in the left s-half-plane.
Correspondingly, a discrete-time system is stable if its poles are located inside the unit
circle of z-plane as it will explain in chapter 5.
11 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Fig. 12 Mapping from S-plane to Z-plane


We must pay attention to how the frequency variable, ω, is used in the two transforms.
In continuous S plane, the frequency varies from 0 to +∞ in upper half, and from 0 to
−∞ in the lower half. In comparison, a discrete Z plane can only have a frequency
between 0 and π in the upper half and between 0 and −π in the lower half. That is, the
frequency must be between 0 and 0.5 when expressed as a fraction of the sampling rate.
This matches the geometry of the z-plane when we interpret ω to be an angle expressed
in radians.

12 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Finally, it is important to know that, z-transform is restricted to causal signals (i.e.,


signals with zero values for negative time) and the one-sided z-transform.
6.1 Z-transform of Standard Functions
6.1.1 Unit Impulse
1, 𝑘=0
𝛿(𝑘) = {
0, 𝑘≠0

𝛿(𝑧) = 1
6.1.2 Unit Step
1, 𝑘≥0
𝑢(𝑘) = {
0, 𝑘<0


−1 −2 −3 −𝑘
𝑈(𝑧) = 1 + 𝑧 +𝑧 +𝑧 + ⋯+ 𝑧 = ∑ 𝑧 −𝑘
𝑘=0

This is called the open-form solution


Recall that sum of an infinite geometric series is given by the formula
1𝑠𝑡 𝑡𝑒𝑟𝑚
𝑆𝑢𝑚 = , |𝑟| < 1
1 − 𝑟𝑎𝑡𝑖𝑜 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑎𝑛𝑦 𝑡𝑤𝑜 𝑠𝑢𝑐𝑐𝑒𝑠𝑖𝑣𝑒 𝑡𝑒𝑟𝑚𝑠 (𝑟)
1 𝑧
𝑈(𝑧) = = , |𝑧| > 1
1 − 𝑧 −1 𝑧 − 1
This is called the closed-form solution
For the above expression of U(z) (open form), at Z1, U(z) →  (not converge). On
the other hand, at Z>1, U(z) → 1 (converge). Therefore, it is necessary to specify the
region of (z) over which the function U(z) is convergent.
13 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

6.1.3 Unit Ramp


𝑘, 𝑘≥0
𝑟(𝑘) = {
0, 𝑘<0
𝑟(𝑘)

……

𝑘
0 1 2 3

𝑟(𝑘) = 𝑘  1

𝑚
𝑑 𝑚
𝑧{𝑘 𝑓(𝑘)} = (−𝑧 ) 𝐹(𝑧), 𝑚=1
𝑑𝑧
1
𝑑
𝑧{𝑘1 𝑓(𝑘)} = (−𝑧 ) 𝐹(𝑧)
𝑑𝑧
𝑍
𝑓(𝑘) = 1, 𝑡ℎ𝑒𝑛 𝑓(𝑧) =
𝑍−1

𝑧
𝑅(𝑧) =
(𝑧 − 1)2
In general, for a sampling time (T) rather than unity,
𝑇𝑧
𝑅(𝑧) =
(𝑧 − 1)2
6.1.4 Polynomial function
𝑎𝑘 , 𝑘≥0
𝑢(𝑘) = {
0, 𝑘<0

14 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

𝑈(𝑧) = 1 + 𝑎𝑧 −1 + 𝑎2 𝑧 −2 + 𝑎3 𝑧 −3 + ⋯ + 𝑎𝑘 𝑧 −𝑘 = ∑(𝑎−1 𝑧)−𝑘


𝑘=0
1 𝑧
𝑈(𝑧) = =
1 − 𝑎𝑧 −1 𝑧 − 𝑎
6.1.5 Exponential function
𝑒 −𝑎𝑘𝑇 , 𝑘≥0
𝑢(𝑘) = {
0, 𝑘<0
𝑈(𝑧) = 1 + 𝑒 −𝑎𝑇 𝑧 −1 + 𝑒 −2𝑎𝑇 𝑧 −2 + 𝑒 −3𝑎𝑇 𝑧 −3 + ⋯ + 𝑒 −𝑎𝑘𝑇 𝑧 −𝑘
1 𝑧
𝑈(𝑧) = =
1 − 𝑒 −𝑎𝑇 𝑧 −1 𝑧 − 𝑒 −𝑎𝑇
6.1.6 Sinusoidal/Cosinusoidal function
As we know
𝑒 𝑗𝜔𝑡 = cos(𝜔𝑡) + 𝑗𝑠𝑖𝑛(𝜔𝑡)
𝑒 −𝑗𝜔𝑡 = cos(𝜔𝑡) − 𝑗𝑠𝑖𝑛(𝜔𝑡)
From these two equations;
1
cos(𝜔𝑡) = (𝑒 𝑗𝜔𝑡 + 𝑒 −𝑗𝜔𝑡 )
2
1
sin(𝜔𝑡) = (𝑒 𝑗𝜔𝑡 − 𝑒 −𝑗𝜔𝑡 )
2𝑗
1 𝑗𝜔𝑡 −𝑗𝜔𝑡
𝑒 𝑗𝜔𝑡 𝑒 −𝑗𝜔𝑡
𝒵(cos(𝜔𝑡)) = 𝒵 ( (𝑒 +𝑒 )) = 𝒵 ( )+𝒵( )
2 2 2
1 𝑧 𝑧
𝑋(𝑍) = 𝒵(cos(𝜔𝑡)) = {( ) + ( )}
2 𝑧 − 𝑒 𝑗𝜔𝑇 𝑧 − 𝑒 −𝑗𝜔𝑇
1 𝑍(2𝑍 − (𝑒 𝑗𝜔𝑇 + 𝑒 −𝑗𝜔𝑇 ))
𝑋(𝑍) =
2 𝑍 2 − (𝑒 𝑗𝜔𝑇 + 𝑒 −𝑗𝜔𝑇 )𝑍 + 1
𝑒 𝑗𝜔𝑇 + 𝑒 −𝑗𝜔𝑇
2
𝑍 −𝑍
𝑋(𝑍) = 2 2
𝑍 − (𝑒 𝑗𝜔𝑇 +𝑒 −𝑗𝜔𝑇 )𝑍 + 1
𝑍 2 − Zcos(𝜔𝑇)
𝑋(𝑍) = 2
𝑍 − 2𝑍cos (𝜔𝑇) + 1

15 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Similarly, we can obtain the Z-transform of sinusoidal function as:


𝑍 sin(𝜔𝑇)
𝑋(𝑍) = 𝒵(sin(𝜔𝑡)) =
𝑍 2 − 2𝑍cos (𝜔𝑇) + 1
Example:
Obtain the z transform of the curve x(t) shown below assuming T=1 sec.

𝑓1 (𝑡) = 0.25 𝑟(𝑡) × {𝑢(𝑡) − 𝑢(𝑡 − 4)}


𝑓1 (𝑡) = 0.25 𝑟(𝑡) × 𝑢(𝑡) − 0.25 𝑟(𝑡) × 𝑢(𝑡 − 4)
𝑓1 (𝑡) = 0.25 𝑟(𝑡) × 𝑢(𝑡) − 0.25 𝑟(𝑡 − 4 + 4) × 𝑢(𝑡 − 4)
𝑓1 (𝑡) = 0.25 𝑟(𝑡) × 𝑢(𝑡) − 0.25 𝑟(𝑡 − 4) × 𝑢(𝑡 − 4) − 𝑢(𝑡 − 4)
𝑓1 (𝑡) = 0.25 𝑟(𝑡) − 0.25 𝑟(𝑡 − 4) − 𝑢(𝑡 − 4)
𝑓2 (𝑡) = 𝑢(𝑡 − 4)
𝑥(𝑡) = 𝑓1 (𝑡) + 𝑓2 (𝑡) = 0.25 𝑟(𝑡) − 0.25 𝑟(𝑡 − 4)
As we know, the z transform of ramp function is
𝑇𝑧 𝑧
2
= (𝑎𝑠 𝑇 = 1)
(𝑧 − 1) (𝑧 − 1)2
Also, the z-transform of delayed ramp function is

−4
𝑇𝑧 𝑇𝑧 −3 𝑧 −3
𝑧 = = (𝑎𝑠 𝑇 = 1)
(𝑧 − 1)2 (𝑧 − 1)2 (𝑧 − 1)2
0.25 𝑧 0.25 𝑧 −3 0.25𝑧(1 + 𝑧 −4 )
𝑋(𝑧) = + =
(𝑧 − 1)2 (𝑧 − 1)2 (𝑧 − 1)2

16 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

6.2 Properties of Z-transform


The properties of the z-transform have a very similar meaning to the properties of the
Laplace transform. The most important properties of the z-transform, commonly used
for problem solving, are presented below.

6.2.1 Linearity
Suppose we have two functions along with their respective Z transforms:
𝑥1 [𝑘] ↔ 𝑋1 (𝑧) 𝑎𝑛𝑑 𝑥2 [𝑘] ↔ 𝑋2 (𝑧)
The property of linearity means that
𝒵(𝑎 𝑥1 [𝑘] + 𝑏 𝑥2 [𝑘]) = 𝑎 𝑋1 (𝑧) + 𝑏 𝑋2 (𝑧)
Where a and b are constants.
Example:
𝑓(𝑘) = 2 × 1(𝑘) + 4 × 𝛿(𝑘), 𝑘 = 0,1,2, …
𝐹(𝑧) = 𝒵{2 × 1(𝑘) + 4 × 𝛿(𝑘)}
𝐹(𝑧) = 2 × 𝒵{1(𝑘)} + 4 × 𝒵{𝛿(𝑘)}
𝑧 6𝑧 − 4
𝐹(𝑧) = 2 × +4=
𝑧−1 𝑧−1
17 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

6.2.2 Time Reverse


Suppose we have a function with its Z transform:
𝑥[𝑘] ↔ 𝑋(𝑧)
Then
1
𝑥[−𝑘] ↔ 𝑋 ( )
𝑧
6.2.3 Time Delay (Right Shift)
Suppose we have a function with its Z transform:
𝑥[𝑘] ↔ 𝑋(𝑧)
Then
𝑥[𝑘 − 𝑛] ↔ 𝑍 −𝑛 𝑋(𝑧)
Example:
4, 𝑘 = 2,3,4, …
𝑓(𝑘) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
The given sequence is a sampled step starting at k-2 rather than k=0 (i.e. it is delayed
by two sampling periods).

6.2.4 Time Advance (Left Shift)


𝑥[𝑘] ↔ 𝑋(𝑧)
Then
𝑥[𝑘 + 1] ↔ 𝑍𝑋(𝑧) − 𝑍𝑋(0)
𝑥[𝑘 + 2] ↔ 𝑍 2 𝑋(𝑧) − 𝑍 2 𝑋(0) − 𝑍𝑋(1)
𝑥[𝑘 + 3] ↔ 𝑍 3 𝑋(𝑧) − 𝑍 3 𝑋(0) − 𝑍 2 𝑋(1) − 𝑍𝑋(2)
𝑥[𝑘 + 4] ↔ 𝑍 4 𝑋(𝑧) − 𝑍 4 𝑋(0) − 𝑍 3 𝑋(1) − 𝑍 2 𝑋(2) − 𝑍𝑋(3)
In general
𝑥[𝑘 + 𝑛] ↔ 𝑍 𝑛 𝑋(𝑧) − 𝑍 𝑛 𝑋(0) − 𝑍 𝑛−1 𝑋(1) − 𝑍 𝑛−2 𝑋(2) − ⋯ − 𝑍𝑋(𝑛 − 1)

Example:
Using the time advance property, find the z-transform of the causal sequence
𝑓(𝑘) = {4, 8, 16, 32, … }
The sequence can be written as
𝑓(𝑘) = 2𝑘+2 = 𝑦(𝑘 + 2) 𝑤ℎ𝑒𝑟𝑒 𝑦(𝑘) = 2𝑘
𝑍
𝑌(𝑧) =
𝑍−2
18 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

From y(k) → y(0) = 1 and y(1) = 2


𝑍 4𝑍
𝑦[𝑘 + 2] ↔ 𝑍 2 𝑌(𝑧) − 𝑍 2 𝑦(0) − 𝑍𝑦(1) = 𝑍 2 − 𝑍 2 − 2𝑍 =
𝑍−2 𝑍−2
4𝑍
𝐹(𝑧) =
𝑍−2
Example:
Calculate the Z-transform and the region of conversion for the following two functions:
5 𝑘 5 𝑘+5
𝑥[𝑘] = ( ) 𝑢[𝑘] 𝑎𝑛𝑑 𝑦[𝑘] = ( ) 𝑢[𝑘 + 5]
6 6
For the first function x[k] takes zero value at k < 0 as shown; So, it called causal
function (right defined).

Based on z-transform table:


𝑧 5
𝑋(𝑧) = |𝑧| >
5 6
𝑧−
6
For the second function y[k] arises by shifting x[k] by 5 units to the left.
𝑦[𝑘] = 𝑥[𝑘 + 5]
𝑦[𝑘] = 𝑍 5 𝑋(𝑧) − 𝑍 5 𝑋(0) − 𝑍 4 𝑋(1) − 𝑍 3 𝑋(2) − 𝑍 2 𝑋(3) − 𝑍𝑋(4)
There are some negative values for n as shown below; So, it called noncausal function.

19 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Considering all initial values X[0]=1, X[1]=5/6, X[2]=25/36, X[3]=125/216 and


X[4]=625/1296
Based on z-transform table:
𝑧 5 25 125 625 5
𝑌(𝑧) = 𝑧 5 − 𝑧5 − 𝑧4 − 𝑧3 − 𝑧2 −𝑍 |𝑧| >
5 6 36 216 1296 6
𝑧−
6
6.2.5 Multiplication by ak
If x(t) has the z transform X(Z), then x(t)at has the z transform X(Z/a)
Example:
Find the z-transform of the following function
𝑦[𝑘] = 𝑎𝑘 𝑢[𝑘]
Recall that the z-transform of a sampled step is
𝑍 −1
𝑎−1 𝑍 𝑍
𝑋(𝑍) = → 𝑋(𝑎 𝑍) = −1 =
𝑍−1 𝑎 𝑍−1 𝑍−𝑎
Example:
Find the z-transform of the following function
𝑥(𝑛) = (0.5)𝑛 sin(0.25𝜋𝑛)𝑢(𝑛)
As we know, the z transform of sin(0.25n) is
𝑧 sin(0.25𝜋)
𝑧 2 − 2𝑧 cos(0.25𝜋) + 1
Replace each Z by Z/0.5 i.e 2Z
2𝑧 sin(0.25𝜋)
𝑋(𝑧) =
(2𝑧)2 − 2(2𝑧) cos(0.25𝜋) + 1
Dividing num and den by (2)2
0.5 𝑧 sin(0.25𝜋) 0.3536𝑧
𝑋(𝑧) = =
𝑧 2 − 2(0.5𝑧) cos(0.25𝜋) + (0.5)2 𝑧 2 − 0.7071𝑧 + 0.25

6.2.6 Multiplication by Exponential (complex translation theorem)


If x(t) has the z transform X(Z), then x(t)e-aT has the z transform X(ZeaT)

20 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Example:
Find the z-transform of the following function
𝑦[𝑘] = 𝑒 −𝑘 𝑢[𝑘]
Recall that the z-transform of a sampled step is
𝑍 1
𝑒1𝑍 𝑍
𝑋(𝑍) = → 𝑋(𝑒 𝑍) = 1 =
𝑍−1 𝑒 𝑍 − 1 𝑍 − 𝑒 −1
Therefore,
𝑍
𝑌(𝑍) = 𝑋(𝑒 1 𝑍) =
𝑍 − 𝑒 −1
Example:
Find the z transform of the following function
𝑥(𝑛) = 𝑒 −0.1𝑛 cos(0.25𝜋𝑛) 𝑢(𝑛)
As we know, the z transform of cos(0.25n) is
𝑧 (𝑧 − cos(0.25𝜋))
𝑧 2 − 2𝑧 cos(0.25𝜋) + 1
Replace each Z by Ze0.1
𝑧𝑒 0.1 (𝑧𝑒 0.1 − cos(0.25𝜋))
𝑋(𝑧) =
(𝑧𝑒 0.1 )2 − 2𝑧𝑒 0.1 cos(0.25𝜋) + 1
Dividing num and den by (e0.1)2
𝑧 (𝑧 − 𝑒 −0.1 cos(0.25𝜋)) 𝑧(𝑧 − 0.6398)
𝑋(𝑧) = 2 =
𝑧 − 2𝑧𝑒 −0.1 cos(0.25𝜋) + (𝑒 −0.1 )2 𝑧 2 − 1.2796𝑧 + 0.8187
6.2.7 Convolution
Suppose we have two functions along with their respective Z transforms:
𝑥1 [𝑘] ↔ 𝑋1 (𝑧) 𝑎𝑛𝑑 𝑥2 [𝑘] ↔ 𝑋2 (𝑧)
The convolution property means that
𝒵(𝑥1 [𝑘] ∗ 𝑥2 [𝑘]) = 𝑋1 (𝑧) ∗ 𝑋2 (𝑧)
6.2.8 Differentiation in z-Domain (Complex Differentiation)
Suppose we have a function with its Z transform:
𝑥[𝑘] ↔ 𝑋(𝑧)
Then
21 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

𝑑𝑋(𝑧)
𝑘 𝑥[𝑘] ↔ −𝑧
𝑑𝑧
We used this property to proof the Z-transform of ramp function.
Example:
Calculate the z-transform of the following function:
𝑦[𝑘] = 𝑘. 2𝑘 𝑢[𝑘]
𝑍 𝑑𝑋(𝑧) (𝑍 − 2) × 1 − 𝑍(1) −2
𝑥[𝑘] = 2𝑘 𝑢[𝑘] → 𝑋(𝑍) = → = =
𝑍−2 𝑑𝑧 (𝑍 − 2)2 (𝑍 − 2)2
𝑑𝑋(𝑧) 2𝑍
𝑌(𝑍) = −𝑍 =
𝑑𝑧 (𝑍 − 2)2
Example:
Calculate the z-transform of the following function:
1 𝑘
𝑦[𝑘] = 𝑘. ( ) 𝑢[𝑘 − 2]
2
As we know:
1 𝑘−2 −2
𝑍 𝑍 −1 1
𝑥[𝑘] = ( ) 𝑢[𝑘 − 2] ↔ 𝑋(𝑧) = 𝑍 = , |𝑍| >
2 1 1 2
𝑍− 𝑍−
2 2
2 𝑘−2 2
1 1 1 1 𝑍 −1 1
𝑔[𝑘] = ( ) ( ) 𝑢[𝑘 − 2] = ( ) 𝑥[𝑘] ↔ 𝐺(𝑧) = , |𝑍| >
2 2 2 4𝑍 − 1 2
2
Also, we know that:
𝑑𝐺(𝑧)
𝑦[𝑘] = 𝑘. 𝑔[𝑘] ↔ 𝑌(𝑧) = −𝑧
𝑑𝑧
1 −2 −1
𝑑𝐺(𝑧) 1 (𝑍 − 2) (−𝑍 ) − 𝑍 (1)
=
𝑑𝑧 4 1 2
(𝑍 − 2)
−1 1 1 −1
1 𝑍 (𝑍 − 2) + 1 1 2 − 2 𝑍
𝑌(𝑧) = =
4 1 2 4 1 2
(𝑍 − 2) (𝑍 − 2)

6.2.9 Initial Value Theorem


lim 𝑥[𝑘] = 𝑥[0] = lim 𝑋(𝑧)
𝑘→0 𝑧→∞

22 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

6.2.10 Final Value Theorem


lim 𝑥[𝑘] = 𝑥[∞] = lim(𝑧 − 1)𝑋(𝑧)
𝑘→∞ 𝑧→1
Example:
Calculate the initial value and the final value of the following function:
2𝑧 2
𝑌(𝑧) =
(𝑧 − 1)(𝑧 − 0.5)(𝑧 − 0.25)
2
𝑌(𝑧) =
0.5 0.25
(𝑧 − 1) (1 − ) (1 −
𝑧 𝑧 )
The initial value is given by:
2
𝑦[0] = lim 𝑌(𝑧) = = 0
𝑧→∞ ∞
The final value is given by:
2𝑧 2 2 16
𝑦[∞] = lim(𝑧 − 1)𝑌(𝑧) = lim = =
𝑧→1 𝑧→1 (𝑧 − 0.5)(𝑧 − 0.25) 0.5 × 0.75 3
Example:

Example:
Obtain the Z-transform of the following transfer function considering T=1
1
𝑋(𝑠) =
𝑆(𝑆 + 1)
Using partial fraction
1 1
𝑋(𝑠) = −
𝑆 𝑆+1
23 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Taking inverse Laplace


𝑥(𝑡) = 1 − 𝑒 −𝑡
In discrete form, the function will be
𝑥(𝑘) = 𝑢(𝑘) − 𝑒 −𝑘
Taking the Z-transform
𝑍 𝑍 0.6321 𝑍
𝑋(𝑧) = − =
𝑍 − 1 𝑍 − 𝑒 −1 (𝑍 − 1)(𝑍 − 0.3679)

Example:
Obtain the Z-transform of the following transfer function considering T=1
1
𝑋(𝑠) =
(𝑆 + 2)(𝑆 + 1)2
Using partial fraction
2 1 2
𝑋(𝑠) = − −
𝑆 + 1 (𝑆 + 1)2 𝑆 + 2
Taking inverse Laplace
𝑥(𝑡) = 2𝑒 −𝑡 − 𝑡𝑒 −𝑡 − 2𝑒 −2𝑡
Taking the Z-transform
2𝑍 𝑑 𝑍 2𝑍
𝑋(𝑧) = − {−𝑧 ( )} −
𝑍 − 𝑒 −1 𝑑𝑧 𝑍 − 𝑒 −1 𝑍 − 𝑒 −2
we obtain the z transform from Laplace directly
2𝑍 𝑍𝑒 −1 2𝑍
𝑋(𝑧) = − −
𝑍 − 𝑒 −1 (𝑍 − 𝑒 −1 )2 𝑍 − 𝑒 −2
2𝑍 2 − 3𝑍𝑒 −1 2𝑍
𝑋(𝑧) = −
(𝑍 − 𝑒 −1 )2 𝑍 − 𝑒 −2
2𝑍 2 − 1.1036𝑍 2𝑍
𝑋(𝑧) = −
(𝑍 − 0.3679)2 𝑍 − 0.13534

7. Z-Transform Table

Instead of performing summation to get the Z-transform as explained in


𝑛=∞

𝑋(𝑧) = ∑ 𝑥[𝑘]. 𝑍 −𝑘
𝑘=−∞
We can use the following table:

24 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Signal z-Transform Region of


No.
𝒙(𝒏), 𝒏≥𝟎 𝒁(𝒙(𝒏)) = 𝑿(𝒛) Convergence

1 𝑥(𝑛) ∑ 𝑥(𝑛) 𝑧−𝑛
𝑛=0
2 𝛿(𝑛) 1 Entire z-plane
𝑎𝑧
3 𝑎 𝑢(𝑛) |𝑧| > 1
𝑧−1
𝑧
4 𝑛 𝑢(𝑛) |𝑧| > 1
(𝑧 − 1)2
𝑧(𝑧 + 1)
5 𝑛2 𝑢(𝑛) |𝑧| > 1
(𝑧 − 1)3
𝑧
6 𝑎𝑛 𝑢(𝑛) |𝑧| > |𝑎|
𝑧−𝑎
𝑧
7 𝑒−𝑛𝑎 𝑢(𝑛) |𝑧| > 𝑒−𝑎
𝑧 − 𝑒−𝑎
𝑎𝑧
8 𝑛 𝑎𝑛 𝑢(𝑛) |𝑧| > |𝑎|
(𝑧 − 𝑎)2
𝑧 sin(𝑎)
9 sin(𝑎𝑛) 𝑢(𝑛) 2
|𝑧| > |1|
𝑧 − 2𝑧 cos(𝑎) + 1
𝑧 (𝑧 − cos(𝑎))
10 cos(𝑎𝑛) 𝑢(𝑛) |𝑧| > |1|
𝑧2 − 2𝑧 cos(𝑎) + 1
[𝑎 sin(𝑏)] 𝑧
11 𝑎𝑛 sin(𝑏𝑛) 𝑢(𝑛) |𝑧| > |𝑎|
𝑧2 − [2𝑎 cos(𝑏)]𝑧 + 𝑎2
𝑧 [𝑧 − 𝑎 cos(𝑏)]
12 𝑎𝑛 cos(𝑏𝑛) 𝑢(𝑛) |𝑧| > |𝑎|
𝑧2 − [2𝑎 cos(𝑏)]𝑧 + 𝑎2
[𝑒−𝑎 sin(𝑏)] 𝑧
13 𝑒−𝑎𝑛 sin(𝑏𝑛) 𝑢(𝑛) |𝑧| > 𝑒−𝑎
𝑧2 − [2𝑒−𝑎 cos(𝑏)]𝑧 + 𝑒−2𝑎
𝑧 [𝑧 − 𝑒−𝑎 cos(𝑏)]
14 𝑒−𝑎𝑛 cos(𝑏𝑛) 𝑢(𝑛) |𝑧| > 𝑒−𝑎
𝑧2 − [2𝑒−𝑎 cos(𝑏)]𝑧 + 𝑒−2𝑎

8. Inverse Z-Transform
The implementation of z-transform results in the transformation from the discrete-time
domain to z-domain. The opposite procedure is implemented with the aid of the inverse
z-transform. The inverse z-transform is defined by
1
𝑥[𝑛] = 𝒵 −1 {𝑋(𝑧)} = ∮ 𝑋(𝑧)𝑧 𝑛−1 𝑑𝑧
2𝜋𝑗 𝑐
Where c is the closed contour within the region of convergence of X(z).
There are 3 methods for calculating the inverse transform of a function X(z)

25 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

1. Method of power series expansion (Long Division)


2. Method of partial fraction expansion
3. Method of complex integration (via the residue theorem)
Example:
Find the first 6 coefficients of the function x[n] when
4𝑍 −1
𝑋(𝑧) = −2
𝑍 − 2𝑍 −1 + 2
Convert all powers of Z to +ve powers
4𝑍 4𝑍
𝑋(𝑧) = =
1 − 2𝑍 + 2𝑍 2 2𝑍 2 − 2𝑍 + 1
By long division:

𝑋(𝑧) = 2𝑧 −1 + 2𝑧 −2 + 𝑧 −3 − 𝑧 −5 + ⋯
𝑥[𝑛] = {0, 2, 2, 1, 0, −1, … }

26 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

Example:
Find the first 5 coefficients of the function x[n] when
𝑍2 − 1
𝑋(𝑧) = 3
𝑍 + 2𝑍 + 4
By long division:

𝑋(𝑧) = 𝑧 −1 − 3𝑧 −3 − 4𝑧 −4 + ⋯
𝑥[𝑛] = {0, 1, 0, −3, −4, … }
Example:
Consider the sequence
𝑓(𝑘) = {1, 3, 2, 0, 4, 0, 0, 0}
Find F(z).

𝐹(𝑧) = ∑ 𝑓(𝑘) 𝑧 −𝑘
𝑘=0
0 −1 −2
𝐹(𝑧) = [1 × 𝑧 + 3 × 𝑧 +2×𝑧 + 4 × 𝑧 −4 ] = 1 + 3𝑧 −1 + 2𝑧 −2 + 4𝑧 −4
Example:
Compute the inverse z-transform of the function
𝑍
𝐹(𝑧) =
(𝑍 + 0.1)(𝑍 + 0.2)(𝑍 + 0.3)
Dividing both sides by (Z):
𝐹(𝑧) 1
=
𝑍 (𝑍 + 0.1)(𝑍 + 0.2)(𝑍 + 0.3)
Using partial fraction:

27 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

𝐹(𝑧) 𝐴 𝐵 𝐶
= + +
𝑍 𝑍 + 0.1 𝑍 + 0.2 𝑍 + 0.3
A = 50, B = −100 and C = 50
50𝑍 100𝑍 50𝑍
𝐹(𝑍) = − +
𝑍 + 0.1 𝑍 + 0.2 𝑍 + 0.3
Using Inverse Z-Transform
𝑓[𝑘] = 50(−0.1)𝑛 𝑢(𝑛) − 100(−0.2)𝑛 𝑢(𝑛) + 50(−0.3)𝑛 𝑢(𝑛), 𝑘>0
Example:
Compute the inverse z-transform of the function
𝑍 −2 + 𝑍 −1 + 1
𝑋(𝑧) =
0.2𝑍 −2 + 0.9𝑍 −1 + 1
Convert all powers of Z to +ve powers
𝑍 2 + 𝑍1 + 1 𝑍 2 + 𝑍1 + 1
𝑋(𝑧) = 2 =
𝑍 + 0.9𝑍 + 0.2 (𝑍 + 0.4)(𝑍 + 0.5)
Divide both sides by Z
𝑋(𝑧) 𝑍 2 + 𝑍1 + 1
=
𝑍 𝑍(𝑍 + 0.4)(𝑍 + 0.5)
Using partial fraction:
𝑋(𝑧) 𝑍 2 + 𝑍1 + 1 𝐴 𝐵 𝐶
= = + +
𝑍 𝑍(𝑍 + 0.4)(𝑍 + 0.5) 𝑍 𝑍 + 0.4 𝑍 + 0.5
𝑍 2 + 𝑍1 + 1 = 𝐴(𝑍 + 0.4)(𝑍 + 0.5) + 𝐵𝑍(𝑍 + 0.5) + 𝐶𝑍(𝑍 + 0.4)
At Z=0 1 = 0.2 A → A=5
At Z=−0.4 0.76 = −0.04 B → B= −19
At Z=−0.5 0.75 = 0.05 C → C= 15
𝑋(𝑧) 5 19 15
= − +
𝑍 𝑍 𝑍 + 0.4 𝑍 + 0.5
19𝑍 15𝑍
𝑋(𝑧) = 5 − +
𝑍 + 0.4 𝑍 + 0.5
Taking inverse Z transform:

28 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

𝑥[𝑛] = 5𝛿(𝑛) − 19(−0.4)𝑛 𝑢(𝑛) + 15(−0.5)𝑛 𝑢(𝑛)

Example:
Compute the inverse z-transform of the function
𝑍 3 + 2𝑍 + 1
𝑋(𝑧) =
(𝑍 − 0.1)(𝑍 2 + 𝑍 + 0.5)
As the quadratic term (in denominator) gives complex roots, no need to factorize it.
Divide both sides by Z:
𝑋(𝑧) 𝑍 3 + 2𝑍 + 1
=
𝑍 𝑍(𝑍 − 0.1)(𝑍 2 + 𝑍 + 0.5)
Using partial fractions:
𝑋(𝑧) 𝑍 3 + 2𝑍 + 1 𝐴 𝐵 𝐶𝑍 + 𝐷
= = + +
𝑍 𝑍(𝑍 − 0.1)(𝑍 2 + 𝑍 + 0.5) 𝑍 𝑍 − 0.1 𝑍 2 + 𝑍 + 0.5
A = −20
B = 19.689
C = 1.311
D = − 1.557
20𝑍 19.689𝑍 1.311𝑍 2 − 1.557𝑍
𝑋(𝑍) = − + +
𝑍 𝑍 − 0.1 𝑍 2 + 𝑍 + 0.5
𝒛 [𝒛 − 𝒂 𝐜𝐨𝐬(𝒃)]
𝒂𝒏 𝐜𝐨𝐬(𝒃𝒏) 𝒖(𝒏) →
𝒛𝟐 − [𝟐𝒂 𝐜𝐨𝐬(𝒃)]𝒛 + 𝒂𝟐
[𝒂 𝐬𝐢𝐧(𝒃)] 𝒛
𝒂𝒏 𝐬𝐢𝐧(𝒃𝒏) 𝒖(𝒏) →
𝒛𝟐 − [𝟐𝒂 𝐜𝐨𝐬(𝒃)]𝒛 + 𝒂𝟐
1.311𝑍(𝑍 − 1.1876) 1.311𝑍(𝑍 − 0.7071 × (−0.7071) − 1.6876)
= 2
𝑍 2 + 𝑍 + 0.5 𝑍 − 2 × 0.7071 × (−0.7071)𝑍 + (0.7071)2
1.311𝑍(𝑍 − 0.7071 × (−0.7071)) 2.2124𝑍

𝑍 2 − 2 × 0.7071 × (−0.7071)𝑍 + (0.7071)2 𝑍 2 − 2 × 0.7071 × (−0.7071)𝑍 + (0.7071)2
2.2124𝑍 4.4248 × 0.7071 × 0.7071𝑍
=
𝑍 2 − 2 × 0.7071 × (−0.7071)𝑍 + (0.7071)2 𝑍 2 − 2 × 0.7071 × (−0.7071)𝑍 + (0.7071)2

29 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

3𝜋
𝑥[𝑛] = −20𝛿(𝑛) + 19.689(0.1)𝑛 𝑢(𝑛) + 1.311(0.7071)𝑛 cos ( 𝑛) 𝑢(𝑛)
4
3𝜋
− 4.4248(0.7071)𝑛 sin ( 𝑛) 𝑢(𝑛)
4
Example:
For the discrete-time system shown below, if x[n]=n u(n), calculate the output y(n).

𝑍
𝑋(𝑧) =
(𝑍 − 1)2
𝑍 4𝑍 2
𝑌(𝑧) = 𝑋(𝑍)𝐻(𝑍) =
(𝑍 − 1)2 𝑍 2 − 0.25
𝑌(𝑧) 1 4𝑍 2 4𝑍 2
= =
𝑍 (𝑍 − 1)2 𝑍 2 − 0.25 (𝑍 − 0.5)(𝑍 + 0.5)(𝑍 − 1)2
𝑌(𝑧) 4𝑍 2 𝐴 𝐵 𝐶 𝐷
= = + + +
𝑍 (𝑍 − 0.5)(𝑍 + 0.5)(𝑍 − 1)2 𝑍 − 0.5 𝑍 + 0.5 𝑍 − 1 (𝑍 − 1)2
A= 4, B= −4/9, C= −32/9 and D = 16/3
4 32 16
4𝑍 𝑍 𝑍 𝑍
𝑌(𝑧) = − 9 − 9 + 3 2
𝑍 − 0.5 𝑍 + 0.5 𝑍 − 1 (𝑍 − 1)
4 32 16
𝑦[𝑛] = 4(0.5)𝑛 𝑢(𝑛) − (−0.5)𝑛 𝑢(𝑛) − 𝑢(𝑛) + 𝑛 𝑢(𝑛)
9 9 3
8. Solving Difference Equation
Example:
Solve the following linear difference equation,
3 1
𝑥(𝑘 + 2) − 𝑥(𝑘 + 1) + 𝑥(𝑘) = 1(𝑘)
2 2
5
With initial conditions 𝑥(0) = 1, 𝑥(1) =
2

1. Taking z-transform of given equation


3 1 𝑧
[𝑧 2 𝑋(𝑧) − 𝑧 2 𝑥(0) − 𝑧 𝑥(1)] − [𝑧 𝑋(𝑧) − 𝑧 𝑥(0)] + 𝑋(𝑧) =
2 2 𝑧−1
30 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

2. Solve for X(z)


3 1 𝑧 5 3
[𝑧 2 − 𝑧 + ]𝑋(𝑧) = + 𝑧 2 + ( − )𝑧
2 2 𝑧−1 2 2
𝑧[1 + (𝑧 + 1)(𝑧 − 1)] 𝑧3
𝑋(𝑧) = =
(𝑧 − 1)(𝑧 − 1)(𝑧 − 0.5) (𝑧 − 1)2 (𝑧 − 0.5)
3. Inverse z-transform
𝑋(𝑧) 𝑧2 𝐴 𝐵 𝐶
= = + +
𝑧 (𝑧 − 1)2 (𝑧 − 0.5) (𝑧 − 1)2 𝑧 − 1 𝑧 − 0.5
2𝑧 𝑧
𝑋(𝑧) = +
(𝑧 − 1)2 𝑧 − 0.5
𝑥(𝑘) = 2𝑘 + (0.5)𝑘
Example:
A relaxed (zero initial conditions) DSP system is described by the difference equation
𝑦(𝑛) + 0.1𝑦(𝑛 − 1) − 0.2𝑦(𝑛 − 2) = 𝑥(𝑛) + 𝑥(𝑛 − 1)
Determine the impulse response 𝒚(𝒏) due to the impulse sequence 𝒙(𝒏) = 𝜹(𝒏).
Taking z-transform of both sides of the given equation, we get
𝑍(𝑦(𝑛)) + 0.1𝑍(𝑦(𝑛 − 1)) − 0.2𝑍(𝑦(𝑛 − 2)) = 𝑍(𝑥(𝑛)) + 𝑍(𝑥(𝑛 − 1))
We have
𝒁(𝒚(𝒏)) = 𝒀(𝒛)
𝒁(𝒙(𝒏)) = 𝑿(𝒛)
Using shift theorem, we have
𝒁(𝒙(𝒏 − 𝟏)) = 𝒛−𝟏 𝑿(𝒛)
Also we can apply sift theorem for 𝒚 in case of zero initial conditions, i.e.,
𝒁(𝒚(𝒏 − 𝟏)) = 𝒛−𝟏 𝒀(𝒛)
𝒁(𝒚(𝒏 − 𝟐)) = 𝒛−𝟐 𝒀(𝒛)
Putting these values in Equation (1), we have
𝑌(𝑧) + 0.1𝑧 −1 𝑌(𝑧) − 0.2𝑧 −2 𝑌(𝑧) = 𝑋(𝑧) + 𝑧 −1 𝑋(𝑧)

31 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

⟹ 𝑌(𝑧)(1 + 0.1𝑧 −1 − 0.2𝑧 −2 ) = 𝑋(𝑧)(1 + 𝑧 −1 )


As 𝒙(𝒏) = 𝜹(𝒏) therefore, (from Table 1), 𝑿(𝒛) = 𝟏. The above equation can now be
written as
(1 + 𝑧 −1 )
𝑌(𝑧) =
(1 + 0.1𝑧 −1 − 0.2𝑧 −2 )
Multiplying both the numerator and the denominator with𝒛𝟐 we get
𝑧(𝑧 + 1)
𝑌(𝑧) =
(𝑧 2 + 0.1𝑧 − 0.2)
The denominator can be factorized as
𝑧(𝑧 + 1) 𝑧(𝑧 + 1)
𝑌(𝑧) = =
(𝑧 2 + 0.5𝑧 − 0.4𝑧 − 0.2) (𝑧(𝑧 + 0.5) − 0.4(𝑧 + 0.5))
𝑧(𝑧 + 1)
=
(𝑧 + 0.5)(𝑧 − 0.4)
𝑌(𝑧) (𝑧 + 1)
⟹ =
𝑧 (𝑧 + 0.5)(𝑧 − 0.4)
The right hand side of the above equation is a proper rational polynomial, with the
denominator polynomial having distinct poles, therefore, it can be written into partial
fractions as
𝑌(𝑧) 𝐴 𝐵
= +
𝑧 (𝑧 + 0.5) (𝑧 − 0.4)
To find out the unknown constants 𝑨 and 𝑩, we use partial fractions
𝐴 = −0.5556
𝐵 = 1.5556
𝑌(𝑧) −0.5556 1.5556
= +
𝑧 (𝑧 + 0.5) (𝑧 − 0.4)
−0.5556 𝑧 1.5556 𝑧
𝑌(𝑧) = +
(𝑧 + 0.5) (𝑧 − 0.4)
Taking inverse z-transform of both sides

32 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

−0.5556 𝑧 1.5556 𝑧
𝑦(𝑛) = 𝑍 −1 (𝑌(𝑧)) = 𝑍 −1 ( ) + 𝑍 −1 ( )
(𝑧 + 0.5) (𝑧 − 0.4)
𝑧 𝑧
= (−0.5556)𝑍 −1 ( ) + (1.5556)𝑍 −1 ( )
(𝑧 − (−0.5)) (𝑧 − 0.4)
= (−0.5556)(−0.5)𝑛 𝑢(𝑛) + (1.5556)(0.4)𝑛 𝑢(𝑛)
Thus the output signal is
𝒚(𝒏) = (−𝟎. 𝟓𝟓𝟓𝟔)(−𝟎. 𝟓)𝒏 𝒖(𝒏) + (𝟏. 𝟓𝟓𝟓𝟔)(𝟎. 𝟒)𝒏 𝒖(𝒏)
Example:
Solve for x(k) of the difference equation:
𝑥(𝑘 + 2) − 1.3679𝑥(𝑘 + 1) + 0.3679𝑥(𝑘) = 0.3679𝑢(𝑘 + 1) + 0.2642𝑢(𝑘)
Known that: u(k) = 0 for k  0, u(0) = 1, u(1) = 0.2142, u(2) = −0.2142, u(k) = 0 k=3,4,…
Also x(k) = 0 for k  0
From the given values of the input function, we can get an expression for U(z)
𝑈(𝑧) = 1 + 0.2142𝑧 −1 − 0.2142𝑧 −2
Taking the Z transform for both sides of the difference equation
[𝑧 2 𝑋(𝑧) − 𝑧 2 𝑥(0) − 𝑧 𝑥(1)] − 1.3679[𝑧 𝑋(𝑧) − 𝑧 𝑥(0)] + 0.3679𝑋(𝑧)
= 0.3679[𝑧 𝑈(𝑧) − 𝑧 𝑢(0)] + 0.2642𝑈(𝑧)
In the above equation x(0) = 0, u(0) = 1
𝑧 2 𝑋(𝑧) − 𝑧 𝑥(1) − 1.3679𝑧 𝑋(𝑧) + 0.3679𝑋(𝑧)
= 0.3679𝑧 𝑈(𝑧) − 0.3679𝑧 + 0.2642𝑈(𝑧)
It is clear that x(1) is unknown. To calculate its value, we substitute k= −1 in the given
difference equation
𝑥(1) − 1.3679𝑥(0) + 0.3679𝑥(−1) = 0.3679𝑢(0) + 0.2642𝑢(−1)
𝑥(1) = 0.3679
𝑋(𝑧)(𝑧 2 − 1.3679𝑧 + 0.3679) − 0.3679𝑧 = 𝑈(𝑧)(0.3679𝑧 + 0.2642) − 0.3679𝑧
𝑋(𝑧)(𝑧 2 − 1.3679𝑧 + 0.3679) = 𝑈(𝑧)(0.3679𝑧 + 0.2642)
0.3679𝑧 + 0.2642
𝑋(𝑧) = 𝑈(𝑧)
𝑧 2 − 1.3679𝑧 + 0.3679

33 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

0.3679𝑧 + 0.2642(1 + 0.2142𝑧 −1 − 0.2142𝑧 −2 )


𝑋(𝑧) =
𝑧 2 − 1.3679𝑧 + 0.3679
0.3679𝑧 + 0.343 − 0.0222𝑧 −1 − 0.0566𝑧 −2
𝑋(𝑧) =
𝑧 2 − 1.3679𝑧 + 0.3679
0.3679𝑧 3 + 0.343𝑧 2 − 0.0222𝑧 − 0.0566
𝑋(𝑧) =
𝑧 4 − 1.3679𝑧 3 + 0.3679𝑧 2
By long division we obtain:
𝑋(𝑧) = 0.3679𝑧 −1 + 0.8463𝑧 −2 + 𝑧 −3 + 𝑧 −4 + ⋯
𝑥(0) = 0
𝑥(1) = 0.3679
𝑥(2) = 0.8463
𝑥(3) = 1.0
𝑥(4) = 1.0
9. Matlab Code for Z-Transform and Inverse Z-Transform
ztrans → z-transform
iztrans → inverse z-transform
Compute the z-transform of f(k) = 2k using MATLAB
syms k, z
f = 2^k;
ztrans(f)
simplify(ans)

To verify the above result, we calculate the inverse z-transform of F(z)= z/(z - 2);
syms k, z
F = z/(z - 2);
iztrans(F)
ans = 2^k

References:

34 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein
Benha University Electrical Engineering Department
Faculty of Engineering at Shubra Dr. Ahmed Mustafa Hussein

[1] M. Sami Fadali, Antonio Visioli. Digital Control Engineering: Analysis and Design, Academic
Press (Elsevier), 3rd Edition, 2020
[2] Anastasia Veloni, Nikolaos Miridakis. Digital Control Systems: Theoretical Problems and
Simulation Tools, CRC Press, Taylor & Francis Group, 2018
[3] Katsuhiko Ogata. Discrete-Time Control Systems, 2nd ed. Prentice Hall, 1995.
[4] Nise, N. S. Control System Engineering, 6th ed. John Wiley & Sons Ltd., UK, 2011.
[5] Dorf, R. C. Modern Control Systems, 5th ed. Addison-Wesley, Reading, MA, 1989.

35 Chapter One: Introduction to Digital Control Systems Dr. Ahmed Mustafa Hussein

You might also like