Trying to understand Slew Rate calculations here

Started by Vivek, August 21, 2021, 12:46:07 PM

Previous topic - Next topic

Vivek

Looking at the Slew Rate of the LM308 used in a ProCo Rat

Electrosmash wrote at https://www.electrosmash.com/proco-rat:



I dont agree with the calculations and assumptions.

I see it this way :

At 1 Khz, the max gain of the first stage of the ProCo Rat is 1416x. For a moment, let's assume the max gain is 1416x across the band.

Suppose the Guitar signal can reach 1Vp and we assume its a pure sine wave,

That implies that the Output would have loved to reach 1416Vp, but gets limited by the rails.

When the input starts to change and therefore output starts to rise from 0V, the output does not know that it is going to be limited to around 4Vp by the rail after a while. So the output starts to rise following the shape of a 1416Vp Sine wave.

Therefore for Slew Rate calculations, I feel we need to calculate as follows :

f max = Slew Rate / 2.Pi.Vp
= (300,000 V/s)   /  2.Pi.1416Vp
= 33.72 Hz maximum frequency that is not slew rate limited.

Now of course, the gain is not 1416x across the guitar frequency band. Still, the final answers of max non-slew-rate-limited frequency will surely not be 5.3 KHz.


Many other guitar electronics pages that talk about Skew rates do not seem to apply the correct Vp for clipped signals. Correct Vp to use in the calculations is Vp in case the output was not clipped, since at zero crossing, the output follows the shape of unclipped Vp sine wave.


Agree?

antonis

Quote from: Vivek on August 21, 2021, 12:46:07 PM
Agree?

No.. :icon_wink:

Slew Rate changes with the change in voltage gain. Therefore, it is generally specified at unity (+1) gain condition..
(shape of output signal follows input one..)
To be more precise, Slew Rate is measured by applying a step signal to the input stage of the op-amp and measuring the rate of change occurs at the output from 10% to 90% of the output signal's amplitude..

To be fair, I don't either agree with Electrosmash Vp = 9V..
IMHO, it should be considered 4.5V (for rail to rail ideal op-amp)
"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

#2
Yes I noticed the 4.5Vp error too, but I ignored it since there is a much bigger error is using the formula correctly.


I am not trying to measure Slew Rate here.

Actually, after the slew rate has already been measured, I am trying to predict the max frequency that will not be affected by Slew Rate limitations.



Above is (rather confusing) diagram of how slew rate affects large signals / larger than unity gain. Actually the slope of each rising part is same in terms of V/s ie it's the same slew rate in all 3 graphs.


So please tell me, what do you calculate to be the max unaffected frequency for an Opamp with Slew Rate 0.3v/us and with gain of 1416 and input of 1Vp, running on Vcc = 9V ?




Vivek

#3
At http://www.muzique.com/lab/slew.php, Jack AMZ wrote

QuoteThe Rat pedal opamp would need to slew about 8.0v at 10kHz. Find the slew rate needed for the opamp.


I feel it should be :

"The Rat pedal opamp would need to have a slew rate faster than the rise time at zero crossing of a 1416v at 10kHz. Find the slew rate needed for the opamp."

The logic is

A) The maximum slew rate is at Zero crossing

B) At zero crossing, with a 1Vp sine wave in, the Rat is trying initially to output 1416Vp at max gain setting, so the output sine wave tries to follow the curve of a 1416Vp sine wave

C) The fact that later on, the output gets clipped at rail does not change the IC's behaviors at zero crossing

D) Hence the Vp to be used in Slew rate calculations is the expected Vp of the unclipped wave.



antonis

Quote from: Vivek on August 21, 2021, 03:04:10 PM
I am not trying to measure Slew Rate here.

Neither do I.. :icon_wink:

What I'm trying to tell you is SR of 300mV/μs for LM308 is considered for unity gain..
I've no info/data for SR at much higher gains so I presume you have to take some actual measurements at 1416 gain and notice the max frequency of unaffected output signal..

Then, if you wish, you can calculate particular SR for 1416 gain..
(just for academic purpose..)
"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

#5
https://e2e.ti.com/support/amplifiers-group/amplifiers/f/amplifiers-forum/290261/slew-rate-vs-gain

" a slew rate is NOT a function of a gain, and thus is the same for all gains"



https://electronics.stackexchange.com/questions/331913/why-is-opamp-slew-rate-specified-at-unity-gain

"Generally an op-amp's slew rate is a limitation of the op-amp in being able to change it's output in one direction or the other for a step input change. It isn't affected by gain"


" the slew-rate is not affected significantly by the gain that the circuit is configured for."



