You are on page 1of 35

ELEN E4810: Digital Signal Processing

Topic 5:
Transform-Domain Systems
1. Frequency Response (FR)
2. Transfer Function (TF)
3. Phase Delay and Group Delay

Dan Ellis 2013-10-09 1


1. Frequency Response (FR)
 Fourier analysis expresses any
signal as the sum of sinusoids
1
e.g. IDTFT: x[n] = X(ej )ej n d
2
 Sinusoids are the eigenfunctions of LSI
systems (only scaled, not ‘changed’)
 Knowing the scaling for every sinusoid
fully describes system behavior
describes how a
→ frequency response system affects each
pure frequency
Dan Ellis 2013-10-09 2
Sinusoids as Eigenfunctions
 IR h[n] completely describes LSI system:
x[n] h[n] y[n] = x[n] h[n] = h[m]x[n m]
m
 Complex sinusoid input i.e. x[n] = ej 0n

y[n] = m h[m]ej 0 (n m)
H(ej )
= m h[m]e j 0m
· ej 0n
= |H(ej )|ej ( )

y[n] = H(ej 0 ) · x[n] = |H(ej 0 )| · ej( 0 n+ ( 0 ))

 Output is sinusoid scaled by FT at 0


Dan Ellis 2013-10-09 3
System Response from H(ej!)
 If x[n] is a complex sinusoid at !0
then the output of a system with IR h[n]
is the same sinusoid scaled by |H(ej! )| 0

and phase-shifted by arg{H(ej! )} = µ(!0)


0

where H(ej!) = DTFT{h[n]}


(Any signal can be expressed as sines...)
 |H(ej!)| “magnitude response” → gain

 arg{H(ej!)} “phase resp.” → phase shift


Dan Ellis 2013-10-09 4
Real Sinusoids
 In practice signals are real e.g.
x[n] =A cos( 0 n + ) |X(ejω)|
A/2
A j( 0 n+ )
= e +e j( 0 n+ )
2
A j j 0n A - ω0 ω0 ω
= e e + e j
e j 0n
2 2
A j A j
y[n] = e H(e )e
j 0 j 0n
+ e H(e j 0 )e j 0 n
2 2
 Real h[n] H(e j ) = H (ej ) = |H(ej )|e j ( )

y[n] = A|H(ej 0 )| cos ( 0n + + ( 0 ))

Dan Ellis 2013-10-09 5


Real Sinusoids
A cos( 0n + ) h[n] A|H(ej 0 )| cos ( 0n + + ( 0 ))

 A real sinusoid of frequency !0


passed through an LSI system
with a real impulse response h[n]
has its gain modified by |H(ej!0)|
and its phase shifted by µ(!0).

Dan Ellis 2013-10-09 6


Transient / Steady State
 Most signals start at a finite time, e.g.
x[n] = ej 0 n µ[n] What is the effect?

n
y[n] = h[n] x[n] = m= ⇥ h[m]ej 0 (n m)

⇥ ⇥
= m= ⇥ h[m]ej 0 (n m)
m=n+1 h[m]e j 0 (n m)


= H(e )e
j 0 j 0n
( m=n+1 h[m]e j 0 m )ej 0 n

Steady state Transient response


- same as with pure sine input - consequence of gating

Dan Ellis 2013-10-09 7


Transient / Steady State
 x[n] = ej 0n
µ[n] transient

⇥ y[n] = H(ej 0 )ej 0n
( m=n+1 h[m]e
j 0m
)ej 0n

 FT of IR h[n]’s tail from time n onwards


 zero for FIR h[n] for n ≥ N
 tends to zero with large n for any ‘stable’ IR
Total output
Steady State

Transient

-40 -30 -20 -10 0 10 20 30 40 time / n

Dan Ellis 2013-10-09 8


FR example
M 1
1
 MA filter y[n] =
M
x[n ]
=0
1/M
=x[n] h[n]
-1 1 2 3 4 5 6 n
H(ej ) = DTFT{h[n]}
M 1
1
= h[n]e j n
= e j n

n=
M n=0

