How does an Op-Amp work? (seriously...)

Nov 10, 2007 9 Replies

This has been bothering me for a while now... How exactly does an op- amp work? I mean - I know what they do as a block unit, and how to use them in many useful ways - but how do they actually accomplish what they accomplish? In textbooks they always say that they just amplify the difference between their two terminals - but that can't be it completely... I mean if you are using an op-amp as a buffer (V+ = Vin, Vout = V-), and let's say it's doing it's job so V+ = V- = Vout = Vin. But V+ - V- = 0, so shouldn't the op-amp be outputting 0, instead of Vin? Then when it started outputting 0, it'd try to amplify the difference and would just oscillate back and forth. So - what am I missing here?



Thanks!


-Michael



Only something very tiny.

Than opamp does not have an infinite differential gain, but only a high differential gain.

When connected as a follower (buffer), the two inputs do not match, exactly, but settle at a small difference voltage. That difference being the small differential input voltage, that when amplified by the large voltage gain produces an output voltage that is

*almost* equal to the input voltage. The error between input and output providing the small signal that gets amplified.

The higher the differential gain, the smaller the error and the less the input differential voltage.

On a sunny day (Sat, 10 Nov 2007 18:56:17 -0000) it happened Michael wrote in :

When the + input is say +1V, and the - input connected to the output, then the output will rise until it is also close to 1V, and with it the

- input, then it will stay there. You can say that the output will rise as long as there is a difference, in this case with the + input, follows the + input, so it is called 'voltage follower'.

If the open loop gain is 100000 and the input +1V, then (apart from offset), the - input will end up at 1/1000000 * +1V below the + input, about +.99999 V.

Opamps are deliberately and carefully slowed down internally, "frequency compensated", so that input errors are corrected smoothly. Feedback systems can oscillate, or can approach equiblrium nicely, depending on the time response of the gain elements. Opamps are designed to be smooth. Devices that are designed for flat-out speed, like RF amps or comparators, will usually oscillate if given much negative feedback.

John

Actually, even an infinite gain wouldn't do it. Remember your calculus? The voltage between the input pins would then be lim G-->infinity (Vout / G).

In practice, gain is in the 10k range so voltage is in the milivolt or sub-milivolt range.

Your iterative method needs calibration. For instance, can you tell what frequency it oscillates at? Presumably, the output flips every iteration. But how long is an iteration cycle? 1 second? 1 nanosecond? Infinnetessimal? The problem in your approximation is you forgot factors of gain and phase shift. And these aren't very easy to wave your hands over when iterating. Best to leave that method alone and embrace a richer -- and yes, more mathematical method.

In fact, an uncompensated op-amp (commonly sold as a comparator, e.g., LM393) *will* oscillate, because it has significant phase shift and gain at high frequencies. Typically, an LM393 will buzz around 2-3MHz, depending on how it's connected. The uA741, LM358 and so on are internally compensated, so there is no way you can connect them (with resistors) that will oscillate. The two important factors are, from about 10Hz until fT (maybe 1MHz on these slow op-amps), the gain falls linearly with frequency. At 100kHz, gain might be 10. You only get 10k gain under 20Hz or so. This rolloff is accompanied by a nearly constant phase shift of 90 degrees, which is not nearly enough to cause oscillation. (Two identical op-amps, chained in a loop with no compensation, will oscillate, however.) The phase shift does rise towards 180 degrees, but only after gain drops below

1, beyond fT.

Tim

-- Deep Fryer: A very philosophical monk. Website @

formatting link

Actually that is exactly what it does and the only thing your missing is the other part of the circuit that is "connected" to the op amp.

So if you ground one of the inputs to the opamp then the other must be ground to(approximately of of course). But Vout isn't 0.

V out is determined by the output of the op amp + the feedback. V- is usually not Vout except in a buffer configuration.

Ok, heres the deal about op amps. They let you specify a voltage at a particular point in a circuit by another voltage. In a sense you can program a voltage.

