Designing the gain of each stage in a multistage Amp / Pedal

Started by Vivek, October 07, 2022, 07:39:18 AM

Previous topic - Next topic

Vivek

About three years ago, I had asked a question on this forum:

"If we design an AMP IN A BOX with multiple stages, what are the design criteria for the gain of each stage ? "

I did not get a real answer

Except some wise persons said "Simulate, simulate, simulate, calculate, calculate, calculate"

So I started to enter few existing Amps and pedals into LTSPICE


My first realisation is that I had asked the wrong question. Gain by itself does not convey the total picture.

If we input a 1Vp signal,
A stage with gain 10 being fed with a 30V power supply behaves radically different than the same stage being fed with a 9V power supply. The gain is the same, but the point where signal clips has changed.

My second realisation was that a stage with a particular gain behaves differently based on the output level of the stage before it.

for Input 1Vp, 9V supply

Scenario one :  Buffer stage feeds 2nd stage with gain 2
versus
Scenario two : First Gain stage with gain 10 feeds 2nd stage with gain 2

In Scenario one, the 2nd stage should not distort
While in Scenario two, the 2nd stage will distort a lot
Even though the gain of the 2nd stage remained the same

This lead me to understand that I should study each stage based on the input levels right at the beginning of Amp, rather than inputs to that stage itself. This would ensure that effect of earlier stages (gain, clipping point, output level) would get accounted for.

I realised that I needed to study the way that signal starts to get clipped at each stage. And that depends upon
-Gain of that stage
-Gain and output levels of all earlier stages
-Power supply voltage
-Non linear components


I then wrote a totally unscientific, devoid of real meaning routine for SPICE which I stupidly called my "AC transfer function Analysis"

the routine basically does this:

For each Vinput, sine wave, freq = 1Khz, amplitude between 0 and + 2Vpeak,
  step the amplitude in 10mv jumps
       inject 1 second of sine wave into the guitar input of the simulated circuit
       measure max Vpeak and min Vtrough at output for last 20ms
       }
   }
}


Then Plot out Vpeak and Vtrough on Y axis against Vinput on X axis

Graph1:


Above is what I got for a single stage with diodes in feedback path and huge compliance resistor, leading to coloration for larger signals above 400mvp, with rail clipping for very large positive excursions.

Graph2:


and this graph showed what happens with a stage that clips due to rail saturation.

This is rather hard and abrupt. Signals below a certain level are not distorted at all. Signals above a particular level are butchered and their heads cut off brutally.

Graph 3:


Above shows final result of a stage that clips due to two different reasons. We begin with a linear zone for small signals. Then diodes start to create non-linearity. However there are large compliance resistors that allow the signal to grow past the first knee. Eventually the signal rail saturates. Some newbies do not take into account that stages can rail saturate. That's a hidden source of distortion.

Graph 4:


This graph show the response at the outputs of a 4 stage distortion pedal
First stage (green) is a buffer with variable gain and it does have soft clipping diodes too. Here we set it to a medium gain. It shows no nonlinearity at medium gain settings as the signal does not reach the point where the diodes kick in.

Second stage (blue) is the stage described in Graph 3.

Third stage (red) is the stage described in Graph 2.

Fourth stage (teal) is hard clipping diodes to ground. That's the final output of the pedal

Note that the key knee points where nonlinearity starts are at roughly:

150mvp
200mvp
280mvp
900mvp

Ie interestingly distributed across the range of input signals

Above is typical of medium distortion pedal / medium setting of a high gain pedal. Signals below 150mvp are not distorted. As signal gets bigger, different stages start to clip at different amplitudes of input, leading to smooth transitions of distortion versus input amplitude (unlike the rail saturation shown in Graph 2)

Graph 5:


This the same circuit as described in Graph 4. However we set the gain of the fist stage to max.

Now we can see the points where nonlinearity starts as roughly

5mvp
25mvp
30mvp
80mpp
800mvp

This is the typical signature of a modern high gain pedal.

Deduction:
The gains of each stage of a multistage distortion Amp or pedal are adjusted to have a logical spread of the nonlinearity knees across the expected range of input signals. The graphs and data on knee positioning presented above are fairly typical and representative. Earliest knee at around 100-300mvp input for a medium distortion pedal. Earliest knee at 2-15mvp input for a modern high gain pedal.


Note: This post does not talk about the EQs that envelope each of the gain stages. They are extremely important too.

stonerbox

There is nothing more to be said or to be done tonight, so hand me over my violin and let us try to forget for half an hour the miserable weather and the still more miserable ways of our fellowmen. - Holmes

Vivek


Steben

I think I stated this before .... doesn't the last stage do most of the clipping at low input signal?
  • SUPPORTER
Rules apply only for those who are not allowed to break them

amptramp

All of your stage gains multiplied together should be the total gain which is the value of signal out over signal in.  But in addition to these gains, you have losses from tone stacks and any other EQ measures and they should be multiplied in as well.

Gain should also be set by the dynamic range of each stage - what do you want to saturate first?  If you are looking at a tube amp, you can saturate the output stage or the preamp stage and the effects will be different because feedback in the output stage will change characteristics once you exceed the dynamic range.  Some tube amps are designed to sag at high outputs due to rectifier resistance and this gives a different kind of overload performance that some people find desirable.

