0% found this document useful (0 votes)
113 views67 pages

000 Digital Control Lectures

1. A control system uses feedback to automatically maintain a parameter, such as temperature, at a set value. It consists of a controller, actuator, process and sensor. 2. There are two main types of control systems: open-loop systems which do not use feedback and closed-loop systems which do use feedback to correct errors. Closed-loop systems are more accurate and reliable. 3. Digital control systems offer advantages over analog systems like greater accuracy, flexibility, speed and lower cost due to advances in integrated circuits. Transfer functions describe the mathematical relationship between input and output for components in a control system.

Uploaded by

PX PR
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)
113 views67 pages

000 Digital Control Lectures

1. A control system uses feedback to automatically maintain a parameter, such as temperature, at a set value. It consists of a controller, actuator, process and sensor. 2. There are two main types of control systems: open-loop systems which do not use feedback and closed-loop systems which do use feedback to correct errors. Closed-loop systems are more accurate and reliable. 3. Digital control systems offer advantages over analog systems like greater accuracy, flexibility, speed and lower cost due to advances in integrated circuits. Transfer functions describe the mathematical relationship between input and output for components in a control system.

Uploaded by

PX PR
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/ 67

Introduction to control system

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.

Figure 1: A block diagram of a control system.


The set point is the input to the controller, which is a signal representing
the desired system output. The controller represents the electronic
intelligence of the control system. The actuator generates physical
movement, typically a motor. The actuator gets its instructions directly
from the controller, it is also called the final control element. The process
is the physical process that is being controlled. The controlled variable is
the ultimate output of the process; the actual parameter of the process that
is being controlled.
For example, if the actuator is electrical heating element then the process
is heating and the control variable is the temperature.

Control systems can be classified in several ways:


A regulator system automatically maintains a parameter at (or near) a
specified value. An example of this is a home heating system.

1
A follow-up system causes an output to follow a set path that has been
specified in advance. An example is an industrial robot moving parts
from place to place.
An event control system controls a sequential series of events. An
example is a washing machine cycling through a series of programmed
steps.
The natural control systems have existed since the beginning of life,
regulates the human body temperature.

Categories of control systems


There are two general categories of control systems: open loop and closed
loop. In open-loop control, the controller sends a measured signal,
specifying the desired action, to the actuator, which specific the desired
action. Open loop control is not self-correcting since it does not use
feedback. Figure 2, shows the Open-loop control system. Open-loop
control systems are appropriate in applications where the actions of the
actuator on the process are very repeatable and reliable.

Figure 2: Open-loop control system (no feedback)


An example of open-loop CS is the motor that rotates the arm at 5
degrees/second (deg/s) at the rated voltage and the controller need to
move the arm from 0° to 30°.
Depending on the characteristics of the process, the controller sends a 6-
second power pulse to the motor. If the motor is acting properly, it will
rotate exactly 30° in the 6 seconds and stop. On particularly cold days,
there may be more internal friction, and the motor rotates only 25° in the
2
6 seconds. So, the error is a 5°. The controller has no way of knowing of
the error and does nothing to correct it.

(a) Block diagram

(b) A simple open-loop position system

Figure 3: open-loop CS example


Closed-loop control: A control system that uses feedback by using a
sensor. A sensor continually monitors the output of the system and sends
a signal to the controller, which makes adjustments to keep the output
within specification, figure 4.

Figure 4: Closed-loop control diagram

3
The sensor samples the system output that convert measurements into
electric signal that passes to the controller. Then the controller adjusts to
keep output.
The signal from the controller to the actuator is the forward path, and
the signal from the sensor to the controller is the feedback. The feedback
signal is subtracted from the set point at the comparator to get the
system error. The controller is working to minimize this error signal. A
zero error means that the output is exactly what the set point says it
should be.
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.

Comparison between open-loop and closed-loop control system


Open-loop Closed-loop
1 Simplest and economical Somewhat complicated and
therefore costly
2 Less stability problem May become unstable and generate
oscillations
3 Less accurate control More accurate control
4 Affected by disturbances Almost independent of disturbances
5 Convenient when the output Cannot be installed if the output is
is difficult not amenable to measurement
to measure

Advantages of digital control in comparing with analog control


1) Accuracy: Digital signals are represented in terms of zeros and
ones. This involves a very small error as compared to analog
signals.

4
2) Implementation errors. Digital processing of control signals
involves addition and multiplication by stored numerical values.
The errors that result from digital representation and arithmetic
are negligible.
3) Flexibility. An analog controller is difficult to modify or
redesign once implemented in hardware. A digital controller is
implemented in firmware or software and its modification is
possible without a complete replacement of the original
controller.
4) Speed. Increasing in computer processing speed has made it
possible to sample and process control signals at very high
speeds. Because the interval between samples, the sampling
period, can be made very small, digital controllers achieve
performance that is essentially the same as that based on
continuous monitoring of the controlled variable.
5) Cost. Advances in very large-scale integration (VLSI)
technology have made it possible to manufacture better, faster,
and more reliable integrated circuits and to offer them to the
consumer at a lower price. This has made the use of digital
controllers more economical even for small, low-cost
applications
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

5
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 𝑉
𝑖𝑛𝑝𝑢𝑡

The transfer function of a component is an extremely useful number. It


allows you to calculate the output of a component if you know the input.
When we have series of components and the output of one component
becomes the input to the next and each component has its own transfer
function, as shown in figure 2,

6
We can calculate the total transfer function (TFtot), as follow:
𝑇𝐹𝑡𝑜𝑡 = system gain = TF1 x TF2 x TF3
TF1, TF2 . . . = individual transfer functions
TF can be used to analyze an entire system components.

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.
Control systems are classified by application. Process control usually
refers to an industrial process being electronically controlled for the
purpose of maintaining a uniform correct output. Motion control refers
to a system wherein things move. A servomechanism is a feedback
control system that provides remote control motion of some object, such

