You are on page 1of 31

Digital Signal Processing ECR 305_L6

Lecture – 6 Objectives

xn  H    xnH  

Frequency
Analysis of To learn and understand
 the frequency response, its

LTI Systems properties and importance in


the analysis of LTI systems.
IUB Dr. Abdur Razzak 1
Frequency response of an LTI system ECR 305_L6

The discrete-time Fourier transform of an impulse response is


called the frequency response (or transfer function) of an LTI
system and is denoted by


H    
n 
h  n e  j n

In general, the frequency response H   is a complex function


of .
 The magnitude H   of H   is called the magnitude
(or gain) response, and
 The angle H   is called the phase response function.

IUB Dr. Abdur Razzak 2


Frequency response to complex exponential ECR 305_L6

Let xn   Ae 0 be the input to an LTI system represented by the


j n

impulse response h(n).


xn   Ae j0n  h(n)  yn   hn   Ae j0n

   j0 k  j0
Then y  n   h  n   Ae
j0 n
 A  h  k e j0  n  k 
 A   h  k e e
k   k  
 AH   e j0 n
Then the LTI system can be represented by
xn   Ae j0n  H    yn   AH  e j0n

hn   H  e jn d
1
The unit impulse
2 

IUB Dr. Abdur Razzak 3


Frequency response to sinusoidal sequences ECR 305_L6

Let xn   A cos0 n   0  be an input to an LTI system h(n).

Then, the response y(n) is another sinusoid of the same


frequency, 0 as shown below:

yn  A H 0  cos0n  0  H 0 

with the amplitude gained by H  0 

and phase shifted by H  0 

IUB Dr. Abdur Razzak 4


Frequency response to arbitrary sequences ECR 305_L6

Let X() = F [x(n)] and Y() = F [y(n)], then using the convolution
property, we have
Y    H  X  
An LTI system can be represented in the frequency domain by

X    H    Y    H  X  

The output y(n) is then computed from the spectrum of the signal
Y() using the inverse discrete Fourier transform.

Fig. Time- and frequency-domain input-output relationship in LTI systems


IUB Dr. Abdur Razzak 5
Example-1 ECR 305_L6

Determine the frequency response H() of a system


characterized by h(n) = (0.9)n u(n).

Solution:

Frequency response of an LTI system is given by H     hn e  jn


 
 
H     0.9 e
1
 0   0.9e  j
n  jn n
Therefore 
 0 1  0.9e  j

H   
1 1

Hence 1  0.9 cos 2  0.9 sin  2 1.81  1.8 cos

 0.9 sin  
and H     arctan
1  0.9 cos 
IUB Dr. Abdur Razzak 6
Example-2 ECR 305_L6

Determine the output sequence of the system with impulse


response h(n) = (0.5)nu(n) to the exponential input x(n) = Aejn
for - < n < .
 
Solution: H    

hn e  jn   0

.5 n
u n e  jn

1 

 0.5e   0   0.5e 
 j n  j n 1
 
 0 1  0.5e  j

H   
1 2
At  = ,  j

1  0.5e 3

y n   x n H   
2
Ae jn
3
IUB Dr. Abdur Razzak 7
Example-3 ECR 305_L6

Determine the output sequence of the system with impulse


response h(n) = (0.5)nu(n) to the input x(n) = 2-3sin[(/2)n].

H   
Solution: 1
1  0.5e  j
H 0  
1
For the first term,  = 0,  j0
2
1  0.5e
For the second term,  = /2,

H  / 2 
1 2 2  j 3 / 20
   270  e
1  j 0.5 5 5

 3 
y n   xn H    4 
6
sin  n  
5 2 20 
IUB Dr. Abdur Razzak 8
Example-4 ECR 305_L6

Determine the spectrum of output sequence of an LTI system


with impulse response h(n) = (1/2)nu(n) when the system is
excited by the input x(n) = (1/4)nu(n). Also determine the
energy density spectrum of the output signal.
  n
 1  j 
H     hne  jn
1
  e  
Solution:  0  2  1  1 / 2 e  j

  n
1 
Fourier transform X     xne jn
1
   e j  
 1  1 / 4e
 j
 0 4

The spectrum of output sequence


Y    X  H   
1
1  1 / 2e  1  1 / 4e 
 j  j

The energy density spectrum of the output signal


S yy    Y   
2 1
5  17 1 
  cos   cos 
4  16 2 
IUB Dr. Abdur Razzak 9
Frequency response for difference equation ECR 305_L6

When an LTI system is presented by the difference equation


N M
yn    al yn  l    bm xn  m
l 1 m 0

Then, using the frequency response we have


N M
H  e jn
  al H  e j  n l 
  bm e j n m 
l 1 m 0

 N
 j l 
M
or H   e j n
  l
