Vous êtes sur la page 1sur 11

Discrete Fourier Transform of Real Sequence

Motivation:
Consider a finite duration signal
) (t g
of duration T sampled at a uniform rate s
t

such that

s
Nt T
where N is an integer 0 > N
Then the Fourier transform of signal is given by

T
ft j
dt e t g f G
0
2
) ( ) (


If we now evaluate the above integral by trapezoidal rule of integration after padding
two zeros at the extremity on either side [signal is zero there infact], we obtain the
following expressions.

1
0
2
) ( ) (
N
n
fnt j
s s
s
e nt g t f G

(1)
The inverse DFT (IDFT) which is used to reconstruct
the signal is given by:


df e f G t g
ft j 2
) ( ) (
(2)

If, from equation (1) we could compute complete frequency spectrum i.e.
f f G ), (
then (2) would imply that we can obtain
T t t g 0 ) (
. The
fallacy in the above statement is quite obvious as we have only finite samples and the
curve connecting any 2-samples can be defined plausibly in infinitely many ways (see fig
(2)). This suggests that from (1), we should be able to derive only limited amount of
frequency domain information.
Since, we have N-data points [real] and
) ( f G
a complex number contains both
magnitude and phase angle information in the frequency domain (2-units of information),
it is reasonable to expect that we should be in a position to predict atmost
2
N

independent transforms
) ( f G
for original signal.
Now, let
N
f
Nt T
f
s
s

1 1
0
and
N
mf
Nt
m
mf f
s
s

0 (3)
then substituting (3) in (1), we get

1
0
2
) ( ) (
N
n
nt
Nt
m
j
s s
s
s
s
e nt g t
N
mf
G

1
0
2
) (
N
n
N
mn j
s s
e nt g t


Fig (1)
3- different fits to the curve
Fig (2)
Note that our choice of frequency f
0
is such that the exponential term in (1) is
independent of s
t
. The intuition for choosing such
f
is that, basically we are
attempting a transform on discrete samples which may (or) may not have a corresponding
analog parent signal. This suggests to us the following discrete version of Fourier
transform for a discrete sequence
{ }
1 1 0
,......, ,
N
x x x

1
0
2
) ( ) (
N
n
N
mn j
e n x m X

(4)
Our next job should be to come up with inverse transformation. Assuming for N-samples
1 1 0
. ,......... ,
N
x x x
that (4) would be a transformation and if (2) defines IFT in
continuous domain, in the discrete domain, we can hypothesize following inverse
transform.

1
0
2
) (
1
) (
N
m
N
mn j
e m X
K
n x

(5)
Where K is a suitable scaling factor.
Our next job is to verify that (4) and (5) indeed define a transformation pair
Substituting (4) in (5), we get following expression for right hand side of (5)
Right hand side
N
mn j
N
m
N
k
N
mk j
e e k x
K
2
1
0
1
0
2
) (
1

1
]
1

(6)
[Note the use of dummy subscript k ]
Let us work this expression out in a long hand fashion; for compactness we use notation
) (n x x
n


1
1
1
1
1
1
]
1

+ + + +
+ +
+ + + +
+ + +

1
1
0
1
) 1 ( 2 ) 1 ( 2
1
) 1 ( 2 ) 1 ( 2
1
) 1 ( 2
0
2 ) 1 ( 2
1
2 2
1
2
0
1 1 0
2
N m e e x e e x e x
m e e x e e x e x
m x x x
K
RHS
N
n N j
N
N j
N
N
n N j
N
N j
N
n N j
N
n j
N
N j
N
N
n j
N
j
N
n j
N


In the above expression, for the first row
m
is set to zero, for the second row it is set to
one and for the last row 1 N m
Now, grouping terms column wise, we get
1
1
1
]
1

+ + + +
+ + + + + + +


) 1 (
) 1 ( ) 1 (
1
) 1 (
) 1 ( 2
) 1 (
2
1
) 1 )( 1 ( 2 ) 1 ( 2
1
) 1 ( 2 2
0
N n
N
N j
N n
N
j
N
N
n N j
N
n j
N
n N j
N
n j
e e x
e e x e e x
K
RHS


1
0
1
0
) (
2
1
N
k
N
m
k n
N
m j
k
e x
K


Note that this jugglery shows that we can interchange the summation order. One order
indicates row wise and another column wise summation
i.e.

1
0
1
0
) (
2
1
N
k
N
m
k n
N
m j
k
e x
K
RHS

(7)
Our primary task now is to evaluate the expression.

1
0
) (
2
N
m
k n
N
m j
e

We now claim that

;
;
0
1
0
) (
2
n k if
n k if N
e
N
m
m k n
N
j

Proof: - for n k
m e e
m j
m k n
N
j

1
. 0 .
) (
2
Hence, the first case is obvious.
Now, if n k , let
1
k n k

) 1 )( (
2
1 ) (
2
0 ) (
2
1
0
) (
2

+ + +

N k n
N
j
k n
N
j
k n
N
j
N
m
k n
N
m j
e e e e

Now,
( )
m
k
m
k
N
j
m k
N
j
a e e
1
1 1 2 2

,
_


where
N
j
e a
2

0
1
1
1
1
1
1
1
1
1
2
2
2
2
1
0
2
1
0
) (
2

,
_


+ +

,
_


k
N
j
k j
k
N
j
N k
N
j
N
m
m
k
N
j
N
m
k n
N
m j
e
e
e
e
e e


if
1
k is integer, then
1
1
2

k j
e

Note that we have used the following geometric series expression
r
r a
ar ar a
n
n

+ + +

1
) 1 (
........
1
Thus, RHS in (6) is equal to
n
x
K
N
We see that equation (6) defines the inverse transformation if we choose N K ;
Thus, N-point DFT and IDFT for samples
[ ]
1 1 0
,..... ,
N
x x x
are defined as follows.
N
mn j
N
m
N
n
N
nm j
n
e m X
N
n x
e x m X

2
1
0
1
0
2
) (
1
) (
) (

Note that in general DFT and inverse DFT can be defined in many ways, each only
differing in choice of constant
1
C and
2
C
DFT IDFT
i.e.

1
0
2
1
) (
N
n
N
nm j
n
e x C m X

1
0
2
2
) (
N
m
N
nm j
n
e m X C x

The constraint in choosing the constants is that product
N
C C
1
2 1

For Example, when

N
C C
1
, 1
2 1



2
1 2
2 1
C
N
C

N
C
N
C
1 1
2 1

Choice of
N
C
2
1

is commonly used in relaying because it simplifies phasor estimation.
Phasor estimation will be discussed later.
We now discuss some important properties of DFT.
Important Properties of DFT
(1) Linearity: Let
{ }
1 1 0
,...... ,
N
x x x
and
{ }
1 1 0
,...... ,
N
y y y
be two sets of
discrete samples with corresponding DFTs given by
) (m X
and
) (m Y
. Then
DFT of sample set
{ }
1 1 1 1 0 0
.., ,......... ,

+ + +
N N
y x y x y x
is given by
) ( ) ( m Y m X +
Proof:

1
0
2
) (
N
n
N
nm j
n
e x m X

;

1
0
2
) (
N
n
N
nm j
n
e y m Y

+ +
1
0
2
) ( ) ( ) (
N
n
N
mn j
n n
e y x m Y m X

(2) Periodicity : We have evaluated DFT at
1 ,........, 1 , 0 N m
. Thereafter,
) ( N n
it shows periodicity. For example

) ( ) 2 ( ) ( ) 2 ( ) ( ) ( m kN X m N X m N X m N X m N X m X + + + + +
Where k is an integer
Proof:

+
1
0
) (
2
) (
N
n
m kN
N
n j
n
e x m kN X

1
0
2
2
N
n
kn j
N
nm j
n
e e x

(8)
Both k and
n
are integers. Hence 1
2

kn j
e

; Therefore from (8) we set
) ( ) (
1
0
2
m X e x m kN x
N
n
N
nm j
n
+


(3) DFT symmetry: If the samples n
x
are real; then they contain atmost N bits
of information. On the otherhand,
) (m X
is a complex number and hence contains
2 bits of information. Thus, from sequence
{ }
1 1 0
,....., ,
N
x x x
, if we derive
{ } ) 1 ( ),......., 1 ( ), 0 ( N X X X , it implies that from N-bit of information, we are
deriving N 2 bits of information. This is counter intuitive. We should expect some
relationship in the sequence
{ } ) 1 ( ),......., 1 ( ), 0 ( N X X X
. There is some
redundancy in computation of
) 1 ( .... )......... 0 ( N X X
. As per DFT symmetry
property, following relationship holds.
) ( ) (
*
m X m N X
1 ,....., 1 , 0 N m
Where * indicates
complex
conjugate operation
Proof:

1
0
2
) (
N
n
N
nm j
n
e x m X


1
0
) (
2
) (
N
n
m N
N
n j
n
e x m N X


=
n j
N
n
N
nm j
n
e e x

2
1
0
2

Since N n e
n j

1
2
it follows that


1
0
2
) (
N
n
N
nm j
n
e x m N X

1
0
*
2
) (
N
n
N
nm j
n
e x


*
1
0
2
1
]
1

N
n
N
nm j
n
e x


*
) (m X
Thus, we conclude that

) ( ) ( m X m N X
[Symmetry]
and
) ( ) ( m X m N X
[Anti-symmetry]
Thus, a typical DFT magnitude and phase plots appear as follows.
DFT phase shifting:-
DFT shifting property states that, for a periodic sequence with periodicity N i.e.
) ( ) ( lN m x m x +
, l an integer, an offset in sequence manifests itself as a phase shift
in the frequency domain. In other words, if we decide to sample x(n) starting at n equal to
some integer K, as opposed to n=0, the DFT of those time shifted samples.
) (m X
shifted

) ( ) (
2
shifted
m X e m X
N
km j


Proof: By periodicity of samples, we have

) 0 ( ) ( x N x


) 1 ( ) 1 ( x N x +

) 1 ( ) 1 ( + K x K N x

1
0
2
) (
N
n
m
N
n j
n
e x m X



+
1
2
1
0
2
N
K n
N
nm j
n
K
n
N
nm j
n
e x e x

Starting DFT with say this sample will lead to offset of 2
Fig (3) Fig (4)
Fig (5)


+
+
1
2
1
0
2
N
K n
N
nm j
n
K
n
N
nm j
n N
e x e x

1
]
1

