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

DICRETE TIME SIGNALS

• DICRETE TIME
TRANSFORMATIONS

• DICRETE TIME SYSTEMS

• STABILITY OF SYSTEMS
DICRETE TIME SIGNALS

• Digital systems are used for processing signals


• Samples of signals are used in digital systems
• Samples of signals are called discrete-time signals
• A discrete-time signal is denoted as x[n]
• n assumes an integer values …-1,0,1,2,3,…
Conversion of signals

In a discrete time system, a


continuous-time signal is
converted into a discrete-time
signal.
Sampling of signals
The sampled signal
The original signal


x(t ) x(nT )  x[n]

s (t )
Train of impulses

Mosfet transistors
(electronic switches)

Sampling is a process in
which an analog signal x(t)
is converted into discrete
capacitor form. It may be an
electronic switch as shown.

The open/close times of


switches must be too small.
Usage of OPAMPs for prevention of energy losses

OPAMP
OPAMP

x(t ) x(nT )  x[n]


capacitor

• An electronic circuit board that is


used in the sampling process

• Integrated circuits (IC’s) involve


mosfet transistors and OPAMPs.
Sampling of signals

The original signal x(t) to be t


sampled

x[1]
x[0] These samples cant be used
x[2] to restore the original signal

The sampled signal x[n] if n


Fs=200Hz (or Ts=5msec) is used x[3]

Appearenly, these samples cannot be used


x[0] to restore the original signal n
x[1] x[3]
The sampled signal x[n] if n
Fs=40Hz (or Ts=25msec) is used
x[2]
(a piece of piano sound)
x(t)
A piece of the sound record
of musical note ‘G’ of a t
piano. Let it be x(t)

The sampled signal x[n] in


case Fs=8820Hz n
(Ts=0.113msec) is used.

x[1]
The sampled signal x[n] in
case Fs=1000Hz (Ts=1msec) x[3]
is used n
x[0] x[2]
NYQUIST’S CRITERION

• The Nyquist criterion is a principle in digital signal processing


that states that the sampling frequency Fs of a digital signal
must be at least twice the highest frequency present in the
signal in order to accurately represent it.

• If this criteria is not met, the signal cannot be recovered from


its samples. This is called aliasing phenomena. In that case,
the message of information involved in the signal is lost
completely.

• Therefore, the Nyquist criterion is essential to ensure accurate


and high-quality digital audio reproduction.
Sampling of audio signals

• An audio signal is an electrical signal that represents sound and is created by


converting sound waves into electrical impulses using a transducer, such as a
microphone. The signal contains information about the volume and pitch of the
sound, and can be processed and amplified to produce high-quality audio output.

• For audio signals, which we can hear, Fs=44100Hz is a standard. This number was
chosen since 44100 is equal to the product of the squares of the first four prime
numbers, that is 44100=22 *32 *52 *72. Therefore it is divisible by many integer
numbers.

• Various fractions of 44.1kHz are used in practice. For example 11.025kHz and
22.05kHz are used in WAV files. Also 88.2kHz and 176.4kHz are used in DVD-
Audio.
Summary

• In signal processing, sampling is the reduction of a continuous-time


signal to a discrete-time signal. A common example is the conversion
of a sound wave to a sequence of "samples". A sample is a value of
the signal at a point in time and/or space.

• A sampler is a subsystem or operation that extracts samples from a


continuous signal.

• The original signal can be reconstructed from a sequence of samples,


up to the Nyquist limit, by passing the sequence of samples through
another system called a ‘reconstruction filter’.

• In communication system, almost all of the energy is contained in the


100 Hz–4 kHz range, allowing a sampling rate of 8 kHz. This is the
sampling rate used by nearly all telephony systems.
Question: What is the standard for sampling of audio signals?
Answer: For audio signals, which we can hear, Fs=44100Hz is a
standard.

Question : Explain the Nyquist’s criteria for sampling of a


signal.
Answer: According to a criteria, called Nyquist’s criteria, Fs
should be equal to or larger than two times the maximum
frequency in the signal. Otherwise, the envelope of signal and so
the information in it is lost completely.
Example: Determine a minimum value for Fs if
xa (t )  16sin(5000t )  8cos(7000t )
x[n]  16sin(5000nT )  8cos(7000nT )
Answer
The frequency content of signal is as follows
T1=2π/5000= 0.0012566 f1=1/T1=795.8Hz
T2=2π/7000= 0.0008975 f2=1/T2=1114 Hz

Fs should be at least equal to two times the maximum


frequency of the signal
Therefore Fs≥2*1114=2228Hz
Example: Determine a minimum value for Fs if
xa (t )  3  4 cos(2000 t  34o )  7 sin(9000t  45o )
x[n]  3  4 cos(2000 nT  34o )  7 sin(9000nT  45o )
Answer
The frequency content of signal is as follows
f1=1/T1=0Hz
T2=2π/(2000π) = 0.001 f2=1/T2=1000Hz
T3=2π/9000=0.000698131 f3=1/T3=1432 Hz

Fs should be at least equal to two times the maximum


frequency of the signal
Therefore Fs≥2*1432=2864Hz
Example: Determine a minimum value for Fs if
xa (t )  20  5sin(50 t  60o )  8sin(400t  15o )  8cos(75o )
x[n]  20  5sin(50 nT  60o )  8sin(400nT  15o )  8cos(75o )
Answer
The frequency content of signal is as follows
f1=0Hz
T2=2π/(50π) =0.04 f2=1/T2=25Hz
T3=2π/400= 0.01571 f3=1/T3=63.66 Hz
f4=0Hz
Fs should be at least equal to two times the maximum
frequency of the signal
Therefore Fs≥2*63.66=127.3Hz
TERMINOLOGIES

