Trying to understand Slew Rate calculations here

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

Previous topic - Next topic

Vivek

Quote from: Steben on August 22, 2021, 01:16:28 PM

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.


My understanding on this issue :

A capacitor based low pass filter will reduce the amplitude of the signal when the frequency rises, but the shape of the wave will be the same ie no new harmonics are created.
Big sine wave in, smaller sine wave out


A Slew rate limited Opamp will change the Amplitude and the shape of the output ie new harmonics are created.
Big sine wave in, smaller triangle wave out !!



Odd harmonics of a Triangle wave :

antonis

#21
Quote from: Vivek on August 22, 2021, 01:49:13 PM
I disagree.
I request you to explain to me
step by step
why do you claim the above ?

Plz see graph in figure 14.12 posted above..

It deals with the extreme case of square wave input..
Considering whatever gain you like (from unity to infinite) output signal shape should be identical to input signal one, in case of not slew-rate-limited..
The same output shape should also be considered for a sinusoidal input and infinite gain op-amp..
You can see that output amplitude is restricted by supply rails and op-amp ability to reach them..
THAT (restricted) output amplitude is considered into SR formula for the higher frequency for the op-amp operate without being slew rate limited: fmax = SR/2πVp

P.S.
Sorry, but I can't get myself more clear.. :icon_wink:
"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..

antonis

Quote from: Steben on August 22, 2021, 01:16:28 PM
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.

In brief:
A cap in the feedback loop is a "control" in the overal negative feedback where slew rate is directly related to the unity-gain bandwidth, hence directly proportional to the dominant pole frequency..
(which is inversely proportional to the product of equivalent resistance at the node of second stage (gain stage) and compensation capacitance, the equivalent resistance being a function the second stage input resistance and the differential amp stage output resistance, both of which are inversely proportional to quiescent current..)

External compensation caps are practically connected across internal one hence alter dominant pole frequency and not overal feedback loop one.. :icon_wink:
"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

When you are in a slew-rate limited situation, you are no longer in closed-loop control so feedback and gain are concepts that don't matter.  The output is set by a current source charging a capacitor so the voltage is given by:

CV = Q = IT

where

C is the capacitance
V is the voltage
Q is the charge
I is the current
T is time.

The slew rate limit has been used as a limiter for a communications receiver before.  Most limiters use a diode feeding a long R-C time constant to store a level at which the diode blocks the audio or shunts it to ground.  But one enterprising manufacturer came up with a better idea: he used an op amp that needed an external compensation capacitor and simply switched a much larger capacitor across it.  Under ordinary conditions, there was little difference in the output but when a noise spike like you would get from a lightning strike came through, the op amp couldn't keep up and was slew-rate limited.  This was said to provide a more natural sound than the usual diode limiter because ponce the spike disappeared, the signal level was near what it would have been without the spike, not shunted or blocked to zero.

Steben

Quote from: amptramp on August 23, 2021, 09:32:35 AM
When you are in a slew-rate limited situation, you are no longer in closed-loop control so feedback and gain are concepts that don't matter.  The output is set by a current source charging a capacitor so the voltage is given by:

CV = Q = IT

where

C is the capacitance
V is the voltage
Q is the charge
I is the current
T is time.

The slew rate limit has been used as a limiter for a communications receiver before.  Most limiters use a diode feeding a long R-C time constant to store a level at which the diode blocks the audio or shunts it to ground.  But one enterprising manufacturer came up with a better idea: he used an op amp that needed an external compensation capacitor and simply switched a much larger capacitor across it.  Under ordinary conditions, there was little difference in the output but when a noise spike like you would get from a lightning strike came through, the op amp couldn't keep up and was slew-rate limited.  This was said to provide a more natural sound than the usual diode limiter because ponce the spike disappeared, the signal level was near what it would have been without the spike, not shunted or blocked to zero.

In other words dynamic treble cut. But I still think the range in which any pleasant effect is noticeable (strum hard, less treble) is too big to be of use. Or not? I mean, how much volume must one roll off on the guitar to get a signal small enough to achieve audible change to wideband?
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Vivek

Quote
In other words dynamic treble cut.

Please remember that a Slew rate limited output has new harmonics that were not present in the original signal

Steben

Quote from: Vivek on August 23, 2021, 12:02:17 PM
Quote
In other words dynamic treble cut.

Please remember that a Slew rate limited output has new harmonics that were not present in the original signal

Yes, of course.
In comes diode clipping after the opamp though... The amplitude of the signal out won't be changing a lot if so, only the content might be different.
That's an element of the "not so" spectacular influence in for example a rat.
  • SUPPORTER
Rules apply only for those who are not allowed to break them

Vivek

#27
Quote from: antonis on August 22, 2021, 02:39:47 PM

Plz see graph in figure 14.12 posted above..