1 1 e j M 1 (M 1) sin(M /2)
= = e j 2
M 1 e j M sin( /2)
Dan Ellis 2013-10-09 9
FR example
1 (M 1) sin(M /2)
 MA filter: H(e ) =
j
M
e j 2
sin( /2)
6

1 sin(M /2) 6

H(e ) =
j 4

M sin( /2)
2

(M 1)
( )= + ·r 0

2 -
2 0 2

(jumps at sign changes: (M = 5)

r= M!/2π )

 Response to x[n] = ej 0n
+ ej 1n
...
Dan Ellis 2013-10-09 10
FR example
6

MA filter
0


0

input x[n] = ej 0n
+e j 1n
-

 2 0 2

0 = 0.1 H(ej 0 ) 0.8ej 0


1 = 0.5 H(ej 1 ) ( )0.2ej 1

 output y[n] = H(ej 0 )ej 0n


+ H(ej 1 )ej 1n

1 x[n]
0

-1 y[n]
-2
-20 0 20 40 60 80
n
Dan Ellis 2013-10-09 11
M
2. Transfer Function (TF)
Linking LCCDE, ZT & Freq. Resp...
N N
 LCCDE: dk y[n k] = pk x[n k]
k=0 k=0

 Take ZT: dk z k
Y (z) = pk z k
X(z)
k k
P k
p z
 Hence: Y (z) = Pk k k X(z)
k dk z Transfer
 or: Y (z) = H(z)X(z) function
H(z)

Dan Ellis 2013-10-09 12


Transfer Function (TF)
 Alternatively, y[n] = h[n] x[n]
ZT → Y (z) = H(z)X(z)
P k ... if system
P pk z has DE form
 Note: same H(z) = dk z k

n
n h[n]z ... from IR

 e.g. FIR filter, h[n] = {h0, h1,... hM-1}


M 1
pk=hk, d0=1, DE is 1 · y[n] = hk x[n k]
k=0
Dan Ellis 2013-10-09 13
Transfer Function (TF)
 Hence, MA filter:
M 1
1 1
0 n M
y[n] = x[n ] ⇥ h[n] = M
M
=0
0 otherwise
Im{z}
M 1 |H(ej!)|
H(z) = 1
M =0 z n

1 z M
= M (1 z 1 )
zM=1 i.e.
M roots of 1 
Re{z}
@ z=ej2πr/M 1
zM
= M ·z M
1
1 (z 1)
(ignore poles ROC?
at z=0)
pole @ z=1 z-plane
cancels
Dan Ellis 2013-10-09 14
TF example
   =
y[n] x[n 1] 1.2x[n 2] + x[n 3]
+ 1.3y[n 1] 1.04y[n 2] + 0.222y[n 3]

Y (z) z 1
1.2z 2 + z 3
H(z) = =
X(z) 1 1.3z 1 + 1.04z 2 0.222z 3

 factorize:
ζ0 = 0.6+j0.8
z 1
(1 0z
1
)(1 0z )
1
H(z) = λ0 = 0.3
(1 0z
1 )(1
1z
1 )(1
1z
1)
λ1 = 0.5+j0.7
→ ...
Dan Ellis 2013-10-09 15
TF example
z 1
(1 0z
1
)(1 0z )
1
H(z) =
(1 0z
1 )(1
1z
1 )(1
1z
1)

ζ0 = 0.6+j0.8 Im{z}
λ0 = 0.3 ζ0
λ1 ×
Re{z}
λ1 = 0.5+j0.7
λ0 ×
1
λ*1 ×
 Poles ∏i → ROC ζ ∗0
 causal → ROC is |z| > max|∏i|
 includes u.circle → stable
Dan Ellis 2013-10-09 16
TF → FR
 DTFT H(ejω) = ZT H(z)|z = ejω
i.e. Frequency Response is
Transfer Function eval’d on Unit Circle
factor:
p0 (1   k z ) p0 z  (z   k )
M 1 M M

H (z) = k=1
= k=1

d0  (1   k z ) d0 z  (z   k )
N 1 N N
k=1 k=1

 ( k)
M j
e  
 H (e ) = e
j p0 j ( NM ) k=1

k=1 (e   k )
N j
d0

