Op-Amps and Comparators

Thread Starter

adam555

Joined Aug 17, 2013
858
Your test clearly shows what this means in practice. Comparators oscillate when you attempt to use them as op amps with negative feedback. This is because, due to internal phase-shifts at high frequency, the feedback becomes positive, thus forming an oscillator. To prevent this in op amps, the frequency response is rolled off (compensated), typically by a single-pole low-pass internal filter, so that the phase-shift never becomes positive until the open-loop gain is less than 1 (a gain of greater than 1 is required for oscillations). If you look at the open-loop frequency response (Bode) plot in an op amp data sheet you will see this rolloff. A side-effect is that this filter also reduces the slew-rate of the op amp output, which is undesirable but unavoidable.
I've been trying to make sense of your explanation, which I really appreciate, but without being familiar with concepts like internal phase-shifts, rolled off (compensated), single-pole filters, open loop gains, and so on I'm finding it quite difficult.

I tried to find the open-loop frequency response plot in the datasheet of the AD822 opamp that I'm currently doing the tests with, and this the closest I found... though I honestly have no idea what it represents. :(

Untitled-1.jpg

Simplifying: could we say that comparators tend to saturate -either positively or negatively-, instead of staying in the middle voltage range; that's why it oscillates when we try to amplify with negative feedback?
 
Last edited:

Jony130

Joined Feb 17, 2009
5,488
The plot you find shows how op amp open loop voltage gain change versus frequency.
Also on the same plot you have the op amp phase-shifts vs frequency.
Phase-shift between output and input voltage.
You may ask what "open loop voltage gain" means? Well simply "open loop gain" tell us the gain an op amp alone, without any feedback loop.
If you have time try also read this
http://forum.allaboutcircuits.com/sh...315#post444315
 

crutschow

Joined Mar 14, 2008
34,408
............................

Simplifying: could we say that comparators tend to saturate -either positively or negatively-, instead of staying in the middle voltage range; that's why it oscillates when we try to amplify with negative feedback?
Not really. It has to do with frequency response, open-loop gain, and phase shift (difference in phase between the input voltage and output voltage). An op amp's output with no feedback will saturate similar to a comparator.
 

LvW

Joined Jun 13, 2013
1,754
Adam555, here is an additional hint for you:
Sometimes there is a confusion between two similar-sounding terms:

* "Open loop voltage gain" or simply "open loop gain" means - as mentioned already by Jony130 - gain of the opamp alone without any feedback loop (often used symbol: Aol)

* "Loop gain" is the gain of the complete feedback loop. That means, it is the product of Aol and the feedback transfer function (which sometimes is called "beta" or Hreturn=Hr), thus A,loop=Aol*Hr.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Adam555, here is an additional hint for you:
Sometimes there is a confusion between two similar-sounding terms:

* "Open loop voltage gain" or simply "open loop gain" means - as mentioned already by Jony130 - gain of the opamp alone without any feedback loop (often used symbol: Aol)

* "Loop gain" is the gain of the complete feedback loop. That means, it is the product of Aol and the feedback transfer function (which sometimes is called "beta" or Hreturn=Hr), thus A,loop=Aol*Hr.
You may ask what "open loop voltage gain" means? Well simply "open loop gain" tell us the gain an op amp alone, without any feedback loop.
If you have time try also read this
http://forum.allaboutcircuits.com/sh...315#post444315
Now that you explain it that way, the meaning of open-loop sounds perfectly obvious. Thanks.

The plot you find shows how op amp open loop voltage gain change versus frequency.
Also on the same plot you have the op amp phase-shifts vs frequency.
Phase-shift between output and input voltage.
I now see what the graph represents; at least open-loop gain against frequency, which come down to the gain dropping with frequency.

What I don't understand is what phase magnitude is, and what it has to do with opamps. Is it similar to RC and RL circuits that shift the phase of the voltage/current 90 degrees?

Not really. It has to do with frequency response, open-loop gain, and phase shift (difference in phase between the input voltage and output voltage). An op amp's output with no feedback will saturate similar to a comparator.
I would be really helpful if I could see this things in an example circuit.
 

LvW

