You are on page 1of 98

Digital Signal Processing

By
Prof. Upendra Kumar Sahoo
Dept. of ECE, NIT Rourkela

02/21/2022 Digital Signal processing 1


Block Diagram of DSP
• Analog Signal Processing

Analog Signal processor 𝑦 (𝑡)

• Digital Signal Processing

x ADC Digital Signal Processor DAC 𝑦 (𝑡)

02/21/2022 Digital Signal processing 2


ADC
X(t) Sampler X(nTs) Quantizer Xq(nTs)

X(nTs) X(nTs)
X(t)

nTs nTs
t

Discrete signal vector

𝑥 ( 𝑛𝑇𝑠 ) =[ …, 𝑥 ( −𝑇𝑠 ) , 𝑥 ( 0 ) , 𝑥 ( 𝑇𝑠 ) , 𝑥 ( 2 𝑇𝑠 ) , … ]
Discrete signal vector in another form

𝑥(𝑛)= [ … , 𝑥 (− 1 ) , 𝑥 ( 0 ) , 𝑥 (1 ) , 𝑥 ( 2 ) , … ]
02/21/2022 Digital Signal processing 3
Signal representation Signal Operations
Form1 Shifting
𝑥 ( 𝑛 ) ={1,2,4,2.5,0,1}
1. Right shifting 
x  n   1, 2, 4, 2.5, 0,1


Form2

x  n  2   0,1, 2, 4, 2.5, 0,1 
{
1,𝑛≥ 0
} 2. Left shifting 
𝑥 ( 𝑛) =
0 , 𝑛< 0 
x  n  2   1, 2, 4, 2.5, 0,1


Folding
1. Unit impulse signal

x  n   1, 2, 4, 2.5, 0,1 
{
1 , 𝑛=0
}

𝑥 ( 𝑛) =
0 , 𝑛= 0

x  n   1, 0, 2.5, 4, 2,1


2. Unit step signal
𝑥 ( 𝑛) =
{ 1,𝑛≥ 0
0 , 𝑛< 0 } Scaling

3. Unit ramp signal


1. Down sampling 
x  n   1, 2, 4, 2.5, 0,1


x  2n   2, 2.5,1 
𝑥 ( 𝑛) =
02/21/2022
{ 𝑛 ,𝑛 ≥ 0
0 , 𝑛< 0 } 2. Up sampling
Digital Signal processing 

x  n   1, 0, 2, 0, 4, 0, 2.5, 0,0, 0,1



 4
Classification of signals
𝑥 ( 𝑛 ) ={1,2,4,2.5,0,1}
Energy of a signal x(n)(Ex)=

Power of a signal x(n)(Px)=

1. Energy signal vs power signal 2. Periodic signal and aperiodic signal

Energy signal Power signal Periodic Signal Aperiodic Signal


1. Energy is finite 1. Power is finite x(n)=x(n+kN), for any k x(n)x(n+kN), for any k
2. Power is zero 2. Energy is infinite
2. Periodic signal Vs aperiodic signal

3. Even signal Vs Odd signal


Even signal Odd signal
1. x  n   x   n  1, x  n    x  n 

02/21/2022 Digital Signal processing 5


Discrete Time Systems Different Types of Systems
 Discrete time system is a device or Systems Input output relation
algorithm that operates on a discrete time
signal called input or excitation of the Indentity system
y n   x n 
system in a predefined rule to produce
Unity delay system
another discrete time signal called output y  n   x  n  1
or response of the system.
Unity advance system y  n   x  n  1

Moving average 1
y  n    x  n  1  x  n   x  n  1
y  n   F  x  n  system 3

Median Filter y  n   median  x  n  1 , x  n  , x  n  1

Accumulator
n
y n   x k 
x n F  y n
k 

02/21/2022 Digital Signal processing 6


Classification of systems
1. Stable Vs unstable systems
Def: For bounded input if output is bounded then it is a stable system

2. Causal Vs uncausal systems

2. Linear vs nonlinear system


If and
Then

4. Time varying vs time invariant systems


If then

5. Static vs dynamic system

02/21/2022 Digital Signal processing 7


Impulse response
If Consider the system
So Impulse response of the system is
If
Finite impulse respose(FIR) system h(n)=[h(0),h(1),h(2)]
h(0)

X(n) ×
h(1)
−1
𝑧
× +

𝑧− 1 h(2)

× + Y(n)
02/21/2022 Digital Signal processing 8
Convolution Operation
1. Folding
Signal representation using unit impulse signal h(  k )

2. Shifting
x n   x  k   n  k 
k 
h(n  k )
Output representation using impulse response of the system
3. Multiplication

   x  k  h(n  k )
y  n   F   x  k   n  k  
 k  

4. Addition
  x  k  F   n  k  
k  y n    x k  h n  k 
k 

  x k  h n  k 
k 

02/21/2022 Digital Signal processing 9


System Classification of LTI system
1. Stable Vs unstable system 2. Causal Vs Noncausal system


y n    h k  x n  k 
k 
h(n)  0, n  0
 ...  h  1 x  n  1  h  0  x  n   h 1 x  n  1
 h  2  x  n  2   ...

y n   h k  x n  k 
k 
 Condition for causal system is
y n    h k  x n  k 
a 
k 

h  k   0, k  0
  h k  x n  k 
