Documente Academic
Documente Profesional
Documente Cultură
x t in time-domain
x t sin 2 500
f t t 2 randn
x t in frequency-domain
1
f t Fn e jn0t , 0
Fn 2T f t e jn0t dt
T
T 2
n
f (t )
Fn
L
0
2 2
Time-domain
Frequency-domain
X ( j ) x ( t )e jt dt
1
x( t )
2
A x (t )
X ( j )e jt d
X ( j)
Time-domain
Frequency-domain
j
j n
X
(
e
)
x
n
e
x n 1 X (e j )e j n d
X (e
j ( 2 M )
x n e
j ( 2 M ) n
x n e
j n j 2 nM
x n e
j n
X (e j )
x ( n)
A
n
N 2
N 2
Time-domain
Frequency-domain
4) Conclusion
1 Sampling in time domain brings periodicity in frequency
domain.
2 Sampling in frequency domain brings periodicity in time
domain.
Time domain
Frequency domain
Transform
Continuous periodic
Discrete nonperiodic
Fourier series
Continuous nonperiodic
Continuous nonperiodic
Fourier Transform
Continuous periodic
Sequences Fourier
Discrete nonperiodic
Discrete periodic
Discrete periodic
Transform
Discrete Fourier Series
03/04/16
10
1
%
x n
N
N 1
jk n
%
X
k
e
2-1
k 0
2
where 1
% n 's fundamental angular frequency
, x
N
2
k
k, %
x n 's kth harmonic angular frequency
N
Attention: Fourier Series for discrete-time signal with period N requires
only N harmonically related complex exponentials.
Qe
03/04/16
2
kn
N
2
k (n N )
N
:that is k N k
11
X% k computation
computation
x% n e
n 0
N
1
N
2
kn
N
N 1 N 1
X% r e
n 0 r 0
N 1
e
n 0
2
r k n
N
N 1 N 1
X% r e
-j
2
kn
N
, and summing
2
2
rn j
kn
N
N
n 0 r 0
2
r k n
N
1
%
X r
r 0
N
N 1
2
r k N
N
1 1 e
2
j
r k
N
N
1 e
N 1
N 1
2
r k n
N
n 0
1r k mN
0otherwise
X% r X% k x% n e
2
kn
N
n0
03/04/16
12
X% k DFS [ x% n ] x% n e
2
kn
N
n 0
1
%
x n IDFS [ X% k ]
N
N 1
X% k e
k 0
N 1
x% n W
n0
2
kn
N
kn
N
WN e
2
N
N 1
kn
%
X
k
W
N
n0
Attention:
2
N 1
N 1
j
( k mN ) n
j
kn
~
~
~
~
N
N
X ( k mN ) x ( n)e
x ( n)e
X (k )
n0
n 0
03/04/16
13
2) Properties of DFS
Suppose
DFS[ x%(n)] X%( k ) DFS[ %
y (n)] Y%( k )
1 Linear
~
~
~
~
DFS[ax ( n) by ( n)] aX ( k ) bY ( k )
2 Sequence Shift
Then
N m 1
r m
km
N
W
03/04/16
x%(r )WNk r m WN km
N m 1
r m
x%(r )WNkr
N 1
kr
km %
%
%
x
(
r
)
W
DFS
[
x
(
n
m
)]
W
X (k )
N
N
r 0
14
2) Properties of DFS
Suppose
DFS[ x%( n)] X%( k ) DFS[ %
y ( n)] Y%( k )
3 Periodic Convolution
If
F%(k
) X%(k )Y%(k )
then
N 1
N 1
m0
m 0
%
f (n) IDFS [ F%(k )] x%(m) %
y (n m) %
y (m) x%(n m)
Periodic convolution
Compared with linear convolution, periodic convolutions main
difference is:
03/04/16
15
Periodic convolution
N 1
%
f (n) x%(m) %
y ( n m)
m 0
N 1
%
f (0) x%(m) %
y (0 m) 1
m 0
N 1
%
f (1) x%(m) %
y (1 m) 0
m 0
N 1
%
f (2) x%(m) %
y (2 m) 1
m0
03/04/16
16
Symmetry:
Symmetry
%
If
f ( n) %
x ( n) %
y (n) then
1
%
%
F (k ) DFS [ f (n)]
N
N 1
1
%
%
X (l )Y (k l )
N
l 0
N 1
Y%(l )X%(k l )
l 0
03/04/16
17
18
03/04/16
19
HINTS
HINTS
Periodic sequence is infinite length.
but only N sequence values contain information.
Periodic sequence finite length sequence.
Relationship between these sequences?
Infinite Finite
Periodic Nonperiodic
03/04/16
20
Finite-duration Sequence
Periodic Sequence
Main period
03/04/16
21
x%(n)
otherwise
x(n rN ) x n
x 5 12 x 5
x 20 12 x 8
x 1 12 x 11
x(11)
03/04/16
0 n N 1
x(0)
x(1)
x(10)
x(2)
x(3)
x(9)
x(8)
x(7)
x(4)
x(6)
x(5)
N 12
22
X k
DFT
x n :
DFS[x n N ]
Periodical
copies
RN (k )
23
N 1
then
X (k ) x(n)WNkn 0 k N 1
n 0
1
then
x ( n)
N
N 1
kn
X
(
k
)
W
0 n N 1
N
k 0
Inverse Transform
X ( k ) N 1 x ( n)W kn
N 0 k N 1
DFT
DFTTransform
Transform
Pair
Pair
n0
1 N 1
x( n)
X ( k )W N kn
0 n N 1
N k 0
24
Property of DFT
SupposeX ( k ) DFT [ x( n)]Y ( k ) DFT [ y ( n)]
(1) Linearity
DFT [ax (n) by (n)] aX (k ) bY (k )a, b are coefficient
03/04/16
Periodic
Copies
x%(n)
Shift
x%(n m)
Extract
Main period
xm (n)
x((n m)) N
25
x2(n)
N -3
27
3 Parsevals Theorem
N 1
1 N 1
x
(
n
)
y
(
n
)
X
(
k
)
Y
(k )
N k 0
n 0
When
x ( n) y ( n)
N 1
1
|
x
(
n
)
|
N
n 0
2
N 1
2
|
X
(
k
)
|
k 0
Conservation
Conservationof
ofenergy
energyin
intime
timedomain
domainand
andfrequency
frequencydomain.
domain.
N 1
1 N 1
N 1
28
4 Circular convolution
Suppose F ( k ) X (k )Y ( k )
N 1
N 1
Circular
convolution
03/04/16
29
f 0
f 1
f 2
%
y 0 - m RN n
%
y 1 - m RN n
%
y 2 - m RN n
f(n)
03/04/16
Circular convolution
Periodic convolution
30
DFT [ x(n)] X (k )
DFT [ y (n)] Y (k )
IDFT [ X (k )Y (k )] x(n) y (n)
Circular convolution can be used to
compute two sequences linear
convolution.
03/04/16
31
n0
nN
N
QW
j 2N nN
nk
N
N 1
[ x(n)WNn ( k ) ] , 0 k N 1
n 0
e j 2 n 1
N 1
n 0
nN
N
N 1
] [ x(n)WNn ( N k ) ]
n(k )
N
n0
X ( N k ), 0 k N 1
Attention X(k) has only k valid values 0k N-1
32
03/04/16
33
X e ( N k ) [ X ( N k ) X ( N N k )] [ X ( N k ) X (k )]
2
2
thenX e (k ) X e ( N k )
thenX o (k ) X o ( N k )
Xo(k) is odd components of X(k), Xo(k) is conjugate asymmetric;
that is real part is opposite, imaginary part is equal.
03/04/16
34
03/04/16
conjugate
conjugateasymmetric;
asymmetric;
real
realpart
partis
isopposite,
opposite,imaginary
imaginary
part
partisisequal.
equal.
35
Conclusion
1 DFT of sequences real part is corresponding to X(k)s conjugate symmetric part.
2 DFT of sequences imaginary part is corresponding to X(k)s conjugate asymmetric
part.
3 Suppose x(n) is a real sequence, that is x(n)=xr(n),
then X(k) only has conjugate symmetric part, that is X(k) =Xe(k)
satisfy: X (k ) X ( N k )
N
N
X (0) X (0) X ( ) X ( )
2
2
So: If we get half X(k), we can acquire all X(k) using symmetric
properties.
03/04/16
36
X (k ) x(n)WNkn
0 k N 1
n 0
X 0
X 1
x 0
M
X N 1
0 k N 1
W N0
0
N
1
N
W N0
W K
W
x 1 K x N 1 M
O
W N0 W NN-1 K
DFT Matrix
03/04/16
W N0
(N-1)(N-1)
WN
N-1
N
0 n N 1
37
function [Xk]=dft(xn)
N=length(xn);
n=0:N-1;
k=0:N-1;
%length of sequence
% time sample
WN=exp(-j*2*pi/N);
nk=n'*k;
WNnk=WN.^nk;
Xk=xn*WNnk;
%compute DFT
03/04/16
38
Fs = 400;
T = 1/Fs;
L = 1000;
t = (0:L-1)*T;
x = 0.7*sin(2*pi*50*t);
plot(1000*t(1:200),x(1:200));
Y = dft(x)/L;
f = Fs/2*linspace(0,1,L/2+1);
stem(f,2*abs(Y(1:L/2+1)));
03/04/16
39
03/04/16
40
Fourier Transform
X a j
Sequences Fourier
Transform
X e jw
DFS
X% k
xa ( t )
Sampling
Discretetime
x n xa ( nT )
Periodic Copies
x n N
Extract One period
x n
03/04/16
X k
41
Three
Three different
different frequency-domain
frequency-domain representations
representations of
of aa finitefinitelength
length discrete-time
discrete-time sequence
sequence
1. z-Transform
X (z)
N 1
x(n)z nx(n)
n 0
1
2
X ( z )z
n 1
dz
X (e )
jw
N 1
x(n)e
1
x ( n )
2
jwn
n 0
X (e
jw
)e
jwn
dw
z e jw
X ( k ) x ( n)e
2
kn
N
W Nkn
0 k N 1,
n 0
1
x ( n)
N
03/04/16
N 1
X (k )e
2
kn
N
0 n N 1
k 0
42
jIm[z]
X ( k ) X ( z ) |z W k
W N2
W N1
W N0
W N ( N 1 )
W N ( N 2 )
z W N k e
2
k
N
N 1
X ( z ) x ( n) z n
Re[z]
X(k )
n0
N 1
kn
x
(
n
)
W
0 k N 1
N
n 0
N 1
X (e jw ) x(n)e jwn
n 0
X ( k ) X (e
03/04/16
2
k
N
43
44
X (k ) X (e j ) or X ( z )
How to realize? Prerequisite for implementation?
What is interpolation formula?
1 Sampling
x(n)s z-transform:
X (z)
n
x
(
n
)
z
X N (k ) X ( z ) |z W k
N
z WN k e
03/04/16
2
k
N
x(n)WNkn
xN n IDFT X N k
xN n x%N n RN (n)
=
x n
x(n rN )R
03/04/16
x~ N ( n) .
46
2 Interpolation formula
XN k
x n , n 1...M
M 1
XN k
X ( z ) x ( n) z n
n0
M 1
X (e ) x n e jn
j
n 0
N 1
X ( z ) X N (k ) k ( z ),
k 0
2
X (e ) X N ( k )
N
k 0
j
03/04/16
N 1
1 1 zN
k ( z)
N 1 WNk z 1
1 sin(N / 2)
e
k , ( )
N sin( / 2)
N 1
47
build
the
relationship
between
two
sequences
circular
03/04/16
48
M 1
Circular Convolution
x(n), 0 n M 1
h(n), 0 n N 1
'
x ( n)
and h (n)
0, M n L 1
0, N n L 1
'
49
It can be proved that that the relationship between yl (n) and yc (n) is:
yc ( n )
yl ( n qL)RL n
yc (n) x(n)
03/04/16
h(n)
yl (n) x n h n
50
h n , N 3
yl (n)
x n , M 5
L5
L6
L7
L8
03/04/16
51
Process
x ( n), 0 n M 1
M n L 1
0,
let x ' ( n)
h( n), 0 n N 1
N n L 1
0,
h ' (n)
Zero padding
x (n)
DFT
X(k)
X(k)H(k)
Zero padding
h(n)
DFT
IDFT
x(n) h(n)
x(n) h(n)
H(k)
Conclusion:
We can compute linear convolution using circular convolution if
length of DFTs satisfy L N M -1
03/04/16
52
Problems:
In practical application: y(n)=x(n)*h(n),
suppose x(n)s length is M h(n) length is N
Usually, M>>N, If L=N+M-1, then:
For short sequence: many zeros padded into h(n).
For long sequence: compute after all sequence input.
Difficulties Large memory, long computation time,
so real-time property can not be satisfied.
Solution: decomposition computation on long sequence.
After
After FFT
FFT algorithm,
algorithm, overlap-add
overlap-add method
method and
and over-lap
over-lap save
save
method
method will
will be
be learned.
learned.
53
x n xa ( nT )
X a j
X k
DFT
N 1
x n W
n0
nk
N
54
Engineering application
Filter high frequency component with small amplitude.
Cut away signal component with small amplitude.
In below sections, all signals xa(t) are supposed to be finite-length,
band-limited signals after filtering and extracting.
03/04/16
55
Windowing
xa ( t ) x n x n x n w n
1 2
Xe
X e
Convolution
(1) Aliasing
X e *W e
j
X a j
X k
X e j
2
k
N
56
Sampling
x n xa ( nT )
X k
DFT
N 1
x n W
n 0
nk
N
03/04/16
57
xa ( t ) x n x n x n w n
1 2
Xe
X e
X e *W e
Convolution
X a j
X k
X e j
2
k
N
03/04/16
58
Leakage
Disturbance
59
x n
X a j
DFT
3 X k
X e j
xa ( t )
X e j
2
k
N
60
X e j
61
Tp NT
ffs
11
11
s
FF
NN NT
NT TTp
03/04/16
62
Tp NT
ffs
11
11
s
FF
NN NT
NT TTp
03/04/16
63
03/04/16
64
X (k ) x(n)WNkn
0 k N 1
n 0
X 0
X 1
x 0
M
X N 1
0 k N 1
W N0
0
N
1
N
W N0
W K
W
x 1 K x N 1 M
O
W N0 W NN-1 K
DFT Matrix
03/04/16
W N0
(N-1)(N-1)
WN
N-1
N
0 n N 1
65
function [Xk]=dft(xn)
N=length(xn);
n=0:N-1;
k=0:N-1;
% length of sequence
% time sample
WN=exp(-j*2*pi/N);
nk=n'*k;
WNnk=WN.^nk;
Xk=xn*WNnk;
%compute DFT
03/04/16
66
Fs = 400;
T = 1/Fs;
L = 1000;
t = (0:L-1)*T;
x = 0.7*sin(2*pi*50*t);
plot(1000*t(1:200),x(1:200));
Y = dft(x)/L;
f = Fs/2*linspace(0,1,L/2+1);
stem(f,2*abs(Y(1:L/2+1)));
03/04/16
67
03/04/16
68
Matlab Example #2
f1=2Hz f2=2.05Hz
fs=10Hz
x(n)=sin(2f1n/fs)+ sin(2f2n/fs) N
f
f f 2 f1 0.05 Hz
F 0.05 Hz
11
11
f
ss
FF
NN NT
NT TTpp
fs
N N min 200
F
(1) N=128 x(n) X(k) ?
(2) N=256 x(n) X(k) ?
(3) N=512 x(n) X(k) ?
03/04/16
69
03/04/16
70
x(n) 0<=n<256
150
100
50
03/04/16
71
03/04/16
72
x(n) 0<=n<1024
03/04/16
73
74
HOMEWORK
105 1
106 3,4
107 14
03/04/16
75