Author Topic: OpAmp Slew  (Read 17155 times)

0 Members and 1 Guest are viewing this topic.

Boltar

  • Guest
OpAmp Slew
« on: October 20, 2014, 11:08:45 am »
I'm trying to better understand op-amp behaviour. I'm reading up on slew rate , which seems to be a cap on the speed the op-amp can track the output. I'm assuming a few things. That there is some formula that can be used to figure out how fast the output will hunt when the inputs are mismatched. The greater the difference between the inputs the faster the output will respond to compensate. Now taking this assumed formula to calculate the speed of the output change, if the result of this formula is greater than the opamp's slew rating then it will respond at the slew rating speed instead of the ideal (formula based) speed. Have I got this right or not? I find it very difficult to understand what others write in tutorials and I try to see it in the simplest possible terms.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: OpAmp Slew
« Reply #1 on: October 20, 2014, 11:21:46 am »
While i myself do not know the equations (which may be good for you) in general by strapping a capacitor across the output and inverting input can limit the slew rate, equally this means reducing the capacitance across these 2 pins is required to get as close to the rated slew rate as possible,

I am pretty certain an op amp will regulate its output to the limitations of its gain / bandwidth curve or slew rate in a case of whichever is reached first, if you pick a low spec op amp and feed a fast enough frequency its output begins to resemble a triangle wave as it bumps its slew rate, and this rate of change is mostly only true inside the common mode range of the inputs, once you exceed this you approach saturation of the transistors inside and things slow down,

To directly answer your last question, yes you have it right the output rate of change will be at the slower slew rate as that is a limitation of the device,
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: OpAmp Slew
« Reply #2 on: October 20, 2014, 11:27:55 am »
I'm trying to better understand op-amp behaviour. I'm reading up on slew rate , which seems to be a cap on the speed the op-amp can track the output. I'm assuming a few things. That there is some formula that can be used to figure out how fast the output will hunt when the inputs are mismatched. The greater the difference between the inputs the faster the output will respond to compensate. Now taking this assumed formula to calculate the speed of the output change, if the result of this formula is greater than the opamp's slew rating then it will respond at the slew rating speed instead of the ideal (formula based) speed. Have I got this right or not? I find it very difficult to understand what others write in tutorials and I try to see it in the simplest possible terms.

Unfortunately, the slew rate limit of an op amp is not easily predicted by formulas.  The gain-bandwidth product is more predictable and can be used to calculate the bandwidith for a given small-signal gain.  However, when signals get bigger, often the slew rate limit takes over and will limit the speed to something less than the GBW would predict.  Op amp datasheets will often show plots of slew rate vs. various conditions.  Slew rate will limit the full-power BW that the device can achieve.

I did a video a few weeks back on the basics of gain-bandwidth product and slew rate limiting in an op amp.  Maybe you'll find this helpful.

YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Boltar

  • Guest
Re: OpAmp Slew
« Reply #3 on: October 20, 2014, 11:33:52 am »
Thanks Rerouter and w2aew, The video is indeed VERY helpful, nice one.
I take it the capacitor across the II and OUT acts to slow down changes from whatever is providing the feedback? The cap will want to charge/discharge to the PD between the OUT and the feedback source making the change more gradual. So it's not in essense slowing the opamp down per se, but in fact slowing down the changes at the inputs instead.
« Last Edit: October 20, 2014, 11:38:22 am by Boltar »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17821
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: OpAmp Slew
« Reply #4 on: October 20, 2014, 12:05:27 pm »
The slew rate is basically how fast the output can respond in a change of x volts in x amount of time, slew rate is used rather than frequency as it's a bit different, say you want a certain speed triangle output, you can have that up to the slew limit, but now if you want a square wave output you need a much faster rate of change for the same frequency (ideally infinite).
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21701
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: OpAmp Slew
« Reply #5 on: October 20, 2014, 12:11:38 pm »
Note also, slew rate limiting is distortion, the clipping of the input stage; since it drives the Miller compensation capacitance internally, saturation means it can't drive any more than X current into said capacitor.  The effect is a limiting of output amplitude at high frequencies, and a dramatic increase in distortion.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Boltar

  • Guest