k  For Causal system the convolution formula is
b  
  h k  x n  k  
y n   h k  x n  k 
k 
c  
 Mx  h k 
k 
k 0

02/21/2022 Digital Signal processing 10


System Classification of LTI system

4. Time invariant Vs time varying


3. Linear Vs Nonlinear systems 
y n   h k  x n  k 
k 


y n    h k  x n  k  y n  l    h k  x n  l  k 
k 
k 

 h  k   a x  n  k   a x n  k 
1 1 2 2
k  5. Finite impulse response Vs infinite

Impulse Response System
  a h  k  x  n  k   a h  k  x n  k 
k 
1 1 2 2

 a1 y1  k   a2 y2  k  M2
y n   h k  x n  k 
k  M1
M2
y n   h k  x n  k 
k 0

02/21/2022 Digital Signal processing 11


Infinite Impulse Response(IIR) System
h(0)
X(n) × + + Y(n)

h(1) b(1)
𝑧− 1 𝑧− 1
× + + ×
𝑧− 1 h(2) b(2) 𝑧− 1

× ×
Direct Form I

y  n   h  0  x  n   h 1 x  n  1  h  2  x  n  2 
 b 1 y  n  1  b  2  y  n  2 

02/21/2022 Digital Signal processing 12


Direct Form II

h(0)
X(n)
+ × + Y(n)

b(1) h(1)
−1
𝑧
+ × × +

b(2) 𝑧− 1 h(2)

× ×
y  n   h  0  x  n   h 1 x  n  1  h  2  x  n  2 
 b 1 y  n  1  b  2  y  n  2 

02/21/2022 Digital Signal processing 13


Correlation Applications of Correlation

1. Autocorrelation 1. Target detection using RADAR


x  n   1, 0.5, 2,1, 0, 0.2, 2



Rxx  k    x n  x n  k 
n 

2. Cross correlation


Tx  x  n 
Rxy  k    x n  y n  k 
n  Rx  ax  n   w  n 

RTR (k )   Tx  n  Rx  n  k 
n 

02/21/2022 Digital Signal processing 14


Applications contd…
2. Digital Communication

Tx Channel Rx

xo  n  , x1  n  w n y  n   xi  n   w  n 

 x0  n  , Rx0 y  Rx0 y xo t  x1 t 
R n   
 x1  n  , Rx0 y  Rx0 y

Different types of Digital signal


1. ASK (Amplitude shift keying) x0 t  x1 t 
2. PSK (Phase shift keying)
3. FSK (Frequency shift keying)

02/21/2022 Digital Signal processing 15


Properties of the Correlation

1. Correlation sequence is an even sequence. 


2

2. The correlation sequence value is maximum at Rxx  0  


n 
 ax  n   by  n  l   0

a 2 Rxx  0   b 2 Ryy  0   2abRxy (l )  0


ax  n   by  n  l  a
2
a
Rxx  0     Rxy l  2    R yy  0   0
b b

2
  ax  n   by  n  l  Discrimination function should be greater
n  than zero

 
n 
 a 2 x 2  n   b 2 y 2  n  l   2abx  n  y  n  l 
4  Rxy
2
l   Rxx  0  Ryy  0   0
  
Rxy l   Rxx  0  Ryy  0 
a 2

n 
x n   b
2 2

n 
y  n  l   2ab  x  n  y  n  l 
2

n  Rxy l 
1  1
 a Rxx  0   b Ryy  0   2abRxy (l )
2 2
Rxx  0  Ryy  0 

02/21/2022 Digital Signal processing 16


Correlation Coefficient Correlation of Periodic sequence

Rxy l  Suppose x  n  , y  n  are two power signals


1  1
Rxx  0  Ryy  0 
If x  y
 1 M

Rxx l 
Rxy l   lim 
M  2 M  1

 x  n  y  n  l  

1  1 n  M

Rxx  0   1 M

Rxx l   lim   x  n  x  n  l 
Rxx l  M  2 M  1
 n  M 
 xx l  
Rxx  0 
1 N 1
Rxy l  
N
 x n  y n  l 
n0

1 N 1
Rxx l  
N
 x n  x n  l 
n 0

02/21/2022 Digital Signal processing 17


Correlation Contd… Solution to the problem

Consider the following signal Find the auto-correlation of the sequence y  n 

1 M 1
y  n   x  n   w  n  , 0  n  M , M  N Ryy l     x  n   w  n   x  n  l   w  n  l 
M n 0
1 M 1 1 M 1
 
M n 0
x  n  x  n  l   x  n  w  n  l 
M n 0
Observed Signal Random Interference a b 
1 M 1
1 M 1
Signal of Interest, which is a periodic signal of unknown period N 
M

n 0
w  n  x  n  l 
M
 w n w n  l 
n 0
c  d 

Problem: What is period of the signal x  n  ? 1. Term (a) is a periodic sequence having maximum
value at 0, N ,2N
2. Term (b) is a very small quantity.
3. Term (c) is a very small quantity.
4. Term (d) is non zero at l=0 and nearly zero at
other

02/21/2022 Digital Signal processing 18


Correlation contd…
Input Output
h n Autocorrelation between output signal is
x n y n
Ryy l   y l   y  l 
  x l   h l    x  l   h  l 
   h l   h  l    x l   x  l 
y n   h k  x n  k 
k 
 Rhh l   Rxx l 