Dan Ellis 2013-10-09 17


TF → FR M
p0 j ej ζk, λk are
k
H(e ) = e
j (N M) k=1
N TF roots
d0 k=1 (ej k) on z-plane

M j
p0 e k Magnitude
H(e ) =
j k=1
N response
d0 k=1 |ej
k|
⇤ ⌅
p0
⇥(⌅) = arg + ⌅ · (N M) Phase
d0 response
M
⇧ N

⇥ ⇥
+ arg e j
k arg e j
⇤k
k=1 k=1

Dan Ellis 2013-10-09 18


FR: Geometric Interpretation
 ( k)
M j
e  
( )= d e
 Have H e
j p0 j ( NM ) k=1

k=1 (e   k )
N j
0
Constant/
linear part Product/ratio of terms
related to poles/zeros
 On z-plane:
Im{z}
Each (ej! - ∫) term corresponds
to a vector from pole/zero ∫ to
× ej!−≥i
point ej! on the unit circle
ej!−∏i ej!
Overall FR is product/ratio of
×
Re{z} all these vectors

Dan Ellis × 2013-10-09 19


FR: Geometric Interpretation
Im{z}
 Magnitude |H(ej!)| is product of
≥i lengths of vectors from zeros
∏i×
divided by product of lengths
ej!−≥i
ej!−∏i
of vectors from poles
ej!
 Phase µ(!) is sum of angles of
×
Re{z} vectors from zeros
minus sum of angles of
vectors from poles
×

Dan Ellis 2013-10-09 20


FR: Geometric Interpretation
 Magnitude and phase of a single zero:
magnitude
2
1 0.6 0.4

0.8 0.2 1
0.5
Imaginary Part

0 0.0 0
phase

-0.5 /2
-0.8 -0.2
0
-1 -0.6 -0.4
- /2
-1 -0.5 0 0.5 1
Real Part -
0 0.5 1.5 2

 Pole is reciprocal mag. & negated phase


Dan Ellis 2013-10-09 21
FR: Geometric Interpretation
 Multiple
poles, H (z ) =
z  0.8e j0.3 
(
z  0.8e  j0.3 
)( )
zeros: z  0.9e j0.3 
(
z  0.9e  j0.3 
)( )
magnitude
2
1 0.6 0.4

0.8 0.2 1
0.5
Imaginary Part

0 0.0 0
phase

-0.5 /2
-0.8 -0.2
0
-1 -0.6 -0.4
- /2
-1 -0.5 0 0.5 1
Real Part -
0 0.5 1.5 2

Dan Ellis 2013-10-09 22


V
Geom. Interp. vs. 3D surface
 3D magnitude surface for same system
Full surface Showing ROC

Dan Ellis 2013-10-09 23


Geom. Interp: Observations
 Roots near unit circle
→ rapid changes in magnitude & phase
 zeros cause mag. minima (= 0 → on u.c.)
 poles cause mag. peaks (→ 1÷0=∞ at u.c.)
 rapid change in relative angle → phase
 Pole and zero ‘near’ each other
cancel out when seen from ‘afar’;
affect behavior when z = ej! gets ‘close’
Dan Ellis 2013-10-09 24 M
PEZdemo
Filtering
 Idea: Separate information in frequency
with constructed H(ej!)
 e.g. x [n] = A cos(1n) + B cos( 2 n)
interested don’t care about
in this part this part
B/ B/
 Construct a filter: 2 X(ej!) 2
“filtered
|H(ej!1)| ∼1 A/
2
A/
2 out”
H(ej!) !
|H(ej!2)| ∼ 0 −!2 −!1 !1 !2
 Then y[n] = h[n]  x [n]  A cos(1n +  (1 ))
Dan Ellis 2013-10-09 25
Filtering example Æ
 Consider x[n]
z Ø
-1

filter ‘family’: z -1
Æ
+ y[n]
Ø
3 pt FIR filters Æ Æ
with h[n] = {Æ Ø Æ} -2 -1 1 2 3 4
n
 Frequency Response:
( ) = n h[n]e =  + e + e
H e j  jn  j 2 j

