OpAmp Slew - Page 1
Forum section: electronics / beginners

author: Unknown
author_rank: Unknown
timestamp: October 20, 2014, 11:08:45 am
content: 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.

author: Rerouter
author_rank: Super Contributor
timestamp: October 20, 2014, 11:21:46 am
content: 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,

author: w2aew
author_rank: Super Contributor
timestamp: October 20, 2014, 11:27:55 am
content: Quote from: Boltar on October 20, 2014, 11:08:45 amUnfortunately, 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.

author: Unknown
author_rank: Unknown
timestamp: October 20, 2014, 11:33:52 am
content: 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.

author: Simon
author_rank: Unknown
timestamp: October 20, 2014, 12:05:27 pm
content: 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).

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 20, 2014, 12:11:38 pm
content: 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

author: Unknown
author_rank: Unknown
timestamp: October 20, 2014, 01:53:44 pm
content: Quote from: Simon on October 20, 2014, 12:05:27 pmSo 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?

author: Simon
author_rank: Unknown
timestamp: October 20, 2014, 01:59:32 pm
content: 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

author: tggzzz
author_rank: Super Contributor
timestamp: October 20, 2014, 02:14:25 pm
content: Quote from: Boltar on October 20, 2014, 01:53:44 pmYesQuoteNo and no.If you want linear operation, use an opamp. If you want digitising action, use a comparator.QuoteThe slew rate indicates how fast the opamp'soutputcan 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.

author: Unknown
author_rank: Unknown
timestamp: October 20, 2014, 02:29:14 pm
content: 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?

author: tggzzz
author_rank: Super Contributor
timestamp: October 20, 2014, 02:45:37 pm
content: 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 fromhttps://www.google.co.uk/search?q=op+amp+basic+theory

author: Unknown
author_rank: Unknown
timestamp: October 20, 2014, 03:08:44 pm
content: 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

author: tggzzz
author_rank: Super Contributor
timestamp: October 20, 2014, 04:00:54 pm
content: Quote from: Boltar on October 20, 2014, 03:08:44 pmSome 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.

author: Unknown
author_rank: Unknown
timestamp: October 20, 2014, 08:24:15 pm
content: 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.

author: tggzzz
author_rank: Super Contributor
timestamp: October 20, 2014, 08:34:47 pm
content: Quote from: Boltar on October 20, 2014, 08:24:15 pmIt most certainly isnottaboo, but there are better and worse ways of asking questions!You might benefit from having a look athttp://www.catb.org/esr/faqs/smart-questions.htmlIMHO that has, arguably grown too big. Perhaps a shorter earlier version such ashttp://web.archive.org/web/20050324094504/http://www.catb.org/esr/faqs/smart-questions.htmlmight be equally helpful.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 20, 2014, 10:10:56 pm
content: Quote from: Boltar on October 20, 2014, 02:29:14 pmYes, 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

author: tggzzz
author_rank: Super Contributor
timestamp: October 20, 2014, 10:33:04 pm
content: Quote from: T3sl4co1l on October 20, 2014, 10:10:56 pmEr no. In many circuits the opamp itself isand has to befar faster than the circuit's inputs and outputs.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 20, 2014, 11:27:21 pm
content: Quote from: tggzzz on October 20, 2014, 10:33:04 pmDo you have some examples from control theory to share?Tim

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: October 21, 2014, 12:31:03 am
content: Why is the gate resistor so big? I would guess you don't even need one in this circuit.

author: LvW
author_rank: Frequent Contributor
timestamp: October 21, 2014, 08:03:12 am
content: 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).

author: tggzzz
author_rank: Super Contributor
timestamp: October 21, 2014, 08:54:06 am
content: Quote from: T3sl4co1l on October 20, 2014, 11:27:21 pmConsult 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 21, 2014, 09:14:01 am
content: Quote from: tggzzz on October 21, 2014, 08:54:06 amAh, 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

author: tggzzz
author_rank: Super Contributor
timestamp: October 21, 2014, 10:09:17 am
content: Quote from: T3sl4co1l on October 21, 2014, 09:14:01 amTrue, but that wasn' t the statement you made, and I was replying to your point (that I had quoted).QuoteGiven 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.QuoteThe bandwidthof the opampis irrelevant - provided it is sufficientlyhigh not lowto ensure a sufficient phase margin.For the avoidance of doubt, your statement was, with myemphasisadded,:QuoteAnd slowing down the amp won'tcompensatefor slow components outside the loop.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 21, 2014, 02:15:06 pm
content: 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.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 - Q0 = (I - Q) * (k / s)*[1 / (1 + s/a)] - Q0 = 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

author: Zero999
author_rank: Super Contributor
timestamp: October 24, 2014, 08:59:28 pm
content: Quote from: tggzzz on October 21, 2014, 10:09:17 amListen 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.