https://eng.libretexts.org/Bookshelves/Electrical_Engineering/Electronics/Operational_Amplifiers_and_Linear_Integrated_Circuits_-_Theory_and_Application_(Fiore)/05%3A_Practical_Limitations_of_Op_Amp_Circuits/5.04%3A_Slew_Rate_and_Power_Bandwidth

Slew rate is always output-referred. This way, the circuit gain need not be taken into account.

Note that slew rate calculations are not dependent on either the circuit gain or small-signal bandwidth.


If the Slew Rate depended upon gain, the spec sheets would have a graph of Slew Rate for various gains.


Vivek

#7
Quote from: PRR on August 21, 2021, 04:24:42 PM
Slew starts at Zero-Crossing. What is the dV/dT of a sine around zero?

http://hifisonix.com/wordpress/wp-content/uploads/2018/03/SID_and_TIM_W_Jung_77-79.pdf
https://www.ti.com/lit/an/snoa852/snoa852.pdf?ts=1629560507003
https://www.aes.org/e-lib/browse.cfm?elib=2940  {paywall}


Wow, that's a goldmine of information. Thanks !!!!!


http://hifisonix.com/wordpress/wp-content/uploads/2018/03/SID_and_TIM_W_Jung_77-79.pdf     page 4


for a sine wave the maximum rate of change occurs at the zero crossings. This factor is the basis of the so-called "full .power
bandwidth" (abbreviated fp) which relates SR and a maximum full amplitude sine wave signal. This relationship is
simply

fp = SR/ 2.pi.Eop

where Eop is the peak output voltage




I suggest the correct Eop to use in this calculation is the peak voltage of a wave had it not been clipped, since at zero crossing, the wave follows the shape of a sine wave of that Eop

The fact that the output wave of a clipper got clipped later on does not change its shape at the Zero crossing.

antonis

Quote from: Vivek on August 21, 2021, 04:20:03 PM
If the Slew Rate depended upon gain, the spec sheets would have a graph of Slew Rate for various gains.

Quote from: Vivek on August 21, 2021, 04:20:03 PM
The fact that the output wave of a clipper got clipped later on does not change its shape at the Zero crossing

Could you plz don't yell at people who try to widen your narrow way of thinking?? :icon_mrgreen:
"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

#9
Quote from: antonis on August 21, 2021, 04:40:38 PM
Quote from: Vivek on August 21, 2021, 04:20:03 PM
If the Slew Rate depended upon gain, the spec sheets would have a graph of Slew Rate for various gains.

Quote from: Vivek on August 21, 2021, 04:20:03 PM
The fact that the output wave of a clipper got clipped later on does not change its shape at the Zero crossing


Could you plz don't yell at people who try to widen your narrow way of thinking?? :icon_mrgreen:


Sorry brother

I dont mean to yell

I though ALL CAPS was yell

and bold is only to highlight a point.

But I will remove the highlights in my post.

I apologise!!!




Back to the topic:

If Slew rate depended upon gain, why are there no slew rate versus gain charts in spec sheets ?


TI says in https://www.ti.com/lit/an/snoa852/snoa852.pdf?ts=1629560507003

QuoteThe maximum sine wave frequency an amplifier with a given slew rate will sustain without causing the output to take on a triangular shape is therefore a function of the peak amplitude of the output and is expressed as:

fmax = SR/ 2.pi.Vp


The gain that the Opamp is configured for does not feature in the equation. The only thing that matters is rate of change at zero crossing, and this can be expressed for Sine waves as a function of Frequency and Vp of Output.

PRR

#10
> If Slew rate depended upon gain

For modern students, to a first approximation, it does not.

Back when this stuff was new, chip opamps were re-compensated for the actual in-circuit gain, which did change the slewrate.

You may have to go way back. The '709 opamp (1965) has a 3-part compensation for gains from 1 to 1,000 with a nearly constant 700kHz upper corner. Slew rate could be 0.4V/uS at gain of 1 to 20V/uS at gain of >500.

https://www.ee.nsysu.edu.tw/lab/F6027/LM709%20Operational%20Amplifiers.pdf
  • SUPPORTER

Rob Strand

#11
You can see why the slew-rate is fix at the output from the following pic,



The output voltage follows the collector voltage of the second stage.

The differential amplifier has a maximum output current set by the tail current.

The output current Ic of the differential amp feeds into the compensation cap.
The voltage across the cap is,

Ic = C dV /dt

So,

dV/dt max = (Ic_max / C)  ~ slew rate

The opamp output voltage essentially follows the cap voltage so the opamp output pin has a fixed slew-rate
which is set by Ic_max and C.

That's the first-order text book argument.

You can see from the details of step responses in the datasheets that there's a little more going on as the positive and negative slopes are a little different and a little ugly.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Rob Strand

#12
Ok, I think I understand your issue.

