You are on page 1of 19

NSYSU Li Lee Spring 2003

Application#1 : Discrete Fourier Transform

§ Review of z-transform, inverse z-transform, and Fourier series expansion

Consider a sequence of real and/or complex numbers {x(AT ); A = 0, ± 1, ± 2,"}.


The z-transform of {x(AT )} is defined as

X ( z ) := Z [ x(AT )] = ∑ x(AT ) z − A where z ∈ ^. (1)
A =−∞

Remark: The z − transform is defined as a power series, hence, X ( z ) is


meaningful only if the power series in (1) converges. The region of z ∈ ^
where the power series converges is called the region of convergence (ROC) of
the sequence {x(AT )} or of X ( z ) .

b A ; A = 0,1, 2,"
Example : Let x ( AT ) =  , b ∈ ^ . Then
0 ; A < 0
1
NSYSU Li Lee Spring 2003


−A

−1 A1 z
X ( z) = ∑ b z A
= ∑ (bz ) = −1
=
A =0 A =0 1 − bz z −b
provided that | bz −1 | < 1, i.e. | z | > | b |.
( Suppose b > 0 and z = be jθ , θ is free, so | z |= b . Then it can be seen that
A −A − j Aθ
∑ ∞A =0 b z = ∑ A∞=0 e does not converge to a complex number. )

Define a continuous-time signal from the sequence {x(AT )} as



x (t ) := ∑ x(AT ) δ (t − AT ) for all t ∈ (−∞, ∞) .
A =−∞

Applying the Fourier transformation to x (t ) and viewing (1), yields


A =−∞

( ∞
F [ ∑ x(AT ) δ (t − AT )] = ∫−∞ ∑ x(AT ) δ (t − AT ) e − jω t dt
A =−∞
)

|
= ∑ x (AT ) e − jAωT = Z [ x (AT )] z =e jωT = X (e jωT ).
A =−∞

2
NSYSU Li Lee Spring 2003

Definition : Let the ROC of the z − transform X ( z ) := Z [ x(AT )] contain the


unit circle | z |= 1 in ^ . Then quantity X (e jωT ) is called the frequency
spectrum, | X (e jωT ) | called the amplitude spectrum, and (X (e jωT ) called the
phase spectrum of the sequence {x(AT )}, respectively.

Remark: X (e jωT ) is a periodic function of ω with period 2π T . Thus the


spectrum is usually plotted only for − π T ≤ ω ≤ π T . The quantity π T rad/sec
indicates the largest frequency imbedded in the discrete-time signal {x(AT )}.

The determination of {x(AT )} from X ( z ) is called the inverse z − transform


defined as

Z −1[ X ( z )]:= ∫Γ
A −1
2π j v X ( z ) z dz (2)
1

3
NSYSU Li Lee Spring 2003

where v∫ Γ stands for a contour integral over a closed curve Γ which lies
entirely in the ROC of {x(AT )}. By setting Γ := re jωT , a circle with radius r so
as to make Γ in the ROC, after some derivations, we can prove the formula

∫Γ
A −1 −1
x ( AT ) = 2π j v
1
X ( z ) z dz ( which is exactly Z [ X ( z )] ).

When the ROC contains the unit circle, we may choose z = e jωT and obtain
π
x ( AT ) = ∫− X (e jωT )e jAωT dω .
T
T
2π π
(3)
T

Note: Equation (3) is exactly the same one as computing the coefficients
x(AT ); A = 0, ± 1, " in the Fourier series expansion of the periodic function
X (e jωT ) . ( Recall the Fourier series expansion of a periodic function f (λ )
with period p
∞ p


− jAω0λ
f (λ ) = ∑ cA e ; cA = f ( λ ) e j A ω0 λ d λ ω0 = 2π p . )
2
1
p −p with
A =−∞ 2
4
NSYSU Li Lee Spring 2003

§ Discrete Fourier Transform ( DFT )


Recall the formula for frequency spectrum X (e jωT ) of a sequence {x(AT )}

jωT
X (e ) = ∑ x(AT ) e − jAωT . (4)
A =−∞

In order to compute (4) numerically, the infinite sum must be truncated down to
a sum of finite number, say N , of terms. Thus X (e jωT ) can be approximated by
N −1
Xˆ (e jωT ) = ∑ x(AT ) e − jAωT . (5)
A =0

Practically, the plot of Xˆ (e jωT ) can be drawn approximately by a finite number,


say again N , of points of ωT in [0, 2π ] . Assume the N points are equally
spaced in [0, 2π ] , i.e. computing Xˆ (e jωT ) at ω = 2π ⋅ k rad / sec for
T N
k = 0,1,", N − 1. Replacing ωT in (5) by 2π k
N for k = 0,1,", N − 1, we get
j 2π Nk N −1 − jA 2π Nk
ˆ
X k := X (e ) = ∑ xA e for k = 0,1,", N − 1 (6)
A =0
5
NSYSU Li Lee Spring 2003

where, for simplicity, x(AT ) is replaced by xA .


− j 2Nπ
Denoting ξ := e , (6) is rewritten as
N −1
X k = ∑ xA ξ k A for k = 0,1,", N − 1. (7)
A =0

Fact : Denote w := ξ −1 . Then


N −1
xA = 1
N k∑
X k wAk for A = 0,1,", N − 1. (8)
=0

Proof: By (7), 1
N k∑
=0
N −1
Xkw Ak
= 1
N k∑
=0
(
N −1 N −1
)
∑ xm ξ
m =0
mk
ξ − Ak
= 1
N −1

N m∑
=0
xm ( N −1
∑ξ
k =0
( m− A ) k
)
 
 x ( 1) +
N −1 N −1  1 − ξ ( m−A ) N
  = xA
1
= ∑ ∑ xm 
ξ
N A ( m−A )
 k =0 m =0
 1 −  
 m≠A

because
1 − ξ ( m−A ) N = 1 − e − j 2π ( m−A ) = 0; for m = 0," , A − 1, A + 1," , N − 1. …

6
NSYSU Li Lee Spring 2003

Remark: Viewing from (6) or (7), the sequence { X k } can be considered as the
frequency-domain description of the time-domain sequence {xA } = {x(AT )} and

the subscript k indicates the frequency at NT k rad / sec . Therefore, we may use
(7) to define the so-called DFT of {xA }, while (8) formulates the inverse DFT
(or IDFT) of { X k }.

Obviously, (7) can be expressed in a matrix form as follows

 X0   ξ 0⋅0 ξ 0⋅1 " ξ 0⋅( N −1)   x0 


 X   1⋅0 
ξ ξ 11⋅
" ξ 1⋅( N −1)   x1 
X :=  1  =  := FN x. ()
 #   # # % #  # 
X   ( N −1)⋅0 ( N −1)⋅( N −1)   
 N −1   ξ ξ ( N −1)⋅1
" ξ x
  N −1 

− j 2Nπ
Since ξ := e , ξ N = 1,
7
NSYSU Li Lee Spring 2003

1 1 1 " 1 
1 ξ ξ 2
" ξ N −1 
 
FN = 1 ξ 2 ξ4 " ξ 
N −2
called the Fourier matrix.
 
# # # % # 
1 ξ N −1 ξ N − 2 " ξ 

Notice that FN is an N × N Vandermonde matrix V (α1 , ",α N ) (see Leon p.
67, 98 and Hsieh p. 6-72) with α i = ξ i −1. Since ξ i −1 , i = 1,", N are N roots of
equation z N − 1 = 0 , they are distinct. Hence FN is nonsingular. In fact, due to
the definition of ξ , matrix FN can be normalized into a unitary matrix.

Fact : (i) 1 FN is a unitary matrix


N

(ii) FN −1 = 1
N
FN with ( FN )ij = ( FN )ij .
Proof: Obviously, FN ∈ ^ N × N with FN T = FN .
For (i): let fi be the ith column of FN . Then
8
NSYSU Li Lee Spring 2003
N −1 N −1  N if s = r
〈f r , f s 〉 = ∑ ξ ξ = ∑ ξ
jr js j ( s −r )
=
j =0 j =0  0 if s ≠ r.
Hence all columns of FN are mutually orthogonal with 2-norm being equal to N.
This shows that 1N FN is a unitary matrix.
For (ii): it can be proved easily from the definition of unitary matrices
( 1
N
FN ) −1 = ( 1
N
FN )∗ = 1
N
( FN T ) = 1
N
FN . …

In view of w = ξ −1 = ξ ,
1 1 1 " 1 
1 w w2 " w N −1 
1  N −2  .
FN −1 = 1 w 2
w 4
" w 
N # # # % # 

 1 w N −1 w N − 2 " w 

Hence (8) can be rewritten as, in view of the notatioins of x and X in (),
x = FN −1 X .
9
NSYSU Li Lee Spring 2003

Definition : Given a vector z = ( z0 z1 " z N −1 )T in \ N or ^ N , the product


FN z is called the discrete Fourier transform (DFT) of z and the product FN −1 z
is called the inverse discrete Fourier transform (IDFT) of z . The k th entries in
FN z and FN −1 z are given by
N −1 N −1
( FN z )k = ∑ z j ξ jk
and ( FN −1
z )k = 1 jk
∑ zj w .
j =0 N j =0

Example: (signal processing) Following figure shows a sound signal recorded


for 1 second.

τ
10
NSYSU Li Lee Spring 2003

It seems reasonable to expect the signal to be of the form


y (τ ) = ∑ k (α k cos 2π f kτ + β k sin2π g kτ ) + noise . (9)
The DFT technique will help to find amplitudes α k and β k , and frequency
components f k and g k .
Assume f k and g k are integers. Denote
x(τ ) = ∑ k (α k cos 2π f kτ + β k sin2π g kτ ) . (10)
Let x be the vector containing the values of x(τ ) at N equally spaced points
T
from τ = 0 to τ = 1, i.e. x =  x(0) x( ) " x(
1
N
N −1
N )  . So

1 1 1 " 1   x(0) 
1 ξ N −1     1 
ξ2 " ξ x( N )
1
 
    N −1 ξ A
FN x = 1 ξ 2 ξ 4 " ξ  ⋅  x( N )  = ∑ x( N ) 
N −2 2 A
. (11)
A =0 #
 ( N −1) A 
# # # % #   # 
1 ξ N −1 ξ N − 2   N −1   ξ 
 " ξ   N  x ( )

Substituting τ = into (10) and knowing that cosθ = e , sin θ = − j e



+e − jθ jθ
−e− jθ
A
N 2 2 ,
11
NSYSU Li Lee Spring 2003
− j 2Nπ
and ξ := e , we can derive that

x ( ) = ∑ k α ⋅ (e
A
N ( 1
k 2
j 2Nπ f k A
+e
− j 2Nπ f k A
) + β k (− )(e
j
2
j 2Nπ g k A
−e
− j 2Nπ g k A
) )
1
= ∑ α
2 k k
(ξ − fk A
+ξ fk A
) − j ∑ k β k (ξ − gk A + ξ gk A ) .

Substituting this into (11) for A = 0, 1," , N − 1, it can be rewritten as

 ∑ AN=−01 e j 2Nπ Afk   ∑ AN=−01 e − j N Afk  


 N −1 j 2π A ( f k −1)   N −1 − j 2Nπ A ( fk −1)  


FN x = 1 ⋅ ∑ α k  ∑ A =0 e  +  ∑ A =0 e 
N

2 k  #   # 
 N −1 j 2Nπ A ( f k +1)   N −1 − j 2Nπ A ( fk +1)  
 ∑ A =0 e   ∑ A =0 e  

 ∑ N −1 e j 2Nπ Agk   ∑ N −1 e − j 2Nπ Agk  


 A =0 j 2π A ( gk −1)   A =0 − j 2π A ( gk −1)  
j   ∑ AN=−01 e N   ∑ AN=−01 e N 
− ⋅ ∑ βk −
2 k  #   # 
 N −1 j 2Nπ A ( gk +1)   N −1 − j 2Nπ A ( gk +1)  
 ∑ A =0 e   ∑ A =0 e  
12
NSYSU Li Lee Spring 2003

=
1
2 k (
⋅ ∑ α k N (e fk + e N − fk ) − j ∑ β k N (e gk − e N − gk )
k
) (12)

where f k and g k take values from {0,1,", N − 1} and e fk and e gk are the
f k th and g k th conventional standard basis vectors, respectively. Hence (12)
becomes, after dividing 2 N
2
FN x = ∑α k (e fk + e N − fk ) + j ∑ β k (−e gk + e N − gk ) . (13)
N k k

T
Now set N = 512 then x =  x(0) x( ) " x( )  , where x(i )' s are the
1
512
511
512
vertical values of the i ' s points taken from the horizontal axis of the figure at
the bottom of page 10. Compute
2 2 2
N
FN x = N
ℜe( FN x) + j N ℑm( FN x) =: a + jb .

The next two figures show only the first half entries in real 512 × 1 vectors
a and jb , respectively.
13
NSYSU Li Lee Spring 2003

Since only the first half of 512 sampling points are plotted, the figures show the
part of (13) : ( 2
N
FN x) N 2 = ∑ α k e fk − j ∑ β k e gk
k k

with k = 1, α k = 1, β k = 2, f k = 80, and g k = 50 . So from (9), we have


y (τ ) = cos 2π (80τ ) + 2sin 2π (50τ ) + noise
for τ = 0, N1 ," , N −1
N with N = 512 .
14
NSYSU Li Lee Spring 2003

To conclude this topic, the relationship between DFT and the “convolution”
operation is introduced.

Definition : Let x = ( x0 x1 " xN −1 )T and y = ( y0 y1 " y N −1 )T . The entry-by-


entry product of x and y is defined as

x × y := ( x0 y0 x1 y1 " xN −1 y N −1 )T . (14)
The convolution of x and y is defined as
 x0 y0 
 
 x y
0 1 + x y
1 0 
 # 
 
x ∗ y :=  x0 yA + x1 yA −1 +"+ xA y0  (15)
 # 
 
 xN −2 y N −1 + xN −1 yN −2 
 xN −1 y N −1 
 
 0  2 N ×1

15
NSYSU Li Lee Spring 2003

Remarks :
™ The 0 in the last entry is for convenience only. By the addition of it, the size
of x ∗ y becomes twice of the size of x and y .
™ A visual way to form x ∗ y is to “slide” the reversal of y against x , and
then sum the resulting products as describe below.
x0 x1 " xN −1
y N −1 " y1 y0
y N −1 " y1 y0
%
y N −1 " y1 y0
Hence by augmenting x and y to 2N × 1 vectors x and y defined as below
x := ( x0 x1 " x2 N −1 )T = ( x0 x1 " xN −1 0 " 0)T
(16)
y := ( y 0 y1 " y 2 N −1 ) = ( y0 y1 " y N −1 0 " 0)
T T

the A th entry in x ∗ y is
A A
(x ∗ y )A = ∑ xk y A − k = ∑ xA − k y k for A = 0, 1, ", 2 N − 1.
k =0 k =0
16
NSYSU Li Lee Spring 2003

The convolution operation is a natural occurrence in a variety of situations, e.g.


the polynomial multiplication given in the next example.

Example : (polynomial multiplication) Let x(t ) = ∑ AN=−01 xAt A , y (t ) = ∑ AN=−01 yA t A


and z (t ) := x(t ) ⋅ y (t ) = ∑ A2=( 0N −1) zAt A . The coefficient zA ' s can be obtained from
xA ' s and yA ' s by convolution operation. Suppose x = ( x0 x1 " xN −1 )T ,
y = ( y0 y1 " y N −1 )T , and z = ( z0 z1 " z2 N − 2 )T , then it is easy to see that
zA = ( x ∗ y ) A for A = 0, 1, ", 2 N − 2 . (17)
Therefore, polynomial multiplication and convolution are equivalent operations.

Convolution Theorem : Let x = ( x0 x1 " xN −1 )T , y = ( y0 y1 " y N −1 )T , x and


y are as defined in (16). Then
F2 N (x ∗ y ) = ( F2 N x ) × ( F2 N y ) ; x ∗ y = F2 N −1 ( ( F2 N x ) × ( F2 N y ) ) (18)

where “× ” and “∗” are defined in (14) and (15), respectively.


Proof: Since the two formulas in (18) are equivalent, we show the first formula
17
NSYSU Li Lee Spring 2003

only, i.e. for A = 0,1, ", 2 N − 1 we should prove that


( F2 N (x ∗ y ) )A = ( ( F2 N x ) × ( F2 N y ) )A = ( F2 N x )A ⋅ ( F2 N y )A . (19)
It is easy to see that
N −1 N −1
( F2 N x )A = ∑
k =0
xkξ Ak
and ( F2 N y )A = ∑
k =0
y k ξ Ak .

Setting t := ξ A , both ( F2 N x )A and ( F2 N y )A can be expressed as polynomials


N −1 N −1
( F2 N x )A =
k =0
∑ xk t k
and ( F2 N y )A = ∑
k =0
yk t k

Hence the product ( F2 N x )A ⋅ ( F2 N y )A in (19) is a polynomial of degree 2N-2, in


view of (17) and knowing that the last entry in (14) is 0, we get
( F2 N x )A ⋅ ( F2 N y ) A = (1 t t 2 " t 2 N − 2 t 2 N −1 )(x ∗ y ) . (20)

After replacing t := ξ A back, we find that the above 1× 2N vector in t is


actually the A th row of matrix F2 N . Thus (18) is proved. …

18
NSYSU Li Lee Spring 2003

Fact : The formulas in (18) of the Convolution Theorem can be rewritten in


terms of the N -dimensional Fourier matrix FN as follows
FN (x : y ) = ( FN x) × ( FN y ) ; x : y = FN −1 ( ( FN x) × ( FN y ) ) (21)
where x : y := ( I N I N ) ⋅ ( x ∗ y ) .
Proof: Similarly, only the first formula in (21) is proved.
Obviously, ( F2 N x )A = ( FN x)A and ( F2 N y )A = ( FN y )A for A = 0, 1," , N − 1, thus,
by (19), we need only to show that
( F2 N (x ∗ y ) )A = ( FN (x : y ) )A for A = 0, 1, ", N − 1.
From (19) and (20) and knowing that t N = (ξ N )A = (1)A = 1, we get
( F2 N (x ∗ y ) )A = (1 t " t N −1 t N t N +1 " t 2 N −1 ) (x ∗ y )
= (1 t " t N −1 1 t " t N −1 ) (x ∗ y )
= (1 t " t N −1 ) ( I N I N ) (x ∗ y )
= (1 t " t N −1 ) (x : y )
= ( FN (x : y ) )A
The term x : y is exactly the convolution defined in p. 20, Prob. 49 of textbook.
19

You might also like