The Decibel (dB)


P
The decibel (dB) expresses the ratio of Powers P1 and P0 on a logarithmic scale. 10 log10 dB
P0 is called the refence power level. For instance, in acoustics P0=20μPa=2×10−5 Pa
 P0 

The noise
Noise is an undesired random disturbance that exists in
a signal

The noise may come from natural or man-made


sources.

Signal-to-noise ratio (SNR) is used to determine the


amount of noise. It is given with a dB unit.

Different types of noise are generated by different


processes.

Thermal noise is an example. It is unavoidable, and


generated by the random thermal motion of charge
carriers (usually electrons).
The thermal noise
an ordinary resistor R
Thermal noise is also called Johnson noise or Nyquist noise. It is generated at a temperature T
by the thermal agitation of the charge carriers (usually the electrons) inside
atoms

Thermal noise increases with temperature T. Some sensitive electronic R Vrms

equipment such as radio telescope receivers are cooled to very


lowtemperatures to reduce thermal noise.

The frequency spectrum of thermal noise involves all frequencies from zero
to infinity. It was discovered by John B. Johnson and Harry Nyquist in 1926. Example:
Let R=1000Ω ;
In electronic circuits, this noise can be modelled as a voltage source in series T= 27°C+273=300 ;
with the resistor as indicated in the figure. f  104 Hz
Calculation:
The strength of noise can be calculated by using a formula
Vrms  4*1.38*1023 *300 *1000*104
 0.407 *106 V  0.407 μV
Vrms  4k BTRf : The rms value of the thermal noise
k B  1.38*1023 : Boltzmann constant
T  Celsius+273 : Kelvin Scale temperature
R : The resistance
f : Frequency interval (band)
Colors of noise
White noise

A noise whose frequency spectrum has equal


power within for all frequencies is called ‘white
noise’. The thermal noise is an example to this type
of noise.

100 105 1010 1015


frequency

Pink noise
A noise whose frequency spectrum has higher
energies at low frequencies is called ‘pink
noise’.

100 105 1010 1015


frequency

Blue noise

A noise whose frequency spectrum has higher


energies at high frequencies is called ‘blue
noise’.
100 105 1010 1015
frequency
Adding an artifical noise to a signal

Example: x(t )  5sin  2 440t   noise


x[n]  5sin  2 440nT   noise (after sampling with FS  8.8kHz and TS =0.114msec)

Original signal x[n]


Matlab commands:
%% Adding an artifical noise to a signal
clear;clc;

fmax=440;
Fs=20*fmax;Ts=1/Fs;
n=[0:Fs/fmax*3];
x=3*sin(2*pi*fmax*n*Ts);
r=rand(1,numel(x))-0.5;
The noise signal r[n]

subplot(3,1,1);
bar(n,x,'r','barwidth',0.1);
xlim([-1 n(end)]);ylim([-4 4]);

subplot(3,1,2);
bar(n,r,'r','barwidth',0.1);
xlim([-1 n(end)]);ylim([-4 4]);
x[n]+r[n]

subplot(3,1,3);
bar(n,x+r,'r','barwidth',0.1);
xlim([-1 n(end)]);ylim([-4 4]);
TRANSFORMATIONS OF
DISCRETE TIME SIGNALS

• Further insight into the properties signals is obtained


by their representation in the frequency-domain.

• There are two important representations

The discrete-time Fourier transform (DTFT)

The z-transform
DTFT : Discrete-Time Fourier Transform

The discrete-time Fourier transform (DTFT) of a signal x[n] is defined by



j
X (e )   x[n]e
n 
 j n
 ...  x[2]e 2 j  x[1]e j  x[0]  x[1]e  j  x[2]e 2 j  x[3]e 3 j  ...

Useful identities
1
1  r  r 2  ...  ; ( r <1)
1 r
1  r N 1
1  r  r  ...  r 
2 N

1 r
1
1  2r  3r 2  4r 3  ...  ; ( r <1)
(1  r ) 2
r2 r3 r4
r     ...   ln(1  r ) ; ( r <1)
2 3 4
Special functions
• Impulse function: It is denoted by δ[n]

-2 -1 0 1 2 3 4 5 6 n

• Step function: It is denoted by μ[n]

1 1 1 1 1 1 1

-2 -1 0 1 2 3 4 5 6 n
Question: Prove that  [n]  1
Answer:

  [n]e
n 
 j n
 ...  0  0  1  0  0  0  ...  1

1
Question: Prove that [n] 
1  e  j
Answer:

1
 [n]e
n 
 j n
=  ...  0  0  1  e  j +e  j 2 +e  j 3 +...=
1  e  j

Question: Prove that (1) n [ n]  1


Answer: 1  e  j

1

n 
(1) n [n]e  j n =  ...  0  0  1  e  j +e  j 2  e  j 3 +...=
1  e  j
1
Question: Prove that a n [n] 
1  ae  j
Answer:

1
 a [n]e
n 
n  j n
 1  ae  j  a 2 e  j 2  a 3e  j 3  ... 
1  ae  j
Question: Prove that cos(  n) [ n]  1
1 1
 j (   )
 1
 j (   )
Answer:
2
1  e 2
1  e
  

 cos( n)[n]e
n 
 j n
 1
2 e
n 
i n
[n]e  j n
 1
2 e
n 
i n
[n]e  j n

1 1
 1
 12
2
1  e  j (   ) 1  e  j (   )

1 1
Question: Prove that sin(  n) [ n]  1
 21j
2j
1  e  j (   ) 1  e  j (   )
Answer:
  

 sin( n)[n]e
