[sdiy] Simple discrete Unity-Gain Follower ?

Magnus Danielson cfmd at swipnet.se
Mon May 5 16:19:57 CEST 2003


From: "Czech Martin" <Martin.Czech at Micronas.com>
Subject: RE: [sdiy] Simple discrete Unity-Gain Follower ?
Date: Mon, 5 May 2003 09:37:32 +0200

> I always thought that distortion is defined as follows:
> 
> Put an ideal sine wave into the system (amplitude maximum
> allowed or designed value). Wait until system has reached
> steady state (i.e. all transients from "switching on" the
> sine have disappeared). Now record system output.
> Look at the spectrum and determine fundamental
> and harmonics. The ratio of both (in terms of RMS)
> gives the distortion figure, usually given in %.
> Better would be to display the DFT plot as well.
> Real systems have 1/f and Johnson and shot noise,
> so THD is computed. Total harmonic distortion + noise.

That's not a definition of distortion, but is a workable definition or let say
measurement oriented definition of Total Harmonic Distorsion.

What does distortion actually means? It means deviation from the ideal. You may
speak of many forms of distrotion, such as amplitude distortion, phase
distortion, pulse distortion etc. without even entering the non-linear field.

When we come to non-linear stuff things becomes much more complex (as you
already know) and then we speak of non-linear distortion. The problem is that
it is hard to collect all the effects under one number, but harmonic distortion
has been popular since it is easy to measure. You may measure 2:nd and 3:rd
overtone distortion, you may measure odd and even harmonic distortion and you
may measure the total harmonic distortion.

Now, if we recall the definition or linear, it is (or we can define it to be)
when the superposition principle holds, and when it does hold we have a
nonlinear system, or:

L(S) <=> Sup(S)

which is equalent to

not(L(S)) <=> not(Sup(S))

Anyway, if we have a non-linear system, superposition doesn't hold, but when
superposition does hold two independent signal can coexist without interfering
each other. However, when the system is non-linear they do interfer, so we have
to particularly look at what happends when we insert two signals into the
system and see what products we get. Effectively we get a myriad of sum and
difference frequencies like if we had multiplied the signals with each other.

Tossing two sine signals into a squarer gives you a feel for what is happening:

               2
(sin(A)+sin(B))  = (sin(A) + sin(B)) * (sin(A) + sin(B)

        2                         2
= sin(A)  + 2sin(A)sin(B) + sin(B)

        2                               2
= sin(A)  + cos(A-B) - cos(A+B) + sin(B)

so just from a squareing we've generated no less than 4 new frequencies, and if
we assume some leakage from the input signal these will mix in nicely so we
started with two sines and get a grand total of 6. I let it be an exercise to
investigate cubic and higher degrees to the reader, but unless you haven't
caugth the genreal idea by now, please feel free to do the exercise, because it
will be enligthening.

Anyway, this forms the requirement for an intermodulation distorsion test
(IMD). To get a good result you take two frequencies which has as low common
undertone as possible, so that the intermodulation spectrum becomes as dense as
possible.

Then, as Don correctly pointed out, things becomes even more complex in
feedback loops. When you have a steep step the feedback loop might be unable to
tag along (due to saturation) and it may take some time before the feedback
loop has stopped ringing into it's stable state after the transition/transient.
This have caused the need for yeat another intermodulation test, namely the
transient intermodulation (TIM) to measure the distorsion under stress. You
measure TIM by mixing a squarewave and a sine with frequencies having the same
properties as in the IMD test.

Neighter of these measurement methods (THD, IMD, TIM) *really* gives you the
characteristics, but they do give you a feel for different types of non-linear
behaviours.

(Sorry in advance if I have forgot the correct definitions, but this is
straight from the back of my head and it was plenty of years since I seriously
looked at the definitions. I be happy to take corrections and also read up on
it!)

> So, basically I thought that distortion is only meaningfull
> in terms of steady state.

No, certainly not. The problem with non-linear behaviour is that much of your
normal linear thinking comes to shame. You need to learn all forms of
non-linear deficiancies, how to measure them and how to treat/minimize the
effect of these.

> I wonder why:
> 1.) distortion spectra are usually not given in specs

1) Amount of space in specs.
2) Few readers usually understands them.
3) It varies with amplitude and god knows what else parameters. Fare well you
   simple world of linear characterisation (which people don't master either,
   so there went all hope of meaningfull HiFi-store conversations)

> 2.) intermodulation is completely left away
> 
> For a transient response, like impulse or step response
> I always thought that we could consider slew rate,

Slew rate is indeed a non-linear property, and for that the TIM measurements
where invented to help you find your way. The applicability to TIM measurements
may however be out for discussions under some fairly reasnoble
border-conditions like limited bandwidth of input signal etc.

> or overshot, ringing and the like.

Overshoot and ringing as such is linear properties, but they may have been
caused by non-linear properties. To make things interesting, you could even
find a system to become very resonant during a non-linear period and be well
damped when in a linear period of the system time.

> But I have to be carefull:
> After some experiments I have made higher frequency ringing
> is not audible. E.g.: if the system is so bad that the feedback
> shows ringing at 10kHz, some kind of "whistling" can be heard.
> If considerable ringing exists at 30kHz, I can not hear any artefact.
> I think that is the reason why digital brick wall lp filters, which
> have considerable ringing can not be heard as artefact, the ringing
> is (usually) too high.
> 
> Am I wrong here?

To make things fun I'd say consider this:

Let's say you have a two-amp system, with one amp following the other. The
first amp is highly resonant at some frequency beyond human hearing. You toss
in a square signal (or anything like it, with sharp edges) i.e. enought to get
the ringing going. Now, if the signal level is sufficiently high for the pure
gain to almost saturate the input of the next amp, then will the ringing make
the input amp saturate, and the fun stuff is that the ringing frequency will
now intermodulate with the frequencies of the signal, and those artifacts (in
the forms of delta-frequencies) make their way back into the hearing range.

You can come up with other cases where high frequency ringings cause similar
artifacts. I once made a amp which where basically a NE5534 followed by a
NPN/PNP pair (just as the proposed unity gain buffer in the begining of this
thread) and a feedback loop around the whole thing. This way back in time when
I where just learning and had few clues (I'm still learning, but I have a few
clues that I didn't have back then). It sounded awfull and besides, things
where running unreasnoble hot. Then we tossed an oscilloscope on it to learn
that it had a 1.3 MHz oscillation. Well, that's not hearable, but the
intermodulation products where *really* hearable.

So, in short, steady state is only one case and yes, non-hearable frequencies
do matter in these cases.

Cheers,
Magnus



More information about the Synth-diy mailing list