+
+
1
2
1
2
1
0
) ( 2
N
N
m j
N
K n
N
nm j
n
K
n
N
n N m j
N n
e e x e x

+
1
2
1
2
N
K n
N
nm j
n
K N
N n
N
nm j
n
e x e x

1
2
) (
K N
K n
m
N
n j
n
e x m X

(8)
Now to compute shifted
X
, let us map the samples 1 1
,........, ,
+ + K N K K
x x x
to
1 1 0
........., ,
N
y y y
.
Apply DFT to sequence
y

1
0
2
) (
N
n
N
nm j
n shifted
e y m X

1
0
2
N
n
m
N
n j
n K
e x

1
0
) (
2 2
N
n
K n
N
m j
n K
N
mK j
e x e

1
2 2
K N
K n
N
N
n j
n
N
nK j
e x e


) (
2
m X e
n
N
nK j

(from (8))
Computation of Phasor from DFT:
Consider a sinusoidal input signal of frequency
0

, given by
) sin( 2 ) (
0
+ t X t x (9)
This signal is conveniently represented by a phasor X
) sin (cos

j X Xe X
j
+ (10)
Assuming that
( ) t x
is sampled N times per cycle s.t
s
Nt
50
1
of the 50Hz waveform
to produce the sample set {
k
x
}, Then,

)
2
sin( 2

+ k
N
X x
k
(11)
Hence, An integer m, in the transform domain corresponds to frequency mF
0
. Thus,
choice m=1 corresponds to extract the fundamental frequency component. The discrete
Fourier Transform of k
x
contains a fundamental frequency component given by

1
0
2
1
2
N
k
k
N
j
k
e x
N
X

(12)


1
0
1
0
)
2
sin(
2
)
2
cos(
2
N
k
N
k
k k
k
N
x
N
j k
N
x
N


s c
jX X
(13)
where

1
0
)
2
cos(
2
N
k
k c
k
N
x
N
X

(14)

1
0
)
2
sin(
2
N
k
k s
k
N
x
N
X

(15)
Substituting for k
x
from (11) in (12) and (13) it can be shown that for a sinusoidal input
signal given by (9)
cos 2 sin 2 X X X X
s c
(16)
From equation (10), (13) and (14) it follows that

( )
c s
jX X jX X +
2
1
2
1
1 (17)
When the input signal contains other frequency components as well, the phasor
calculated by equation (17) is a filtered fundamental frequency phasor. It is presumed
here that the input signal must be band-limited to satisfy the Nyquist Criterion, to avoid
errors due to aliasing affects.
Effect on phasor computation
In relaying applications during steady state we will be working with moving
window, such that each window having most recent N-samples. ) 1 (
0
X is the DFT for
the
st
1
window, ) 1 (
1
X for fundamental of second window and so on. We get the
relationship that for
th
n window

) 1 ( ) 1 (
1
2
X e X
N
K j
K


) 1 ( ) 1 (
1

K K
X X


) 1 ( ) 1 (
1
2

K
N
j
K
X e X


N
X X
K K
2
1


i.e. DFT rotates at a speed
N
2
per sample.

) 1 (
2
DFT
jX
N
X
This suggests that
N
j
K
e jX
N
K X
2
1
) 1 (
2
) (

phasor estimated for


th
n window rotates
at speed
N
2
per sample.
In the computation of phasor, we would not like this phasor shift to occur due to DFT
phase shifting. This can be avoided if we use equation (8) for computing DFT. Replace
K by W , the window number, we get

s c
W N
W n
N
nm j
n
jX X e X m X

+

1
2
) (

Where

1
2
cos ) (
W N
W n
n
W
c
N
nm
X m X

(9)

1
2
sin ) (
W N
W n
n
W
s
N
nm
X m X

(10)
Example: let
) sin( t x
With sampling rate of N-samples per cycle we have
N
T
t
s
0
;

)
2
sin( )
2
sin(
0
0
N
n
N
T
n
T
x
n



Substituting n
x
in equation (9), we get

1
2
cos
2
sin 2
2
1
W N
W n
W
c
N
nm
N
n
X

1
]
1

+ +
1
)) 1 (
2
sin( )) 1 (
2
sin(
2
1
W N
W n
m
N
n
m
N
n

1
2
sin
2
sin 2
2
1
W N
W n
W
s
N
nm
N
n
X

1
]
1

+ +
1
)) 1 (
2
cos( )) 1 (
2
cos(
2
1
W N
W n
m
N
n
m
N
n

Vous aimerez peut-être aussi