n 
 j n
 1
2j e
n 
i n
[n]e  j n
 1
2j e
n 
i n
[n]e  j n

1 1
 1
 21j
2j
1  e  j (   ) 1  e  j (   )
Table of DTFT transformations
x[n]  X (e j )

 [n  k ]  e  ik

1
[ n] 
1  e  j
1
 n [ n] 
1   e  j
1
(n  1) n [n] 
(1   e  j ) 2
1 1
cos(an) [n]  1
 1
2
1  e  j (  a ) 2 1  e  j (  a )
1 1
sin(an) [n]  1
 21j
2j
1  e  j (  a ) 1  e  j (  a )
DTFT Table of Properties
x[n]  X (e j )

x[n  k ]  e  jk X (e j )

e j  n x[n]  X (e j (   ) )


k 
x[k ]h[n  k ]  X (e j ) H (e j )

This type of expression appears in


discrete time system analysis and is
called a 'convolution operation.


x[n]
h[n]
y[n]  x[n]  h[n]   x[k ]h[n  k ]
k 
Proofs of properties
  

x[n   ]  e  j j
X (e ) Proof: 
n 
x[n   ]e  j n  

m  
x[m]e  j ( m  )  e  j 
m  k 
x[m]e  j m  e  j X (e  j )

 
e j  n x[n]  X (e j (   ) ) Proof: 
n 
e j  n x[n]e  j n   x[n]e
n 
 j (   ) n
 X (e  j (   ) )

 
    j n 
  
 x[k ]h[n  k ]  X (e j
) H (e )j
Proof:    x[k ]h[n  k ] e   x[k ]   h[n  k ]e  j n  
k  n   k   k   n  
 
  x[k ]e
k 
 j k
H (e  j
)   x[k ]e
k 
 j k
H (e  j )  X (e  j ) H (e  j )
Question: Find X(ejω) if x[n]=2δ[n]+3δ[n-1]

Answer: X (e j )  2  3e  j

Question: Find X(ejω) if x[n]= δ[n+1]+2δ[n]+δ[n-1]

Answer: X (e j )  e j  2  e  j  2  2 cos 

Question: Find X(ejω) if x[n]= µ[n]-µ[n-4]


j 1 e  j 4 1  e  j 4
Answer: X (e )   j
  j

1 e 1 e 1  e  j
Question: Find x[n] if X(ejω)=1/(1-3e-jω)
Answer: a  3  x[n]  3n [n]

Question: Find x[n] if X(ejω)=1/(1+e-jω)


Answer: a  1  x[n]  (1) n [n]

Question: Find x[n] if X(ejω)=3e-j4ω/(1-2e-jω)


Answer: a  2 , k  4  x[n]  3* 2 n  4 [ n  4]
Question: Find x[n] if X(ejω)=(1+3e-j4ω)/(1-2e-jω)
j 1 3e  j 4
Answer: X (e )   j

1  2e 1  2e  j
 x[n]  2n [n]  3* 2 n  4 [n  4]

Question: Find x[n] if X(ejω)=-jcot(ω/2)


j cos( / 2) 1
e j / 2  12 e  j / 2 e j / 2  e  j / 2 e  j / 2
Answer: X (e )   j j 2
 j / 2  j / 2  j / 2
sin( / 2) 1
2j e j / 2 1  j / 2
 2j e e e e
1  e  j 1 e  j
  j
  j

1 e 1 e 1  e  j
 x[n]  [n]  [n  1]
Question: Find Y(ejω)=X(ejω)H(ejω) if X(ejω)=1/(1-2e-jω) and H(ejω)=18/(1-3e-jω)
18
Answer: Y (e j )  X (e j ) H (e j ) 
(1  2e  j )(1  3e  j )

Question: Find H(ejω)=Y(ejω)/X(ejω) if X(ejω)=8/(1+e-jω) and Y(ejω)=24/(1-0.5e-jω)


24
j
j Y (e ) 1  0.5e  j 3  3e  j
Answer: H (e )   
X (e j ) 8 1  0.5e  j
1  e  j
Question: Find H(ejω)=Y(ejω)/X(ejω) and h[n] if X(ejω)=3 and Y(ejω)=12/(1+e-jω)
12
j
j Y (e ) 1  e  j 4
Answer: H (e )   
X (e j ) 3 1  e  j
 h[n]  4*(1) n [n]

Question: Find Y(ejω)=X(ejω)H(ejω) and y[n] if X(ejω)=1-e-jω and H(ejω)=1/(1-e-jω)

Answer: Y (e j )  X (e j ) H (e j )  4 1  e  j 
1
 j
4
1 e
 y[n]  4 [n]
Question: Find Y(ejω)=X(ejω)H(ejω) and y[n] if X(ejω)=3+4e-jω and H(ejω)=1/(1-e-jω)
j j 3  4e  j
j 3 4e  j
Answer: Y (e )  X (e ) H (e )   j
  j

1 e 1 e 1  e  j
 y[n]  3[n]  4 [ n  1]

Question: Find y[n] if x[n]=4δ[n-1] and h[n]=(-3)nµ[n]


1
Answer: X (e j )  4e  j H (e j ) 
1  3e  j
j j j 4e  j
Y (e )  X (e ) H (e ) 
1  3e  j
 y[n]  4*(3) n 1 [n  1]
Example: Find DTFT transform of the signal shown in the figure
n x[ n ]
0 0
1 5
2 4
3 7
4 0

Answer:
X (e j )  . . .  x[2]e 2 j  x[1]e j  x[0]e0  x[1]e  j  x[2]e 2 j  x[3]e 3 j  x[4]e 4 j + . . .
 . . . 0  0 0  5e  j +4e  j 2 +7e  j 3 +0 +0 +...
