Experiment 2: Periodic Signals and The Fourier Series
Experiment 2: Periodic Signals and The Fourier Series
1 Introduction
In Experiment 1 we found that a sinusoid of frequency f0 transforms to impulses at +f0 and −f0 .
In this, the second experiment, we will investigate the Fourier series for periodic signals. The
mathematical aspect of the signals will be explained followed by an experiment with the spectrum
analyzer allowing you reinforce these important concepts.
X
∞
x(t) = [an cos(n2πf0 t) + bn sin(n2πf0 t)] (1)
n=0
The Fourier series can also be written in its more convenient but somewhat less intuitive form:
X
∞
x(t) = cn ejn2πf0 t (2)
n=−∞
X(f ) is a summation of impulses. These impulses may only occur at integer multiples (harmonics)
of the fundamental frequency f0 .
We will now observe these impulses by inputting several different periodic signals from the function
generator to the spectrum analyzer. Remember, any real signal, x(t), has a transform magnitude,
|X(f )|, with even symmetry. Because spectrum analyzers are designed to show the transform
magnitude, if we were to look at negative frequencies, we would observe a mirror image of the
positive impulses on the negative frequency axis. The following steps will guide you through the
experiment.
1
3 Fourier Series of a Square Wave
This section will lead you step by step through the process of setting up the Stanford Research
SR770 FFT Network/Spectrun Analyzer to view |X(f )| in real-time.
1. Generate a square wave: Use a function generator to create a square wave of 500 Hz.
2. Connect the function generator to the spectrum analyzer’s A Input using a BNC to BNC
cable.
• Turn the analyzer on while holding down the [←] (backspace) key. Continue holding
down backspace until the Calibrating Offset message appears on the display.
• Once the Calibrating Offset message has cleared, press the AUTO RANGE button
from the ENTRY group.
• Hit the MEAS (measure) button from the MENU group. Hit the Display Menu:
softkey. Next, to change the display from log to linear scale, press the Linear Mag
softkey.
• Press AUTO SCALE from the ENTRY group.
• Now we’ll adjust the frequency range in order to clearly display our signal’s spectrum.
Press FREQ from the MENU goup. Press the Span softkey, and then use the knob
or the SPAN ↓ button to adjust the span to 6.25 kHz.
• From the MARKER group (below the center knob), press MAX/MIN. This centers
the marker region around the largest data point on the graph. The marker should now
be on the 500 Hz impulse. The marker readout above the graph displays frequency and
amplitude of the signal.
4. At this point you should see a large impulse at 500 Hz followed by impulses of decreasing size
at 1500 Hz, 2500 Hz, 3500 Hz, etc. The height of each of these impluses corresponds to the
magnitude of each coeficient, cn , in the Fourier series for our square wave. The first impulse
at 500 Hz corresponds to n = 1 and is has a height proportional to the magnitude of c 1 .
Record the magnitude, in mV, of the first five impulses for n = 1, 3, 5, 7, and 9. To accomplish
the measurements use the on-screen marker. Hit MAX/MIN again to put the marker at
the peak of the impulse at 500 Hz (n = 1). Use the knob to move the marker and measure
the magnitude at each peak.
5. An explanation for the particular pattern of coefficients/impulses that you are witnessing can
be found by solving the following Fourier series analysis equation where T is the time duration
2
10
Relative Magnitude 6
0
0 2 4 6 8 10 12 14 16 18 20
Multiples of f0
1
of one period of our signal and f0 is the fundamental frequency, T.
Z
1
cn = x(t)e−jn2πf0 t dt (4)
T
T
Use equation (4) to derive a general solution for the coefficients, cn , of a square wave with
amplitude A. (Example 4.5 in Dr. Jackson’s book may be helpful.)
6. Use the Matlab FFT (Fast Fourier Transform) function to find the transform of a square
wave. Plot your results. The graph in Figure 1 was generated by taking the FFT a square
wave 10 periods in length. Each period consisted of 40 samples, 20 positive, and 20 negative.
The results obtained with the spectrum analyzer should be supported by both Matlab and
the derived equations. With the impulse at n = 1 as a reference, you should find that the
magnitude of each successive impulse decreases as n1 . Verify that, for the measurements taken
1
from the spectrum analyzer, the impulse at n = 3 is 3 the size of the first impulse, the impulse
1
at n = 5 is 5 the size, etc.
2. Set up the spectrum analyzer in the same configuration that was used for analyzing the square
wave.
3
10
Relative Magnitude 6
0
0 2 4 6 8 10 12 14 16 18 20
Multiples of f0
3. Once again, you should see a large impulse at 500 Hz followed by impulses of decreasing size
at 1500 Hz, 2500 Hz, 3500 Hz, etc. Notice that the impulses decrease in size much more
rapidly than the impulses associated with the square wave. Also notice that the impulses are
only at odd values of n. Why might this be? Record the magnitude, in mV, of the first four
impulses for n = 1, 3, 5, and 7.
4. Use the Matlab FFT function to find the transform of a triangular wave. Plot your results.
The graph in Figure 2 was generated by taking the FFT a triangular wave 10 periods in
length. Each period consisted of 40 samples.
5. Based on your measurements and Matlab experiments, determine the rate at which the mag-
nitude of the coefficients, cn , decrease for a triangular wave. Remember that the coefficients
1
of a square wave decrease as n.
2. Set up the spectrum analyzer in the same configuration that was used for analyzing the square
and triangular waves.
3. This time, you should see a large impulse at 500 Hz followed by impulses of decreasing size at
1000 Hz, 1500 Hz, 2000 Hz, etc. Why are there both odd and even harmonics for this signal,
4
10
Relative Magnitude 6
0
0 2 4 6 8 10 12 14 16 18 20
Multiples of f0
but not for the previous two signals? (See Dr. Jackson’s problem 4.6) Record the magnitude,
in mV, of the first nine impulses for n = 1 to 9.
4. Use the Matlab FFT function to find the transform of a sawtooth wave. Plot your results.
The graph in Figure 3 was generated by taking the FFT a sawtooth wave 10 periods in length.
Each period consisted of 40 samples.
5. Based on your measurements and Matlab experiments, determine the rate at which the mag-
nitude of the coefficients, cn , decrease for a sawtooth wave.