op amps: stabilizing unity gain and other questions - Page 1
Forum section: electronics / beginners

author: exe
author_rank: Unknown
timestamp: February 04, 2016, 04:07:04 pm
content: Hi!Please excuse my ignorance, I've read dozens of articles and still don't understand some basics. May be someone can answer my questions and recommend a good modern book oriented on using SPICE simulators? Here are the questions:1) In case of unity-gain amp, where is the phase margin? How to sompensate amps in unity-gain configuration?2) I use opamps to limit the current (something like this:). How to compensate it? Should I compensate current sense opamp or comparator opamp?

author: macboy
author_rank: Super Contributor
timestamp: February 04, 2016, 04:47:50 pm
content: If you are building the circuit exactly as it appears in that image, then it will not work and will probably oscillate. That image only depicts the opamps as building blocks, and does not include critical components necessary for operation, such as negative feedback networks for gain setting. It is sort of like a block diagram or electronic pseudo-code; it isn't meant to work as is, but to give you a rough idea of what needs to be done.

author: exe
author_rank: Unknown
timestamp: February 04, 2016, 05:12:53 pm
content: Quote from: macboy on February 04, 2016, 04:47:50 pmCould you please elaborate on this? I don't understand what is really missing from there (other than current sense gain). I attached the scheme I'm actually playing with (picture+TINA model). The issue is that it oscillates and I don't understand the right way to make it stable. I can only think of pre-loading driving opamp (U2) with a resistor (to be put between ground and opamp's output). But I'm not sure this is a valid approach.

author: uncle_bob
author_rank: Unknown
timestamp: February 04, 2016, 05:57:38 pm
content: Quote from: exe on February 04, 2016, 04:07:04 pmHiThat's really a circuit theory question rather than a simulation question. In normal EE training, you get to that course in your third year. There are a lot of other things you learn first that lead up to it. Tossing a book at you is probably not going to work well if it *assumes* (as they all do) that you have taken all of the lead in courses already.Phase margin is the open loop phase at zero gain. Gain margin is the open loop gain at zero phase. Both are measured open loop and then you fiddle a bit with feedback. The net result is a closed loop circuit that is stable. This is all normally done with things like phase / gain plots. The simple answer to making a device stable is to roll off the gain (with feedback or whatever) so it's < 0 at the point you hit zero phase. That all sounds nice, but even the idea of zero phase takes a bit of work to explain. Start at whatever your phase is just above dc and assume that's 180 (or in some cases 90). When you get to zero you are in trouble. Simple way to look at it: you bought an inverting amp, it's finally got enough phase shift to be a non-inverting amp ... that's bad.Bob

author: exe
author_rank: Unknown
timestamp: February 04, 2016, 07:24:14 pm
content: Quote from: uncle_bob on February 04, 2016, 05:57:38 pmThanks, Bob, that's what I overlooked. It is very true I don't know some basics of theory. I'm trying to learn it, but I always have many questions that are hard to answer (like, what opamp to use). Now I'll try to re-readhttps://e2e.ti.com/support/amplifiers/precision_amplifiers/w/design_notes/2645.solving-op-amp-stability-issues.

author: dadler
author_rank: Unknown
timestamp: February 04, 2016, 09:38:25 pm
content: You may want to check out this video series on op amp stability by Analog Devices:https://www.youtube.com/playlist?list=PLiwaj4qabLWwAenk99ONF2_JUjopeAXo4

author: exe
author_rank: Unknown
timestamp: February 04, 2016, 11:45:21 pm
content: Quote from: dadler on February 04, 2016, 09:38:25 pmThank you very much, these videos are nice, but, I still have questions. First, I don't need to stabilize an opamp with capacitive load. I've got two opamps and a mosfet in the loop. Things like throwing a resistor between the opamp and mosfet just don't work. So, how should I proceed to stabilize it?Right now I just put some capacitance to attenuate the feedback on higher frequencies (R9-C2 and R8-C3) and use SPICE simulator to "guess" the best values (using .STEP-like approach explained inhttp://www.linear.com/solutions/4449). This approach was explained in the last video in that playlist ("Stability 101: Parasitic Capacitance in Operational Amplifiers"). But I'm not sure I'm doing it all right and whether this compensation scheme is the best.Might it happen two opamps, mosfets and output capacitor altogether interact in a very complex way?

author: uncle_bob
author_rank: Unknown
timestamp: February 05, 2016, 12:39:00 am
content: Quote from: exe on February 04, 2016, 11:45:21 pmHiYes.Even the mosfet model that you pick will be: A) simple and easy to use --OR-- B) Accurate over a wide range (pick one and only one).This is indeed complex circuit analysis and there is no single simple answer other than digging into all of the theory / modeling / analysis. Dave has some good starter videos on basic circuit equations. Assuming you have had calculus (... and remember it ... yikes !!), that's a reasonable place to start.Bob