Re: OpAmp Slew
« Reply #6 on: October 20, 2014, 01:53:44 pm »
The slew rate is basically how fast the output can respond in a change of x volts in x amount of time, slew rate is used rather than frequency as it's a bit different, say you want a certain speed triangle output, you can have that up to the slew limit, but now if you want a square wave output you need a much faster rate of change for the same frequency (ideally infinite).
So if I wanted as good a square wave as possible I'd use an amp with very fast slew rates and low differential voltages (with a bit of hysteresis), so a comparator would be better in those instances? But for an error amp regulator application I'd need ones that slews a tad slower than the feedback signal modulates? Is there any kind of formula I should need to know to calculate the values needed to slow the slew rate down to below the frequency of the feedback?
« Last Edit: October 20, 2014, 01:58:03 pm by Boltar »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17821
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: OpAmp Slew
« Reply #7 on: October 20, 2014, 01:59:32 pm »
I'm not sure what you mean by low differential inputs, basically slew rate is like acceleration on a car, I don't know if it's tied to other characteristics.

An amplifier that responds too fast can oscillate
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: OpAmp Slew
« Reply #8 on: October 20, 2014, 02:14:25 pm »
So if I wanted as good a square wave as possible I'd use an amp with very fast slew rates

Yes

Quote
and low differential voltages (with a bit of hysteresis), so a comparator would be better in those instances?

No and no.

If you want linear operation, use an opamp. If you want digitising action, use a comparator.

Quote
But for an error amp regulator application I'd need ones that slews a tad slower than the feedback signal modulates? Is there any kind of formula I should need to know to calculate the values needed to slow the slew rate down to below the frequency of the feedback?

The slew rate indicates how fast the opamp's output can change. "feedback signal" is ambiguous, but I presume from knowledge of your circuit you can relate whatever you mean by "feedback signal" to the opamp's output.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Boltar

  • Guest
Re: OpAmp Slew
« Reply #9 on: October 20, 2014, 02:29:14 pm »
I don't really have a real world circuit yet. I'm trying to fully grasp the concepts before I start soldering stuff together. As a very basic exercise in LTSpice I did this:

I'm probably operating those components out of their ranges, and this is a linear regulator not a switching one that I want to actually build, but I'm never going to build this, I'm just trying to see examples of it in my head. I tried to make the gate response slow by using a large resistor on the fet gate so it will cause changes in the output at a slower rate than the op amp, and I indeed get a noisy output. With a small cap between the II and OUT as mentioned earlier by Rerouter, the output stabilizes pretty quickly. Is this the right kind of idea? I did that by basically fiddling with the values until I got the lowest that seemed to work, but is there a specific way of calculating the values I'll need?
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: OpAmp Slew
« Reply #10 on: October 20, 2014, 02:45:37 pm »
Boltar, before rushing off and doing simulations, you should read and understand the basic concepts behind how opamps work. Without that you will waste your time.

Choose whatever you find easiest from https://www.google.co.uk/search?q=op+amp+basic+theory
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Boltar

  • Guest
Re: OpAmp Slew
« Reply #11 on: October 20, 2014, 03:08:44 pm »
Inverting input lower than non-inverting input output moves higher? Non-inverting input lower than inverting input, output moves lower? The greater the difference between the II and the NII the faster the output changes up to the slew rate of the op-amp. The output either directly feeds back to the input or controls some point of another stage that feeds back to the input. The opamp will attempt to adjust the output so the inputs match. If there's no feedback the output moves to the rails depending if the NII is higher or lower than the II and thus acts as a comparator? Direct feedback is generally called an amplifier? Feedback through another stage is usually called an integrator? Inputs are very high impedance, output is low impedance. Is that right?