=5e  j +4e  j 2 +7e  j 3
N point discrete Fourier transform (DFT)

If a signal x[n] has a finite duration 0 ≤ n≤N-1 then its Discrete


Fourier Transform (DFT) is
N 1
X [k ]   x[n]e  j 2 kn / N
n0

• Two engineers, Cooley and Tukey, discovered a fast method for


calculating DFT by using a computer.

• Their method is called fast Fourier transform (FFT).

• Many computer languages have FFT calculation subprograms.

• In OCTAVE or MATLAB, we can use a command: fft(x)


The sound of the G4 note a piano

The frequency spectrum that is calculated by using FFT

391.995 Hz
The sound of the A4 note of a violin

The frequency spectrum that is calculated by using FFT

440 Hz
DISCRETE-TIME SYSTEMS
x[n] h[n] y[n]
X (ei ) H (ei ) Y (ei )

System

• A system makes processing on the input x[n] and generates the output y[n]

• Any process can be considered to be a system. For instance


The applied voltage is an input x[n] for an electric motor and its speed is an output
y[n].
The sound is an input x[n] for an audio amplifier and it generates an electric output
y[n].
etc.

• A system may be linear or nonlinear. For instance the output of an audio amplifier is
proportional to the input signals, like y[n]=Ax[n], and so it is a linear system.

• A system may be time invariant. For instance an electric motor displays the same
performance at all times then it is called a time invariant system.
LTI SYSTEMS

Linear discrete-time system For all αx1[n] + β x2[n] , the output has to be αy1[n] + β y2[n]

αx1[n] + β x2[n] αy1[n] + β y2[n]


System

Time-invariant system For all x[n-α] , the output has to be y[n-α]

x [n-α] y [n- α]
System

A system that is linear and time invariant is called LTI system

Many of systems are LTI. We will consider LTI systems from now on.
DISCRETE TIME TRANSFER FUNCTIONS

x[n] h[n] y[n]


X (ei ) H (ei ) Y (ei )

System

• The input and output of a system are related by an equation

Y(ejω)=X(ejω)H(ejω)
• X(ejω) is the DTFT of the input

• Y(ejω) is the DTFT of the output

• H(ejω) is the DTFT of the transfer function


IMPULSE RESPONSE h[n] OF A SYSTEM

x[n] h[n] y[n]


X (ei ) H (ei ) Y (ei )

System

• The output of a system to an impulse function δ[n] is called impulse response and
denoted as h[n]. It is also equal to the inverse DTFT of H(ejω)

• The response y[n] can be written as



y[n]   x[k ]h[n  k ]  x[n]  h[n]
k 
This is called convolution operation

Question: What does the convolution mean?


Answer: Convolution is a mathematical definition for finding the output of a system
FIR (Finite Impulse Response) System
h[n]

A discrete-time system is called a finite impulse response (FIR) system if


its h[n] is of finite length as seen in the figüre

Mathematically, the transfer function of a FIR system is suech that

h[n]  0 for a finite n>N


Example :
1 
x[n]  3n [n]  
1  3e  i
1   h[n]  ?
y[n]  (1) [n] 
n 
1  (1)e  i 
Answer :
1
i
Y (e ) 1  (1)e  i 1  3e  i 1 1
H (ei )  i
   i
  i
 3e  i  i
 h[n]  (1) n [n]  3*(1) n 1 [ n  1]
X (e ) 1 1 e 1 e 1 e
 i
1  3e

II.way :
1  3e  i 1  e  i  4e  i
i  i 1
H (e )   i
  i
 1  4e  i
 h[n]   [n]  4*(1) n 1 [ n  1]
1 e 1 e 1 e

3
Example : H(eiω )=  h[n]  ?
cosω
Answer : n h[n]
6e  i
 6e  i 1  e 2i  e 4i  e 6i  e 8i  ...
i 3 0 0
H (e )  
cos  1  e -2 i 
1 6
 6e  i  6e 3i  6e 5i  6e 7 i  6e 9i  ... 2 0
3 6
h[n]  6 [n -1]  6 [ n - 3]  6 [ n - 5]  6 [ n - 7]  ... 4 0
5 6
Cascade connection of two systems

x[n] y[n]
h1[n] h2[n]

• The total impulse response of series connected LTI systems can be


obtained by a convolution of impulse responses h1[n] and h2[n]

y[n]  x[n]  h1[n]  h2 [n]


Y (ei )  X (ei ) H1 (ei ) H 2 (ei )
THE Z TRANSFORM OF SIGNALS

The definition of z-transform



F ( z)  
n 
f [ n] z  n

 . . . +f [2]z 2  f [1]z1  f [0]z 0  f [1]z 1  f [2]z 2  f [3]z 3  . . .

Useful identities
1  r N 1
1  r  r  r  r  ...  r 
2 3 4 N
 for |r|  1
1 r

1
1  r  r 2  r 3  r 4  ...   for |r|<1
1 r

1
1  2r  3r 2  4r 3  ...   for |r|<1
(1  r ) 2

r2 r3 r4
r     ...   ln(1  r )  for |r|<1
2 3 4
Example: Find z transform of the signal shown in the figure
14 n x[n]
7 7 0 7
1 14
-2 -1 0 1 2 3 4 5 6 n 2 7
3 0
14 7 4 0
Answer: X ( z )  7 * z 0  14* z 1  7 * z 2  7   2
z z

Example: Find z transform of the signal shown in the figure