Cross correlation between input and output signal is

Rxy  l   y l  * x  l 
 h  l  * x  l  * x  l 
 h  l  * Rxx  l 

02/21/2022 Digital Signal processing 19


LTI System Characterized By Constant Coefficient
Difference Equation
 Consider the following recursive equation n
y  n   a y  1   a k x  n  k 
n 1

y  n   ay  n  1  x  n     
y zi  n  k 0    
y zs  n 

 Block Diagram
x n  y n
+ Total Response =Zero-input response+ Zero-state Response

z 1
a
 Zero input response is also called free response or
 Output Behavior
natural response.
y  0   ay  1  x  0   Zero state response is called forced response.
y 1  ay  0   x 1  a 2 y  1  ax  0   x 1
 
n
y n  a n 1
y  1   a k x  n  k 
k 0
02/21/2022 Digital Signal processing 20
Linearity Condition for a Generalized System
Consider the following generalized system
N M
y  n    ai y  n  i    b j x  n  j 
i 1 j 0

Linearity property:
For the linearity condition to be satisfied the system needs to satisfy the following three requirements.
 The total response needs to be combination of zero state response and zero input response
 The principle of superposition should be applied for zero state response(zero state linear).
 The principle of superposition should be applied for zero input response(zero input linear).

Time invariant property:


 A system can be called time invariant if all the coefficients ai , i  1,..., N b j , j  0,..., N does
not vary with time.

Stability:
 For every bounded input and bounded state condition if the total response is bounded then the
system is stable.

02/21/2022 Digital Signal processing 21


Stability continued…
n
y n  a n 1
y  1   a k x  n  k 
k 0

n
y n  a n 1
y  1   x n  k 
a k

k 0
n
a n 1
y  1   a k x  n  k 
k 0
n
a n 1
y  1  M x  a k
k 0

1  an
a n 1
y  1  M x
1 a

02/21/2022 Digital Signal processing 22


Solutions For Linear Constant Coefficient Difference Equation
2 N M
d y dy y  n    ai y  n  i    b j x  n  j 
a 2
 b  c  f x
dt dt i 1 j 0

Total solution Total solution

y  t   yh  t   y p  t  y  n   yh  n   y p  n 

Homogeneous solution Homogeneous solution


d2y dy N
a
dt 2
 b
dt
c 0  a y n  i   0
k 0
i
yh  n    n

yh  t   e  t Characteristic polynomial
N

a   n  N   N  a1 N 1  ...  aN   0
nk
Characteristic polynomial k 0
k 0
2
a  b  c  0
 N  a1 N 1  ...  aN  0
02/21/2022 Digital Signal processing 23
Homogeneous solution contd…
 Number of roots of characteristic polynomial is N.  Characteristic polynomial
 Assume that each roots are distinct
 Homogeneous solution is yh  n   c11  c2 2    cN N
n n n
 n  a1 n 1  0
y  n   a1 y  n  1  x  n    a1  0
   a1
 The homogeneous solution can be found out setting x n   0
 Homogeneous solution is
yh  n   a1 yh  n  1  0
yh  n   C  n  C  a1 
n

 Possible homogeneous solution


y  0   a1 y  1  0
yh  n    n
C  a1 y  1  0
C   a1 y  1

02/21/2022 Digital Signal processing 24


Homogeneous solution contd…
yh  n     a1  y  1 , n  0
n 1

 Problem: Find the homogeneous solution of the following difference equation

y  n   3 y  n  1  4 y  n  2   0
 Homogeneous solution is
 Solution:
yh  n   c1  1  c2 4n
n

y n    n
 Characteristic polynomial  Taking n  0 and n  1 we get

 n 1   2  3  4   0 y  0   3 y  1  4 y  2 
y 1  3 y  0   4 y  1
 Roots are
 3 3 y  1  4 y  2   4 y  1
  1, 4
 13 y  1  12 y  2 

02/21/2022 Digital Signal processing 25


Homogeneous solution contd…
 Homogeneous solution is given by
 Taking n  0,1 we get
y  0   c1  c2  1 4 
y zi  n     y  1  y  2    1
n

y 1  c1  4c2  5 5 


 16 16  n
 Equating these twos   y  1  y  2    4 
 5 5 
c1  c2  3 y  1  4 y  2 
c1  4c2  13 y  1  12 y  2 

 Thus
1 4
c1   y  1  y  2 
5 5
16 16
c2  y  1  y  2 
5 5

02/21/2022 Digital Signal processing 26


Particular Solution
N M

 a y  n  k    b x n  k ,
k 0
k p
k 0
k a0  1

Problem: Determine the particular solution of the first order difference equation

y  n   a1 y  n  1  x  n  , a1  1 where the input x  n  is a unit step sequence, that is

x n   u n 

Particular Solution: y p  n   ku  n 
1
yp n  u n
ku  n   a1ku  n  1  u  n  1  a1
1
k
1  a1

02/21/2022 Digital Signal processing 27


Particular Solution contd…
Input Signal x n Particular Solution y p n

A K
AM n KM n
An M K 0 n M  K1n M 1    K M
An n M An  K 0 n M  K1n M 1    K M 
 A cos w0 n 
  K1 cos w0 n  K 2 sin w0 n
 A sin w0 n 

Total solution=homogeneous solution + particular solution

