Discrete-time Fourier transform explained

In mathematics, the discrete-time Fourier transform (DTFT) is a form of Fourier analysis that is applicable to a sequence of discrete values.

The DTFT is often used to analyze samples of a continuous function. The term discrete-time refers to the fact that the transform operates on discrete data, often samples whose interval has units of time. From uniformly spaced samples it produces a function of frequency that is a periodic summation of the continuous Fourier transform of the original continuous function. Under certain theoretical conditions, described by the sampling theorem, the original continuous function can be recovered perfectly from the DTFT and thus from the original discrete samples. The DTFT itself is a continuous function of frequency, but discrete samples of it can be readily calculated via the discrete Fourier transform (DFT) (see), which is by far the most common method of modern Fourier analysis.

Both transforms are invertible. The inverse DTFT is the original sampled data sequence. The inverse DFT is a periodic summation of the original sequence. The fast Fourier transform (FFT) is an algorithm for computing one cycle of the DFT, and its inverse produces one cycle of the inverse DFT.

Introduction

Relation to Fourier Transform

We begin with a common definition of the Fourier transform integral:

X(f)\triangleq

infty
\int
-infty

x(t)e-idt.

This reduces to a summation (see) when

x(t)

is replaced by a discrete sequence of its samples,

x(nT),

for integer values of

n.

 

dt

is also replaced by

T,

leaving:

X1/T(f)\triangleq

infty
\sum
n=-infty

\underbrace{Tx(nT)}x[n]e-i,

which is a Fourier series in frequency, with periodicity

1/T.

The subscript

1/T

distinguishes it from

X(f)

and from the angular frequency form of the DTFT. I.e., when the frequency variable,

\omega,

has normalized units of radians/sample, the periodicity is

2\pi,

and the Fourier series is:

The utility of the DTFT is rooted in the Poisson summation formula, which tells us that the periodic function represented by the Fourier series is a periodic summation of the Fourier transform:

The integer

k

has units of cycles/sample, and

1/T

is the sample-rate,

fs

(samples/sec).  So

X1/T(f)

comprises exact copies of

X(f)

that are shifted by multiples of

fs

hertz and combined by addition. For sufficiently large

fs

the

k=0

term can be observed in the region

[-fs/2,fs/2]

with little or no distortion (aliasing) from the other terms.  Fig.1 depicts an example where

1/T

is not large enough to prevent aliasing.

We also note that

e-i2\pi

is the Fourier transform of

\delta(t-nT).

Therefore, an alternative definition of DTFT is:

The modulated Dirac comb function is a mathematical abstraction sometimes referred to as impulse sampling.

Inverse transform

An operation that recovers the discrete data sequence from the DTFT function is called an inverse DTFT. For instance, the inverse continuous Fourier transform of both sides of produces the sequence in the form of a modulated Dirac comb function:

infty
\sum
n=-infty

x[n]\delta(t-nT)=l{F}-1\left\{X1/T(f)\right\}\triangleq

infty
\int
-infty

X1/T(f)eidf.

However, noting that

X1/T(f)

is periodic, all the necessary information is contained within any interval of length

1/T.

  In both and, the summations over

n

are a Fourier series, with coefficients

x[n].

  The standard formulas for the Fourier coefficients are also the inverse transforms:

Periodic data

When the input data sequence

x[n]

is

N

-periodic, can be computationally reduced to a discrete Fourier transform (DFT), because:

N

samples.

X1/T(f)

converges to zero everywhere except at integer multiples of

1/(NT),

known as harmonic frequencies. At those frequencies, the DTFT diverges at different frequency-dependent rates. And those rates are given by the DFT of one cycle of the

x[n]

sequence.

(1/T)/(1/(NT))=N.

The DFT of one cycle of the

x[n]

sequence is:

X[k]\triangleq\underbrace{\sumNx[n]

-i2\pi
k
N
n
e
}_, \quad k \in \mathbf.

And

x[n]

can be expressed in terms of the inverse transform:

x[n]=

1
N

\underbrace{\sumNX[k]

i2\pi
k
N
n
e
}_, \quad n \in \mathbf.The inverse DFT is sometimes referred to as a Discrete Fourier series (DFS).

\begin{align} X1/T(f)&\triangleq

infty
\sum
n=-infty

x[n]e-i\\ &=