7
as a robot arm or a radar antenna. A numerical control (NC) control
system directs a machine tool, such as a lathe, to machine a part
automatically.
General requirements of control system
1. A control system must be stable.
2. A control system must have a reasonable relative stability that is, the
speed of response must be reasonably fast and this response must show
reasonable damping.
3. A control system must be capable of reducing errors to zero or to some
small tolerable value

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.

Continuous-time signal Discrete-time signal


The signals in the real world are "analog" signals. An analog signal is a
continuous signal that contains time-varying quantities. An analog signal

8
can be used to measure changes in some physical phenomena such as
light, sound, pressure, or temperature.
The transmission process of digital signal is easy in digital communication
systems. While analogue signals (like Audio and video signals) cannot
process or transmit directly unless making prior treatment to convert
continues-time signals to discrete-time signals. To process these signals
using digital electronics such as computers, it must convert them to
"digital" form. To convert a signal from continuous time to discrete time,
the sampling process is used.

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.

Figure: Continues signal with its discrete signal

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

9
• Nyquist rate = 2 fmax
• Nyquist frequency = fs/2.

Figure: Sampling with different sample rates


The value of the signal is measured at certain uniform intervals in time
called periodic time (TS).
The sampling frequency (fS) = (1/TS).
Relationship between 𝑋[𝑛]and 𝑋(𝑡) is:
𝑿[𝒏] = 𝑿(𝒏𝑻𝑺 ), 𝑛 = . . . −1, 0, 1, 2
TS is the sampling period in second
FS = 1/T is the sampling frequency in Hz
We use [.] for discrete-time and (.) for continuous time signals.
Advantages of sampling
1) Multiple use of expensive equipment (multiplexing)
a) Digital computers.
b) Data transfer channel.
2) Data are available for a particular time instants only.
11
- Silicon controlled rectifier.
3) Data can be modified at a particular time.
- Stepping motor.
- Optical position sensor.
4) Data are materially discrete.
- Better sensivity behavior.
- Better reliability.
- No drift )‫(انحراف‬.
- Noise reduction.
- Less hardware cost.
- Less software maintenance cost
5) Samplers is introduced to improve the dynamic behavior of the control
loop.
6) Signal can be stored over longer time span.
Drawback of sampling:
1) After sampling, there is no signal between samples—all the
information that existed between the samples in the original signal is
irretrievably lost in the sampling process.
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

Converting between analog signals and discrete signals

Sampling is done by using an analog to digital (A/D) converter (also


called an encoder), which is a device that converts an analog signal into a
digital signal. A digital-to-analog (D/A) converter, called a decoder, is a
device that converts a digital signal into an analog signal.

11
For example, a sampled signal one could fit infinite continuous signals
through the samples as shown in the following figure 8.

Figure 8: Different analog signals map to same sequence


What sample rate should we use? How many samples are necessary to
ensure preserving the information contained in the signal?
If the signal contains high frequency components, we will need to sample
at a higher rate to avoid losing information that is in the signal.
The Nyquist sampling theorem provides a prescription for the nominal
sampling interval required to avoid aliasing. It may be stated simply as
follows:
Aliasing
When the signal is converted back into a continuous time signal, it will
exhibit a phenomenon called aliasing. Aliasing is an effect that causes
different signals to become indistinguishable when sampled. Frequencies
that are too high to be sampled are folded onto lower frequencies. We
cannot distinguish them based on their samples alone.
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

12
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

Figure: Example of different sampled periodic


The errors caused by aliasing can be very severe if a substantial quantity
of high-frequency components is contained in the signal to be sampled. To
minimize this error, the sampling operation is preceded by a low-pass anti-
aliasing filter that will remove all spectral content above the half-sampling
frequency (𝜋=Ts ).
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.

13
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).

Figure 7: Sampling with wrong sampling rates

Applications of sampled data system


1) Radar: when radar antenna rotates, information about range and
direction is obtained once per revolution of the antenna.
2) Economic systems: Accounting procedures in economic system are
generally tied to the calendar.
3) Biological system: signal transmission is the nervous system occur in
pulse form.

Sampling theory developments


1. Sampling theorem: Since all computer CS operate at discrete time
only, it is important to know condition to retrieved the signal from
its values at discrete point.

14
2. Difference equation & numerical analysis:
3. Transfer method: Z-transform replaced the role of Laplace
transform in continuous domain.
4. State-space theory: The discrete time representation of state model
are obtained considering the system only at sampling point
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:

Laplace transform z-transform


1 The Laplace transform The z-transform definition involves
definition involves an integral a summation
2 Applying the Laplace The z-transform converts certain
transform to certain ordinary difference equations to algebraic
differential equations turns equations
them into simpler
(algebraic) equations
3 Use of the Laplace transform Use of the z-transform gives rise to
gives rise to the basic concept the concept of the transfer function
of the transfer function of a of discrete (or digital) systems.
continuous (or analog) system.

Difference equations

15
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.

Example

16
Z - Transform Definitions
Given a finite length signal X[n], the z-transform of a sequence is defined
as:

𝑋(𝑍) = ∑ 𝑋[𝑛] 𝑍 −𝑛 . .. (1)


𝑛=−∞

Where z is a complex variable, 𝑧 −1 𝑖𝑠 𝑡𝑖𝑚𝑒𝑑𝑒𝑙𝑎𝑦 𝑜𝑝𝑒𝑟𝑎𝑡𝑜𝑟.


Sometimes this equations is one-sided z-transform of a function x[n] as:

X ( z)   x ( n) z
n 0
n

Which is known as the unilateral z-transform.


X(z) is simply a polynomial of degree n in the variable z-1 .
Note: The Laplace transform of a function f(t):

F ( s )   f (t )e  st dt
0

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).

The mapping between a sequence and its z-transform is denoted by:

Example 1: find the z-transform for the sequence