1  a e   e j n
 bm e  j m

 l 1  m 0

b e m
 jm

or H    m 0
N
1   al e  jl
l 1

IUB Dr. Abdur Razzak 10


Example-5 ECR 305_L6

An LTI system is specified by the difference equation:


y(n) = 0.8y(n-1) + x(n). Determine the frequency response H().

Solution: Rearranging the difference equation gives


yn  0.8 yn  1  xn , with a1 = –0.8, b0 = 1.
0

m
b e  jm
b0e  j0
H   
1
m 0
 
1
1  a1e  j1 1  0.8e  j
1   al e  jl
l 1

H   
1 1

1  0.8 cos 2  0.8 sin  2 1.64  1.6 cos

 0.8 sin  
H     arctan
1  0.8 cos 
IUB Dr. Abdur Razzak 11
Example-6 ECR 305_L6

Determine the magnitude & phase response for the three point
moving average system y(n) = (1/3)[x(n-1) + x(n) + x(n+1)].
1
Solution:
b e m
 jm
b1e  j1  b0 e  j0  b1e  j1
H    m  1

1
1 0
1   al e  jl
l 1

1 j

 e 1 e
3
 j 1
3

 1  2 cos 

H    1  2 cos 
1
Magnitude response: 3

Phase response: H    arctan0  0

IUB Dr. Abdur Razzak 12


Example-7 ECR 305_L6

Determine the impulse response, h(n), for the three point


moving average system y(n) = (1/3)[x(n-1) + x(n) + x(n+1)].

3

Solution: H    e  1  e
1 j  j

and hn  
1 
2 
H  e j n
d
1  1  1 j   j
 
h 1      j
H  e d   e e d 
1
2  2  3 3
 
 
h0 
1
 H  e
 j 0
d 
1

1
d 
1
2 2  3 3
 
 
h1 
1
   j
H  e d 
1

1  j j
e e d 
1
2  2  3 3
 1 1 1 
hn    , , 
 3 3 3 

IUB Dr. Abdur Razzak 13
Example-8 ECR 305_L6

An LTI system is specified by the difference equation:


y(n) = ay(n-1) + bx(n). Determine condition to become the system
stable. Also determine the impulse response h(n) of the system.

Solution: Rearranging the difference equation gives


yn  ayn  1  bxn , with a1 = –a, b0 = b.
0

m
b e  jm
b0 e  j0
H   
b
m 0
  j 1

1
1  a1e 1  ae  j
1   al e  jl
l 1

Stability condition: a 1
Impulse response: hn   ba nu n 
IUB Dr. Abdur Razzak 14
Example-9 ECR 305_L6

Determine the impulse response of the system described by the


system function:
H z  
z
z  0 .5

Solution: The frequency response of the system

e j
H    j
1

e  0.5 1  0.5e  j

The impulse response of the system

hn   0.5 u n 
n

IUB Dr. Abdur Razzak 15


LTI systems as filters ECR 305_L6

Ideal characteristics of low- and high-pass filters

IUB Dr. Abdur Razzak 16


LTI systems as filters (contd..) ECR 305_L6

Ideal characteristics of band-pass and band-stop filters

IUB Dr. Abdur Razzak 17


Low-pass filters ECR 305_L6

When a low-pass filter is presented by the difference equation


N M

 a yn  l   b xn  m
l 0
l
m 0
m

N M
yn    al yn  l    bm xn  m with a0 = 1
l 1 m 0

Then, using the frequency response we have


N M
or H  e jn
  al H  e j  n l 
  bm e j n m 
l 1 m 0

b e m
 jm

or H lp    m 0
N
1   al e  jl
l 1

IUB Dr. Abdur Razzak 18


High-pass filters ECR 305_L6

Frequency response of high-pass filter


H hp    H lp    
M M M

 bme  j   m
 bme jm  jm
e m
b  1 e  jm m

 m 0
N
 m 0
N
 m 0
N
1   al e  j   l
1   al e e jl  jl
1   al  1 e  jl
l

l 1 l 1 l 1

hhp n  1 hlp n


n
Impulse response of high-pass filter
The difference equation for high-pass filter
N M
yn     1 al yn  l     1 bm xn  m
l m

l 1 m 0

hlp n  1 hhp n


n
Impulse response of low-pass filter
IUB Dr. Abdur Razzak 19
Example-10 ECR 305_L6

A low-pass filter is specified by the difference equation:


y(n) = 0.5y(n-1) + 0.2x(n). Determine the frequency response
H(). Convert this filter into high-pass.
M
Solution: m
b e  jm

H lp   
0.2
m 0

N
1  0.5e  j
1   al e  jl
l 1

 bm  1 e jm
m

H hp   
0.2
m 0