http://en.wikipedia.org/wiki/Parkinson%27s_law
« Last Edit: October 20, 2014, 03:35:38 pm by Boltar »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: OpAmp Slew
« Reply #12 on: October 20, 2014, 04:00:54 pm »
Inverting input lower than non-inverting input output moves higher? Non-inverting input lower than inverting input, output moves lower? The greater the difference between the II and the NII the faster the output changes up to the slew rate of the op-amp. The output either directly feeds back to the input or controls some point of another stage that feeds back to the input. The opamp will attempt to adjust the output so the inputs match. If there's no feedback the output moves to the rails depending if the NII is higher or lower than the II and thus acts as a comparator? Direct feedback is generally called an amplifier? Feedback through another stage is usually called an integrator? Inputs are very high impedance, output is low impedance. Is that right?

Some parts are right, more parts are wrong, some parts indicate you are making wild guesses.

Spend the time and effort to understand the basic theory of operation - once you can show that you will find other people are prepared to spend their time and effort.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Boltar

  • Guest
Re: OpAmp Slew
« Reply #13 on: October 20, 2014, 08:24:15 pm »
Well don't worry, I'll certainly be reading up and I'll try elsewhere to verify if what I think I've understood is correct in the future. I never realised that asking if I'd understood something correctly was taboo here. My apologies.

Interesting:

5:18 II lower than NII output rises. NII lower than II output falls. No feedback, so a comparator.
8:38 The opamp does whatever it can to keep the two input voltages the same.
11:43 Inputs are very high impedance.
11:54 Output is low impedance.

I think I **ASKED** if 10 things I thought were correct. Now unless I'm mistaken, Dave's video verified six of them. If that's correct how can more things I said be wrong than right?
Sorry ignore that question, I said I wouldn't ask anything else, my mistake.

« Last Edit: October 20, 2014, 08:50:40 pm by Boltar »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: OpAmp Slew
« Reply #14 on: October 20, 2014, 08:34:47 pm »
Well don't worry, I'll certainly be reading up and I'll try elsewhere to verify if what I think I've understood is correct in the future. I never realised that asking if I'd understood something correctly was taboo here. My apologies.

It most certainly is not taboo, but there are better and worse ways of asking questions!

You might benefit from having a look at http://www.catb.org/esr/faqs/smart-questions.html
IMHO that has, arguably grown too big. Perhaps a shorter earlier version such as http://web.archive.org/web/20050324094504/http://www.catb.org/esr/faqs/smart-questions.html might be equally helpful.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21701
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: OpAmp Slew
« Reply #15 on: October 20, 2014, 10:10:56 pm »
I don't really have a real world circuit yet. I'm trying to fully grasp the concepts before I start soldering stuff together. As a very basic exercise in LTSpice I did this:

I'm probably operating those components out of their ranges, and this is a linear regulator not a switching one that I want to actually build, but I'm never going to build this, I'm just trying to see examples of it in my head. I tried to make the gate response slow by using a large resistor on the fet gate so it will cause changes in the output at a slower rate than the op amp, and I indeed get a noisy output. With a small cap between the II and OUT as mentioned earlier by Rerouter, the output stabilizes pretty quickly. Is this the right kind of idea? I did that by basically fiddling with the values until I got the lowest that seemed to work, but is there a specific way of calculating the values I'll need?

Yes, that's the right idea.  If the stuff around the op-amp is unavoidably slow, you have no choice but to slow down the amp itself to compensate.

Try it with a resistor in series with the feedback cap -- you should be able to get even better results from optimized R and C values.  Keep playing with them until it looks best.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: OpAmp Slew
« Reply #16 on: October 20, 2014, 10:33:04 pm »
Yes, that's the right idea.  If the stuff around the op-amp is unavoidably slow, you have no choice but to slow down the amp itself to compensate.