02/21/2022 Digital Signal processing 28


Particular Solution Contd…

Determine the solution y  n  , n  0 to the difference equation y  n   a1 y  n  1  x  n  when x  n   u  n  is


an input sequence andy  1 is the initial condition.

y  0   a1 y  1  1
yh  n   C  n  C  a1 
n
y  0   1  a1 y  1

1
y p n   u n  y 0  C 
1
1  a1 1  a1

1 1
y  n   C   a1  u n 
n
 C  1  a1 y  1
1  a1 1  a1
a1
C  a1 y  1
1  a1

02/21/2022 Digital Signal processing 29


Impulse Response of LTI Recursive System
n
yzs  n    a k x  n  k 
k 0

02/21/2022 Digital Signal processing 30


Problem-1
Two discrete time systems F1 andF2 are connected in cascade to form a new system F as shown below

w n
xc  n  F1 F2 yc  n 

x n F y n

1. If F1 and F2 are linear then F is linear.


2. If F1 and F2 are causal then F is causal.
3. If F1 and F2 are stable then F is stable

02/21/2022 Digital Signal processing 31


Solution 1

F1
xc1  n   w1  n  F1
a1 xc1  a2 xc 2  n   a1w1  n   a2 w2  n 
F1
xc 2  n   w2  n  F2
a1w1  n   a2 w2  n   a1 yc1  n   a2 yc 2  n 

F2
w1  n   yc1  n 
F1 F2
F2
w2  n   yc 2  n 
a1 xc1  a2 xc 2  n   a1 yc1  n   a2 yc 2  n 

F1 F2
xc1  n   yc1  n 
F1 F2
xc 2  n   yc 2  n 
F1F2
a1 xc1  a2 xc 2  n  ?

02/21/2022 Digital Signal processing 32


Solution 2 Solution 3
 

w  n    h1  k  xc  n  k  w n   h l  x  n  l 
l 
1 c

k 0 

yc  n    h2  l  w  n  l  w n   
l 
h1 l  xc  n  l 
l 0


yc  n    h2 l  w  n  l 
 M xc 
l 
h1  l 
l 0
 
 M xc M h1
  h2 l   h1  k  xc  n  k  l 
l 0 k 0
  
   h2 l  h1  k  xc  n  k  l 
l 0 k 0
yc  n   
l 
h2  l  w  n  l 

p  k l 

    h2  l  w  n  l 
yc  n     h2 l  h1  p  l  xc  n  p  l 
l 0 p 0 

  
 M xc M h1  h2  l 
    h2  l  h1  p  l  xc  n  p  l 
p 0  l 0   M xc M h1 M h 2
02/21/2022 Digital Signal processing 33
Problem 2:

Let F be an LTI, relaxed, and BIBO stable system with input x  n  and output y .n  Show that
1. If x  n  is periodic then y  n  is also periodic with same period as of input.
2. If x  n  is bounded and tends to constant then y  n  is bounded and also tends top constant.

Solution

y n  

h k  x n  k 
y n   h k  x n  k 
k 
k 
 

y  n  pN    h  k  x  n  pN  k  y n   A  h k 
k  k 


y  n  pN    h k  x n  k 
k  y  n   AM h
y  n  pN   y  n 

02/21/2022 Digital Signal processing 34


Problem 3
Consider the signal   n   a nu  n  , 0  a  1. 

1. Show that any sequence x  n  can be decomposed as x  n   


ck   n  k  and express c in terms of x  n 
k
2. Use the properties of linearity and time invariance to express the output y  n   F  x  n  in terms of x  n 
n 

and the signal g  n   F   n  , where F  is an LTI system.


3. Express the impulse response h  n  in terms of g  n 

Solution   n     n   a  n  1

x n   xk   n  k    n   a n u  n  , 0  a  1. 
k  x n  x
k 
k   n  k   a  n  1  k 
 1, a, a 2 ,  
x n   x  n  k      x   n  k    ax   n  k  1
k k
k
k  k  k 
a  n  1  a nu  n  1 , 0  a  1.  
1 n  0   x   n  k    ax  n  p 
 n   0, a, a ,
2
k p 1

0 n  0
k  p 
  
  x
k 
k  axk 1   n  k 
02/21/2022 Digital Signal processing 35
Problem 4
Determine the response y  n  , n  0 of the system described by the second order difference
equation y  n   3 y  n  1  4 y  n  2   x  n   2 x  n  1 to the input x  n   4n u  n  .

Solution
Particular solution
Homogeneous solution
y  n   3 y  n  1  4 y  n  2   0 y  n   3 y  n  1  4 y  n  2   x  n   2 x  n  1
yh  n    n y p  n   An4n u  n 
 n  2   2  3  4   0
An4n u  n   3 A  n  1 4n 1 u  n  1  4 A  n  2  4 n 2 u n  2 
 2  3  4  0
  4, 1
 4n u  n   2  4n 1 u  n  1
yh  n   c1 4n  c2  1
n

02/21/2022 Digital Signal processing 36


Solution
y  n   3 y  n  1  4 y  n  2   x  n   2 x  n  1
n2 y  0   3 y  1  4 y  2   x  0 
y 1  3 y 0   4 y  1  x 1  2 x  0 
32 A  12 A  16  8
 3 3 y  1  4 y  2   x  0   4 y  1  x 1  2 x  0 