You can see that output amplitude is restricted by supply rails and op-amp ability to reach them..
THAT (restricted) output amplitude is considered into SR formula for the higher frequency for the op-amp operate without bening slew rate limited: fmax = SR/2πVp


Brother Antonis,

Thank you for your post.

I see that there is an assumption and an assertion in the logic, without providing technical reason/logic for it. 

It is assumed that if there is rail saturation, then a sine wave that gently touches that rail saturation point and a clipped wave that hits hard against the rail saturation, both have to consider the same rail saturation point in their calculations and hence have same slope at the zero crossing point and therefore the same slew rate requirements.


I feel that is a wrong assumption.

I have maintained that a clipped wave has higher slope at zero crossing than an unclipped wave. Hence for the clipped wave, we need to consider the Vp that it would have reached in case it had not been clipped.


Please see diagram that illustrates the point:

Green Line is a Rail saturation point of 5 V

Blue line is an output sine wave with 5V peak, so it just touches the rail saturation

Red line is an output sine wave of 20V peak. It will get clipped at 5Volts due to rail saturation

Slew rate is the rate of change of voltage over time. Hence it is the slope of a Voltage and Time graph

You claim that the 5V rail clipping applies to both the unclipped wave of 5Vp and the clipped wave which wanted to go to 20Vp but got clipped at 5V

That means that you claim that the slope of the clipped and the unclipped waves are the same at the zero point.





It's obvious that is not true.

I still say, for Slew rate limit calculations, the Vp to be used in the calculations is the peak voltage that a sine wave would have reached in case it had not been clipped. The subsequent clipping at 5V has nothing to do with the slope at the zero crossing, which is where Slew rate matters.


Please be kind to check my assertions and point out an errors.

antonis

Brother Vivek..

Frankly, I don't give a damn about clipped signal shape.. :icon_wink:

Your initial query concerned Vp involved into SR calculation formula and I think I've answered it..

Nothing else to add or subtract..

Sitting Antonis has spoken..!!
"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

#29
Quote from: antonis on August 23, 2021, 02:18:46 PM
I think I've answered it..

But have you answered it correctly ?

Over and Out on this topic !

Rob Strand

#30
QuoteI still say, for Slew rate limit calculations, the Vp to be used in the calculations is the peak voltage that a sine wave would have reached in case it had not been clipped. The subsequent clipping at 5V has nothing to do with the slope at the zero crossing, which is where Slew rate matters.
That's all there is to it.

Slew-rate is equivalent to a velocity limit.   Clipping is a position limit, like hitting a brick wall (or perhaps the ceiling and floor).   You can run at the wall at any speed upto the maximum speed limit.  You can crash into the wall at any speed.   The two limits are independent.