Er no. In many circuits the opamp itself is and has to be far faster than the circuit's inputs and outputs.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21701
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: OpAmp Slew
« Reply #17 on: October 20, 2014, 11:27:21 pm »
Yes, that's the right idea.  If the stuff around the op-amp is unavoidably slow, you have no choice but to slow down the amp itself to compensate.

Er no. In many circuits the opamp itself is and has to be far faster than the circuit's inputs and outputs.

Do you have some examples from control theory to share?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Galaxyrise

  • Frequent Contributor
  • **
  • Posts: 531
  • Country: us
Re: OpAmp Slew
« Reply #18 on: October 21, 2014, 12:31:03 am »
Why is the gate resistor so big?  I would guess you don't even need one in this circuit.
I am but an egg
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: OpAmp Slew
« Reply #19 on: October 21, 2014, 08:03:12 am »
Boltar - it is not yet quite clear to me what you really are asking (or what the core of your problem is).
Therefore, one general answer regarding slew rate:
* It is measured for heavy feedback only (for example, unity gain feedback);
* You cannot "calculate" the slew rate (because it depens on the internal opamp structure), you only can verify the slewing properties by measurement/simulation.
* As aresult, each opamp has a "large signal bandwidth" (in contrast to the small-signal bandwidth).
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: OpAmp Slew
« Reply #20 on: October 21, 2014, 08:54:06 am »
Yes, that's the right idea.  If the stuff around the op-amp is unavoidably slow, you have no choice but to slow down the amp itself to compensate.

Er no. In many circuits the opamp itself is and has to be far faster than the circuit's inputs and outputs.

Do you have some examples from control theory to share?

Consult any basic control theory textbook.

If the opamp bandwidth is too low then probably the phase will be such that the phase margin is eroded, often to the point at which oscillation occurs. In addition, the gain will be inaccurate since there will be insufficient feedback at the frequency of interest.

Consider an audio application, bandwidth 0-20kHz. It is entirely possible to use a DC-1GHz amplifier or op-amp to amplify such signals. A favoured opamp for audio applications is the NE5534. In a simple amplifier circuit with a gain of 10, the bandwidth will be over 1MHz.

The only "problems" with having an opamp with a much higher bandwidth than the circuit being controlled is that you have wasted your money and that if you have poor layout then you may have oscillations, and their may be unnecessary wideband noise.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21701
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: OpAmp Slew
« Reply #21 on: October 21, 2014, 09:14:01 am »
Consider an audio application, bandwidth 0-20kHz.

Ah, but that's not controlling a low bandwidth "plant" in a control loop.  As soon as you reach the output terminal, the loop ends.  That's why I specified.  If it were just voltage, that's not what he's doing here.  He's intentionally slowed down the "plant" to exaggerate the control response required.

Consider, in contrast, a speaker amplifier where the motion of the cone is servoed, for instance: now you will surely agree that either bandwidth limiting, or some very convoluted correction indeed, will be necessary to compensate for the motional response of the coil and cone?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: OpAmp Slew
« Reply #22 on: October 21, 2014, 10:09:17 am »
Consider an audio application, bandwidth 0-20kHz.
Ah, but that's not controlling a low bandwidth "plant" in a control loop.

True, but that wasn' t the statement you made, and I was replying to your point (that I had quoted).

Quote
As soon as you reach the output terminal, the loop ends.  That's why I specified.  If it were just voltage, that's not what he's doing here.  He's intentionally slowed down the "plant" to exaggerate the control response required.

Given the questions being asked, I very much doubt the OP would understand the distinction. If that's true then your response will probably nudge him in an inapproriate direction.

Quote
Consider, in contrast, a speaker amplifier where the motion of the cone is servoed, for instance: now you will surely agree that either bandwidth limiting, or some very convoluted correction indeed, will be necessary to compensate for the motional response of the coil and cone?

The bandwidth of the opamp is irrelevant - provided it is sufficiently high not low to ensure a sufficient phase margin.