{{𝑋[𝑛]} 𝑛=0 ={1, 1, 3, 0, 4, 2}?
Solution: X(z) = 1 + 𝑋(𝑧) = 1 + 𝑧 −1 + 3𝑧 −2 + 4𝑧 −4 + 2𝑧 −5
Example 2: Find the z-transform of the sequence {x(n) = {5, 0, 2,0, 1, 4,
0, 3, 0,0, …}?
Solution
X(z) = 𝑋(𝑧) = 5 + 2𝑧 −2 + 𝑧 −4 + 4𝑧 −5 + 3𝑧 −7
17
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

Example 4: From 𝑋(𝑧) = 4 − 5𝑧 −2 + 𝑧 −3 − 2𝑧 4 ,find the X[n]


sequence?
Solution: X[n] = 4δ[n] – 5δ[n – 2] + δ[n – 3] – 2δ[n – 4]
The z-transform is equivalent to the DTFT, the substituting z=ej will
reduce the z-transform to DTFT. In other words, to convert from the Z-
transform to the DTFT, we need to evaluate the Z-transform around the
unit circle.

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 𝜔 .

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:

18
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

For 𝛿𝑛−𝑚 where m positive integer, the z- transform


1 𝑛=𝑚
𝛿𝑛−𝑚 = {
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Z{𝛿𝑛−𝑚 } = 𝑧 −𝑚 m = 0,1,2,3 . ..
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

2. The unit step sequence


The unit step is defined by
1 𝑛≥0
𝑢(𝑛) = {
0 𝑛<0
The z-transform

𝑍{𝑢(𝑛)} = 𝑢(𝑧) = ∑ 𝑢(𝑛)𝑍 −𝑛


𝑛=0
= 1 + 1𝑧 −1 + 1𝑧 −2 + 1𝑧 −3 + 1𝑧 −4 + . . . + 1𝑧 −𝑛 + ⋯
Multiplying both sides of this last equation by z results in
1 𝑧
𝑍{𝑢𝑛 } = =  |𝑧 −1 | < 1
1−𝑧 −1 𝑧−1

3. sampled exponential
𝑎𝑘 , 𝑘 ≥ 0
It is defined by 𝑋(𝑛) = {
0 , 𝑘<0

19
Sampled exponential

The z-transform of the sampled exponential signal is


1 𝑧
𝑋(𝑧) = 𝑎 = 𝑧−𝑎
1−( )
𝑧
Where a=1, it is equal to unit step.

Discrete ramp sequence:


The discrete ramp sequence is defined as

𝑛𝑇 𝑛≥0
𝑋(𝑛𝑇) = {
0 𝑛<0
Then 𝑋(𝑧) = ∑∞
𝑛= 0 𝑛𝑇 𝑧
−𝑛

= 𝑇 ∑ 𝑛 𝑧 −1
𝑛=0
𝑑 𝑑
Since 𝑛𝑧 −𝑛 = −𝑧 (𝑧 −𝑛 ) 𝑡ℎ𝑒𝑛 𝑋(𝑧) = −𝑇𝑧 (∑∞
𝑛=0 𝑧
−𝑛
𝑑𝑧 𝑑𝑧
𝑧
Since ∑∞
𝑛=0 𝑧
−𝑛
= (𝑧−1)
𝑡ℎ𝑒𝑛

4. Discrete cosine sequence


It is defined as
𝐴𝑐𝑜𝑠(𝜔𝑛𝑇 + ∅) 𝑛≥0
𝑋(𝑛𝑇) = {
0 𝑛<0

The first step is the choice of the alternative representation of cosine


function using Euler identity:

Then

21
It is defined by
𝑎𝑛 𝑛≥0
𝑎𝑛 𝑢(𝑛) = {
0 𝑛≠0

Plugging into the definition of the z-transform

𝑋(𝑧) = 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

Example 7: Find the z-transform of the sequence – 𝑎𝑛 𝑢[−𝑛 − 1]?

Solution:

This geometric series converges when |z| < a:

The Z-Transforms of common sequences are shown in table 1.

Table 1:

21
Poles and zeros representation

1 . Linearity [17]
For two sequences and their associated z-transforms and ROC’s, the
linearity property states:
𝑍(𝑎𝑋1 (𝑛) + 𝑏𝑋2 (𝑛)) = 𝑎𝑍(𝑋1 (𝑛) + 𝑋2 (𝑛))
Where a and b are constants.
The ROC contains 𝑅𝑥1 ∩ 𝑅𝑥2
Example 10: Find the Z-transform of 𝑋[𝑛] = 𝑢[𝑛] − (0.5)𝑛 𝑢(𝑛)?

4.2 Time shifting


𝑍(𝑥[𝑛 − 𝑚]) = 𝑧 −𝑚 𝑋(𝑧)
ROC = Rx (except for the possible addition or deletion of z = 0 or z = 1)
(The ROC may change by the possible addition or deletion of z = 0 or z
= 1).

Example: shifted exponential sequence


Consider the z-transform

22
From the ROC, this is a right-sided sequence. Rewriting,

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?

Solution
𝑧
Using the property 𝑎𝑛 𝑢[𝑛] =
𝑧−𝑎

4.3 Multiplication by an exponential sequence


The exponential multiplication property is

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
Therefore the result is

4.5 Differentiation of the Z-transform


𝑑𝑋(𝑧)
𝑛𝑋[𝑛] = −𝑍
𝑑𝑧
This is easily proved by differentiating the z-transform equation with
respect to z. It plays an important role in dealing with systems where
multiple poles occur in the same location n the z-plane.

4.6 Initial value theorm


Any Z-transform must satisfy this theorem :
𝑋(0) = 𝑙𝑖𝑚𝑖𝑡𝑧→∞ 𝑋)𝑧_
4.7 Final value theorem
𝑙𝑖𝑚𝑖𝑡𝑘→∞ 𝑋[𝑛] = 𝑙𝑖𝑚𝑖𝑡𝑧→1 (𝑍 − 1)𝑋(𝑧)
The final value theorem allows us to calculate the limit of a sequence as k
tends to infinity, if one exists, from the z-transform of the sequence. If
one is only interested in the final value of the sequence, this constitutes a
significant shortcut.
The main pitfall of the theorem is that there are important cases where the
limit does not exist. The two main cases are as follows:
1. An unbounded sequence
2. An oscillatory sequence
𝑙𝑖𝑚𝑖𝑡𝑘→∞ 𝑋[𝑛] = 𝑙𝑖𝑚𝑖𝑡𝑧→1 (𝑍 − 1)𝑋(𝑧)

24
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.

Figure 3: The ROC


In specific cases the inner radius of this ring may include the origin, and
the outer radius may extend to infinity. If the ROC includes the unit circle
|z| = 1, then the Fourier transform will converge.
Two very different sequences (different time functions) can have the
same z-transforms, but their z-transforms differ only in the ROC. For
example the z-transform of 𝑋[𝑛] = 𝛼 𝑛 𝑢[𝑛] 𝑎𝑛𝑑 𝑋[𝑛] = −𝛼 𝑛 𝑢[−𝑛 −
𝑍
1] are identical, X(𝑧) = . So, the ROC is an important part of the
𝑍−𝑎

specification of the z-transform

Clarification
The sum of 𝑋(𝑧) = ∑∞ 𝑛 −𝑛
𝑛=0 𝑎 𝑧 𝑐𝑜𝑛𝑣𝑒𝑟𝑔𝑒𝑠 𝑜𝑛𝑙𝑦 𝑓𝑜𝑟 |𝑧| > |𝑎|
The sum of 𝑋(𝑧) = ∑−1 𝑛 −𝑛
𝑛=−∞ 𝑎 𝑧 𝑐𝑜𝑛𝑣𝑒𝑟𝑔𝑒𝑠 𝑜𝑛𝑙𝑦 𝑓𝑜𝑟 |𝑎| > |𝑧|
They have the same X(z) but they differ in ROC.

Example 8 (no ROC)


Let 𝑋[𝑛] = (0.5)𝑛 . Expanding x[n] on the interval (−∞, ∞) it becomes

25
X[n] = {. . . , 0.5-3, 0.5-2, 0.5-1, 1, 0.5, 0.52, 0.53 . . .}
There are no values of z that satisfy this condition.

Example 9 (causal ROC)

For 𝑋[𝑛] = 𝑎𝑛 𝑢[𝑛] find the 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 𝑧−𝛼
If |𝛼𝑧 −1 | ≥ 1 then the series ∑∞ −1 𝑛
𝑛=0((𝛼𝑧 ) ) does not converge. Thus the

ROC is the range of values where |𝛼𝑧 −1 | < 1 𝑜𝑟 |𝑧| > |𝛼|
Properties of the region of convergence
The ROC has a number of properties that depend on the nature of the
signal. These properties are:
1) The ROC is a ring or disk in the z-plane, centered about the origin.
2) The Fourier transform of x[n] converges absolutely if and only if the
ROC of the z-transform includes the unit circle.

26
3) The ROC cannot contain any poles. By definition a pole is a
where X(z) is infinite. Since X(z) must be finite for all z for
convergence, there cannot be a pole in the ROC.
4) The ROC for finite-length sequence is the entire z-plane except perhaps
at z = 0 or z = ∞.
5) The ROC for a right-handed sequence, X[n], extends outward from the
outermost pole possibly including z= 
6) The ROC for a left-handed sequence extends inward from the
innermost pole possibly including z=0

Figure: An example of a finite duration sequence.


7) The ROC of a two-sided sequence is a ring bounded by poles
8) The ROC is a connected region.
9) A z-transform does not uniquely determine a sequence without
specifying the ROC

