COMM 602
Digital Signal Processing
Lecture 2
Dr. Engy Aly Maher
Spring 2020
Remember
Properties of Linear Time-Invariant (LTIS) Systems
Convolution
• For a Linear Time Invariant (LTI) system, the output can be
represented by its impulse response and input as follows:
Input : xn xk n k
k
Output : yn T xn T xk n k
k
• T and Σ are linear operators, therefore y(n) can be written as:
y n xk T n k xk hn k
k k
x ( n) * h( n)
• h(n) is called the impulse response of the LTI system
Impulse Response of a LTIS
T{.}
Convolution Properties:
Interconnection between Systems
Causal LTI System
• In LTIS, causality can be expressed in terms of Impulse response
as follows: consider the LTI system having an output at time
n=no:
y (n o ) h( k ) x ( n
k
o k)
1
h(k ) x(no k ) h( k ) x ( n
o k)
k 0 k
[h(0) x(no ) h(1) x(no 1) h(2) x(no 2)] ....
[...... h(2) x(no 2) h(1) x(no 1)]
Must be zero
The terms in the first sum involve x(no ), x(no 1),...which are the
present and past values of the input signal. The second sum
involves the future signal components.
• Clearly, for a LTI system to be causal, the impulse
response of the system must satisfy :
h(n) 0, n 0
• Then for a causal LTIS, the summation of the
convolution formula is modified to be:
y ( n ) h( k ) x ( n k )
k 0
Convolution Formula for IIR and FIR LTI Systems
(Causal FIR)
y ( n ) h( k ) x ( n k ) (Causal IIR)
k 0
Stable LTIS
• In General: A system is said to be stable if every bounded
input produces a bounded output
xn yn
For the LTIS to be stable:
yn hk xn k
k 0 Causal System
If x(n) is bounded for all n
xn M yn M hk
k 0
For y(n) to be bounded
hk
k 0
Unstable System Stable System
hn e hn e n , 0
h(n) n h(n)
, 0
. . . . . . . . . .
n n
hn
n 0
hn
n 0
Characterization of Digital System
• Any digital system can be characterized by one of the
following:
1. Difference Equation
2. Impulse Response
3. Transfer Function
4. Frequency Response
1. Difference Equation
• A LTI system can be described by a linear constant coefficient difference equation
of the form:
a0 1
N M
a yn i b xn i
i 0
i
i 0
i
OR
M N
yn bi xn i ai yn i
i 0 i 1
•This equation describes a recursive approach for computing the current output
given the input values and previously computed output values.
ai and bi are constants independent on the time
1. Difference Equation (Contd.)
Non Recursive LTI Systems
• This is also called Finite Impulse Response (FIR).
• For time invariant (FIR), the difference equation has the
form:
M
yn bi xn i Always
Stable
i 0
M is called the order of the system and
bi 0M are the constant coefficients of the system Verify
this?
1. Difference Equation (Contd.)
Recursive LTI Systems
• This is also called Infinite Impulse Response (IIR) system.
Can be
• It has the following difference equation: Stable or
Unstable
M N
yn bi xn i ai yn i Verify
i 0 i 1
this?
M is called the order of the all zero part The meaning will be
Clear after you study
N is called the order of the all pole part Z-transform
2. The Impulse Response
If the input to the filter is the unit impulse δ(n)
The output y(n) is said to be the impulse response
i.e., the response to the impulse excitation.
1. For Non Recursive (FIR)
M
yn bi n i n Digital Filter hn
i 0
2. For Recursive (IIR)
M N
yn bi n i ai yn i
i 0 i 1
Example:
• Find the impulse response of the causal system:
y(n) x(n) e y(n 1)
solution
The input is: x(n) (n) .
y (n) (n) e y (n 1) 0
n0 y (0) 1 e y (1) 1
n 1 y (1) 0 e y (0) e
n2 y (2) 0 e y (1) e .e e 2
n3 y (3) 0 e y (2) e 2 .e e3
Then y (n) h(n) e n
Is this System Stable??? Plot h(n) for 0.5
3. Transfer Function of Digital System
The transfer function or the system function H(z)
Y z
H z
X z
X(z) Y(z) =X(z) H(z)
H(z)
X(z) and Y(z) are the Z-Transform of x(n) and y(n)
Z yn Y z Z xn X z
4. The Frequency Response
•The discrete-time Fourier transform of an impulse
response is called the frequency response
or the system function.
Remember:
j
X (e ) x[
n
n ] e j n
H (e j ) h[
n
n ] e j n Assume: xn
n
X e jw
H(ejw)
Y e jw
LTIS
Example:
Given h(n) a nu (n) where a 1 find
the frequency responseof the system
Solution
H ( e j ) h[
n
n ] e j n
Remember
1
a n
u ( n ) e j n
n 0
n
a
1 a
n
a n e j n ( a e j ) n
n 0 n 0
| e j | 1
1
j
H (e )
1 a e j
Example:
j 1
H (e )
1 a e j
1
1 (a cos( ) ja sin( )
Magnitude response:
j 1
H (e )
[1 a cos( )]2 [a sin( )]2
1
[1 a 2 cos 2 ( ) a 2 sin 2 ( ) 2a cos( )
1
[1 a 2 2a cos( )
Phase response:
j a sin( )
Angle [ H (e )] tan 1
1 a cos( )
Example:
• Consider the following difference equation for a causal LTI System
yn yn 1 0.9yn 2 xn
a- Calculate and plot the impulse response h(n) for n=0, 1, 2,..….5
b- Calculate and plot the unit step response for n=0,1, 2,…...5
Solution
(a) The system is causal, therefore h(n) =0 for all n< 0
hn hn 1 0.9hn 2 n
n 0 h0 h 1 0.9h 2 0 h0 0 1
n 1 h1 h0 0.9h1 1 h1 h0 1
n 2 h2 h1 0.9h0 2 h2 h1 0.9 h0 0.1
n 3 h3 h2 0.9h1 3 h3 h2 0.9 h1 0.1 0.9 0.8
yn yn 1 0.9 yn 2 un
(b)
n 0 y0 y 1 0.9 y 2 u0 y0 u0 1
n 1 y1 y0 0.9 y 1 u1 y1 y0 u1 1 1 2
n 2 y2 y1 0.9 y0 u1 y2 y1 0.9 y0 u1 1 0.9 1 0.9
Plot the output???
Example:
• Using the recursive method, check the stability for the following system:
y(n) y 2 (n 1) x(n) Where x(n) C (n)
Assume that y(-1)=0 and C is constant and C>1.
Solution
The output sequence is:
n 0, y (0) y 2 (1) C (0) 0 C C
n 1, y (1) y 2 (0) C (1)
C2 0 C2
n 2, y (2) y 2 (1) C (2)
(C 2 ) 2 0 (C 2 ) 2 C 4
n 3, y (3) y (2) 0 (C ) C
2 4 2 8
2n
Then y (n) C
The output is unbounded , so the system is unstable.