Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
2
10
c x [ k ] e j 2 kn / N
cx [ k ] =
1 N
n0 + N 1 n = n0
x [ n ] e j 2 kn / N
X[ k ]e
j 2 kn / N
X[ k ] =
n0 + N 1 n = n0
x[n]e
j 2 kn / N
where X [ k ] is the DFT harmonic function, N is any period of x [ n ] and the notation, means a summation over any range of
k= N
consecutive ks exactly N in length. The main difference between the DTFS and the DFT is the location of the 1/N term. So X [ k ] = N c x [ k ].
11
12
Because the DTFS and DFT are so similar, and because the DFT is so widely used in digital signal processing (DSP), we will concentrate on the DFT realizing we can always form the DTFS from cx [ k ] = X[ k ] / N .
13
14
DFT Example
Find the DFT harmonic function for x n = u n u n 3 5 n using its fundamental period as the representation time. X k =
n= N 4
x n e
j 2 kn / N
k= N
X[ k ]e
j 2 kn / N
so we can find x [ n ]
= u n u n 3 5 n e
n= 0 2
j 2 kn /5
function from x [ n ]? We use the principle of orthogonality like we did with the CTFS except that now the orthogonality is in discrete time instead of continuous time.
= e
n= 0 2
j 2 kn /5
1 e j 6 k /5 e j 3 k /5 e j 3 k /5 e j 3 k /5 = = j k /5 j k /5 1 e j 2 k /5 e j k /5 e e sin 3 k / 5 sin k / 5
= e j 2 kn /5 = e j 2 k /5
n= 0
( (
) = 3e )
j 2 k /5
drcl k / 5,3
)
15
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
16
17
18
Below is a set of complex sinusoids for N = 8. They form a set of basis vectors. Notice that the k = 7 complex sinusoid rotates counterclockwise through 7 cycles but appears to rotate clockwise through one cycle. The k = 7 complex sinusoid is exactly the same as the k = 1 complex sinusoid. This must be true because the DFT is periodic with period N .
where the x H is the complex-conjugate transpose of x. xT y and x H y are the dot product of x and y.
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
19
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
20
21
22
23
24
x[n] =
1 N
k= N
X[ k ]e
j 2 kn / N
Here the beginning point for x [ n ] is taken as n0 = 0 . This is the form of the DFT that is implemented in practically all computer languages.
25
26
DFT Properties
1 From x [ n ] = N
k= N
X[ k ]e
by a linear combination of functions of the form e j 2 kn / N each of which has a period N . Therefore x [ n ] must also be periodic with period (but not necessarily fundamental period) N .
27
28
DFT Properties
DFT Properties
It can be shown (and is in the text) that if x [ n ] is an even X [ k ] is purely imaginary. function, X [ k ] is purely real and if x [ n ] is an odd function
29
30
DFT Pairs
D FT cos ( 2 qn / N ) ( mN / 2 ) ( mN [ k mq ] + mN [ k + mq ]) mN D FT e j 2 n / N mN mN [ k m ] mN D FT sin ( 2 qn / N ) ( jmN / 2 ) ( mN [ k + mq ] mN [ k mq ]) mN D FT N [ n ] m mN [ k ] mN D FT 1 N N [ k ] N D FT N
appears often in discrete-time signal analysis and is given the special name Dirichlet function. That is drcl ( t , N ) = sin ( Nt ) N sin ( t )
( u [ n n ] u [ n n ]) [ n ] e
0 1 N D FT N
D FT sinc ( n / w ) N [ n ] wrect ( wk / N ) N [ k ] N
j k ( n1 + n0 ) / N
31
32
ADFT / AFFT 1 1.5 2.33 3.75 6.2 10.5 18.1 31.9 56.8 102.3
35
36
37
38
F Form
F
Inverse
n =
dF X(F ) = Form
x[n]e
j 2 Fn
Forward x[n] = 1 2
Inverse
( ) x[n]e
n =
jn
F X e j e jn d X e j =
( )
( ) x[n]e
n =
jn
a weighted summation of functions of the form e jn , all of which repeat with every 2 change in . Therefore X e j is always periodic in with period 2 . This also implies that X ( F ) is always periodic in F with period 1.
( )
39
40
DTFT Pairs
We can begin a table of DTFT pairs directly from the definition. (There is a more extensive table in the text.)
F [ n ] 1
e j 1 e j 1 F = , <1 , n u [ n 1] j = , >1 e 1 e j e 1 e j e j sin ( 0 ) e j sin ( 0 ) F F n n sin ( 0 n ) u [ n ] j 2 , < 1 , sin ( 0 n ) u [ n 1] j 2 , >1 j 2 j e 2 e cos ( 0 ) + e 2 e cos ( 0 ) + 2
F n u [ n ] j F n cos ( 0 n ) u [ n ]
Ae
j 2 Fn
= A e j 2 Fn
n =
j 2
j e j e cos ( 0 ) j
2 e cos ( 0 ) +
F , < 1 , n cos ( 0 n ) u [ n 1]
j 2
j e j e cos ( 0 ) j
2 e cos ( 0 ) +
, >1
does not converge. The CTFT of a constant turned out to be an impulse. Since the DTFT must be periodic that cannot the the transform of a constant in discrete time. Instead the transform must be a periodic impulse.
41
42
(F)e
j 2 Fn
dF = A
1/2
(F F )e
0
j 2 Fn
dF = Ae j 2 F0 n
or
F A cos ( 0 n ) A 2 ( 0 ) + 2 ( + 0 )
43
44
u [ n n0 ] u [ n n1 ] e j 2 Fn =
n1 n0 1 m=0
e j 2 Fn
F u [ n n0 ] u [ n n1 ] e j 2 Fn0
Let m = n n0 . Then u [ n n0 ] u [ n n1 ]
F n1 n0 1 m=0
Factor out e j F ( n1 n0 ) from the numerator and e j F from the denominator e j F ( n1 n0 ) e j F ( n1 n0 ) e j F ( n1 n0 ) e j F e j F e j F By the definition of the sine function in terms of complex exponentials
F u [ n n0 ] u [ n n1 ] e j 2 Fn0 F u [ n n0 ] u [ n n1 ]
1 e j 2 F ( n1 n0 ) 1 e j 2 F
j 2 F ( m + n0 )
=e
j 2 Fn0
j 2 Fm
e j F ( n0 + n1 ) sin F ( n1 n0 ) e j F sin ( F )
45
46
sin F ( n1 n0 ) sin ( F )
, n0 + n1 = 1
1 + (1 / 2 )1 ( F ) 1 e j 2 F F sinc ( n / w ) w rect ( wF ) 1 ( F )
F u [ n ] F tri ( n / w ) w drcl2 ( F, w ) F 1 1 ( F )
, , , , , ,
1 F u [ n ] + 1 ( ) 1 e j F sinc ( n / w ) w rect ( w / 2 ) 2 ( )
F tri ( n / w ) w drcl2 ( / 2 , w ) F 1 2 2 ( )
Compare this to the CTFT of a rectangular pulse of width w centered at t = 0. sin ( wf ) f The DTFT is a periodically-repeated sinc function.
F rect ( t / w ) w sinc ( wf ) =
F cos ( 2 F0 n ) (1 / 2 ) 1 ( F F0 ) + 1 ( F + F0 )
F N0 [ n ] (1 / N 0 )1/ N0 ( F )
F sin ( 2 F0 n ) ( j / 2) 1 ( F + F0 ) 1 ( F F0 ) , F u [ n n0 ] u [ n n1 ] F u [ n n0 ] u [ n n1 ]
F cos ( 0 n ) 2 ( 0 ) + 2 ( + 0 )
F N0 [ n ] ( 2 / N 0 ) 2 / N0 ( )
F sin ( 0 n ) j 2 ( + 0 ) 2 ( 0 )
e j 2 F e j F ( n0 + n1 ) e j 2 n0 F e j 2 n1 F = ( n1 n0 ) drcl ( F, n1 n0 ) e 1 e j F
j 2 F
47
48
DTFT Properties
F F x [ n ] + y [ n ] X ( F ) + Y ( F ) , x [ n ] + y [ n ] X ( e j ) + Y ( e j ) F x [ n n0 ] e j 2 Fn0 X ( F ) , F x [ n n0 ] e jn0 X e j F e j0 n x [ n ] X e j (0 )
DTFT Properties
( )
m =
x [ m ] 1 e
F
X(F )
j 2 F
1 X ( 0 )1 ( F ) , 2
F x [ n ] X(F ) ,
F e j 2 F0 n x [ n ] X ( F F0 ) ,
F x [ n ] y [ n ] X ( F ) Y( F ) ,
F x [ n ] y [ n ] X ( F ) Y( F )
see note
( ) + X ( e ) ( ) x [ n ] X(e ) x [ n ] y [ n ] X (e ) Y(e ) x [ n ] y [ n ] (1 / 2 ) X ( e ) Y ( e )
m =
x [ m ] 1 e
F F F j
X e j
j
j0
j see note
F x* [ n ] X* ( F ) ,
F x [ n ] x [ n 1] 1 e j 2 F X ( F ) ,
) x [ n ] x [ n 1] (1 e ) X ( e )
F x* [ n ] X* e j F j j
n =
j 2 Fn
= 1 ( F ) ,
2
n =
e
2
jn
= 2 2 ( ) X e j
(Note:
n =
x[n]
= X ( F ) dF ,
1 T
n =
x[n]
= (1 / 2 )
( )
49
50
DTFT Properties
Find and graph the inverse DTFT of X(F ) = rect ( 50 ( F 1 / 4 )) + rect ( 50 ( F + 1 / 4 )) 1 ( F ) Start with
F sinc ( n / w ) wrect ( wF ) 1 ( F )
DTFT Properties
Frequency shifting the other direction
F e j n /2 (1 / 50 ) sinc ( n / 50 ) rect ( 50 ( F + 1 / 4 )) 1 ( F )
e jx + e jx 2
51
52
DTFT Properties
Time scaling in discrete time is quite different from time scaling in continuous-time. Let z [ n ] = x [ an ]. If a is not an be found for it. If a is an integer greater than one, some values of x [ n ] will not appear in z [ n ] because of decimation and there cannot be a unique relationship between their DTFTs
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
53
DTFT Properties
Time scaling does not work for time compression because of decimation. But it does work for a special type of time expansion. x [ n / m ] , n / m an integer Let z [ n ] = . Then Z ( F ) = X ( mF ) . , otherwise 0 So the time-scaling property of the DTFT is x [ n / m ] , n / m an integer z[n] = , , otherwise 0
F z [ n ] X ( mF ) F or z [ n ] X e jm
54
DTFT Properties
In the time domain, the response of a system is the convolution of the excitation with the impulse response y[n] = x[n] h[n] In the frequency domain the response of a system is the product of the excitation and the frequency response of the system Y e j = X e j H e j
DTFT Properties
Find the signal energy of x [ n ] = (1 / 5 ) sinc ( n /100 ) . The straightforward way of finding signal energy is directly from the definition E x = Ex =
n =
x[n]
.
2
( )
( ) ( )
n =
(1 / 5 ) sinc ( n /100 )
= (1 / 25 ) sinc 2 ( n /100 )
n =
In this case we run into difficulty because we don't know how to sum this series.
55
56
DTFT Properties
We can use Parseval's theorem to find the signal energy from the DTFT of the signal.
F 20rect (100 F ) 1 ( F ) (1 / 5 ) sinc ( n /100 )
Parseval's theorem is
n =
x[n]
= X ( F ) dF
2 1 1/2
1/2
20rect (100 F ) dF
2
E x = 400
1/200
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
57
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
58
dF = 4
59
60
10
x[n]e
j 2 Fn
is defined by X [ k ] = x [ n ] e j 2 kn / N . If the signal x [ n ] is causal and time limited, the summation in the DTFT is over a finite range of n values beginning with 0 and we can set the value of N by letting N 1 be the last value of n needed to cover that finite range. Then X ( F ) = x [ n ] e j 2 Fn . Now let F k / N yielding
n=0 N 1
y [ n ] = 0.8782 cos ( 2 n /12 ) + 1.7914 sin ( 2 n /12 ) y [ n ] = 1.995 cos ( 2 n /12 1.115 )
X ( k / N ) = x [ n ] e j 2 kn / N = X [ k ]
n=0
61
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
62
N 1
= X[ k ]
is the DTFT of x [ n ] at a discrete set of frequencies F = k / N or = 2 k / N . If that resolution in frequency is not sufficient, N can be made larger by augmenting the previous set of x [ n ] values with zeros. That reduces the space between frequency points thereby increasing the resolution. This technique is called zero padding.
and the inverse DFT is defined by x [ n ] = We can approximate the inverse DTFT by x[n]
k=0 N 1 ( k +1) / N
1 N 1 X [ k ] e j 2 kn / N . N k=0
( k +1) / N
k/N
k/N
X ( k / N ) e j 2 Fn dF = X ( k / N )
k=0
N 1
e j 2 Fn dF
x[n] X( k / N )
k=0
N 1
e j 2 ( k +1)n / N e j 2 k / N e j 2 n / N 1 N 1 = X ( k / N ) e j 2 kn / N j 2 n j 2 n k = 0 1 N 1 X ( k / N ) e j 2 kn / N N k=0
64
x [ n ] e j n / N sinc ( n / N )
M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl
63
This is the inverse DFT with X [ k ] = X ( k / N ) . Use this result to find the inverse DTFT of X(F ) = rect ( 50 ( F 1 / 4 )) + rect ( 50 ( F + 1 / 4 )) 1 ( F ) with the inverse DFT.
X = rect(50 * (k / N - 1 / 4)) + rect(50 * (k / N - 3 / 4)) ; % % Compute the approximate inverse DTFT and center the function on n = 0
xa = real(fftshift(ifft(X))) ;
n = [-N / 2 : N / 2 - 1]' ; % % Vector of discrete times for plotting
65
66
11
67
68
Continuous Frequency
F x ( t ) y ( t ) X ( f ) Y( f )
FS F x [ n ] y [ n ] Y[ k ] X [ k ] x [ n ] y [ n ] X ( F ) Y( F )
x (t )
T0 2
dt =
k =
X[ k ]
x (t )
dt =
2
X( f )
1
df
Continuous Frequency x ( t ) y ( t ) X ( f ) Y( f )
F
n= N
x[n]
1 = N
k= N
X[ k ]
n =
x[n]
= X ( F ) dF
2
FS F x [ n ] y [ n ] N 0 Y[ k ] X [ k ] x [ n ] y [ n ] X ( F ) Y( F )
69
70
Continuous Frequency
F x [ n n0 ] X e j e jn0 F x ( t t 0 ) X ( j ) e j t0
( )
Continuous Frequency
F x ( t ) e+ j 0t X j ( 0 ) F x [ n ] e+ j0 n X e j (0 )
71
72
12