n x[n]
6
4 0 0
1 4
2 5
-2 -1 0 1 2 3 4 5 6 n 3 6
-5 4 0
4 5 6
Answer: X ( z )  0* z 0  4* z 1  5* z 2  6* z 3   
z z 2 z3
Example: Find z transform of the signal shown in the figure
n x[n]
1 1 1 1 1 1 1 0 1
1 1
-2 -1 0 1 2 3 4 5 6 n 2 1
3 1
1 1 1
Answer: X ( z )  1* z 0  1* z 1  1* z 2  ...  1   2  4 1
z z 1  z 1

Example: Find z transform of the signal shown in the figure n x[n]


1 1 1 1 0 1
1 1
2 1
-2 -1 0 1 2 3 4 5 6 n 3 1
4 1
-1 -1 -1
1 1 1 1
Answer: X ( z )  1* z 0  1* z 1  1* z 2  1* z 3  ...  1   2  3  ... 
z z z 1  z 1
Example: Find z transform of the signal shown in the figure n x[n]
1 0 1
1
1
x[n]  2 [n]
n 2
0.5 1
2 4
0.25 3 1
0.125 0.0625 8
1
4
-2 -1 0 1 2 3 4 5 6 n 16

1
Answer: X ( z )  1* z 0  0.5* z 1  0.25* z 2  0.125* z 3  0.0625* z 4  ... 
1  21 z 1

Example: Find z transform of the signal shown in the figure


1 x[n]  (3)  n [n] n x[n]
1
0 1
9 1 1  13
81
1
2 9
-2 -1 0 1 2 3 4 5 6 n 3  271
-1
27 1
4 81
-1
3

1 1 1 1 1
Answer: X ( z )  1* z 0  13 z 1  19 z 2  271 z 3  811 z 4  ...  1  2 2  3 3  4 4  ... 
3z 3 z 3 z 3 z 1  31 z 1
TABLE OF Z TRANSFORM PAIRS PROPERTIES
 [ n]  1
1 z
[ n]   f [n]  g[n]  F ( z )  G ( z ) : Linearity
1  z 1 z  1
z
n [ n] 
( z  1) 2 f [n  k ]  z  k F ( z ) : Time shifting
z ( z  1)
n 2 [ n] 
( z  1)3 f [n]  F ( z 1 ) : Time reversal
1
 n [ n] 
1   z 1  n f [ n]  F ( z /  ) : z scaling
 z 1 z
n [n] 
n

1   z 1   z   
2 2
nf [n]   zF ( z ) : z differentiation
2
1 z
(n  1) n [n]  
1   z 
1 2
 z  
2
x[n]  h[n]  X ( z ) H ( z ) : Convolution
1 1
cos(an) [n]  1
ia 1
 12
1 e z
2
1  e  ia z 1
1 1
sin(an) [n]  21i  1
1  eia z 1 2i 1  e  ia z 1
Inverse z transformation

Given an F(z), one can do the followings to find its inverse z transform.
1) First, a change of variable z=w-1 is made and F(z=w-1) is obtained.

2) Expand the function F(1/w) into a Taylor series with powers of w.


F ( w1 )  a0  a1w  a2 w2  a3 w3  a4 w4  . . .

3) The coefficients a0, a1, a2, a3, . . . in this expansion correspond to the time
values of the function f[0], f[1], f2], f[3], . . . respectively. Thus, f[n] is
determined.
f [0]  a0
f [1]  a1
f [2]  a2
f [3]  a3
Example: Find x[n] if X(z)=1/(1-3z-1) Answer:   3  x[n]  3n [n]

Example: Find x[n] if X(z)=1/(1+z-1) Answer:   1  x[n]  (1) n [n]

Example: Find x[n] if X(z)=3z-4/(1-2z-1) Answer:   2 , k  4  x[ n]  3 2 n  4 [ n  4]

Example: X ( z )  z 4 (6 z  4 z 2 )  x[n]  ? Answer: x[n]  4 [n  2]  6 [n  3]


6

-2 -1 0 1 2 3 4 5 6 n
27
Example: X ( z )   x[4]  ?
1  31 z 1
27 1 2 3 1 4 1
Answer: X ( z )  =27z 0
 9 z  3 z  1z  z ...  x[4] 
1  31 z 1 3 3

4(7  9 z )
Example : X ( z )   x[5]  ?
z3
4(7  9 z )
Answer: X ( z )  3
=36 z 2  28 z 3  x[5]  0
z

Example: F ( z )  8 z 2 (1  z ) 2  f [0]  ?
2 (1  2 z  z 2 )
Answer: F ( z )  8 z (1  z )  8 2
2
=8z 0  16 z 1  8 z 2  f [0]  8
z
n f [ n]
16
0 8 f [ n]
1 16 8 8
2 8
3 0
4 0 -2 -1 0 1 2 3 4 5 6 n
Example : X ( z )  10 1  x[n]  ?
1 z
 1 
=10 1  z 1  z 2  z 3  ...  x[n]  10(1) n [ n]
10
Answer: X ( z )  1
 10  1 
1 z 1 z 

n x[n]
0 10 10 10 10 10
1 10
2 10
-2 -1 0 1 2 3 4 5 6 n
3 10
-10 -10 -10
4 10

Example: Find f[n] if F(z)=8/(3+4z)


8 2 z 1
Answer: F ( z )   
 f [ n ]  2 (  ) [ n  1]
3 n 1

3  4 z 1  34 z 1 4

Example: Find f[n] if F(z)=(20z+8)/(3+4z)

20 z 8 5 2 z 1
Answer: F ( z )    3 1
 3 1
 f [n]  5( 34 ) n [n]  2( 34 ) n 1 [ n  1]
3  4z 3  4z 1  4 z 1 4 z
UNITS OF BLOCK DIAGRAMS