The reason why there is a slew-rate is in the text book analysis (my first post and antonis's book extract.).
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

iainpunk

i know its a bit of an old thread, but my recent endeavours in slew rate limiting circuits have made me wonder what's important. i don't think the focus should be on what the highest unaffected frequency would be, but given that we clip the heck out of the wave, a more interesting question would be what frequency of max output squarewave turns in to a perfect triangle. this specific way of analysing slew rate is not that useful for industrial measuring/scientific purposes, but in distortion pedals, its more useful that the highest unaffected sinewave frequency, as Vivek started this thread with.

for an LM308 that has its output clipped to 1.5v pk-pk, that frequency would be 100kHz. this tells us that the frequency's that get filtered out are mainly the frequency's above that.
despite that all squarewaves down to quite low frequencies get affected by the slew rate limiting, the frequencies that get ''filtered out'' are extremely high, way above hearing range.

it might be a spicy opinion, but slewrate is not what makes the 308 in a RAT sound different than any other opamp, it must be another attribute of the venerable 308.

if im wrong, i'd love to hear how and why.
i'd rather be wrong and learn something, than be right and learn nothing.

cheers
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

Vivek

Quote from: iainpunk on December 12, 2021, 04:51:33 PM
for an LM308 that has its output clipped to 1.5v pk-pk, that frequency would be 100kHz.


One of the main points of this thread was which amplitude to use in the calculations or mental visualisations.

Lets try this mental exercise


Suppose we have a 1Khz signal of 2Vpp
and we use an LM308 and clip to 1.5Vpp


versus


Suppose we have a 1Khz signal of 2000Vpp
and we use an LM308 and clip to 1.5Vpp

Will there be a difference in the output wave shapes ?

If you answer yes, it means the Vpp to use in the calculations is the Vp that would have been attained if there was no clipping or rail saturation



Another way to look at things :

If we look at zero crossing
The wave shape of 2vpp and 2000vpp waves is different at zero crossing point (Where slew is highest)

So any subsequent clipping at 1.5vpp or rail saturation has nothing to do with the slew rate at zero crossing.

Hence, in our visual imagination and in slew rate calculations, we have to use for amplitude, that Vp that would have been reached in case there was no clipping or rail saturation.




iainpunk

#33
yes, but that is a purely theoretical way of looking at slew rates. we don't hear the 2kv wave, we hear a clipped wave, and the slew rate in relation to that amplitude is what we hear. if the amplitude is doubled for the same slew rate, and then reduced by half to match the lower clipping threshold's volume, it sounds way smoother/softer.

to measure this perceived softness, i propose the ''first triangle'' frequency, so we can relate that to what we hear. its like what you are saying is in degrees Celsius, and mine in degrees Fahrenheit, yours is scientific, mine is relatable (at least, that's what i'm aiming for)

cheers
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

Mark Hammer

My own view is that discussion of slew rate is tangential, or at least distantly related, to the actual key factor - open-loop gain-bandwidth product.  Most datasheets will have a graph showing gain-bandwidth products; often  plotting them by compensation-cap values.

The graph shows just how much gain one can request the op-amp to provide at various frequencies.  Gain is typically flat out to some maximum frequency, beyond which max gain decreases quickly as frequency goes up.

In most instances, those graphs are moot because the gain is often not THAT much higher than 300x or so, and at that voltage gain, things are still pretty flat out to well above where any lowpass filtering within the circuit acts, and largely well past anything the amplifier's speakers could reproduce (most speakers will begin to roll off above 6khz or so).  But head north of 60db gain and one starts to run into limits. And probably worth noting that gain-bandwidth product calculations for those datasheets are likely made feeding the chip pure tones from a generator, not 6-string chords.

Here is the open-loop gain-bandwidth chart for the LM308.  Note that if our gain in decibels is a meagre 30db (just under 32x voltage gain), we're good out to well beyond what a guitar needs.  Increase that gain to 50db (voltage gain = 316x) and our frequency response starts to drop off above 1khz.  When a Rat is dimed, we're talking gain in the thousands.  At 60db gain ( = 1000x) that rolloff seems to start around 600hz.  It's not steep, but you can see that a waveform of 2khz is already about 12db down.

Now, such limitations are, at one level, a by-product of just how quickly the chip can provide voltage swing.  But slew rate is rarely about what the chip can do when pushed to its limits.  The open-loop numbers ARE, however, about that.  You will note that the graph depicts performance with a 30pf compensation cap; not an especially common value.  The developer of the Rat has stated for the record that he accidentally used the wrong ground-leg resistance value, and was pleased with the result.  My guess is that he was going by the 308 datasheet, figured a 30pf comp value would fetch him the desired bandwidth, and stumbled on the happy accident of what happens when you ask an op-amp to do more than it is capable of.  This IS just a hypothesis, awaiting confirmation, but too many things line up to suggest something different.



Vivek

Mark Bro,

Please educate me

I understand a Slew rate limited Opamp creates waveshape distortions ie the sides become straight lines at the angle of the slew rate.

What happens for Gain-Bandwidth limited opamp ? What changes can we see on the output waveform ? How are they different than Slew rate limited waveshape ?

Thanks !


PRR

  • SUPPORTER

Eb7+9

Quote from: Vivek on December 14, 2021, 12:11:48 PM

What happens for Gain-Bandwidth limited opamp ? What changes can we see on the output waveform ? How are they different than Slew rate limited waveshape ?


as I've pointed out to you several times now you (as well as pretty much everyone here - no offence intended) have not studied enough network theory to understand difference between small-signal and large-signal analysis ... so, end up confounding disparate concepts and turning it into some kind of meta panty bunching wrongness ... you write out sentences that combine ideas belonging to different realms ... studying device level design books is of no use if you don't know network theory ...

Mark Hammer

Quote from: PRR on December 14, 2021, 02:01:29 PM
This is about NOT distorting
Correct, as I would expect from you.
Open-loop gain-bandwidth product is not about what the chip itself might do to clip the signal.  Keep in mind that such things will depend on supply voltage, at the very least.  Rater, it is all about what the op-amp will output.  And if one is asking it to provide 60db gain for harmonics in the 1-2khz range, you're going to get much LESS of that than you might think you will.  The role of the LM308 in the Rat circuit has less to do with how it clips the signal (although even 30db gain, with a 9V supply is goi9ng to do that for the low end), than with what it sends on to be clipped by the diodes.

And regards to JC.  I hope the rains did not affect you too much.

iainpunk

wouldn't it be great to reduce signal before the 308, and have the opamp produce more gain, so its GBP has even more effect on the tone?

i don't think the 308's slewrate has to much influence over the tone, since its still quite a bit faster than we hear, but having diminished slewrates way lower than the 308 has, does work as a kind of filter-like smoothing without sounding 'too filtered' like a normal LPF generally does, since it retains its hard clipping edge.

cheers
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers