Experiment 9 Fourier Series: 1 Background
Experiment 9 Fourier Series: 1 Background
Fourier Series
Based on Fourier Series Lab in:
Getty, J., The Analysis and Design of Linear Circuits Lab Manual, Wiley, 2004.
OBJECTIVE:
INSTRUMENTS:
• Oscilloscope
• Function Generator
1 Background
The Fourier Series represents a periodic waveform as a sum of an infinite series of sinusoids. The
frequency of the sinusoid corresponding to the primary frequency of the periodic waveform,
f0 = 1/T , is called the fundamental frequency. All of the other sinusoids are called harmonics of
the fundamental frequencies. They are integer multiples of the fundamental frequency. For
example, consider a square wave with a fundamental frequency of 5000 Hz. The Fourier series for
the square wave is given by:
∞
4A X sin (31, 416(2n + 1)t)
f (t) = · (1.1)
π (2n + 1)
n=0
The A in equation 1.1 is the amplitude of the square wave. The actual square wave f (t) and
Fourier series approximation, fapprox (t), using the first 8 harmonics is shown in Figure 1.1 below.
The more harmonics that are kept the more the waveform looks like the square wave.
Because the Fourier series contains only discrete frequencies, the spectral content of a waveform
can be represented as a “stick” plot like Figure 1.2 . In a stick plot each sinusoidal component of
the waveform is represented by a vertical line (or stick) on a plot of the signal magnitude versus
frequency. The height of the line represents the magnitude of the contribution from that
1
Figure 1.2: Frequency Spectrum of f(t)
particular frequency. The location of the line along the horizontal axis identifies its frequency.
For any periodic signal, f (t), the Fourier Series is given by:
∞
X
f (t) = a0 + (an cos(2πf0 nt) + bn sin(2πf0 nt)) (1.2)
n=1
Where:
Z t0 +T
1
a0 = f (t)dt (1.3)
T t0
Z t0 +T
2
an = f (t) cos(2πf0 nt)dt (1.4)
T t0
Z t0 +T
2
bn = f (t) sin(2πf0 nt)dt (1.5)
T t0
For the square wave in equation 1.1 the coefficients are: a0 = 0, an = 0 and bn = 4A/πn where n
is odd.
2 Pre-Lab Work
This section must be completed before starting the lab experiment.
2.1.2 For the square wave in Figure 2.1, find the Fourier coefficients and the Fourier Series
representation of the square wave. Note that the period is T = 20 µsec and the amplitude
is from 0 to 2 volts.
2.1.3 Determine the magnitude of each of the harmonic frequencies. Record these theoretical
values for the first 8 harmonics in a table that has 3 columns labeled: Frequency,
Theoretical Magnitude and Actual Magnitude. If there is a DC component record this in
the table at a frequency of 0. Include this table in your Pre-Lab.
2
Figure 2.1: Experiment Square Wave
2.1.4 Create a ”stick” plot on a semilog graph similar to the one in Figure 1.2. Note if there is
a DC component, you will not be able to plot this on a semilog frequency plot. Include
this plot in your Pre-Lab.
3 Lab Exercises
3.1 FFT Setup
In this section you will set up the oscilloscope to measure the Fourier Series harmonic coefficients
of the square wave in Figure 2.1.
3.1.1 Set the function generator to output the square wave described by Figure 2.1 to a HiZ
input.
3.1.2 Connect the output of the function generator to the Channel 1 input of the oscilloscope.
3.1.3 Adjust the controls on the oscilloscope to display 20 - 30 full waveforms. This should be
about 50 µsec/div on the Horizontal Scaling.
3.1.4 Turn the vertical position knob to ensure the ground position is at 0 volts.
3.1.5 Adjust the Horizontal Position knob so that the waveform is centered on the screen.
3.1.8 Set the FFT Window function to the ”Hanning” window. After these steps have been
completed you should have on the oscilloscope screen something that resembles Figure 3.1
3.1.9 Turn the Horizontal Position knob until the left side of the frequency spectrum is near the
center of the screen.
3.1.10 Use the FFT Zoom soft key at the right of the screen to select ”x5” or ”x10”
3
Figure 3.1: FFT Oscilloscope Trace Example
3.2.2 Select Math as the Source. You should see the two magnitude cursors appear on the
screen. Your oscilloscope screen should look something like Figure 3.2 below.
3.2.3 Use the Horizontal Position knob to set each of the Harmonic frequencies at the center of
the screen. The ”Pos:” display at the top of the screen will tell you what frequency you
are at. Using the Vertical Scaling and the cursor, measure the magnitude of each of the
first 8 harmonic frequency components starting at a frequency of 0. Record these
measurements in the table you created in Pre-Lab.
4
4 Questions and Analysis
4.1 Compare the theoretical magnitudes of the harmonic frequency components to the
measured values. You will need to convert one of the sets of numbers from magnitude to
dB or vice-versa. How do the results compare? What do you think are the sources of the
error?
4.2 Plot the first 8 terms of the Fourier Series using the theoretical coefficients and the
Fourier Series using the measured coefficients on the same graph. How do the shapes of
the graphs compare? Include the graph in your lab report. (Hint: Matlab is very
beneficial for this.)