You are on page 1of 17

Computation of Phasor from Discrete Fourier Transform

Computation of Phasor from Discrete


Fourier Transform

S. A. Soman

Department of Electrical Engineering,


IIT Bombay
Computation of Phasor from Discrete Fourier Transform

Outline

1 DFT of a Sinusoid

2 Phase Computation using DFT

3 Full Cycle Recursive DFT

4 Half Cycle Recursive Form for Phase Estimation

5 Half Cycle Recursive DFT


Computation of Phasor from Discrete Fourier Transform
DFT of a Sinusoid

DFT of a Sinusoid

Consider a sinusoidal input signal of frequency ω0 , given by



x(t) = 2X cos (ω0 t + φ) (1)

This signal is conveniently represented by a phasor X̄

X̄ = Xejφ = X (cos φ + j sin φ) (2)

Assume that x(t) is sampled N times per cycle such that


T0 = Nts .
√ 


xk = 2X cos k +φ (3)
N
Computation of Phasor from Discrete Fourier Transform
DFT of a Sinusoid

The Discrete Fourier Transform of xk contains the


fundamental frequency component given by
N−1
2 X 2π
X1 = xk e−j N k = Xc − jXs (4)
N
k =0

Where,
N−1  
2 X 2π
Xc = xk cos k (5)
N N
k =0
N−1  
2 X 2π
Xs = xk sin k (6)
N N
k =0
Computation of Phasor from Discrete Fourier Transform
DFT of a Sinusoid

Substituting xk from (3) in (5) and (6) it can be shown that


for a sinusoidal input signal given by (1)
√ √
Xc = 2X cos φ Xs = − 2X sin φ (7)

From equation (2), (4) and (7) it follows that

1 1
X̄ = √ X1 = √ (Xc + jXs ) (8)
2 2
When the input signal contains other frequency
components as well, the phasor calculated by equation (8)
is a filtered fundamental frequency phasor.
Computation of Phasor from Discrete Fourier Transform
Phase Computation using DFT

Phase Computation using DFT

Let Xcw and Xsw indicate Xc and Xs component of DFT for


w th window.
Window number is the sample number of the first sample
in the active window.
N−1 √  
2 X 2π 2π
Xcw = xk +w cos k = 2X cos w +φ
N N N
k =0

Similarly,
N−1 √  
2 X 2π 2π
Xsw = xk +w sin k = − 2X sin w +φ
N N N
k =0
Computation of Phasor from Discrete Fourier Transform
Phase Computation using DFT

DFT estimated at w th window for (m = 1) is given by

w w w
√  

 


X1 = Xc −jXs = 2X cos w + φ + j sin w +φ
N N

Phasor estimate for w th window is given by

1 2π
X̄ w = √ (Xcw + jXsw ) = Xejφ ej N w
2

The phasor estimate rotates at a speed of ej N per window
which can be directly derived from DFT phase shifting
property.
Computation of Phasor from Discrete Fourier Transform
Phase Computation using DFT

In the computation of phasor, we would not like this phasor


rotation to occur due to DFT phase shifting.
This can be avoided by

X̄ w = Xejφ ej N
w


X̄ w e−j N
w
= Xejφ

N−1
!
2 X 2π 2π
xk +w e−j N k e−j N
w
= Xejφ
N
k =0

w+N−1
2 X 2π
xk e−j N
k
= Xejφ
N
k =w
Computation of Phasor from Discrete Fourier Transform
Full Cycle Recursive DFT

Full Cycle Recursive DFT

From equation (5) and (6),with elimination of phasor


rotation we have
N+w−1
2 X 2πk
Xcw = xk cos
N N
k =w

N+w−1
2 X 2πk
Xsw = xk sin
N N
k =w

The computation for Xcw can be visualized from the


following figure.
Computation of Phasor from Discrete Fourier Transform
Full Cycle Recursive DFT

Figure: Mechanism of Recursive DFT


Computation of Phasor from Discrete Fourier Transform
Full Cycle Recursive DFT

It is now obvious, that


 

Xcw+1 = Xcw + (xw+N − xw ) cos w (9)
N

Similarly
 

Xsw+1 = Xsw + (xw+N − xw ) sin w (10)
N

It reduces computation from 2N multiply add operation in


normal DFT to 4 additions and 2 multiplications per update.
Computation of Phasor from Discrete Fourier Transform
Full Cycle Recursive DFT

Question

If we follow the convention that latest sample number


corresponds to window number then show that in recursive full
cycle fourier algorithm update equations are given by
 
w+1 w 2π
Xc = Xc + (xw − xw−N ) cos w
N
 
w+1 w 2π
Xs = Xs + (xw − xw−N ) sin w
N
Computation of Phasor from Discrete Fourier Transform
Half Cycle Recursive Form for Phase Estimation

Half Cycle Recursive Form for Phase Estimation

Half cycle form of DFT phasor estimation is given by


N+w−1
2 X π
Xcw = xk cos k (11)
N N
k =w
N+w−1
2 X π
Xsw = xk sin k (12)
N N
k =w
Question
√ π 
By substituting xk = 2X cos k + φ validate eq (11) and
N
(12). Show that
√ √
Xcw = 2X cos φ Xsw = − 2X sin φ (13)
Computation of Phasor from Discrete Fourier Transform
Half Cycle Recursive DFT

Half Cycle Recursive DFT

Recursive form of half cycle DFT can be derived in an


analogous manner to full cycle DFT.
Recursive update forms for fundamental phasor
computation
π  π 
Xcw+1 = Xcw + xw+N cos (N + w) − xw cos w
N π  N
= Xcw − (xw+N + xw ) cos w
π N π 
Xsw+1 = Xcw + xw+N sin (N + w) − xw sin w
N π  N
= Xsw − (xw+N + xw ) sin w
N
Computation of Phasor from Discrete Fourier Transform
Half Cycle Recursive DFT

Question

If we follow the convention that latest sample number


corresponds to window number then show that in recursive half
cycle fourier algorithm update equations are given by
π 
Xcw+1 = Xcw + (xw − xw−N ) cos w
 πN 
Xsw+1 = Xsw + (xw + xw−N ) sin w
N
Computation of Phasor from Discrete Fourier Transform
Half Cycle Recursive DFT

Discussion

Can we implement Recursive form on a DSP or a


microprocessor?
Computation of Phasor from Discrete Fourier Transform
Half Cycle Recursive DFT

Thank You

You might also like