Home | Lehre | Videos | Texte | Vorträge | Software | Person | Impressum, Datenschutzerklärung | Blog
Application of the Fourier Transform
Examples for spectra with last week's example program:
-
Whistling (nearly sinusoidal: one clear peak in the spectrum)
-
Humming (one fundamental frequency plus a series of partials (aka harmonics)
= sinusoidal waves at integer multiples of the fundamental frequency),
-
Noise (white noise = uniform spectrum without peaks; pink noise = more
low frequencies; red noise = much more low frequencies; blue noise = more
higher frequencies, etc.)
From the Fourier transform results a spectrum in constant steps of frequency.
For instance, with 22,050 Hz sampling rate and 1024 input samples, the
513 values resulting from the Fourier transform correspond to 0 Hz, 21.5
Hz, 43.1 Hz, 64,6 Hz, and so in steps of 21.5 Hz up to 11,003 Hz and 11,025
Hz. This set of frequencies does not correspond to the human perception
of frequency: From 21.5 to 43.1 Hz it's one octave, from 11,003 to 11,025
Hz it's a fraction of a semitone. One can reorganize the frequency scale
to conform to musical intervals. However, the lack of frequency resolution
at the low end remains.
Electroencephalogram (EEG)
The activity of the brain generates tiny voltages on the scalp. These are
easily classifyable
using their frequency, which is an ideal application of the Fourier transform.
The low-frequency waves (delta and theta) signify sleep, the high-frequency
waves (alpha and beta) signify the awake state. If the eyes are closed,
beta waves will give way to alpha waves.
EEG waves result from the joint behavior of large regions of neurons.
Nonetheless, the voltages on the scalp amout to only 10 to 100 microvolts
(millionth part of a volt). Thus, a huge amplification is required to get
signals in the usual range of several volts. Schematics and kits are available
on the Internet (OpenEEG).
Apart from the amplification, the circuitry has to take care of suppressing
the powerline frequency that pollutes any measurement of tiny voltages
at high resistances. Thus, a strong filter is inserted that cuts all frequencies
greater than or equal to 50 Hz (Europe) or 60 Hz (U.S.).
Example for an Actuator: Using the Motor Fader
Motor Faders are employed as volume controls for the (possibly dozens of)
tracks of professional music mixing consoles. The sound engineer can use
them to set the tracks' levels. The console (of digital audio workstation)
records the motion of the faders and can reproduce this motion automatically.
Here, the faders are moved through the motors to "display" the mix to the
sound engineer. He or she can grab any fader and manually override the
automated motion. When the system sense that the user touches a fader,
it releases it from the motorized motion.
The motor fader provides six connections:
-
Three lines for a standard fader: One connects one end of the fader to
ground, the other end to a constant voltage (such as 5 V) and measures
the voltage at the lever via an ADC to determine the position of the knob.
-
Two lines for the motor that drives the knob: These are connected to an
H-brigde driver such as the L293D, which allows to reverse the polarity
(and thus the spin direction) and to switch off the motor.
-
One line connected to the metallized lever: This is used to sense whether
the user touches the knob, typically through the change in capacitance.
A simple method to control the motor is to let it turn right at full speed
when the lever is too far right from the target position, and to let it
turn left at full speed when the lever is too far left. However, this leads
to a rattling motion: Starting left, the lever will accerelate and travel
past the target position; the motor begins to spin in the other direction,
again overshooting, etc. One can cope with this by reducing the speed when
the lever approaches the target position. This reduction is done best by
pulse width modulation (PWM). The Arduino offers 256-step PWM on several
of its digital outputs without further ado. One of these outputs is connected
to the on/off (enable) pin of the motor driver.
Electrical devices that contain coils (in particular, motors) generate
voltage spikes when they are switched on and off. The L293D contains internal
diodes that clamp these spikes in order to protect the digital electronics.
On top of that, the L293D allows to conntec two independent supply voltages:
one for the logic part and one for the power part. It is a good idea to
feed the motor (the power part) from unregulated power, not from the "clean"
5 volts. This keeps spikes out of the digital circuitry (which may otherwise
show erratic behavior) and relieves the power regulator from the huge current
that a motor will drain.
Electrotactile Displays
If nerve cells are stimulated through electrical current, they send pulses.
The other nerve cells (and, thus, the brain) cannot tell these pulses from
the regular output of these cells. So one can use electrodes to create
tactile
sensations on the skin, confuse the user's equilibrium
sense or simulate audio
signals.