DFS & DFT
Transcript of DFS & DFT
-
8/7/2019 DFS & DFT
1/15
Chapter 6
Discrete fourier series and Discrete fourier transform
In the last chapter we studied fourier transform representation of aperiodic sig-nal. Now we consider periodic and finite duration sequences.
Discrete fourier series Representation if a periodic signal
Suppose that x[n] is a periodic signal with period N, that is
x[n + N] =
x[n]
As is continues time periodic signal, we would like to represent x[n] in terms ofdiscrete time complex exponential with period N. These signals are given byej2N
kn, k = 0, 1, 2,... (6.1)
All these signals have frequencies is that are multiples of the some fundamentalfrequency, 2
N, and thus harmonically related.
These are two important distinction between continuous time and discrete timecomplex exponential. The first one is that harmonically related continuous timecomplex exponential ej0kt are all distinct for different values ofk, while thereare only Ndifferent signals in the set.The reason for this is that discrete time complex exponentials which differ infrequency by integer multiple of 2 are identical. Thus
{ej 2N kn} = {ej 2N (k+N)n}
So if two values ofk differ by multiple ofN, they represent the same signal.Another difference between continuous time and discrete time complex expo-nential is that {ej0kt} for different k have period 20|k| , which changes with k.
In discrete time exponential, ifk and Nare relative prime than the period is Nand not N/k. Thus ifNis a prime number, all the complex exponentials givenby (6.1) will have period N.In a manner analogous to the continuous time, we represent the periodic signalx[n] as
x[n] =
1
N
N1
k=0 X[k]ej
2Nkn (6.2)
where X[k] = N1n0
x[n]ej 2N kn (6.3)In equation (6.2) and (6.3) we can sum over any consecutive Nvalues. Theequation (6.2) is synthesis equation and equation (6.3) is analysis equation.Some people use the faction 1/Nin analysis equation. From (6.3) we can seeeasily that x[k] = x[k + N]
1
-
8/7/2019 DFS & DFT
2/15
Thus discrete Fourier series coefficients are also periodic with the same period N.
Example 1:
{x[n]} = {cos 45
},
x[n] = 12
(ej25.2 + ej
25.2)
So, X[2] = 52
and X[2] = 52 , since the signal is periodic with period 5, coeffi-cients are also periodic with period 5, and x[k], 1 k 1.FIGURENow we show that substituting equation (6.3) into (6.2) we indeed get x[n].
N1
k=0 X[k]ej2Nkn =
N1
k=01
N
N1
m=0 x[m]ej2Nkm ej
2Nkn
interchanging the order of summation we get
=N1m=0
x[m] 1N
N1k=0
ej2N (nm)k (6.4)
Now the sum
1
N
N1k=0
ej2N (nm)k = 1 ifn m multiple ofN
and for (n m) not a multiple ofNthis is a geometric series, so sum is
1
N
1 ej
2N(mn)N
1 ej2N(mn)
= 0
As m varies from 0 to N 1, we have only one value ofm namely m = n, forwhich the inner sum if non-zero. So we set the RHS of (6.4) as x[n].Properties of Discrete-Time Fourier Series
Here we use the notation similar to last chapter. Let {
x[n]} be periodic with
period Nand discrete Fourier series coefficients be {X[k]} then the write
{ X[n]} X[k]where LHS represents the signal and RHS its DFS coefficients
1. Periodicity DFS coefficients:
As we have noted earlier that DFS Coefficients { X[k]} are periodic with periodN.
2
-
8/7/2019 DFS & DFT
3/15
2. Linearity of DFS:
If{x[n]} { X[k]}{y[n]} {Y[k]}
If both the signals are periodic with same period Nthen
A{x[n]} + B{y[n]} A{ X[k]} + B{Y[k]}3. Shift of a sequence:
{x[n m]} {ej 2N mk X[k]} (6.5){ej
2Nln
x[n]} {
X[k l]} (6.6)
To prove the first equation we use equation (6.3). The DFS coefficients aregiven by
N1n=0
x[n m]ej 2N knlet n m = l, we get
=N1mlm
x[l]ej 2N k(m+l)since x[l] is periodic we can use any N consecutive values, then
= ej2Nkm
N1
l=0 x[l]ej 2
Nkl
= ej2Nkm X[n]
We can prove the relation (6.6) in a similar manner starting from equation (6.3)
4. Duality:
From equation (6.2) and (6.3) we can see that synthesis and analysis equationdiffer only in sign of the exponential and factor 1/N. If{x[n]} is periodic withperiod N, then { X[k]} is also periodic with period N. So we can find thediscrete fourier series coefficients of
X[n] sequence.
From equation (6.2) we see that
Nx[n] = N1k=0
X[k]ej 2N knThus
Nx[n] = N1k=0
X[k]ej 2N knInterchanging the role ofk and n we get
N
x[k] =
N1n=0
X[n]ej 2N kn3
-
8/7/2019 DFS & DFT
4/15
comparing this with (6.3) we see that DFS coefficients of{
X[n]} are {N
x[k]},
the original periodic sequence is reversed in time and multiplied by N. This isknown as duality property. If
{x[n]} { X[k]} (6.7)then
{ X[n]} {Nx[k]} (6.8)5. Complex conjugation of the periodic sequence:
{x [n]} { X[k]}substituting in equation (6.3) we get
N1n=0
x [n]ej 2N kn = N1n=0
x[n]ej 2N (k)n= X[k]
6. Time reversal:
{x[n]} { X[k]}From equation (6.3) we have the DFS coefficient
N1
n0 x[n]ej
2Nkn
putting m = n we get
=0
m=(N1)
x[m]ej 2N kmSince x[m] is periodic, we can use any Nconsecutive values
=
N1m=0
x[m]ej 2N km= X[k]
7. Symmetry properties of DFS coefficient:
In the last chapter we discussed some symmetry properties of the discrete timeFourier transform of aperiodic sequence. The same symmetry properties alsohold for DFS coefficients and their derivation is also similar in style using lin-earity, conjugation and time reversal properties DFS coefficients.
4
-
8/7/2019 DFS & DFT
5/15
8. Time scaling:
Let us define x(m)[n] =
x[n/m], if n is multiple of m
0, if n is not a multiple of m
sequence {x(m)[n]} is obtained by inserting (m 1) zeros between two consec-utive values ofx[n]. Thus {x(m)[n]} is also periodic, but period is mN. TheDFS coefficients are given by
mN1n=0
x(m)[n]ej 2mN knputting n = lm + r, 0 l N 1, 0 r < m
=
N1l=0
x[l]ej 2N km (lm)as non zero terms occur only when r = 0
= x[h].If we define y[n] = x[nM] then y[n] is periodic with period equal to least
common multiple (LCM) of M and N. The relationship between DFS coefficientsis not simple and we omit it here.
9. Difference
{(x[n] x[n 1])} {(1 ej 2N kn) X[k]}This follows from linearity property.
10. Accumulation
Let us define y[n] = nk=
x[k]{
y[n]} will be bounded and periodic only if the sum of terms of
x[n] over one
period is zero, i.e.N1
n=0 x[n] = 0, which is equivalent to X[0] = 0. Assuming thisto be true n
k=
x[k] 11 ej
2 kN
X[h]
11. Periodic convolution
Let {x1[n]} and {x2[n]} be two periodic signals having same period N withdiscrete Fourier series coefficients denoted by { X1[k]} and { X2[k]} respectively.If we form the product x3[k] = X1[k] X2[k] then we want to find out the sequence
5
-
8/7/2019 DFS & DFT
6/15
{
x3[n]} whose DFS coefficients are {
X3[k]}. From the synthesis equation we
have
x3[n] = 1N
N1k=0
X3[k]ej 2N kn=
1
N
N1k=0
X1[k] X2[k]ej 2N knsubstituting for X1[k] in terms ofxn we get
=1
N
N1
k=0N1
m=0 x1[m]e
j 2Nkm
X2[k]e
j 2Nkn
interchanging order of summations we get
=
N1m=0
x1[m] 1N
N1k=0
X2[k]ej 2N (nm)k=
N1m=0
x1[m]x2[n m] (6.15)as inner sum can be recognized as x2[n m] from the synthesis equation. Thus
N1
m=0 x1[m]x2[n m] { X1[k] X2[k]}The sum in the equation (6.15) looks like convolution sum, except that thesummation is over one period. This is known as periodic convolution. Theresulting sequence {x3[n]} is also periodic with period N. This can be seenfrom equation (6.15) by putting m + Ninstead ofm.The Duality theorem gives analogous result when we multiply two periodicsequences.
{x1[n]x2[n]}
1
N
N1l=0
X1[l] X2[k l]
The DFS coefficients are obtained by doing periodic convolution of{
X1[k]} and
{ X2[k]} and multiplying the result by 1/N. We can also prove this result directlyby starting from the analysis equation.The periodic convolution has properties similar to the aperiodic (linear convolu-tion). It is cumulative, associative and distributes over additions of two signals.The properties of DFS representation of periodic sequence are summarized inthe table 6.2
6
-
8/7/2019 DFS & DFT
7/15
Periodic sequence (period N) DFS coefficients (Period N)
1. {x[n]} {x[k]} period N2. a{x[n]} + b{y[n]} a{ X[k]} + b{Y[k]}3. {x[n]} N{ X[k]}4. {x[n m]} {ej 2N km X[k]}5. {ej
2Nlnx[n]} { X[k l]}
6. {x[n]} { X[k]}7. {x[n]} { X[k]}8. x(m)[n] =
x[
m
m], n = lm
0, otherwise{ X[k]},
(periodic with period mN) (Viewed as periodic with period mN)
9. {x[n] x[n 1]} {(1 ej 2
Nh
) X[k]}10.
nm=
x[m] 11ej
2Nk
X[k](periodic only ifx[0] = 0)
11.
N1m=0
x[m]y[n m] { X[k]Y[k]}12. {x[n]y[n]} { 1
N
N1l=0
X[l]y[k l]}13. {Re[
x[n]]} {
Xe[k]} = {
12 (
X[k] +
X[k])}
14. {jIm[x[n]]} {
X0[k]} = {
12
(
X[k]
X[k])}
15. {xe[n]} = {12(x[n] + x[n])} {Re( X[n])}16. {xo[n]} = {12(x[n] x[n])} {jIm[x[k]]}17. If{x[n]} is real then X[k] = X[k]
Re[ X[k]] = Re[ X[k]]Im[ X[k]] = Im[ X[k]]| X[k]| = | X[k]| X[k] = X[k]
Fourier Transform of periodic signals: If{x[n]} is periodic with periodN, then we can write
{x[n]} = 1
N
N1
k=0 X[k]ej 2
Nkn
Using equation (5.9) we see that
X(ej) = 2N
l=
N1k=0
X[k] 2N
k + 2 l
=2
N
l=
X[l] 2 lN
as X[h] are periodic with period N.7
-
8/7/2019 DFS & DFT
8/15
Example: Consider the periodic impulse train
x[n] = r=
[n rN]
then X[k] = N1n=0
x[n]ej 2N kn= 1
as only one term corresponding to n = 0 is non zero. Thus the DTFT is
X(ej) =
k=
2
N
2 k
N
6.2 Fourier Representation of Finite Duration sequence.The Discrete Fourier Transform (DFT):
We now consider the sequence {x[n]} such that x[n] = 0, n < 0 and x[n] =0, n > N 1. Thus x[n] can be take non-zero values only for 0 n N 1.Such sequences are known as finite length sequences, and Nis called the lengthof the sequence. If a sequence has length M, we consider it to be a length Nsequence where M N. In these cases last (N M) sample values are zero.To each finite length sequence of length N we can always associate a periodicsequence {x[n]} defined by
x[n] =
m=
x[n mN] (6.16)
Note that {x[n]} defined by equation (6.16) will always be a periodic sequencewith period N, whether {x[n]}is of finite length Nor not. But when {x[n]} hasfinite length N, we can recover the sequence {x[n]} from {x[n]} by defining
x[n] =
x[n], 0 n N 10, otherwise
(6.17)
This is because of{x[n]} has finite length N, then there is no overlap betweenterms x[n] and x[n mN] for different values ofm = 0.Recall that if
n = kN+ r, where 0 r N 1then n modulo N= r,i.e. we add or subtract multiple ofNfrom n until we get a number lying between0 to N 1. We will use ((n))Nto denote n modulo N. Then for finite lengthsequences of length Nequation (6.16) can be written as
x[n] = x[((n))N] (6.18)We can extract {x[n]} from {x[n]} using equation (6.17). Thus there is one-to-one correspondance between finite length sequences {x[n]} of length N, andperiodic sequences {x[n]} of period N.Given a finite length sequence {x[n]} we can associate a periodic sequence {
x[n]}
8
-
8/7/2019 DFS & DFT
9/15
with it.
This periodic sequence has discrete Fourier series coefficients { X[k]}, which arealso periodic with period N. From equations (6.2) and (6.3) we see that weneed values ofx[n] for 0 n N 1 and X[k] for 0 k N 1. Thus wedefine discrete Fourier transform of finite length sequence {x[n]} as
X[k] =
X[k], 0 k N 10, otherwise
where { X[h]} is DFS coefficient of associated periodic sequence {x[n]}. From{X[k]}we can get { X[h]} by the relation.
X[k] = X[((k))N] = X[(k modulo N)]
then from this we can get {x[n]} using synthesis equation (6.2) and finally {x[n]}using equation (6.17). In equations (6.2) and (6.3) summation interval is 0 toN 1, we can write X[k] directly in terms ofx[n], and x[n] directly in terms ofX[k] as
X[k] =
N1n=0
x[n]ej 2N kn = N1n=0
x[n]ej2Nkn, 0 k N 1
0, otherwise
x[n] = 1
N
N1
k=0 X[k]ej2Nhn
=
1
N
N1
k=0 X[k]ej2Nhn
, 0 N N 1
0, otherwise
For convenience of notation, we use the complex quantity
WN= ej 2
N (6.19)
with this notation, DFT analysis and synthesis equations are written a follows
Analysis equation: X[k] =N1n=0
x[n]WknN, 0 k N 1 (6.20)
Synthesis equation: x[n] = 1N
N1k=0
X[k]WknN , 0 n N 1 (6.21)
If we use values ofk and n outside the interval 0 to N 1 in equation (6.20)and (6.21), then we will not get values zero, but we will get periodic repetitionofX[k] and x[n] respectively. In defining DFT, we are concerned with valuesonly in interval 0 to N 1. Since a sequence of length Mcan also be considereda sequence of length N, N M, we also specify the length of the sequence bysaying N-point-DFT, of sequence {x[n]}.
9
-
8/7/2019 DFS & DFT
10/15
Sampling of the Fourier transform:
For sequence {x[n]} of length N, we have two kinds of representations, namely,discrete time Fourier transform X(ej) and discrete Fourier transform X[k].The DFT values X[k] can be considered as samples ofX(ej)
X[k] =N1k=0
x[n]ej2Nkn =
n=
x[n]ej2Nkn
(as x[n] = 0 for n < 0, and n > N 1)
= X(ej)|w= 2N k (6.22)
Thus is X[k] is obtained by sampling X(ejw) at w = 2N
k, k = 0, 1..N 1.
Properties of the discrete Fourier transform:
Since discrete Fourier transform is similar to the discrete Fourier series repre-sentation, the properties are similar to DFS representation. We use the notation
{x[n]} {X[k]}
to say that {X[k]} are DFT coefficient of finite length sequence x[n]
1. Linearity
If two finite length sequence have length Mand N, we can consider both ofthem with length greater than or equal to maximum ofMand N. Thus if
{x[n]} {X[k]}
{y[n]} {Y[k]}
thena{x[n]} + b{y[n]} a{X[k]} + b{Y[k]}
where all the DFTs are N-point DFT. This property follows directly from theequation (6.20)
2. Circular shift of a sequence
If we shift a finite length sequence {x[n]} of length N, we face some difficulties.
When we shift it in right direction {x[nn0]}, n0 > 0 the length of the sequencewill became (N+ n0) according to definition. Similarly if we shift it left {x[n n0]}, n0 < 0, if may no longer be a finite length sequence as x[nn0] may not bezero for n < 0. Since DFT coefficients are same as DFS coefficients, we definea shift operation which looks like a shift of periodic sequence. From {x[n]} weget the periodic sequence {x[n]} defined by
x[n] = x[((n))N]We can shift this sequence by m to get
{
y[n]} =
x[n m]
10
-
8/7/2019 DFS & DFT
11/15
Now we retain the first Nvalues of this sequence
y[n] =y[n], 0 n N 1
0, otherwise
This operation is shown in figure below for m = 2, N= 5.FIGURES
We can see that {y[n]} is not a shift of sequence {x[n]}. Using the proper-ties of the modulo arithmetic we have
x[n m] = x[((n m))N]and
y[n] = x[((n m))N]), 0 n N 10, otherwise
(6.23)
The shift defined in equation (6.23) is known as circular shift. This is similarto a shift of sequence in a circular register.FIGURE
3. Shift property of DFT
From the definition of the circular shift, it is clear that it corresponds to linearshift of the associated periodic sequence and so the shift property of the DFScoefficient will hold for the circular shift. Hence
{x[((n m))N], 0 n N 1} {WkmN X[k]} (6.24)
and{WnlN x[n]} {X[((k l))N0 k N 1} (6.25)
4. Duality
We have the duality for the DFS coefficient given by { X[n]} {NX[k]},retaining one period of the sequences the duality property for the DFT coefficientwill become
{X[n]} {N x[((k))N, 0 k N 1}
5. Symmetry properties
We can infer all the symmetry properties of the DFT from the symmetry prop-erties of the associated periodic sequence {x[n]} and retaining the first period.Thus we have
{x[n]} {X[((k))N], 0 k N 1}and
{X[((n))N], 0 n N 1} {X[k]}
11
-
8/7/2019 DFS & DFT
12/15
We define conjugate symmetric and anti-symmetric points in the first period 0
to N 1 by
xep[n] = xe[n] = 12
(x[n] + x[((n))N]), 0 n N 1
xop[n] = x0[n] = 12
(x[n] x[((n))N]), 0 n N 1
Since
((n))N=
0 n = 0
N n, 1 n N 1
the above equation similar to
xep[n] = Re(x[0]), n = 0
12
(x[n] x[N n]), 1 n N 1 (6.26)
xop[n] =
jI m(x[0]), n = 0
1
2(x[n] x[N n]), 1 n N 1
(6.27)
x[n] = xep[n] + xop[n]
{xep[n]} and {xop[n]} are referred to as periodic conjugate symmetric and pe-riodic conjugate anti-symmetric parts ofx[n]. In terms if these sequence thesymmetric properties are
{Re(x[n])} {Xep[k]}{jI m(x[n])} {Xop[k]}
{xep[n]} {Re(X[k])}
{xop[n]} {jI m(X[k])}
6. Circular convolution
We saw that multiplication of DFS coefficients corresponds of periodic convolu-tion of the sequence. Since DFT coefficients are DFS coefficients in the interval,0 k N 1, they will correspond to DFT of the sequence retained byperiodically convolving associated periodic sequences and retaining their firstperiod.
x[n] = x[((n))N]y[n] = y[((n))N]Periodic convolution is given by
z[n] = N1k=0
x[k]y[n k]using properties of the modulo arithmetic
z[n] =
N1k=0
x[((k))N]y[((n k))N]
12
-
8/7/2019 DFS & DFT
13/15
and then
z[n] = z[n], 0 n N 10, otherwise
Since ((k))N= k, 0 k N 1 we get
z[n] =N1l=0
x[k]y[((n k))N], 0 n N 1 (6.28)
The convolution defined by equation (6.28) is known as N-point-circular convo-lution of sequence {x[n]} and {y[n]}, where both the sequence are consideredsequence of length N. From the periodic convolution property of DFS it is clearthat DFT of{z[n]} is {X[k]Y[k]}. If we use the notation{x[n]} N {y[n]}to denote the N point circular convolution we see that
{x[n]} N {y[n]} {X[h]Y[k]} (6.29)
In view of the duality property of the DFT we have
{x[n]y[n]} 1
N{X[k]} N {Y[k]} (6.30)
Properties of the Discrete Fourier transform are summarized in the table 6.2
13
-
8/7/2019 DFS & DFT
14/15
Table 6.2
Finite length sequence (length N) N-point DFT (length N)1. {x[n]} {X[k]}2. a{x[n]} + b{y[n]} a{X[k]} + b{Y[k]}3. {X[n]} N{X[((k))N]}4. {x[((n m))N]} {WkmN X[k]}5. {WlnN x[n]} {X[((k l))N]}6. {x[n]} N {y[n]} {X[k]Y[k]}7. {x[n]y[n]} 1
N{X[k]} N {Y[k]}
8. {x[n]} {X[((k))N]}9. {x[((n))N]} {X[k]}10. {Re x[n]} {Xep[k]}11. {jI m(x[n])} {Xop[k]}
12. {Xep[n]} {Re(X[k])}13. {Xop[n]} {jI m(X[k])}14 If{x[n]} is real sequence X[k] = X[((k))N]
Re(X[k]) = Re(X[((k))N])Im(X[k]) = Im(X[((k))N])|X[k]| = |X((k))N]|X[k] = X[((k))N]
Linear convolution using the Discrete Fourier Transform
Output of a linear time invariant-system is obtained by linear convolution ofinput signal with the impulse response of the system. If we multiply DFTcoefficients, and then take inverse transform we will get circular convolution.
From the examples it is clear that result of circular convolution is different fromthe result of linear convolution of two sequences. But if we modify the twosequence appropriately we can get the result of circular convolution to be sameas linear convolution. Our interest in doing linear convolution results form thefact that fast algorithms for computing DFT and IDFT are available. Thesealgorithms will be discussed in a later chapter. Here we show how we can makeresult of circular convolution same as that of linear convolution.If we have sequence {x[n]} of length L and a sequence {y[n]} of length M, thesequence {z[n]} obtained by linear convolution has length (L + M 1). Thiscan be seen from the definition.
Z[n] =
k=x[k]y[n k]=
L1k=0
x[k]y[n k] (6.31)
as x[k] = 0 for k < 0, k L. For n < 0, y[n k] = 0, 0 k L 1 hencez[n] = 0. Similarly for n > L + M 2, y[n k] = 0, 0 k L 1, so z[n] =0, n > L + M 2. Hence z[n] is possibly nonzero only for 0 n L + M 2.Now consider a sequence {w[n]}, DTFT is given by
W(ejw) =
n=
w[n]ejwn
14
-
8/7/2019 DFS & DFT
15/15
writing n = mN+ l, < m < , 0 l N 1
We get
W(ejw) =N1l=0
m=
w[mN+ l]ejw(mN+l)
If we take w = 2N
k, we see that
W(ej2Nk) =
N1l=0
m=
W[l + mN]ej2Nl
Comparing this with the DFT equation (6.), we see that W(ej2Nk) can be seen
as DFT coefficients of a sequence
v[l] =
m=
w[l + mN], 0 l N 1 (6.32)
obviously if{w[n]} has length less then or equal to N, then
v[l] = w[l], 0 l N 1
However, if the length of{W[n]} is greater than N, v[l] may not be equal tow[l] for all values ofl.The sequence {z[n]} in equation (6.31) has the discrete Fourier transform
Z(ejw) = X(ejw)Y(ejw)
The N-point DFT of{z[n]} sequence is
Z[k] = Z(ej2Nk)
= X(ej2
Nk)Y(ej
2
Nk)
= X[k]Y[k]
where {X[k]} and {Y[k]} are N-point DFTs of{x[n]} and {y[n]} respectively.The sequence resulting as the inverse DFT ofZ[k] is then by equation (6.32).
v[n] =
m=
z[n + mN], 0 n N 1
0, otherwise
From the circular convolution property of the DFT we have
{v[n]} = {x[n]} N {y[n]}
Thus, the circular convolution of two-finite length sequences can be viewed aslinear convolution, followed time aliasing, defined by equation (6.32). If N isgreater than or equal to (L + M l), then there will be no time aliasing asthe linear convolution produces a sequence of length (L + M l). Thus we canuse circular convolution for linear convolution by padding sufficient number ofzeros at the end of a finite length sequence. We can use DFT algorithm forcalculating the circular convolution.
15