infty
\sum\left[
n=-infty
1
N
N-1
\sum
k=0

X[k]

i2\pi
k
N
n
e

\right]e-i\\ &=

1
N
N-1
\sum
k=0

X[k]

infty
\underbrace{\left[\sum
n=-infty
i2\pi
k
N
n
e

e-i\right]}\operatorname{DTFT

i2\pi
k
N
n
\left(e

\right)}\\ &=

1
N
N-1
\sum
k=0

X[k]

1
T
infty
\sum
M=-infty

\delta\left(f-\tfrac{k}{NT}-\tfrac{M}{T}\right) \end{align}

     

Due to the

N

-periodicity of both functions of

k,

this can be simplified to:

X1/T(f)=

1
NT
infty
\sum
k=-infty

X[k]\delta\left(f-

k
NT

\right),

which satisfies the inverse transform requirement:

\begin{align} x[n]&=T

1
T
\int
0

X1/T(f)eidf\\ &=

1
N
infty
\sum
k=-infty

X[k]

1
T
\underbrace{\int
0

\delta\left(f-\tfrac{k}{NT}\right)eidf}zerofor\\ &=

1
N
N-1
\sum
k=0

X[k]

1
T
\int
0

\delta\left(f-\tfrac{k}{NT}\right)eidf\\ &=

1
N
N-1
\sum
k=0

X[k]ei{NT}nT}\\ &=

1
N
N-1
\sum
k=0

X[k]ei{N}n} \end{align}

Sampling the DTFT

When the DTFT is continuous, a common practice is to compute an arbitrary number of samples

(N)

of one cycle of the periodic function

X1/T

: 

\begin{align} \underbrace{X1/T\left(

k
NT
\right)}
Xk

&=

infty
\sum
n=-infty

x[n]

-i2\pi
k
N
n
e

k=0,...,N-1\\ &=\underbrace{\sumN

x
N

[n]

-i2\pi
k
N
n
e

,}DFT\scriptstyle{(sumoveranyn-sequenceoflengthN)} \end{align}

where

x
N
is a periodic summation:
x
N
infty
[n]\triangleq\sum
m=-infty

x[n-mN].

    (see Discrete Fourier series)

The

x
N
sequence is the inverse DFT. Thus, our sampling of the DTFT causes the inverse transform to become periodic. The array of
2
|X
k|
values is known as a periodogram, and the parameter

N

is called NFFT in the Matlab function of the same name.

In order to evaluate one cycle of

x
N
numerically, we require a finite-length

x[n]

sequence. For instance, a long sequence might be truncated by a window function of length

L

resulting in three cases worthy of special mention. For notational simplicity, consider the

x[n]

values below to represent the values modified by the window function.

Case: Frequency decimation.

L=NI,

for some integer

I

(typically 6 or 8)

A cycle of

x
N
reduces to a summation of

I

segments of length

N.

  The DFT then goes by various names, such as:

Recall that decimation of sampled data in one domain (time or frequency) produces overlap (sometimes known as aliasing) in the other, and vice versa. Compared to an

L

-length DFT, the
x
N
summation/overlap causes decimation in frequency, leaving only DTFT samples least affected by spectral leakage. That is usually a priority when implementing an FFT filter-bank (channelizer). With a conventional window function of length

L,

scalloping loss would be unacceptable. So multi-block windows are created using FIR filter design tools.  Their frequency profile is flat at the highest point and falls off quickly at the midpoint between the remaining DTFT samples. The larger the value of parameter

I,

the better the potential performance.

Case:

L=N+1

When a symmetric,

L

-length window function (

x

) is truncated by 1 coefficient it is called periodic or DFT-even. That is a common practice, but the truncation affects the DTFT (spectral leakage) by a small amount. It is at least of academic interest to characterize that effect.  An

N

-length DFT of the truncated window produces frequency samples at intervals of

1/N,

instead of

1/L.

  The samples are real-valued,  but their values do not exactly match the DTFT of the symmetric window. The periodic summation,
x
N

,

along with an

N

-length DFT, can also be used to sample the DTFT at intervals of

1/N.

  Those samples are also real-valued and do exactly match the DTFT (example:). To use the full symmetric window for spectral analysis at the

1/N

spacing, one would combine the

n=0

and

n=N

data samples (by addition, because the symmetrical window weights them equally) and then apply the truncated symmetric window and the