6
A  5 y  1  12 y  2   x 1  5 x  0 
5
6
y p  n   n4n u  n  y  0   c1  c2
5
24
y 1  4c1  c2 
5
y  n   yh  n   y p  n 
6 n
 c1 4 u  n   c2  1 u  n   n 4 u  n 
n n

02/21/2022 Digital Signal processing 37


Problem 5
An audio signals  t  generated by loud speaker is reflected at two different walls with reflection coefficient r1 and r2.
The signal x t  recorded by a microphone close to the loudspeaker, after sampling is
x  n   s  n   r1s  n  k1   r2 s  n  k 2  ,where k1 and k 2 are the delays of the two echoes.
(a) Determine the autocorrelation Rxx l  of the signal x  n  ,
(b) Can we determine r1 , r2 , k1 , k2 by observing Rxx l  ?
(c) What happens if r2  0 ?

02/21/2022 Digital Signal processing 38


02/21/2022 Digital Signal processing 39
Z-Transform
Im(z)

X z  
n 
x n  z n

ROC
Where z is a complex variable

z
x n   X z C0 Re(z)

n
1
x n     u n 
2
1
xz  , ROC : z  2
1 1
1 z
2
02/21/2022 Digital Signal processing 40
Z-transform contd.

ROC
X  z  z  re j   x n r  n  j n
e
n 
C0 r2 Re(z
 
)
X z  
n 
x  n  r  n e  j n  
n 
x n  r n

 
x n 
X  z    x  n  r n

n 0 n 0 rn Im(z)
ROC
ROC
 
x n r1
 x  n  r
n0
n
 rn
C0 Re(z C0 Re(z)
n 0 )
r1 r2

02/21/2022 Digital Signal processing 41


Properties of the z-transform

1. Linearity 3. Scaling in the z-domain


z
x1  n   X 1  z 
z
x n  X  z 
z z
x2  n   X 2  z  a x  n   X  a 1 z 
n

z
a1 x1  n   a2 x2  n   a1 X 1  z   a2 X 2  z 
4. Time reversal
2. Time shifting z

z
x n   X z
x n  X  z  z

x n  k   z k X  z 
x  n   X z 1

02/21/2022 Digital Signal processing 42


Contd…
5. Differentiation in the z-domain 7. Multiplication of two sequences
z
x n  X  z 
z
x1  n   X 1  z 
zdX  z  z
nx  n   z x2  n   X 2  z 
dz z 1  z  1
x1  n  x2  n   
 X 1  v  X 2  v dv
2 j c
v
6. Convolution of two sequences 8. Initial value theorem
z
x1  n   X 1  z 
z x  0   lim X z
x2  n   X 2  z  z 

z
x1  n  * x2  n   X 1  z  X 2  z 

02/21/2022 Digital Signal processing 43


Rational Z-transform
M

B  z  b0  b1 z 1  ...  bM z  M  m
b z m

X z    m0

A  z  a0  a1 z  ...  aN z
1 N N

a z
n 0
n
n

b b
z M   1  z M 1  ...   M 
B  z  b0 N  M  b0   b0 
X z   z
A  z  a0 a a
z N   1  z M 1  ...   N 
 a0   a0 

Bz b0 N  M  z  z1  z  z2  ...  z  z M 
X z   z
A  z  a0  z  z1  z  z2 ...  z  z N 

02/21/2022 Digital Signal processing 44


Rational Z-transform
M

z  z  k
X  z   Gz N  M k 1
M

z  p 
k 1
k

b0
G
a0
It has M number of finite zeros at z1 , z2 ,..., z M
It has N number of finite poles at p1 , p2 ,..., p N

02/21/2022 Digital Signal processing 45


Pole Location and Time Domain Behavior of Causal Signal
Im(z) X(n)

0 1 Re(z) n

0 1 Re(z) n

02/21/2022 Digital Signal processing 46


0 1 Re(z) n 0 1 Re(z) n

0 1 Re(z) n 2
0 1 Re(z) n

0 1 Re(z) n 0 1 Re(z) n

02/21/2022 Digital Signal processing 47


x(n)
Im(z) rn

n
0 1 Re(z)

r 1

n
0 1 Re(z)

n
r

0 1 Re(z) n

02/21/2022 Digital Signal processing 48


The System Function of an LTI System

z N M
y n  Y  z   a y n  k    b x n  k 
k k
k 0 k 0
z
x n  X  z  N M

z
 k
a
k 0
z Y    k X z
z  b zk
k

k 0
h n   H  z  M

Y z  H z X z Y z  k


b z k

H z   k 0

X z N
1   ak z  k
k 1

02/21/2022 Digital Signal processing 49


The System Function of an LTI System
All zero system or moving average system
M M

M  k
b z M k
z  z  k
H  z    bk z  k  k 0
 k 1

k 0 zM zM

All pole system

b0 b0 z N
H z  N
 N
1   ak z  k z  p  k
k 1 k 1

02/21/2022 Digital Signal processing 50


Analysis of LTI system in z-domain
Bz N z
Y z  H z X z Y z 
A z  Q z 
N z Using partial fraction expansion
X z 
Qz
Ak N N
Qk
poles  q1 , q2 ,..., qL Y z   1
 1
k 1 1  pk z k 1 1  qk z
B z
H z  Time domain behavior of the output is
Az  N N
Y  z    Ak  pk  u  n    Qk  qk  u  n 
n n