Example: Compute the Z-transform and find the ROC for:

1) 𝑋1 (𝑧) = ∑∞ 𝑛
𝑛=−∞ 𝑎 𝑢[𝑛]𝑧
−𝑛

2) 𝑋2 (𝑧) = ∑ −𝑎𝑛 𝑢[−𝑛 − 1]𝑧 −𝑛


𝑛=−∞

𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 (1)

27
2)

1 𝑛 −1 𝑛
Example: Find the ROC for 𝑋1 [𝑛] = ( ) 𝑢[𝑛] + ( ) 𝑢[𝑛]
2 4

1 𝑛
The Z-transform of ( ) 𝑢[𝑛]𝑖𝑠
2

𝑧 1
𝑤𝑖𝑡ℎ 𝑅𝑂𝐶 𝑎𝑡 |𝑧| >
1 2
𝑧−
2
−1 𝑛
The Z-transform of ( ) 𝑢[𝑛]𝑖𝑠
4

𝑧 −1
𝑤𝑖𝑡ℎ 𝑅𝑂𝐶 𝑎𝑡 |𝑧| >
1 4
𝑧+
4

28
29
31
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.

1. Using the definition


Example: Consider 𝑋(𝑧) = 1 + 2𝑧 −1 + 3𝑧 −2 + 2𝑧 −3 find the inverse?
Solution
𝑋[𝑛] = 𝑋1 [𝑛] + 2𝑋2 [𝑛 − 1] + 3𝑋3 [𝑛 − 2] + 2𝑋4 [𝑛 − 3]
𝑋[𝑛] = {1, 2, 3, 2}

2. Use long division


By this method, two steps are used to find the inverse Z-transform:
a) Use long division, expand X(z) as a series to obtain
𝑖

𝑋1(𝑧) = 𝑋0 + 𝑋1 𝑍 −1 + ⋯ + 𝑋𝑛 𝑍 −𝑛 = ∑ 𝑋[𝑛]𝑍 −𝑛
𝑛=0

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

31
Answer
The long division is

H(Z) = 0.5 + Z −1 + 0.75Z −2


𝐻[𝑛] = 0.5 𝛿[𝑛] + 𝛿[𝑛 − 1] + 0.75𝛿[𝑛 − 2]

Ex: Obtain the inverse z-transform of the function?

Ans:
1. Long division

2) Inverse transform
X[n] = {0,1,0.8, -0.26}

Common Z Transform Pairs

32
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 steps of find the inverse Z-transform are:

a) Find the PFE of X(z)/z or X(z).

33
b) Obtain the inverse transform X[n] using the Z-transform tables.
 The ROC plays a critical role in this process.

There are three cases:

1) Simple real roots.


2) Complex conjugate and simple real roots.
3) Repeated roots.

3.1 Simple real roots.

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 𝑎𝑘 𝑍