The opamp has a slew-rate limit.

The question is, what causes that limit to be reached.

With a given input signal a higher gain can cause the slew-rate limit to be hit because the output waveform has a slew-rate A (the gain) times the slew-rate of the input waveform.

It's not that the  gain changes the slew rate of the opamp.   The gain changes the slew-rate of the "target' output signal.

Slew rate limiting occurs when the "target"  output signal slew rate exceeds the slew-rate capability of the opamp.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Vivek

#13
Thanks everyone

I agree with Rob that we need to differentiate between the terms

"Max rate of change of a desired output wave"
and
"Slew rate of an Opamp"


I feel as follows :

A. A desired output wave has a maximum rate of change. It is at the zero crossing. That rate only depends upon the frequency and Vp of the output wave. This does not depend upon the gain of the Opamp since this is a theoretical calculation

a sentence like "I want an output of 1416Vp at 1Khz" is not tied up to any opamp or any circuit

A desired output of 1416Vp created by input of 1Vp amplified 1416x
or 1416Vp amplified by 1x
have exactly the same shape

hence exactly the same maximum rate of change of desired output. Only the Vp of output matters. Gain does not matter.


B. Opamps have a Slew rate specification, as declared in their specs.

That is the maximum rate of change that the Opamp can handle.

As real world Opamps get better and more ideal, the Slew rate does not depend upon gain of the circuit. Modern Opamps do not have a graph of Slew rate versus Gain. Even if Slew rate is measured at Unity gain, there is no implication that the measurement is valid only for Unity gain. In fact, the implication is that the measured Slew rate is valid for all gains.


TI has published graphs of large step signal of 1Vp going though Opamps with gains of 1,2 and 3. They showed that in all cases, the rate of rise of voltage was exactly the same, and it was exactly at the slew rate of that opamp. This proves that for large signal, the Opamp slew rate is not dependent on the gain of the circuit or the target final voltage.


If we have following situations
Opamp with slew rate 1V/uS

and we configure it as

1Vp input gain 10
2Vp input, gain 5
10Vp input gain 1
10Vp input, gain 10
15Vp input, gain 5
15Vp input, gain 1/15

In all cases, after a the step input is applied, the output will rise at the rate of 1V/uS ie Slew rate limited voltage rise at output.

The slew rate of an Opamp is not linked with gain and not linked with final output voltage level.


C. The Slew Rate of our Opamp should be more than the maximum rate of change of our desired output wave if we wish to avoid Slew rate induced Distortion

D. While calculating the maximum rate of change of a desired sine wave output, we have to consider the Vp that it would have reached if if had not been clipped. Max rate of change is attained at zero crossing while clipping happens at some other level. The two concepts are not related.


I suggest that it is an error to consider "Vp" for Maximum rate of change calculations as the Vcc or Vcc/2 for the situation where the output wave has been clipped by the rails. The correct "Vp" is the peak that the output would have reached in case the output had not been clipped.


Thought experiment:

We make 3 circuits on a breadboard:

A) Rat circuit with first stage gain 1416x, fed with 9V supply

B) Rat circuit with first stage gain 1416x, fed with 6V supply

C) Rat circuit with first stage gain 1416x, but we use a special Opamp that has same slew rate as LM308 but can accept Vcc 3000V and does not clip with 1416Vp output

Now we feed 1Vp , 1Khz input signal to all three circuits.

Question 1 :
If we look at the theoretically desired output in the region from -0.0000001Vp till -0.0000001Vp, will there be any difference between the three desired outputs ? or will they be exactly the same ?

Note : The max rate of change of a theoretically desired output depends only upon the shape near the zero crossing and that depends only upon Vp and the freq for waves that follow sine equation near the zero crossing. The theoretically desired output has nothing to do with any particular Opamp or circuit or Vcc

Question 2 :
If we look at the actual Opamp output in the region from -0.0000001Vp till +0.0000001Vp, will there be any difference between the three actual outputs ? or will they be exactly the same ?

Note : The Slew rate of the Actual Opamp depends upon the Opamp specifications and goes not depend upon gain, does not depend upon final target output voltage, and hardly depends upon Vcc

Question 3 :
If we agree that all three situations have same theoretically desired output and same actual Opamp output in the region from -0.0000001Vp till +0.0000001Vp

Do we agree that

The maximum rate of change of the desired theoretical output will be the same in all three situations
The slew rate of the Opamps are same in all three situations

Question 4:
Do we agree that for the situation of the Opamp that could handle 1416V peak output, we calculate the maximum rate of change of desired output attained in the -0.0000001Vp till +0.0000001Vp region as

Max rate of change of desired output = 2.pi.Vp.F where Vp is 1416Vp