x[n] Kx[n]
K

x[n] x[n  1]
D

x1[n]
x1[n]  x2 [n]

x2 [n]
BLOCK DIAGRAM REPRESENTATION OF SYSTEMS

y[n]
x[n]
p0 
D D

p1 d1
Feedback path

p0 x[n]  p1 x[n  1]  d1 y[n  1]  y[n]


A diagram with several feedbacks
y[n]
x[n]
p0 
D
D

d1
p1
Feedback path #1
D
D

p2 d2

Feedback path #2

p0 x[n]  p1 x[n  1]  p2 x[n  2]  d1 y[n  1]  d 2 y[n  2]  y[n]


An alternative representations
y[n]
x[n]
p0  
D
D

p1   d1

D
D

p2 d2

p0 x[n]  p1 x[n  1]  p2 x[n  2]  d1 y[n  1]  d 2 y[n  2]  y[n]


Usage of Z Transform in block diagrams

x[n] x[n  1]
D

X ( z) 1 z 1 X ( z )
z
Z Transform
representations the time
delay unit

p0 x[n]  p1 x[n  1]  p2 x[n  2]  d1 y[n  1]  d 2 y[n  2]  y[n]

p0 X ( z )  p1 z 1 X ( z )  p2 z 2 X ( z )  d1 z 1Y ( z )  d 2 z 2Y ( z )  Y ( z )
Determination of the transfer function H(z)
Y ( z )  p0 X ( z )  p1 z 1 X ( z )  p2 z 2 X ( z )  d1 z 1Y ( z )  d 2 z 2Y ( z )
Y ( z )   p0  p1 z 1  p2 z 2  X ( z )   d1 z 1  d 2 z 2  Y ( z )

1  d z
1
1
 d 2 z 2  Y ( z )   p0  p1 z 1  p2 z 2  X ( z )
Y ( z ) p0  p1 z 1  p2 z 2
H ( z)  
X ( z) 1  d1 z 1  d 2 z 2

p0  p1 z 1  p2 z 2 z 2 p0 z 2  p1 z  p2
H ( z)   2
1  d1 z 1  d 2 z 2 z 2 z  d1 z  d 2

X ( z) p0 z 2  p1 z  p2 Y ( z)
H ( z)  2
z  d1 z  d 2
Example: h[n]=?
x[n] y[n]

D
Answer:
3 x[n]  3 x[n  1]  y[n]
X ( z )  3z 1 X ( z )  Y ( z )  1  3 z 1  X ( z )  Y ( z )

Y ( z ) 1  3 z  X ( z )
1

 H ( z)    1  3 z 1
X ( z) X ( z)
 h[n]   [n]  3 [n  1]

n h[n]
0 1 3 x[n]
1 3
2 0 1
3 0
-2 -1 0 1 2 3 4 5 6 n
4 0
Example: h[n]=?
x[n] y[n]

1

D Answer:
x[n]  x[n  1]  y[n]
X ( z )  z 1 X ( z )  Y ( z )
Y ( z ) 1  z  X ( z )
1

 H ( z)    1  z 1
X ( z) X ( z)
 h[n]   [n]   [n  1]
n h[n]
0 1 h[n]   [n]   [n  1]
1 1 1
2 0
3 0 0 1 2 3 4 5 6 n
-2 -1
4 0
1
Example: h[n]=?
x[n] y[n]

D
4
Answer:
x[n]  4 y[n  1]  y[n]
X ( z )  4 z 1Y ( z )  Y ( z )  X ( z )  1  4 z 1  Y ( z )
Y ( z) 1
 H ( z)  
X ( z ) 1  4 z 1
 h[n]  4n [n]
Question: H(z)=?
a) H(z)=(z+6)/(z-3) x[n] y[n]
b) H(z)=3z-1/(z-6z-1) 
c) H(z)=(z-6)/(1-3z-1)
d) H(z)=(z-3)/(6-z-1)
e) H(z)=3z-1/(z-6-1) D D
6 3

z6
Question: Given H ( z )  . Then h[1]  ?
a) h[1] =-3 z 3
b) h[1] =9
c) h[1] =3
Answer:
d) h[1] =4
e) h[1] =1 z  6 1  6 z 1 1 6 z 1
H ( z)    
z  3 1  3 z 1 1  3 z 1 1  3 z 1
h[n]  3n [n]  6*3n 1 [ n  1]
h[1]  31 *1  6*30 *1  3  6  9
Question:
(a) Find H(z) X ( z) Y ( z)
(b) Find Y(z) if X(z)=3-18z-1 4  

3z 1 6z 1

Answer:
(a)
4 X ( z )  3 z 1 X ( z )  6 z 1Y ( z )  Y ( z )  Y ( z ) 4  3 z 1 4  3 z 1
  H ( z)   
 4  3z  X ( z )  1  6 z  Y ( z) 
1 1
X ( z) 1  6 z 1
1  6 z 1

(b) X ( z ) H ( z )  Y ( z )
4  3 z 1
Y ( z )   3  18 z 
1
1
 12  9 z 1
1  6z
y[n]  12 [n]  9 [n  1]
Block diagram simplifications

A( z )
X ( z) Y ( z)

B( z )

X ( z) Y ( z)
A( z )  B( z )
Simplification for a feedback (type 1)
X ( z) Y ( z)

G( z)

X ( z) 1 Y ( z)
1  G( z)
Simplification for a feedback (type 2)
X ( z) Y ( z)
 A( z )

G( z)

X ( z) A( z ) Y ( z)
1  A( z )G ( z )
Example: Simplify the given block diagram and find H(z)

X ( z) Y ( z)
 3  6

6z 1 4z 1