N

-length DFT.

Case: Frequency interpolation.

L\leN

In this case, the DFT simplifies to a more familiar form:

Xk=

N-1
\sum
n=0

x[n]

-i2\pi
k
N
n
e

.

In order to take advantage of a fast Fourier transform algorithm for computing the DFT, the summation is usually performed over all

N

terms, even though

N-L

of them are zeros. Therefore, the case

L<N

is often referred to as zero-padding.

Spectral leakage, which increases as

L

decreases, is detrimental to certain important performance metrics, such as resolution of multiple frequency components and the amount of noise measured by each DTFT sample. But those things don't always matter, for instance when the

x[n]

sequence is a noiseless sinusoid (or a constant), shaped by a window function. Then it is a common practice to use zero-padding to graphically display and compare the detailed leakage patterns of window functions. To illustrate that for a rectangular window, consider the sequence:

x[n]=

i2\pi
1
8
n
e

,

and

L=64.

Figures 2 and 3 are plots of the magnitude of two different sized DFTs, as indicated in their labels. In both cases, the dominant component is at the signal frequency:

f=1/8=0.125

. Also visible in Fig 2 is the spectral leakage pattern of the

L=64

rectangular window. The illusion in Fig 3 is a result of sampling the DTFT at just its zero-crossings. Rather than the DTFT of a finite-length sequence, it gives the impression of an infinitely long sinusoidal sequence. Contributing factors to the illusion are the use of a rectangular window, and the choice of a frequency (1/8 = 8/64) with exactly 8 (an integer) cycles per 64 samples. A Hann window would produce a similar result, except the peak would be widened to 3 samples (see DFT-even Hann window).

Convolution

The convolution theorem for sequences is:

x*y = \scriptstyle{\rmDTFT}-1\displaystyle\left[\scriptstyle{\rmDTFT}\displaystyle\{x\}\scriptstyle{\rmDTFT}\displaystyle\{y\}\right].

An important special case is the circular convolution of sequences and defined by
x
N

*y,

where
x
N
is a periodic summation. The discrete-frequency nature of

\scriptstyle{\rmDTFT}\displaystyle

\{x
N

\}

means that the product with the continuous function

\scriptstyle{\rmDTFT}\displaystyle\{y\}

is also discrete, which results in considerable simplification of the inverse transform:
x
N

*y = \scriptstyle{\rmDTFT}-1\displaystyle\left[\scriptstyle{\rmDTFT}\displaystyle

\{x
N

\}\scriptstyle{\rmDTFT}\displaystyle\{y\}\right] = \scriptstyle{\rmDFT}-1\displaystyle\left[\scriptstyle{\rmDFT}\displaystyle

\{x
N

\}\scriptstyle{\rmDFT}\displaystyle

\{y
N

\}\right].

For and sequences whose non-zero duration is less than or equal to, a final simplification is:

x
N

*y = \scriptstyle{\rmDFT}-1\displaystyle\left[\scriptstyle{\rmDFT}\displaystyle\{x\}\scriptstyle{\rmDFT}\displaystyle\{y\}\right].

The significance of this result is explained at Circular convolution and Fast convolution algorithms.

Symmetry properties

When the real and imaginary parts of a complex function are decomposed into their even and odd parts, there are four components, denoted below by the subscripts RE, RO, IE, and IO. And there is a one-to-one mapping between the four components of a complex time function and the four components of its complex frequency transform:

\begin{align} Time domain&x&=&

x
RE

&+&

x
RO

&+i&

x
IE

&+

&\underbrace{ix
IO
} \\&\Bigg\Updownarrow\mathcal & &\Bigg\Updownarrow\mathcal & &\ \ \Bigg\Updownarrow\mathcal & &\ \ \Bigg\Updownarrow\mathcal & &\ \ \Bigg\Updownarrow\mathcal\\\mathsf \quad &X \quad &= \quad & X_ \quad &+ \quad &\overbrace \quad &+ \quad i\ & X_ \quad &+ \quad & X_\end

From this, various relationships are apparent, for example:

(x
RE
+x
RO

)

is the even symmetric function

XRE+iXIO.

Conversely, an even-symmetric transform implies a real-valued time-domain.
(ix
IE
+ix
IO

)

is the odd symmetric function

XRO+iXIE,