If M ≥ N use long division method and express X (z) in the form

Note 1: If X(z) is expressed as ratio of polynomials in Z instead of Z –1 then


convert into the polynomial of Z –1 .
Note 2: Convert the denominator into product of first-order terms
∑𝑀
𝑘=0 𝑏𝑘 𝑍
−𝑘
𝑋(𝑍) =
𝑎0 ∏𝑁 −1
𝑘=1(1 − 𝑑𝑘 𝑍 )

Where dk are the poles of X(z).


2𝑍 2 +2
Example: Find the inverse Z-transform for 𝐺 (𝑧) ?
𝑍 2 +2𝑍−3
Ans:

34
𝐺(𝑧) 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

==> (−3)𝑛 1(𝑛) + 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 − 𝑍 −1 )(1 − 𝑍 −1) ) to
2 3

obtain

So,

To check:
35
Now, we have

Possible of ROCs

And

Recall transform pairs

36
And

𝟏− 𝒁−𝟏 −𝟑 𝟒
𝐴𝑔𝑎𝑖𝑛, 𝑓𝑜𝑟 𝒀(𝒛) = 𝟏 𝟏 = 𝟏 + 𝟏 ?
(𝟏− 𝒁−𝟏 )(𝟏− 𝒁−𝟏) 𝟏− 𝒁−𝟏 𝟏− 𝒁−𝟏
𝟐 𝟑 𝟐 𝟑

There are three possible of ROCs for a signal with this z-transform.

The three possibles are


ROC Signal
𝟏
< |𝒛|
𝟐

𝟏 𝟏
< |𝒛| <
𝟑 𝟐

𝟏
|𝒛| <
𝟑

37
Power Series Expansion:
The defining expression for the z-transform [Eq. (4.3)] is a power series
where the sequence values x[n] are the coefficients of z-n. Thus, if X(z) is
given as a power series in the form

𝑿[𝒛] = ∑∞
𝒏=−∞ 𝑿[𝒏]𝒁
−𝟏

= . . . +𝑿[−𝟐]𝒁𝟐 + +𝑿[−𝟏]𝒁 + 𝑿[𝟎] + 𝑿[𝟏]𝒁−𝟏 + 𝑿[𝟐]𝒁−𝟐 + ⋯


We can determine any particular value of the sequence by finding the
coefficient of the appropriate power of Z –1. This approach may not provide
a closed-form solution but is very useful for a finite-length sequence where
X(z) may have no simpler form than a polynomial in Z –1.
Example: Using the power series expansion technique, find the inverse z-
transform of the following X(z):

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

38
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

And carrying out the long division, we obtain

39
Thus

So, we have

𝑋[−1] = −𝑎−1 ; 𝑋[−2] = −𝑎−2 ; 𝑋[−3] = −𝑎−3 ; … ; 𝑋[−𝑘] = −𝑎−𝑘 ;


And we obtain

Examples
Example 4 Find the inverse Z-transform of

Answer

41
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

41
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 ‫ البد من ان نستذكر قوانين‬، ‫قبل البدء بشرح الموضوع‬
‫مع التطرق لمثال على كل منهم‬
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)

‫ تبدأ من‬sampled step sequence ‫ فان المتسلسلة تعود الى‬4 ‫ الن القيمة ثابتة وهي‬:‫مالحظة‬
.‫ بدال من الصفر‬2 ‫القيمة‬

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

42
𝑋[𝑘] = 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

‫ ثم استخدام‬، {X[k] = 4{1,2,4,…} ‫يمكن كتابة المتسلسلة بالشكل التالي‬: ‫مالحظة‬


. Z ‫تحويل‬
Example: (about Z-Transform solution of difference equations)
Solve the linear difference equation
3 1
𝑋[𝑘 + 2] − 𝑋[𝑘 + 1] + 𝑋[𝑘] = 1[𝑘]
2 2

With initial conditions X[0] =1 and X[1] = 5/2?


Solution

1. z-transform
We begin by z-transforming the difference equation using time advance
equation to obtain.
3 1
[𝑧 2 𝑋(𝑧) − 𝑧 2 𝑋[0] − 𝑧𝑋[1]] − 2 𝑧𝑋[𝑧] − 𝑧𝑋[0] + 2 𝑋[𝑧] = 1[𝑘]
2. Solve for X(z)
Then we substitute the initial conditions and rearrange terms to obtain
3 1 𝑧 5 3
[𝑧 2 − 𝑧 + ] 𝑋[𝑧] = + 𝑧2 + ( − ) 𝑧
2 2 𝑧−1 2 2
Which we solve for
𝑧[1 + (𝑧 + 1)(𝑧 − 1)] 𝑧3
𝑋(𝑧) = =
(𝑧 − 1)(𝑧 − 1)(𝑧 − 0.5) (𝑧 − 1)2 (𝑧 − 0.5)
3. Find the Partial Fraction Expansion

43
The partial fraction of X(z)/z is
𝑋(𝑧)
=
𝑧
Where

To obtain the remaining coefficient, we multiply by the denominator and


get the equation

Equating the coefficient of z2 gives

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

Example: Solve the difference equation


𝑦(𝑘 + 2) + 5𝑦(𝑘 + 1] + 6𝑦(𝑘) = 𝑘
𝑤ℎ𝑒𝑟𝑒 𝑘 ≥ 0 , 𝑦(0) = −1 , 𝑦(1) = 1?
Answer
time ‫باالستفادة من خاصية‬
Taking the Z-transform for both sides advance property
gives:
𝑧
𝑧 2 𝑦(𝑧) − [ 𝑧 2 𝑦(0) − 𝑧𝑦(1)] + 5{𝑧 𝑦(𝑧) − 𝑧 𝑦(0)} + 6𝑦(𝑧) =
(𝑧 − 1)2

44
Substitute the values of y(0) and y(1) and arrangement the equation
𝑧
𝑧 2 𝑦(𝑧) + 𝑧 2 − 𝑧 + 5𝑧 𝑦(𝑧) + 5𝑧 + 6𝑦(𝑧) =
(𝑧 − 1)2
𝑧
𝑦(𝑧){𝑧 2 + 5𝑧 + 6} + 𝑧 2 + 4𝑧 =
(𝑧 − 1)2
𝑧
𝑦(𝑧){𝑧 2 + 5𝑧 + 6} = − 𝑧 2 − 4𝑧
(𝑧 − 1)2
𝑧 𝑧 2 − 4𝑧
𝑦(𝑧) = −
(𝑧 − 1)2 (𝑧 2 + 5𝑧 + 6) 𝑧 2 + 5𝑧 + 6)
−𝑧 4 − 2𝑧 3 + 7𝑧 2 − 3𝑧
𝑦(𝑧) =
(𝑧 − 1)2 (𝑧 2 + 5𝑧 + 6)
𝑦(𝑧) −𝑧 3 − 2𝑧 2 + 7𝑧1 − 3 𝐴 𝐵 𝐶1 𝑐2
= = + + +
𝑧 (𝑧 − 1)2 (𝑧 + 3)(𝑧 + 2) 𝑧 + 2 𝑧 + 3 𝑧 − 1 (𝑧 − 1)2
After finding A, B, C1, C2, we get
17 15 7 1
𝑦(𝑧) −
= 9 + 16 − 144 + 12
𝑧 𝑧 + 2 𝑧 + 3 𝑧 − 1 (𝑧 − 1)2
17 15 7 1
𝑦(𝑧) = (−2)𝑘 + (−3)𝑘 − 𝑢[𝑘] + 𝑘
9 16 144 12

