Name:
Student ID:
Run the Fourier Series Applet (http://falstad.com/fourier) by Paul Falstad. A workstation computer is more convenient than a tablet for this exercize, because of its mouse pointer and larger display. (Portrait orientation of a tablet is recommended on tablets to see its vertically stacked displays.) The full screen version (accessible via the button below the interface) is also recommended. Click Sound (below of the column of buttons) to hear the signal. Adjust the volume to a comfortable level. Avoid prolonged listening to sinusoidal (Sine or Cosine, etc.) waves (for more than a few minutes at a time) as it might be harmful for your ears.
Get to know the applet:
Click on the Sine
button (top right) to hear a pure tone. Try another waveform, including one of the complex ones (Triangle, Sawtooth, or Square).
The underlying white line in the display is the ideal signal;
the red one is the approximation based on the sum of a finite number of components
(set by the “Number of Terms” slider).
Notice how decreasing the number of terms truncates the harmonic series and degrades the approximation to the target function.
Enable Options > Show Full Expansion
to show mathematical expression.
Answer to your own satisfaction (no explicit answers required yet on this worksheet) these orientation questions.
You may consult with other students if you like.
Sine
function?
(Hint: See the attribute of the fundamental frequency, adjusted by the “Playing Frequency
” slider on the right control panel.)
Mag[nitude]/Phase
.
(Recall that x = r cos(θ), y = r sin(θ); r = sqrt(x2+y2), θ = arg(x,y) which is like arctan(y/x).)
Mute
and Select
(Solo) controls, in the m
and s
rows at the bottom, corresponding to each harmonic.
These can be used to exclude (mute) a selected set
of harmonics from a complex tone (such as a sawtooth wave), or to “focus on” (select) some subset of its harmonics.
Push single digits 1 through 0 to Mute
corresponding harmonics; or Shift + single digit to Solo
them.
Mag/Phase
representation normally has a maximum magnitude of 1, but combination of cos and sin components can push it [via Pythagorean theorem] beyond unity.)
Mag/Phase
view),
use phase shift
(or just successively press the Phase Shift
button).
Phase Shift
advances a waveform (by angular intervals of π/10 radians).
What is the effect of time-shifting (phase-shifting) a periodic signal on its waveform and its sound?
Square
,
Triangle
, and Sawtooth
waves.
How is the noise spectrum different from these?
Triangle
excites more harmonics than a pure tone.
Log View
(only for Mag/Phase
) causes the stalk height to be the logarithm of the amplitude,
as in expressions of signal level,
to more easily see smaller magnitudes. Only odd harmonics f, 3f, 5f, ... are non-zero. Emphasis of odd harmonics is characteristic of clarinet-like musical instruments.
(This can be contrasted to flutes, which play both even and odd harmonics of the overtone series.)
Click on Sawtooth
and note the greater amplitude of the higher harmonics, and the fact that even as well as odd harmonics are included;
a sawtooth wave requires more Fourier frequencies to reproduce well.
Mag/Phase
option to convert from rectangular coordinates to polar.
To see the quantitative attributes of a harmonic, one can hover over its stalk (which turns yellow) to see the amplitude (a.k.a. magnitude) and phase.
(For example, 1st harmonic of sawtooth is “0.63662 cos(x - 1.56773)
”, meaning its magnitude ≅ 0.6 and its phase delay is π/2 radians.
The second harmonic is “0.31831 cos(2x + 1.57693)
”.
(Note the coefficient on the independent variable x
indicating the harmonic number.)
To calculate fall-off across this 8ve interval (1 → 2), one can calculate
10 log10 (x2/x1)2 = 20 log10 (x2/x1),
which for this pair of values would be about
20 log 0.6/0.3 = 6.02 [dB].
Such calculation can be done with Wolfram Alpha, expressed as
20 log(10, 0.6/0.3)
to override default natural logarithm (base e ≅ 2.7) with decimal base (since bels and decibels use base 10).
Alternatively, enable the Log View
for magnitude/phase display to see levels expressed directly,
and subtract them to get the level difference:
1st harmonic (fundamental freq.): -3.92 dB
2nd harmonic (ve up): -9.94 dB
Level difference, then, is difference:
-9.94 - -3.92 = -6 [dB/8ve].
One can confirm that this attenuation (not “attention”) applies to any harmonics separated by an 8ve
(harmonic number n → 2n). Of course only even harmonics are an 8ve above any other harmonics,
so for waves with only odd harmonics (triangle, square, etc.), optically interpolate (estimating visually) a stalk along the decaying “harmonic envelope”
(adjust a “fake” or "false" harmonic [which would otherwise be missing] to fit the curve)
and use the displayed magnitude to estimate the 8ve attenuation.
Waveform | Harmonics (even, odd, both, etc.) | Attenuation | Sound | RMS |
Noise |
⅓½ ≈ 0.58 ≈ 0.6 | |||
Sin |
(just one, so no attenuation) | |||
Triangle |
-12 dB/8ve | Like a clarinet | ⅓½ | |
Sawtooth |
-6 dB/8ve | Like strings or brass | ||
Square |
-6 dB/8ve | Hollow |
Rectify
, what
happens to the wave and the spectrum?
Full Rectify
and Clip
functions as well.
Which of these (half-Rectify
, Full Rectify
, or Clip
) does not introduce a
“DC” or “A0” term (leftmost of the frequency components)?
Explain this.
Rectify
function do?
Full Rectify
a triangle wave,
which subsequent half-amplitude triangle wave has every 4th harmonic,
as the original odd harmonics all get doubled.
The original fundamental disappears, and a DC offset is introduced, which can be zeroed to iterate that operation...).
Beats
set-up (http://falstad.com/fourier/e-beats.html
),
add two adjacent frequencies to see and hear the “beating” (or “throbbing” or “pulsing”). (Hint: Lower the fundamental frequency [Playing Frequency
] to a low value (like around 2 Hz),
and assert two
adjacent high-order harmonics (such as #49
& #50
).
Can phase be heard from a complex tone?
(Does adjusting phase affect the sound, except for crackling noise during adjustment?)
Humans can distinguish, with training, up to about 10 harmonics of a sound. Choose a broadband signal like a Square wave and make sure there are sufficient terms (~20). Listen to the sound and try to identify individual components of the sound.
S
elect (S
olo) attribute on the bottom row?
Mute
operation on separate components) in a triangle wave?
Sawtooth
wave. Now select (solo) the 4th, 5th, & 6th harmonics (and, optionally, the 8th, doubling the 4th). What do you hear?
Resample
button affect a waveform and its spectrum?
What does this simulate?
(Increase number of terms so that enough high-order terms are present to observe a kind of aliasing.)
Quantize
button different from Resample
?
(Hint: One down-samples in amplitude, the other in time.)
Clear
to null the signal.)
Draw a constant slope line? What frequencies are expected? What frequencies are actually produced?
Draw a sinusoid (with or without tracing over a sin or cos).
The application analyses or decomposes the drawn function.
When it looks like a sine or cosine, observe the
frequency components below. How many have appreciable magnitude? What does
that say about your drawing ability? How are errors in your drawing reflected
in the harmonics? Log view (when in magnitude/phase) makes even small distortion visually apparent,
but probably it might still be difficult to hear (using m
ute & s
olo). Can such residual harmonics be heard?
Suppress the fundamental by resetting its amplitude.
(Or listen to the signal with
and without the respective harmonics by using Mute, or listen to the fundamental
with and without the overtones by using Select (Solo). Unless you are a very talented
artist, you can probably hear the “buzziness” representing the error
in your drawing.)