For the avoidance of doubt, your statement was, with my emphasis added,:
Quote
Quote from: T3sl4co1l on Today at 12:10:56 AM
    Yes, that's the right idea.  If the stuff around the op-amp is unavoidably slow, you have no choice but to slow down the amp itself to compensate.
And slowing down the amp won't compensate for slow components outside the loop.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21701
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: OpAmp Slew
« Reply #23 on: October 21, 2014, 02:15:06 pm »
Q: What do you get when you put two pedants into one thread?

A: ::)

I had hoped my "control theory" mention would've cued onto the concept of a controller and a plant (the plant generally being some squirrelly thing with multiple poles and/or delay), the canonical problem of control theory.  But oh well.

Actually, the audio amp example is still proof that the amp must be slow: there's always a Miller cap or dominant pole or some kind of compensation in the loop, so that the amp itself can be stable at the desired gain.  There is no such thing as an op-amp or audio amp without this feature, explicitly (e.g., a cap C-B) or parasitically (e.g., reduced bias allowing junction Ccb to play the role).

So, shut up. :P

To be perfectly precise (oh boy here we go...), suppose we have a plant with transfer function P = 1 / (1 + s/a) (i.e., unity gain at DC, and a cutoff frequency of 2*pi*a).  This is Laplace domain, or s --> j*w if you prefer Fourier/analytic domain.

Now suppose we have a controller A = k / s, whose input is the difference between source (setpoint) and output (feedback).  The loop is then:
(Q = output, I = input, D = difference, L = O/I = overall loop transfer function)
Q = D * (k / s)*[1 / (1 + s/a)]
D = I - Q
0 = (I - Q) * (k / s)*[1 / (1 + s/a)] - Q
0 = I * (k / s)*[1 / (1 + s/a)] - O * (1 + (k / s)*[1 / (1 + s/a)])
O * (1 + (k / s)*[1 / (1 + s/a)]) = I * (k / s)*[1 / (1 + s/a)]
O / I = (k / s)*[1 / (1 + s/a)] / (1 + (k / s)*[1 / (1 + s/a)])
L = 1 / (1 + 1 / {(k / s)*[1 / (1 + s/a)]})
= 1 / [1 + (s*(1+s/a)/k)]
= 1 / [1 + s/k + s^2/(a*k)]

Which has the form of 1 / (s^2 + a*s + b^2), which has poles:

s = -1/2k +/- sqrt(1/(4*k^2) - 1/(a*k))

In other words, when 1/(4*k) > 1/a, the roots are real, meaning the system is stable and overdamped; otherwise, the roots are complex, and the system rings (underdamped), but still remains stable.

This is the most marginal case for an integrating controller, a single pole in the plant.  If there are additional poles, the loop gain must roll off much sooner than those poles, otherwise the loop will go into the right half-plane where it is unstable (oscillates uncontrollably).  A pole-zero compensator can be tuned for better performance, or to tolerate additional poles, but the fact remains: loop gain cannot be unlimited into a load with more than zero poles, and must roll off below 4x the plant's lowest pole.  QED.

TLDR: jerk uses math on the internet.  On the plus side, you get to see an actual application of the quadratic equation, so, if you were ever wondering...

Tim
« Last Edit: October 21, 2014, 02:16:48 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19538
  • Country: gb
  • 0999
Re: OpAmp Slew
« Reply #24 on: October 24, 2014, 08:59:28 pm »
Quote
Quote from: T3sl4co1l on Today at 12:10:56 AM
    Yes, that's the right idea.  If the stuff around the op-amp is unavoidably slow, you have no choice but to slow down the amp itself to compensate.
And slowing down the amp won't compensate for slow components outside the loop.
Listen to T3sl4co1l, he's right. If the other components inside the op-amp's feedback loop are very slow then it will oscillate, unless you slow the op-amp down to compensate.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf