Beruflich Dokumente
Kultur Dokumente
x[n ]
Filter
Amplify or attenuate some frequency components of x[n ]
Signal out
y [n ]
Parameter Extraction
Signal in
x[n]
Parameter Extraction
e.g.: 1. Spectrum Estimation 2. Parameters for Recognition
Parameter out
c11 c12 c 1m c21 c22 c 2m cL1 cL2 c Lm
SP- Berlin Chen 3
Sinusoid Signals
x [n ] = A cos ( n + )
f : normalizedfrequency 0 f 1
A : amplitude ()
2 T
Period, represented by number of samples
x [n ] = A cos n 2
x [n ] = x [n + N ] = A cos ( n + N ) 2 2 k (k = 1, 2 ,... ) N = 2 k = N
T = 25 samples
Right-shifted
A cos ( ( n + N ) + ) = A cos ( n + )
x [n + N ] = x [n ]
N = 2 k ( k = 1 ,2 ,... )
Examples (sinusoid signals)
x 1 [n ] = cos ( n / 4 ) x 2 [n ] = cos (3 n / 8 )
x 3 [n ] = cos (n )
2 = N
is periodic with period N=8 is periodic with period N=16 is not periodic
SP- Berlin Chen 5
N 1 = 2 k N 1 = 8 k
(N 1 and
x3 [n ] = cos (n )
z = x + jy z = Ae
j
2
= A (cos + j sin )
x
y x + y2
2
(A
is a real number
x + y
x2 + y2
Imaginary part
Im
x = A cos y = A sin
Re
real part
SP- Berlin Chen 7
x [n ] = A cos ( n + = Re
real part
= Re
{Ae {Ae
j ( n + j n
} }
(A e
0
j 0
+ A1 e
j1
)
A , A 0 and A1 are real numbers
Ae
= Ae j ( n + )
11
k = scale/weighted
x [n ] =
= x [ 2 ] [n + 2 ] + x [ 1 ] [n + 1 ] + x [0 ] [n ] + x [ 1] [n 1 ] + x [2 ] [n 2 ] + x [3 ] [n 3 ] = (1 ) [n + 2 ] + ( 2 ) [n + 1 ] + (2 ) [n ] + (1 ) [n 1 ] + ( 1 ) [n 2 ] + (1 ) [n 3 ]
SP- Berlin Chen 12
k =
x [k
] [n
k ]=
k = 2
x [k ] [n
Digital Systems
A digital system T is a system that, given an input signal x[n], generates an output signal y[n]
y [n ] = T {x [n ]}
x [n ]
T{ }
y [n ]
13
Time-invariant (Time-shift)
A time shift in the input by m samples gives a shift in the output by m samples y [n m ] = T {x [n m ]}, m
time sift
x [n m ] (if m > 0 ) right shift m samples x [n + m ] (if m > 0 ) left shift m samples
14
} = x [n ] h [n ] = T {x [n ]
k =
x [k ] h [n k ] =
k =
x [n k ] h [k
The system can be characterized by the systems impulse response h[n], which also is a signal sequence If the input x[n] is impulse [n ], the output is h[n]
[n ]
Digital System
h [n ]
15
x [k
T
] [n
k =
scale
{x [n ]} =
=
x [k ] [n k
k =
x [k ] T { [n k x [k k
]}
linear
=
h [n ]
] h [n k = x [n ] h [n ]
]
Time-invariant
Time invariant
convolution
T [n k ] h[n k ]
SP- Berlin Chen 16
T [n ] h[n ]
x [n ]
LTI LTI
h [n ]
0 1
?
3 h[n]
3 [n] 2 [n 1] 1 [n 2]
0 1 2 3 0 2 1 1 2
9 2 -6 6 2 1 2 3 -4 1 3 2 3 -2
SP- Berlin Chen 17
0 1
Sum up
11 3 1
2 h[n 1] h[n 2]
y [n ]
3 4 -1 -2
0 12
x [k
k =
h [k
Reflect
h [ k ]
n
SP- Berlin Chen 18
h [k
Reflect
] ]
3
1 0 1 3
Convolution
2 -2
y [n ] = x [n ] h [n ] =
3 0 11
k =
x [k
h [ k
2 1
0 1 2 -2 1
x [k ] h [n k ]
y [n ], n = 0 y [n ], n = 1
Sum up
1 2
-1 0 -2 3 -1 -2
h[ k + 1] h[ k + 2] h[ k + 3] h[ k + 4]
1 1 1
0 1 3 0 -2 1 -2 2 -2
y [n ], n = 2 y [n ], n = 3 y [n ], n = 4
4 -2
11 3 1
y [n ]
3 4 -1 -2
1 2 3 1
0 12
3 -1 1
2 3 3
3 4
SP- Berlin Chen 19
[n ] x [n ]* h 2 [n ]* h 1 [n ]
2
h 2 [n ]
Distribution
h 1 [n ] + h 2 [n ]
= x [n ]* h 1 [n ] + x [n ]* h 2 [n
x [n ]* (h 1 [n ] + h 2 [n
])
h 1 [n ]
An impulse response has finite duration Finite-Impulse Response (FIR) An impulse response has infinite duration Infinite-Impulse Response (IIR)
y [n
]=
= = =
]* h [n ] h [n ]* x [n ] x [k ] h [n k =
k =
x [n
k k
] ]
20
h [k
] x [n
] x [k ] h [n
]
m = n k
x [n m
] h [m ] (let ]
h [k ]x [n k
= h [n ]* x [n
21
suppose
that
22
] y [n ]
B B
x y
< <
n n
and
k =
[k ]
23
y [n 0 ] =
K k =1
y [n 0 k ] + k x [n 0 m
M k=m
x [n ]
z-1 z-1
0 1 2 M
y [n ]
1 2
z-1 z-1
z-1
z-1
Any noncausal FIR can be made causal by adding sufficient long delay
SP- Berlin Chen 24
e j n = cos n + j sin n
H e
is a complex function of
j
H e
( )=
=
(e ) + H (e ) e
j r j
Im
jH
j H e j
(e )
j
phase
Re
SP- Berlin Chen 25
magnitude
(e
)=
1 2
n =
h [n H
]e
j n
DTFT
j n
h [n
]=
(e
)e
Inverse DTFT
h [n ]
jn
( )=
j
[ n]e n =
h
h[n] =
( )
1 j ( n m ) d e 2 1 = e j ( n m ) j 2 ( n m ) sin (n m ) = (n m )
1, m = n = 0, m n = [n m ]
SP- Berlin Chen 26
(e
)=
h [n
]e
j n
n =
y [ n ] = x [ n ] h [n
]=
x [k ]h [n k
]
n'= n k n = n '+ k n = n ' k
k =
Y e
)=
n =
x [k ]h [n k ]e
j k
j n
k =
k =
x [k ]e
= X x [ n ] h [n
(e
)H (e
X
n ' =
h [n ' ]e
j n '
Y e j = X e j H e j
j
(e
)H (e
( ) ( ) ( ) Y (e ) = X (e ) H (e ) Y (e ) = X (e ) + H (e )
j j j j j j
27
: complex conjugate z * = x jy
2
Parsevals Theorem
power spectrum
n =
z = x + jy
z z* = x 2 + y 2 = z
x [n ]
1 = 2
X e
The total energy of a signal can be given in either the time or frequency domain.
x [ m + n ]x * [ m ]
l = m+n m = l n = (n l )
= x [ l ]x * [ (n l )] = x [ n ] x [ n ]
l =
S xx ( ) = X ( )X
( ) =
j n
X (
)2
1 R xx [n ] = 2
Set R
xx
S xx ( )e
*
1 d = 2
X ( ) e jn d
2
n = 0
[0 ] =
x [m ]x
m =
[m ] =
x [m
]2
m =
1 2
X (
)2 d
SP- Berlin Chen 28
= h [k ]Ae j ( (n k )+ ) = Ae
j ( n + )
k =
e h [k ]
j k
( ) H (e ) < 1
j
29
30
Z-Transform
z-transform is a generalization of (Discrete-Time) Fourier transform h [n ] H e j
( )
h [n ]
z-transform of
H (z )
H (z ) =
n =
h [n ] is defined as
h [n ]z n
j
Im
complex plane
z = e j
H e
( ) = H (z )
j
z = e j
Re
z = e j ( z = 1)
unit circle
SP- Berlin Chen 31
Z-Transform (cont.)
Fourier transform vs. z-transform
Fourier transform used to plot the frequency response of a filter z-transform used to analyze more general filter characteristics, e.g. stability Im complex plan
R2
R1
Re
In general, ROC is a ring-shaped region and the Fourier transform exists if ROC includes the unit circle ( z = 1 )
SP- Berlin Chen 32
n =
h [n ] z
<
absolutely summable
[n ] =
= = =
Z-Transform (cont.)
x [n h [n
k
]* h [n ] ]* x [n ] x [k ] h [n =
k k
] ]
k =
[k ] x [n
An LTI system is defined to be causal, if its impulse response is a causal signal, i.e.
h [n ] = 0 for n < 0
h [n ] = 0 for n > 0
Right-sided sequence
An LTI system is defined to be stable, if for every bounded input it produces a bounded output
Necessary condition:
n =
h [n ] <
That is Fourier transform exists, and therefore z-transform includes the unit circle in its region of converge
SP- Berlin Chen 33
Z-Transform (cont.)
Right-Sided Sequence
E.g., the exponential signal
n
1 for n 0 1. h1 [n ] = a u [n], where u[n ] = 0 for n < 0 n n 1 1 n H1 (z ) = a z = az = have a pole at z = a 1 n = n = 1 az (Pole: z-transform goes to infinity)
( )
1 If az < 1
ROC
the unit cycle Im
is z > a
Fourier tr ansform of h1 [n ] exists if a < 1
Re
34
Z-Transform (cont.)
Left-Sided Sequence
E.g. 0
u[ n 1]z
n
=
1
n = n
z n
If a 1 z < 1
= a z = 1
n =1
n =0
(a z )
1 a 1 z 1 = 1 = = 1 1 1 a z 1 a z 1 az 1
ROC
the unit cycle Im
is z < a
when a < 1, the Fourier transform of h2 [n ] doesn' t exist, because h2 [n ] will go
Re
exponentia lly as n
SP- Berlin Chen 35
Z-Transform (cont.)
Two-Sided Sequence
E.g. 0
3.
1 u [n ] 3 1 u [ n 1 ] 2
n n
1 1 [ ] [ ] h3 n = u n u[ n 1] 3
z > 1 3 1 2
1 , 1 1 z 1+ 3 1 , 1 1 z 1 2
H 3 (z ) =
z <
1 1 + 1 1 1 + z 1 1 z 1 2 3
1 2 z z 12 = 1 z + z 3
1 2
ROC
Im
1 3
1
2
Z-Transform (cont.)
Finite-length Sequence
E.g. 0 N-1
a n , 3. h4 [n] = 0,
H 4 (z ) = a z
N 1 n=0 n n
0 n N 1 others
= az
n =0 N 1
z N 1 + az N 2 + a 2 z N 3 + ..... + a N 1
( )
1 n
1 az 1 zN aN = = N 1 1 za 1 az z
( )
(
1 N
1 3
z k = ae
If N=8
j 2k
k = 1 ,..,N 1
7 poles at zero
Z-Transform (cont.)
Properties of z-transform
1. If h[n ] is right-sided sequence, i.e. h[n ] = 0, n n1 and if ROC is the exterior of some circle, the all finite z for which z > r0 will be in ROC
If
n1 0
2. If h[n ] is left-sided sequence, i.e. h[n ] = 0, n n 2 , the ROC is the interior of some circle, 3. If h[n ] is two-sided sequence, the ROC is a ring 4. The ROC cant contain any poles
38
39
]=
= = =
x [n h [n
k
]* h [n ] ]* x [n ] x [k ] h [n =
k k
] ]
h [k ] e
j k
j ( n k )
k =
[k ] x [n
= H e
k = - j
h [k ] e
j n
)e
H e j : the Fourier tr ansform of the system impulse response. It is often referred to as the system frequency response.
( )
Therefore, a complex exponential input to an LTI system results in the same complex exponential at the output, but modified by H e j The complex exponential is an eigenfunction of an LTI system, and H e j is the associated eigenvalue
( )
T {x [n ]} = H e
( )
( )x [n ]
scalar j
40
e j = cos + j sin e j e
( )
j
= cos ( ) + j sin ( )
( )
[ ( )
A j j 0 n j0 A j j 0 n e e +H e e e 2 2
( )
H e j0 = H * e j0
) ( ) (e ) = H (e )e
jH e j0
[ ( )
( ) [
( ) ( )]
]
41
x [n ] =
k =1
y [n ] = Ak H e j k cos k n + k + H e j k
magnitude response
k =1 K
A k cos ( k n + k )
( ) [
phase response
( )]
42
DTFT DTFT
h [n ] =
k =
X e
( )=
j
k =
a n u [n ], a < 1
H e j =
( )
k =
1 1 ae j
2 2 k P P
Y e j = H e j X e j
( ) ( )( )
k=
P 2
43
( ) ( )
x [n ] =
k =
[n kP ]
Hamming window
1 W e j X e j 2 1 2 2 j We k = P 2 k = P 1 2 = W e j k P k = P Y e j =
( )
( ) ( )
( )
( )
( )
44
k =1
k =0
z-1
z-1 z-1
delay property
x [n n 0 ] X ( z )z x [n ] X ( z )
M
n0
z-1
2 M
z-1
z-1
Y (z ) =
k =1
k Y ( z )z
k =0
k X ( z )z k
Causal: Rightsided, the ROC outside the outmost pole Stable: The ROC includes the unit circle Causal and Stable: all poles must fall inside the unit circle (not including zeros)
H (z ) =
Y (z ) = k = 0N X (z ) 1 z k k
k =1
k z k
45
46
Magnitude-Phase Relationship
Minimum phase system:
The z-transform of a system impulse response sequence ( a rational transfer function) has all zeros as well as poles inside the unit cycle Poles and zeros called minimum phase components Maximum phase: all zeros (or poles) outside the unit cycle
All-pass system:
Consist a cascade of factor of the form
1-a * z 1 1 az
1
Characterized by a frequency response with unit (or flat) magnitude for all frequencies
Poles and zeros occur at conjugate reciprocal locations
1-a * z =1 1 1 az
47
( (z )(1 az )
48
FIR Filters
FIR (Finite Impulse Response)
The impulse response of an FIR filter has finite duration Have no denominator in the rational function No feedback in the difference equation H (z )
y [n ] =
h [n
]=
n, 0,
r=0
r x [n r ]
0 n M otherwise
x [n ]
z-1 z-1
y [n ]
0 1 M
M Y (z ) = k z k H (z ) = X (z ) k = 0 Can be implemented with simple a train of delay, multiple, and add operations
z-1
49
H (z ) = 1 + z 1
2 2
( )
j
= 1 + (cos j sin )
Re
2
H e
)= 1 + e
Im
(e j ) = arctan
Re
sin + 1 cos
10 log H e j
( )
50
X (k ) = x [n ] e
n=0 N 1
N 1
2 kn N , j
0 n N 1 0 n N 1
DFT, Analysis
1 x [n ] = X (k ) e N k =0
2 kn N ,
51
, 0 n N 1
2 j 1( N 1) N
Orthogonal
1 1 2 j 11 N 1 e M M 2 j ( N 1)1 N 1 e
52
1 N
x [n
e
n=0
N 1
2 ( k r )n N
1, if k-r = mN = 0 , otherwise
j 2 kn N
]=
N 1 n = 0
1 N
N 1 k = 0
X
j
[k ] e
=
x [n
N 1
]e
2 rn N
N 1 n = 0
j
1 N
2 N
N 1 k = 0
(k
r
X
)n
[k ] e
2 N
(k
)n
1 = X [k ] N k = 0 = X [r ] X
N 1 n = 0
X [k ] = X [r + mN = X [r ]
[k ] =
N 1 n = 0
x [n
]e
2 kn N
53
x [n ]
n=0
N 1
1 = N
N 1 k =0
X (k )
Energy density
54
Fs = 1
sampling rate
x a (t )
Sampling
x s (t )
switch
Discrete-Time Signal
= x a (t )s (t ) = =
[n] (= xa (nT)) x
x a (t ) (t nT
s (t ) =
n =
(t nT )
x[n]
Digital Signal
x a (t )
(t ) =
0 , t 0 = 1
SP- Berlin Chen 56
s(t ) =
n =
(t nT )
(t )dt
-2T -T 0
2T 3T 4T 5T 6T 7T 8T
1
x s (t ) = x a (t )s (t ) = =
a n =
x (t ) (t nT )
a n =
n =
x (nT ) (t nT ) = x[n ] (t nT )
SP- Berlin Chen 57
S ( j
)=
2 T
N
k =
( k
s =
1 X a ( j ) S ( j ) 2 1 X s ( j ) = X a ( j ( k s )) T k =
s
( j ) =
T R s ( j ) = 0
< s / 2 otherwise
X a ( j ) = R s ( j ) X p ( j )
Low-pass filter
1 N < s = 2 T
Q(s N ) > N s > 2N
1 N > s = 2 T
X a ( j ) can' t be recovered from X p ( j )
aliasing distortion
58
x a (t ) = =
n =
x (nT )h(t nT )
a a s
n =
x (nT )sinc (t nT )
59