Beruflich Dokumente
Kultur Dokumente
DIGITAL
SIGNAL
PROCESSING
Prof. Dr. A. Salim KAYHAN
Hacettepe University
Department of Electrical and Electronics Engineering
ANKARA-2014
ELE 407
Digital Signal Processing
Fall 2014
Place: E-?
Time: Wednesday 13:00-15:50
Course Outline:
W1-Sep.24
W2-Oct.01
W3-Oct.08
W4-Oct.15
DIGITAL
SIGNAL
PROCESSING
A.S.Kayhan
Course Outline
Review
Review
of Z-transform
Sampling,
Decimation, Interpolation
Time
Flow
Graph Realization
Filter
Design
Discrete-time
Fast
Fourier Transform
2-D
Signal Processing
Digital Signal Processing
A.S.Kayhan
A.S.Kayhan
SIGNALS:Deterministic or Random
A.S.Kayhan
A.S.Kayhan
A.S.Kayhan
A.S.Kayhan
Discrete-time
Signal
A.S.Kayhan
Reflection: x[-n]
A.S.Kayhan
Time-scaling: x(at)
A.S.Kayhan
Time-shift: x[n-no]
A.S.Kayhan
n 0
n 0
A.S.Kayhan
n 0
n 0
[ n ] u [ n ] u [ n 1]
n
u[n]
[k ]
x [ n ] [ n ] x [ 0 ] [ n ]
Digital Signal Processing
Real Exponential:
x[n ] C en C a
A.S.Kayhan
A.S.Kayhan
x [ n ] A e j o n
x [ n ] A cos( o n )
Complex Exponential:
Sinusoidal Signal:
x [ n ] Re
j ( o n )
{ Ae
A.S.Kayhan
Periodicity Properties:
e
j (
2 ) n
j o n
If periodic, then
e
(n N )
j
j o n
0 2
m
N
m and N integer.
Digital Signal Processing
A.S.Kayhan
jk
2
n
N
A.S.Kayhan
SYSTEM:
Any process that transforms signals
A.S.Kayhan
A.S.Kayhan
Interconnection of Systems:
Series(Cascade), Parallel, Series/Parallel.
A.S.Kayhan
10
Properties:
Memoryless if output depends only on
input at the same time.
Example: Discrete-time systems with memory:
n
y[ n ]
x[ k ]
y[ n ] x[ n 1]
A.S.Kayhan
A.S.Kayhan
11
y[ n ] x[ n ] x[ n 1]
1
y (t )
C
x( )d
y[ n ] x[ n 1] x[ n ]
M
1
y[ n ]
x[ n k ]
2 M 1 k M
A.S.Kayhan
A.S.Kayhan
12
y[ n ] x[ n ] x[ n 1]
y[ n ]
x[ k ] ( n 1)u[ n ],
if x[ n ] u[ n ].
A.S.Kayhan
A.S.Kayhan
13
y[ n ] nx [ n ]
Example:Time-varying:
Consider two signals
x1 [ n ],
x 2 [ n ] x1 [ n n o ]
y 2 [ n ] nx 2 [ n ]
y1 [ n ] nx1 [ n ]
shift
y 2 [ n ] nx 1[ n n o ]
y1 [ n ]
y1 [ n n o ] ( n n o ) x1 [ n n o ] y 2 [ n ]
A.S.Kayhan
ax1[ n ] bx 2 [ n ] ay 1[ n ] by 2 [ n ]
Example: Linear:
y[ n ] nx [ n ]
Example: Nonlinear:
y[ n ] ( x[ n ]) 2
A.S.Kayhan
14
A.S.Kayhan
y[ n ]
x[ k ]h[ n k ]
y[ n ] x[ n ] * h[ n ]
Convolution of x[n] and h[n]. h[n] is the impulse response.
A.S.Kayhan
15
Example:
A.S.Kayhan
Properties:
Commutative:
x[ n ] * h[ n ] h[ n ] * x[ n ]
x[ k ]h[ n k ]
r n k
x[ n r ]h[ r ]
A.S.Kayhan
16
Associative:
x[ n ] * ( h1 [ n ] * h2 [ n ]) ( x[ n ] * h1 [ n ]) * h2 [ n ]
A.S.Kayhan
Distributive:
x[ n ] * ( h1 [ n ] h2 [ n ]) x[ n ] * h1 [ n ] x[ n ] * h2 [ n ]
A.S.Kayhan
17
h[ n ] K [ n ]
then
y[ n ] Kx [ n ].
y ( t ) Kx ( t ).
hence
h (t ) K (t )
A.S.Kayhan
y[ n ]
h[ k ] x[ n k ]
y[ n ] h[ k ] x[ n k ]
k 0
x[ k ]h[ n k ]
A.S.Kayhan
18
for all n .
Then,
h[ k ] x[ n k ]
y[ n ]
y[ n ]
h[ k ] x[ n k ]
x[ n k ] B
with,
y[ n ] B
h[ k ]
h[ k ]
A.S.Kayhan
h[ n ]
[n n
] 1
y[ n ]
x[ k ]
u[ n ] u[ n ] Unstable
n0
A.S.Kayhan
19
X (e
x [ n ]e
j n
x[n ]
(e
)e
j n
A.S.Kayhan
x [ n ] a n u [ n ],
Example:Consider
a 1
X (e
a ne
( ae
j n
u[n]
X (e
n0
X (e
X (e
X (e
)n
1
1 ae
1
(1 a cos( )) ja sin( )
1
2
1 a 2 a cos( )
) tan
a sin( )
1 a cos( )
A.S.Kayhan
20
A.S.Kayhan
x [ n ] 1 , for all n X ( e
2 ( 2 l )
x[ n ] [ n ] X ( e
) 1
x[ n ] e
j o n
X ( e
2 ( o 2 l )
x [ n ] cos( o n )
X (e
[ (
2 l ) (
2 l )]
A.S.Kayhan
21
x[ n ]
x[n ]
Example:Consider
1, n N
x[ n ]
0, n N
X (e
j n
n N
j N
1 e j ( 2 N
1 e j
1)
sin( ( N 1 / 2 ))
sin( / 2 )
A.S.Kayhan
A.S.Kayhan
22
Properties of DTFT:
Linearity: DTFT is linear operator:
x [ n ] X ( e j )
y[n ] Y (e
ax [ n ] by [ n ] a X ( e
) b Y (e
j o n
j n o
x[ n ] X ( e
X (e
j (
j
)
A.S.Kayhan
of k
of k
A.S.Kayhan
23
x[n ]
1
2
X (e
) X (e
) H (e
where,
H (e
H (e
A.S.Kayhan
j n
h [ n ]e
) e
h[n ] [n no ]
j n o
j
X ( eFourier
)
) e
j n o
X (e
A.S.Kayhan
24
h[ n ] a n u[ n ]
H (e
x[ n ] b n u [ n ]
1
1 ae
X (e
1
1 be
then
1
1
1 ae j 1 be j
y[n] is found taking inverse Fourier transform (partial
fraction):
Y (e
y[ n ]
1
[ a n 1 b n 1 ]u[ n ].
ab
Digital Signal Processing
A.S.Kayhan
1
2
(e
) H (e
j ( )
)d
A.S.Kayhan
25
Z- Transform :
For a discrete-time signal x[n], z-transform is defined as
X (z)
x[n ]z n
A.S.Kayhan
| x[ n ] r
A.S.Kayhan
26
A.S.Kayhan
A.S.Kayhan
27
x[ n ] a nu [ n ]
Example: Consider
X (z)
a u[n ]z
( az
)n
n0
For convergence
| az
X (z)
1
1 az
z
, | z | | a |
z a
A.S.Kayhan
Example: Consider
x [ n ] a n u [ n 1]
X (z) 1
(a
z)n
n0
For convergence
|a
z |
X (z) 1
1
1 a
z
, | z | | a |
z a
A.S.Kayhan
28
Example: Consider
x [ n ] a n u [ n ] b n u [ n 1 ],
a nu[n ]
b a
z
, | z | | a |
z a
b n u [ n 1]
z
, | z | | b |
z b
Then
X (z)
z
z
, | a | | z | | b |
z a
z b
A.S.Kayhan
A.S.Kayhan
29
Properties of convergence:
ROC is a ring or disk centered at origin.
DTFourier transform exists if ROC includes Unit Circle
ROC can not contain any poles
If x[n] has finite duration ROC is entire plane.
If x[n] is right-sided, ROC is outward from outermost pole
If x[n] is left-sided, ROC is inward from innermost pole
If x[n] is two-sided, ROC is a ring not containing any pole.
A.S.Kayhan
Example:
x [ n ] ( 0 . 4 ) n u [ n ] ( 2 ) n u [ n 1 ],
X (z)
z
z
, | 0 . 4 | | z | | 2 |
z 0 .4
z 2
A.S.Kayhan
30
H (z)
h[n ]z n
A.S.Kayhan
Inverse Z-Transform:
Power Series Expansion: Consider
X (z) z2
remember
1
1 1
z 1
z
2
2
X (z)
x[n ]z n
x [ 2 ] z 2 x [ 1 ] z 1 x [ 0 ] z 0 x [1 ] z 1
therefore
1
1
x[ n ] [ n 2 ]
[ n 1] [ n ] [ n 1]
2
2
Digital Signal Processing
A.S.Kayhan
31
therefore
A.S.Kayhan
X (z)
bk z k
a k z k
k 0
N
k0
k 1
1
b o k 1 (1 c k z )
N
ao
(1 d k z 1 )
k 1
Ak
, A k (1 d k z 1 ) X ( z ) | z d k
1
1 dkz
then
x[ n ]
A k d kn u [ n ]
k 1
A.S.Kayhan
32
Example : Consider
1
1
X (z)
, | z |
.
1 1
1 1
2
(1
z )( 1
z )
4
2
A1
A2
X (z)
1 1
1 1
(1
z )
(1
z )
4
2
1 1
A 1 (1
z ) X ( z ) | z 1 / 4 1
4
1 1
A 2 (1
z ) X ( z ) | z 1 / 2 2
2
n
n
1
1
x[ n ] 2 u [ n ] u [ n ]
2
4
Digital Signal Processing
A.S.Kayhan
Properties of Z-Transform:
Linearity:
x[n ] X ( z )
y[n ] Y ( z )
ax [ n ] by [ n ] a X ( z ) b Y ( z )
ROC R x R y
Time shift:
x[ n ] X ( z )
y [ n ] x[ n n 0 ] Y ( z ) z no X ( z )
ROC
Rx
A.S.Kayhan
33
Multiplication by Exponential:
x[ n ] X ( z )
z on x [ n ] X ( z / z o )
ROC
| zo | R x
Conjugation:
x *[n ] X
ROC R x
(z*)
A.S.Kayhan
Time reversal:
x * [ n ] X * (1 / z * )
ROC 1 / R x
x [ n ] X (1 / z )
ROC 1 / R x
Convolution:
y [ n ] * x [ n ] X ( z )Y ( z )
ROC R x R y
A.S.Kayhan
34
Example: x [ n ] a n u [ n ]
h[n ] u[n ]
y[ n ] x[ n ] * h[ n ]
X (z)
z
, | z | | a |
z a
H (z)
z
, | z | | 1 |
z 1
z2
, | z | | 1 |
( z a )( z 1 )
1
1
a
1 a 1 z 1
1 az
1
(u [n ] a
1 a
n 1
u [ n ])
A.S.Kayhan
Sampling:
Consider a signal x[n] which is obtained by taking samples
of a continuous time signal xc(t):
x [ n ] x c ( nT )
where T is the sampling period, its reciprocal,
the sampling frequency.
fs 1
T is
A.S.Kayhan
35
A.S.Kayhan
A.S.Kayhan
36
where x [ n ] Q ( x [ n ])
has the quantized samples and
xB[n] has the coded samples (such as 2s complement).
A.S.Kayhan
A.S.Kayhan
37
A.S.Kayhan
s (t )
( t nT )
then
x s (t ) x c (t ) s (t ) x c (t )
( t nT )
( k s ),
A.S.Kayhan
38
X c ( k s )
A.S.Kayhan
2
2
T
A.S.Kayhan
39
A.S.Kayhan
x s (t )
x c ( t ) ( t nT )
x c ( nT ) e
X s ( )
j Tn
j n
X (e
j T
1
T
1
T
X c ( k s )
X c(
2 k
)
T
T
A.S.Kayhan
40
Example:Consider
x c ( t ) cos o t
A.S.Kayhan
x r ( t ) cos( o t )
x r ( t ) cos((
o )t )
A.S.Kayhan
41
Example: Consider
x c ( t ) cos o t ,
4000
2
s
12000 2 o 8000
T
Nyquist sampling condition is satisfied , there is no
aliasing.
Example: Consider
x c ( t ) cos o t ,
A.S.Kayhan
16000
2 n
4000 n / 6000
cos
n
3
A.S.Kayhan
42
With
A.S.Kayhan
x s (t )
x c ( nT ) ( t nT )
x [ n ] ( t nT )
x r (t )
x [ n ] h ( t nT )
h ( t ) sinc
x r (t )
t T
t nT
x [ n ] sinc
A.S.Kayhan
43
A.S.Kayhan
h[n ]
) H c(
)
T
A.S.Kayhan
44
T ' MT
x d [ n ] x c ( nT ' )
Then
If X c ( ) 0 ,
for
and
A.S.Kayhan
2
2
T '
MT
2
2 N
(N is BW of x[n])
M
Then xc(t) can be recovered without distortion.
or
Remember that
X (e
Similarly
X
X
(e
(e
)
j
1
T
X c(
2 k
)
T
T
2k
X c(
T ' k
T '
T '
2 k
)
X c(
MT k
MT
MT
)
A.S.Kayhan
45
Let
n 0 ,
x [ n ],
x1[ n ]
otherwise
0,
1 M 1 j 2 l n / M
x1[ n ] x [ n ]
e
M l0
M , 2 M ,
, n
x d [ n ] x 1 [ Mn ] x [ Mn ]
(e
xd [n] e
j n
x 1 [ Mn ] e
j n
k Mn n k / M
(e
j k / M
x1[ k ] e
(e
1
M
M 1
l0
M 1
1
x[n ]
M
A.S.Kayhan
j 2 lk / M
l0
x [ k ]e
k
j 2 lk / M
j k / M
j k / M
(e
1
)
M
First obtain X ( e
M 1
X (e
j(
2l
)
M
M
l0
2 increments to get
)then shift by
X (e
j ( ' 2 l / M )
A.S.Kayhan
46
A.S.Kayhan
A.S.Kayhan
47
If 2 2
M
A.S.Kayhan
A.S.Kayhan
48
n 0 , L , 2 L ,
A.S.Kayhan
or
xe[n ]
x k n
kL .
In frequency domain:
X e (e
x k n
kL e
j n
X e (e
x k e
j kL
X (e
j L
A.S.Kayhan
49
L=2
h n
sin n / L
n / L
xi[n]
x[ k ]
A.S.Kayhan
sin ( n kL ) / L
( n kL ) / L
A.S.Kayhan
50
A.S.Kayhan
A.S.Kayhan
51
End of Part 1
A.S.Kayhan
52
DIGITAL
SIGNAL
PROCESSING
Part 2
Digital Signal Processing
A.S.Kayhan
y[ n ] x[ n ] * h[ n ]
h[ k ] x[n k ]
In z-domain
where H ( e
system.
) X (e
) H (e
ze
A.S.Kayhan
Magnitude is
Y (e
where H ( e
system.
) X (e
) H (e
Phase is Y ( e
where H ( e
system.
) X (e
) H (e
A.S.Kayhan
A.S.Kayhan
H
H
id
id
(e
(e
j n d
) e
) 1,
id
(e
) nd
Assume around
H (e
H (e
) 1,
A.S.Kayhan
) o n d
Then
y [ n ] s [ n n d ] cos o n o o n d
grd [ H ( e
where arg H ( e
)]
d
d
arg H
(e
A.S.Kayhan
A.S.Kayhan
A.S.Kayhan
Pulses are at
0 . 25 ,
0 .5 ,
A.S.Kayhan
0 . 85
A.S.Kayhan
k 0
a k y[n k ] bk x[n k ]
k 0
k 0
k 0
ak z
Y ( z ) bk z k X ( z )
k 0
M
a k z k Y ( z )
k 0
bk z k X ( z )
A.S.Kayhan
a k z k
k 0
bo
ao
(1 c k z 1 )
(1 d k z 1 )
k 1
N
k 1
A.S.Kayhan
H (z)
1 1
3 1
z )( 1
z )
2
4
1 2 z 1 z 2
Y (z)
H (z)
1 1
3 2
X (z)
1
z
z
4
8
(1
then
( 1 2 z 1 z 2 ) X ( z ) (1
1 1
3 2
z
z )Y ( z )
4
8
x[ n ] 2 x[ n 1] x[ n 2 ]
1
3
y[n ]
y [ n 1]
y[n 2]
4
8
Digital Signal Processing
A.S.Kayhan
A.S.Kayhan
Inverse Systems :
Let H i ( z ) be the inverse system of H ( z ), then
G (z) H i(z)H (z) 1
Eq.(1)
g n h i n * h n n
then
H i(z)
1
,
H (z)
H i (e
1
H (e
Not all systems have an inverse. Ideal LPF does not have
an inverse, we can not recover high frequency components.
M
Now, consider
1
b
H (z) o
ao
(1 c k z
(1 d k z 1 )
k 1
N
k 1
A.S.Kayhan
H i(z)
ao
bo
(1 d k z 1 )
(1 c k z 1 )
k 1
M
k 1
dk
A.S.Kayhan
Example: Suppose
z 1 0 .5
H (z)
,
1 0 .9 z 1
z 0 .9
z 1 0 .5
1 2 z 1
h i1 n 2 n 1 u n 1 1 . 8 2 n 1 u n
h i 2 n 2 n 1 u n 1 . 8 2 n 1 u n 1
A.S.Kayhan
Example: Suppose
1 0 .5 z 1
,
1 0 . 9 z 1
H (z)
z 0 .9
1 0 .9 z 1
1 0 .5 z 1
then
h i n 0 . 5 u n 0 . 9
n
0 . 5 n 1 u n
A.S.Kayhan
H (z)
k 1
N
(1 d k z 1 )
k 1
M N
B r z r
H (z)
r0
0 if M N
then
h n
M N
k 1
B r n r
r0
Ak
1 d k z 1
A k d kn u n 1
k 1
A.S.Kayhan
H (z)
bk z k
k 0
h n
b k n k
k 1
response is
h n a n u n .
Digital Signal Processing
A.S.Kayhan
10
Example: Consider
a n , 0 n M
h n
.
0
,
otherwise
Then
M
1 a M 1 z M 1
H ( z ) a n z n
1 az 1
n0
Zeros at
z k ae
2k
M 1
k 0 ,1 , , M .
Difference equation is
y n
a k x n k
k 1
M 1
x n M 1
A.S.Kayhan
M
b k e j k
) k N 0
a k e j k
k 0
H (e
b
) o
ao
(1 c k e
(1 d k e
k 1
N
k 1
A.S.Kayhan
11
H (e
bo
ao
1 cke
1 d ke
k 1
N
k 1
H (e
)H
(e
H (e
b
o
ao
1 c
1 c
*
k
d ke
1 d
*
k
k 1
N
e
e
k 1
A.S.Kayhan
10
H (e
) 20 log
10
bo
ao
20 log
10
1 cke
k 1
20 log
10
1 dke
k 1
Note that :
20 log
10
Y (e
) 20 log
20 log
10
10
H (e
X (e
j
j
Attenuation in dB = - Gain in dB
Digital Signal Processing
A.S.Kayhan
12
b
) o
ao
1 cke
k 1
N
1 d ke
k 1
grd H ( e
k 1
d
d
N
k 1
arg[
d
d
1 cke
arg[
1 d ke
A.S.Kayhan
H ( z ) 1 az
then with a re
H (e
) H (e
)e
j H ( e
1 re
then magnitude is
H (e
1 r
2 r cos( )
and magnitude in dB is
20 Log
10
H (e
) 20 Log
10
[1 r
2 r cos( )]
A.S.Kayhan
13
then phase is
H (e
) tan
r sin( )
1 r cos( )
d ( H (e
)]
d
))
A.S.Kayhan
A.S.Kayhan
14
magnitudes of
vectors give the
magnitude response
H (z)
z a
z
H (e
ze
re
e j
v3
v1
v3
A.S.Kayhan
e j re j
)
e j
v 3 v1 3 1 3
A.S.Kayhan
15
1 re
1
j
e j z 1
z 1 1 re j z 1
H (e
v3
v1 v 2
H (e
A.S.Kayhan
) H (z)
ze
A.S.Kayhan
16
0 . 05634 1 z 1 1 1 . 0166 z 1 z 2
H (z)
1 0 . 683 z 1 1 1 . 4461 z 1 0 . 7957 z 2
A.S.Kayhan
H (e
)H
H (z)H
with
(e
(1 / z * ) | z e j
H (z)
bo
ao
(1 c k z 1 )
(1 d k z 1 )
k 1
N
k 1
A.S.Kayhan
17
(1 / z * )
bo
ao
(1 c k* z )
(1 d k* z )
k 1
N
k 1
Then
b
C ( z ) H ( z ) H * (1 / z * ) o
ao
(1 c k z 1 )( 1 c k* z )
(1 d k z 1 )( 1 d k* z )
k 1
N
k 1
A.S.Kayhan
If H(z) is causal and stable, then all poles must be inside the
unit circle, with this we can identify the poles. But zeros of
H(z) can not be uniquely identified from zeros of C(z) with
this constraint alone.
Example: Consider two stable systems with
H 1(z)
2 1 z 1 1 0 .5 z 1
1 0 . 8 e j / 4 z 1 1 0 . 8 e j
/4
z 1
j / 4
z 1
and
H 2(z)
1 0 . 8 e
z 1 1 2 z 1
/4
z 1 1 0 . 8 e
A.S.Kayhan
18
A.S.Kayhan
C 1 ( z ) H 1 ( z ) H 1* (1 / z * )
2 1 z 1 1 0 . 5 z 1 2 1 z 1 0 . 5 z
1 0 .8 e j / 4 z 1 1 0 . 8 e j / 4 z 1 1 0 . 8 e j / 4 z 1 0 . 8 e j / 4 z
C 2 ( z ) H 2 ( z ) H 2* (1 / z * )
1 z 1 2 z 1 z 1 2 z
1 0 . 8 e z 1 0 . 8 e z 1 0 . 8 e
1
1 0 .8 e
j / 4
z 1
j / 4
j / 4
j / 4
4 1 0 . 5 z 1 1 0 . 5 z 1 2 z 1 1 2 z
then
C1(z) C 2 (z)
Digital Signal Processing
A.S.Kayhan
19
A.S.Kayhan
All-Pass Systems:
Consider following stable system function
ap
then
(e
ap
z 1 a *
H ap ( z )
1 az 1
j *
e j a *
)
j ( 1 ae
)
e
j
j
1 ae
1 ae
(e
) 1
, but H
ap
(e
) constant
ap
(z) A
k 1
z 1 d k
1 d k z 1
k 1
( z 1 e k* )( z 1 e k )
(1 e k z 1 )( 1 e k* z 1 )
A.S.Kayhan
20
A.S.Kayhan
A.S.Kayhan
21
j / 4
A.S.Kayhan
A.S.Kayhan
22
Block-Diagram Representation:
LTI systems with difference equation represetation
(rational system function) may be imlemented by
converting to an algorithm or structure that can be realized
in desired technology. These structures consists of basic
operations of addition, multiplication by a constant and
delay.In block diagram representation:
A.S.Kayhan
with
H (z)
bo
1 a1 z a 2 z 2
1
A.S.Kayhan
23
y[n ]
a k y[n k ] bk x[n k ]
k 1
k 0
M
H (z)
k 0
N
k 1
ak z k
k 1
bk z k
a k y[ n k ] bk x[ n k ]
k0
a k y[n k ] v[ n ]
k 1
M
where
v[ n ]
bk x[n k ]
k 0
A.S.Kayhan
A.S.Kayhan
Direct Form I:
N+M
Delay
element
24
1
N
k 1
or
ak z k
k 0
Y ( z ) H 2 ( z )V ( z )
k 0
bk z k
bk z k X ( z )
1
N
ak z k
k 1
V ( z )
A.S.Kayhan
Y ( z ) H 1 ( z )W ( z )
k 0
1
N
ak z k
k 1
X (z)
b k z k W ( z )
w[n ]
a k w [n k ] x[ n ]
bk w[n k ]
k 1
M
y[n ]
k0
A.S.Kayhan
25
M=N
A.S.Kayhan
A.S.Kayhan
Max(N,M)
Delay elements
26
A.S.Kayhan
A.S.Kayhan
27
W 2 (z) W1(z)
W 4 ( z ) z 1W 3 ( z )
z 1
Y ( z )
1
1z
A.S.Kayhan
X ( z )
z 1
H ( z )
1
1z
A.S.Kayhan
28
Direct Forms:
We have already seen direct forms.
Cascade Form:
We factor numerator and denominator polynomials of H(z)
M
H (z) A
(1 f k z 1 ) (1 g k z 1 )( 1 g k* z 1 )
(1 c k z 1 ) (1 d k z 1 )( 1 d k* z 1 )
k 1
N1
k 1
k 1
N2
k 1
A.S.Kayhan
H (z)
H k (z)
k 1
k 1
bo
k 1
b ok b 1 k z 1 b 2 k z 2
1 a 1 k z 1 a 2 k z 2
~
1 b 1 k z 1 b 2 k z 2
1 a 1k z 1 a 2 k z 2
A.S.Kayhan
29
1 0 . 5 z 1 1 0 . 25 z 1
H (z)
A.S.Kayhan
Parallel Form:
H(z) may be written as sum of subsystems
N
H (z)
Ckz
k0
k 0
N
H (z)
Nc
Ak
B k (1 e k z 1 )
1 c k z k k 0 (1 d k z 1 )( 1 d k* z 1 )
N
k0
Ckz
k 0
e ok e 1 k z 1
1 a1 k z 1 a 2 k z 2
A.S.Kayhan
30
A.S.Kayhan
1 2 z 1 z 2
18
25
H (z)
8
1
2
1
1 0.75 z 0.125 z
1 0 .5 z
1 0.25 z 1
A.S.Kayhan
31
Transposed Forms :
Reverse the directions of all branches while keeping the
values as they were and reverse roles of input and output.
Transposed forms may be useful in finite precision
implementation.
Example:Consider the second order system with
A.S.Kayhan
bk x[ n k ]
k0
A.S.Kayhan
32
A.S.Kayhan
Cascade form:
N
H (z)
k 1
H k (z)
( b ok b 1 k z 1 b 2 k z 2 )
k 1
A.S.Kayhan
33
or
h [ n ] h [ M n ], 0 n M
A.S.Kayhan
Example: Consider
1, 0 n 4
h[ n ]
0 , otherwise
sin( 5 / 2 )
H ( e j ) e j 2
sin( / 2 )
A.S.Kayhan
34
Example: Consider
h [ n ] [ n ] 2 [ n 1] [ n 2 ]
H (e
) 1 2e
j 1
j 1
j 1
j 1
2 e
e
j 1
j 2
2 [1 cos( )].
A.S.Kayhan
Assume M is even
M
y[n ]
h [ k ]x [ n k ]
k 0
M / 2 1
h[ k ] x[ n k ] h[ M / 2 ] x[ n M / 2 ]
k0
M
h[k ] x[n k ]
k M / 2 1
y[n ]
h[ k ] x[ n k ] h[ M / 2 ] x[ n M / 2 ]
k 0
M / 2 1
h[ M l ] x[ n M l ]
l0
A.S.Kayhan
35
If
h[ n ] h[ M n ]
M / 2 1
y[n ]
h [ k ]( x [ n k ] x [ n M k ])
k 0
h[ M / 2 ]x[ n M / 2 ]
If
h[ n ] h[ M n ]
M / 2 1
y[n ]
h [ k ]( x [ n k ] x [ n M k ])
k 0
A.S.Kayhan
A.S.Kayhan
36
Example:
A.S.Kayhan
Value is
a 0 2 0 a1 2 1 a 2 2 2 a B 2 B
Example:
Binary Code
Numeric value
0 11
3/4
1 10
1/2
1 01
1/4
A.S.Kayhan
37
2X m
2 B 1
x[ n ] X
x B [n ]
1 x B[n] 1
(two' s complement
and
/ 2 e[ n ] / 2
Digital Signal Processing
A.S.Kayhan
A.S.Kayhan
38
Example:
Sinusoidal
signal
3bit
quantizer
Error for
3bit
Error for
8bit
Digital Signal Processing
A.S.Kayhan
1
de 0
/2
2
e
/2
1
2
de
12
2
e
2 2 B X
2
m
12
A.S.Kayhan
39
6 . 02 B 10 . 8 20 log
10
m
x
If
B B 1,
x x / 2,
SNR SNR 6 dB
SNR SNR - 6dB
A.S.Kayhan
Consider
bk z k
H (z)
k 0
N
ak z k
k 1
b k z k
H (z)
k 0
N
a k z k
k 1
where
b k bk bk , a
ak ak
A.S.Kayhan
40
A.S.Kayhan
A.S.Kayhan
41
Passband
cascade
unquantized
Passband
cascade
16-bit
A.S.Kayhan
A.S.Kayhan
Passband
parallel
16-bit
Direct form
16-bit
42
A.S.Kayhan
7bits
4bits
Circles correspond to r2,
vertical lines to 2rcos
Digital Signal Processing
A.S.Kayhan
43
4bits
A.S.Kayhan
7bits
A.S.Kayhan
44
H (z)
h[n ]z n
n0
If
h[ n ] h[ n ] h[n ]
then
H (z)
h[n ]z n H ( z ) H ( z )
n0
where
and
H (z)
h[n ]z n
n0
^
H (e
) H (e
) H (e
)
A.S.Kayhan
A.S.Kayhan
45
A.S.Kayhan
y[n ]
k 1
a k y[ n k ] bk x[ n k ]
k0
y[n ]
k 1
M
^
Q a k y [ n k ] Q b k x [ n k ]
k 0
A.S.Kayhan
46
A.S.Kayhan
A.S.Kayhan
47
A.S.Kayhan
e 0
2 2 B
12
2
e
2B
2
2
e
2 2 B
12
A.S.Kayhan
48
e[ n ] e 0 [ n ] e1[ n ] e 2 [ n ] e 3 [ n ] e 4 [ n ]
Digital Signal Processing
A.S.Kayhan
2
e0
2
e1
2
e2
2
e3
2
e4
5
For the general Direct Form I case
2 2 B
2
e M 1 N
12
Now, we observe that
2
e0
2 2 B
5
12
f [n ]
a k f [ n k ] e[ n ]
k 1
2
f
2 2 B
M 1 N
12
h ef [ n ]
ef
(z) 1 / A(z)
A.S.Kayhan
49
b
1 az
a 1.
h ef [ n ] a n u [ n ]
2
f
2 2 B
2
12
2n
2 2 B
2
12
1 a
A.S.Kayhan
y[n ]
h[ k ]x[ n k ]
k 0
f [ n ] e[ n ]
k 0
e k [ n ],
2
f
2 2 B
M 1
12
A.S.Kayhan
50
End of Part 2
A.S.Kayhan
51
DIGITAL
SIGNAL
PROCESSING
Part 3
Digital Signal Processing
A.S.Kayhan
IIR Filters:
Infinite impulse response (IIR) filters have rational transfer
M
functions as
k
H (z)
bk z
ak z k
k 0
N
k 0
A.S.Kayhan
20 log
10
( )
A.S.Kayhan
K ,
0,
c
c
K 1 a 1 2 a n 1 2 n 2
,
1 b1 2 b n 2 n
bn 0
A.S.Kayhan
a i bi ,
H ( )
K 1 b1 2 b n 1 2 n 2
,
1 b1 2 b n 2 n
bn 0
a i bi 0,
Then, we have
2
H ( )
K
1 bn
2n
A.S.Kayhan
1
1 bn
2n
1
1
2
1 bn
2n
o
bn
2n
1
1
o
2n
A.S.Kayhan
10
/ 10
10
10
H ( ) dB .
2n
2n
dB .
To find n:
Using max and p
10
max
/ 10
10
/ 10
1/ 2n
p
o
2n
10
min
/ 10
s
o
2n
A.S.Kayhan
10
10
min
max
/ 10
/ 10
1
1
s
p
2n
10 min / 10 1
log
10 max / 10 1
2 log s
p
A.S.Kayhan
H ( )
1
1
2n
1
1
2n
1 (s / j)
1 ( 1) n s 2 n
( 1) n s 2 n 1
If n is even, then
s 2n 1 e
sk e
1 2 k
j (
)
2n
j ( 2 k )
, k 0 ,1 ,..., 2 n 1 .
, k 0 ,1 ,..., 2 n 1 .
Digital Signal Processing
A.S.Kayhan
If n is odd, then
s 2n 1 e
sk e
k
n
j 2k
, k 0 ,1 ,..., 2 n 1 .
, k 0 ,1 ,..., 2 n 1 .
Note that all the poles lie on a circle with radius 1, because
the frequency is normalized. (If we want to design analog
filter we need to correct this).
Also, choose the poles in the left-half plane to get a stable
filter.
A.S.Kayhan
k
3
, k 0 ,1 ,..., 5 .
1
( s 1 )( s 2 s 1 )
1
.
1
3
1
3
( s 1 )( s ( j
))( s ( j
))
2
2
2
2
H (s)
A.S.Kayhan
1
1
.
n
1 F n ( ) 2
1 ( ) 2
( x ))
( x ))
When x 1 , Cn(x) 0.
Digital Signal Processing
A.S.Kayhan
C2(x)
C3(x)
C4(x)
C5(x)
-1
-1
0
x
-1
1 -1
n 1
0
x
-1
-1
0
x
-1
1 -1
(x) 2 x C n (x) C
-1
1 -1
0
x
n 1
0
x
( x ),
C o ( x ) 1, C 1 ( x ) x .
A.S.Kayhan
Use Cn(.) in :
H ( )
1
1 2 C n2 ( )
1 , C n ( ) cosh( n cosh
1 , C n ( ) cos( n cos
2 1 ,
( ))
( ))
A.S.Kayhan
Behaviour at =0:
C n2 ( ) 0 , H ( 0 )
C n2 ( ) 1 , H ( 0 )
1,
if n is odd
1
,
(1 2 )
if n is even
Behaviour at =1:
C n2 ( ) 1 ,
for all n
H ( 1)
1
(1 2 )
A.S.Kayhan
The attenuation is
10 log 1 2 C n2 ( )
10
max/ 10
When 2 C n2 ( ) 1 3 . 01 dB .
This defines the half-power frequency (3dB cut-off) hp.
Then,
1
cosh( n cosh
1
1
cosh 1 ( hp )
cosh 1 ( )
n
1
1
hp cosh(
cosh 1 ( )).
n
C n (
hp
hp
))
hp
1 ).
A.S.Kayhan
min 10 log 1 2 C n2 ( s )
10 min
With
cosh( n cosh
Finally,
cosh
n
/ 10
10
1
1 2 C n2 ( s )
max/ 10
( s ))
10
/ 10
min
cosh
10
10
1
10
min
/ 10
max
/ 10
max
1
1
/ 10
( s )
A.S.Kayhan
then
1
1 C n2 ( s / j )
2
1 2 C n2 ( s / j ) 0 C n ( s / j ) j
Let
With
cos( x )
cos( w ) cos( u jv ) s / j
cos 1 ( s / j ) w
e
jx
e
2
jx
, cos( jx )
C n ( s / j ) cos( n cos
ex ex
cosh( x )
2
( s / j )) cos( nw )
A.S.Kayhan
With
cos( nu ) cosh( nv ) 0
C n (s / j) j
then
sin( nu ) sinh( nv )
3 5
,
,
,
2n 2n 2n
( 2 k 1 ), k 0 ,1 , , 2 n 1 .
2n
uk
uk
A.S.Kayhan
Remember that
then
1
sinh
n
cos
1
) a.
( s / j ) w u jv
2 k 1 ja
s k j cos( w k ) j cos
2n
2k 1
) sinh( a )
2n
2k 1
cos(
) cosh( a )
2n
sin(
Choose left
half poles.
A.S.Kayhan
10
h [ n ] T d h c nT
H ( )
H c(
k ).
Td
Td
If
then
A.S.Kayhan
/ Td
H c ( ) 0 ,
),
.
Td
Analog and digital frequencies have a linear relation:
Td .
H ( ) H c (
H c (s)
k 1
Ak
,
s sk
hc (t )
Ak e skt ,
t 0.
k 1
A.S.Kayhan
11
N
d
T d A k e s k nT d u n
k 1
h n
T d ( A k e s k T d ) n u n .
k 1
H (z)
k 1
Poles are
Td Ak
.
1 e sk T d z 1
s s k z e skTd .
If Hc(s) is stable (k < 0), then H(z) is also stable (|z| < 1).
Digital Signal Processing
A.S.Kayhan
.
s 1
1
3
1
3
s ( j
)
s ( j
)
2
2
2
2
H c (s)
then
Td
1 z 1e Td
1
1
1
Td ( j
)
Td ( j
2
2
12
H (z)
1 z 1 e
Td (
1
3
j
)
2
2
1 z 1e
Td (
1
)
12
.
1
3
2
A.S.Kayhan
12
Bilinear Transformation:
Transformation needed to convert an analog filter to a
discrete time filter must have following properties:
1- j axis of the s-plane must be mapped onto the unit
circle of the z-plane,
2- stable analog filters must be tranformed into stable
discrete time filters (left hand plane of the s-plane must be
mapped into inside the unit circle of the z-plane).
Following BT satisfies these conditions:
1 z 1
s K
1 z 1
1 s / K
.
1 s / K
Let
s j ,
z re
A.S.Kayhan
then
r
(1 / K ) 2 ( / K ) 2
.
(1 / K ) 2 ( / K ) 2
Therefore
0
( LH plane ) r 1 ( inside
( RH plane ) r 1 ( outside
Digital Signal Processing
the u.c. )
the u.c. )
A.S.Kayhan
13
Now, let
then
s j ,
z e
1 e j
e j / 2 ( e j / 2 e
j K
K j / 2
1 e j
e
( e j / 2 e
sin( / 2 )
j Kj
jK tan( / 2 ).
cos( / 2 )
or
A.S.Kayhan
j / 2
j / 2
)
.
)
K tan( / 2 ).
A.S.Kayhan
14
Observations:
1- According to Taylor series expansion of tan(), for small
K / 2 3 / 24 K / 2 .
2- For high frequencies, the relation is nonlinear causing a
distortion called warping effect. Therefore, BT is usually used
for the design of LPF to avoid this.
A.S.Kayhan
A.S.Kayhan
15
Then, we use
in
H
( )
1
1
2n
( )
tan( 0 . 5 )
1
tan( 0 . 5 HP )
2n
min / 10
1
log 10
max / 10
10
2 log tan( 0 . 5 s )
tan( 0 . 5 p )
A.S.Kayhan
HP
2 tan
tan( 0 . 5
10
max
/ 10
1/ 2n
K b cot(0.5 HP ).
(s)
1
(s2
2 s 1)
A.S.Kayhan
16
Remarks:
1- Given the specs.:
a) find the filter order n
b) obtain the analog filter H(s)(using LHP poles)
c) calculate HP and Kb
d) use biliear transformation to find H(z).
2- H(z) is BIBO stable, because H(s) is stable.
3- Applying the BT to high order filters may be tedious.
Therefore, first express H(s) as product or some of first
and second order functions, then apply the BT.
A.S.Kayhan
(z2
0 . 0037 ( z 1 ) 6
0 . 59 )( z 2 0 . 17 )( z 2 0 . 0 . 02 )
Digital Signal Processing
A.S.Kayhan
17
1 C
2
n
1
(tan( 0 . 5 ) / tan( 0 . 5
))
max 10 log 1
10 min
Also using s ,
We find the filter order
10
max
min
10
1
cosh 1 [tan( 0 . 5 s ) / tan( 0 . 5 p )]
cosh
/ 10
A.S.Kayhan
min
/ 10
max
/ 10
A.S.Kayhan
18
f smp
Filter order n = 3,
H 3(z)
fs
f smp
Kc = 1
(z2
0 . 09 ( z 1 ) 3
0 . 15 z 0 . 72 )( z 0 . 54 )
A.S.Kayhan
(z2
0 . 736 ( z 1 ) 3
0 . 505 z 0 . 619 )( z 0 . 472 )
(z)
z(z2
Kb = 1
0 . 01656 ( z 1 ) 7
0 . 636 )( z 2 0 . 232 )( z 2 0 . 052 )
Digital Signal Processing
A.S.Kayhan
19
Frequency Transformations:
The objective is to obtain transfer functions of other types of
dicrete filters from already available prototype Low Pass
Filters using tranformation functions g(z) as
H (z) H
LP
( g ( z ))
LPF
(z)
z3
A.S.Kayhan
0 . 09 ( z 1 ) 3
0 . 691 z 2 0 . 802 z 0 . 39
A.S.Kayhan
20
HPF
(z)
z3
(1 0 . 5095 z 1 )
0 . 0066 ( z 3 3 z 2 3 z 1 )
2 . 361 z 2 2 . 102 z 0 . 6884
A.S.Kayhan
A.S.Kayhan
21
1
)
2
(e
)W ( e
)d .
A.S.Kayhan
A.S.Kayhan
22
Main lobe width and transition region; Peak side lobe level
and oscillations of filter are related.
A.S.Kayhan
A.S.Kayhan
23
A.S.Kayhan
A.S.Kayhan
24
x n x n N .
1
x n
N
X [ k ]e
2
nk
N
k0
x n e
X [k ]
2
nk
N
n0
Let
A.S.Kayhan
2
N
x n W
X [k ]
nk
N
n0
x n
1
N
N 1
X [k ] W
nk
N
k 0
x n
[ n rN ]
The DTFS
~
X [k ]
N 1
n W
nk
N
for all k .
n0
A.S.Kayhan
25
Properties:
1- Linearity: It is linear.
2- Shift of a sequence: If
x n X [ k ]
x n m W
then
Similarly,
nl
N
km
N
X [k ]
x n X [ k l ]
x 1 n X 1 [ k ]
x 2 n X 2 [ k ]
Then,
~
X 3[ k ] X 1[ k ] X 2 [k ]
x 3 n
N 1 ~
x 1 [ n m ] x 2 [ m ].
m0
A.S.Kayhan
A.S.Kayhan
26
X [ k ] X ( ) |
2
k
N
X
k
N
N 1
X [k ] W
nk
N
k 0
A.S.Kayhan
Substituting,
X
x m
e j m ,
X k X ( ) | 2
then,
x n x n *
n rN
x n
rN .
A.S.Kayhan
27
A.S.Kayhan
X (e
x [ n ]e
j n
We define:
W
2
k
N
j
, k 0 ,1 , N 1 .
2
N
A.S.Kayhan
28
X [k ]
x[ n ] W
kn
N
n0
for k=0,1,...,N-1.
The inverse DFT is defined as (synthesis equation):
x[ n ]
1
N
X [k ] W
kn
N
n0
for n=0,1,...,N-1.
A.S.Kayhan
A.S.Kayhan
Example:
N=5
29
N=10
Properties:
1- Linearity: DFT is a linear operation.
2- Circular shift:
x n m
N , 0
n N 1 e
A.S.Kayhan
2
km
N
X [ k ].
A.S.Kayhan
30
3- Circular convolution:
x 3 n x 1 n
x 2 n
N 1
x 1 [ n m
] x2[m ]
m 0
Example:
A.S.Kayhan
A.S.Kayhan
Example:
N=L
31
N=2L
A.S.Kayhan
4- Multiplication(Modulation):
x 3 n x 1 n x 2 n X
k .
x 2 n
A.S.Kayhan
32
) X 1 (e
) X 2 (e
A.S.Kayhan
Taking N samples
X
k X 2 k .
x 3 n rN , 0 n N 1
x 3 p n r
0,
otherwise.
x 3 p n x 1 n
x 2 n
A.S.Kayhan
33
Example:
A.S.Kayhan
A.S.Kayhan
Example:
34
A.S.Kayhan
x n
x r n rL
A.S.Kayhan
35
y r n rL ,
y r n x r n * h n
A.S.Kayhan
A.S.Kayhan
36
Overlap-Save Method :
Consider again h[n] of length P, and length of x[n] is much
grater than P.
In this method L-point circular convolution (or DFT) is
used. Since the first (P-1) points will be incorrect,
input segments must overlap.
We can write each L sample segment of x[n] as :
x r n x n r ( L P 1 ) ( P 1 ) ,
y n
0 n L 1
y r n r ( L P 1 ) ( P 1 ) ,
y r n y rp n , P 1 n L 1
Digital Signal Processing
A.S.Kayhan
A.S.Kayhan
Example:
37
x[ n ]
N 1
X [k ] W
kn
N
X [k ]
n0
x[n ] W
kn
N
n0
kn
Im{ x [ n ] } Im{ W N }
j Im{ x [ n ] } Re{ W kn }
N
X [k ]
n0
A.S.Kayhan
k(N n)
N
k(N n)
N
W
W
kn
N
kn
N
(W
W
kn
N
)*
(k N )n
N
Example:
Re{ x [ n ] } Re{ W
kn
N
} Re{ x [ N n ] } Re{ W
kn
N
k(N n)
N
}.
A.S.Kayhan
38
A.S.Kayhan
X [k ]
kn
N
x[n ] W
, k 0 ,1 , , N 1
n0
x[ n ] W
kn
N
n even
x[n ] W
kn
N
n odd
X [k ]
N / 2 1
x [ 2 r ] (W
2
N
) rk W
k
N
r0
x [ 2 r ] (W
rk
N / 2
r0
G k
2
N
) rk
r0
N / 2 1
x [ 2 r 1 ] (W
N / 2 1
) W
k
N
x[ 2 r 1] W
rk
N / 2
r0
k
N
k .
Digital Signal Processing
A.S.Kayhan
39
X [ k ] G k
k
N
k .
A.S.Kayhan
Since G[k] and H[k] requires 2(m-1)-point DFTs, each one can
be similarly decomposed until we reach 2-point DFTs.
A.S.Kayhan
40
A.S.Kayhan
A.S.Kayhan
Butterfly:
(in place comp.)
Bit reversed
order
41
X [k ]
x[n ] W
kn
N
, k 0 ,1 , , N 1
n0
then
N 1
X [2 r ]
x[ n ] W
2 rn
N
r 0 ,1 , , ( N / 2 1 )
n0
N / 2 1
X [2 r ]
N 1
x[ n ] W
2 rn
N
n0
2 rn
N
N / 2 1
x[ n ] W
2 rn
N
n0
N / 2 1
X [2r ]
x[ n ] W
nN /2
N / 2 1
X [2 r ]
x[ n N / 2 ] W
2r(n N /2)
N
n0
N / 2 1
( x [ n ] x [ n N / 2 ]) W
rn
N /2
n0
rn
N /2
n0
Similarly for
g [n ] W
A.S.Kayhan
0 r ( N / 2 1)
N / 2 1
X [ 2 r 1]
( x [ n ] x [ n N / 2 ]) W
n
N
rn
N /2
n0
N / 2 1
h [ n ] W Nn W
rn
N /2
n0
A.S.Kayhan
42
A.S.Kayhan
1
N
X [ k ]W
kn
N
, n 0 ,1 , , N 1
n0
X [k ]
x[ n ] W
kn
N
, k 0 ,1 , , N 1
n0
1 N
1
x [n]
X * [ k ]W Nkn
DFT
N n0
N
*
1
x[ n ]
DFT X * [ k ]
N
*
[k ]
A.S.Kayhan
43
End of Part 3
A.S.Kayhan
44
DIGITAL
SIGNAL
PROCESSING
Part 4
J.S. Lim, Two Dimensional Signal Processing, in Advanced Topics In Signal Processing, Prentice-Hall.
A.S.Kayhan
Signals:
Impulses: The 2-D impulse is,
1, n1 n 2 0
n1 , n 2
0, otherwise
A.S.Kayhan
xn1 , n2
x[k , k ] [n
1
k1 , n2 k 2 ].
k1 k 2
A.S.Kayhan
A.S.Kayhan
or
1, n2 0
xn1 , n2 T n2
0, otherwise
or
A.S.Kayhan
1, n1 n2
xn1 , n2 T n1 n2
0, otherwise
A.S.Kayhan
Step sequence:
n1 , n2 0
otherwise
1,
un1 , n2
0,
un1 , n2
n1
n2
[k , k ].
1
k1 k 2
or
n1 , n2 un1 , n2 un1 1, n2 un1 , n2 1 un1 1, n2 1
A.S.Kayhan
Separable sequences:
A separable sequence can be written as
xn1 , n2 f1 n1 f 2 n2
The impulse is separable
n1 , n2 n1 n2
Periodic sequences:
~
x n1 , n2 is periodic with period N1xN2 if
~
x n1 , n2 ~
x n1 N1 , n2 ~
x n1 , n2 N 2
Example: Periodic with 2x4
~
x n1 , n2 cos n1 ( / 2)n2
Digital Signal Processing
A.S.Kayhan
Systems:
The relation between the input
of the system is given by
y n 1 , n 2 F x n 1 , n 2 .
where
a y 1 n 1 , n 2 b y 2 n 1 , n 2 .
y i n 1 , n 2 F x i n 1 , n 2
, i 1, 2 .
y n 1
m 1 , n 2 m 2 .
Convolution:
For a LSI system with impulse response,
input/output relation is given by
A.S.Kayhan
h n 1 , n 2 ,the
x[k , k ]h[n
1
k1 , n2 k 2 ].
k1 k 2
xn1 , n2 * n1 m1 , n2 m2 x[n1 m1 , n2 m2 ].
A.S.Kayhan
Example:
y n1 , n 2
A.S.Kayhan
x [ k 1 , k 2 ] h [ n 1 k 1 , n 2 k 2 ].
k 1 k 2
A.S.Kayhan
yn1 , n2
x[k , k ]h [n
1
k1 ]h2 [n2 k 2 ]
k1 k 2
h [n
1
k1
h [n
1
k1 ] f k1 , n2
k1
A.S.Kayhan
Stability:
A system is BIBO stable iff a bounded input leads to a
bounded output. If
h[n , n ]
1
n1 n2
A.S.Kayhan
X (1 , 2 )
xn , n e
1
j1n1 j 2 n2
n1 n2
xn1 , n2
1
(2 ) 2
X (1 , 2 ) e j1n1 e j2 n2 d1d 2 .
A.S.Kayhan
A.S.Kayhan
Example:
Frequency Response:
If the input to Linear Shift Invariant (LSI) system is
x[n1 , n2 ] e j1n1 e j2 n2
then
y[ n1 , n2 ] H (1 , 2 ) e j1n1 e j2 n2
where
H (1 , 2 )
hk , k e
1
j1k1 j2 k 2
k1 k 2
Example:
Given LPF
A.S.Kayhan
1, 1 a and 2 b
H (1 , 2 )
otherwise
0,
H (1 , 2 ) H1 (1 ) H 2 ( 2 ).
A.S.Kayhan
then
sin(an1 ) sin(bn2 )
.
n1
n2
A.S.Kayhan
Example:
Given impulse response and magnitude response of a 2D LPF
as
A.S.Kayhan
10
Original
LP-Filtered
HP-Filtered
A.S.Kayhan
Example:
Given frequency response of a 2D LPF as
1,
H (1 , 2 )
0,
12 22 c
12 22 c and 1 , 2
A.S.Kayhan
11
A.S.Kayhan
2D Z-Transform:
2D Z-Transform is defined as
X ( z1 , z2 )
xn , n z
1
n1
z2
n2
n1 n2
A.S.Kayhan
12
Example:
Given 2D sequence
x[n1 , n2 ] a n1 b n2 un1 , n2
then
X ( z1 , z2 )
n1
b n2 un1 , n2 z1 n1 z 2 n2
n1 n2
a
n1 0 z1
n1
n2
b
1
1
, z1 a and z 2 b
1 az11 1 bz 21
n2 0 z 2
A.S.Kayhan
Inverse Z-Transform:
2-D polynomials, in general, can not be factored as a product
of lower order polynomials, therefore the partial fraction
expansion is not a general procedure for 2-D signals.
ak , k yn
1
( k1 , k 2 ) R A
k1 , n2 k 2
bk , k xn
1
k1 , n2 k 2
( k1 , k 2 ) RB
A.S.Kayhan
13
Example:
Given an IIR filter with a first quadrant impulse response as
H ( z1 , z 2 )
1
1 0.5 z11 z21
then
H ( z1 , z 2 )
Y ( z1 , z 2 )
1
X ( z1 , z 2 ) 1 0.5 z11 z 21
Y ( z1 , z 2 ) 0.5 Y ( z1 , z 2 ) z11 z 21 X ( z1 , z 2 )
y[n1 , n2 ] 0.5 y[n1 1, n2 1] x[n1 , n2 ]
A.S.Kayhan
End of Part 4
A.S.Kayhan
14