Post on 14-Dec-2015
Chapter 5 Finite-Length
Discrete Transform
§5.1 Discrete Fourier Transform (DFT)
• DTFT is the Fourier Transform of discrete-time sequence. It is discrete in time domain and its spectrum is periodical, but continue which cannot be processed by computer which could only process digital signals in both sides, that means the signals in both sides must be both discrete and periodical.
§5.1 Discrete Fourier Transform (DFT)
Time domain Frequency domain
Continue aperiodical FT Continue aperiodical
Periodical FST discrete spectrum
Discrete DTFT periodical spectrum
Discrete periodical DFT periodical discrete
Typical DFT PairδT(t) ω0δω0(ω)
T 2T-T-2T
δT(t)
t0 ω0 2ω0- ω0-2ω0
ω0δω0(ω)
0 ω
ω0 = 2π/T
• In DFT, the signals in both sides are discrete, so it is the only transform pair which can be processed by computer. • The signals in both sides are periodical, so the processing could be in one period, which is important because (1) the number of calculation is limited, which is necessary for computer; (2) all of the signal information could be kept in one period, which is necessary for accurate processing.
Make a signal discrete and periodical• The engineering signals are often continue and aperiodical.
If we want to process the signals with DFT, we have to make the signals discrete and periodical.
•Sampling to make the signal discrete•Make the signal periodical:
If x[n] is a limited length N-point sequence, see it as one period of a periodical signal that means extend it to a periodicalIf x[n] is an infinite length sequence, cut-off its tail to make a N-point sequence, then do the periodic extending. The tail cutting-off will introduce distortion. We must develop truncation algorithm to reduce the error, which is windowing.
Make a signal discrete and periodical
x(t) X(jω)
P(jω)
ω0
ω0=2π/Ts
x[nT] X(jω)
q(t)
T
FT
DFT
DTFTQ(jω)
Ω0
…… Ω0= 2π/TQ(jω)
Ω0
…… Ω0= 2π/T
P(t)
Ts
……
§5.1 Discrete Fourier Transform (DFT)
• Definition - The simplest relation between a length-N sequence x[n], defined for 0≤n ≤N-1, and its DTFT X(ej) is obtained by uniformly sampling X(ej) on the -axis between 0≤ ≤2 at k=2k/N , 0≤k≤N-1
• From the definition of the DTFT have
,][)(][1
0
/2
/2
N
n
Nnkj
Nk
j enxeXkX
10 Nk
§5.1 Discrete Fourier Transform (DFT)
• Note: X[k] is also a length-N sequence in the frequency domain
• The sequence X[k] is called the discrete Fourier transform (DFT) of the sequence x[n]
• Using the notation WN=e-j2 /N the DFT is usually expressed as:
10,][][1
0
NkWnxkX
N
n
nkN
§5.1 Discrete Fourier Transform (DFT)
• The inverse discrete Fourier transform (IDFT) is given by
10,][1
][1
0
NnWkXN
nxN
k
knN
• To verify the above expression we multiply both sides of the above equation by WN
ln and sum the result from n = 0 to n=N-1
§5.1 Discrete Fourier Transform (DFT)
resulting in
1
0
1
0
1
0
1N
n
nN
N
k
knN
N
n
nN WWkX
NWnx ][][
1
0
1
0
1 N
n
N
k
nkNWkXN
)(][
1
0
1
0
1 N
k
N
n
nkNWkXN
)(][
§5.1 Discrete Fourier Transform (DFT)
• Making use of the identity
1
0
N
n
nkNW
)( ,,
0N ,rNk for
otherwiser an integer
][][ XWnxN
n
nN
1
0
• Hence
§5.1 Discrete Fourier Transform (DFT)
• Example - Consider the length-N sequence
11001
Nn
n,,
][nx
10 01
0
N
N
n
knN WxWnxkX ][][][
10 Nk
Its N-point DFT is given by
§5.1 Discrete Fourier Transform (DFT)
• Example - Consider the length-N sequence
][ny 11100
1
Nnmmn
mn,,
,
kmN
kmN
N
n
knN WWmyWnykY
][][][
1
010 Nk
• Its N-point DFT is given by
§5.1 Discrete Fourier Transform (DFT)
• Example - Consider the length-N sequence defined for 0 ≤n ≤N-1
10),/2cos(][ NrNrnng
NrnjNrnj eeng /2/2
21
][
rNN
rNN WW
21
Using a trigonometric identity we can write
§5.1 Discrete Fourier Transform (DFT)
• The N-point DFT of g[n] is thus given by
1
0
N
n
knNWngkG ][][
,21 1
0
)(1
0
)(
N
n
nkrN
N
n
nkrN WW
10 Nk
§5.1 Discrete Fourier Transform (DFT)
• Making use of the identity
1
0
N
n
nkNW
)( ,,
0N ,rNk for
otherwiser an integer
otherwise0for2for2
,,/,/
][ rNkNrkN
kG
10 Nk
we get
DFT Computation Using MATLAB
• The functions to compute the DFT and the IDFT are FFT and IFFT
• These functions make use of FFT algorithms which are computationally highly efficient compared to the direct computation
• Programs 5.3(p.238) and 5.5(p.241) illustrate the use of these functions
DFT Computation Using MATLAB
• Example - Program 3_4 can be used to compute the DFT and the DTFT of the sequence
150),16/6cos(][ nnnx
indicates DFT samples
as shown below
0 0.2 0.4 0.6 0.8 10
2
4
6
8
10
Normalized angular frequency
Mag
nitu
de
§5.2 DFT Properties
• Like the DTFT, the DFT also satisfies a number of properties that are useful in signal processing applications
• Some of these properties are essentially identical to those of the DTFT, while some others are somewhat different
• A summary of the DFT properties are given in tables in the following slides
§5.2 DFT Properties
Type of Property length-N sequence N-point DFT
][][1
0
N
mNmnhmg
][][1 1
0
N
mNmkHmG
N
1
0
21
0
2 |][|1
|][|N
k
N
n
kXN
nxParseval’s relation
Modulation g[n]h[n]
G[k]H[k]Circular Convolution
Duality G[n] N[g-kN]
Frequency-shifting WN-kn0g[n] G[k-k0N]
Circular Time-shifting g[n-n0N] WNkn0G[k]
Linearity ag[n]+bh[n] aG[k]+bH[k]
h[n] H[k]g[n] G[k]
§5.3 Circular Shift of a Sequence
• This property is analogous to the time-shifting property of the DTFT , but with a subtle difference
• Consider length-N sequences defined for 0≤n≤N-1• Sample values of such sequences are
equal to zero for values of n < 0 and n≥N
§5.3 Circular Shift of a Sequence
• If x[n] is such a sequence, then for any arbitrary integer n0 , the shifted sequence
x1[n] = x[n – n0]
is no longer defined for the range 0≤n≤N-1• We thus need to define another type of a shift
that will always keep the shifted sequence in the range 0≤n≤N-1
§5.3 Circular Shift of a Sequence
• The desired shift, called the circular shift, is defined using a modulo operation:
][][ Noc nnxnx
],[],[
][nnNx
nnxnx
o
oc
o
onnNnn
0for1for
For n0>0 (right circular shift), the above equation implies
§5.3 Circular Shift of a Sequence
• Illustration of the concept of a circular shift
][nx ]1[ 6nx
]5[ 6 nx
]4[ 6nx
]2[ 6 nx
§5.3 Circular Shift of a Sequence
• As can be seen from the previous figure, a right circular shift by n0 is equivalent to a left circular shift by N-n0 sample periods
• A circular shift by an integer number greater than N is equivalent to a circular shift by n0 N
§5.3 Circular Shift of a Sequence
x[n-1]
x[n]
x[<n-1>N]
n=<4>4=0
§5.4 Circular Convolution
• This operation is analogous to linear convolution, but with a subtle difference
• Consider two length-N sequences, g[n] and h[n], respectively
• Their linear convolution results in a length-(2N-1) sequence yL[n] given by
2201
0
Nnmnhmgny
N
mL ],[][][
§5.4 Circular Convolution
• In computing yL[n] we have assumed that both length-N sequences have been zero-padded to extend their lengths to 2N-1
• The longer form of yL[n] results from the time-reversal of the sequence h[n] and its linear shift to the right
• The first nonzero value of yL[n] is yL[n]=g[0]h[0], and the last nonzero value is
yL[2N-2]=g[N-1]h[N-1]
§5.4 Circular Convolution
• To develop a convolution-like operation resulting in a length-N sequence yC[n], we need to define a circular time-reversal, and then apply a circular time-shift
• Resulting operation, called a circular convolution, is defined by
10],[][][1
0
Nnmnhmgny
N
mNC
§5.4 Circular Convolution
• Since the operation defined involves two length-N sequences, it is often referred to as an N-point circular convolution, denoted as
N N g[n] h[n] = h[n] g[n]
• The circular convolution is commutative, i.e.
Ny[n] = g[n] h[n]
§5.4 Circular Convolution
• Example - Determine the 4-point circular convolution of the two length-4 sequences:
},{]}[{ 1021ng }{]}[{ 1122nh
n3210
1
2 ][ng
n3210
1
2 ][nh
as sketched below
§5.4 Circular Convolution
• The result is a length-4 sequence yC[n] given by
3
04][][]0[
mC mhmgy
]1[]3[]2[]2[]3[]1[]0[]0[ hghghghg 621101221 )()()()(
,][][][][][3
04
mC mnhmgnhngny 4
30 nFrom the above we observe
§5.4 Circular Convolution
• Likewise
3
04]1[][]1[
mC mhmgy
][][][][][][][][ 23320110 hghghghg 711102221 )()()()(
3
04]2[][]2[
mC mhmgy
][][][][][][][][ 33021120 hghghghg
611202211 )()()()(
§5.4 Circular Convolution
• The circular convolution can also be computed using a DFT-based approach
3
04]3[][]3[
mC mhmgy
][][][][][][][][ 03122130 hghghghg
521201211 )()()()(
][nyC
§5.4 Circular Convolution
• Example - Consider the two length-4 sequences repeated below for convenience:
n3210
1
2 ][ng
n3210
1
2 ][nh
4210 /][][][ kjeggkG 4644 32 // ][][ kjkj egeg
3021 232 kee kjkj ,//
The 4-point DFT G[k] of g[n] is given by
§5.4 Circular Convolution
• Therefore
,][ 21212 G,][ jjjG 1211
jjjG 1213][
,][ 41210 G
4210 /][][][ kjehhkH 4644 32 // ][][ kjkj eheh
3022 232 keee kjkjkj ,//
Likewise,
§5.4 Circular Convolution
• Hence, ,][ 611220 H
,][ 011222 H
,][ jjjH 11221
jjjH 11223][
FFT
• Compute N-point DFT:
complex multiple:
complex add:
a complex multiple operation needs 4 real multiple and 2 real add
a complex add needs 2 real add
• Compute N-point FFT
multiple operation:
2N( 1)N N
22log
2NN
N
FFT
For N=1024
DFT needs 1048576 complex multiple operation and 4194304 real multiple operation
FFT needs 5120
FFT/DFT=4.88%
§3.7 The z-Transform
• Definition - For a given sequence g[n],its z-transform G(z) is defined as
n
nzngngZzG ][]}[{)(
§3.10 Inverse z-Transform
• Partial-Fraction Expansion
• Inverse z-Transform via Long Division
Homework
• Read textbook from p.233 to 298
• Problems
5.2, 5.28, 5.34, 5.36, 5.45(a,b), 6.5(a), 6.20