1 6 18 18 z 2
Answer : H ( z )  1
3 1
 1 1

1  6 z 1  6* 4 z (1  6 z )(1  24 z ) ( z  6)( z  24)

X ( z) 18 z 2 Y ( z)
( z  6)( z  24)
Example: Simplify the given block diagram and find H(z)

X ( z) Y ( z)
8  

3 z 1  4  z 1

1 1 8 8z 2
Answer : H ( z )  8 1 1
 1 1

1  (3 z  4) 1  ( z ) (5  3 z )(1  z ) (5 z  3)( z  1)

X ( z) 8z 2 Y ( z)
(5 z  3)( z  1)
Usage of signal flow graphs

3z 1

1
X ( z) 1 Y ( z)
z 1

4z

z 1
H total ( z ) 
1  4 z  3 z 2
Question: Given x[ n]  4  n [ n] ; y[n]  3 n [ n]  h[1]  ?
Answer:
1  41 z 1 1 1 1 1
H ( z)    4 z
1  31 z 1 1  31 z 1 1  31 z 1
 h[n]  3 n [n]  41 *3 ( n 1) [n  1]
1
h[1] 
12
Determining a difference equation from a given H(z)

X ( z) a0  a1 z 1  a2 z 2 Y ( z)
H ( z) 
b0  b1 z 1  b2 z 2

a0  a1 z 1  a2 z 2 Y ( z )
H ( z)  1 2

b0  b1 z  b2 z X ( z)

a0 X ( z )  a1 z 1 X ( z )  a2 z 2 X ( z )  b0Y ( z )  b1 z 1Y ( z )  b2 z 2Y ( z )

a0 x[n]  a1 x[n  1]  a2 x[n  2]  b0 y[n]  b1 y[n  1]  b2 y[n  2]
Drawing a block diagram from a given difference equation

a0 x[n]  a1 x[n  1]  b0 y[n]  b1 y[n  1]

y[n]  ?
x[n]
a0  1/b0

D
D

a1 -b1
a0 x[n]  a1 x[n  1]  a2 x[n  2]  b0 y[n]  b1 y[n  1]  b2 y[n  2]

y[n]  ?
x[n]
a0  1/b0

D
D

a1 -b1

D D

a2 -b2
Reduction of the number of time delay units
The are 4 time delay units. It is possible to reduce the number of time
delay units by rearranging the elements shown below.

y[n]
x[n]
a0   1/b0

D
D

a1 -b1

D D

a2 -b2
y[n]
x[n]
 1/b0
a0 
D D

-b1 a1

D D

-b2 a2
 1/b0
a0 
D

-b1 a1

-b2 a2
Simulation (time domain solution) of difference equations

a0 x[n]  a1 x[n  1]  b0 y[n]  b1 y[n  1] with an intial condition y[ 1]  0

It can be solved (simulated) as follows:


1
y[n]  a0 x[n]  a1 x[n  1]  b1 y[n  1]
b0
1
n  0  y[0]  a0 x[0]  a1 x[1]  b1 y[1]
b0
1
n  1  y[1]  a0 x[1]  a1 x[0]  b1 y[0]
b0
1
n  2  y[2]  a0 x[2]  a1 x[1]  b1 y[1]
b0
Question : Assume
x[n]  7 [n]  4 [n] and
6 x[n]  4 x[n  1]  2 y[n]  3 y[n  1] with y[ 1]  0
Calculate y[0], y[1], y[2]

Answer:
1
y[n]  6 x[n]  4 x[n  1]  3 y[n  1]  3x[n]  2 x[n  1]  1.5 y[n  1]
2

n x[n] y[n]
-1 0 0
0 7 3*7  2*0  1.5*0  21
1 0 3*0  2*7  1.5* 21  45.5
2 -4 3*(-4)  2*0  1.5* 45.5  56.25
STABILITY OF SYSTEMS
A discrete-time system is BIBO stable if, for any bounded
x[n] y[n] input, the output remains bounded. There are two techniques
System to check the stability:

• BIBO stability criteria


n 
h[n]   • Jury’s stability criteria

BIBO stability criteria


(BIBO stable test)
It is a method to determine the stability of a system by
examining the time domain version of the transfer function
h[n]. It should be such that


n 
h[n]   (BIBO stable test)

Question : Is the following system stable or not?


h[n]  (1) n 3n [ n]
Answer:
  


n 
(1) 3 [n]   (1) 3   3n  1  3  9  27  ...  
n n

n0
n n

n0
Hence the given
system is not stable
Question : Is it stable or not if the system’s mathemetical model is given by
3x[n]  4 x[n  1]  y[n] with an intial condition y[ 1]  0

Answer:
3  4 z 1
 3  4 z  X ( z )  7Y ( z)  H(z)= 7  h[n]  73  [n]  74  [n]
1


3 4 3 4

n  7
 [ n ] 
7
 [ n ] 
7
  1 Hence the given system is stable
7

Question : For which values of K


x[n]
 K
the system in the figure becomes y[n]
unstable?
3z-1
Answer:
K zK
H(z)= =
1  K 3 z 1 z  3K
z  3K  0 It has a root at z1  3K .
For stability 3K <1  K <0.3333
Jury’s stability criteria
x[n] y[n] It examines the location of its poles in the z-plane.
System It requires that the system’s poles are located inside
the unit circle centered at the origin. That is |zp|<1.

b0  b1 z 1  b2 z 2  ...  bM z  M
H ( z) 
a0  a1 z 1  a2 z 2  ...  aN z  N
1 2 N
(characteristic equation) a0  a1 z  a2 z  ...  aN z  0

A system is stable if the roots of denominator