author: tggzzz
author_rank: Super Contributor
timestamp: October 24, 2014, 09:26:54 pm
content: Quote from: Hero999 on October 24, 2014, 08:59:28 pmNo.You do have to control (= "slow down") theloop gainso that there is adequate phase margin at all frequencies. But there should be little or no relationship between the loop gain and theopamp gain; if there is then the circuit's stability may be affected by manufacturing variations in the opamp. In any sane circuit the loop gain is determined by passive components, not the opamp.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 25, 2014, 01:35:12 am
content: Gain is a function of frequency. Loop stability is a function of GBW -- which if it's wildly wrong, WILL cause problems -- but DC gain is generally designed out so its variation is avoided.Or put another way, GBW is generally more consistent in manufacturing variation than DC gain, which is as it should be.Tim

author: LvW
author_rank: Frequent Contributor
timestamp: October 25, 2014, 08:23:01 am
content: Quote from: tggzzz on October 24, 2014, 09:26:54 pmTwo comments from my side:1.) ("...phase margin at all frequencies..")The phase margin is defined for one single frequency only - the frequency where the loop gain crosses the 0dB-line.2.) (..."should be liittle...relationship between the loop gain and the opamp gain"...)The loop gain is defined as opamp gain multiplied by the feedback factor - thus, there is a relationship which cannot be avoided. That means, the loop gain is NOT determined by passive componenets only.

author: tggzzz
author_rank: Super Contributor
timestamp: October 25, 2014, 08:42:17 am
content: Everybody reading this thread is almost certainly living in a house containing feedback loops in which the "opamp" has much higher bandwidth and slew rate than the system being controlled. Read on for justification...Can I suggest everybody finds out and understands understands how the delightfully named "bang-bang control systems" work. In these the active gain element has amuch higher bandwidthandmusthave a much higher slew rate(the original point) than the system being controlled.Bang-bang control systems can be highly advantageous in high power systems, since the high power element is either fully on or fully off. They work extremely well and are widespread. For analysis and loop stability purposes the active gain element is modelled as a comparator, which is effectively identical to a high gain, high slew rate, open-loop opamp (i.e. without negative feedback around the opamp). This is not the slightest problem (either for analysis or for implementation), provided the loop gain is controlled.So where are they in your house? An immersion heater and a refridgerator. The active element is the thermostat, which probably has a bandwidth of a few Hz - obviously much higher (10* 100*?) than the bandwidth of the heating/cooling element. And the thermostat's slew rate is not far off infinite - it often generates RF energy in the form of EMI!I hope that dispells the false notion that the active gain element (e.g. an opamp) must have a bandwidth and slew rate that is "similar" to that of the control elements or the loop.

author: tggzzz
author_rank: Super Contributor
timestamp: October 25, 2014, 09:01:46 am
content: Quote from: LvW on October 25, 2014, 08:23:01 amAgreed, provided the loop gain only crosses the 0dB line onceMy error.QuoteWhat is the "gain" of the bi-metallic switching element in a thermostat used in a bang-bang temperature-control control system? Whatever it is, it is irrelevant provided it ishighenough. Similarly the slew rate must behighenough. To make the example more electronic than electrical, simply replace the bi-metallic switch with a thermocouple and comparator (or opamp without negative feedback).To the best of my knowledge fridges and hot water tanks have stable temperatures.

author: LvW
author_rank: Frequent Contributor
timestamp: October 25, 2014, 10:33:53 am
content: Quote from: tggzzz on October 25, 2014, 09:01:46 amTo my knowledge the term "gain" involves an output-to-input ratio which is defined for equal signal forms at the output and the input. With other words: The term "gain" applies to a linear system only - and, hence, not to a bang-bang controller.

author: tggzzz
author_rank: Super Contributor
timestamp: October 25, 2014, 12:18:23 pm
content: Quote from: LvW on October 25, 2014, 10:33:53 amWell, it is peripheral to the main point I've been making, but: no, not at all.Easy example: a transconductance amplifier has an input voltage and an output current. Imagine a pressure control system: the input would be pressure and the output (say) voltage, so the gain would be measured in V/Pa.I put the word "gain" in quotes to indicate that it is not a simple definition. But then it doesn't need to be.QuoteNo. In practice the gain (and hence the stability analysis) would be based on the mean output, even though the output is never at the mean.Think about how you would measure and/or analyse, for example, a class-D amplifier.