poles  p1 , p2 ,..., pN k 1 k 1

02/21/2022 Digital Signal processing 51


N N
y  n    Ak  pk  u  n    Qk  qk  u  n 
n n


Total response k 1      k 1     
Natural response Forced response

1. Causality and stability


If the ROC of the transfer function is the exterior of a circle including z

 h n  
n 

02/21/2022 Digital Signal processing 52


Multiple order poles and stability
Consider two-pole systems of second order
y  n    a1 y  n  1  a1 y  n  1  b0 x  n 

The system function is

Y z b0 b0 z 2
H z    2
X  z  1  a1 z  a2 z
1 1
z  a1 z  a2
The system has two zeros and two poles at

a1 a12  4a2
p1 , p2   
2 4

02/21/2022 Digital Signal processing 53


Contd.. Real and Distinct Poles
 The system is BIBO stable if the poles lie inside the unit a12  4a2
circle If p1  1 and p 1
2
A1 A2
H z  
 The roots of the quadratic equation must satisfy 1  p1 z 1 1  p2 z 1
a1    p1  p2 
b0 p1
A1 
a2  p1 p2 p1  p2
a2  p1 p2  1 b0 p2
A2 
p1  p2
a1  1  a2
b0
h n  
p1  p2
 p1
n 1
 p 2 u n 
n 1

02/21/2022 Digital Signal processing 54


Contd..
a2 a 
2

a2  1
Stability Triangle 4
Complex conjugate poles
a2  a1  1
1

Real and equal poles


a1
-2 -1 1 2

-1
Real and distinct poles

a2   a1  1

02/21/2022 Digital Signal processing 55


Real and Equal Poles Complex Conjugate Poles

a12  4a2 a12  4a2


a1 H z 
A A*
p1  p2  p  
2 1  pz 1
1  p* z 1
b0 A A*
H z   jw0 1

1  re z 1  re  jw0 z 1
1  pz 
1 2

h  n   b0  n  1 p u  n 
n n b0 r n
h n  sin  n  1 w0u  n 
sin w0

02/21/2022 Digital Signal processing 56


One Sided Z-Transform

Properties of the one sided z-transform
X 
 z    x n  z n

n 0 1. Time delay
z
x n  X 
z z
x n  X   z 
z
 k
n
 It does not contain any information
x  n  k   z  X  z    x  n  z 
k 

about the negative values of the time.


 n 1 
 It is unique only for causal signal z
 It is similar to the z-transform of x  n  u  n  x n  k   z k X   z 

02/21/2022 Digital Signal processing 57


Contd…
2. Time Advance
z
x n   X   z 
z
  k 1
n 
x n  k   z  X  z    x n  z  , k  0
k

 n0 

3. Final Value Theorem


z
x n   X   z 
lim x  n   lim  z  1 X   z 
n  z 1

If ROC of  z  1 X   z  include unit circle.

02/21/2022 Digital Signal processing 58


Problem 1
The well-known Fibonacci numbers of sequence is obtained by computing each term by sum
Of the two previous ones. The first few terms of the sequences are 1,1,2,3,5,8,… . Determine a closed
form expression for the nth term of the Fibonacci sequence.

Solution:
y  n   y  n  1  y  n  2 
y  n   y  n  1  y  n  2 
Y   z    z 1Y   z   Y  1   z 2Y   z   y  2   y  1 z 1 
y  0   y  1  y  2   1
Y   z    z 1Y   z    z 2Y   z   1
y 1  y  0   y  1  1
y  1  0 1  z 1
 z 2
 z 1
Y 

y  2   1 1
Y  z 
1  z 1  z 2

02/21/2022 Digital Signal processing 59


Contd…
2
z
Y  z  2 1
z  z 1
1 5 1 5
p1  , p2 
2 2
A1  p1 5 , A2   p2 5
1  5  1  5  n 1  5  1  5  n 
y n          u  n 
 2 5  2  2 5  2  
 

02/21/2022 Digital Signal processing 60


Problem 2
Determine the step response of the system y  n   ay  n  1  x  n  ,  1  a  1 ,
when initial condition is y  1  1 .

Solution: Taking one sided z-transform


1  a n 1
Y 
 z   a  z 1
Y 
 z   y  1  X  z  
y n  a u n  
n 1
u n 
1 a

Y   z   a  z 1Y   z   1  X   z 

1  az Y  z   a  X  z 
1  

a 1
Y  z  
1  az 1 1  az 1 1  z 1 

02/21/2022 Digital Signal processing 61


Response of Pole-Zero System with Nonzero Initial Condition
N M
y  n    a1 y  n  k    bk x  n  k 
k 1 k 0

N M
Y 
 z    ak z k
Y 
 z   y  n  z n
   bk z  k X   z 
k 1 k 0
M N k

 bk z k
 ak z k
 y   n  z n

Y  z  k 0
N
X z  k 1 n 1
N
1   ak z  k 1   ak z  k
k 1 k 1

N0  z 
 H z X z
Az

02/21/2022 Digital Signal processing 62


Contd…

N k N
y zi  n    Dk  pk  u  n 
n
N 0  z    ak z k
 y  n  z n
k 1
k 1 n 1

N N
Zero-state response y  n    Ak  pk  u  n    Dk  pk  u  n 
n n

k 1 k 1

Yzs  z   H  z  X  z  N
  Qk  qk  u  n 
n

k 1

Zero-input response N N
   Ak  Dk  pk  u  n    Qk  qk  u  n 
n n

N0  z 
k 1 k 1

Yzi  z  

A z 

02/21/2022 Digital Signal processing 63


Continuous time Fourier Series(CTFS)

x t   
k 
ck e j 2 kF0t Synthesis Equation

F0 Fundamental frequency of the periodic signal


ck Coefficients of the signal
Tp
1
 
 j 2 kF0t
ck  x t e dt Analysis Equation
Tp 0

02/21/2022 Digital Signal processing 64


Power Density Spectrum of Periodic Signal
1 2
Px 
Tp  x t 
Tp
dt

1
Px   x t  x* t  dt
Tp Tp

1 

Tp 
Tp
x t  
k 
ck* e  j 2 F0t dt
4F0 3F0 2F0  F0 F0 2F0 3F0 4F0

1
 
k 
ck*
Tp Tp
x t  e  j 2 F0t dt

  ck  ck ek
cc 
* 2
 k k  ck
k  k 

02/21/2022 Digital Signal processing 65


Continuous Time Fourier Transform(CTFT)
x t 

x  t   lim x p t 
T p 


1 T2 0 t
x p t   ce j 2 F0t  T2
k , Fo  2 2
k  Tp
Tp 2
1 x p t 
ck   x p t  e  j 2 kF0t dt
Tp Tp 2


1
ck   x t  e  j 2 kF0t dt Tp 
Tp 0 Tp Tp t
Tp 
2
2

02/21/2022 Digital Signal processing 66


Contd…

X f  x t  e  j 2 Ft dt lim x p  t   x t 

 T p 

1  lim  X  k F  e j 2 k Ft F
ck  X  kF0  F  0
k 
Tp 
x t    X  F  e j 2 Ft dF

1 
x p t  
Tp

k 
X  kF0  e j 2 kF0t


x p t   
k 
X  k F  e j 2 k Ft F

02/21/2022 Digital Signal processing 67


Contd…

Synthesis Equation X t    x  F  e j 2 Ft dF



Analysis Equation X F    x t  e  j 2 Ft dt


Dirichlet’s Condition
1. The signal x t  has a finite number of discontinuities.
2. The signal x t  has finite number of maxima and minima.
3. The signal x t  is absolutely integrable, that is


 x t  dt   2


 x t 

dt  

02/21/2022 Digital Signal processing 68


Energy Density Spectrum of Aperiodic Signal

2
Ex 

 x t  dt
X F   X F  e
j  F 


  x t  x* t  dt S XX  F   X  F 
2



 * 
  x t    X  F  e  j 2 Ft
dF  dt
   

 

  X  F    x t  e
*  j 2 Ft
dt  dF
   
 
2
 X  F  X  F  dF   X  F 
*
 dF
 

02/21/2022 Digital Signal processing 69


Discrete Time Fourier Series(DTFS)
Frequency analysis of discrete time signal
N 1
 N, a 1

x  n   x  n  N  for all n  a n
 1  a N
n 0  , a 1
 1 a
j 2 kn N
e , k  0,..., N  1
N 1 N 1 N 1
N 1  x n e  j 2 nl N
  cl e
j 2  k  l  n N

x  n    ck e j 2 kn N
n0 n0 l 0
k 0

N 1
N , k  l  0,  N , 2 N ,
N 1
 N , k  0,  N , 2 N ,... e j 2  k  l  n N

 e j 2 kn N
 n 0  0, otherwise
k 0  0, otherwise

02/21/2022 Digital Signal processing 70


Contd…
N 1 N 1

 ck e
l 0 n0
j 2  k  l  n N
 Nck Power Density Spectrum of Periodic Signal
1 N 1 2
Px  
N n0
x n
1 N 1
ck 
N
  
x
n0
n e  j 2 kn N
1 N 1
Px   x  n  x*  n 
N n0
1 N 1
 N 1 *  j 2 kn / N 
1 N 1

N
 x  n    ck e 
ck  N   x  n  e  k 0 
 j 2 k  n  N  N n0

N n0 1 N 1 N 1

N
c *
k  x  n  e  j 2 kn / N

1 N 1 k 0 n0
  x  n  e  j 2 kn N  ck N 1 N 1
N n 0   ck*ck   ck
2

k 0 k 0

02/21/2022 Digital Signal processing 71


Discrete Time Fourier Transform(DTFT)
 
   j n  j m
d     x  n  e

 X   e
j m
 e d
X    
n 
x  n  e  j n    n  
 

  x  n   e j m  n  d 
X   2 k   
n 
x n  e  j   2 k n
n  

j  m  n  2 mn

e d  
  x n e
n 
 j n  j 2 kn
e  0 mn

   
  x n e
n 
 j n
 X    X   e j m d   x  n   e j m  nd
 n  

 2 x  m 

02/21/2022 Digital Signal processing 72



1
x m   X   e j m d 
2 

02/21/2022 Digital Signal processing 73


DTFT Properties
1. Linearity
F
x  n   X  
F
x1  n   X 1  
F
F
x   n   X   
x2  n   X 2  
F
a1 x1  n   a2 x2  n   a1 X 1    a2 X 2  
F
x1  n   X 1  
F F
x  n   X   x2  n   X 2  
F
x  n  k   e  j k X   F
x1  n  * x2  n   X 1   X 2  