polynomial (characteristic equation) are such
that:
z1  1 , z2  1 , z3  1 , . . . , z N  1
Question : Is the following system stable or not?
3  7 z 1  8 z 2
H ( z) 
1  3 z 1  10 z 2

Answer:
z 2  3 z  10  0
3  i 31 3  i 31
It has roots at z1  and z2 
2 2
3  i 31 32  ( 31) 2 40
z1    1
2 2 2

3  i 31 32  ( 31) 2 40
z2    1
2 2 2
Hence the given
system is not stable
Question : Transfer functions of systems are as given below. Which
one of these systems is stable?
a) H(z)=1/(z2+2z+10)
b) H(z)=(z+4)/(z+3)
c) H(z)=z/(3z+1)
d) H(z)=z/(z+3)
e) H(z)=z/(z2+3)

Answer:
a) z 2  2 z  10  0 It has roots at z1  -1  3i and z2  -1- 3i. They don't satisfy zn <1 , hence it is not a stable system
b) z  3  0 It has a root at z1  -3. It does not satisfy z1 <1 , hence it is not a stable system
c) 3 z  1  0 It has a root at z1  -1/ 3  -0.3333. It satisfies z1 <1 , hence it is a stable system
d) z  3  0 It has a root at z1  -3. It does not satisfy z1 <1 , hence it is not a stable system
e) z 2  3  0 It has roots at z1  i 3 and z2  -i 3. They don't satisfy zn <1 , hence it is not a stable system
Question : Assume A(z)=3z-1 in the given block diagram. For which values of K the
system becomes unstable?

x[n]
 K
y[n]
A(z)

Answer:
K zK
H(z)= =
1  K 3 z 1 z  3K
z  3K  0 It has a root at z1  3K .
For stability 3K <1  K <0.3333
For non-stability K  0.3333
A computational algorithm for determining the stability of complex systems
The characteristic equation: a0  a1 w  a2 w  ...  a N w  0
2 N
1 2 M
b0  b1 z  b2 z  ...  bM z
H ( z) 
a0  a1 z 1  a2 z 2  ...  aN z  N The following algorithm is useful in case the degree of the characteristic
b0  b1 w  b2 w2  ...  bM wM equation is too large.

a0  a1 w  a2 w2  ...  aN w N

Step1: Form an array of an’s


a0 a1 aN -1 aN array1

Step2: Form another array of reverse ordered an’s aN aN -1 a1 a0 array2

Step3: Multiply array2 with α and then subtract a0 - aN  a1 - aN -1 aN -1 - a1 aN - a0 array3
from array1
b0 b1 bN 1 0

array4
Step4: Form another array of reverse ordered bn’s bN 1 bN -2 b0

Step5: Multiply array4 with β and then subtract b0 - bN 1  b1 - bN -2  bN -1 - b0  array5


from array3
c0 c1 0

Step6: Form another array of reverse ordered cn’s


cN  2 cN -2 array6

Repeat these steps untill you get all


zeros. Then, the system is stable if a0  0 b0  0 c0  0 d 0  0 etc.
Example: Consider the system with the following characteristic equation:
3 + 2z-1 + z-2=0
Is this system stable?

Answer:

3 2 1
1 2 3
This is
positive
__________________________________
8/3 4/3 0
4/3 8/3 0
This is
positive
__________________________________
2 0 0

This is The system is stable because 8/3>0 and 2>0


positive
Computer code:
clear;clc;
syms z w;format short;
w=z^-1; Output:
H=(4+7*z^-1+4*z^-2)/(3+2*z^-1+z^-2);
an = 3 2 1
[num,den]=numden(H);

an=sym2poly(den)
areverse = 1 2 3
areverse=an(end:-1:1)

%%%%%%%%%%%%%%%%%%%%%%%%%%
an = 2.6667 1.3333
an=an-areverse*an(end)/areverse(end);
an=an(1:end-1)
areverse=an(end:-1:1)
areverse = 1.3333 2.6667
%%%%%%%%%%%%%%%%%%%%%%%%%%
an=an-areverse*an(end)/areverse(end);
an = 2.0000
an=an(1:end-1)
areverse=an(end:-1:1)
areverse = 2.0000
%%%%%%%%%%%%%%%%%%%%%%%%%%
an=an-areverse*an(end)/areverse(end);
an=an(1:end-1)
an = Empty matrix: 1-by-0
areverse=an(end:-1:1)

areverse = Empty matrix: 1-by-0


Example: A discrete process is controlled x[n] y[n]
with a proportional controller, which has  K A(z)
gain K, as shown in the figure. Assume
A(z)=1/(z-2). Determine a condition for
-1
the stability of this systems.

Answer:
KA( z ) Kz 1
H ( z)  
1  ( KA( z )) 1  ( K - 2) z 1
Characteristic equation: 1  ( K - 2) z 1  0

1 K 2
K 2 1
__________________
1  ( K  1) 2 0

1  ( K  1) 2  0  1  K  3
Therefore, it is stable when 1<K<3
Example: Assume A(z)=1/z/(z-2) in the x[n] y[n]
 K A(z)
given system. Determine a condition for the
stability of this systems.
Answer: KA( z ) Kz 2 -1
H ( z)  
1  KA( z )) 1  2 z 1  Kz 1
Characteristic equation: 1  2 z 1  Kz 1  0
z1  1  1  K
1 2 K
K 2 1
________________________
1 K 2 2K  2 0
2K  2 1 K 2 0
1  K 2  0  1  K  1 ________________________ z2  1  1  K

-( K -1) 2 ( K  3)
0
K 1

-( K -1) 2 ( K  3)
 0  3  K  1
K 1

It is not stable for any K.

You might also like