author: David Hess
author_rank: Super Contributor
timestamp: October 25, 2014, 12:51:04 pm
content: Quote from: Galaxyrise on October 21, 2014, 12:31:03 amBoltar says that is deliberate as a test. The large gate resistance is adding so much lag when combined with the large capacitance of the pass transistor that even the relatively slow LT1013 is oscillating. This may be corrected in the feedback network and like T3sl4co1l says, a more complex feedback network will work even better to correct the problem.Quote from: tggzzz on October 21, 2014, 08:54:06 amYou have this backwards. For a given amount of external phase lag before the gain drops to unity, a slower operational amplifier will be more stable because the external added lag is a smaller fraction of the operational amplifier's own lag. You can compensate for excessive phase lag externally in the feedback loop or use a slower operational amplifier. Operational amplifiers which support external compensation, external overcompensation, or programmable supply current can be useful in these situations because their GBW may be controlled directly.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 25, 2014, 02:17:49 pm
content: Bang-bang controllers are inherently and intentionally unstable -- oscillating -- the original point was stable, continuous systems (like op-amps)!Tim

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 25, 2014, 02:20:06 pm
content: Quote from: tggzzz on October 25, 2014, 12:18:23 pmAlso a good example, because average-control methods are standard, i.e., treating the clock frequency as a dominant pole and working below that. e.g.http://seventransistorlabs.com/ClassD1/index.htmlTim

author: DeweyOxberger
author_rank: Newbie
timestamp: October 25, 2014, 02:55:25 pm
content: Quote from: Galaxyrise on October 21, 2014, 12:31:03 am1) Op amps generally don't like a capacitive load. The FET's gate is capacitive. It will cause instability in the op amp behavior.2) As the resistance goes to zero the output noise of the op amp feeds into the gate. You'd like a low pass filter there to help reduce overall noise. So some R to work against the gate C is usually nice. The downside is the output voltage slew range of the op amp increases and you risk hitting your slew rate if the resistance gets too large (the op amp will bang rail to rail).

author: LvW
author_rank: Frequent Contributor
timestamp: October 25, 2014, 04:11:07 pm
content: Quote from: tggzzz on October 25, 2014, 12:18:23 pm@Tggzzz: If you carefully read again my post#30 you will notice that I spoke about equalwaveforms- not about equal quantities (voltages, currents, ...).I suppose that an OTA gives a sinus output (current) for a sinus input (voltage), does it not?

author: tggzzz
author_rank: Super Contributor
timestamp: October 25, 2014, 04:21:28 pm
content: Quote from: LvW on October 25, 2014, 04:11:07 pmActually you didn't, you used the phrase "equal signal forms", which doesn't mean much to me. Your clarification makes sense.Of course an OTA (T=transconductance or transimpedance) has a linear relationship between input and output, at least until clipping occurs. At which point the input-vs-output transfer curve looks similar to the output of a high-gain comparator or open-loop opamp

author: Zero999
author_rank: Super Contributor
timestamp: October 25, 2014, 05:17:12 pm
content: Quote from: DeweyOxberger on October 25, 2014, 02:55:25 pm1) True but don't forget that there's a resistor in series with the source terminal which will reduce the gate capacitance seen by the op-amp.2) I thought that op-amps were generally more noisy at lower frequencies so a low pass filter won't have much effect there.

author: David Hess
author_rank: Super Contributor
timestamp: October 25, 2014, 07:01:19 pm
content: Quote from: Hero999 on October 25, 2014, 05:17:12 pmFlicker noise contributes more noise for a given bandwidth and increasing noise at lower frequencies but broadband noise has a lot more bandwidth so it dominates in all but low frequency applications. A discussion about how to filter out flicker noise would be fascinating but beyond the scope of the discussion here.

author: DeweyOxberger
author_rank: Newbie
timestamp: October 25, 2014, 10:42:49 pm
content: Quote from: Hero999 on October 25, 2014, 05:17:12 pm1) The output has a finite effective resistance for sure. It might not be implemented as a series resistance on the output. It's usually an artifact of the design. That resistance may not help with stability under a cap load (the devil is in the details). For many op amps you will need some series resistance on the output.2) There a many sources of noise. Don't forget the noise from the op amp power supply (CMRR). The FET has a high gain. A little R can help.

author: atferrari
author_rank: Frequent Contributor
timestamp: October 26, 2014, 01:24:36 am
content: Hola Boltar, are you still there?He's gone, I think.

author: Simon
author_rank: Unknown
timestamp: October 26, 2014, 07:40:19 am
content: Quote from: atferrari on October 26, 2014, 01:24:36 amI think it got too technical and "anal" about fine detail well out of his understanding. I guess some people didn't notice this was posted under beginners, no one asked for a 400 page technical write up. People generally have to learn in small steps (I do) or it's too much to get ones head around at once.

author: tggzzz
author_rank: Super Contributor
timestamp: October 26, 2014, 08:44:33 am
content: Quote from: Simon on October 26, 2014, 07:40:19 amIt is an interesting dilemma. Personally, while that's true for me, I also like to lurk on topics I only quarter understand - that way I can begin to map out the areas I don't yet know.But in this case I'm sure you are right.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 26, 2014, 07:33:35 pm
content: One of the best professors I ever had was for Statistical Mechanics. A tough physics course to begin with, but he added so much more, from some history in calculus to special functions and quantum mechanics. Testing was on a very loose curve -- you were expected to retain a little bit of everything, and due to the sheer quantity, that was enough.Tim