You can run into dynamic range limiting and slew rate limiting, so both should be taken into account.

Some op amps have nasty overload characteristics like going from maximum positive to maximum negative voltage during overload.  Some of the popular ones like the TL07X and LF356 do this.  You want to avoid driving these devices into overload.

There will be a gain-bandwidth consideration for each stage.  Some op amps like the µA741 can't really get more than a gain of about 5 over the audio range.  This is sometimes stated to give µA741 stages a "warm" sound because the highs are all rolled off.

In tube or transistor stages, you can get blocking or "gulp" distortion from driving a stage into grid or gate conduction which rectifies the waveform coming in and biases the tube or transistor off for a duration set by the R-C time constant at the input.

There are lots of considerations when designing an amplifier and none of them can be overlooked.  There is a range of correct answers, which is why we don't see more failed designs, but when the gains become large, all of these factors become inportant.

ElectricDruid

Quote from: Vivek on October 07, 2022, 07:39:18 AM
The gains of each stage of a multistage distortion Amp or pedal are adjusted to have a logical spread of the nonlinearity knees across the expected range of input signals.

+1 agree. To make the design "responsive" despite the fact that clipping will heavily compress your signal and rob you of all your dynamic range, it helps to make different stages clip at different times. This can gradually increases the amount of distortion as the input level increases, and that has a similar perceptual effect to making the signal louder (more sound power, I suppose, as the number of harmonics increases) even if the peak amplitude is fixed.

Steben

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

Vivek

Quote from: amptramp on October 09, 2022, 07:54:13 AM
All of your stage gains multiplied together should be the total gain which is the value of signal out over signal in.

I'm trying to state that this way of looking at gain, which is perfect for linear stages, can be meaningless for multistage distortion pedals

Consider two pedals running on 9V

One has gain of 50 and then feeds 2 antiparallel hard clipping diodes to ground.

Other has gain of 500 and then feeds 2 antiparallel hard clipping diodes to ground

The output amplitude will be almost the same

But the pedals are different.

But output voltage/ input voltage will be almost the same

m4268588

How should be amplification gain for the 2nd stage?

What if input voltage range is limited?

Vivek

Quote from: ElectricDruid on October 09, 2022, 01:29:30 PM
clipping will heavily compress your signal and rob you of all your dynamic range

That is true only for very severe clipping, for example as shown in the rail clipping graph below



But it appeared to me that the goal was to have enough compliance in the early stages, allowing signal to grow even after the first nonlinear knee. Hence a substantial amount of dynamic range is available in earlier stages

for example :


Steben

Multistage overdrive always feels to me best when the most hard clipping is as early as possible.
This is a classic lay-out for an AC30 for example or a 5E3 Deluxe.

This why I do not like (gainy) tube screamers that much as first stage/pedal and rather use a low gain SD-1 or treble booster.
And really like bluesbreaker platforms after a hard clipper.
And why fuzzes sound best before softer overdrives.

I think it would be a nice epitaph: Steben loved the softest clipping last, the hardest clipping first
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Mark Hammer

Comedian Ron White has a bit about the stupidity of people who think they will be safe from strong winds in a hurricane if they lash themselves to a post, noting that "It's not THAT the wind is blowing, but rather WHAT the wind is blowing".

Similarly, it's not how much gain one is applying, but what you're applying it to, as well as why.

If the goal is to arrive at the cleanest, most uncoloured final output, then gain is staged such that no single stage drives any subsequent stage too hard (i.e., beyond its headroom), and maintains optimal S/N ratio. 

Where the goal IS coloration, however, the "hue" of that coloration will depend on which harmonics are added and in what proportion.  My own preference is to roll off quite low (e.g., 1.5-2khz) in earlier stages, in order to provide more lower-order than higher-order harmonics, and gradually "take the lid off" for later stages.  I can't vouch for it, since I don't do the modelling and simulation, but that strategy tends to get me a more pleasing sound in my own multistage builds.

Concentrating the most gain in one stage tends to get a buzzier tone by generating lots of higher-order harmonics, relative to lower order ones, even if preceding stages have a clean-and-low rolloff.

In general, we tend not to play with cascading "soft" clipping stages (i.e., feedback diodes with a series resistance).  There may be some room to explore there.

Steben

Quote from: Mark Hammer on October 12, 2022, 09:43:48 AM
In general, we tend not to play with cascading "soft" clipping stages (i.e., feedback diodes with a series resistance).  There may be some room to explore there.

Absolutely. Soft clipping stage gives far more control in the region between clean and fully clipped.
With hard clipping in the first stage, the explosion of harmonics - even if shrill - only comes at the highest inputs. This means dynamics.

I even thought about adding passive clippers to ground at the input of any soft clipping circuit. This makes boosting that circuit much more attractive.
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Vivek

Dear Mark,

Thanks for your comments and experience

I request you to point me to one of your best multistage pedals. I would like to run the analysis routines I developed on your schematics, to see what I can learn from the masters.