= e ( +  (e + e )) = e ( + 2 cos  )
 j j  j  j

can set Æ and Ø


 H (e ) =  + 2 cos 
j
to obtain desired
|H(e )| ... j!

Dan Ellis 2013-10-09 26


Filtering example (cont’d)
 h[n] = {Æ Ø Æ}  H e ( ) =  + 2 cos 
j

 Consider input as mix of sinusoids


at !1 = 0.1 rad/samp
want to remove
and !2 = 0.4 rad/samp i.e. make H(ej!2) = 0
 Solve H(ej ) = |⇥ + 2 cos ⇤|

1 ⇤ = ⇤1 = 0.1
=
0 ⇤ = ⇤2 = 0.4
Ø = -12.46, Æ = 6.76 ...
Dan Ellis 2013-10-09 27
Filtering example (cont’d)
15
10

 Filter 5
0

IR
-5
-10
-15
0 5 10 15 20 25 30 35 40 45
n
20

 Freq. dB
10

resp -10

-20
0 0.2 0.4 0.6 0.8 1
/ rad
2

 input/ 1

output -1

-2
0 20 40 60 80 100 120 140 160 180 n

Dan Ellis 2013-10-09 28


3. Phase- and group-delay
 For sinusoidal input x[n] = cos!0n,
we saw y[n] = H e ( j 0
) cos( 0n +  ( 0 ))
gain phase shift
   ( 0 )  or time shift
 i.e. cos 0  n + 
   0  subtraction so
positive øp means
or cos( 0 (n   p ( 0 ))) delay (causal)
 ( )
 where  p ( ) = is phase delay

Dan Ellis 2013-10-09 29
Phase delay example
Ø
Æ Æ
 For our 3pt filter:
n
( )=e
-2 -1 1 2 3 4
j  j
H e ( + 2 cos  )
  ( ) = 
  
  p ( ) =   = +1
 
 i.e. 1 sample delay (at all frequencies)
(as observed)

Dan Ellis 2013-10-09 30


Group Delay
 Consider a modulated carrier
e.g. x[n] = A[n]·cos(!cn)
with A[n] = Acos(!mn) and !m << !c
1

0.5

0.5

1
0 50 100 150 200 250 300 350 400

Dan Ellis 2013-10-09 31


X(ej!)
Group Delay !c !c
-!m +!m
!c !
 So: x[n] = A cos( m n) · cos( c n)
= 2 [cos( c
A
m )n + cos( c + m )n]
Now:
y[n] = h[n] x[n]
H(ej( c m)
) cos( c m )n
= A
2
+H(ej( c+ m)
) cos( c + m )n

 Assume |H(ej!)| ∼ 1 around !c±!m


but µ(!c-!m) = µl ; µ(!c+!m) = µu ...
Dan Ellis 2013-10-09 32
Group Delay
H(ej( c m)
) cos( c m )n
y[n] = A
2
+H(ej( c+ m)
) cos( c + m )n
|H(ej!)| ∼ 1
µ(!c-!m) = µl cos[( c m )n+ l ]
µ(!c+!m) = µu = A
2
+ cos[( c + m )n+ u ]

= A cos cn +
u+ l
2 · cos mn +
u
2
l

phase shift phase shift


of carrier of envelope

Dan Ellis 2013-10-09 33


!c !
Group Delay µ(!) µl
µu
S

 If µ(!c) is locally linear i.e. !c–!m !c+!m

" µ(!c+¢!) = µ(!c) + S¢!, d ( )


S=
d  = c
l + u
 Then carrier phase shift =  ( c )
2
 ( c )
so carrier delay  =  p , phase delay
c
u  l
 Envelope phase shift = m  S
2
d ( )
→ delay  g ( c ) =  group delay
d  = c
Dan Ellis 2013-10-09 34
Group Delay
1 Envelope
(group) delay
0.5
Carrier
(phase) delay 0

-0.5

-1
0 50 100 150 200 250 300 350 400 n
!c !
øg, group
øp, phase delay
delay µ(!)
 If µ(!) is not linear around !c, A[n] suffers
“phase distortion” → correction...
Dan Ellis 2013-10-09 35
M

You might also like