Testing The Validity of The Fourier Series Using A Function Generator
Testing The Validity of The Fourier Series Using A Function Generator
I. A BSTRACT Noting that sin 0 = 0 and cos 0 = 1, we can change the index
from W → N such that Eq 1 can be written
In this study we check the validity of the Fourier Series
∞
in predicting a wave form’s frequency spectrum. The Fourier a0 X
Series uses an infinite sum over a complete basis set in f (t) = + (an cos nωt + bn sin nωt) . (2)
2 n=1
L2 space to generate a signal. Because infinite sums are
impractical, function generators approximate a signal. Using where τ = 2/T , a0 /2 is the vertical shift of the function,
custom software, we collected data from a function generator 1 τ
Z
for two different wave forms and compared the coefficients to an = f (t) cos(nωt)dt (3)
τ −τ
theoretical values. We report reduced χ2 values of 1.03 for the
square wave and 2.62 for the triangle wave, suggesting great and Z τ
fit of the model to experiment. bn = f (t) sin(nωt)dt. (4)
−τ
III. T HEORY
The Fourier Series mathematically describes the fact that
any periodic function is an element of an infinite-dimensional
function space. The basis-functions of the Hilbert Space Fig. 1. Square wave with amplitude A, period 2T.
described above (L2 ) are of the form sin nωt and cos nωt
where n ∈ W. Any function can be described as an infinite The square wave (Fig 1) has the equation
combination of these basis functions, with projection weights.
−A; −T < t < 0;
f (t) =
A; 0 < t < T .
For a more physical description, the Fourier Series is a
transformation of a periodic function from time-space to Because the function is odd, all an coefficients are 0 and
frequency-space. We may observe a signal, which is a 4A
combination of many frequencies put together. The Fourier bn =
. (5)
nπ
Series of the signal tells us how much of each frequency is We find the Fourier Series of the wave form to be
included in the signal in question. ∞
4A X 1 (2n − 1)
f (t) = sin t . (6)
We describe any periodic signal of period T from the π n=1 2n − 1 T
time domain to be
∞
X ∞
X
f (t) = an cos nωt + bn sin nωt. (1)
n=0 n=0
2
Triangle Wave
Frequency(Hz) Experiment Theory Fig. 7. Sine wave data plotted as frequency vs. amplitude (experimental
1000 1.00 1.00 values in blue, theoretical in orange) (note that the error bars are too small
2990 0.10 0.11 to see).
4970 0.04 0.04
6950 0.02 0.02
7750 0.00 0.02
TABLE II However, we saw two small harmonics at f =1990Hz and
N ORMALIZED EXPERIMENTAL AND THEORETICAL VALUES FOR THE 2990Hz for the sine wave, which clearly should have been
TRIANGLE WAVE LISTED BY FREQUENCY (H Z ) 0. This suggests that the function generator is not able to
perfectly fit the Fourier Series, but the extra harmonics were
well suppressed.
degrees of freedom to be 29.
We report reduced χ2 values of 1.03 for the square
We found reduced χ2 of 1.07 for the triangle wave. We wave, 1.07 for the triangle wave and .997 for the sine wave.
had only 5 data points, corresponding to 4 degrees of freedom. Thus, overall, the experiment was a great success and the
Fourier Series is a great description of the signals generated
The sine wave model returned a reduced χ2 of .977, by the function generator.
using 2 degrees of freedom.
VIII. C ONCLUSION
VII. D ISCUSSION The Fourier Series is a great way to theoretically predict the
frequencies that a function generator will use when providing
The Fourier Series is based on infinite sums of frequencies, a signal. We report reduced χ2 values of 1.03 for the square
however infinite sums are impossible in practice. Thus, a wave and 2.62 for the triangle wave, suggesting great fit of
function generator will use a finite amount of frequencies the model to experiment.
to approximate the desired signal. Adding more terms
will increase the accuracy of the signal, but requires
more sophisticated technology. Our experiment to test the
approximations of the function generator delivered desirable
results.