Example : Solve 𝑢(𝑛 + 2) − 3𝑢(𝑛 + 1) + 2𝑢(𝑛) = 4𝑛 given that


𝑢0 = 0 𝑎𝑛𝑑 𝑢1 = 1?
Ans:
𝑢(𝑛 + 2) − 3𝑢(𝑛 + 1) + 2𝑢(𝑛) = 4𝑛
Taking Z-transform on both sides:
𝑍{𝑢(𝑛 + 2)} − 3𝑍{𝑢(𝑛 + 1)} + 2𝑍{𝑢(𝑛)} = 𝑍{4𝑛 }
𝑍
[𝑍 2 𝑋(𝑍) − 𝑍 2 𝑢(0) − 𝑍𝑢(1)] − 3[𝑍𝑋(𝑧) − 𝑍𝑢(0) + 2𝑋(𝑧) =
𝑍−4
Substitute 𝑢(0) = 0 , 𝑢(1) = 1
𝑍
(𝑍 2 𝑋(𝑍) − 0 − 𝑍] − 3[𝑍𝑋(𝑧) − 0] + 2𝑋(𝑍) =
𝑍−4
45
𝑍
(𝑍 2 − 3𝑍 + 2)𝑋(𝑧)] = +𝑍
𝑍−4
𝑍 + (𝑍 − 4) 𝑍 + 𝑍 2 − 4𝑍
(Z − 1)(Z − 2)X(z) = =
𝑍−4 𝑍−4
𝑍 2 − 3𝑍
X(z) = (1)
(𝑍 − 1)(𝑍 − 2)(𝑍 − 4)

𝑋(𝑧) 𝑍−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
−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

46
𝑍 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 [𝑛] − 𝑦[𝑛 − 1] = 𝑢[𝑛] 𝑓𝑜𝑟 𝑛 ≥ 0
2

, where y[-1]=0?
Answer

Example: Solve

Ans.

47
First, shift the equation so that we can take advantage of the form of the
initial conditions. We replace 𝑘 → 𝑘 − 2 to obtain

48
Second order difference equation
To solve 2nd order linear constant coefficient difference equation two
initial conditions are required. typically either y0 and y1 or y−1 and
y−2..
Example: Solve the difference equation
𝑦(𝑛 + 2) = 𝑦(𝑛 + 1) + 𝑦(𝑛)?
Sol.
Begin by taking the z-transform, then insert the initial conditions and
solve the resulting algebraic equation for Y (z), the z-transform of {yn}:

49
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:

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, . . .}

51
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:

The Time response of discrete time system


The time response of a discrete-time linear system is the solution of the
difference equation governing the system. The response of a discrete-time
system to a unit impulse is known as the impulse response sequence.
The response of an LTI discrete-time system to an arbitrary input sequence
is given by the convolution summation of the input sequence and the
impulse response sequence of the system

51
The convolution summation for causal system (whose impulse response
is zero for negative time) can be calculated by
𝑘

𝑦(𝑘) = ∑ 𝑢(𝑘 − 𝑖)ℎ(𝑖) (1)


𝑖=0

Where {𝑢(𝑘) = {𝑢(0), 𝑢(1), … , 𝑢(𝑖), … }


For example,

𝑦(2) = ∑ 𝑢(𝑖)ℎ(2 − 𝑖) = 𝑢(0)ℎ(2) + 𝑢(1)ℎ(1) + 𝑢(2)ℎ(0)


𝑖=0

The z-transform of the convolution of two time sequences is equal to


the product of their z-transforms.
𝑦(𝑧) = 𝐻(𝑧)𝑈(𝑧) (2)
The function H(z) is the transfer function. It plays an important role in
obtaining the response of an LTI system to any input.
Applying the convolution theorem to the response of an LTI system
allows us to use the z-transform to find the output of a system without
convolution as follows:
1) Z-transform the input.
2) Multiply the z-transform of the input and the z-transfer function.
3) Inverse z-transform to obtain the output temporal sequence.
4) An added advantage of this approach is that the output can often be
obtained in closed form.
Example: Given the discrete-time system
𝑦(𝑘 + 1) − 0.5𝑦(𝑘) = 𝑢(𝑘), 𝑦(0) = 0
Find the impulse response of the system h(k):
1. From the difference equation.
2. Using Z-transform?
Solution
1. let 𝑢(𝑘) = 𝛿(𝑘)

52
2. Alternatively, z-transforming the difference equation yields the transfer
function.
𝑌(𝑧) 1
𝐻(𝑧) = =
𝑈(𝑧) 𝑧 − 0.5
Inverse-transforming with the delay theorem gives the impulse response