N
1  0.5e  j
1   al  1 e  jl
l

l 1

y n    1 0.5 y n  1  0.2 xn   0.5 y n  1  0.2 xn 


n

IUB Dr. Abdur Razzak 20


Example-11 ECR 305_L6

Determine the steady-state response of the system


yn  ayn  1  xn  to the input signal x  n   Ae jon.

Solution: The response of the system to complex exponential


input x(n) is given by

1
y  n   H ( ) x(n)   Ae j on

1  ae  j
Ae jon

1  ae  j
Steady-state response

IUB Dr. Abdur Razzak 21


Edited by Dr. Md. Kafiul Islam
Assignment-6 (due on next class) ECR305_L6

Problems : 5.1, 5.3~5.7, 5.11, 5.12, 5.16, 5.18, 5.19, 5.22, 5.24

IUB Dr. Abdur Razzak 22


MATLAB implementation ECR 305_L6

MATLAB
Examples

IUB Dr. Abdur Razzak 23


MATLAB example 3.13 ECR305_L6

Determine the frequency response H(ej) of a system


characterized by h(n) = (0.9)n u(n).

Solution:
Frequency response of an LTI system is given by H e    hne

j  jn



e j
Therefore H e j    0.9 e   0.9e 
 
n  jn  j n 1
  j
 j
  1  0.9e e  0.9

 
H e j 
1

1
Hence 1  0.9 cos 2  0.9 sin  2 1.81  1.8 cos

 0.9 sin  
and  
H e j
  arctan
1  0.9 cos 

IUB Dr. Abdur Razzak 24


MATLAB example 3.13 (contd..) ECR305_L6

% File name: ex3p13.m

% Definition
w = [0:500]*pi/500;

% Calculation
H = exp(j*w)./(exp(j*w)-0.9*ones(1,501));
magH = abs(H); angH = angle(H);

% Plotting
Subplot(2,1,1); plot(w/pi, magH); grid
title('Magnitude response');
ylabel('Magnitude');
Subplot(2,1,2); plot(w/pi, angH/pi); grid
title('Phase response');
xlabel('Frequency in pi units');
ylabel('Phase in pi Radians');
IUB Dr. Abdur Razzak 25
MATLAB example 3.13 (contd..) ECR305_L6

IUB Dr. Abdur Razzak 26


MATLAB example 3.16 ECR305_L6

A 3rd-order-lowpass filter is described by the difference equation


yn   0.0181xn   0.0543 xn  1  0.0543 xn  2  0.0181xn  3
 1.76 yn  1  1.1829 yn  2  0.278 yn  3
Plot the magnitude and phase response of that filter and verify
that it is a low pass filter.

Solution:
Rewrite the above equation
yn   1.76 yn  1  1.1829 yn  2  0.278 yn  3
 0.0181xn   0.0543 xn  1  0.0543 xn  2  0.0181xn  3
gives: b  [0.0181, 0.0543, 0.0543, 0.0181]
a  [1.000,  1.7600, 1.1829,  0.2780]

IUB Dr. Abdur Razzak 27


MATLAB example 3.16 (contd..) ECR305_L6

% Definition
b = [0.0181, 0.0543, 0.0543, 0.0181]; % filter coefficient array b
a = [1.000, -1.7600, 1.1829, -0.2781]; % filter coefficient array a
m = 0:length(b)-1; l = 0:length(a)-1; % index array m and l
K = 500; k = 0:K; w = k*pi/K; % [0, pi] axis divided into 501 points

% Calculation
num = b*exp(-j*m'*w); % numerator calculations
den = a*exp(-j*l'*w); % denominator calculations
H = num./den; % frequency response calculations
magH = abs(H); % magnitude response
angH = angle(H); % phase response

% Plotting
Subplot(2,1,1); plot(w/pi, magH); grid
title('Magnitude response','fontsize', 20); ylabel('Magnitude','fontsize', 20);
Subplot(2,1,2); plot(w/pi, angH/pi); grid
title('Phase response','fontsize', 20); xlabel('Frequency in pi units','fontsize', 20);
ylabel('Phase in pi Radians','fontsize', 20);
IUB Dr. Abdur Razzak 28
MATLAB example 3.16 (contd..) ECR305_L6

IUB Dr. Abdur Razzak 29


References ECR 305_L6

1. John G. Proakis, Digital Signal Processing, Pearson, 4th


Edition, Seventh Impression, 2011. (pp. 300–363)

2. Vinay K. Ingle, and John G. Proakis, Digital Signal


Processing using MATLAB, Thomson Learning
Bookware Companion Series, 2007. (pp. 40–60)

IUB Dr. Abdur Razzak 30


Next class ECR 305_L6

Sampling &
Reconstruction

IUB Dr. Abdur Razzak 31

You might also like