and the converse is true.
(x
RE
+ix
IO

)

is the real-valued function

XRE+XRO,

and the converse is true.
(x
RO
+ix
IE

)

is the imaginary-valued function

iXIE+iXIO,

and the converse is true.

Relationship to the Z-transform

X2\pi(\omega)

is a Fourier series that can also be expressed in terms of the bilateral Z-transform.  I.e.:

X2\pi(\omega)=\left.Xz(z)

\right|
z=ei

=

i\omega
X
z(e

),

where the

Xz

notation distinguishes the Z-transform from the Fourier transform. Therefore, we can also express a portion of the Z-transform in terms of the Fourier transform:
i\omega
\begin{align} X
z(e

)&=X1/T\left(\tfrac{\omega}{2\piT}\right)  =

infty
\sum
k=-infty

X\left(\tfrac{\omega}{2\piT}-k/T\right)\\ &=

infty
\sum
k=-infty

X\left(\tfrac{\omega-2\pik}{2\piT}\right). \end{align}

Note that when parameter changes, the terms of

X2\pi(\omega)

remain a constant separation

2\pi

apart, and their width scales up or down. The terms of remain a constant width and their separation scales up or down.

Table of discrete-time Fourier transforms

Some common transform pairs are shown in the table below. The following notation applies:

\omega=2\pifT

is a real number representing continuous angular frequency (in radians per sample). (

f

is in cycles/sec, and

T

is in sec/sample.) In all cases in the table, the DTFT is 2π-periodic (in

\omega

).

X2\pi(\omega)

designates a function defined on

-infty<\omega<infty

.

Xo(\omega)

designates a function defined on

-\pi<\omega\le\pi

, and zero elsewhere. Then: X_(\omega)\ \triangleq \sum_^ X_o(\omega - 2\pi k).

\delta(\omega)

is the Dirac delta function

\operatorname{sinc}(t)

is the normalized sinc function

\operatorname{rect}\left[{n\overL}\right]\triangleq\begin{cases} 1&|n|\leqL/2\\ 0&|n|>L/2 \end{cases}

\operatorname{tri}(t)

is the triangle function

u[n]

is the discrete-time unit step function

\delta[n]

is the Kronecker delta

\deltan,0

Time domain
x[''n'']
Frequency domain
X2π(ω)
RemarksReference

\delta[n]

X2\pi(\omega)=1

\delta[n-M]

X2\pi(\omega)=e-i\omega

integer

M

infty
\sum
m=-infty

\delta[n-Mm]

X2\pi(\omega)=

infty
\sum
m=-infty

e-i=

2\pi
M
infty
\sum
k=-infty

\delta\left(\omega-

2\pik
M

\right)


Xo(\omega)=

2\pi
M
(M-1)/2
\sum
k=-(M-1)/2

\delta\left(\omega-

2\pik
M

\right)

    odd M

Xo(\omega)=

2\pi
M
M/2
\sum
k=-M/2+1

\delta\left(\omega-

2\pik
M

\right)

    even M
integer

M>0

u[n]

X2\pi(\omega)=

1
1-e-i

+\pi

infty
\sum
k=-infty

\delta(\omega-2\pik)


Xo(\omega)=

1
1-e-i

+\pi\delta(\omega)\

The

1/(1-e-i)

term must be interpreted as a distribution in the sense of a Cauchy principal value around its poles at

\omega=2\pik

.

anu[n]

X2\pi(\omega)=

1
1-ae-i

0<

a< 1

e-i

Xo(\omega)=2\pi\delta(\omega+a),

    -π < a < π

X2\pi(\omega)=2\pi

infty
\sum
k=-infty

\delta(\omega+a-2\pik)

real number

a

\cos(an)

Xo(\omega)=\pi\left[\delta\left(\omega-a\right)+\delta\left(\omega+a\right)\right],


X2\pi(\omega)\triangleq

infty
\sum
k=-infty

Xo(\omega-2\pik)

real number

a

with

-\pi<a<\pi

\sin(an)

Xo(\omega)=

\pi
i

\left[\delta\left(\omega-a\right)-\delta\left(\omega+a\right)\right]

real number

a

with

-\pi<a<\pi

\operatorname{rect}\left[{n-M\overN}\right]\equiv\operatorname{rect}\left[{n-M\overN-1}\right]

Xo(\omega)={\sin(N\omega/2)\over\sin(\omega/2)}e

integer

M,

and odd integer

N

\operatorname{sinc}(W(n+a))

Xo(\omega)=

1
W

\operatorname{rect}\left({\omega\over2\piW}\right)eia\omega

real numbers

W,a

with

0<W<1

\operatorname{sinc}2(Wn)

Xo(\omega)=

1
W

\operatorname{tri}\left({\omega\over2\piW}\right)

real number

W

,

0<W<0.5

\begin{cases} 0&n=0\\

(-1)n
n

&elsewhere \end{cases}

Xo(\omega)=j\omega

it works as a differentiator filter
1
(n+a)

\left\{\cos[\piW(n+a)]-\operatorname{sinc}[W(n+a)]\right\}

Xo(\omega)=

j\omega
W

\operatorname{rect}\left({\omega\over\piW}\right)ej

real numbers

W,a

with

0<W<1

\begin{cases} \pi
2

&n=0\\

(-1)n-1
\pin2

&otherwise \end{cases}

Xo(\omega)=

\omega

\begin{cases} 0;&neven\\

2
\pin

;&nodd \end{cases}

Xo(\omega)=\begin{cases} j&\omega<0\\ 0&\omega=0\\ -j&\omega>0 \end{cases}

Hilbert transform
C(A+B)
2\pi

\operatorname{sinc}\left[

A-B
2\pi

n\right]\operatorname{sinc}\left[

A+B
2\pi

n\right]

Xo(\omega)=

real numbers

A,B


complex

C

Properties

This table shows some mathematical operations in the time domain and the corresponding effects in the frequency domain.

*

is the discrete convolution of two sequences

x[n]*

is the complex conjugate of .
PropertyTime domain
Frequency domain

X2\pi(\omega)

RemarksReference
Linearity

ax[n]+by[n]

aX2\pi(\omega)+bY2\pi(\omega)

complex numbers

a,b

Time reversal / Frequency reversal

x[-n]

X2\pi(-\omega)

Time conjugation

x[n]*

X2\pi(-\omega)*

Time reversal & conjugation

x[-n]*

X2\pi(\omega)*

Real part in time

\Re{(x[n])}

1
2

(X2\pi(\omega)+

*(-\omega))
X
2\pi
Imaginary part in time

\Im{(x[n])}

1
2i

(X2\pi(\omega)-

*(-\omega))
X
2\pi
Real part in frequency
1
2

(x[n]+x*[-n])

\Re{(X2\pi(\omega))}

Imaginary part in frequency
1
2i

(x[n]-x*[-n])

\Im{(X2\pi(\omega))}

Shift in time / Modulation in frequency

x[n-k]

X2\pi(\omega)e-i\omega

integer
Shift in frequency / Modulation in time

x[n]eian

X2\pi(\omega-a)

real number

a

Decimation

x[nM]

1
M
M-1
\sum
m=0

X2\pi\left(\tfrac{\omega-2\pim}{M}\right)

 
integer

M

Time Expansion

\scriptstyle\begin{cases} x[n/M]&n=multipleofM\\ 0&otherwise \end{cases}

X2\pi(M\omega)

integer

M

Derivative in frequency
n
i

x[n]

dX2\pi(\omega)
d\omega

Integration in frequency

Differencing in time

x[n]-x[n-1]

\left(1-e-i\right)X2\pi(\omega)

Summation in time
n
\sum
m=-infty

x[m]

1
\left(1-e-i\right)

X2\pi(\omega)+\piX(0)

infty
\sum
k=-infty

\delta(\omega-2\pik)

Convolution in time / Multiplication in frequency

x[n]*y[n]

X2\pi(\omega)Y2\pi(\omega)

Multiplication in time / Convolution in frequency

x[n]y[n]

1
2\pi
\pi
\int
-\pi

X2\pi(\nu)Y2\pi(\omega-\nu)d\nu

Periodic convolution
Cross correlation

\rhoxy[n]=x[-n]**y[n]

Rxy(\omega)=X2\pi(\omega)*Y2\pi(\omega)

Exy=

infty
\sum
n=-infty

{x[n]y[n]*}

Exy=

1
2\pi
\pi
\int
-\pi

{X2\pi(\omega)Y2\pi(\omega)*d\omega}

See also

Further reading