Your basic inverting amplifier configuration is just a voltage divider. But guess what? By using an op amp to program the voltage inbetween you get to set it to 0, for example, to make solving the equation for the circuit very simple.

basically you have

VI ---R1---x----R2---VO

Now because we don't know what VO is we can't solve this. i.e., it makes no sense.

But if, say, we know what x is, then we can easily solve it....

i.e.

(x - VI)/R1 = (VO - x)/R2

and we can solve for VO.

The op amp supplies us x. If we make it 0 then guess what?

-R2*VI/R1 = VO

is just our basic inverting amplifier configuration.

But its not that simple. What if we just grounded the point at x to get 0 volts?

Then we have the same equations above. Whats the difference?

With an op amp we are able to get drive to drive the following stages. By grounding it we cannot. This is why VO is hooked up to the output of the op amp. So we get VO but with variable current instead of fixed. (The op amp acts as a voltage source in this case with VO sorta "programming the voltage" or a current source that adds to the current at VO)

Thats why op amps are so nice. They let us "insert" specific voltages in parts of the circuit so we can solve it very easily and they supply all the drive we need(up to a point).

This is just one point of view though and doesn't explain the internals. But thats probably not all that important at this point and if your interested in that then you probably need to ask specifics about it and look it up in a book. The basics are not hard though and its essentially just a differential amplifier and current source with a bunch of cool tricks to make it work very well. (such as current mirrors, active resistors, etc... AOE deals with all those tricks and stuff and is a good book if your interested)

In some sense an op amp is sorta like an "active zener". It fixes a voltage(although which may be varying) and supplies current to drive the output. I suppose this is an oversimplied view but works in explaining all the basics.

Jon

And lim[x->infinity](1/x) is equal to zero. Not approximately equal or almost equal, but exactly equal.

On a sunny day (Sat, 10 Nov 2007 19:19:54 GMT) it happened Jan Panteltje wrote in :

Actually, for the - input connected to the output, the math says: where U1 is + input to ground U2 is - input to ground Uout is output to ground. A0 is open loop gain Uout = (U1 - U2) * A0;

As the - input is connected to Uout, we can substitute Uout by U2:

U2 = (U1 - U2) * A0

U2 = U1 * A0 - U2 * A0

U2 + U2 * A0 = U1 * A0 U2 * (1 + A0) = U1 * A0 U2 = (U1 * A0) / (1 + A0)

As U2 is connected to Uout, they are the same Uout = (U1 * A0) / (1 + A0)

For 1V input and 100000 x open loop gain this gives:

Uout = (1 * 100000) / (1 + 100000) = 100000 / 100001 = .99999

:-)

Not counting offset.

But if it were zero, then there would be no output. You aren't remembering your calculus. ;-)

You can have a function with a hole in it, like: f(x) = (x^2 - 1) / (x + 1), and it will have the value: f(x) = (x - 1)(x + 1) / (x + 1) = x - 1 for all values except x = -1. However, at x = -1, f(x) = (-1 - 1)(-1 + 1) / (-1 + 1) = (-2)(0) / (0) = 0/0, undefined. This can be evaluated by simply applying the limit operator, or using L'hopital's rule, which uses two limits and more calculus. In both cases, you can find that the value approaches -2 at x = -1, but knowing the function's value infinnetessimally adjecent to the discontinuity doesn't change the fact that the function has a discontinuity in it.

The feedback voltage approaches zero, but never equals it.

Tim

-- Deep Fryer: A very philosophical monk. Website @

formatting link

That's excessively snipped; see below.

You aren't remembering that we were talking about *infinite* gain.

That's because the gain approaches infinity, but never equals it.

The above example isn't particularly relevant. Your f(x) is undefined at x = -1, while f(x) = 1/x is defined at infinity. Even then, whether or not a function is defined at a limit has no bearing on the value or even existence of a limit. In particular, it's possible for f(p) to be defined yet not equal to lim[x->p]f(x).

To restate my previous post in its entirety:

"Vout / G" may never equal zero, but its limit as G-->Infinity *is* equal to zero. And calculus doesn't come into it.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required