From: henry@ginger.sri.com (Henry A. Pasternack)
Newsgroups: rec.audio
Subject: Re: Nonlinearity vs. non-flat frequency response.
Date: 15 Apr 92 05:49:33 GMT
Reply-To: henry@ginger.sri.com (Henry A. Pasternack)
Organization: SRI International


   Jeff (btdy@vax5.cit.cornell.edu) writes:

>Henry, you say that Distortion is "the generation of frequency components 
>that are not present in the source signal."  Wouldn't an under-damped midbass 
>fall into this category--the speaker keeps moving after the signal is no longer 
>there, generating frequency components that are NO LONGER in the source signal?

   That's a good question.  To understand the answer requires an
appreciation of some fairly subtle points of engineering, which I will
now try to address.  Beware, this is a long posting; hurried readers
may wish to skip to the bottom of the article for a direct answer to
the question.

   A linguist might define distortion as any sonic deviation that
would allow a listener to distinguish reproduced music from a live
performance.  This definition, which is admirably simple and clear, is
fraught with problems from the perspective of the engineer.
Stereophonic music reproduction (in contrast to hypothetical "sonic
holography") is intrinsically flawed in that it cannot bring about a
perfect duplication of the spatial and reverberant characteristics of
the original concert hall.  Thus, from the start, the linguistic
understanding of distortion is technically inappropriate.  This
definition becomes even more ambiguous when purely artificial (i.e.,
electronically-generated; having no live reference) music is
considered.  To answer these difficulties, the electrical engineer
understands distortion in a more technical way that helps him to solve
certain kinds of circuit characterization problems.

   I would like to define distortion as any signal artifact that
arises as a consequence of nonlinearity in the reproduction signal
path.  We have now replaced the comfortable but imprecise term,
"distortion", with the considerably less friendly term,
"nonlinearity."  A mathematician has a formal understanding of
"nonlinearity", but I would like to describe it in more intuitive
terms by talking about how engineers measure and characterize
nonlinearities in analog circuits.

   The essence of linearity (the opposite of nonlinearity) is that
when two or more signals are superimposed at the input of a circuit,
the resulting output consists of the sum of the two signals multiplied
by some constant, but never the product, nor any polynomial or
transcendental function, of the input signals.  The simplest way to
measure linearity is to make a graph plotting the input versus output
voltage (or power) of a circuit for all allowable input signal levels.
The result should be a straight line.  Such a graph might be called
the "static large-signal transfer function."  In practice, this is not
a very useful test to make, for a variety of reasons.  Perhaps the
most compelling problem with this test is that many perfectly
reasonable linear circuits do not respond to DC signals.  This means
that the output voltage will rapidly tend towards zero for any
constant input.  Another problem is that linear circuits inevitably
have frequency response variations (if only high- and low-frequency
rolloffs), making the slope of the transfer function dependent on
frequency.

   For these (and other) reasons, electrical engineers like to
characterize circuits in terms of their response to sinusoidal input
signals.  It may seem paradoxical that a sine wave, which by definition
varies continuously in amplitude, it is nonetheless considered a "static"
waveform so long as its peak amplitude and frequency remain the same.

   If we apply a small-amplitude sinusoidal input signal to the input
of a circuit and measure the amplitude of the output signal as
function of frequency, we can make a plot called the "small-signal
magnitude transfer function."  This is the frequency response graph so
often printed in component specifications.  A very important
observation must be made at this point.  The frequency response curve
is technically a static measurement.  Because a static signal is
defined as one that is unchanging in frequency, it is theoretically
impossible to make this measurement because the input signal may never
change.  In practice, good results are obtained when the test waveform
is swept at a slow enough rate, as determined in consideration of the
low-frequency bandwidth of the device under test.  The important point
to understand is that sweeping the signal slowly completely obscures
the effects of resonance, time delay, and so on.  (The astute reader
will object that certain dynamic problems, such as oscillation, are
not obscured).  Making this measurement, one has no idea how long it
takes for the signal to propagate from the input to the output, only
how much total energy is available on the average over a lengthy
period of time.

   It turns out that for some devices, like speaker drivers (but
certainly not speaker systems, nor amplifiers, nor CD players) that
are described as being "minimum phase", one can invoke mathematics in
order to infer the time-varying behavior of these devices from their
magnitude transfer functions.  In general, though, this is not the
case.

   It is possible to make certain limited distortion measurements
using a single sinusoidal test signal.  For instance, one may plot
output amplitude versus input amplitude using a fixed-frequency sine
wave in order to generate the expected straight-line large-signal
transfer function.  This test may be repeated at a variety of
frequencies, generating a three-dimensional surface that one may
analyze for signs of nonlinearity.  It turns out that any deviation
from the straight-line characteristic will cause the generation of
unwanted signals at frequencies that are multiples (harmonics) of the
input (fundamental) frequency.  A related, but more useful measurement
is to plot the ratio of unwanted harmonic to fundamental energy at the
output of the device under test for pure sinusoidal input signals of
varying frequency and amplitude.  These are the familiar Total
Harmonic Distortion (THD) curves.

   The problem with the THD measurement is that it tells very little
about the nature of the nonlinearity that causes distortion.  This is
because the relative amplitudes of the harmonic signals are not
revealed in a single measurement value.  Often, magazines publish
photographs of the "residual" waveform obtained from the distortion
analyzer.  This is the distortion signal revealed after the
fundamental waveform is subtracted from the output of the device under
test.  The author may comment on the extent to which the residual
appears to consist of second harmonic energy, this possibly being an
indication of how sonically obnoxious the distortions may be.
Unfortunately, eyeballing the residual waveform is not a particularly
quantitative form of measurement.  It is also possible to examine the
residual waveform with a spectrum analyzer in order to quantify the
magnitudes of the harmonic signals.  This is an interesting
precedure, but one that fails to capture the distortion performance 
in one or two simple numbers.

   Intermodulation distortion (IMD) is another quantity that can be
measured fairly easily.  The test is performed in much the same manner
as the THD measurement except that the input signal consists of two or
more sinusoids at fixed frequencies.  Just what frequencies are chosen
is a matter of large debate.  The traditional SMPTE (Society of Motion
Picture and Television Engineers) two-tone test is most often used (I
don't know the frequencies; perhaps 60Hz and a higher frequency tone,
to evaluate the effect of power-line hum on signal reproduction).  The
distortion products consist of harmonics of the fundamental signals,
products having frequencies equal to the sum and difference of the
fundamentals, harmonics of the sum and difference products, sums and
differences of the harmonics, and so on.  IMD is usually plotted as a
function of input signal amplitude.  The manner in which the IMD
rises, especially at low signal levels, tells the engineer something
about the mechanism that causes the distortion.  This is the
traditional test used to evaluate bias current levels.

   Both of these tests generally measure distortions that arise from
static nonlinearities, that is, nonlinearities that do not have a
time-varying nature.  They assume that the device under test has a
magnitude transfer function that deviates somewhat from perfect
straightness, but, more importantly, that the shape of the transfer
function is fixed regardless of the nature of the input signal.  A
number of years ago, the industry and the public became fascinated
by Transient Intermodulation Distortion (TIM), which is, in fact,
advertising hype fuzzily describing a particular kind of dynamic
nonlinearity.  The essential property of dynamic nonlinearities (and
the distortion measurements that characterize them) is the realization
that the behavior (the transfer function) of a circuit can change as a
function of the input signal.  That is to say that one set of tests
conducted in a particular fashion may reveal a particular transfer
function, while another set of tests, performed using different input
signals, may reveal a different transfer function.  More important,
the notion of a transfer function, which really is based upon a static
test signal methodology, does not apply in a neat fashion when dynamic
distortions arise.  In essence, it is not possible to plot a neat
curve, analyze the degree of straightness and then predict dynamic
distortion.

   Dynamic distortions can occur when a very high-frequency,
high-amplitude input signal attempts to force the voltage level at a
node somewhere inside a circuit to change more rapidly than the
circuit can accommodate.  This type of distortion is what is commonly
known as slew-induced distortion (SID) or TIM.  There are other
mechanisms that lead to dynamic distortions.  Various tests, including
three-tone intermodulation measurements, have been proposed to measure
dynamic distortion.  Each test has its advantages and disadvantages,
its proponents and detractors.  Because of the many subtle
complexities of circuit misbehavior, it is very difficult to design a
dynamic distortion test that is both useful to the engineer and indicative
of audible performance under all circumstances.

   Now, getting back to this issue of muddiness, the most common
source of muddy sound is loudspeaker resonance, due to mechanical
vibration of the enclosure walls, underdamping of the woofer cone, and
excitation of listening room modes.  In each case, signal energy near
the problem frequency is stored as energy of motion and released over
a period of time after the excitation has ceased.  It is also possible
for electrical circuits to store and release energy in an analgous
fashion and with a similar effect.  The result is observed in two
ways: 1) There is a rise in the steady-state (static) frequency
response curve near the resonant frequency, and, 2) The time-domain
waveform shows noticeable "ringing", a tendency to oscillate following
a transient excitation.  Mathematicians will tell you that these two
phenomena are equivalent and intrinsically related by a function
called the Laplace transform.  They are not distortion because energy
at new frequencies is not created.  Instead, signal energy is stored
and released at an inappropriate time, what is known fondly, if
inaccurately, by audiophiles as "time smear".  Certainly, this kind of
behavior is undesirable, but it is technically not distortion because
it is not a result of circuit nonlinearity.

   Incidentally, it is certainly possible for a well-damped circuit to
have a non-flat frequency response curve leading to muddy sound in the
absence of damping-related energy-storage effects.

   In truth, the great majority of stereo systems (speaker systems, really)
are gross offenders when it comes to exhibiting time (phase) distorion.
What this means is that the time delay from input to output varies widely
as a function of frequency.  This implies that energy is constantly being
stored and released in such a way that the time relationships between the
spectral components is thoroughly messed up.  In fact, the essence of
loudspeaker design depends on the creative manipulation of resonant
behavior, a fact I believe is poorly appreciated by most audiophiles.
It is this lack of understanding that leads to many myths regarding
amplifier damping, woofer "speed", and so on.  Fortunately, the ear is
quite forgiving of phase distortion, so speaker systems having steep
crossover slopes and large, non-minimum, non-linear phase responses

   So, does that answer your question?

-Henry