𝑖−1,
ℎ(𝑖) = {(0.5) 𝑖 = 1,2,3, …
0 𝑖 <1

Example 2: Given the discrete-time system


𝑦(𝑘 + 1) − 𝑦(𝑘) = 𝑢(𝑘 + 1)
Find the system transfer function and its response to a sampled unit step.
Solution
The transfer function corresponding to the difference equation is
𝑧
𝐻(𝑧) =
𝑧−1
We multiply the transfer function by the sampled unit step’s z-transform
to obtain
𝑧 𝑧 𝑧 2 𝑧
𝑌(𝑧) = ( )×( )=( ) =𝑧
𝑧−1 𝑧−1 𝑧−1 (𝑧 − 1)
The z-transform of a unit ramp is
𝑧
𝐹(𝑧) =
𝑧 − 12
Then, using the time advance property of the z-transform, we have the
inverse transform

𝑖 + 1, 𝑖 = 0,1,2, …
𝑦(𝑖) = {
0, 𝑖<0
Note: For higher-order difference equations, obtaining the response in
closed form directly may be impossible, whereas z-transforming to obtain
the response remains a relatively simple task

Frequency response of LTI systems


The frequency response of a linear time-invariant discrete-time system
can be obtained by applying a spectrum of input sinusoids to the system.
It is shown that, as in the continuous-time case, the response is a sinusoid
of the same frequency as the input with frequency-dependent phase shift

53
and magnitude scaling. The scale factor and phase shift define a complex
function of frequency known as the frequency response.
For a sinusoidal input at frequency f, the output is
 a sinusoid at the same frequency,
 scaled in amplitude, and
 Phase shifted.
This can be represented by a single complex number H(f ).
The frequency response is the behavior of the system for sinusoidal
input.
So, the relationship of a linear time invariant system in the time domain
and frequency domain are as follow:

Digital Processor
Input signal Output signal

Time domain: x(n) h(n) y(n)

Freq. domain: X(ejw) H(ejw) Y(ejw)


Where n: integer number; ejw: Complex number
In the time domain, the input signal is convolved with the impulse
response h(n) to produce the output signal y(n).
In the frequency domain, the convolution property must be a
multiplication. The output signal y(w) is the product of the input X(w)
and H(w). where H(w) is the system's frequency response
𝑦(𝑤) = 𝑋(𝑤). 𝐻(𝑤)
𝑦(𝑤) = |𝑋(𝑤)|. |𝐻(𝑤)| . 𝑒 𝑗𝜃𝑥+𝑗𝜃ℎ
Therefore, multiply X(w)by H(w) is obtained by multiplying the
magnitudes and add the phases.

54
There are two methods to obtain frequency response:
1. Using the impulse response.
Knowing the impulse response of LTI system, the frequency response of
the system will be the Fourier transform of the impulse response ( the
spectrum of h(n).

𝐻(𝑤) = ∑ ℎ(𝑛) 𝑒 −𝑗𝑤𝑛


𝑛=−∞

Where H(w) = frequency response of a LTI system , and h(n) = impulse


response of a LTI system.
𝐻 |𝐻(𝑤)|. 𝑒 𝑗𝜃(𝑤)
|H(w)| = magnitude C/c's of the system
𝜃(𝑤) = 𝑃ℎ𝑎𝑠 c/cs' of the system
2. Using the difference equation
The general difference equation of any LTI system is
𝑁 𝑀

∑ 𝑎𝑘 𝑦(𝑛 − 𝑘) = ∑ 𝑏𝑘 𝑥(𝑛 − 𝑘)
𝑘=0 𝑘=0

Where ak = recursive coefficient and bk = non recursive coefficient.


N = order of the system
𝑎0 𝑦(𝑛) + 𝑎1 𝑦(𝑛 − 1) + 𝑎2 𝑦(𝑛 − 2) +… = 𝑏0 𝑥(𝑛) + 𝑏1 𝑥(𝑛 − 1) + ⋯
In frequency domain, by taking Fourier transform for both sides
𝑁 𝑀

∑ 𝑎𝑘 𝑦(𝑤) . 𝑒 −𝑗𝑤𝑘 = ∑ 𝑏𝑘 𝑋(𝑤). 𝑒 −𝑗𝑤𝑘


𝑘=0 𝑘=0
𝑁 𝑀

𝑦(𝑤) ∑ 𝑎𝑘 𝑒 −𝑗𝑤𝑘 = 𝑋(𝑤) ∑ 𝑏𝑘 𝑒 −𝑗𝑤𝑘


𝑘=0 𝑘=0

𝑦(𝑤) ∑𝑀
𝑘=0 𝑏𝑘 𝑒
−𝑗𝑤𝑘
= 𝐻(𝑤) = 𝑁
𝑋(𝑤) ∑𝑘=0 𝑎𝑘 𝑒 −𝑗𝑤𝑘

55
The general equation to find the frequency response, H(w), for any
recursive or nonrecursive LTI processor.
Example: Determine the frequency response of the following system?

Ans:
Y(n)= X(n) – X(n-1) – 0.8 y(n-1)
1) Frequency response using Impulse response
ℎ(𝑛) = 𝛿(𝑛) − 𝛿(𝑛 − 1) − 0.8ℎ(𝑛 − 1)
ℎ(−1) = 0 − 0 − 0 = 0
ℎ(0) = 1 − 0 − 0 = 1
ℎ(1) = 0 − 1 − 0.8 × 1 = −1.8
ℎ(2) = 0 − 0 − 0.8(−1.8) = 0.8(1.8)
ℎ(3) = 0 − 0 − 0.8(0.8(1.8)) = −0.82 (1.8)
ℎ(4) = 0 − 0 − 0.8(−0.82 (1.8)) = 0.83 (1.8)
.
.

𝐻(𝑤) = ∑ ℎ(𝑛). 𝑒 −𝑗𝑤𝑛


𝑛=0
𝐻(𝑤) = ℎ(0)𝑒 0 + ℎ(1)𝑒 −𝑗𝑤 + ℎ(2)𝑒 −2𝑗𝑤 + ℎ(3)𝑒 −3𝑗𝑤 + ⋯
𝐻(𝑤) = 1 − 1.8𝑒 −𝑗𝑤 + 0.8(1.8)𝑒 −2𝑗𝑤 − (0.82 )(1.8)𝑒 −3𝑗𝑤 +
0.83 (1.8)1.8−4𝑗𝑤
2
𝐻(𝑤) = 1 − 1.8𝑒 −𝑗𝑤 (1 − 0.8𝑒 −𝑗𝑤 ) + (0.8𝑒 −𝑗𝑤 ) −
3
(0.8𝑒 −𝑗𝑤 ) + ⋯

1
𝐻(𝑤) = 1 − 1.8𝑒 −𝑗𝑤 ( )
1 + 0.8𝑒 −𝑗𝑤
1.8𝑒 −𝑗𝑤 1 + 0.8𝑒 −𝑗𝑤 + 1.8 𝑒 −𝑗𝑤
=1− =
1 + 0.8𝑒 −𝑗𝑤 1 + 0.8𝑒 −𝑗𝑤

𝑒 −𝑗𝑤
𝐻(𝑤) = 1 −
1 + 0.8𝑒 −𝑗𝑤
56
2) Using the difference equation of a LTI system

y(n) + 0.8y(n-1) = X(n) – X(n-1)


𝑎0 = 1, 𝑎1 = 0.8, 𝑏0 = 1, 𝑏1 = −1
1 −𝑗𝑤
∑𝑘=0 𝑏𝑘 𝑒
𝐻(𝑤) = 1
∑𝑘=0 𝑎𝑘 𝑒 −𝑗𝑤

𝑏0 𝑒 0 + 𝑏1 𝑒 −𝑗𝑤 1 − 𝑒 −𝑗𝑤
𝐻(𝑤) = =
𝑎0 𝑒 0 + 𝑎1 𝑒 −𝑗𝑤 1 + 0.8 𝑒 −𝑗𝑤
The result is the same as the first method.
By substitute 𝑒 −𝑗𝑤 = cos(𝑤) − 𝑗𝑠𝑖𝑛(𝑤)

1 − cos(𝑤) + 𝑗𝑠𝑖𝑛(𝑤)
𝐻(𝑤) =
1 + 0.8 cos(𝑤) − 𝑗0.8 sin(𝑤)
√(1 − cos(𝑤))2 + (sin(𝑤))2
|𝐻(𝑤)| =
√(1 + cos(𝑤))2 + (0.8sin(𝑤))2
sin(𝑤) −0.8 sin(𝑤)
∅𝐻(𝑤) = 𝑡𝑎𝑛−1 − 𝑡𝑎𝑛−1
1 − cos(𝑤) 1 + 0.8 cos(𝑤)

w |H(w)| w ∅H(w)
0 0 0 𝜋/2
𝜋/2 1.1 𝜋/2 45+38.6=83.6
𝜋 10 𝜋 0
3 𝜋/2 1.1 3 𝜋/2 -83.6
2𝜋 0 2𝜋 𝜋/2

|H(w)|

𝜋 2𝜋 𝜋 2𝜋

Note: sampled sinusoids are only periodic if the ratio of the period of the
waveform and the sampling period is a rational number
(equal to a ratio of integers). However, the continuous
envelope of the sampled form is clearly always periodic

57
Properties of the frequency response of discrete-time systems
1) DC gain: The DC gain is equal to H(1).
𝐻(𝑒 𝑗𝑤𝑇 )|𝑤=0 = 𝐻(𝑧)|𝑧→1 = 𝐻(1)
2) Periodic nature: The frequency response is a periodic function of
frequency with period ωs52π/T rad/s.
3) Symmetry: For transfer functions with real coefficients, the
magnitude of the transfer function is an even function of frequency
and its phase is an odd function of frequency.

