Why do (some) opamps need to be "unity gain" stable or whatever? - Page 1
Forum section: electronics / projects

author: mkiijam
author_rank: Regular Contributor
timestamp: June 08, 2024, 03:34:21 pm
content: Why aren't they all "okay" with whatever gain you give them? I don't understand this "unity gain" thing.

author: bdunham7
author_rank: Super Contributor
timestamp: June 08, 2024, 03:39:00 pm
content: An amplifier and an oscillator are closely related in concept and design. If you set up an op-amp that is not unity gain stable as a 1:1 voltage follower, you will have made an oscillator.

author: jonpaul
author_rank: Super Contributor
timestamp: June 08, 2024, 03:44:39 pm
content: bode plot, phase margin

author: TimFox
author_rank: Super Contributor
timestamp: June 08, 2024, 03:57:48 pm
content: The basic answer: look at the amplifier's open-loop phase angle at the frequency where the magnitude of the gain is 1 V/V (unity gain), and at the magnitude where the excess phase angle goes to 180 deg.With 100% feedback (e.g., voltage follower), you need the magnitude of the product of (open-loop gain) x (feedback fraction) to be less than one when the excess phase hits 180 deg, or you have an oscillator with a loop gain > 1 with 180 deg excess phase (positive feedback).The reason why some amplifiers are "de-compensated" and therefore are not unity-gain stable is to get better operation (higher open-loop gain at high frequencies) with a feedback fraction < 1 (e.g., closed-loop gain = 10 V/V).

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 08, 2024, 04:08:27 pm
content: At the very core, the issue is that nonlinear components like opamps and capacitors behave very differently when you give them a constant signal, than when you give them a varying signal.Consider a simple capacitor. When the voltage across it is constant, no current passes over the capacitor.When the voltage varies over it, say with a sinusoidal signal, a bit of currentdoespass over the capacitor.Thus, even though an opamp might give you a very precise gain for constant voltage signal, for a varying signal the actual gain will depend on the frequency.An oscillator is basically an amplifier with a strong preferred frequency. It only needs a "kick" to start oscillating, and often noise is sufficient.For opamps, "unity gain stable" means its frequency response is such that it won't have such a preferred frequency; it won't start oscillating by itself in the voltage follower or unity gain configuration.

author: mkiijam
author_rank: Regular Contributor
timestamp: June 08, 2024, 04:35:42 pm
content: Thanks guys,Does it have a lot to do with the fact that it's getting 100% feedback? I mean I know in the audio world, feedback is bad!

author: tooki
author_rank: Super Contributor
timestamp: June 08, 2024, 04:49:44 pm
content: Quote from: mkiijam on June 08, 2024, 04:35:42 pmNo it isn’t. Feedback as a concept isn’t qualitatively good or bad: there are places where you need it, and places where you can’t tolerate it. Basically, it’s about having the correct amount of feedback when and where it is needed.I assume you’re thinking of speaker feedback into a microphone in a PA system or stage mike, causing whine: that’s basically oscillation due to unwanted feedback. But without feedback, it would be very difficult to make decent amplifiers — feedback is critical to overcoming unwanted nonlinearities in components (resulting in crossover distortion, for examoke), variations in component performance (like the wild example-to-example variability in the gain of bipolar transistors), etc.

author: m k
author_rank: Super Contributor
timestamp: June 08, 2024, 05:33:28 pm
content: Bad post.

author: dietert1
author_rank: Super Contributor
timestamp: June 08, 2024, 09:12:13 pm
content: Using an opamp includes negative feedback. There is no meaningful opamp amplifier circuit without negative feedback. The lower the negative feedback, the higher the resulting amplifier gain.A unity gain amplifier is a difficult one to make, as the negative feedback is the full opamp output. As the opamp output is directly connected to the inverting opamp input there is a high loop gain which can cause oscillation. "Unity gain stable" means an opamp part will work in that configuration without oscillation and without extra measures. A part that is "unity gain stable" will be stable in a higher gain amplifier circuit, too.Semiconductor makers sometimes offer an opamp part in two variations: One that is better for stability (unity gain stable and always stable) and another one that is better for speed.Regards, Dieter

author: macboy
author_rank: Super Contributor
timestamp: June 09, 2024, 02:20:50 pm
content: Quote from: m k on June 08, 2024, 05:33:28 pmThis makes no sense.

author: 2N3055
author_rank: Super Contributor
timestamp: June 09, 2024, 04:06:03 pm
content: There are thousands of sources that explain this.Some reading is going to be necessary. Some introductions:

author: 741
author_rank: Frequent Contributor
timestamp: June 09, 2024, 08:56:27 pm
content: From slightly hazy recollection:An op-amp's gain is deliberately designed to start steadily dropping above some frequency. Eventually the gain falls below 1. The idea is to defeat the problem that inevitably some stray capacitances will be shifting phase - and once enough unintentional RC stages make the phase shift 180 degrees, you'd get (effectively) +ve feedback at some high frequency.The key thing about "unity gain" is the feedback for a follower is 100%: There is no attenuation in the feedback loop. Therefore the op-amps's full 'native' gain is applied to that feedback signal.If you can live with some gain in the op-amp stage, the feedback is now a potential divider, attenuating the signal as seen by the (-) input. The attenuation your "with gain" application circuit creates supplements the op-amps internal roll-off.The op-amp designer can reason "Well, if the user will guarantee to attenuate at least this much, I can engineer the roll-off to hit gain=1 at a higher frequency".The op-amp designer can choose the roll-off curve to hit gain = 1 at a higher frequency, and so your end application can rely on the op-amp supplying "gobs of gain" up to higher frequencies than if you'd purchased a unity-gain stable op-amp of a similar internal design.

author: Phil1977
author_rank: Frequent Contributor
timestamp: June 10, 2024, 05:03:22 am
content: From an application point of view:Unity gain is a quality the chip developers sell you to make your circuit more fool proof and adaptable. You can sell faster op-amps without that feature, but then the circuit designer must always calculate and add components to ensure stability.Saying that feedback is bad is nothing but stupid. Precision amplifiers without any feedback are impossible.

author: Berni
author_rank: Super Contributor
timestamp: June 10, 2024, 05:54:54 am
content: A less technical explanation is that the opamp can "hear too much of its output" and follow it faster than it is actually able to.An opamp is basically just a differential amplifier with very high gain. It is taking the difference between the + and - inputs and amplifying that onto the output. This gain is really high like 1000000x so that you can add external resistors for feedback and bring the gain down to whatever value you want (if the gain was small you would have to factor it into your feedback calculations). This also stabilizes the exact value of the gain to exactly what the feedback resistors set it for.Feedback indeed makes PA speakers sequel into a unstable oscillation when the microphone comes too close. This is an example of positive feedback. It causes a signal to around and around getting amplified larger and larger every time. Negative feedback does the opposite, makes it smaller, hence any oscillations die out. The difference between the two is phase. Negative feedback is 180 degrees out of phase.The stronger of a negative feedback you give the more the gain will be suppressed, all the way down to 1x unity gain. This means the opamp is taking a larger proportion of its output as input and looping it around. So any output disturbance is quickly countered by outputting the opposite of the disturbance. However some opamps might not have an output fast enough to counter that disturbance as quickly as the opamps input stage is commanding it to do. The reason for the output being too slow might be because the opamp is just designed this way (they can use the extra input speed to make the opamp faster at higher gains) or because you are loading down the output too heavily (like too much capacitance on the output).So once you have this case of the output stage not keeping up, you get the input stage not seeing the correction to the disturbance being applied so it commands a even larger correction, then once the output stage catches up and outputs said correction, the correction is too big, so the input stage commands a negative correction, but it is not seeing the result yet, so it command an even bigger negative correction, overshoots the other way, then back up...etc So the amplifier starts chasing its own tail, resulting in a oscillator. This slight output delay is what causes a phase shift, causing the negative feedback to not be 180 anymore, making it look more like positive feedback.By setting the feedback for more gain, you are attenuating this negative feedback, so the input stage sees less disturbance from the output, so it commands less reaction to the disturbance, so the output has a easier time keeping up to what it is commanded to do.Hope this less technical explanation is more digestible than the more math-y explanations that are usually out there on this.

author: dietert1
author_rank: Super Contributor
timestamp: June 10, 2024, 07:20:23 am
content: "Unity gain stable" also means you can use the opamp part to make an integrator - without additional measures for stability. A more general case would be a bandpass filter like Sallen-Key.If you use a "fast" opamp, you need to work out your own stability analysis during circuit design.Regards, Dieter

author: m k
author_rank: Super Contributor
timestamp: June 10, 2024, 08:40:54 am
content: Bad post.

author: mikerj
author_rank: Super Contributor
timestamp: June 10, 2024, 08:55:37 am
content: Quote from: m k on June 10, 2024, 08:40:54 amIt doesn't make any sense and will likely confuse the OP. Unity gain stability is completely unrelated to the stability of a trimmer used to set gain. In fact in the situation you described increasing the closed loop gain to get 6v out would help with stability if the op-amp isn't stable at unity gain (where it's outputting 3v).

author: m k
author_rank: Super Contributor
timestamp: June 12, 2024, 11:30:21 am
content: I took my parts out.