Professional Documents
Culture Documents
Document
Distribution
Document
History
V1.0
11/22/2004
Prepared by:
Burak Kelleci
The draft versions are numbered as v0.x. The release versions are numbered as v1.x.
Trademarks
The trademarks contained in this document are the property of their respective owners.
11/22/2004 ii
Contents
11/22/2004 iii
Practical Usage of Fast Fourier Transform (FFT)
1 Introduction
Fourier Transform is one of the widely used mathematical tools by the engineers. It reduces the
complex problems, such as spectrum analysis, in a more understandable form. It is almost
impossible to analyze spectrum of any signal without using Fourier transform. Therefore, it is an
essential tool during computer aided design of circuits and systems. However, computer can not
use real numbers; it has to use finite precision numbers due to its digital nature. It is also not
possible to process continuous signals in a computer; all the signals must be discrete. These
requirements can be solved by discrete Fourier transform (DFT). Using the discrete version of
Fourier transform, computer can easily calculate the Fourier transform of any signal. The
calculation speed of DFT is also reduced by Fast Fourier Transform (FFT). This powerful tool
comes with almost all the circuit and system design tools. In this document the examples are
only for Matlab or Cadence. However, the theory is independent of the used tool. The examples
can be transferred to any tool which uses FFT. For example, Spice, Agilent ADS, SystemView,
Hspice, Eldo.
A brief history of Fourier is given in chapter 2. The definitions are presented in chapter 3.
However, these definitions are complex to use during the design. Therefore, a practical version is
presented in chapter 4. The Fourier transform of a sinusoidal signal is calculated in chapter 5.
The methods to calculate DFT in Cadence and Matlab is presented in chapter 6. The most made
error is the selecting the sampling frequency non-integer multiple of input signal. This problem
is explained in chapter 7. Aliasing, in other words downconversion of the signals above the half
of sampling frequency into the band is covered in chapter 8. Windows can be used to improve
the dynamic range. The differences between the windows are explained in chapter 9. Finally, a
practical recipe is presented in chapter 10. Two examples, a delta sigma and mixer, are also
presented in the appendix.
11/22/2004 . 1
Practical Usage of Fast Fourier Transform (FFT)
2 History
Before describing the FFT, a brief history of this mathematical tool and its founders would be in
order. Joseph Fourier developed the basis for the FFT. While James Cooley and John Tukey
developed the FFT algorithm.
11/22/2004 . 2
Practical Usage of Fast Fourier Transform (FFT)
2.1 Fourier
Born the son of an Auxerre tailor in 1768, Jean Baptiste Joseph Fourier lived to become one of
France's greatest administrators, historians, and mathematicians. He graduated with honors from
the military school in Auxerre, joined the staff of the Ecole Normale and then the Polytechnique
in Paris. He went to Egypt with Napoleon, who made him Governor of Lower Egypt after the
1798 expedition. After returning to France he was made prefect at Grenoble in 1802 and then
baron in 1809, finally ending up as secretary of the Academie des Sciences in 1816 and fellow in
1817. He contributed heavily to Description de l'Egypte, which covered the cultural and
scientific results of Napoleon's invasion of Egypt, issuing 21 volumes over the period from 1808
to 1825. This work led to establishing Egyptology as a recognized new and separate discipline.
Fourier's interest in heat conduction led him to begin work in 1807 on Theorie analytiquede la
chaleur (The Analytic Theory of Heat). Published in 1822, it shows how a mathematical series of
sine and cosine terms can be used to analyze heat conduction in solid bodies. Probably the first
systematic application of a trigonometric series to a problem solution, Fourier spent the rest of
his life working on it and expanding it to include the Fourier integral prior to his death in 1830.
Both the series and the integral allow transformation of physically realizable time-domain
waveforms to the frequency domain and vice versa. Today many areas of study benefit from
Fourier analysis, however the method did not gain acceptability in Fourier's time although
infinite series were in use, most notably Leonard Euler's. The reason behind this was the distrust
of the use of series. One influential mathematician in 1828 commented: "Divergent series are the
invention of the devil, and it is shameful to base on them any demonstration whatsoever". Since
then work by Dirichlet, Friedrich, Riemann, and others have resolved any doubts about the
validity of the Fourier series.
The Fourier transform frequency domain contains the exact same information as that of the
original function, thus, Fourier analysis allows one to examine a function from another point of
view and is used in seemingly unrelated topics from quantum physics to antennas.
11/22/2004 . 3
Practical Usage of Fast Fourier Transform (FFT)
11/22/2004 . 4
Practical Usage of Fast Fourier Transform (FFT)
where X (k ) is the kth coefficient of the DFT and x(n ) denotes the nth sample of the time series
which consists of N samples and j = − 1 . The x(n ) 's can be complex numbers and the X (k ) 's
are almost always complex.
There exists the usual inverse of the DFT and, because the form is very similar to that of the
DFT, the FFT may be used to compute it. The inverse of Eqn. (3.1) is
1 N −1
x(n ) = ∑ X (k )e j 2πkn / N n = 0, L N − 1 (3.2)
N k =0
This relationship is called the inverse discrete Fourier Transform (IFFT). It is easy to show that
this inversion is valid by inserting Eqn. (3.1) into Eqn. (3.2)
N −1 N −1
x(n ) = ∑∑ ( x(n ) N )e − j 2πkn / N n = 0,L N − 1 (3.3)
k =0 n =0
Interchanging in Eqn. (3.3) the order of summing over the indices n and k, and using the
orthogonality relation
N −1
− j 2π ( n − m ) / N
∑e
k =0
= N , if n = m mod N
(3.4)
= 0, otherwise
establish that the right side of Eqn.(3.3) is in fact equal to x(n ) .
It is useful to extend the range of definition of X (k ) to all integers (positive and negative).
Within this definition it follows that
X (k ) = X ( N + k ) = X (2 N + k ) = L (3.5)
Similarly,
11/22/2004 . 5
Practical Usage of Fast Fourier Transform (FFT)
∆t∆f = 1 N (4.1)
where ∆t is the time difference between two consecutive samples and ∆f is the frequency
resolution. Using Eqn. (4.1) the following important relations are derived,
Sample
Tsim
time
∆t
11/22/2004 . 6
Practical Usage of Fast Fourier Transform (FFT)
Spectrum
Using Eqns. (4.2) and (4.3) the DFT can be written in the following form
N −1
X (k ) = ∑ x(n )e − j 2πkn (∆t∆f ) k = 0,L N − 1
n =0
N −1
(4.4)
= ∑ x(n )e − j 2πkn / N
n =0
X (k ) = X * ( N − k ) (4.5)
holds, where * indicates complex conjugate. This relation implies that only the first N / 2 values
of X (k ) are unique. Thus, the maximum frequency, Fmax , can be modified to
Fmax (useful) = f s 2 . This is, of course, Nyquist's sampling theorem. Since the first point in the
frequency spectrum represents DC signal, the last point is at fs 2 − ∆f .
11/22/2004 . 7
Practical Usage of Fast Fourier Transform (FFT)
Now let's apply the basic formula to the case where the signal is a sine wave.
x(t ) = cos(2πf 0t )
x(n ) = cos(2πf 0 n∆t )
= cos(2π r∆f n∆t ) (5.1)
[
= e j 2πnr∆f∆t
+e − j 2πnr∆f∆t
]/ 2
= [e j 2πnr / N
+ e − j 2πnr / N / 2 ]
where the frequency is chosen in the form f 0 = r∆f , where r is not necessarily an integer.
( )
N −1
X (k ) = ∑ e − j 2πkn / N e j 2πnr∆f∆t + e − j 2πnr∆f∆t / 2
n=0
(5.2)
1 N −1
[
= ∑ e j 2πn (r − k ) / N + e − j 2πn (r + k ) / N
2 n=0
]
Equation (5.2) is a geometric series and can be evaluated in closed form as,
1 sin 2 (π (r − k )) sin 2 (π (r + k ))
P (k ) = + (5.4)
2 sin 2 (π (r − k ) / N ) sin 2 (π (r + k ) / N )
Consider the cases where l is an integer, and r ≠ k . Then P (k ) = 0 since k is an integer also.
When r = k both numerator and denominator are 0, and the limiting result is P (r ) = N 2 2 . Thus,
when r is an integer, the digital spectra produces the intuitive result that P = 0 everywhere
except at the input signal frequency f l = r∆f .
11/22/2004 . 8
Practical Usage of Fast Fourier Transform (FFT)
Matlab and Cadence have built-in fast fourier transform (FFT) routines to calculate signal
spectrum. The main advantage of FFT with respect to DFT is it needs fewer multiplications.
Although DFT requires N 2 complex multiplications, FFT requires only (3 N 8) log 2 ( N ) for
Radix-4 algorithm. For example if N = 16 , DFT requires 256 multiplications, FFT requires only
24 . For higher N numbers the difference increases dramatically. N vs. multiplication number
is shown in Fig. 6.1. The main drawback of FFT is that log 2 (N ) must be an integer number.
Otherwise, DFT must be used to calculate the frequency spectrum. Although Matlab has built-in
DFT routines, Cadence has not built-in DFT. Cadence rounds log 2 (N ) nearest integer and
calculates the sampling frequency using this N value. For example, if 10 samples are obtained
instead of 16, Cadence first rounds up FFT number to 16 and calculate 16 samples using
interpolation. This technique creates harmonics due to the interpolation.
10
10
DFT Complex Multiplication Number
FFT Complex Multiplication Number
8
10
Number of Complex Multiplications
6
10
4
10
2
10
0
10
-2
10
0 1 2 3 4 5
10 10 10 10 10 10
FFT Number
11/22/2004 . 9
Practical Usage of Fast Fourier Transform (FFT)
complex conjugate of positive frequencies for real signals, obtaining only positive frequencies is
enough. Therefore, the spectrum value of the input signal should be set to signal rms or
amplitude value. Dividing the FFT output by N / 2 gives rms value. However, in most
applications only signal amplitudes are considered. Therefore, the FFT output is multiplied by
2 / N to obtain amplitude of the signal. On the other hand, at DC the power is not separated to
two spectral components. Therefore, the DC component should be multiplied by 1/N.
Most of the time, the frequency resolution and sampling frequency are important parameters for
FFT calculations. The other parameters, such as number of FFT or time and frequency vectors
can be easily calculated from these parameters. FFT number N can be obtained by dividing
sampling frequency by frequency resolution. If negative frequencies are also considered the
frequency vector starts at (− f s / 2 ) and ends at (f s / 2 − df ) . The step should be equal to
frequency resolution. On the other hand the time data starts at 1 / f s and ends at 1 / df . Since the
sampling frequency is f s , the time step should be 1 / f s . The time vector can also starts at 0 ,
however, now it should end at (1 / df − 1 / f s ) , since only N number samples are needed.
Let's examine the output spectrum of a sinusoidal signal. The amplitude is selected as 1 V and
the frequency is selected 2 Hz . The output spectrum is shown in Fig. 6.2. In the spectrum the
signals at input signal frequency are at 2 Hz and − 2 Hz as expected. However, FFT result
shows signals at the other frequencies. These signals amplitudes are 300 dB less than the input
signal frequency. The reason for these signals is that the double number precision. Since all the
numbers in a computer is finite, this causes a numerical noise. Therefore, their spectral density is
flat. If the computer calculates the sampling instants by interpolations, this causes more
numerical noise. Therefore, interpolation should be avoided.
Till now N is assumed an even number. If it is an odd number, the frequency vector changes
slightly. It starts at (− f s / 2 + df / 2 ) instead of (− f s / 2 ) and ends at (f s / 2 ) instead of
(f s / 2 − df ) .
11/22/2004 . 10
Practical Usage of Fast Fourier Transform (FFT)
11/22/2004 . 11
Practical Usage of Fast Fourier Transform (FFT)
11/22/2004 . 12
Practical Usage of Fast Fourier Transform (FFT)
-50
-100
Magnitude (dB)
-150
-200
-250
-300
-350
-8 -6 -4 -2 0 2 4 6 8
Frequency (Hz)
300
200
Phase (degrees)
100
-100
-200
-300
-400
-8 -6 -4 -2 0 2 4 6 8
Frequency (Hz)
11/22/2004 . 13
Practical Usage of Fast Fourier Transform (FFT)
subplot(2,1,2),plot(f,phase_xfn);
subplot(2,1,2),xlabel('Frequency (Hz)');
subplot(2,1,2),ylabel('Phase (degrees)');
subplot(2,1,2),grid;
figure(2);
plot(t,x);
xlabel('Time (s)');
ylabel('Input Signal');
11/22/2004 . 14
Practical Usage of Fast Fourier Transform (FFT)
-50
-100
Magnitude (dB)
-150
-200
-250
-300
-350
0 1 2 3 4 5 6 7
Frequency (Hz)
250
200
Phase (degrees)
150
100
50
-50
0 1 2 3 4 5 6 7
Frequency (Hz)
This simulation is also repeated in Cadence. Frequency spectrum of a sinusoidal source is shown
in Fig. 6.4. However, the spectrum shows high numerical noise comparing Matlab results. Since
simulator does not calculate at every datapoint, the FFT samples are calculated using
interpolation. This procedure increases numerical noise dramatically. One way to reduce this
noise is tighten the tolerances. This method causes convergence problems. The best method is to
force the simulator to calculate at the FFT sample points. To do this, the strobeperiod parameter
is set to 1 / f s , which is 1 / 16 = 0.0625 in this example. The skipstart parameter is set to 0 , since
the sampling starts at 0 s . The strobedelay is also set to zero, since there is no phase difference
between the first sample point and skipstart. The simulation result is shown in Fig. 6.5. Now
Cadence simulation result is same as the Matlab result. If the signal shows some transient
behavior, the skipstart parameter should be set higher than 0 to take FFT at steady state.
11/22/2004 . 15
Practical Usage of Fast Fourier Transform (FFT)
11/22/2004 . 16
Practical Usage of Fast Fourier Transform (FFT)
7 Non-Integer r
In the previous chapters the input signal is integer multiple of frequency resolution. However,
especially during measurement of signals, it is not always possible to select the input signal at
the multiple of frequency resolution. In the following example, the sampling frequency is
selected as 16 Hz and frequency resolution is 1 Hz. The input signal is selected at 2.555 Hz,
which is 2.555 times of frequency resolution. The spectrum is shown in Fig. 7.1. The spectrum
seems distorted. Decreasing frequency resolution to 0.01 Hz does not solve the problem. The
input frequency is still non-integer multiple of frequency resolution. Finally, when the input
signal frequency is integer multiple of the frequency resolution, the spectrum is as expected.
-2
-4
-6
-8
Magnitude (dB)
-10
-12
-14
-16
-18
-20
0 1 2 3 4 5 6 7
Frequency (Hz)
11/22/2004 . 17
Practical Usage of Fast Fourier Transform (FFT)
-10
-20
Magnitude (dB)
-30
-40
-50
-60
0 1 2 3 4 5 6 7 8
Frequency (Hz)
-50
-100
Magnitude (dB)
-150
-200
-250
-300
-350
0 1 2 3 4 5 6 7 8
Frequency (Hz)
11/22/2004 . 18
Practical Usage of Fast Fourier Transform (FFT)
Now, the question is why spectrum shows some modulation, when the input signal is selected
non-integer multiple of frequency resolution. Although there is no modulation on the signal, the
spectrum is correct. This result can be verified by analytical expression. Figures 7.1 and 7.2
show what is called bin splatter. In digital signal processing books this phenomena is referred as
leakage. Note how slowly the skirts decrease as a function of frequency (actually 1 / f 2 ). To
obtain a physical picture the basic analog Fourier transform is evaluated for the same sine wave.
The spectra is
1 sin 2 (π ( f 0 − f )T )
sin 2 (π ( f 0 + f )T )
P( f ) = + 2
2
((
(7.1)
2 sin (π ( f 0 − f )T / N ) sin π f 0 + f T / N
) )
Near f 0 Eq. (7.1) can be simplified using the assumption sin ( x ) ≈ x for small x values.
1 sin (π ( f 0 − f )T )
2
P( f ) ≈ (7.2)
2 (π ( f 0 − f )T / N )
This expression has maximum at f = f 0 , and the nulls are separated at integer multiples of 1 / T
from this maxima. If P ( f ) is evaluated for discrete frequencies, which are multiples of 1 / T , the
maxima of the peak is sampled, while for any other sample the value is zero. However, when f in
equals 32.5 Hz , the 1 Hz samples intersect the spectrum as shown in Fig. 7.5. This result is
identical to the result in Figs. 7.1 and 7.2.
0 0
-5
-50
-10
-100
-15
-20
Magnitude (dB)
Magnitude (dB)
-150
-25
-200
-30
-250 -35
-40
-300
-45
-350
27 28 29 30 31 32 33 34 35 36 37 -50
Frequency (Hz)
28 29 30 31 32 33 34 35 36 37
Frequency (Hz)
11/22/2004 . 19
Practical Usage of Fast Fourier Transform (FFT)
8 Aliasing
In previous chapters the signal is assumed band-limited and does not have any spectral
components above fs/2 . However, it is not valid in some applications, such as DAC. The output
of a DAC has abrupt changes, which requires infinite bandwidth. When the FFT of a signal with
inifinite bandwidth is taken, the frequency components higher than fs/2 is downconverted to the
band. For example, the FFT of square wave is shown in Fig. 8.1. The signal frequency is
1.5 Hz, and the frequency resolution is 0.1 Hz. The sampling frequency is selected 16 Hz. Since
square wave need infinite bandwidth, the odd harmonic components above 8 Hz will be
downconverted. The signal frequencies are summarized in Tab. 8.1. To find the frequency of the
downconverted signals, the following formula can be used
50
-50
-100
Magnitude (dB)
-150
-200
-250
-300
-350
0 1 2 3 4 5 6 7 8
Frequency (Hz)
11/22/2004 . 20
Practical Usage of Fast Fourier Transform (FFT)
To reduce the aliasing problem, the signal must be bandlimited before FFT. A low-pass filter
serves very well. However, filtering changes signal phase. To reduce phase delay a low order
filter can be used. However, low order filter may be not enough to suppress high frequency
components. To overcome this problem, sampling frequency should be increased till required
attenuation of signals over fs/2 guaranteed. The drawback of this method is that for the same
frequency resolution higher sampling frequency results in higher simulation time.
Matlab has many built-in filter functions. However, Cadence can simulate only s-domain transfer
functions. To use this property, the component svcvs must be used. This component can be used
to realize any s-domain transfer function. The filter coefficients can be calculated in Matlab, and
entered in svcvs to realize the filter in Cadence.
11/22/2004 . 21
Practical Usage of Fast Fourier Transform (FFT)
9 Windowing
The DFT results can be significantly different than what might be viewed on an analog spectrum
analyzer if the input signal is non-integer multiple of frequency resolution. In this case the signal
can be recovered by applying appropriate window to the data. The well-known window functions
are summarized in Tab. 9.1. The windows are distinguished according to their following
properties, which is shown in Fig. .9.1.
Peak Sidelobe Level: It gives one indication of the dynamic range of the window. That is, how
small can signal be and still be detected in the presence of a large signal and its sidelobes.
Rolloff Rate: This parameter describes the amplitude fall off of sidelobe peaks. This is another
indication of the available dynamic range is the rolloff rate of the window.
3 dB Bandwidth: The resolution of the window, i.e., the ability to distinguish two closely spaced
sinusoids from a single sinusoid, is dictated by the 3 dB Bandwidth.
Coherent Gain: This is a measure of the window that takes into account data sequence weighting
and assumes a sinusoid is centered. The coherent gain GC is given by
1 N −1
GC = ∑ w(n )
N n=0
(9.1)
11/22/2004 . 22
Practical Usage of Fast Fourier Transform (FFT)
Peak Sidelobe
(dB) Rolloff Rate
(dB/oct)
3dB
Bandwidth
To demonstrate different window performances FFT of a signal with two spectral components is
taken. The frequency resolution is selected 0.1 Hz and sampling frequency is 16 Hz. The spectral
components are at 2 Hz and 2.55 Hz. Although the component at 2 Hz is at integer multiple of
frequency resolution, the other component is not. The power of signal at 2 Hz is 40 dB lower
than the other one. The spectrum with rectangular window is shown in Fig.~\ref{rect}. It is
obvious it is not possible to seperate the signals. Using windowing these signals can be
distinguished. Kaiser and Blackman-Harris windows shows best performances, since their peak
sidelobe is very low. Every window distinguishes the signals, and the calculated levels are also
correct. For example, the blackman window gives 0 dB (1V) for the signal at 2.55 Hz and -40 dB
(0.01V) for the signal at 2 Hz. The peak of 2 Hz signal is not flat, therefore this signal at the
integer multiple of frequency resolution. The peak of the other signal is flat, which shows that
this signal is not integer multiple of frequency resolution.
Kaiser window has a parameter to set the sidelobe height. To achieve a sidelobe height of
− α dB , the β parameter is
11/22/2004 . 23
Practical Usage of Fast Fourier Transform (FFT)
0 0
-5
-10
-10
-20
-15
Magnitude (dB)
Magnitude (dB)
-20 -30
-25
-40
-30
-50
-35
-40 -60
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
Frequency (Hz) Frequency (Hz)
Figure 9.2Output Spectrum (Rectangular Figure 9.3 Output Spectrum (Hamming Window)
Window)
11/22/2004 . 24
Practical Usage of Fast Fourier Transform (FFT)
0 0
-10
-50
-20
-100
-30
-40
Magnitude (dB)
Magnitude (dB)
-150
-50
-200
-60
-70 -250
-80
-300
-90
-100 -350
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
Frequency (Hz) Frequency (Hz)
Figure 9.4 Output Spectrum (Hanning Window) Figure 9.6 Output Spectrum (Kaiser Window
β = 50 f in = 2.55 and 2 Hz )
0
0
-10
-50
-20
-100
-30
Magnitude (dB)
Magnitude (dB)
-150
-40
-50 -200
-60
-250
-70
-300
-80
0 1 2 3 4 5 6 7 8
Frequency (Hz)
-350
0 1 2 3 4 5 6 7 8
Frequency (Hz)
-20
-40
Magnitude (dB)
-60
-80
-100
-120
-140
0 1 2 3 4 5 6 7 8
Frequency (Hz)
11/22/2004 . 25
Practical Usage of Fast Fourier Transform (FFT)
Definitions
fs: Sampling Frequency
(Cadence plots only from 0 to (f s / 2 ) , since for real signals positive and negative frequency
components have same magnitude response)
The signals and intermodulation products must be integer multiple of frequency resolution.
For example:
11/22/2004 . 26
Practical Usage of Fast Fourier Transform (FFT)
strobedelay: The delay (phase shift) between the skipstart time and the first strobe point.
Set strobeperiod, strobedelay and skipstart parameters to force the simulator to calculate at
sampling points.
If possible use PSS analysis to calculate spectrum. PSS will automatically calculate at sample
points.
Clean first lines in temp.dat, the file should starts with numbers.
The following Matlab code can be used to import the simulation data
[t,x]=textread('temp.dat','\%f\%f');
11/22/2004 . 27
Practical Usage of Fast Fourier Transform (FFT)
%N is even
fs=16; %Sampling Frequency
df=1; %Frequency Resolution
N=fs/df; %FFT Number
f=0:df:fs/2-df; %Output Frequency
t=1/fs:1/fs:1/df; %Time Data
x=cos(2*pi*2*t); %Input Signal
w=window(@rectwin,N); %select appropriate window
xw=x.*w';
xf=(N/sum(w))*fft(xw)*2/N;
xfn=xf(1:N/2);
xfn(1)=xfn(1)/2; %Normalize DC
mag_xfn=20*log10(abs(xfn));
figure(1);
plot(f,mag_xfn,'k');
xlabel('Frequency (Hz)');
ylabel('Magnitude (dB)');
grid;
%N is odd
fs=15; %Sampling Frequency
df=1; %Frequency Resolution
N=fs/df; %FFT Number
f=0:df:fs/2-df/2; %Output Frequency
t=1/fs:1/fs:1/df; %Time Data
x=cos(2*pi*2*t); %Input Signal
w=window(@rectwin,N); %select appropriate window
xw=x.*w';
xf=(N/sum(w))*fft(xw)*2/N;
xfn=xf(1:(N+1)/2);
xfn(1)=xfn(1)/2; %Normalize DC
mag_xfn=20*log10(abs(xfn));
figure(1);
plot(f,mag_xfn,'k');
xlabel('Frequency (Hz)');
ylabel('Magnitude (dB)');
grid;
Do not use time data and input signal lines if you read the data from a file.
11/22/2004 . 28
Practical Usage of Fast Fourier Transform (FFT)
Reference
[1] M. L. Schiff, “Spectral Analysis Using Digital FFT Techniques,” System View Times, vol. 2,
April 1997.
[5] B. Liu, Digital Filters and The Fast Fourier Transform, Halsted Press, 1975.
11/22/2004 . 29
Practical Usage of Fast Fourier Transform (FFT)
Appendix
11/22/2004 . 30
Practical Usage of Fast Fourier Transform (FFT)
11/22/2004 . 31
Practical Usage of Fast Fourier Transform (FFT)
Bulk-Driven Mixer
The conductivity of a Mosfet transistor is normally controlled by the gate-capacitance. The
voltage across the gate and source controls the conductivity of the channel. However, the drain
current can be controlled by the bulk voltage of the transistor. Under normal operating conditions
this is a parasitic effect and can degrade the performance by introducing unwanted gmb.
However, for some applications this parasitic effect can be used to construct simple mixer. The
gate and bulk are driven with signal and oscillator respectively. The square wave characteristic
of the Mosfet, generates mixing products of these two signals. The example circuit (Fig. B.1) is
designed in TSMC 0.35µm technology. The frequency resolution is selected 100 Hz in order to
distinguish the harmonics easily. The output is filtered using a first order filter to avoid the
aliasing. The cutoff frequency is selected 100 KHz . Since the sampling frequency is
1.6384MHZ, more than 20dB attenuation beyond the sampling frequency is guaranteed. The
spectrum is shown in Figs. B.2 and B.3. Since the circuit is single unbalanced mixer, the input
signals appear at the output. The mixing products and harmonics can be easily separated. There
are also the mixing products of harmonics with input signals.
11/22/2004 . 32
Practical Usage of Fast Fourier Transform (FFT)
Vdd=3.3V
1m
out
10µ/0.35µ
Vo=0V
Vo=1.3V
Va=10mV
Va=1mV
freq=9K
freq=2K
11/22/2004 . 33
Practical Usage of Fast Fourier Transform (FFT)
11/22/2004 . 34