Notes:
1) We only need to obtain H(ejωT) for frequencies ω in the range
from DC to ws/2.
2) The frequency response for negative frequencies can be
obtained by symmetry, and for frequencies above ws/2 the
frequency response is periodically repeated.
3) Frequency response H(ejwT) is periodically repeated for above
ws/2.
4) Negligible frequency response amplitudes H(jw) for w> ws/2,
has no overlap of repeated frequency response cycles.
5) Sampling with no overlap  periodic repetition of the
frequency response of a continuous time system.
6) Frequency responses of physical systems are not bandlimited 
overlapping of the repeated frequency response cycles (folding).
7) Ws/2 is known as the folding frequency.
8) Folding results in distortion of the frequency response and
should be minimized by proper choice of the sampling
frequency Ws/2 or filtering.
Figure bellow shoe the magnitude of the frequency response of a
second-order underdamped digital system.

58
Fig: Magnitude of the frequency response of a digital system.

59
Zero – Order Hold (ZOH)
‫ تحتاج الى عملية وسطية تسمى‬digital ‫ الى‬analog ‫ان عملية تحويل االشارة من‬
holding ‫ باالضافة الى عملية اخرى هي‬sampling‫ال‬
Analog  Sampling  Holding  Digital
‫ بمسك القيمة التي‬ZOH ‫ تقوم دائرة‬، ZOH ‫ تنفذ من خالل استخدام‬holding ‫ان عملية‬
‫ حيث يقوم بتحويل النبضات‬. ‫ لفترة من الزمن لحين وصول نبضة جديدة‬sampler ‫يوجدها ال‬
.plant ‫الى مستويات ضمن فترة زمنية العطاء وقت لحساب ارتفاعها ثم يمررها الى ال‬

G(s) ‫ و‬Holder ‫ هما‬: ‫فعليا هنالك عمليتان في النظام‬

ZOH G(S)
X(t) y(t)

To obtain the transfer function of the ZOH, we replace the number or


discrete impulse (shown in Figure 3) by an impulse δ(t). The transfer
function can then be obtained by Laplace transformation of the impulse
response.

61
61
62
63
64
65
66
67

You might also like