02/21/2022 Digital Signal processing 74


F F
x1  n   X 1   x  n   X  
F
x2  n   X 2   F1
cos 0 n  x  n    X   0   X   0 
F 2
x1  n  * x2  n   X 1   X 2   

F
F x1  n   X 1  
x  n   X  
F
F x2  n   X 2  
e j0 n
x  n   X   0 

 F 1

n 
x1  n  x2  n  
*

2  X 1   X 2*   d 


02/21/2022 Digital Signal processing 75


F
x1  n   X 1  
F
x2  n   X 2  

F1
x1  n  x2  n    X   X     d 
1 2
2 

F
x  n   X  
dX  
F
nx  n   j
d

02/21/2022 Digital Signal processing 76


Frequency Domain Analysis of LTI Systems

Response to the complex exponential

x  n   Ae jwn
Ae jwn h n  AH  w  e jwn


y n   h k  x n  k  Magnitude
k  Phase
Gain
a   Gain
  h  k  Ae
k 
jw n  k 

j  w 
b  
 H  w  H  w e
 A   h  k  Ae  jwk  e jwn
 k  
x  n   A1e jw1n  A2e jw2 n
 AH  w  e jwn

y  n   A1 H  w1  e jw1n  A2 H  w2  e jw2 n

02/21/2022 Digital Signal processing 77


Contd… Problem 1:
x  n   A cos  wn 
x  n   A sin  wn 
A jwn
x  n    e  e  jwn  Find y  n  ?
2
A
y  n    H  w  e jwn  H   w  e  jwn 
2 Problem 2:
Consider the following moving average filter

A
2

H  w e 
j wn   w 
 H  w e 
 j wn   w 
 1
y  n    x  n  1  x  n   x  n  1
3
 A H  w  cos  wn    w  Find the outputy  n  for the input

x  n   10  5sin n  20 cos  n
2

02/21/2022 Digital Signal processing 78


Steady state and Transient Response to the Sinusoidal
Signal

02/21/2022 Digital Signal processing 79


Steady state Response to the Periodic signal

02/21/2022 Digital Signal processing 80


Response to the Aperiodic Signal

02/21/2022 Digital Signal processing 81


Response of an LTI system having Rational System
Function

H  w   H  z  z e jw   h n e
n 
jwn

M M

b z k
k M

 bk e  jwk   e jw
 zk 
H  w   b0 e  jw M  N k 1
H z  k 0
H  w  k 0 N
N
1   ak z k
N
1   ak e  jwk  e
k 1
jw
 pk 
k 1 k 1

 1  z e   jw
M

 1  z k z 1
 k

H  z   b0 k 1 H  w   b0 k 1
N

 1  p e 
N

 1  p z 1 
 jw
k k
k 1 k 1

02/21/2022 Digital Signal processing 82


Computation of the Frequency Response Function
jk  w 
e  zk  Vk  w  e
jw

j k  w 
e jw  pk  U k  w  e

V1  w V2  w  ...VM  w 
H  w   b0
U1  w U 2  w  ...U N  w 

  w   b0  w  M  N   1  w   ...
  M  w   1  w   ...  N  w 

02/21/2022 Digital Signal processing 83


Geometric Interpretation
Im(z) Im(z)

e jw  p1
L e jw  z1 L
V1  w 
V1  w 
1  w 
jw jw
e e
P1 Z1 P1  1 w Z1
w w
Re(z) Re(z)
C C

02/21/2022 Digital Signal processing 84


Ideal Filter Characteristic
H  w
H  w

1
1

w
w   wc 0 wc 
  wc 0 wc 
H  w H  w

1
1

w
  wc 0 wc 
w   wc 0 wc 

02/21/2022 Digital Signal processing 85


Contd…
1. Constant gain in pass band and zero gain stop band
2. Linear Phase Characteristics

1. All poles should be lie inside the unit circle in order to make the system stable and zeros can be placed anywhere.
2. All poles and zeros must be in complex conjugate pair.

02/21/2022 Digital Signal processing 86


Low Pass Filter
Im(z) Im(z)

L L

w w
Zk Re(z) Re(z)
C Pk Zk C Pk

02/21/2022 Digital Signal processing 87


High Pass Filter
L
L

w
Re(z) w
Pk C Zk Re(z)
Pk C Zk

02/21/2022 Digital Signal processing 88


Band Pass Filter

L L

w w
Re(z) Re(z)
Pk C Zk Pk C Zk

02/21/2022 Digital Signal processing 89


Notch Filter

02/21/2022 Digital Signal processing 90


Comb Filter

02/21/2022 Digital Signal processing 91


All Pass Filter

02/21/2022 Digital Signal processing 92


Digital Sinusoidal Oscillator

02/21/2022 Digital Signal processing 93


Inverse System and Deconvolution

02/21/2022 Digital Signal processing 94


Minimum Phase and Maximum Phase Systems

02/21/2022 Digital Signal processing 95


Sampling and Reconstructions of Signals

02/21/2022 Digital Signal processing 96


Discrete Fourier Transform

02/21/2022 Digital Signal processing 97


Fast Fourier Transform(FFT)

02/21/2022 Digital Signal processing 98

You might also like