Joined Jun 13, 2013
1,754
What I don't understand is what phase magnitude is, and what it has to do with opamps. Is it similar to RC and RL circuits that shift the phase of the voltage/current 90 degrees?
Yes - within the region with a high gain the opamp`s open-loop function is very similar to a first-order lowpass (with gain) or even similar to an integrating function .
Thus, as you can see, over a wide frequency range the phase shift is app. 90 deg.
However, since the Aol transfer function has additional poles, the phase shift increases (in the area around the second pole wo2) to larger values.
This can be a problem in case of feedback (which is the normal opamp operation).

And that is the point where LOOP GAIN comes into the game.
Imagine we have the most critical case with poor resistive feedback: 100% feedback leading to a closed-loop non-inverting gain of unity.
In this case Hr=beta=1 and the loop gain is identical to the Aol characteristic.
When the phase characteristic is 180 deg at frequencies where the gain magnitude ist still above unity (0 dB) the closed-loop has reached its stability limit (oscillation condition) because we have in total a 360 deg phase shift (taking into account the 180 deg from the inverting input that closes the loop). Thus, there is one single frequency for which the loop gain is larger than 0 dB with a phase of 0 deg (360 deg).
That means: No stable amplification is possible.

Therefore, an opamp that is stable for all kinds of (resistive) feedback must have a phase shift of less than 180 deg in the frequency region with magnitudes above 0 dB.

This justifies the importance of the phase characteristic.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
I find all this so complicated that many times I feel like just giving up. I never had such problems learning anything in my entire life. And I'm good at sciences, and was pretty good at physics and maths before I forgot most of it. But electronics just beats me. :(

I got completely lost up here:

However, since the Aol transfer function has additional poles, the phase shift increases (in the area around the second pole wo2) to larger values.
It took me 5 minutes to realize that with "Aol" you meant "open-loop gain". :p
And I'm still wondering what "wo2" means, and what are the additional poles.
 

Jony130

Joined Feb 17, 2009
5,488
adam555 Do you understand RC filters?
With first oder low pass filter we gave one pole at Fc = 1/(2 * pi * RC)
wo = ωo angular frequency = Fc * 2pi. so for F = 50hz we have ω = 314 radians per second.

But if we add anther RC filter will have we add second pole at ωo2 = 1/R2*C2.


\(Aol = \frac{K1 *K2}{\sqrt{(1 -\omega^2 *T1 * T2)^2 +\omega^2 *(T1+T2)^2 }}\)

Where T1 = R2*C1 and T2 = R2*C2
Aol = for DC is equal K1 * K1 = 3.16*3.16 = 10V/V = 20dB
But at ωo1 = 1/R1C1 gain start to drop at rate 20db per decade and at ωo2 gain start to drop even faster (40dB per decade)
http://educypedia.karadimov.info/library/acqt0131.pdf
 

Attachments

Last edited:

Thread Starter

adam555

Joined Aug 17, 2013
858
adam555 Do you understand RC filters?
With first oder low pass filter we gave one pole at Fc = 1/(2 * pi * RC)
wo = ωo angular frequency = Fc * 2pi. so for F = 50hz we have ω = 314 radians per second.

But if we add anther RC filter will have we add second pole at ωo2 = 1/R2*C2.


\(Aol = \frac{K1 *K2}{\sqrt{(1 -\omega^2 *T1 * T2)^2 +\omega^2 *(T1+T2)^2 }}\)

Where T1 = R2*C1 and T2 = R2*C2
Aol = for DC is equal K1 * K1 = 3.16*3.16 = 10V/V = 20dB
But at ωo1 = 1/R1C1 gain start to drop at rate 20db per decade and at ωo2 gain start to drop even faster (40dB per decade)
http://educypedia.karadimov.info/library/acqt0131.pdf
Until now I only touched simple capacitive and inductive filters; for example, I just had to look on the internet what are first and second order filters. Also haven't studied multiple filters or poles, or even op-amp filters.

I really appreciate the explanation, but I just began with op-amps, and I can see that this is way beyond where I'm at for the moment.

In any case, it wasn't a total waste of time... I finally got the general idea of these concepts.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Not sure if this makes any sense... I just did a test to try and see this 90º phase shift between the input and the output described on the graph, and I couldn't replica it; it's just inverting the input (180º degrees). Of course, I had to do it with a negative feedback; not with an open loop, because with an open loop I will just saturate the output.
 

LvW

Joined Jun 13, 2013
1,754
It took me 5 minutes to realize that with "Aol" you meant "open-loop gain". :p
And I'm still wondering what "wo2" means, and what are the additional poles.
Hi adam, I am very sorry about your 5-minute problems.
However, let me say that I try never to use symbols without corresponding explanation. Perhaps hidden somewhere?
* In my former post#24 I had given the explanation on Aol.
* And in the 5th line of my last post I have mentioned wo2 together with an explanation.
However, I agree with you that we all should try to explain technical formulas and symbols as clear as possible. I promise to to my very best.
 

LvW

Joined Jun 13, 2013
1,754
Adam, the symbols K1 and K2 used by Jony130 denote a fixed and finite gain (for example K1=2 and K1=1) to be realized with opamps (for example!) with feedback.
Dis you assume both units are opamps without feedback?
 

Thread Starter

adam555

Joined Aug 17, 2013
858
Hi adam, I am very sorry about your 5-minute problems.
However, let me say that I try never to use symbols without corresponding explanation. Perhaps hidden somewhere?
* In my former post#24 I had given the explanation on Aol.
* And in the 5th line of my last post I have mentioned wo2 together with an explanation.
However, I agree with you that we all should try to explain technical formulas and symbols as clear as possible. I promise to to my very best.
It's my fault... I always end up asking question that are well beyond my current knowledge, and all you talk about things that are too advance for me, introduce a lot of new concepts -even though you explain them well- and I simply go into "saturation". :(

For example: I should have known what open-loop means, but when it was mixed in the middle with all the rest of new concepts, I simply missed it. Same with "Aol"; I simply didn't remember it from the previous post, probably because I was already confused back there.

In any case, I really appreciate all your help; sooner or later everything ends us sinking in, it just frustrates me that there is so much to electronics and that the progress I'm making is so slow.
 

crutschow

Joined Mar 14, 2008
34,408
You might try reading some electronics tutorials, such as shown at the top of this forum page. There's obviously a lot to digest but it should eventually sink in if you are persistent. ;)
 

Thread Starter

adam555

Joined Aug 17, 2013
858
I just noticed (better late than never :)) that apart from op-amps and comparators, there are also differential amplifiers. I think that actually all of them are different types of differential amplifiers; but, in practice, what is the difference between a differential amplifier and an operational amplifier -if any-?

Also, I see that this three symbols are used; and though I only saw A used for op-amps, I saw all 3 used for comparators. So, which is the right symbol for each of the three main types (comparator, differential and operational amplifiers)?

 

Attachments

crutschow

Joined Mar 14, 2008
34,408
An op amp is a type of differential amplifier, which is a more general term for any amplifier with differential inputs. Symbol A is typically used for op amps (the Swiss Army Knife of analog circuits). It can also be used for other types of differential amps and comparators.

Symbol B shows a comparator with hysteresis built-in to its operation.

Symbol C with the "greater than" symbol at the output indicates a comparator.

Another type of differential amplifier is the Instrumentation Amplifier. It has high impedance differential inputs with gain typically determined by one external (not feedback) resistor. It can be made with two or three standard op amps and some accurate resistors but is typically an IC.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
An op amp is a type of differential amplifier, which is a more general term for any amplifier with differential inputs. Symbol A is typically used for op amps (the Swiss Army Knife of analog circuits). It can also be used for other types of differential amps and comparators.

Symbol B shows a comparator with hysteresis built-in to its operation.

Symbol C with the "greater than" symbol at the output indicates a comparator.
So C would be a normal comparator, and B a Schmitt trigger; which is a type of comparator with hysteresis?... I'm asking because I haven't toughed this last ones yet.

Another type of differential amplifier is the Instrumentation Amplifier. It has high impedance differential inputs with gain typically determined by one external (not feedback) resistor. It can be made with two or three standard op amps and some accurate resistors but is typically an IC.
I read that apart from instrumentation amplifier, there are also: fully differential amplifiers, instrument amplifiers, and isolation amplifiers; but didn't want to ask about these so I don't mix things up again.
 
Top