Using The FFT As An Arbitrary Function Generator
Using The FFT As An Arbitrary Function Generator
Abstract – The inverse fast Fourier transform non periodic extensions of the time series formed
(IFFT) forms a time series from its spectral by a sequence of successive IFFTs can also
description. The time data formed by the IFFT formed without boundary discontinuities. This is
represents a single cycle of a periodic accomplished by suppressing the discontinuities
waveform which can be accessed periodically with a window and then merging successive time
to form an arbitrary length version of the series by the sum of overlapped and windowed
signal. This property is similar to the periodic time series. Wide dynamic range signals require
memory access used by arbitrary function 75% overlap of the windowed time segments.
generators. A sequence of windowed, This is seen to be the inverse of the process
overlapped IFFTs can be used to seamlessly called a sliding windowed FFT applied in
extend the time series to obtain any arbitrary traditional spectral analysis to analyze time
non-periodic time series. This option is not varying spectra. This set of operations for both
available from traditional arbitrary function the analysis process and the synthesis process is
generators. illustrated in Figure 1.
Input Tim e Line
INTRODUCTION Frequenc y
N
Arbitrary waveform generators, available from Point
FFT
many suppliers, permit the user to design and Suc c essive
Authorized licensed use limited to: Renesas Electronics America. Downloaded on December 20,2022 at 07:39:43 UTC from IEEE Xplore. Restrictions apply.
WINDOW DESIGN cosine components of the 50% shifted terms are
phase shifted 180 degrees. Due to this phase
The first question addressed is the structure of the shift, the cosine terms from the indicated partition
window that will ensure artifact free reconstruction sum to zero and the steady state sum is simply
of the time series formed by the merging process. twice a0, the DC term. Note: If the window
The merged overlapped sum of window segments contains a second harmonic term, as do the
is expected to exhibit a constant envelope. This Blackman and 3-term Blackman-harris windows,
envelope can be thought of as the reconstruction the half interval time delay does not phase shift
of a DC input signal which has been partitioned the second harmonic and the sum of these offset
and windowed and then reassembled by the windows would contain a DC component of 2 a0
merging process. Figure 2 illustrates an example and a second harmonic term of 2 a2. The
of the incidental envelope scalloping that may surviving harmonic term is the envelope
occur as a result of the merging operation. scalloping that must be suppressed by proper
window design. This example shows that
Artifac t of Merged Sum windows with 50% overlap cannot contain spectral
components which are even harmonics of the
fundamental time interval.
T
a1 a1 a1 a1
H(n) H(n-N) H(n-2N) H(n-3N)
Sp e c tra l
Co m p o nents a0 a0 a0
in
Suc ce ssive
Wind ow a1 a1 a1
Inte rva ls
H(n-N/2) H(n-3N/2) H(n-5N/2) H(n-7N/2)
Artifa c t Free
Sum a1
2a 0
a1
409
Authorized licensed use limited to: Renesas Electronics America. Downloaded on December 20,2022 at 07:39:43 UTC from IEEE Xplore. Restrictions apply.
hw ( n ) h ( n ) w( n )
(4)
H w (T ) H (T ) W (T ); T mod(2S )
f
H (T ) ¦ exp( jT n ) exp( jT n)
0 G (T T 0 ) (5)
n f
H w (T ) G (T T0 ) W (T ) W (T T 0 ) (6)
N 1
2S 2S
HW (k ) ¦ w(n) exp( j N k0n ) exp( j kn )
n 0 N (7)
N 1
2S
¦ w( n ) exp( j (k k0 )) W ( k k0 )
n 0 N
410
Authorized licensed use limited to: Renesas Electronics America. Downloaded on December 20,2022 at 07:39:43 UTC from IEEE Xplore. Restrictions apply.
shows the spectrum and time series for the prior to applying the inverse synthesis processing.
options of forming un-windowed and windowed In the most general case, the index k0 contains an
time series. In successive transforms the window integer part and a fractional part. For example,
weights would acquire the phase shift shown in forming samples of the sinusoid with frequency
(8) which for an integer address turns out to be 0.1 in a 256 point DFT would correspond to a
simply multiples of S/2. center frequency of 0.1·fs, which is centered at
index 25.6. For this example, the integer part of
Real[H(k)] Real[h(n)]
N the index is 25 and the fractional part is 0.6 or
Point
IDFT
alternatively 26 and -0.4, respectively. The
Im ag[h(n)]
position of the translated window spectrum and
Im ag[H(k)]
K= k0
DFT corresponding to this example is shown in
k n
Figure 7.
Sa m pled
Real[H(k)] Spec tral Real[h(n)]
Wind ow Sam pled
N
Point Tim e Domain To compute the DFT coefficients of the base band
Window
IDFT window offset by -0.4, use the relationship shown
Im ag[H(k)]
K= k0
Im ag[h(n)] in the first 3-line for-loop of the MATLAB Script
(Figure 8), and apply the proper phase rotation to
k n the successive offset windowed transforms, using
the second 3-line for-loop of the same MATLAB
Figure 6. Spectrum and Time Series for the script. Readers can form their own MATLAB
Synthesis of Un-windowed and Windowed Time script for a Blackman-harris window, can access
Series the MATLAB script Window, or can request copies
from the authors.
When the selected center frequency index is not
an integer, there is one additional task to perform
W(k-k0)= W(k-25.6)
25.6
22 23 24 25 26 27 28 29 30 Translated DFTIndex
Figure 7. Window Samples of Base Band Window Translated -0.4 Bins and of Center Frequency Window
Translated 25.6 Bins
% DFT h(k+dk)
for kk=-4:4
wwf(kk+5)=ww*exp(j*2*pi*(0:15)*(kk-dk)/16)';
end
Figure 8. MATLAB Script for Frequency Offset Window and Phase Rotator for Successive Windowed
and Overlapped Transforms
411
Authorized licensed use limited to: Renesas Electronics America. Downloaded on December 20,2022 at 07:39:43 UTC from IEEE Xplore. Restrictions apply.
The sequence of time series, formed by the non-integer number of cycles causes spectral
phase-rotated offset window terms of this leakage to all frequency bins of the DFT.
synthesis process, exactly match the sequence of Windows applied as spectral convolutions
windowed time series formed by windowing the suppress the time domain discontinuity and permit
original sinusoidal time series of frequency 0.1. compact spectral sinusoids of the arbitrary
Figure 9 shows the initial segment of the time frequency. By proper selection of the window, the
series and the spectrum of the steady state time merging by summation of overlapped time
series formed by this synthesized inverse analysis intervals forms time series with processing
process. Spectral artifacts associated with this artifacts suppressed by approximately 100 dB.
synthesis process are down 100 dB relative to the Any signal formed as a discrete set of arbitrary
full scale signal. center frequency sinusoids can be formed in this
manner. This method can also be used to form
CONCLUSION sinusoids with slowly time varying center
frequencies.
This paper describes a technique permitting the
synthesis of one or more complex sinusoids of REFERENCES
arbitrary frequency using windowed inverse DFTs.
At first glance, only sinusoids with an integer [1] f. j. harris, “Windows Harmonic Analysis and
number of cycles per interval can be synthesized the Discrete Fourier Transform,” IEEE
exactly by spectral descriptions of the sinusoid. Proceedings, Jan 1978
The time domain discontinuity of sinusoids with
Figure 9. Time Series and Spectrum Formed by Merging Windowed and Overlapped Synthesized Time
Series
412
Authorized licensed use limited to: Renesas Electronics America. Downloaded on December 20,2022 at 07:39:43 UTC from IEEE Xplore. Restrictions apply.