Effect of multiple gain stages on harmonics created

Started by Vivek, August 22, 2023, 07:29:20 AM

Previous topic - Next topic

Vivek

Suppose we build / thought experiment / simulate three distortion pedals

A) it has one stage that chops signals at 0.6Vp

B) it has two stages, first stage clips at 1vp, next clips at 0.6vp

C) it has three stages, first clips at 1Vp, next clips at 0.8Vp, last clips at 0.6vp

And we feed it a signal made of
2vp of 1khz + 0.5vp of 2khz

What difference would you expect in the harmonics created in these 3 scenarios ?

What else would be different ?

What differences would we notice if our input signal slowly reduced over time
From 2vp of 1khz + 0.5vp of 2khz
To 0.5vp of 1khz + 0.125vp of 2khz

antonis

What case B and C configuration should be..??
(direct coupling, cascaded, with or without local or overal feedback, etc)
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Vivek


FiveseveN

Quote from: Vivek on August 22, 2023, 07:29:20 AM
What difference would you expect in the harmonics created in these 3 scenarios ?
Clipping multiple times should be more "messy" in the high-end but whether that's significant really depends on what you're going for. Don't forget that guitar speakers roll off at 4—5 KHz and most dirt boxes have a low-pass before that.
The point of multi-stage distortion is the "dynamics", how the harmonic content changes in the regime where some stages are clipping and others are not.
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

POTL

we can control the midpoint of the waveform, thus creating symmetrical or asymmetric clipping, without the use of diodes, the so-called cold and hot bias, cold clipping.

printer2

A different thought on the question (answered with another question). Is the intermodulation distortion from one stage or from multiple stages the same if we end up with the same amount of THD? A sine wave might look the same on a scope with both being clipped to a certain level, with multiple frequencies maybe not as well behaved or better?
Fred

Rob Strand

Pretty sure this was mentioned in the past.

If you have a hard clipper: Once you pass the signal through the first hard clipper the signal remains unchanged after any further clipping stages.   The output only depends on the zero crossings of the input signal.

In reality though: if you have a diode clipper with a finite gain on an opamp stage there is a point where the signal level decreases and the first stage does not clip.   Depending on the gain of the following stages that small signal could be amplified and clipped by later stages.  There is an intermediate point where the signal  is at the clip threshold of the first stage and the first stage clips some of the time.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Elektrojänis

The whole signal gets clipped at the same time. Different frequencies and harmonics will not be clipped separately, but as a part of that whole signal. Just think of the waveform as it clips and clips again and do the conversion to what frequencies are present in whatever amounts only in the end.

So... If we assume that the clippers are theoretically perfect hard clippers with an infinitely sharp clipping knee/threshold and there is no processing (flat frequency responce, no filtering) going on between the stages, I'd say the result will be identical.

In real world it will probably be a bit different since nothing actually clips that perfectly (and usually we don't want that). However if you don't do any filtering/eq/shaping between the stages, my first quess would be that the differences are small.

antonis

Quote from: Rob Strand on August 23, 2023, 10:33:31 PM
Pretty sure this was mentioned in the past.

I strongly suspect Vivek wishes to result into a slew-rate argument.. :icon_biggrin:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

amptramp

Let's suppose you have a low frequency signal like low A at 110 Hz at one volt and a lower amplitude signal at a higher frequency, say 526 Hz (key of C) at 0.1 volt applied to a clipper.  The high frequency signal is riding on the larger A signal.  Once the low A signal is clipped, the high-frequency signal is completely shut off because the clipper stage takes everything off the signal above a certain voltage, so the C signal disappears entirely when the combined signal is above the clipping level.  Thus, the C signal is interrupted at the A signal rate and you get intermodulation components with outputs at 636 Hz and 416 Hz which are not harmonic and not necessarily musical.

The output depends on how hard your clipping is.  If it like an ideal diode to ground with a given Vf, you get one result.  If it has some series resistance, you may not get an effect of eliminating the lower voltage signal but it may be attenuated severely, but still, the effect is less harsh than an ideal diode.

Steben

#10
Soft clippers are different than hard clippers.
Having a soft clipper in front of a soft clipper gives the add-on effect with rising amplitude. (this is used on my Bluesbreaker mod) Stacking many softclippers with correct scaling will eventually have almost a hard clipped end effect since what many call the "clean portion" gets smaller and smaller. But all this with a very soft onset of clipping.
Having a hard clipper in front of soft clipper gives a comparable add-on effect with rising amplitude but with a finite treshold.
Stacked hard clippers only give the benefit of added sustain.
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Elektrojänis

Quote from: Steben on August 24, 2023, 11:41:13 AM
Stacked hard clippers only give the benefit of added sustain.

But how much does the result in sustain in hard clipping change if you have several clipping stages stacked vs. have the gainstages (with the same gain) stacked and clip only in the last one?

Assume that the gainstages will not clip. The discussion here is theoretical anyway. In the real world most clipping circuits aren't perfectly hard.

ElectricDruid

We should be able to work this out definitively with some maths, no?

We're looking at clipping stages, either soft or hard. That's a waveshaping function, and the maths of those is pretty well understood. Often it's modelled using Chebyshev polynominals, since that lets you control the harmonic content. My understanding is that you could decompose a arbitrary waveshaping function over the range -1 to +1 into constituent Chebyshev polynominals, in a process analogous to breaking a time-based waveform into its harmonic components.

Cascading such functions (let's call them Fx(a), Fy(b), and Fz(c) ) is just stacking them up, so we'd have Out = Fz(Fy(Fx(a))).

We could calculate what that combined function is, and by definition the new combined function would have the same harmonic output as the separate functions cascaded. We could then break down the combined function to see what harmonic components it generates.

What I'm trying to get to here is:

1) There is a definite answer to this question. It's in no way vague and can be answered rigourously if you can be bothered to do the copious hard sums.
2) It looks to me like there exists a single-stage gain function which would be equivalent to any multistage gain function. Whether such a function could be created outside of DSP using only analog means is a different question.



FiveseveN

Quote from: ElectricDruid on August 25, 2023, 01:21:40 PM
2) It looks to me like there exists a single-stage gain function which would be equivalent to any multistage gain function. Whether such a function could be created outside of DSP using only analog means is a different question.

Suddenly smells like diode ladders in here :icon_mrgreen:
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

Steben

#14
Quote from: Elektrojänis on August 25, 2023, 06:16:46 AM
Quote from: Steben on August 24, 2023, 11:41:13 AM
Stacked hard clippers only give the benefit of added sustain.

But how much does the result in sustain in hard clipping change if you have several clipping stages stacked vs. have the gainstages (with the same gain) stacked and clip only in the last one?

Assume that the gainstages will not clip. The discussion here is theoretical anyway. In the real world most clipping circuits aren't perfectly hard.

Hmmm. some rail to rail CMOS opamps come close. Think of TLC2262? Having a soft clipper or "diode with resistor - clippers" to ground after such an opamp might give you combined a good "hard before soft" clipper. There is not much distance between this and an AC30 end stage transfer (without cathode shift).

But there is a reason why almost 101%  of dist boxes are opamp with diodes to ground.
It's main public is grit and noise fans. Gain up and shred away. Why making all the fuss if distorted power chords and perhaps some high gain tapping are send through your buyers' rig?
It's like talking firstly to youngsters about the type of wood inlay of the steering wheel or the way the passengers' shoulder rests on the door in a sports car instead of the engine's horse power rating.
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Elektrojänis

Quote from: Steben on August 26, 2023, 05:32:17 AM
Hmmm. some rail to rail CMOS opamps come close. Think of TLC2262? Having a soft clipper or "diode with resistor - clippers" to ground after such an opamp might give you combined a good "hard before soft" clipper. There is not much distance between this and an AC30 end stage transfer (without cathode shift).

Actually almost any type of opamp probably clips quite hard even if they can't get to the power rails. Thershold is just a bit lower. It's probably harder than diodes to ground. The real question in this thread is if it actually changes anything if you clip several times or if you just do all the gain first and then clip it in the end.

I think if the clipping is perfectly hard, it doesn't matter and you might just do the clipping once in the end. Even with a bit softer clipping the difference might not be that big. That however might change if there is tone shaping (filtering) between the stages.

Arranging it so that smaller signals get soft clipping and louder signals hit hard clipping will ofcource be another case when clipping multiple times makes a difference, but even there the difference might not be that big. Even softer clipping will look and suond a lot like hard clipping if you push it hard.

TS style diodes in the non inverting opamps negative feedback will be different though, as pushing the input hard will make the clean come through stronger. (I know. That "mixed in clean" has been debated a lot, but if you feed TS-clipping stage a larger signal it sure sounds like you get some clean through.)

And yes. Simple one gainstage and diodes to ground will probably work for most people for most of time (good enough for rock'n'roll/shred), but that's not a reason to give up experimenting. :)

Steben

#16
Quote from: Elektrojänis on August 28, 2023, 09:48:35 AM
Quote from: Steben on August 26, 2023, 05:32:17 AM
Hmmm. some rail to rail CMOS opamps come close. Think of TLC2262? Having a soft clipper or "diode with resistor - clippers" to ground after such an opamp might give you combined a good "hard before soft" clipper. There is not much distance between this and an AC30 end stage transfer (without cathode shift).

Actually almost any type of opamp probably clips quite hard even if they can't get to the power rails. Thershold is just a bit lower.
It's probably harder than diodes to ground.


Yes, but some opamps do more than clean clipping and sometimes it gets asymmetrical etc etc... TLC2262 is a nice one, certainly not the only one.
Definitely harder than diodes. The amount of harder or not depends on the design around the diodes.
Many tube amps clip hard eventually (a class AB is kind of a big opamp) and most simple diode clippers don't get that top clipping roughness of a rail driven amp while not getting the soft onset either.


QuoteThe real question in this thread is if it actually changes anything if you clip several times or if you just do all the gain first and then clip it in the end.

I think if the clipping is perfectly hard, it doesn't matter and you might just do the clipping once in the end. Even with a bit softer clipping the difference might not be that big. That however might change if there is tone shaping (filtering) between the stages.

Arranging it so that smaller signals get soft clipping and louder signals hit hard clipping will ofcource be another case when clipping multiple times makes a difference, but even there the difference might not be that big. Even softer clipping will look and suond a lot like hard clipping if you push it hard.

Yes, but the onset is much closer to most desired tube amp sounds.


Quote
TS style diodes in the non inverting opamps negative feedback will be different though, as pushing the input hard will make the clean come through stronger. (I know. That "mixed in clean" has been debated a lot, but if you feed TS-clipping stage a larger signal it sure sounds like you get some clean through.)

And yes. Simple one gainstage and diodes to ground will probably work for most people for most of time (good enough for rock'n'roll/shred), but that's not a reason to give up experimenting. :)

Never. Just as a Fuzz Face is a dynamic gem with often disregarded clean sounds, whether most appreciate that or not...



  • SUPPORTER
Rules apply only for those who are not allowed to break them

teemuk

Quote from: ElektrojänisTS style diodes in the non inverting opamps negative feedback will be different though, as pushing the input hard will make the clean come through stronger.

The only way to get "clean" through a TS distortion stage is operating the thing at low enough input amplitudes, effectively below diode threshold voltages.

The reduction of gain once the diodes start to engage the feedback side chain is essentially a non-linear function, a "fold" in a linear transfer curve. The only practical difference to inverting version is that gain reduction is limited to "unity", which means a more gradual and softer compression effect, it never brickwall "clips", an effect one can easily apply to inverting circuits as well with a simple series resistor that likewise limits gain decreasement to unity.

Quote(I know. That "mixed in clean" has been debated a lot, but if you feed TS-clipping stage a larger signal it sure sounds like you get some clean through.)

Not to my ears and yes, I realise this is largely a semantic issue like overdrive vs. distortion vs. fuzz, which can only make sense to a musician but would cause a scientist to tear his hair away.

Anyway, you do get a seemingly less distorted signal, but nevertheless there's still that nonlinear "fold" in the transfer function and while higher amplitude inputs changes where the fold relatively occurs (as in peaks compressed vs. crossover region excessively amplified) the result in every case is a distorted signal with components of harmonic distortion in it. Audible components.

There is no way to get "clean" signal output from non-linear amplification just as there is no way to add, or "mix" harmonics of distortion to a clean signal and magically get both "clean" and "distorted" outputs. The signal is either clean (and lacks harmonics of distortion) or it isn't. It's really that simple.

Steben

Quote from: teemuk on August 29, 2023, 12:45:33 AM
Quote from: ElektrojänisTS style diodes in the non inverting opamps negative feedback will be different though, as pushing the input hard will make the clean come through stronger.

The only way to get "clean" through a TS distortion stage is operating the thing at low enough input amplitudes, effectively below diode threshold voltages.

