Contents
- 1 Arguments for the discrete implementation of the Fourier transform
- 2 Time discretization – Periodification in the frequency domain
- 3 Frequency discretization – Periodification in the time domain
- 4 Finite signal representation
- 5 From the continuous to the discrete Fourier transform
- 6 Inverse discrete Fourier transform
- 7 Interpretation of DFT and IDFT
- 8 Exercises for the chapter
Arguments for the discrete implementation of the Fourier transform
The »Fourier transform« according to the previous description in chapter »Aperiodic Signals – Pulses« has an infinitely high selectivity due to the unlimited extension of the integration interval and is therefore an ideal theoretical tool of spectral analysis.
If the spectral components X(f) of a time function x(t) are to be determined numerically, the general transformation equations
- X(f)=∫+∞−∞x(t)⋅e−j⋅2πftdt⇒Transform⇒first Fourier integral,x(t)=∫+∞−∞X(f)⋅e+j⋅2πftdf⇒Inverse Transform⇒second Fourier integral
are unsuitable for two reasons:
- The equations apply exclusively to continuous-time signals. With digital computers or signal processors, however, one can only process discrete-time signals.
- For a numerical evaluation of the two Fourier integrals it is necessary to limit the respective integration interval to a finite value.
This leads to the following consequence:
A »continuous-valued signal« must undergo two processes before the numerical determination of its spectral properties, viz.
- that of »sampling« for discretization, and
- that of »windowing« to limit the integration interval.
In the following, starting from an aperiodic time function x(t) and the corresponding Fourier spectrum X(f) a time and frequency-discrete description suitable for computer processing is developed step by step.
Time discretization – Periodification in the frequency domain
The following graphs show uniformly the time domain on the left and the frequency domain on the right.
- Without limiting generality, x(t) and X(f) are each real and Gaussian.
- According to the chapter »Discrete-Time Signal Representation« one can describe the sampling of the time signal x(t) by multiplying it by a Dirac delta train ⇒
»Dirac comb in the time domain«
- pδ(t)=+∞∑ν=−∞TA⋅δ(t−ν⋅TA).
The result is the time signal sampled at a distance TA:
- A{x(t)}=+∞∑ν=−∞TA⋅x(ν⋅TA)⋅δ(t−ν⋅TA).
We transform this sampled signal A{x(t)} into the frequency domain:
- The multiplication of the Dirac comb pδ(t) with x(t) corresponds in the frequency domain to the convolution of Pδ(f) with X(f).
- The result is the periodified spectrum P{X(f)}, where fP indicates the frequency period of the function P{X(f)} :
- A{x(t)}∘−−−∙P{X(f)}=+∞∑μ=−∞X(f−μ⋅fP).
This relation was already derived in the chapter "Discrete-Time Signal Representation" but with slightly different nomenclature:
- We now denote the sampled signal by A{x(t)} instead of xA(t).
- The »frequency period« is now denoted by fP=1/TA instead of fA=1/TA.
These nomenclature changes are justified in the following sections.
The graph above shows the functional relationship described here. It should be noted:
- The frequency period fP has been deliberately chosen to be small here so that the overlap of the spectra to be summed can be clearly seen.
- In practice fP should be at least twice as large as the largest frequency contained in the signal x(t) due to the sampling theorem.
- If this is not fulfilled, then »aliasing« must be expected - see chapter »Possible Errors when using DFT«.
Frequency discretization – Periodification in the time domain
The discretization of X(f) can also be described by a multiplication with a Dirac comb in the frequency domain. The result is the sampled spectrum with distance fA:
- A{X(f)}=X(f)⋅+∞∑μ=−∞fA⋅δ(f−μ⋅fA)=+∞∑μ=−∞fA⋅X(μ⋅fA)⋅δ(f−μ⋅fA).
- If one transforms the Dirac comb (with impulse weights fA) into the time domain, one obtains with TP=1/fA:
- +∞∑μ=−∞fA⋅δ(f−μ⋅fA)∙−−−∘+∞∑ν=−∞δ(t−ν⋅TP).
- The multiplication with X(f) corresponds in the time domain to the convolution with x(t). One obtains the signal P{x(t)} periodified with distance TP:
- A{X(f)}∙−−−∘P{x(t)}=x(t)⋆+∞∑ν=−∞δ(t−ν⋅TP)=+∞∑ν=−∞x(t−ν⋅TP).
Example 1: This correlation is illustrated in the graph:
- Due to the coarse frequency rastering, this example results in a relatively small value for the time period TP .
- Therefore due to overlaps, the (blue) periodified time signal P{x(t)} differs significantly from x(t).
- If one wants to achieve P{x(t)}≈x(t) then TP must be chosen much larger than in this example.
Finite signal representation
One arrives at the so-called »finite signal representation«, if both
- the time function x(t),
- the spectral function X(f)
are specified exclusively by their sample values. This graph is to be interpreted as follows:
- In the left graph, the function A{P{x(t)}} is drawn in blue. This results from sampling the periodified time function P{x(t)} with equidistant Dirac deltas with distance TA=1/fP.
- In the right graph, the function P{A{X(f)}} is drawn in green. This results from the periodification (with fP) of the sampled spectral function {A{X(f)}}.
- There is a Fourier correspondence between the blue finite signal (in the left sketch) and the green finite signal (in the right sketch), as follows:
- A{P{x(t)}}∘−−−∙P{A{X(f)}}.
- The Dirac delta lines of the periodic continuation P{A{X(f)}} of the sampled spectral function, however, only fall into the same frequency grid as those of A{X(f)} if the frequency period fP is an integer multiple (N) of the frequency sampling interval fA.
- Therefore, when using the finite signal representation, the following condition must always be fulfilled, where in practice the natural number N is usually a power of two (the above graph is based on the value N=8):
- fP=N⋅fA⇒1/TA=N⋅fA⇒N⋅fA⋅TA=1.
- If the condition N⋅fA⋅TA=1 is fulfilled then the order of periodization and sampling is interchangeable. Thus:
- A{P{x(t)}}=P{A{x(t)}}∘−−−∙P{A{X(f)}}=A{P{X(f)}}.
Conclusions:
- The time function P{A{x(t)}} has the period TP=N⋅TA.
- The period in the frequency domain is fP=N⋅fA.
- For the description of the discretized time and frequency response in each case N complex numerical values in the form of impulse weights are sufficient.
Example 2: A time-limited (pulse-like) signal x(t) is present in sampled form, where the distance between two samples is TA=1µs:
- After a discrete Fourier transform with N=512 the spectrum X(f) is available in form of frequency-samples at spacing fA=(N⋅TA)−1≈1.953kHz.
- Increasing the DFT parameter to N=2048 results in a (four times) finer frequency grid with fA≈488Hz.
From the continuous to the discrete Fourier transform
From the conventional »first Fourier integral«
- X(f)=∫+∞−∞x(t)⋅e−j⋅2π⋅f⋅tdt
arises from discretization (dt→TA, t→ν⋅TA, f→μ⋅fA, TA⋅fA=1/N) the sampled and periodified spectral function
- P{X(μ⋅fA)}=TA⋅N−1∑ν=0P{x(ν⋅TA)}⋅e−j⋅2π⋅ν⋅μ/N.
It is taken into account that due to the discretization, the periodified functions are to be used in each case.
For reasons of simplified notation, we now make the following substitutions:
- The N »time-domain coefficients« are with the variable ν=0, ... , N−1:
- d(ν)=P{x(t)}|t=ν⋅TA.
- Let N »frequency domain coefficients« be associated with the variable μ=0, ... , N−1:
- D(μ)=fA⋅P{X(f)}|f=μ⋅fA.
- Abbreviation is written for the from N dependent »complex rotation factor« :
- w=e−j⋅2π/N=cos(2π/N)−j⋅sin(2π/N).
Definition: The term »Discrete Fourier Transform« (DFT) means the calculation of the N spectral coefficients D(μ) from the N signal coefficients d(ν):
- D(μ)=1N⋅N−1∑ν=0d(ν)⋅wν⋅μ.
In the diagram you can see:
- The N=8 signal coefficients d(ν) by the blue filling,
- the N=8 spectral coefficients D(μ) at the green filling.
Inverse discrete Fourier transform
The »inverse discrete Fourier transform« describes the »second Fourier integral«:
- x(t)=∫+∞−∞X(f)⋅ej⋅2π⋅f⋅tdf
in discretized form:
- d(ν)=P{x(t)}|t=ν⋅TA.
Definition: The term »Inverse Discrete Fourier Transform» (IDFT) means the calculation of the signal coefficients d(ν) from the spectral coefficients D(μ):
- d(ν)=N−1∑μ=0D(μ)⋅w−ν⋅μ.
- With indices ν=0,...,N−1, and μ=0,...,N−1 holds:
- d(ν)=P{x(t)}|t=ν⋅TA,
- D(μ)=fA⋅P{X(f)}|f=μ⋅fA,
- w=e−j⋅2π/N.
- A comparison between »DFT« and »IDFT« shows that exactly the same algorithm can be used.
- The only differences between IDFT and DFT are:
- The exponent of the rotation factor is to be applied with different sign.
- In the IDFT, the division by N is omitted.
Interpretation of DFT and IDFT
The graph shows the discrete coefficients in the time and frequency domain together with the periodified continuous-time functions.
When using DFT or IDFT, please note:
- According to the above definitions, the DFT coefficients d(ν) and D(μ) always have the unit of the time function.
- Dividing D(μ) by fA, one obtains the spectral value X(μ⋅fA).
- The spectral coefficients D(μ) must always be complex in order to be able to consider odd time functions.
- One also uses complex time coefficients d(ν) ⇒ DFT and IDFT are also applicable to band-pass signals.
- The basic interval for ν and μ is usually defined as the range from 0 to N−1 (filled circles in the graph).
With the complex-valued number sequences
- ⟨d(ν)⟩=⟨d(0),...,d(N−1)⟩,
- ⟨D(μ)⟩=⟨D(0),...,D(N−1)⟩,
DFT and IDFT are symbolized similarly to the conventional Fourier transform:
- ⟨D(μ)⟩∙−−(N)−−∘⟨d(ν)⟩.
- If the function x(t) is already limited to the range 0≤t<N⋅TA then the IDFT output directly give the samples of the time function: d(ν)=x(ν⋅TA).
- If x(t) is shifted with respect to the basic interval, one has to choose the association shown in Example 3 between x(t) and the coefficients d(ν).
Example 3: The upper graph shows the asymmetric triangular pulse x(t) whose absolute width is smaller than TP=N⋅TA.
The sketch below shows the assigned DFT coefficients (valid for N=8).
- For ν=0,...,N/2=4 holds d(ν)=x(ν⋅TA) :
- d(0)=x(0),d(1)=x(TA),d(2)=x(2TA),
- d(3)=x(3TA),d(4)=x(4TA).
- The coefficients d(5), d(6) and d(7) are to be set as follows:
- d(5)=x(−3TA),d(6)=x(−2TA),d(7)=x(−TA)
- ⇒d(ν)=x((ν−N)⋅TA).
Exercises for the chapter
Exercise 5.2: Inverse Discrete Fourier Transform
Exercise 5.2Z: DFT of a Triangular Pulse