Note : We agreed that we only need to consider zero crossing for calculating maximum rate of change. what happens after that is not a concern for rate of change calculations.


Question 5:
If we already agreed that the output of all 3 Circuits are exactly the same in the  -0.0000001Vp till +0.0000001Vp region

and we already agreed that in the case of the opamp that could handle 1416Vp that Max rate of change of desired output = 2.pi.Vp.F where Vp is 1416Vp

and we all agreed that the slew rate of the Opamp should be higher than 2.pi.Vp.F where Vp is 1416Vp ,

Do we agree that even in the case of the circuit being fed 9V or 6V supply, the same equation and constraints apply ?

Ie Max rate of change of desired output = 2.pi.Vp.F where Vp is 1416Vp irrespective of the output being clipped somewhere away from the zero crossing point.

Question 6 : If we agreed to all above, it means that we have agreed that the Max rate of change of a desired output does not depend upon the level of clipping of the output. We then have agreed that the Vp to be plugged into the equation below

Max rate of change of desired output = 2.pi.Vp.F

is the Vp of the output had it not been clipped. We have agreed that subsequent clipping has no bearing on the rate of change at the Zero crossing.


Please spot some errors in above logic and help me to refine it. Thanks.

antonis

Quote from: Rob Strand on August 21, 2021, 08:55:44 PM
That's the first-order text book argument.

A bit more analytical to what Rob said:
(about differential stage current provided to gain stage hence to compensation capasitor..)



"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

Dear Antonis

I look forward to your comments on this claim :

When an output wave of 1416Vp is clipped at 9V

and we have to calculate the max rate of change of that wave

then we have to consider only the Vp of 1416 Volts that the wave would have reached in case it was not clipped. It is not correct to consider the clipping point voltage.

This is because the max rate of change happens at Zero crossing. Hence clipping of wave that happens later on has no effect on the waveshape near the zero crossing.

Vivek

Quote from: antonis on August 22, 2021, 06:02:14 AM

A bit more analytical to what Rob said:
(about differential stage current provided to gain stage hence to compensation capasitor..)


Quote from: antonis on August 21, 2021, 04:05:56 PM
What I'm trying to tell you is SR of 300mV/μs for LM308 is considered for unity gain..
I've no info/data for SR at much higher gains so I presume you have to take some actual measurements at 1416 gain and notice the max frequency of unaffected output signal..

Thanks. That helps.

In all these calculations,

A) It was not shown that Slew rate depends upon gain of the Circuit
B) It was not shown that Slew rate depends on the final target output voltage

I posit that for large signals,

i) The Slew rate of a modern Opamp does not depend upon the gain of the circuit it is in

ii) The Slew rate of a modern Opamp does not depend upon the final target output voltage

and also

iii) The maximum rate of change of a sine wave is around the zero crossing. If the sine wave is clipped later on, it does not change the shape near the zero crossing

all this leads to my claim :

Electrosmash and AMZ should have used Vp = 1416 in their Rat Slew rate calculations, not 9V and 8V respectively. And not 4.5V either.



antonis

#17
Plz, try to understand.. :icon_wink:

Maximum peak output voltage (Vp) is considered the actual(*) output voltage and not the theoretical one..

(*) Restricted by power supply rails and op-amp inself..
"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..

Steben

#18
A certain thing I wanted to discuss here comes to mind again.
I actually wanted to have a very simple understanding of what slew rate "does" and the difference with a fixed cap in the feedback loop.

It was my understanding it functioned as a dynamic treble cut, in other words with low enough output amplitude, you notice nothing frequency wise, while at high amplitude the treble can't be produced by the opamp. This all depends then on the slew rate and caps etc etc etc....
In other words: dynamic, while a cap in the feedbakc loop is not dynamic but a treble cut.

But ... the range between usable low amplitude and useful high amplitude (combined with the diode clipper following the opamp in a rat for example) is far too big to be of any very practical use. The mostly high gain of the circuit puts you in a very undynamic territory, while a very low gain will never make you get to a treble cut peak that is spectacularly different.

Again, that's what I think I distilled out of what was discussed.


I think the clipping in a big muff is more interesting. The amount of current through the clipping diodes is related to frequency. A lower gain device with this idea (you know, one stage, or simply less designed gain) might have more dynamic effect (while clipping, the treble is more clipped etc...) than counting on slew rate.
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Vivek

Quote from: antonis on August 22, 2021, 12:09:14 PM
Plz, try to understand.. :icon_wink:

Maximum peak output voltage (Vp) is considered the actual(*) output voltage and not the theoretical one..

(*) Restricted by power supply rails and op-amp inself..

I disagree.

I request you to explain to me
step by step
why do you claim the above ?

Thank you very much for your experience and patience !