The reduction of gain once the diodes start to engage the feedback side chain is essentially a non-linear function, a "fold" in a linear transfer curve. The only practical difference to inverting version is that gain reduction is limited to "unity", which means a more gradual and softer compression effect, it never brickwall "clips", an effect one can easily apply to inverting circuits as well with a simple series resistor that likewise limits gain decreasement to unity.

Quote(I know. That "mixed in clean" has been debated a lot, but if you feed TS-clipping stage a larger signal it sure sounds like you get some clean through.)

Not to my ears and yes, I realise this is largely a semantic issue like overdrive vs. distortion vs. fuzz, which can only make sense to a musician but would cause a scientist to tear his hair away.

Anyway, you do get a seemingly less distorted signal, but nevertheless there's still that nonlinear "fold" in the transfer function and while higher amplitude inputs changes where the fold relatively occurs (as in peaks compressed vs. crossover region excessively amplified) the result in every case is a distorted signal with components of harmonic distortion in it. Audible components.

There is no way to get "clean" signal output from non-linear amplification just as there is no way to add, or "mix" harmonics of distortion to a clean signal and magically get both "clean" and "distorted" outputs. The signal is either clean (and lacks harmonics of distortion) or it isn't. It's really that simple.

Clean "component". It is not that hard to construct a TS like signal by adding a hard clipped signal to the clean original:  it is complete Klon style. That's what is ment.

Soft clippers like TS or SD can be designed to sound rougher harder by adding clipping treshold. The higher the treshold the harder the image of the distortion because the unity gain effect stays unity.
  • SUPPORTER
Rules apply only for those who are not allowed to break them

teemuk

#19
QuoteClean "component". It is not that hard to construct a TS like signal by adding a hard clipped signal to the clean original ... That's what is ment.

I understand. My point was that when you add additional harmonics to fundamental frequency or frequencies, the "clean" signal, the outcome is fundamental plus harmonics, which is effectively synonymous to, and very definiton of, distortion. You can't have a clean AND distorted signal at the same time, they are mutually exclusive. Either signal has extraneous harmonics in it or not, but both conditions can't exist at the same time.
Without this principle we could throw the concepts of waveform arithmetics and harmonic theory to thrashbin.

Our "clean component" is that fundamental frequency or frequencies, but it's a misleading concept because we have those even in a square wave with about 74% THD and we don't actually speak about that signal being a "mix" of clean and distorted, we simply say it's distorted. To extract the "clean" we get rid of the extraneous harmonics and if we do that then we no longer have a distorted signal.

Concepts like "clean blend" or "mix" of clean and distorted are fallacies, though I realize they are a handy shortcuts to talk about specific circuit ideas, similarly as separating "overdrive" and "distortion" to refer to specific tones instead of certain phenomena that they actually are. The problem with such stretching of concepts is that it confuses folks who are just learning the principles and they actually learn the false concepts instead of real effects behind them. Then they keep spreading the false information and the effect accumulates.

- -

To get on topic, I believe different transfer functions of distortion simply combine and superimpose each other (e.g. several soft knees superimpose and become a harder knee etc.) and we could effectively treat such several transfer functions as one single function...
UNLESS
..The signal is subjected to changes of phase, amplitude or time in between applying those transfer functions. Which is exactly what the aforementioned capacitive coupling between stages will usually do. The resulting dynamic, non-static, effects are usually the reason why "cascaded" distortion stages are employed in the first place.

And yes, the other reason is that aforementioned effect of "softer" transfer functions cumulating to harder ones. However in those cases the design generally wishes to avoid the said phase shifts and all. Couple of examples of these I can think of are, say, a late 1990's Yamaha DSP patent that outlines how a single "soft" distortion waveshaping function can be employed to generate a wide array of different waveshaping effects ranging from soft to hard. In latter case just repeat the waveshaping function until the preferred "hardness" is achieved. And in the very same vein the famous early 1970's CMOS linear amp app note that advises to connect several stages in series to achieve a harder knee of clipping and simultaneously more linear output with aid of higher loop gain. The latter idea I have seen often employed in CMOS linear amp distortion circuits of which the common complaint is that they are a little bit too "soft" and non-linear as is.

Speaking of CMOS the app note also addresses the likes of TLC2262 if you read between the lines. A CMOS output in an opamp does not load its input stage, which means it can achieve very high voltage swings whereas CMOS output as is can swing within millivolts of its rails. So a perfect combination for "rail-to-rail" duty. It will naturally clip as hard as any closed loop opamp but at least more symmetrically and gracefully.   :icon_mrgreen: